in my opinion competes with python when it comes to DS/ML. I find it a lot more comfortable to use if you use emacs bindings
Try Clojure
251–260 of 404 posts
Re: Try Clojure
#252Earlier quoted context omitted.
https://xkcd.com/927/
I'm not sure if you meant this as evidence for or against my point, but this is exactly what I mean. Every year dozens of people think they're going to make some holy-grail language and it's 1% different from the prior version but now every single library needs to be rewritten, a dozen years of patches/bugs/security-holes must happen, whole resumes get shined up rewriting tech stacks that were perfectly capable, all…
Re: Try Clojure
#253Earlier quoted context omitted.
There's nothing baloney about SSA form. I'm sorry to say it, but C is just not close to the metal any more. Even if you are able to hand optimise something so it works well on one architecture, it likely won't be optimal for another. As for Haskell, it does pretty well being 100 times faster than Python with 100 times less the number of people working on it.
I believe that your interpretation of what’s actually happening is what’s baloney. The fact is that you Haskell people only talk about the optimizations that can sometimes open on immutable data in specific circumstances. What you generally ignore is the optimizations that immutable data permanently locks you out of with no recourse. As with most things programming, immutability should be considered a tool, not a rul…
I'm actually quoting Prof Andrew Appel of Princeton: https://www.cs.princeton.edu/~appel/papers/ssafun.pdf
You seem to think that functional programming and in-place updates are mutually exclusive. This is not the case, e.g. Haskell supports mutation as a tracked and controlled side-effect. It can even give static guarantees that a function is pure even it uses mutation internally. Recent research even suggests that compilers can add the in-place updates for us: https://www.microsoft.com/en-us/research/publication/fp2-ful...
Re: Try Clojure
#254Earlier quoted context omitted.
In practice I do wrap `jdbc/execute!` with my own `execute!` function to set some default options. However, there is no ORM layer. What makes you think the code above is terribly unproductive? Edit: Not trying to dismiss your concerns, by the way. In Clojure you can often get away with doing less than you might think so I'm genuinely curious about the critique.
In Django I would just do Posts.objects.filter(title=x) I don't need to define driver boilerplate for every query (or ever have to write it... at all).
Note that I'm not making a value judgement about Python/Django or any other library/framework combination. It's obviously a valid path, but Clojure is a different path. I can assure you there are straightforward solutions to create readable APIs like the Django example with minimal boilerplate, but the approach is fundamentally different from Python/Django.
If you do decide to build something in Clojure and think, "I already know how to do this in Django, why is it missing?", don't hesitate to join the Clojurians Slack and hop into the #beginners channel. There are plenty of people who can help you there.
Re: Try Clojure
#255Earlier quoted context omitted.
Cursive plugin for IntelliJ is a fantastic option, it's not free but it is excellent.
it's nice, but I used to write Java, and even getting IntelliJ setup on my laptop took a lot of fiddling with JVM versions and getting it to recognize my Clojure install. To this day, I will still have weird issues where Cursive won't run a project, and Emacs will. All that being said, I do really like Cursive.
Re: Try Clojure
#256Earlier quoted context omitted.
As a side note, I'm always amazed by people who can use a highly expressive language (Clojure, Rust, even TS) but switch to Go when they feel like it (especially pre-1.18). To me, switching to a less expressive language is painful and infuriating. I remember having to switch from Python to Java 5, and how everything started to take 3 to 5 times longer code to express. Maybe the key thing is to only write small things…
Development in Go will always be more painful for some people than in Clojure or TS, because the language is intentionally hostile to abstraction, so you're thinking in higher level concepts, but you implement them in more steps than necessary. The program can never reflect the shape of the problem, because it will be riddled with "glue code" that implements the obvious dull steps that you abstract away when reasonin…
How does this affect readability when one tries to dive into an existing Go project? Is Go code harder to navigate than code in more expressive languages?
Re: Try Clojure
#257What's the recommended stack for doing front end development with clojure these days?
- Dependency management: https://clojure.org/guides/deps_and_cli
- Clojure->JS compiler: https://github.com/thheller/shadow-cljs
- React integration: https://github.com/reagent-project/reagent
- Global state management (optional): https://github.com/day8/re-frame
You might also want a CSS framework. There are some options to write CSS in ClojureScript, but I prefer TailwindCSS which isn't a Clojure-specific thing and it works fine out-of-the-box with `.cljs` files.
You can swap out Reagent for Helix, which is a lower-level and faster wrapper for React. That said, Reagent does work with React 18 just fine and there's tons of docs for it, so jumping to Helix first is a premature optimization IMO, especially if you're new to Clojure.
Re: Try Clojure
#258Re: Try Clojure
#259shadow-cljs[2] makes using npm libraries easy.
i’ve settled on go backends and reagent frontends as my default setup[3].
1. https://reagent-project.github.io/
Re: Try Clojure
#260I'm glad this is back. A version of this existed in the ancient past and helped encourage me to try Clojure which ended up being by far the most impactful decision in my professional life. It went away for a while for reasons I'm unclear on. I use Clojure nearly daily at my job and at home. Sometimes it's standard Clojure, sometimes it's the excellent Babashka flavor which I use as a make-like task runner and Zsh-lik…