Live data from Hacker News

Crystal 1.0 – What to expect

crystal-lang.org

191–200 of 351 posts

Re: Crystal 1.0 – What to expect

#191

It feels like Crystal it took all the best things from the languages I love, and put them together into one, beautiful language: - Elegance of Ruby - Statically type checked + global type inference - No Nulls - Go-like concurrency - Easy C ffi - High performance I really hope the Crystal succeeds and the language goes mainstream - this release is a huge step forward towards that. Congrats to the Crystal team for reac…

Fast compilation times are one of the best things from the languages I love. I’d really love to see OCaml get true parallelism, green threads, and a decent HTTP server story. Then, I don’t think I’d look anywhere else.

In case you haven’t been following along with the community the last prerequisite for parallelism will land with 4.13 in the next 3-6 months (guesstimate). Once that lands 5.0 is next which will have true parallelism.

Re: Crystal 1.0 – What to expect

#192
post #117

Earlier quoted context omitted.

I haven’t ever understood the argument against static typing. I’ve never declared a variable and not simultaneously thought “this is going to be a float, always a float, never not a float.” The only exception to this is untrusted input, but for that an string is usually always fine.

> I’ve never declared a variable and not simultaneously thought “this is going to be a float, always a float, never not a float.” Never written generic/template code? Making that much easier is one of the main benefits of dynamic typing.

It's possible—nay likely—that I don't understand the true value of generics. It's something that I've looked into on occasion and it never seemed all that useful to me. Most examples I've come across in the past were C++ and seemed like formalised workarounds for deficiencies in the C++ type system rather than being actually useful. I'm sure I've failed to grok them—or based on the code I write I'm not the target audience for them.

I have no problem when a language allows the programmer to explicitly opt for a variable to be an undefined/dynamic type, whether as part of generics or as part of a defensive ingest of untrusted data. I admit this is previously unspecified nuance but in my mind this doesn't break my rule: "this variable is always going to be a dynamic type, never not a dynamic type." This means you know when to interact with it defensively.

The thing I'd like in a hybrid static-dynamic language is type assertion blocks which restore some benefits of static typing while dealing with dynamic typed variables. E.g.:

  declare x as dynamic;
  x = untrusted_source();
  if (x IS_A string) {
    // Inside here, x behaves as a statically typed string.
    // The compiler knows it and checks types appropriately.
    // Passing x elsewhere will send a static typed string.
    function_that_demands_a_string(x);
  }
  else if (x CAN_SAFELY_BECOME_A uint) {
    // True for any non-negative integer regardless of data type.
    // Inside here, x is always a statically typed uint.
    // If it was some other type, it was converted for me.
  }
(This probably already exists in some language somewhere but my familiarity with languages is narrow.)

Re: Crystal 1.0 – What to expect

#193
post #101

Earlier quoted context omitted.

Speculating: since dang is HN's main moderator, there might be some tools built into either HN or HN search that help with those types of lists, possibly related to dupe detection.

Yes - some explanation at https://news.ycombinator.com/item?id=26245003 and the link back from there. Edit: I still want to make this a community/collaborative effort. As HN's archive grows it gets richer, so this gets increasingly worth doing over time. The recent changes are a small step in that direction. Edit 2: maybe someday it could be integrated somehow with the criminally neglected Usenet archive and go all t…

Usenet archives ftw!

Re: Crystal 1.0 – What to expect

#194

Earlier quoted context omitted.

This is great, thanks for putting in the time to put this together! Side note: Anybody know of tools that auto-compile lists like this? I'm sure it's not perfect, but these sorts of reviews really add value to the current conversation.

well! allow me to share a feature i discovered a few days ago after reading for years. when you browse via the web (unsure which apps support this feature), clicking the title - in this case, Crystal 1.0 – does what you expect and takes you to the article. in tinier font next to the title - in this case, (crystal-lang.org) - is a link that shows all the previous HN submissions for that website, which happens to be pr…

HN actually special cases medium so that this works. See https://news.ycombinator.com/item?id=26535357 for an example.

Re: Crystal 1.0 – What to expect

#195

Earlier quoted context omitted.

I think you mean 1 out of 4? Swift is the only one on that list that really feels tied to any particular platform. C# has been extremely portable for years now thanks to .NET Core. Even SQL Server runs on Linux these days, if you really just enjoy spending money. Java has always had a strong focus on portability, of course. Nim... I don't know much about. Doesn't it compile to C? I don't think it intentionally has an…

