News for hackers. Stuff that matters.

POSIXprog

Re:Why does Haskell, in your opinion, suck? on Monday April 18, 2016 @01:09AM (#11517824)
> The extension only affects definitions in this module. Functions and data types imported from other modules are unaffected
Re:Why does Haskell, in your opinion, suck? on Sunday April 17, 2016 @08:59AM (#11514357)
Bryan Cantrill's take: https://youtu.be/0T2XFSALOaU?t=2021

My answer would be lazy evaluation by default. It's extremely unusual, and I've never seen a convincing enough justification for it, and it gives rise to performance bugs (space leaks) that can be fiendishly difficult to track down and fix and are disastrous in production. With the arrival of Idris, I think we can pretty conclusively say this was a mistake and that the Miranda branch of the PL family tree is likely to prove to be an evolutionary dead-end.

Re:Unix’s file durability problem on Sunday April 17, 2016 @06:16AM (#11514050)
Most programmers, and especially the hipsterish HN crowd, simply cannot be trusted to write correct file manipulation code. In general, anything they produce will be riddled with race conditions and erroneous assumptions (e.g., that rename works cross-device, that close cannot fail) and that breaks in rare but possibly catastrophic circumstances.

The solution is copy-on-write file systems such as ZFS and Btrfs that ensure neither data nor meta-data are ever altered in-place and the reuse of correct file manipulation code (written by adults) rather than rolling your own, either from a library or something higher-level like SQLite.