Live data from Hacker News

Ferret – A free software Clojure implementation

ferret-lang.org

71–80 of 83 posts

Re: Ferret – A free software Clojure implementation

#71

Discovering this and [Clojerl]( https://github.com/jfacorro/clojerl ) within a week of each other is like Christmas come early.

Just in case you've missed it: https://hy.readthedocs.io/en/stable/

I love Hy, but fyi, it is not as much a Clojure dialect as Ferret or Clojerl. The latter two share syntax and semantics, while Hy only shares syntax.

Re: Ferret – A free software Clojure implementation

#73

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 i…

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.

[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/

Re: Ferret – A free software Clojure implementation

#74
post #54

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++…

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.

Try Atom, following this admittedly opinionated guide. I think you might find it more accessible unless you're already familiar with one of the other alternatives.

https://gist.github.com/jasongilman/d1f70507bed021b48625

The only thing I would add is to try out smart mode in the printer package.

Re: Ferret – A free software Clojure implementation

#75
post #73

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 i…

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 requir…

> In behaviour tree terms par/or is parallel selector and watching is a interrupter node.

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

Re: Ferret – A free software Clojure implementation

#76
post #54

Earlier quoted context omitted.

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.

So far I've used vim, neovim, cursive and spacemacs and all have solid repl integration. I am generally a vim/neovim user and have been using that for years. It's good. Recently, I've been using spacemacs and like it better. Cursive is pretty solid too though if you're an IntelliJ user.

I would also like to plug Vim. I use it for both Clojure and C++ development, and it handles both like a champ.

Re: Ferret – A free software Clojure implementation

#77
post #30

Discovering this and [Clojerl]( https://github.com/jfacorro/clojerl ) within a week of each other is like Christmas come early.

To tell the truth, I was expecting Perl, given the name.

I thought the same as you did when I first saw it and got a bit sad. I'm actually considering trying to implement something like Lisp Flavored Perl a la Lisp Flavoured Erlang as my senior thesis/project this year.

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).

Re: Ferret – A free software Clojure implementation

#78
post #65

Earlier quoted context omitted.

I like Clojure for its encouragement of functional, immutable-first programming. That, and I find its syntax for function parameters, data-structure literals, etc to be preferable.

Why not Racket? It has a similar emphasis on immutable, functional programming, it's also a Lisp-1 (I assume that's what you mean by "syntax for function parameters"), and the different syntax for data-structure literals I have to imagine is a pretty minor point.

I think they meant that function parameters are vectors when defining a function:

  (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.

Re: Ferret – A free software Clojure implementation

#79
post #30

Earlier quoted context omitted.

To tell the truth, I was expecting Perl, given the name.

I thought the same as you did when I first saw it and got a bit sad. I'm actually considering trying to implement something like Lisp Flavored Perl a la Lisp Flavoured Erlang as my senior thesis/project this year. 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 (althou…

Well, there's a few already implemented an on cpan[1], so even if you were being optimistic thinking you could do it without outside input, the truth is there's plenty of Perl specific prior art to examine which likely makes it quite easy to make a simple Lisp. I'm not sure how that maps to what you were thinking of.

1: https://metacpan.org/search?q=lisp

Re: Ferret – A free software Clojure implementation

#80
post #65

Earlier quoted context omitted.

Why not Racket? It has a similar emphasis on immutable, functional programming, it's also a Lisp-1 (I assume that's what you mean by "syntax for function parameters"), and the different syntax for data-structure literals I have to imagine is a pretty minor point.

I think they meant that function parameters are vectors when defining a function: (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.

[deleted]
Post reply on HN