> C# has been extremely portable for years now thanks to .NET Core. Even SQL Server runs on Linux these days, if you really just enjoy spending money. My experience with C# and .NET Core on ARM Linux is that it comes with a lot of crashes and segfaults. On x86-64 Linux it works well, though.

In my case the ARMs were Raspberry Pi3, Pi4, and RK3288. Linux was Debian in all cases, and .NET was 2.1 and 2.2. Worked great for my use cases, only crashed when I screwed up with unsafe or unmanaged code.

If your environment is anywhere similar, and you OK with .NET 2.1.18, you can try my package: https://github.com/Const-me/Vrmac/releases/tag/1.0 Sources: https://github.com/Const-me/Vrmac/tree/master/net-core

Re: Crystal 1.0 – What to expect

#196

You know, I have been language-hopping for over a year now, in hope to find a secondary language I could learn beside the bread-winner Java. Trying to strike the balance between productivity and performance is pretty hard. I tried Go, it looks ugly (sorry). I tried Rust: it is beautiful in concept but I don't feel productive enough. I mean, maybe my use case is not align with Rust. My secondary lang should allow me t…

It is cool to have options. I do actually like Go, but Julia is my favorite. Still a bit surprised that Julia is almost never mentioned in Crystal discussions.

If you love Ruby, and want something with higher performance, then Julia is a pretty natural next step. Sure it does not have the same syntax.

Maybe I am just getting old but when Ruby came out, that was cutting edge. It was a fresh new way of writing code. I had all the cool stuff. I you want that same kind of feeling today, where you got super awesome modern features, meta-programming galore, functional programming, you name it, then Julia is it.

Julia is the new Ruby. Sure Ruby is a very object-oriented language and Julia is more functional, but that is where the industry has been heading these last years. And Julia is a pragmatic version of functional programming which I think most people can easily become accustomed to.

Re: Crystal 1.0 – What to expect

#197

It feels like Crystal it took all the best things from the languages I love, and put them together into one, beautiful language: - Elegance of Ruby - Statically type checked + global type inference - No Nulls - Go-like concurrency - Easy C ffi - High performance I really hope the Crystal succeeds and the language goes mainstream - this release is a huge step forward towards that. Congrats to the Crystal team for reac…

Yeah, I like everything on your list except the first one. Maybe Crystal will be compelling enough to get me comfortable with ruby-style language syntax & semantics.

Re: Crystal 1.0 – What to expect

#198
post #55

Congrats on the release! The biggest factor drawing me to experiment a little with Crystal is that it is one of very few languages providing what otherwise has been pretty unique to Go: Lightweight threads+Channels+M:N concurrency (automatically multiplexing the lightweight threads onto a smaller number of OS threads). Also it does it with a very readable and clean syntax. Wrote a little about it, with code compariso…

Haskell's concurrency has those features! The Async library contains high level combinators for concurrency that are particularly nice to use.

    (page1, page2) 
https://hackage.haskell.org/package/async-2.2.3/docs/Control...

Re: Crystal 1.0 – What to expect

#199

Earlier quoted context omitted.

C# ? Not complicated at all. In fact it's currently one of the most cross platform language/runtime in existence after .NET Core appeared, and now more than ever with .NET 5.0. I even managed to AOT compile code and run it without a trace of .NET. Just amazing.

C# is a really good language, but I had nothing but problems trying to develop with it on Linux exclusively. MonoDevelop doesn't support Linux anymore since a bunch of proprietary components were added to it (and this isn't even mentioned on its homepage), so you have to use a community fork. That didn't bode well for me. The fork didn't have packages for my distro and I couldn't get it to compile for two hours. VS C…

Matches my experience. Linux runtime worked great for me, SDK has not. To use it to full extent, I think you have to develop on a Windows PC with Visual Studio. However this way you can only debug on Windows i.e. if you want debugger, the project has to be runnable on Windows too.

Re: Crystal 1.0 – What to expect

#200

Earlier quoted context omitted.

C# ? Not complicated at all. In fact it's currently one of the most cross platform language/runtime in existence after .NET Core appeared, and now more than ever with .NET 5.0. I even managed to AOT compile code and run it without a trace of .NET. Just amazing.

C# is a really good language, but I had nothing but problems trying to develop with it on Linux exclusively. MonoDevelop doesn't support Linux anymore since a bunch of proprietary components were added to it (and this isn't even mentioned on its homepage), so you have to use a community fork. That didn't bode well for me. The fork didn't have packages for my distro and I couldn't get it to compile for two hours. VS C…

What a weird case. I have successfully used dotnet core on these distros (alpine, centos, fedora, debian, ubuntu) without a single problem. If you don't mind, what distro are you using ?
Post reply on HN