5 ms·
> The slow(ish) Crystal compilation will not please Ruby users I don't know what's the general opinion, but distribution for dynamic languages is a nightmare (
by pizza234 4y ago
> The slow(ish) Crystal compilation will not please Ruby users
I don't know what's the general opinion, but distribution for dynamic languages is a nightmare (and I'm including intra-machine, ie. switching between environments).
Personally, I'd be thrilled to trade off speed of compilation for distribution simplicity!
> My impression is that not many Ruby programmers have switched to Crystal.
This depends on the context of moving - professional projects, or hobby programming. Every once in a while somebody pops up saying that they've switched for hobby projects (mostly, scripts).
I'd love to switch, also professionally (that is, for certain parts of my professional project), however, lack of (release quality) parallelism is a dealbraker for me. It's mostly a matter of long-term trust - I personally don't trust a programming language that in 2022 doesn't support parallelism. Ironically, Ruby now has it (even if in limited form).
Development of 3d party libraries are also in vicious circle (few libraries -> few devs -> few libraries). Lack of (release quality) AWS SDK, for starters, is a dealbreaker.
- nickjj 4y ago> Personally, I'd be thrilled to trade off speed of compilation for distribution simplicity! Technologies like Docker have made distribution a lot easier. I haven't used tools like chruby or rbenv since 2014 when I started using Docker because Docker manages your app's runtime environment. You pull down your built image on your server and run it. There's no complication, sprawling of version managers or surprises. Personally I think having a fast dev feedback loop is critically important. It's something you experience hundreds of times a day as you're developing your project.
- chillfox 4y agoWith static typing and analysis in the editor there’s no reason to run the code for every second line you write. I usually only need to run it a few times towards the end of writing a feature to see if the compiler or specs catches any errors.
- nickjj 4y agoIf you're building web apps chances are you want to see your changes frequently since modifying a model, controller action or view may yield a different UI state. I'm constantly editing code then directing my attention to my browser to see the results. This is independent of CSS or JS changes that might be picked up by asset watching tools like esbuild or tailwind's CLI tool.
- chillfox 4y agoFair enough, I build json rest apis in Crystal, then someone else does the js/css front end.
- cxr 4y ago> distribution for dynamic languages is a nightmare Weird statement. Software distribution generally is just a terrible mess, regardless of what sort of language it's written in. The one exception is JS, which happens to be dynamic and also has what is probably the most reliable and ubiquitous platform available—so much so that its distribution story is often credited, rightly or wrongly, as the only reason anyone actually uses it.
- pizza234 4y agoThere are very significant differences between distributing programs in a static vs. dynamic language. Github's Hub tool is a good example. It was originally written in Ruby. This requires that the user: - may need to handle a certain environment in terms of Ruby interpreter (potentially install a new version) - may need to handle a certain libraries group (gemsets in RVM) - needs to install dependencies - needs to handle switching to the appropriate Ruby interpreter version and libraries group Especially point 3 is a pain. Even just installing everything as system Ruby won't work, because often, different Ruby interpreter versions are required. Once they moved to Golang: - the distributor compiles for different platforms - the user downloads the given version for their O/S That's all.
- cxr 4y agoOkay. Sounds like you're on the road to a convincing argument against Ruby. (I myself have avoided Ruby in the past for similar reasons, despite other things about it that are attractive.) And gesturing towards Golang is really just highlighting a conscious design decision by the Golang team—who didn't have to design it as a static language in order to achieve the same effect; they're orthogonal issues. Where does the generalization to dynamic vs. static languages come from? > Github's Hub tool is a good example. I gave an example already (a counterexample, that is—JS). Was there something wrong with that?
- brigandish 4y agoYes, there something wrong with it, because the distribution of the runtime is done via binaries i.e. browsers. Using Go or Crystal is mimicking that level of ease. Ruby, or JS (which is more of a mess than Ruby even though the runtime is already distributed) are still a pain to share. No credit goes to the JS distribution system(s) nor the form that the code itself is distributed in for the most difficult bit being done by browser vendors bundling the runtime.