News for hackers. Stuff that matters.
Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by aaronbrethorst on Thursday April 08, 2010 @08:08PM (#1251478)
Yeah, the Linux kernel, Mozilla, Chrome, Safari, Emacs, vi, Mac OS X, iPhone OS, Windows 7, Google search, Apache, Nginx, the very first web browser, et cetera are utter crap.
Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by jrockway on Thursday April 08, 2010 @09:52PM (#1251617)
As an Emacs developer, I can tell you with 100% confidence that the C part of Emacs is utter crap.

The good news is that there isn't very much of it.

The rest of the software is buggier than it should be. My web browser has remotely-exploitable security holes. Random drivers in Linux randomly regress as the version number increases. OS X and Windows 7 crash for no reason, and don't support enough hardware.

The only program I use regularly that doesn't crash on me is Xmonad. And guess which language that isn't written in.

Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by wisty on Friday April 09, 2010 @01:27AM (#1251965)
Xmonad claims to be about 1000 lines of Haskell. I'd say that's equivalent to about 10-100k of C.

It doesn't crash because it's simple, not because it's written in a good language.

Well you'd probably have 100X as many bugs in a C program (it takes 10X as many LOC, and I bet bugs scale with N^2), so Haskell is a bit better, but language isn't as important as scope. Big programs have more bugs.

Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by jrockway on Friday April 09, 2010 @03:37PM (#1253618)
Actually, it doesn't crash because a theorem prover was run over the code to prove that it wouldn't crash. I believe some obscure stackset crashes were preemptively found this way.

http://neilmitchell.blogspot.com/2007/05/does-xmonad-crash.h...

Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by sketerpot on Friday April 09, 2010 @12:03PM (#1253046)
It's not just lines of code; Haskell's BDSM-oriented type system is often infuriating, but it's remarkably good at catching bugs at compile time. Haskell programs tend to have a surprisingly small bug rate once you can actually get the things to compile.
Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by jabakobob on Friday April 09, 2010 @04:38AM (#1252224)
While I agree that C (and C++, and Obj-C) have some problems that make it really easy to write completely buggy software, I wouldn't go as far as blaming programming languages for buggy apps.

Plus, I don't understand why people keep praising XMonad for its lack of bugs. It has some bugs that are quite annoying (eg. stuck windows that don't close, locked with only one tile on a screen) -- on the other hand, I've never seen a bug in metacity.

Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by l0stman on Friday April 09, 2010 @03:17AM (#1252118)
To be fair, the part of Emacs implemented in Lisp looks nothing like poetry. I wouldn't qualify it as ``utter crap'' but it's a lot messier than I thought. Some of the default packages looks like straight C code translated verbatim to Lisp.

My take is that even if it's easier to screw things up in C, that doesn't mean that if you program in a higher level language, you'd automatically produce elegant code.

Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by eru on Friday April 09, 2010 @07:57AM (#1252413)
Emacs Lisp is a mess. It doesn't even have lexical scoping.
Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by jrockway on Friday April 09, 2010 @04:16PM (#1253750)
The development version does.

I can tell you, though, that this doesn't really matter in real life. The compiler warns you when you use a free variable, so it's pretty hard to accidentally misuse a dynamic variable. There are pathological cases that people point out, but these rarely matter in elisp that most people actually write.

Programming Emacs is a little different from programming other systems, but once you use its idioms instead of the ones you took from your favorite language, everything works quite nicely.

Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by eru on Friday April 09, 2010 @08:00PM (#1254214)
Oh, it's not so much a problem of using a free variable by accident--where the compiler can help you out--but of not being able to use proper closures.

I agree that emacs lisp can still be used to productively write software. People put up with much worse things.

Re:New iPhone Agreement Bans Flash-to-iPhone Compiler & Others by Confusion on Friday April 09, 2010 @03:19AM (#1252121)
Not sure why this is getting upvoted (and the grandparent downvoted), because it is completely besides the point. I'm always amazed when any of my code runs, but the more so when I write C. Apple is strangely not supporting any modern language that reduces the chance of subtle and hard-to-fund bugs.