Ferret – A free software Clojure implementation
ferret-lang.org
ferret-lang.org
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.
I will eventually switch to Spacemacs and CIDER once I've really honed my Clojure skills, but for starting out Cursive was what allowed me to learn Clojure in the first place.
https://gist.github.com/jasongilman/d1f70507bed021b48625
The only thing I would add is to try out smart mode in the printer package.
I'm kind of torn though, as it's my second real idea and my director already likes my first idea. While that one will probably end up being too much work, this one might be overcompensating for that (although I could just be overly optimistic about how easily I can write a new lisp).
I didn't specify, but I'm actually thinking of target Perl 6, so this is a great sort of halfway point where clearly other people have found it a worthwhile idea but not done exactly what I was thinking. Plus, P6 slangs could make it nice and easy to interleave regular Perl 6 and Perl 5 code with whatever monstrosity I come up with. I guess I have some decisions to make. Thanks again!
[1] https://gist.github.com/nakkaya/7050d5daf2c7034a25bb079658d8...
On another note, I'm not sure it would be quite possible to stretch "copyleft" that far legally anyway - but that's another discussion - and at ending up with an invalid license isn't really any good either, as that would leave you with just copyright and no license grant - making the tool illegal to copy/distribute...
That is, they added an exception saying that if you use it in a certain way (unmodified, runtime for compiled code), then it's exempt from many of the GPL's clauses. Used in any other way, however, and you must comply with the (L)GPL
I don't know if Rich or the other Clojure copyright holders care enough to ever make trouble, but I'm pretty sure most companies with a decent legal team would think thrice before offering a piece of code built using Ferret
GCC has already solved the problem the other commenter you mention brings up with the runtime library exception https://www.gnu.org/licenses/gcc-exception-faq.html but I don't know if you can tack this on to the clojure-derived parts of ferret. I sure wish SFLC or someone was able to do legal counselling for new/small projects like this, I feel like a big reason people shy away from copyleft isn't the hippie dippie bullshit but because these interactions are impossible to reason about by laypersons
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...
That's the Half-Life logo, not a coincidence.
(And, just to prove how much I love Half-Life, my username is a Half-Life reference)
If it would be possible you'd probably have everything I could want in one embedded language.
[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/
I see the resemblance, but I'm not sure if that's a perfectly right analogue. The description in your third link says the parallel code truly runs in parallel. However, Céu is concurrent but not parallel, making the concurrent code deterministic and easy to reason about: if multiple blocks in a par/-- construct await on the same event, they will execute in lexical order (which is similar to the behaviour described in the first link).
For real parallelism, you'd basically have to have multiple Céu programs (devices) communicate through external inputs/outputs.
I guess the real question I'm asking is whether the library follows the model of a synchronous programming language.
https://en.wikipedia.org/wiki/Synchronous_programming_langua...
BTW, the intro video is very outdated: on top of the basic par/--- and await construct, the "organism" is replaced with cleaner code/tight and code/await forms to create more complex abstractions:
http://fsantanna.github.io/ceu/out/manual/v0.20/statements/#...
(defn foo [arg1 arg2 & rest] ...)
As for data-structure literals, it's nice to be able to write [1 2 3] vs (vec '(1 2 3))
{:key1 "val1", :key2 "val2"} vs (hash-map :key1 "val1" :key2 "val2")
Agreed, all pretty minor points, but all nice to have. Function arguments are easily distinguishable and creating maps/vectors is simplified.So the whole data structure isn't copied but only the relevant parts are added / updated in the tree and the rest is shared with the "new" data structure.
Mutable data structures are still more memory effective but I'm assuming its fine since the author has a blog post on using ferret on an Arduino Uno which has 32k of ram. https://nakkaya.com/2017/02/15/bare-metal-lisp-rc-control-us...
Clojure data Sturucture links: Persistent Vectors http://hypirion.com/musings/understanding-persistent-vector-...
Video with Rick hick on them https://youtu.be/wASCH_gPnDw?t=1742
Any of those tiny environments run circles around the hardware constraints of 60's and 70's mainframes.
> 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.
Other Lisp-to-C compilers like CLICC, mocl, Thinlisp, and a few others are not descendants of KCL.
Boy, the implementors made a significant mistake in this one. Though CLICC is not intended to be a complete Lisp system, but a Lisp application, they insisted that CLICC has to itself be a CLICC-compiled application. And so what that means is that, then, programs being compiled with this bootstrapped CLICC are severely limited as to what they can do at compile time (in macros), simply because of the crippled run-time environment of the CLICC-compiled CLICC compiler which has to run without the benefit of an actual CL runtime. Whereas if CLICC had been kept as a Lisp-compiled program, only the run-time parts of user code would be restricted to the "CL1" language; macros could be written in full CL.
For me, I like being able to take EDN and immutable data to the various platforms I need. My portability hurdle is little more than writing alternative functions where Java/JS interop doesn't port.
I'd suggest you add a way for people to financially support you so you could keep working on this project.
You're right in the general case - STM incurs significant bookkeeping overhead (at least a word per mutable location, usually more), which is one of the reasons it never took off. (The actual reason is the CPU overhead, which slows down memory accesses so much you've lost all the performance you might gain from parallelism.)
Clojure sidesteps this by having an incredibly small number of mutable locations. With a persistent data structures, every mutation operation already builds its own private version of the structure, and then atomically changes a pointer to point to the new version. So you've got MVCC built in, and you only need transactional metadata on one location (the ref).
* 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
I didn't find anything on cycles in the linked page, maybe the problem is not relevant in most real-world clojure code?
The last item on the Roadmap underneath the "Core" Section lists multimethods.