News for hackers. Stuff that matters.

mw42

Re:Railroad Tycoon on Friday March 17, 2017 @08:07PM (#13899074)
You can get the original (running in dosbox) from gog.com for a couple of bucks. Maybe it's just nostalgia, but I preferred the original too.
Re:A pragmatic decision on GNU Emacs versus Vim for programming on Tuesday February 07, 2017 @03:36PM (#13592520)
evil (the vim emulator for emacs) is fantastic, but the argument that emacs + evil must be equivalent or better than vim is also flawed. For example, plenty of emacs modes and packages have extensive keybindings that clash with vim, so the emacs + evil experience will never be as smooth as vim and its own native packages that were designed with vim's interface in mind.

Yes, you can give up the vim bindings in certain modes, or spend lots of time re-configuring various packages' bindings. But that is not something you'd ever have to struggle with when using vim.

Re:ThinkPad X1 Carbon on Friday December 30, 2016 @06:19PM (#13288370)
I upgraded to a Razer Blade from a 2013 macbook.

Performance is great.

It is very well built, I would say on almost on par with a Mac, except for thin grills covering the cooling fans on the bottom. Grabbing the laptop in the wrong spot can easily push the grills up against the fan.

Battery life is terrible. Lucky to get 4-5 hours running a nothing but a browser and ssh client. (On windows 10. I haven't tried, but remember reading that power management on linux is even worse)

The trackpad gestures are not as accurate as on a Mac. I don't know how much of that is Windows vs the hardware.

Cooling fans are always on, and they are kind of loud even at low rpm. Not noticeable in a noisy office environment, but annoying in a quiet setting. The black chassis is a fingerprint magnet like no other laptop I've seen. The lit green logo on the lid is a bit obnoxious, and would not fit in at a very corporate environment. The actual display size is somewhat smaller than that of many similarly sized notebooks.

I'm okay with the trade offs (though the battery hurts...) but its definitely not a clear-cut winner compared to the competition.

Edit: the Blade Stealth may fare a little better battery wise, but even it doesn't have a stellar battery life.

Re:Programming Languages as Constraints on Friday June 03, 2016 @05:17PM (#11833338)
> It'll be interesting to see if source/sink channel types ever get retrofitted to Go in a decade or so.

Channels can be designated as receive-only or send-only in variable and function declarations:

  ch := make(chan int, 1)
	
  var send chan<- int = ch
  var recv <-chan int = ch

  send <- 1 // ok
  <- recv   // ok

  recv <- 1 // invalid operation: recv <- 1 (send to receive-only type <-chan int)
  <- send   // invalid operation: <-send (receive from send-only type chan<- int)
Re:Using GNU Stow to manage your dotfiles on Tuesday October 21, 2014 @09:10PM (#8491052)
For installation from source I use CheckInstall [1]. It will keep track of all the files created during a make install, and create a standard deb or rpm package that can then be installed and removed by the distribution's package manager.

[1] http://www.asic-linux.com.mx/~izto/checkinstall/docs/README

Re:Rich Command Shells on Friday October 10, 2014 @12:07PM (#8438477)
SQL injection is not avoided by escaping arguments, but by never mixing the command and user supplied arguments in the first place. The equivalent to your example would be

  execlp("mv", "mv", src, dest, NULL);
which does not rely on the shell to try to untangle your arguments from a single string.

Edit: Fixed, thanks!

Re:Install Debian packages without starting daemons on Friday June 27, 2014 @10:31AM (#7954059)
I had the same issue. There is another solution for postgres.

Install postgresql-common first. Edit /etc/postresql-common/createcluster.conf to disable creation of the cluster on install (or change the options used to create the cluster) and then install postgresql-x.y