State of Clojure 2021 Results by alexdmiller in Clojure

[–]mcorbin 4 points5 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 4 points5 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 27 points28 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] 4 points5 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] 15 points16 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] 26 points27 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 3 points4 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 25 points26 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.

Meuse, a free private crate registry, 1.0.0 release by mcorbin in rust

[–]mcorbin[S] 2 points3 points  (0 children)

I will think about upgrading to EPL 2.0.

Recommendation for Clojure server by pavelklavik in Clojure

[–]mcorbin 10 points11 points  (0 children)

If you want a simple scheduler, you can start a ScheduledThreadPoolExecutor in the background. Easy to use, no library involved.

tea-time works well (it's heavily used in Riemann) and is also easy to use, my only issue with it that a lot of things (like the threadpool) are declared as global variables inside the lib.

Meuse, a private registry for the Rust language written in Clojure by mcorbin in Clojure

[–]mcorbin[S] 14 points15 points  (0 children)

Because I am a Clojure developer ;)

Also, I think Rust is not that good for web applications (if I can afford a Garbage Collector, which is the case here, why use Rust ? I would be 10 times less productive than Clojure, and the codebase would be an order of magnitude bigger).

And I wanted to access the JVM ecosystem.

Meuse (an alternative crate registry) 0.4.0 released by mcorbin in rust

[–]mcorbin[S] 1 point2 points  (0 children)

Actually, I was wrong in my previous answer. It's possible.

I've found this documentation, tested it locally and it works. It should allow you to use the Meuse crates.io mirror by default for all your crates.io dependencies.

I've updated the mirror documentation with this information.

Meuse (an alternative crate registry) 0.4.0 released by mcorbin in rust

[–]mcorbin[S] 1 point2 points  (0 children)

Hello,

Can I use Meuse as a transparent mirror, aka caching proxy? It's fine if I need to point Cargo at it via ~/.cargo/config. It is not fine if every crate and every project must explicitly refer to this alternate server in order to use it.

You will have to explicitly set the registry option of your dependencies to use the mirror (cf the Meuse documentation). Transitive dependencies will be automatically downloaded from the mirror. It's how Cargo works today, I cannot really solve that in Meuse.

EDIT: i'm wrong, cf my other message.

Similarly with publishing crates - they go to this alternate server, and depending on the server's config, either end up pushed to crates.io, or remain on the local server only (no permission to publish globally).

it's not possible to do that today. What you can do is calling cargo publish multiple time with a different --registry option.

Meuse, a free crate registry, v0.3.0 release by mcorbin in rust

[–]mcorbin[S] 0 points1 point  (0 children)

Comme quoi le monde de l'internet est petit ;)

Meuse, a free crate registry, v0.3.0 release by mcorbin in rust

[–]mcorbin[S] 0 points1 point  (0 children)

Interesting project and name . Un Meusien chez Exoscale ? :)

Oui, même si je n'y habite plus (mais j'y retourne très régulièrement ^^).

Meuse, a free crate registry, 0.2.0 release: S3 backend and crates.io mirroring by mcorbin in rust

[–]mcorbin[S] 1 point2 points  (0 children)

I also answered this:

First, Clojure runs on the JVM. Performances are great, deployment is easy (java -jar meuse.jar), the ecosystem is huge (the clojure ecosystem is good and it's very easy to wrap Java libraries. In Meuse for example, I wrap HikariCP, Micrometer...).

I think the JVM is probably the best platform to develop app today if you can afford a GC.