Live data from Hacker News

Ferret – A free software Clojure implementation

ferret-lang.org

31–40 of 83 posts

Re: Ferret – A free software Clojure implementation

#31

Earlier quoted context omitted.

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.

They are a feature of the compiler - Clojure's are implemented in Java.

And Clojurescript's are implemented in Clojurescript!

Re: Ferret – A free software Clojure implementation

#32

Earlier quoted context omitted.

I kind of saw it as being intended for someone that loves Clojure but needs to run in a constrained environment that usually requires C or C++.

Aren't most of these environments low on memory and thus it doesn't really make sense for them to use Clojure's persistent data structures? Kinda related is this awesome paper: https://blog.acolyer.org/2015/11/27/hamt/

I'm not sure how it's implemented in Ferret but Clojure's data structures are implemented as trees so there's structural sharing that happens when a vector or hash map is updated or when a new version is produced.

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

Re: Ferret – A free software Clojure implementation

#33

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.

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.

Re: Ferret – A free software Clojure implementation

#34
post #2

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?

Clojure on JVM certainly benefits from Java interop, but ClojureScript compiles to JavaScript, and benefits from JavaScript interop.

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.

Re: Ferret – A free software Clojure implementation

#35
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.

Re: Ferret – A free software Clojure implementation

#37

The favicon.ico of this site - looks exactly like half life logo. 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...

It's the lambda symbol in a circle. Seems more like a coincidence than anything else to me.

Re: Ferret – A free software Clojure implementation

#38

The favicon.ico of this site - looks exactly like half life logo. 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...

It's the lambda symbol in a circle. Seems more like a coincidence than anything else to me.

There's plenty of ways to style a lambda. And plenty of colors to choose from.

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)

Re: Ferret – A free software Clojure implementation

#40
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.
Post reply on HN