Destroying C with 20 lines of Haskell: wc
21–30 of 74 posts
Re: Destroying C with 20 lines of Haskell: wc
#22Re: Destroying C with 20 lines of Haskell: wc
#23I've done many very arrogant things in my life, because I've been a strange guy with lack of self-esteem who doesn't have a clue how many things he doesn't know. I hope I've never been this arrogant, though.
Re: Destroying C with 20 lines of Haskell: wc
#24This doesn't seem to be comparing anything like the same thing. Does the Haskell version really do the same thing as the C version? Does it handle all of the same error cases, providing the same quality of error messages if they occur? Does it handle localization? If not, that makes the comparison very skewed, as unhammer already pointed out. Sure, if you strip out all of the things that the people who wrote wc actua…
Like yourself, I think any reader could understand that this is meant to be a toy implementation. The author even says so in the very first paragraph and at several points in the article thereafter. How is that dishonest?
Re: Destroying C with 20 lines of Haskell: wc
#25> So we’ve managed to just smash a C program that was looked at by thousands of eyes of quite hardcore low-level Unix hackers over a few decades. We did this with a handful of lines of pure, mutation-less, idiomatic Haskell, achieving about 4 to 5 times of throughput of the C version and spending less than an hour on all the optimizations. I've done many very arrogant things in my life, because I've been a strange gu…
Do you think you took the most generous possible interpretation possible?
Re: Destroying C with 20 lines of Haskell: wc
#26This doesn't seem to be comparing anything like the same thing. Does the Haskell version really do the same thing as the C version? Does it handle all of the same error cases, providing the same quality of error messages if they occur? Does it handle localization? If not, that makes the comparison very skewed, as unhammer already pointed out. Sure, if you strip out all of the things that the people who wrote wc actua…
Does it handle multiple files, and stdin? Anyway, destroying Haskell with 100 lines of C :-) https://raw.githubusercontent.com/gdevic/minix1/master/comma...
Re: Destroying C with 20 lines of Haskell: wc
#27I don't think it is very "hard" to "destroy" most of these programs, they were written a long time ago, they evolved with backwards compatibility or portability in mind, these can run on pretty much any system. It does seem a bit unfair to compare it to a quickly hacked together program that you test against one use case. Like the other said, the second article will probably be more interesting.
Re: Destroying C with 20 lines of Haskell: wc
#28> So we’ve managed to just smash a C program that was looked at by thousands of eyes of quite hardcore low-level Unix hackers over a few decades. We did this with a handful of lines of pure, mutation-less, idiomatic Haskell, achieving about 4 to 5 times of throughput of the C version and spending less than an hour on all the optimizations. I've done many very arrogant things in my life, because I've been a strange gu…
Perhaps - just possibly maybe perhaps - he was suggesting its is his superior tool and technology that allowed his team to do this. Do you think you took the most generous possible interpretation possible?
Re: Destroying C with 20 lines of Haskell: wc
#29Then I'll consider C destroyed.
Re: Destroying C with 20 lines of Haskell: wc
#30average time: 0.8 seconds