3 ms·
Just curious, as an avid user of Elixir lang, which has most of these anyway, what should be a compelling reason for someone like me to start using Crystal (mor
by neya 6y ago
Just curious, as an avid user of Elixir lang, which has most of these anyway, what should be a compelling reason for someone like me to start using Crystal (more)?
Thank you
- IfOnlyYouKnew 6y agoIt’s blazingly fast for pure number / text crunching. As in: I use it to ingest terabytes of data files / JSON / logs at speeds indistinguishable from C but with the convenience of programming in something like ruby. Once replaced a python script while it was running. Expected time, python: 12 hours. Time to get it running in Crystal: 20 min. Time to finish in Crystal: 12 minutes.
- happy-go-lucky 6y ago> Once replaced a python script while it was running. Expected time, python: 12 hours. Time to get it running in Crystal: 20 min. Time to finish in Crystal: 12 minutes. Can you please elaborate on this?
- IfOnlyYouKnew 6y agoThese are the python scripts: https://github.com/jonadsimon/entendrepreneur/tree/master/preprocessing_scripts https://github.com/jonadsimon/entendrepreneur/tree/master/pr... I don’t do enough python to judge them. But, then again, I had even less experience in Crystal back when I worked on this.
- antupis 6y agoReallity probably is that code was not optimized python which was writen as POC and not touched after initial write. Python is usually fast enough when using numpy,scipy etc.
- iomcr 6y agoCrystal does a better job with making portable binaries. For example I have written an app that's a 20MB alpine docker container. A comparable app written in Elixir used an 800MB alpine docker container. I think Elixir is one of crystal's top competitors, but only for servers. Probably you'd never leave Elixir to write a webserver in Crystal. That's just Erlang's specialty. You would leave golang, Ruby, python, PHP, etc. for crystal though, because of the type system, performance, threads, binary, etc.. I've actually started using crystal to write the kinds of scripts people would normally use python for, despite it not being a scripting language.