4 ms·
A brief laundry list: - Arc embraces macros. - You can redefine anything. (assign + -) (+ 3 4) evaluates to -1. Not only are you an equal partner to the lan
by laarc 11y ago
A brief laundry list:
- Arc embraces macros.
- You can redefine anything. (assign + -) (+ 3 4) evaluates to -1. Not only are you an equal partner to the language, but the language is short enough to carry in your head.
- Green threads. Here's a snippet from Laarc which does hot code reloading:
(thread
(on-err autoerr (fn ()
(while autoload*
(sleep 0.25)
(autoreload)))))
It says "When an error happens, call the 'autoerr' function. Every 0.25 sec, check whether any source has changed, and reload it if so."
But green threads make it so easy to do that in parallel. I never once had to worry about synchronization issues in the case of the autoreloader.
- There's no FFI for Arc. However, I'm in the process of porting Arc from Racket to Lumen, which has a very interesting FFI thanks to LuaJIT: https://github.com/sctb/motor/blob/master/motor.l https://github.com/sctb/motor/blob/master/motor.l
It's literally "copy-paste these C declarations. Now you can call those C functions." It quite simply rocks.
If you're interested in Arc, consider Lumen as well. https://github.com/sctb/lumen https://github.com/sctb/lumen
It has many similarities to Arc, like a powerful macro system, and has some interesting distinctions, like keyword arguments and the FFI facilities.
- mveety 11y agoYeah lumen's ffi is fantastic. It's really simple and clear compared to like CFFI or so. Seeing that ported to/implemented on CL would be really cool.