Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How would your async stuff differ from the threading interface in SBCL and e.g. lparallel and bordeaux-threads?
 help



The same way threads are different from goroutines, green threads, JS event loop etc.

OK, and what way is that? Smaller default heap? IIRC lparallel implements pretty much the same things as threading in Golang.

It is not easy to tell because lparallel's documentation website has rotted away just the same as cl-user.net. Does anyone remember this beautiful wiki of CL libraries?

Anyway, it looks like lparallel is nice and has some very useful concurrency primitives, but it doesn't have lightweight scheduling, unlike Go. So no cheap async work with many open sockets, cheap context switching, better cache utilisation, simple language constructs and mental model for async tasks. Besides, Go has M:N scheduler. It has all these async benefits but in addition all the threading benefits. Such things can only be properly done by the implementation.



Looks like a sibling comment mentioned the proper documentation home. And OMFG cliki is still down... 17 days ago it was "being worked on, being brought onto new infrastructure". It will be back eventually... But a lot of Lisp people aren't really web dev people, for better and worse. (Having any significant downtime for such a service is nuts to me.)

You might be right about typically needing deep implementation support but that hasn't really stopped people from trying to do all sorts of concurrency approaches with Common Lisp including async ones. Ones of note are listed here: https://github.com/CodyReichert/awesome-cl?tab=readme-ov-fil... Usually they are still built on the native threads, though, but cl-coroutine is built on cl-cont (continuation passing style) which has also served as a foundation for building green threads with e.g. https://codeberg.org/thezerobit/green-threads cl-async is also odd as being built on libuv, and similarly there's libev bindings with https://github.com/fukamachi/lev that power the webserver woo: https://github.com/fukamachi/woo (Which as of 10 years ago, had comparable performance with Go in reqs/s.) (That timing makes me want to add that personally, after trying things and experiencing the hype of the 2010s, at the end of the day I think async-driven code is harder to understand than thread-driven code with some concurrent data structures, blocking queues, and the occasional promise/future. The need for more lightweight non-kernel threads is pretty context dependent.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: