Does anybody use Crystal professionally here? Any thoughts so far if so?
Does anybody use Crystal professionally here? Any thoughts so far if so?
The main downside has been the somewhat frequent deprecations of methods and changes to the standard lib. But it's mostly due to the preparation to launch 1.0.
Also, how do you handle jobs with Crystal? Sidekiq being the common one for ruby.
It still lacks some features found in bigger frameworks, but is nearing 1.0 and gaining many new contributors that are helping us fill in the gaps.
Feel free to hop on our chatroom to ask questions about it. We try to be super friendly and love answering questions and getting feedback https://gitter.im/luckyframework/Lobby
You can check out our roadmap to 1.0 here: https://docs.google.com/document/d/1EYzx37Kq5h7iLH9SQTFyXNwb...
There's also sidekiq.cr from the same person who made Sidekiq for Ruby: https://github.com/mperham/sidekiq.cr
But both are still very early stage of dev. Is Amber still being developed?
Edit: Looks like Amber had a new release a few days ago, and GitHub got a new design?
My biggest gripes would be major API changes (like the JSON mapping), but that's expected with a young language and better in the long run.
Another problem is compilation time and compilation memory. waiting a couple of seconds every time i make a change during development sucks, but not a big deal. I've had my deployment server fail deployment a couple times because it ran out of memory when compiling.
A solution to compilation times is to split up your app when it gets huge, so that you have smaller apps to compile.
I don't use many external dependencies, not even for the http server. The stdlib is very good. I would probably be using OCaml instead if the stdlib were as modern and clean as Crystal.
Most of the code is on the admin side. I've basically been building something akin to shopify but for managing local orders and delivery logistics.
There's the likelihood that many future users will encounter it via a "from soup to nuts complete" web application framework like amber or lucky (ROR-like) that include scaffolding for models and migrations and such, or possibly with the sinatra/express'esque kemal framework that mostly concentrates on routing and exposing the request/response cycle, allowing you to inline middleware and pass the request context through your own stuff.
.ecr templating (syntactically similar to .erb templates) is built into the standard library and compiles to actual crystal code.
macros resolve to actual crystal code at compile time, so some of the ruby meta-programming requires a rethink.
While some folks eagerly await true parallelism, which I THINK was here already and then revoked temporarily, but I might be mistaken, I'm quite content to build distributed applications with Crystal communicating over standard protocols or directly via some kind of socket (sockets network and local also being part of standard library)
It's executables are fast, small, and don't use much ram (12megs is one anecdotal totally context-less number I'll throw at you, lol...)
I use crenv for controlling the version churn, as someone else pointed out, they are ramping up to v1.0, and they now claim to have largely finished breaking changes on 0.35.1 and are prepping for 1.0.0 already on the basis of where we are at now. I also tend to use local shards (specific versions) to ensure build reproducability.
Any specific questions?
Is there any web framework for it, like rails? That's really the main reason I use ruby is because as a single developer it's amazingly fast to set up new apps (admin panels, reporting panels, sales funnels, etc). The out-of-the-box functionality of rails makes this super painless. I'd LOVE to use something faster but I don't really want to have to custom write a lot of things (CSRF, sessions, cookies, blah blah).
Also, how do you handle jobs with Crystal? Sidekiq being the common one for ruby.
It is there, but not enabled by default. You need to add -Dpreview_mt to the command line to enable it.