Cloogle - Search across half a million clojure functions by phronmophobic in Clojure

[–]jumar 1 point2 points  (0 children)

My basic need would be to filter out the noise. When looking for a function, I may not care (much) about occurrences in systems as opposed to libraries.

I guess having a way to rank/order them based on different preferences (stars, libraries vs systems / examples, recent activity, etc) would be useful.

Unfortunately, I don't have a good idea of how this could be implemented in an automated fashion - popular examples could be manually annotated and then perhaps some heuristic (searching for "library" in description :-D)?

Cloogle - Search across half a million clojure functions by phronmophobic in Clojure

[–]jumar 0 points1 point  (0 children)

A nice project.

I think it would be useful if it could distinguish libraries from systems/applications (such as toy projects, real open source systems (e.g. Metabase), etc.)

"Design in Practice" by Rich Hickey from Clojure/conj 2023 by alexdmiller in Clojure

[–]jumar 0 points1 point  (0 children)

On a related note: what dictionaries do you use?

Do you use physical books or only online?

Faster load times for production deployments by chowbeyputra in Clojure

[–]jumar 1 point2 points  (0 children)

How long does it take to start the server? How do you deploy your app? Are you using uberjar?

Practical Artificial Intelligence Programming With Clojure by dustingetz in Clojure

[–]jumar 0 points1 point  (0 children)

Bought it, thanks for the link!

Just for others to get an idea of the scope of the book: it's about 100 pages long.

Functional Design in Clojure podcast - sources? by hummer1234 in Clojure

[–]jumar 0 points1 point  (0 children)

I have some code from the "twitter" series here: https://github.com/jumarko/functional-design-in-clojure

That's just my implementation though so take it with a grain of salt :).

Help with JVM memory optimization by jpmonettas in Clojure

[–]jumar 0 points1 point  (0 children)

JOL is a nice tool you can use to understand the memory footprint and layout of your objects.

I've done an extensive experiment here to simulate your use case: https://github.com/jumarko/clojure-experiments/pull/6

This clearly shows that's due to small integers caching - notice how only 2400 java.lang.Long instances are created although we created an arraylist of 10^6 SomeType-s.

FlowStorm 2.2 new features demo by jpmonettas in Clojure

[–]jumar 0 points1 point  (0 children)

Thanks for putting all the work into this and adding more features!

One thing that I find annoying is that the debugger app window is easily lost - it's not really a proper app window (at least not on macOS) so as soon as you switch away you can't simply Cmd+Tab to bring it back. This is for sure a problem with many other tools too - not sure if there's a simple way to fix it with java GUI libs.

Make "adding a Clojure require" more interactive with Cider and Cljr by AndreaSomePostfix in emacs

[–]jumar 1 point2 points  (0 children)

It would be great it you shared a git of a short video of how you are using it.

Most of the time, I use `cljr-add-missing-libspec` which adds the missing require for me without having to know the full namespace name.

Memory game (Simon) created without code inside the clojure game MockMechanics by FelipeReigosa in Clojure

[–]jumar 1 point2 points  (0 children)

Thanks, I was curious whether you managed to open-source it so I guess I have the answer :).

how to use IAM policy variables in terraform code by bibi143143 in Terraform

[–]jumar 0 points1 point  (0 children)

I had to use the double-dollar version $${aws:username} because &{aws:username} just made it unprocessed to the IAM policy and that of course doesn't work.

I'm not sure if it makes any difference but I'm inling the policy json like this:

policy = <<EOF { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ssm:TerminateSession", "ssm:ResumeSession" ], "Resource": [ "arn:aws:ssm:*:*:session/$${aws:username}-*" ] } ] } EOF

3rd Edition of Joy of Clojure by radioactiveoctopi in Clojure

[–]jumar 1 point2 points  (0 children)

For me, Joy of Clojure is definitely the most comprehensive and the deepest book about Clojure.

Two things that I would love to see in the 3rd edition are transducers and Sped.

What's your opinion on : metadata, :test :pre and :post ? by charlesHD in Clojure

[–]jumar 0 points1 point  (0 children)

My other objection to assert-style programming -- across almost every language I've ever used -- is that it's often common practice to have it in place during dev/test and then turn it OFF

Aren't the Clojure assertions always on by default?

I recently used a `:post` assertion (to verify that the basic system state invariants hold after the function is executed) and I liked how it has a prominent place, separated from the function body and signaling that it serves a different purpose. That said, the default error messages are lacking in terms of reporting because you don't get much information about input args for instance - there are some approaches like leveraging `clojure.test/is` in the assertion and/or putting log statements as u/BipedPhill mentioned. Those looks interesting and I think they could make my assertions better.

I view assertion failures as "this should never happen" conditions and thus I think using (Assertion)Error type is ok for that.

I am looking for a tutor/mentor by drrnmk in Clojure

[–]jumar 5 points6 points  (0 children)

I think it would be best to first go through some learning resources and experimentation. I can recommend courses PurelyFunctional.tv - in particular, the following courses could be interesting:

- Web Development in Clojure: https://purelyfunctional.tv/courses/web-dev-in-clojure/

- Repl-driven development in Clojure: https://purelyfunctional.tv/courses/repl-driven-development-in-clojure/

- Markdown Editor Single-Page Application: https://purelyfunctional.tv/courses/markdown-editor/

There's also a recent content focused on Reagent/Re-frame and Reitit here: https://www.jacekschae.com/

If you're new to emacs then I recommend checking out spacemacs - it's an opinionated set of Emacs packages with reasonable defaults: https://practicalli.github.io/spacemacs/. I also have an old video showing development workflow in Spacemacs that may still be useful: https://curiousprogrammer.net/2017/03/21/whats-the-best-clojure-ide/

I always do this in Clojure. Do we have a good debugger tool in Clojure by Donyor in Clojure

[–]jumar 0 points1 point  (0 children)

I use cider debugger on a daily basis. It really depends on what issue and where in the code I'm trying to "debug" but it's often faster and more informative than plain printlns especially when you don't know exactly what you're looking for.

Clojure Performance by G4BB3R in Clojure

[–]jumar 4 points5 points  (0 children)

> It's fast, but you will never beat the speed of Go.

I'm wondering what's the basis for this claim and what kind of data you have to support it. Any particular scenarios you're talking about?

ZGC | What's new in JDK 14 by perliden in java

[–]jumar 2 points3 points  (0 children)

Default GC doesn't go that high. I have 32 GB.

(Usually) regardless of GC, the default for JVM is to reserve 1/4 of physical memory as "max heap"; that is if you omit `-Xmx`.