Having written Clojure full-time for the past 5 years while writing cleancoders.com has really spoiled me. Clojure's introspective nature makes for some amazingly fast productivity because you can hook up your IDE to the REPL and have a kind of super-REPL, which can really speed up development a ton if you design your system it right. I'm not sure if this project can keep that aspect because of how it compiles to C++. But if it does, then it could really be invaluable in the Clojure ecosystem.
Author here. If I am not mistaken (I don't do web development.) very early versions of ClojureScript repl compiled code on the JVM side then piped the output to the browser. (Maybe it still does idk) I am thinking of doing something similar using Cling[1]. Ferret can compile and pipe output to Cling and use Cling as the repl.
Curious what IDE you have set up to do the REPL driven development you mentioned? I'm just starting out in learning Clojure and am finding various options out there with vigorous proponents of each. I am wondering what someone's real-world experience is after 5 years.
It's hard sometimes to find the editors/IDEs that might suite one particularly well since the vast community is attached to a given platform.
This is very interesting. I could really use a good language on microcontrollers, especially if core.async gets ported. Most microcontroller code has a huge (and complex) event-driven state machine at its core. Rather than making all of it explicit, I'd much rather use core.async to make it look like sequential code. It would really help with reducing complexity.
Does anyone have any insight on the legal status of this project? It’s licensed as BSD 2 Clause, but looks to be heavily derived from Clojure which is EPL. AFAIK the EPL is copyleft and doesn’t permit relicensing without the copyright holders’ permission.
Author here. I am actually curious about this myself. I originally released it under GPL but then on another HN thread someone said anything compiled with it also ends up being GPL, so I switched to BSD 2 Clause. I have not copy pasted code from Clojure compiler BUT in order to keep the Ferret semantics the same as Clojure semantics algorithms are identical. [1] shows + function in Ferret and Clojure. As for data structures situation is similar, same semantics implemented in C++ instead of Java with some differences/tweaks geared towards embedded systems.
Hard to say, would depend on whether or not they copied any code from the Closure compiler. It is possible they created their own implementation, but I wouldn't bet on it. Even if you treat it as EPL though, any output from the compiler won't be copyleft.
clearly they certainly respect half life a lot. maybe they don't know it exists actually. i don't know who made it because im lazy and didn't check, but I will say, there is certainly a non zero possibility of someone being alive today and never having played or heard of half life, even if only due to youth alone. but either way it is an interesting coincidence. I wonder if it's more than such.
I wonder if it could also somehow lift the reactive synchronous concurrency bits from Céu[0] in a library. Céu is probably my favourite embeddded language to program in from a "thinking about concurrency" perspective. I'm not sure how one would go about it though, since Céu is imperative, and I'm not sure if that imperative aspect is fundamental to its type of concurrency or if it clashes with idiomatic Clojure.
If it would be possible you'd probably have everything I could want in one embedded language.
Author here. Did not knew about Céu till now, just watched the intro video. I maintain a behaviour tree [1] library called alter-ego [2] (code needs cleanup) which already contains some of the constructs. In behaviour tree terms par/or is parallel selector and watching is a interrupter node. [3] So it can be done in Ferret on a general purpose PC using C++11 concurrency constructs, for embedded targets it will require co-operative multitasking which is on the roadmap.
Seems like a cool project if you already know Clojure and hate the start up time, but also seems like it sidesteps one of the main benefits of Clojure which is Java interop obviously... Which Clojure has to do a fair number of handsprings to accomplish. Begs the question, why pick Clojure as the lisp to compile to C++? Why not Racket or Common Lisp etc?
I've been looking for a language which provides Software-Transactional-Memory with persistent data structures which fits in 2KB RAM on a microcontroller.
I doubt you'll find that quickly. You can't do much in 2kb if you don't want to mutate your data, I think. I don't know much about STM, but I'd wager that uses some extra bookkeeping memory as well. So unless your own memory requirements are really low, this won't work.
You could have provided a link to the memory management section or even mentioned it was ref counting. Otherwise your comment is ... it kills me to say this but pretty useless.
Does this have Clojure's persistent data structures? The docs say it has immutable data structures, which isn't exactly the same thing. (Edit: added the second sentence)
Those persistent data structures are implemented in Clojure aren't they? It's not a feature of the compiler I believe. So if it can run Clojure code then that code can be the persistent data structures library if you want.
Viewing the site in iOS Safari, I get several pages of what appears to be random binary gunk rendered as HTML. Something wrong with compression headers?
[+] [-] nathell|8 years ago|reply
https://github.com/nakkaya/ferret/blob/0.2.8/ferret.org
[+] [-] penpapersw|8 years ago|reply
[+] [-] nakkaya|8 years ago|reply
[1] https://root.cern.ch/cling
[+] [-] vturner|8 years ago|reply
It's hard sometimes to find the editors/IDEs that might suite one particularly well since the vast community is attached to a given platform.
[+] [-] agumonkey|8 years ago|reply
[+] [-] christophilus|8 years ago|reply
[+] [-] patapizza|8 years ago|reply
[+] [-] kbenson|8 years ago|reply
[+] [-] jwr|8 years ago|reply
[+] [-] dantiberian|8 years ago|reply
[+] [-] nakkaya|8 years ago|reply
[1] https://gist.github.com/nakkaya/7050d5daf2c7034a25bb079658d8...
[+] [-] Mikeb85|8 years ago|reply
[+] [-] zaszrespawned|8 years ago|reply
http://ferret-lang.org/ferret-styles/favicon.ico
https://www.google.co.in/search?q=half+life+logo&oq=half+lif...
What is that all about...
[+] [-] nakkaya|8 years ago|reply
[+] [-] penpapersw|8 years ago|reply
[+] [-] ozzmotik|8 years ago|reply
[+] [-] vanderZwan|8 years ago|reply
If it would be possible you'd probably have everything I could want in one embedded language.
[0] http://www.ceu-lang.org/
[+] [-] nakkaya|8 years ago|reply
[1] https://nakkaya.com/2010/06/29/alter-ego-a-reactive-ai-libra... [2] https://github.com/nakkaya/alter-ego [3] http://aigamedev.com/open/article/parallel/
[+] [-] gleenn|8 years ago|reply
[+] [-] kazinator|8 years ago|reply
> Why not Racket or Common Lisp etc?
These already have solutions in the compilation space.
Kyoto Common Lisp (KCL), a fairly old implementation tracing back to the 1980's, and its descendant GNU Common Lisp (GCL) compile to C.
Embeddable Common Lisp (ECL) also contains a Lisp to C compiler.
Of course, numerous CL implementations compile to native code without the C route.
[+] [-] piotr-yuxuan|8 years ago|reply
I'd suggest you add a way for people to financially support you so you could keep working on this project.
[+] [-] billsix|8 years ago|reply
[+] [-] tomsmeding|8 years ago|reply
[+] [-] jwhitlark|8 years ago|reply
[+] [-] davidgrenier|8 years ago|reply
[+] [-] mtm|8 years ago|reply
* malloc/free (ref counting GC)
* memory pooling (no heap, stack-based for memory constrained systems)
* third party allocators
* third party GC
Details here: http://ferret-lang.org/#sec-4-2
[+] [-] agentgt|8 years ago|reply
[+] [-] jonathonf|8 years ago|reply
[+] [-] physicsyogi|8 years ago|reply
[+] [-] chrisseaton|8 years ago|reply
[+] [-] unknown|8 years ago|reply
[deleted]
[+] [-] comex|8 years ago|reply
[+] [-] pivo|8 years ago|reply
[+] [-] agumonkey|8 years ago|reply
[+] [-] StreamBright|8 years ago|reply
[+] [-] didibus|8 years ago|reply
[+] [-] kbuchanan|8 years ago|reply
[+] [-] asragab|8 years ago|reply
The last item on the Roadmap underneath the "Core" Section lists multimethods.
[+] [-] billsix|8 years ago|reply