farolero
anomalies
farolero | anomalies | |
---|---|---|
16 | 3 | |
362 | 174 | |
- | 0.0% | |
2.4 | 10.0 | |
about 1 month ago | over 5 years ago | |
Clojure | Clojure | |
Eclipse Public License 1.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
anomalies
-
Clojure in the Tyre Manufacturing Industry
I'll do my best but there might be better explanations around the web.
I think an illustrative example would be this repo:
https://github.com/cognitect-labs/anomalies
These are basically re-usable, namespaced keywords. You might decide to use them or something similar in your program/system and some people do. Pretty neat: Their semantics are documented in the readme and the little bit of code in the repo defines a spec here https://github.com/cognitect-labs/anomalies/blob/master/src/....
You can read it as: any map that has these keywords as defined in the spec is an "anomaly".
Specs are open, non-exclusive so you can add more stuff to your structure and they still conform. (Note that the double colon before the keywords just mean "the current namespace defined at the top".)
Note that you don't need to define a spec for namespaced keywords. It's just a utility that leverages them. By themselves they already say "I can be used in a global context".
---
These keywords can be used from anywhere and by themselves. You don't need to carry around their context for them to work or have meaning. To contrast: for example a JSON field in a nested context might only make sense in that specific nesting context. Clojure namespaces are by convention globally unique.
Some examples:
- `:my.domain.accounting/refnumber`
- `:my.domain.ui/color` defined as `(or :my.domain.ui/rgb :my.domain.ui/hsl)` etc.
- `:my.domain.person/name` defined as a string if at all
- `:my.domain.event/type`
-
How to handle errors or failed computations in clojure?
In this case i would typically use an exception which is caught at the layer that is calling into my handler, whether that's a standard ring handler or interceptor. I'd use exceptions similar to those describe in the cognitect anomalies library and map those to an error response at the level interacting with the request and calling my handler.
What are some alternatives?
cloroutine - Coroutine support for clojure
vcvrack-packone - Modules for VCV Rack
ex - In which we deal with exceptions the clojure way
anomalies-tools - Anomalies handling tools
wingman - Restartable exception handling for Clojure, allowing you to recover from exceptions without unwinding the stack.
failjure - Monadic error utilities for general use in Clojure(script) projects
clojure-scheme - Clojure to Scheme to C to the bare metal.
unless_modules
cloture - Clojure in Common Lisp
py4cl2 - Call python from Common Lisp
cafe-latte - An implementation of Common Lisp dynamic variables, control flow operators, and condition system in plain Java.
babashka - Native, fast starting Clojure interpreter for scripting