4 ms·
- ease the onboarding. Every few months I try to give clojure another shot, and every few months _some_ part of the setup has changed and / or is broken. - com
by phtrivier 5y ago
- ease the onboarding. Every few months I try to give clojure another shot, and every few months _some_ part of the setup has changed and / or is broken.
- compile to small binaries that run fast. I get what the langage gets from the JVM, but those 5,10 seconds I get before _anything_ runs, even after I had everything compiled ?
- show me an example of how having 'spec' is going to help me refactor the code that I got wrong the first time, as easily as what a proto-ML-like static type checker does. It's not a question of "types are bad vs types are good thing". It's a question of "this property was called 'name', but now I need it to be 'names', and I really need to know every possible place of my code base that uses it so that I can recursively change all code paths to handle the fact that it's a list, now." I read the spec doc a dozen times, and I don't think it does help in this simplest of simple case.
Also, I make typos all the time, and caml / typescript / rust catch them before I waste a run cycle. Dynamic langages can't know if 'names' and 'name' coexist - Let me tell the compiler what I mean once.
- promote an "obvious" gui lib. It's not obvious what I need to use to do an hello world window (but that's really not specific to clojure, in all fairness...)
- phtrivier 5y agoAlso, about the 'name' -> 'names' thing ; I get that maybe the idea should be that I should keep the 'name' property around and just accrete the 'names' thing, and API should be immutable and all, but, just, 'No'.
- deleted 5y ago[deleted]
- nanomonkey 5y agoGraalVM has made creating Clojure binaries with quick launch times much more possible. I suggest checking out babashka (Closure bash scripting) as an example and as a means.
- amelius 5y agoDoes that also work on embedded platforms with limited resources?
- nanomonkey 5y agoNo idea, I doubt it. There is Ferret [https://ferret-lang.org/ https://ferret-lang.org/] if you want Clojure compiled to C++11. For microcontrollers, I've always used uLisp or plain C.
- jdminhbg 5y ago> show me an example of how having 'spec' is going to help me refactor the code that I got wrong the first time, as easily as what a proto-ML-like static type checker does. It's not a question of "types are bad vs types are good thing". It's a question of "this property was called 'name', but now I need it to be 'names', and I really need to know every possible place of my code base that uses it so that I can recursively change all code paths to handle the fact that it's a list, now." I read the spec doc a dozen times, and I don't think it does help in this simplest of simple case. For this, I think the way to go is to use `fdef` to annotate the arguments to each function. This is a lot more explicit keyboard-typing on the programmer's part, but then so is a statically-typed language. Where I think Clojure will still come up short is in tooling to support finding each reference in a better way than grepping your project for `:user/name`. All the information you need is in there, as you can see from this proof-of-concept tool[0], but it's not implemented seamlessly into the workflow. [0]: https://github.com/clj-kondo/inspector https://github.com/clj-kondo/inspector
- kimi 5y agoRefactoring is still hard and awfully manual. And like all dynamic languages, a wrong key (was it :user or :users or :username or :user_name?) will be a PITA to find.
- jdminhbg 5y agoRefactoring from a :user/name String to a :user/names Array is going to be manual in both static and dynamic languages until Github Copilot gets a lot better. All the compiler or Spec can do is show you the places in your code where you'll need to make updates.
- phtrivier 5y agoMore precisely, it can show you "all" the places where I have to rework. And, since it is very likely that other pieces of the software will need to be change, it's crucial that is does it recursively. The compiler can do that ; I'm not aware of how spec could do that. Framing it as "all the compiler can do" us a bit weird - that's _exactly_ the thing I need.
- robertfw 5y ago> - ease the onboarding. Every few months I try to give clojure another shot, and every few months _some_ part of the setup has changed and / or is broken. What are you finding that is breaking? Backwards compatibility is pretty stellar in the language
- KingMob 5y agoProbably referring to the docs. I myself am irritated at the pace of change of all the clj command-line options. In general, Clojure still has poor documentation compared to more popular languages.
- deleted 5y ago[deleted]