As a long-time Rubyist, I took a serious look at Crystal for the first time and discovered a lot of the best batteries of Ruby included in Crystal. So pleased to find an RSpec-like DSL for testing, for example, and Crystal's Rails-like framework, Amber, generates scaffolds with Bootstrap built in. It's almost cheating how much learning and takeaways the Crystal core team can borrow from Ruby! I'm really liking it so far.
While Ruby allows you to choose and provide way too many choices, many guns for you to shoot your foot into. Crystal decided some are not good and actually enforce those best practices.
I think Lucky [1] is actually a more Rails Like framework.
( Or more like both are NOT like Rails. As features rich or heavyweight, Rails provides more then you will ever need. )
I'm hoping to see more languages with light-weight threads automatically mapped (multiplexed) to physical threads, like in Go. So far, based on the crowd-sourced table I started working on, it is otherwise only Ada, Haskell and Pony (in addition to Go) that seems to meet these criteria:
Crystal will eventually have go-style parallelism as well as go-style concurrency. It's a hard thing to implement, and we don't have the resources of google (in fact we have very little resources at all) so it's taking time. Until 3 weeks ago, nobody at all was working full-time on crystal, it was entirely a spare-time project, so progress is slow, i'm incredibly proud of what we've managed to achieve so far and looking forward to more in the future.
On Java's case it is up to the JVM implementors to decide, the spec does not impose OS threads. Hence why you can find the terms green and red threads on old Java related docs.
Then both support tasks which get multiplexed into the underlying runtime threads.
I've been using (and contributing to) Crystal for some small projects over the last few months. Writing C bindings within it is amazingly stress-free[1].
It's still an unstable language (there are plenty of breaking changes in this release), but I highly recommend it -- especially if you like both static typing and Ruby.
I really like Crystal, and while it hasn't reached a 1.0 yet, it is still great and used in production. I think the main selling point of Crystal is performance + nice syntax. The docs are great and will help anyone curious to learn Crystal along the way. Crystal's biggest problem is that it doesn't have the support of a company or a large base of users so the core team isn't funded as much as they'd like. All in all, I think it is a great language!
Great to see some steps made towards supporting Windows! (i.e. "non-POSIX systems")
Now a pressing issue (though not for everyone) is that the compiler needs to escale from the current state because it takes too much memory and too much time to compile, but last time I checked it still wasn't crystal clear how to improve it.
I really, really like Crystal — the Ruby syntax is great, and better type safety is always a plus.
But I haven't found a reliable way for building a binary on a Mac OS without requiring dyld already be present on the target user's system. Seems none of the following issues are resolved, or that the project has indicated a recommended way to do this?
I am on openSUSE, and I just realized I can install Crystal from the RPM repository (well, duh! I should have thought of that a lot sooner...), so I now have no excuse left to play around with it a little. I also happen to be on vacation right now, so I have plenty of time on my hands. =D
Now the only thing that bothers me is the lack of a REPL. It comes with a web-based playground which is pretty nice, but still not quite the same. Is there any chance Crystal does have a true REPL which I just managed to miss? (If not, it's not a dealbreaker - Go doesn't have a REPL, either[0]. But it still would be nice.)
[0] I know, I know, there are third-party REPLs like gore, but by the time I found out about them, my need for one had diminished a lot.
Take a peek at Amber and its native ORM Granite. Amber is a bit more rails-like than Sinatra-like, but it’s super lightweight and has been a pleasure to build with so far. I’m using it for several projects.
only thing I don't like about Ruby is the "symbols". if there was a new language that copied everything about Ruby minus the symbols, I'd be all over it.
what is the reasoning for a language like Crystal to support symbols? i am under the impression that is just a relic of the past due to performance reasons but it is not the case anymore.
I don't know enough about the reasons why they are implemented to argue this strongly, but I know that they are immutable and that they are one step closer to the language in the sense that, constructions which you may not use in an unquoted symbol, are also not allowed to be used in a Ruby method name.
That seems like a handy data structure to have around next to a string (and nobody's stopping you from using a string if you wanted a string and not a symbol, ...or are they?)
1) Because HN is a social news website, so when someone reads a post about a subject, others are reminded of it, and can post in return. This happens with all popular topics, they come in batches.
2) Because Crystal is getting more popular (e.g. it jumped TIOBE rank for what it's worth), and more people like to read and hence vote such articles.
3) There's a huge conspiracy, with marketing shills and aliens, for an OSS language.
4) More than Go or Rust or React or Ruby back in the day?
Because Ruby is a really nice language to write code in (minus some quirks) and everyone would love a language with similar programmer experience, but much faster.
> why do all these comments read like advertisements
Enthusiastic users of new programming languages with small communities, generally want more people to use it as well, so that the community will grow and 1. produce more libraries; 2. produce more tutorials and other resources; 3. have more people for them to talk to about the language.
Because advertising Crystal means a chance for Ruby enthusiasts and some beginners to try a statically-typed language without having too much learning curve.
[+] [-] faitswulff|7 years ago|reply
[+] [-] ksec|7 years ago|reply
I think Lucky [1] is actually a more Rails Like framework. ( Or more like both are NOT like Rails. As features rich or heavyweight, Rails provides more then you will ever need. )
[1]https://luckyframework.org/why-lucky/
[+] [-] fiatjaf|7 years ago|reply
[+] [-] samuell|7 years ago|reply
I'm hoping to see more languages with light-weight threads automatically mapped (multiplexed) to physical threads, like in Go. So far, based on the crowd-sourced table I started working on, it is otherwise only Ada, Haskell and Pony (in addition to Go) that seems to meet these criteria:
https://docs.google.com/spreadsheets/d/1BAiJR026ih1U8HoRw__n...
[+] [-] RX14|7 years ago|reply
Really, the best way to help the language is to donate: https://salt.bountysource.com/teams/crystal-lang
[+] [-] pjmlp|7 years ago|reply
On Java's case it is up to the JVM implementors to decide, the spec does not impose OS threads. Hence why you can find the terms green and red threads on old Java related docs.
Then both support tasks which get multiplexed into the underlying runtime threads.
[+] [-] dom96|7 years ago|reply
1 - https://nim-lang.org/docs/threadpool.html
[+] [-] bmichel|7 years ago|reply
[+] [-] lkurusa|7 years ago|reply
[+] [-] sam0x17|7 years ago|reply
[+] [-] woodruffw|7 years ago|reply
It's still an unstable language (there are plenty of breaking changes in this release), but I highly recommend it -- especially if you like both static typing and Ruby.
[1]: https://github.com/woodruffw/x_do.cr/blob/master/src/x_do/li...
[+] [-] prydt|7 years ago|reply
[+] [-] omaranto|7 years ago|reply
I thought it was supported by Manas (https://manas.tech/).
[+] [-] SparkyMcUnicorn|7 years ago|reply
Crystal always fascinates me when it gets brought up, and I'd really like to dive in sometime.
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] j1elo|7 years ago|reply
Now a pressing issue (though not for everyone) is that the compiler needs to escale from the current state because it takes too much memory and too much time to compile, but last time I checked it still wasn't crystal clear how to improve it.
[+] [-] kowdermeister|7 years ago|reply
[+] [-] backpropaganda|7 years ago|reply
Give up on type inference, or at least type inference across modules and classes.
[+] [-] bazeblackwood|7 years ago|reply
But I haven't found a reliable way for building a binary on a Mac OS without requiring dyld already be present on the target user's system. Seems none of the following issues are resolved, or that the project has indicated a recommended way to do this?
https://github.com/crystal-lang/crystal/issues?utf8=%E2%9C%9...
[+] [-] Birch-san|7 years ago|reply
https://github.com/crystal-lang/crystal/issues/3067#issuecom...
[+] [-] bazeblackwood|7 years ago|reply
[+] [-] krylon|7 years ago|reply
Now the only thing that bothers me is the lack of a REPL. It comes with a web-based playground which is pretty nice, but still not quite the same. Is there any chance Crystal does have a true REPL which I just managed to miss? (If not, it's not a dealbreaker - Go doesn't have a REPL, either[0]. But it still would be nice.)
[0] I know, I know, there are third-party REPLs like gore, but by the time I found out about them, my need for one had diminished a lot.
[+] [-] woodruffw|7 years ago|reply
[1]: https://github.com/crystal-community/icr
[+] [-] sam0x17|7 years ago|reply
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] _RPM|7 years ago|reply
[+] [-] simen|7 years ago|reply
[+] [-] jaequery|7 years ago|reply
[+] [-] steveklabnik|7 years ago|reply
No idea about ORMs though.
[+] [-] nlh|7 years ago|reply
https://github.com/amberframework/amber
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] skli|7 years ago|reply
[+] [-] fridgamarator|7 years ago|reply
[+] [-] faaq|7 years ago|reply
Well, a couple of breaking changes, but...
still amazing!
[+] [-] jaequery|7 years ago|reply
what is the reasoning for a language like Crystal to support symbols? i am under the impression that is just a relic of the past due to performance reasons but it is not the case anymore.
[+] [-] yebyen|7 years ago|reply
I don't know enough about the reasons why they are implemented to argue this strongly, but I know that they are immutable and that they are one step closer to the language in the sense that, constructions which you may not use in an unquoted symbol, are also not allowed to be used in a Ruby method name.
That seems like a handy data structure to have around next to a string (and nobody's stopping you from using a string if you wanted a string and not a symbol, ...or are they?)
[+] [-] Mikeb85|7 years ago|reply
[+] [-] darkcha0s|7 years ago|reply
[+] [-] coldtea|7 years ago|reply
1) Because HN is a social news website, so when someone reads a post about a subject, others are reminded of it, and can post in return. This happens with all popular topics, they come in batches.
2) Because Crystal is getting more popular (e.g. it jumped TIOBE rank for what it's worth), and more people like to read and hence vote such articles.
3) There's a huge conspiracy, with marketing shills and aliens, for an OSS language.
4) More than Go or Rust or React or Ruby back in the day?
Take your pick
[+] [-] noncoml|7 years ago|reply
[+] [-] derefr|7 years ago|reply
Enthusiastic users of new programming languages with small communities, generally want more people to use it as well, so that the community will grow and 1. produce more libraries; 2. produce more tutorials and other resources; 3. have more people for them to talk to about the language.
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] nedp|7 years ago|reply