6 ms·
So - what other languages do qualify - all or in part?
by davidw 17y ago
So - what other languages do qualify - all or in part?
- deleted 17y ago[deleted]
- jerf 17y agoThe closest one I know of is Haskell, but where Haskell can be superior in some ways in a single OS process, it gets totally spanked by Erlang when it comes time to leave one OS process, including going out over a network to other machines. And since you really need that if you want high availability, Haskell's out of the running for the systems I use Erlang for. (Erlang is also much easier for other programmers to read.) Haskell is also missing OTP. However, IMHO the more fundamental problem is that Haskell doesn't have anything like Erlang's fundamental, simple message passing, including process monitoring. Fix that and an OTP library just as good as Erlang's (or better) will fall right out; fail to fix that and it'll never catch up on that front.
- scythe 17y agoThis lua paper looks interesting, though I don't like the way they pass code as strings: http://docs.google.com/gview?a=v&q=cache:G3KOwdPfnsAJ:www.inf.puc-rio.br/~roberto/docs/ry08-05.pdf&hl=en&gl=us http://docs.google.com/gview?a=v&q=cache:G3KOwdPfnsAJ:ww...
- silentbicycle 17y agoThere's also ConcurrentLua (http://concurrentlua.luaforge.net/ http://concurrentlua.luaforge.net/), which is a more deliberate attempt to port Erlang-style concurrency to Lua. It doesn't have pattern matching for selective receive, IIRC, and doesn't enforce lack of local state, but is otherwise mostly there. It implements lightweight processes via Lua coroutines, which are cheap co-operative mini-threads, the other concurrency model that (IMHO) makes sense. I've played with it a bit and it seems well-designed, but at the time I hadn't done much serious with Erlang, and felt it would make more sense to learn the Erlang idioms (supervisor trees, etc.) from Erlang itself and come back to ConcurrentLua later. I'm very interested in it, though - Lua is one of my favorite languages. It also seems to be the work of one grad student, who since graduated (and may have moved on). OTOH, it's a rather small project, since Lua (as with Scheme and Termite) already provides most of the necessary infrastructure in the core language (it's mostly a scheduling wrapper for coroutines and some distribution primitives), so forking it wouldn't be terribly difficult.
- scythe 17y agoI've checked out both concurrentlua and luaproc in the past and they seem quite similar (both use cooperative scheduling via co-routines). I initially liked luaproc more because the channel-based message passing approach in luaproc seems to me to be inherently more flexible than message passing based on process id's. luaproc leads to a particularly elegant implementation for the chameneos-redux benchmark, for example. concurrentlua seems more maintained, though; it showed up on luaforge more than a year ago and its latest update was in May, which to me means that the creator is interested in continuing the project. I believe this is the paper that introduced concurrentlua: http://docs.google.com/gview?a=v&q=http://www.google.com/url?sa=t&source=web&ct=res&cd=7&url=http%3A%2F%2Fweb.it.kth.se%2F%257Ejohanmon%2Ftheses%2Feleftherios.pdf&ei=J16tSvyUFNuDtge_84ipCA&rct=j&q=lua+concurrency&usg=AFQjCNFS547GSgQNhY-W7x0QEGipJH-9Lg http://docs.google.com/gview?a=v&q=http://www.google.com... luaproc's luaforge page is here, for comparison's sake: http://luaforge.net/projects/luaproc http://luaforge.net/projects/luaproc
- silentbicycle 17y agoThanks! I was looking for the ConcurrentLua PDF - it isn't linked on the project site anymore. IIRC, luaproc was put up on luaforge because people on the mailing list read the paper and started asking if the source was available. There are also about a half dozen other concurrency packages for Lua, which at first seems rather odd. As a language, it has quite a few semi-official extensions, but unlike Scheme (with its standard and several implementations), it's because the language designers are very serious about keeping the core language small and portable for embedding. You can import the ~800k of source into your project tree and fork it as necessary, compile it down to a ~200k library, etc. In practice, this means that people contribute Lua extensions that help it can work nicely with whatever funky C++ game engine they're using, etc., as well as more general libraries.
- Avshalom 17y ago" It doesn't have pattern matching for selective receive, IIRC" So http://metalua.luaforge.net/ http://metalua.luaforge.net/ has an implementation of pattern matching as one of it's shipped examples. Do you know if ConcurrentLua could be used with pattern matching. or is it designed such that, as it stands, pm would be useless.
- silentbicycle 17y agoThere's Termite (http://code.google.com/p/termite/ http://code.google.com/p/termite/), based on Gambit Scheme, which looks interesting. I haven't been able to get Gambit to build on OpenBSD/amd64, though. There's also ConcurrentLua for Lua (http://concurrentlua.luaforge.net/ http://concurrentlua.luaforge.net/), which looks like a deliberate attempt to port Erlang's concurrency model to Lua. I hadn't worked much with Erlang when I checked that out, but it has potential. IIRC the only thing missing from Ulf Wiger's checklist is selective receive, and adding a second receive function that takes a (message->bool) function probably wouldn't be difficult. It already has asynchronous message passing, distributed computing, very cheap processes, and process monitoring.