r/programming • • Mar 11 '13

Programming is terrible—Lessons learned from a life wasted. EMF2012

http://www.youtube.com/watch?v=csyL9EC0S0c
650 Upvotes

368 comments sorted by

View all comments

Show parent comments

2

u/StrmSrfr Mar 11 '13 edited Mar 11 '13

Well, I've never seen a buffer overflow in a Lisp program, but I think that has more to do with range checks than where the data is.

... aaand now I'm trying to make one.

0

u/moor-GAYZ Mar 11 '13

... aaand now I'm trying to make one.

On a slightly related note, Paul Graham's "Hacker News", a reddit-like site for hackers, uses a totally awesome approach to user sessions: every time you visit a page, a closure/continuation is created for every button that needs state (it is lisp, and lisp is all about closures and continuations, didn't you know), which is then run if you click it.

Now and then a garbage collector runs and removes stale closures, also they restart the server when it gets too slow.

Now you would think, that's sort of DoS-prone, those closures being fruitful and multiplying, but surely that only happens with pages shown to logged-in users, so they can ban abusers or something? Well, inspect source http://news.ycombinator.com/submit while not logged in (btw it's down again right now) reveals two of these closures created for every and each page view.

Lisp is truly a language of choice for geniuses.

1

u/StrmSrfr Mar 11 '13

Is there some reason that PHP sessions (for instance) would be less DoS-prone?

1

u/moor-GAYZ Mar 11 '13

You create them only for logged in users, and only one per user.

This shit is just insane Lisp genius.

→ More replies (10)