unixhero a year ago

I fucking love Crystal and Ruby. Never has a language literally made me happy like those two. "Amazement wow is this how easy I can achieve this. This is incredible!!!".

Conversely Perl and C++ made me miserable, as I tried and tried and gave up learning them. I prefer Excel formulae to working with them.

  • nurettin a year ago

    I pretty much love C++ and would give up my career to be able to work with it again. Especially that feeling of squishing millions of lines of data in milliseconds by running the compiled code. It is pure delight. C did make me pretty miserable, though.

  • cies a year ago

    > Perl and C++ made me miserable

    You compare to rather new, and "geared to learners", languages to some old and know-to-be-arcane languages.

    I'd be curious what you think of, for instance, Kotlin and Elm.

    • xcdzvyn a year ago

      And Elixir :)

      • cies a year ago

        I feel that's pretty close to Ruby and Crystal. I was actually hoping for something more out of line (like C++ and Perl) but more modern.

      • hipster_robot a year ago

        I enjoy Elixir a lot but it feels like a tool designed for a whole different purpose. I don’t really know what that purpose it. It’s possible that my brain is just not well organized for the way elixir is laid out, but Crystal is so fluid with my brain.

gregors a year ago

It's quite easy for me to churn out some data munging scripts using Ruby but I was running into performance issues on large csv files. Crystal is like having super powers for csv parsing if you already have Ruby skills. I really think it's the sweet spot for the language.

compumike a year ago

This is great Serdar.

As an alternative to Chapter 2 I’ll also share https://github.com/compumike/crystal-docker-quickstart my project template which lets you get a Crystal (currently 1.6.2) dev environment running with just Docker. Good for kicking the tires, which is what I think your audience is probably wanting to do! And then eventually can install a binary package as you suggest.

open-source-ux a year ago

Crystal is a lovely language. The language community is small though, and learning resources are also small. The story for Crystal is the same story for many programming languages: grow the interest of users, and find generous funding.

My impression is that not many Ruby programmers have switched to Crystal. The slow(ish) Crystal compilation will not please Ruby users. And Crystal for Windows is still in beta.

Despite these factors, Crystal is a pleasure to use - fast, readable, and a well-featured standard libary.

  • pizza234 a year 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 a year 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 a year ago

        With 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 a year ago

          If 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 a year ago

            Fair enough, I build json rest apis in Crystal, then someone else does the js/css front end.

    • cxr a year 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 a year ago

        There 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.

        • gregors a year ago

          I wouldn't shrug my shoulders at

          >> the distributor compiles for different platforms

          Most people aren't doing that for you. There are lots of tools out there where you do need to still manually compile it yourself and make sure you have the appropriate dependencies which will still be painful. That being said, I agree that shipping a script can be a problem, but lots of people use Brew and that seems to work ok.

        • cxr a year ago

          Okay. 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 a year ago

            Yes, 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.

            • cxr a year ago

              This another weird comment—for different reasons compared to the original. There are several statements where the truth status of the claims are hard to ascertain, because the statements they're part of are incomprehensible. The claims in the statements that are comprehensible are untrue.

  • postmodern_mod3 a year ago

    One minor note:

    Crystal achieved basic Windows support as of 2021/11/18. https://github.com/crystal-lang/crystal/issues/5430

    As of Crystal 1.5.0, Windows support is basically there. https://crystal-lang.org/2022/07/06/1.5.0-released.html

    However, Crystal aims to support the lowest common denominator between POSIX and Windows, so not all of the Windows standard APIs are supported out-of-the-box. Other Windows specific libraries will need to be created specifically for Windows users/developers.

  • Tolexx a year ago

    > The story for Crystal is the same story for many programming languages: grow the interest of users, and find generous funding.

    it's the same thing for Elixir as well. they have successfully wooed a few Ruby programmers but not many have completely switched to using Elixir. Again some companies using Elixir are those that want to migrate away from Ruby.

    it takes quite a while for a new hot language to become extremely popular and then go on to replace other popular mainstream languages.

    • npn a year ago

      I love Elixir, but it is an extremely niche language. It's great for network application, but just doesn't seem to be suitable for a daily driver language. Meanwhile crystal can fit all the bill: you can use it to write small scripts, you can write it for write long running service, you can write it to crunch data (the multi-threading feature of crystal is still an experiment though, but it works well for basic stuff)...

      As I mainly use ruby for scripting, Crystal has been replacing ruby's role for me for 3+ years and I don't even find anything that really missing, except for maybe a decent ORM like Sequel.

  • nerdponx a year ago

    To be fair, the slow compilation time is annoying even compared to other compiled languages, particularly Go and Nim, which are similarly "high level".

    I also found that the Crystal LSP server was painfully slow, and there seems to be a lack of robust developer tooling in general. Has that improved in the last year or so?

azangru a year ago

> What’s awesome about Ruby?

> Dynamically typed

