farolero
cloroutine
farolero | cloroutine | |
---|---|---|
16 | 11 | |
358 | 219 | |
- | - | |
2.4 | 0.0 | |
15 days ago | about 1 year ago | |
Clojure | Clojure | |
Eclipse Public License 1.0 | Eclipse Public License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
farolero
-
clojure from common lisp
You can use this library to get CL-style conditions and restarts in Clojure: https://github.com/IGJoshua/farolero
-
Val on Programming: What makes a good REPL?
True, the CL REPL is more useful than the Clojure REPL, but CL has a 20-30 year head start in development. Plus, Clojure was developed as a hosted language, and runs on .NET, Javascript, JVM, and even Dart (in-progress).
Since exceptions are quite deeply integrated into those platforms (as opposed to conditions), it has "bled through" to the Clojure APIs, and, in turn, REPL.
Folks have written a CL-style condition/restart library for Clojure (https://github.com/IGJoshua/farolero) too.
- IGJoshua/farolero: Thread-safe Common Lisp style conditions and restarts for Clojure(Script).
- Opinions of "brothers and sisters"...
-
How to handle errors or failed computations in clojure?
conditions/restarts are also a possibility https://github.com/IGJoshua/farolero
-
ClojureRS – Clojure interpreter implemented in Rust
Someone added conditions/restarts to Clojure: https://github.com/IGJoshua/farolero
It does allow errors to be caught by the Repl and just.hkw to handle them.
-
What are the advantages of Hy/Hissp over python bindings for CL/Clojure?
farolero
-
Clojure REPL vs. CLI: IDE Wars
This is interesting tool[1] that allows much the same with Clojure
[1]: https://github.com/IGJoshua/farolero
-
Do we have good use case based examples of usage of derive based hierarchies and multi-methods?
https://github.com/IGJoshua/farolero This uses derive hierarchies to enable general error handling.
- Show HN: Farolero – Common Lisp style-conditions and restarts for Clojure
cloroutine
-
ClojureRS – Clojure interpreter implemented in Rust
Thanks for sharing! I think these restarts could definitely be implemented as a library in Clojure with the help of a coroutine library like https://github.com/leonoel/cloroutine#guides
-
GitHub - leonoel/cloroutine: Coroutine support for clojure
Do you mean the example here https://github.com/leonoel/cloroutine/blob/master/doc/01-generators.md , with the `*tail* binding? It took me a long time looking at it to finally grok it, and it's really hard to explain in English but basically when the coroutine comes across one of these symbols that are "breaks" (in our case, "yield" is such a breaking symbol), then it will pause the coroutine, and actually call what the symbol points to (the implementation of "yield"), which returns (cons x *tail*), and keep in mind that it is all run within a recursive call to gen-seq where *tail* is bound to a lazy-seq of the remainder of the generator (binding [*tail* (gen-seq gen)] (gen)), it's pretty confusing but yeah just have to stare at it for a long time I think haha.
-
CLJ-2555: clojure.core/iteration · clojure/clojure@e45e478
I think Clojure is really missing python/js-style generators, like what is implemented in https://github.com/leonoel/cloroutine/blob/master/doc/01-generators.md
-
Real-life use cases for CLJS macros
The next level up is core.async go blocks which compile your AST to a state machine. Also see cloroutine which also compiles the AST to a state machine or something, one of the tutorials uses cloroutine to add async/await to Clojure.
- Continuations in Clojure
- 6 Years of Professional Clojure
-
Common Lisp Style Conditions+Restarts in Clojure
Coroutines are a more general concept, and can be used to implement conditions/delimited continuations. There’s an example in their docs.
What are some alternatives?
ex - In which we deal with exceptions the clojure way
zio-schema - Compositional, type-safe schema definitions, which enable auto-derivation of codecs and migrations.
wingman - Restartable exception handling for Clojure, allowing you to recover from exceptions without unwinding the stack.
core.async - Facilities for async programming and communication in Clojure
clojure-scheme - Clojure to Scheme to C to the bare metal.
ClojureRS - Clojure, implemented atop Rust (unofficial)
cloture - Clojure in Common Lisp
py4cl2 - Call python from Common Lisp
await-cps - async/await for continuation-passing style functions
cafe-latte - An implementation of Common Lisp dynamic variables, control flow operators, and condition system in plain Java.
pure-conditioning - A simple, fast, purely functional condition / restart system for Clojure.