3 ms·
I consider multi-threaded multi-language embedding an extreme sport. Maybe you are a software athlete and it's easy for you, but I think it's pretty scary.
by scientificcoder 3y ago
I consider multi-threaded multi-language embedding an extreme sport. Maybe you are a software athlete and it's easy for you, but I think it's pretty scary.
- medo-bear 3y agomaybe i am missing something but this is old news for embeddable common lisp. see threading section in this article from 1994[0], or is this extreme-threading different somehow? there is also a recent llvm-based implementation [1] that aims for direct lisp-cpp interface. i know my usage of the word "just" might suggest otherwise but i am not trying to deminish this feat. i use common lisp for scientific work and whenever i hear about something cool in another language i ask myself can i do this with my toolset. this is the reason i am asking this. [0] https://dl.acm.org/doi/pdf/10.1145/224139.1379849 https://dl.acm.org/doi/pdf/10.1145/224139.1379849 [1] https://clasp-developers.github.io/ https://clasp-developers.github.io/
- andyferris 3y agoI think it’s just that this is possible in (the recently released) Julia 1.9 and wasn’t possible in earlier versions due to how thread-local storage and the GC worked, and doing this can be useful sometimes.
- NeuroCoder 3y agoI think the title was intended to be more playful and fun than a serious take on the most technically intense applications of threading in C++.
- adgjlsfhk1 3y agoYour link 0 is cool, but is fairly different from the new stuff here. Some key differences are that the paper uses a conservative garbage collector (so enjoy random memory leaks) as a way to get around the problems of interop with C. Also, while that paper supports multithreading, as far as I can tell, it meant n-thread to 1 core (i.e. concurrent) multithreading (which is what the term usually referred to before multicore cpus were common), while Julia supports n threads to m cores (see Java's long awaited project Loom) which has a bunch of additional challenges. The last thing to mention is that the paper required a near complete rewrite of the lisp compiler. While that's an option for a simple language like Lisp, it's not as feasible for more complicated languages.
- medo-bear 3y agoMultithreading is handled by C so N-M should be no problem because the key thing is N. If threads are managed from ECL instead then, if available, it will use pthreads [0] ECL is not a rewrite of some THE compiler, it is a whole implementation. This actually goes toward your point that Julia cant do this because the language is not seperate from its compiler, but it is not because julia is more complicated than common lisp Common Lisp has been called many things, rarely simple. Its spec is over 1000 pages [0] https://ecl.common-lisp.dev/static/manual/Native-threads.html#Native-threads https://ecl.common-lisp.dev/static/manual/Native-threads.htm...
- cookieperson 3y agoThis might seem scary to you but people have been doing things like this for decades now in other languages. Not saying you shouldn't post your blog, you should, but yea...
- cinntaile 3y agoI recognized your nick from another Julia article. Why do you always have that condescending tone when commenting on something related to Julia?
- cookieperson 3y ago[flagged]