5 ms·
All this just to avoid writing JS in nodejs for simple scripts? why add more complexity to simple things? just to write JS with parenthesis? clojurescript is ov
by ithrow 5y ago
All this just to avoid writing JS in nodejs for simple scripts? why add more complexity to simple things? just to write JS with parenthesis? clojurescript is overkill and definitely tedious to use for this because is not suited for scripts just doing lots of imperative, side-effecting stuff and dealing constantly with mutable APIs.
I love lisp but... https://github.com/borkdude/nbb/blob/main/examples/puppeteer/example.cljs https://github.com/borkdude/nbb/blob/main/examples/puppeteer...
"Look how cool I'm, I downloaded this thing just to add parenthesis to my JS script!"
- aaron-santos 5y agoWhy would I want nodejs? All of that to avoid writing C for simple things?
- rmetzler 5y agoWhy would I want C? All of that to avoid writing Assembler for simple things?
- aaron-santos 5y agoThis feels like a personal attack, bud.
- piercebot 5y agoI think the real advantage is scripting with a REPL in your IDE. Whipping up a script becomes trivial because you can test every data transformation (heck, every expression!) with a keystroke. There's no great way to do this in a language without s-expressions.
- harperlee 5y agoAs a datapoint, I don't know javascript but I do know clojurescript.
- Scarbutt 5y agoYeah, good luck with that.
- harperlee 5y agoThanks! I’m a hobbyist with limited time and I earn my salary without programming, so I don’t need to cater to any market demand, in case you were condescending on my employability prospects.
- Scarbutt 5y agoNot about employability. You can't really leverage cljs well without knowing JS but I'm sure you would disagree.
- harperlee 5y agoNah, I just disagree with your treating of both “leveraging cljs well” and “knowing JS” as binary things. I’m sure there’s a correlation but I have not found the need of learning neither java nor javascript.
- piercebot 5y agoThis is like saying "you can't really leverage Java well without knowing JVM bytecode." Which is to say: I also disagree with you :)
- ithrow 5y agodumb analogy, the issue is libraries, you don't need to read bytecode to be able to use a Java library in Java or Clojure but you do need to read Java. Same with Cljs and JS.
- iLemming 5y agoI have to say, one has to be some special kind of "dumb" to learn Clojure, but at the same time lose the ability to understand Javascript or Java. One doesn't choose one tool simply because "they don't know the other tool". Sometimes, and quite often, the decision gets made precisely because they gained significant knowledge in both.
- Borkdude 5y agoThese are just small examples by nature. See e.g. https://github.com/chr15m/c64core https://github.com/chr15m/c64core for a non-trivial project in nbb.
- ithrow 5y agoEqually bad, I don't see where are you getting any value from cljs there.
- brundolf 5y agoPeople can enjoy and/or get utility out of different things.
- iLemming 5y ago> why add more complexity to simple things? I feel you haven't grasp yet, the actual difference between seemingly simple and truly simple things. Path to simplicity quite often is not that straightforward. Try for example converting the example you're pointing at to javascript, just for comparison.