HN user

mw42

16 karma
Posts0
Comments7
View on HN
No posts found.
Railroad Tycoon 9 years ago

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.

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.

ThinkPad X1 Carbon 10 years ago

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.

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)
Rich Command Shells 12 years ago

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!

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