News for hackers. Stuff that matters.
Re:Ruby 2.6 by yxhuvud on Monday December 24, 2018 @10:40AM (#18752593)
Try Crystal and you get the joy of Ruby enumerables together with a static type system.
Re:Ruby 2.6 by briandear on Monday December 24, 2018 @12:49PM (#18753241)
Crystal is nice, but my love affair with Swift is going strong. Not exactly Ruby syntax but pretty similar in terms of simplicity. I am a Rubyist who feels right at home with Swift. But for the new year, I definitely want to give Crystal a fair shot!
Re:Ruby 2.6 by pkulak on Monday December 24, 2018 @01:21PM (#18753423)
Kotlin is my new love. Best collections library of any language I've used, great type system, coroutines are amazing, and all of it integrates perfectly with 25 years of rock-solid Java libraries.
Re:Ruby 2.6 by kodablah on Monday December 24, 2018 @01:41PM (#18753548)
While the collections library may be better than others, it has a great many warts, many of which aren't discoverable until you've used it a long time. Some of these warts are a result of JVM interop requirements. It's not just the collections library, while the language is great and better than others, there are mounds of bugs and poor design decisions.
Re:Ruby 2.6 by buckysock on Monday December 24, 2018 @07:52PM (#18755166)
What do you use Coroutines in a static language like Java, for ?
Re:Ruby 2.6 by pkulak on Monday December 24, 2018 @10:58PM (#18755817)
Everywhere I used to use CompleteableFutures, except without ending up with completely unmaintainable code.

https://github.com/Kotlin/kotlinx.coroutines/blob/master/cor...

Re:Ruby 2.6 by buckysock on Tuesday December 25, 2018 @10:01PM (#18760191)
Very interesting, thanks!
Re:Ruby 2.6 by owens99 on Monday December 24, 2018 @01:17PM (#18753388)
Interesting. What’s your opinions on Crystal right now as a substitute for Ruby? Is there a good stack like Rails for Crystal?
Re:Ruby 2.6 by G4BB3R on Monday December 24, 2018 @03:27PM (#18754110)
Take a look at Lucky framework!

https://luckyframework.org

Re:Ruby 2.6 by yxhuvud on Monday December 24, 2018 @03:55PM (#18754219)
Quite immature, especially when it comes to community and library support.

But dang it's nice to do stuff in it.

Re:Ruby 2.6 by Thaxll on Monday December 24, 2018 @03:50PM (#18754206)
Crystal is definitely not production ready, I mean a language without thread support...
Re:Ruby 2.6 by proyb2 on Monday December 24, 2018 @07:13PM (#18755025)
Yeah, it’s only now MT schedulers is work in progress to bring multithread fibers to Crystal

https://github.com/crystal-lang/crystal/pull/7214

Re:Ruby 2.6 by buckysock on Monday December 24, 2018 @07:46PM (#18755137)
Thread support in interpreted languages isn’t that parallel to begin with.
Re:Ruby 2.6 by jashmatthews on Monday December 24, 2018 @07:56PM (#18755181)
JRuby threads are fully parallel and in production use today. CRuby's GIL is an implementation choice rather a property of dynamic/interpreted languages.
Re:Ruby 2.6 by viraptor on Tuesday December 25, 2018 @08:00AM (#18757236)
Is it really a "choice" if the alternative is really hard to achieve in practice? It's like calling python's GIL a choice... with numerous projects trying to get rid of it in various ways and never really succeeding to do it while keeping the single threaded performance and the extensions API.
Re:Ruby 2.6 by pjmlp on Tuesday December 25, 2018 @08:25AM (#18757309)
It is a choice to keep backwards compatibility with the C extensions API.

The GIL would be quite easy to replace otherwise.

Re:Ruby 2.6 by jashmatthews on Wednesday December 26, 2018 @01:19AM (#18760914)
> It is a choice to keep backwards compatibility with the C extensions API.

IIUC for CRuby it's mostly about how to keep the VM simple. Koichi Sasada is working on an ownership based model like Erlang has, which sidesteps a bunch of theses issues.

Re:Ruby 2.6 by buckysock on Tuesday December 25, 2018 @06:26AM (#18757012)
I’m wondering.. what is the effect of letting the JVM handle synchronization then ? Wouldn’t they still need to synchronize within JvM ?