As someone who has experienced the joy and at least some feeling of safety from moving to typescript from javascript, I would seriously question that dynamic typing is awesome.

  • Edd314159 a year ago

    I reject the implication that if dynamic typing is awesome, then static typing is _not_ awesome.

    It’s like saying pizza is awesome, therefore ice cream is not.

    Both are awesome! It just depends what you’re trying to achieve at that point in time. A language’s type system is not, in absolute terms, an advantage or disadvantage. It’s just a design choice, each with their own trade-offs that we must consider.

  • trehalose a year ago

    I tend to like when languages are dynamically typed, but I suspect it's not the dynamic typing I like--I think it's that dynamically-typed languages generally have type inference.

    I don't like having to write things like `List<int> list = new List<int>`... I find myself thinking, "Why do I need to tell the stupid compiler in the very same line that a new List<int> is a List<int>? Wtf else would it be?!"

    When I write in a language such as Kotlin, that's statically typed but has type inference, I feel basically the same lack of resistance as I feel working in dynamically typed languages. Of course, even in such languages, there'll be times when the coder must specify a type, or should specify one for various reasons, but I like when the compiler at least makes an effort, haha.

    I like Ruby a lot (and I've tried out Crystal in some recreational programming stuff and like it a lot too), and I think I'd still like it just as much without the dynamic typing.

  • gregors a year ago

    As someone who was on the type train in Uni and moved to dynamic languages, my first feeling was slow and unsafe. I couldn't imagine how things wouldn't just explode. In practice I've rarely seen issues. Ruby is still the fastest way for me to get a concept working. I'd definitely consider it awesome.

  • bryanrasmussen a year ago

    not all dynamically typed languages are the same, Ruby is strongly typed and JavaScript is generally described as a weakly typed language.

    • cies a year ago

      The word "strong" is not well defined in this context. But usually it is used for languages like Haskell, Idris, PureScript and Elm.

      Ruby does not do as many automatic casts as JS. In this regard it may be seen as "stronger".

    • Gigachad a year ago

      I’d hardly call ruby strongly typed. There is basically no way to verify anything statically so almost all issues show up in run time. Updating Rails or any gems on a production system is a nightmare where the only option is to have 20,000 unit tests and then hope nothing blows up when you release it.

      • matthewmacleod a year ago

        You have confused strong typing and static typing.

        • mrkeen a year ago

          Some of us need the latter for the former.

          What would you say some of the strengths of Ruby's type system are?

  • atmosx a year ago

    Ruby 3 supports type signatures: https://github.com/ruby/rbs

    • Gigachad a year ago

      The rails creator DHH has indicated that rails would “absolutely not” be getting type support.

      • gregors a year ago

        That's absolutely the correct call for rails.

        • Gigachad a year ago

          It's the main reason I see Rails not lasting another decade. All the Rails apps I have been working on become almost unmanageable after 6+ years because keeping things updated on an untyped system is borderline impossible to do safely.

  • Existenceblinks a year ago

    This is the problem when people only know one language, especially javascript. And then have quite naive opinion about programming languages. Ones should try at least all one of big categories; one of ML family, one of C-like, one of Lisp dialect.

    • azangru a year ago

      > This is the problem

      Could you state the problem more concretely? Javascript is a cross between Java and Lisp, having a Java-esque C-like syntax, and lisp-like function-as-a-first-class-citizen behavior. Typescript brings it all the way to C#; so the C-like territory is firmly covered. An ML-family language, especially something like Haskell, would only reinforce the admiration for static types. Which languages would lead to the conclusion that dynamic typing is awesome? Lisps?

      • Existenceblinks a year ago

        Oh god you are bending some broad aspects to back it up that Javascript has all of greatness from every other style of programming. No, it doesn't. I don't think it works like that. It's like a p10 of jack of all trade.

watzon a year ago

I've been using Crystal for some 6 years now and it's still my favorite language. It definitely has issues; it's not perfect, but it really hits a good balance between being a fast language with nice features and encouraging the "joy of programming" that Matz is all about. I would love to see it gain popularity eventually.

freilanzer a year ago

With advent of code coming up I'm torn between Kotlin and maybe Crystal.

https://adventofcode.com/

Serg31 a year ago

Hey Everyone. I'm looking russian speaking Crystal/Ruby developers for really interesting project with competitive salary. For details, please, contact me via e-mail - veronika.p@eurekaos.com

singularity2001 a year ago

How is wasm support going? I know they have to "throw away" many of their inventions in lieu of single threads and untouchable stacks, but the core of type inference still maps well to wasm (?)

raydiatian a year ago

> Crystalian [being the name for Crystal users/evangelists]

Man, there have to be better alternatives than this.

Did you try “crystacean?” Chuckles in .rs.

  • nix23 a year ago

    Pfff, yesterday i talked with a Brain fucker...it was terrifying. Can we just stop calling peoples after tools?

    • sdiacom a year ago

      Generally I would agree, but in this case, "Crystal user" isn't that much better.

      • nix23 a year ago

        A developer who uses crystal? Like a builder who uses a hammer is not a hammer-user ;)

        EDIT: Wow that took a long time to realize what you meant...haha no, truly not good, and thinking about it my comment "A developer who uses crystal?" is now terrible too.

        • raydiatian a year ago

          Crystal dev

          Problem solved

          • nix23 a year ago

            Develops the best Crystal on the market ;)

    • jspash a year ago

      A "tool" is probably the best term for someone who actually uses BF.

  • glenngillen a year ago

    Crystian? ;)

    • squarefoot a year ago

      With Crystmas as official language day? I'm in!:)

      • pilaf a year ago

        Sounds appropriate given that Ruby already does all its major releases on Christmas day, considering Crystal's close relationship with Ruby.

  • aaaronic a year ago

    Geodes?

    • brianjacobs a year ago

      I think this is an underrated response given that any crystal can start as a geode.

    • amval a year ago

      Geodudes?

  • austinjp a year ago

    Hmm, perhaps Wyld Crystallyns?

    • raydiatian a year ago

      I too wanted to make this pun, glad I’m not alone :)

  • chillfox a year ago

    There are lots of alternatives. There was a large thread on the forum discussing it and there is basically no consensus for a preferred term.

    • kiawe_fire a year ago

      As someone from the US state of Michigan that has at least two competing demonyms, I actually find the idea of everyone using a different form based on preference to be charming.

  • _joel a year ago

    Shardies

  • watzon a year ago

    I opt for meth heads

  • tasqyn a year ago

    you people must be fun at parties :)

  • rvz a year ago

    Crynge.