Live data from Hacker News

Lisp in fewer than 200 lines of C

carld.github.io

1–10 of 108 posts

Re: Lisp in fewer than 200 lines of C

#3
No calls to free() to match calloc(), no overflow checking in gettoken() and then I read this:

> a program with missing or unmatched parenthesis, unresolved symbols, etc will likely just result in something like a segmentation fault.

I understand this is just a fun thing to hack on, but this is an irresponsible way to write software. I hope no one here is reading this and thinking it's how they should be writing C.

Re: Lisp in fewer than 200 lines of C

#4
post #3

No calls to free() to match calloc(), no overflow checking in gettoken() and then I read this: > a program with missing or unmatched parenthesis, unresolved symbols, etc will likely just result in something like a segmentation fault. I understand this is just a fun thing to hack on, but this is an irresponsible way to write software. I hope no one here is reading this and thinking it's how they should be writing C.

If people always wrote software responsibly we'd have a great deal fewer interesting projects on GitHub

Re: Lisp in fewer than 200 lines of C

#6
post #4
post #3

No calls to free() to match calloc(), no overflow checking in gettoken() and then I read this: > a program with missing or unmatched parenthesis, unresolved symbols, etc will likely just result in something like a segmentation fault. I understand this is just a fun thing to hack on, but this is an irresponsible way to write software. I hope no one here is reading this and thinking it's how they should be writing C.

If people always wrote software responsibly we'd have a great deal fewer interesting projects on GitHub

Would it really be so hard to do this exact same thing in a memory safe language? Would that stifle the author's creativity in any way?

Re: Lisp in fewer than 200 lines of C

#9
post #4

Earlier quoted context omitted.

If people always wrote software responsibly we'd have a great deal fewer interesting projects on GitHub

Would it really be so hard to do this exact same thing in a memory safe language? Would that stifle the author's creativity in any way?

Writing Lisp in 200 lines of Haskell wouldn’t be nearly as interesting. The whole point is (presumably) that it’s fun to code golf in C because it’s not very expressive. Relax, no one is going to use the OP’s code to run a pacemaker.
Post reply on HN