News for hackers. Stuff that matters.
Re:Lilith: x86-64 OS written in Crystal by shakna on Sunday December 22, 2019 @09:14PM (#21861032)
> It's older than Rust, Kotlin, Swift, Nim, or even OCaml, and doesn't really offer anything they don't.

Crystal is only five years old.

Nim is 11, Rust is 9, Kotlin is 8, OCaml is 23 and Swift is 5.

Basically, Crystal is tied with Swift as the youngest.

What it offers right now is a simple porting process for those with Ruby codebases.

Re:Lilith: x86-64 OS written in Crystal by k__ on Sunday December 22, 2019 @09:32PM (#21861084)
I think they meant younger.

But, yeah, besides the syntax familiarity for Ruby programmers it doesn't seem offer much that the others do.

Re:Lilith: x86-64 OS written in Crystal by shakna on Monday December 23, 2019 @11:03AM (#21864494)
> I think they meant younger.

The "even OCaml" is what threw me. Still not quite sure if they meant older or younger from it.

> But, yeah, besides the syntax familiarity for Ruby programmers it doesn't seem offer much that the others do.

A familiar syntax is a huge benefit in a lot of contexts. There's plenty of Ruby-only shops around the world. Making a faster and statically-typed language accessible to them is a decent niche.

Crystal isn't quite Ruby. It has type guarantees that Ruby doesn't, which makes it easier to maintain. The async and parallel stories are also immensely better in Crystal than Ruby.

The "Nil is a compile-time error" is also a feature I highly appreciate.

Re:Lilith: x86-64 OS written in Crystal by nine_k on Sunday December 22, 2019 @11:36PM (#21861500)
Okay, port your existing Ruby code to a compiled language, giving it multiple times the speed? Maybe three is a slight business opportunity here.

Also, give your developers a more productive language that can go where Ruby can't (like OS development), which is 90% instantly recognizable — may also be worth something?

Re:Lilith: x86-64 OS written in Crystal by lmm on Sunday December 22, 2019 @11:43PM (#21861523)
Is it really so hard to port Ruby code to any of the languages I mentioned? Even with Crystal you will still have to make changes to your code, is having to use a slightly different syntax such a big difference? If you've got Ruby code and you haven't already ported it, how badly do you need the speed?
Re:Lilith: x86-64 OS written in Crystal by EamonnMR on Monday December 23, 2019 @07:51AM (#21863291)
Mentally context switching between Ruby and any other language to do the translation actually is kind of a hassle.
Re:Lilith: x86-64 OS written in Crystal by k__ on Monday December 23, 2019 @08:16AM (#21863389)
I could imagine, that the subtle differences could get you ugly problems while porting.
Re:Lilith: x86-64 OS written in Crystal by lmm on Tuesday December 24, 2019 @01:08AM (#21870222)
Won't the differences be more subtle and difficult if you use a language that's syntactically Ruby-like but not actually Ruby?
Re:Lilith: x86-64 OS written in Crystal by rvz on Monday December 23, 2019 @03:49AM (#21862304)
Well it seems most developers here would rather use Ruby + several memory-optimised VM clusters to make their services go faster and destroy their balance sheet than to use a faster language that is efficient in memory and is also blazing fast.

A rewrite in (other fast language) from Ruby sounds ridiculous as soon as you include writing a extra FFI wrapper around this you have to maintain so that would be out of the picture and that sounds a lot harder than a semi 1:1 port of the source code.

The trouble is Ruby itself is starting to become a sunken cost as a language but is survived because of Rails, thus also explains the countless memory issues that happen when developers use it. So for a stopgap to something sort of better, I would rather port to Crystal or Elixir so I can run on those low-cost VMs and save cash.

Re:Lilith: x86-64 OS written in Crystal by PixyMisa on Monday December 23, 2019 @07:25AM (#21863193)
Slightly different?
Re:Lilith: x86-64 OS written in Crystal by k__ on Monday December 23, 2019 @08:20AM (#21863409)
I understood that Crystal is a huge thing for Ruby devs.

I just want to know if it is more than that or not.

I'm not a fan of Ruby and would prefer Nim or Rust if it were about syntax.

I ask myself if I miss any huge speciality of Crystal if I dismiss it just because of its syntax.

Re:Lilith: x86-64 OS written in Crystal by rishav_sharan on Monday December 23, 2019 @03:36AM (#21862266)
I am subscribed to the windows support github issue since 2013, so Crystal is definitely older than 5 years. I think its around 7 years old
Re:Lilith: x86-64 OS written in Crystal by shakna on Monday December 23, 2019 @05:32AM (#21862737)
The first release, 0.1.0, was in 2014. [0]

[0] https://crystal-lang.org/2014/06/19/crystal-0.1.0-released.h...

Re:Lilith: x86-64 OS written in Crystal by rishav_sharan on Tuesday December 24, 2019 @05:01AM (#21870982)
First official release maybe. But folks have been using Crystal since before that. This is the Github issue in question; https://github.com/crystal-lang/crystal/issues/26
Re:Lilith: x86-64 OS written in Crystal by shakna on Tuesday December 24, 2019 @05:23AM (#21871047)
Not arguing with it. However, choosing a point in time to check a language's age from is somewhat arbitrary, and first release seemed good enough.

The main point was comparative age of languages. Like OCaml which is more than two decades old compared to Crystal which is young.

Re:Lilith: x86-64 OS written in Crystal by steveklabnik on Monday December 23, 2019 @10:24AM (#21864135)
Rust is more like 4 than 9; 2015 was the initial stable release, most people couldn’t really use it for things before that.
Re:Lilith: x86-64 OS written in Crystal by icelend on Monday December 23, 2019 @11:48AM (#21864884)
Well, ok, so Crystal is 0 years old.
Re:Lilith: x86-64 OS written in Crystal by steveklabnik on Monday December 23, 2019 @01:28PM (#21865797)
Yep, I’d agree with that!