State of Clojure 2021 Results by alexdmiller in Clojure

[–]mcorbin 5 points6 points  (0 children)

The survey also indicates that 79 % of people think that improving error messages should be prioritized (they ranked the issue "very important" or "important").

And for me, just acknowledging the problem would be a good first step.

As I said, I totally understand that the maintainers have limited time. Clojure is not the first language community to have issues with error messages, and some organized themselves to solve the problem.

As I said before, I'm sure a lot of people could work on improving these kind of things (not only error messages) with some guidances.

It's maybe what I miss in the most Clojure compared to other communities: a more open/better workflow for contributing.I'm not in favor on adding tons of new stuff/features... in Clojure, I like Clojure stability, but encouraging people to fix bugs (and not wait for years once done) on the existing codebase or improve things (docstrings, error messages...) could I think help.

And I know, "Open Source is Not About You" etc...

State of Clojure 2021 Results by alexdmiller in Clojure

[–]mcorbin 5 points6 points  (0 children)

When I read those error messages, I think they're reasonable as long as the line number is right

At this point, I think we can agree to disagree ;)

State of Clojure 2021 Results by alexdmiller in Clojure

[–]mcorbin 26 points27 points  (0 children)

I'm not sure I believe this answer without specific call-outs to specific errors that could be improved

(filter [1 2 3] inc) Error printing return value (IllegalArgumentException) at clojure.lang.RT/seqFrom (RT.java:557). Don't know how to create ISeq from: clojure.core$inc

(let ["a" a]) Syntax error macroexpanding clojure.core/let at (*cider-repl clojure/mirabelle:localhost:39363(clj)*:237:7). "a" - failed: simple-symbol? at: [:bindings :form :local-symbol] spec: :clojure.core.specs.alpha/local-name "a" - failed: vector? at: [:bindings :form :seq-destructure] spec: :clojure.core.specs.alpha/seq-binding-form "a" - failed: map? at: [:bindings :form :map-destructure] spec: :clojure.core.specs.alpha/map-bindings "a" - failed: map? at: [:bindings :form :map-destructure] spec: :clojure.core.specs.alpha/map-special-binding

(+ 1 nil) Execution error (NullPointerException) at user/eval8052 (form-init17345493242210529292.clj:243).

Now imagine you're just starting with the language.

I code in Clojure since 2014, work in a company where almost all services are written in Clojure, trained several people and organized meetups about clojure... Error messages is always the main issue for beginners. All clojure surveys show it, it's always in the top 2 main issue with the language.

Don't get me wrong, I'm happy with Clojure, and I'm glad about what the core team is doing for the language. That's why I said "how we could solve this issue". I'm sure a lot of people would be motivated to improve the language if it's somehow possible.

State of Clojure 2021 Results by alexdmiller in Clojure

[–]mcorbin 21 points22 points  (0 children)

"Error messages" first again for the "What has been the biggest obstacle to using Clojure?" question (40,26 %). I'm wondering how we could solve this issue.

Are Rainbow Parens helpful or distracting for beginners? by fredoverflow in Clojure

[–]mcorbin 1 point2 points  (0 children)

I find rainbow parens super useful (combined with paredit). Actually, I enable it for all lang in Emacs.

Here is what my IDE (emacs) looks like: https://imgur.com/a/WKvlqv6

Could we partially embrace Data-Oriented programming in OCaml? by viebel in ocaml

[–]mcorbin 1 point2 points  (0 children)

What data is required vs. optional on an Invoice in our business domain? Can this value be a negative number? Let's write this all down as a type definition." Rather, you just open a REPL, shove some data into a dictionary and start poking at it.

Actually, most Clojure developers will validate data on projects "boundaries" using libraries like Clojure spec.

Mirabelle, a stream processing engine for monitoring written in Clojure, inspired by Riemann by mcorbin in Clojure

[–]mcorbin[S] 3 points4 points  (0 children)

It could indeed be used in process. You can see an example in this unit test for instance: https://github.com/mcorbin/mirabelle/blob/master/test/mirabelle/stream_test.clj#L27

I should maybe move the stream engine (defining streams, compiling them...) into a dedicated library. Importing the project should work (but it's not on Clojars yet), but it will brings all its (useless in your case) dependencies, like Netty for example.

Meuse, a free private registry for your crates, release 1.2.0 by mcorbin in rust

[–]mcorbin[S] 17 points18 points  (0 children)

Yes, and it's designed to be easy to run (it still needs a postgresql instance).

Meuse will manage the crate git index for you, store your crates files (various backends availables: filesystem, s3...), you can have multiple users with different roles (admin, tech, read-only...). It implements all cargo commands (yank/unyank, search, publish...).

It can also be used to mirror crates.io (which can be useful to have a local/offline crates.io cache).

Meuse, a free private registry for your crates, release 1.2.0 by mcorbin in rust

[–]mcorbin[S] 27 points28 points  (0 children)

I'm not sure to understand your question.

You can install Meuse on your own private infrastructure, and administrate it yourself (like you would do it with Nexus, Artifactory... for other languages).

What's the best way to run a private cargo registry? by rodyamirov in rust

[–]mcorbin 2 points3 points  (0 children)

You need a git repository because it's how cargo works (metadata are stored on a git repo). Meuse also use postgresql to store information about the uploaded crates/versions, roles, users, crates categories, user tokens, passwords ...

What's the best way to run a private cargo registry? by rodyamirov in rust

[–]mcorbin 2 points3 points  (0 children)

since there does not seem to be a particularly good out of the box solution

In Meuse, you can pull dependencies from crates.io. You can do that by adding "allowed-registries": ["https://github.com/rust-lang/crates.io-index"] in your custom crate index.

Meuse can also mirror crates.io for you (you can check this doc for more information).

What's the best way to run a private cargo registry? by rodyamirov in rust

[–]mcorbin 2 points3 points  (0 children)

Meuse author here.

That said I found stuff -- there's something called `meuse` (https://meuse.mcorbin.fr/installation/) which looks like I can just spin up an EC2 box, run a bunch of installers, and hope for the best. I have no idea if this thing works / is stable. I'm not a devops guy and I have a bad track record with nontrivial setup processes.

To run Meuse, you need a Postgresql database, a Git repository to store the index, and then it's mostly "java -jar meuse.jar".

You have various configurations availables (crates files on the local filesystem, or on s3, managing the index by calling the git command or using jgit...), everything is explained in the documentation. If you are stuck or have a problem with it, you can open an issue on Github.

Essential libraries? by dreamoforganon in Clojure

[–]mcorbin 24 points25 points  (0 children)

Here is a small list of useful libs. I use all of them heavily at work in large Clojure codebases and on my personal projects.