Live data from Hacker News

Crystal 0.25.1 released

crystal-lang.org

111–120 of 154 posts

Re: Crystal 0.25.1 released

#112
post #11

Earlier quoted context omitted.

I've programmed in both and as far as I can tell here's the best use case for each: Go - I want to program explicitly and don't mind a little extra code or syntax to do it. I want close to the best performance possible and a single distributable binary. I don't mind being encouraged to "roll my own" api / web app rather than using a framework. Crystal - I want to feel like I'm writing in Ruby, but with type checking…

> I don't mind being a little less performant than other compiled languages. What other languages? Because the language uses "Fast as C" as part of it's tagline. Is this a false claim?

Crystal's definitely up there, faster than java at least for most workloads. That can be improved much further by innovating on the GC.

Re: Crystal 0.25.1 released

#113

Any Julia programmers who have tried Crystal? I've never quite seen the point with Crystal when you got something like Julia. Although I guess there is a value in familiarity. I was a big fan of Ruby back in the day, but I just feel that our understanding of what makes good language design has evolved since then. The heavy OOP focus in Ruby seems very 90s in retrospect. I don't think it makes sense to restrict dispat…

Crystal has OOP features, but you don't have to use them if you don't want to. I do some scientific research in crystal and it is all modules with functions calling other functions and dealing with structs. I love the fact that I can create C-style structs with member methods in Crystal.

Re: Crystal 0.25.1 released

#114

Any Julia programmers who have tried Crystal? I've never quite seen the point with Crystal when you got something like Julia. Although I guess there is a value in familiarity. I was a big fan of Ruby back in the day, but I just feel that our understanding of what makes good language design has evolved since then. The heavy OOP focus in Ruby seems very 90s in retrospect. I don't think it makes sense to restrict dispat…

On the language level, Julia isn't statically typed, and it doesn't have ruby syntax.

On a tooling level, binaries are easier to deploy than the whole julia JIT and your whole source code.

And crystal has dynamic multiple dispatch. It's used a lot, it's great.

Re: Crystal 0.25.1 released

#115
post #95

Earlier quoted context omitted.

You can use my alpine docker image to statically compile without any fuss: https://hub.docker.com/r/durosoft/crystal-alpine/ I'll be updating it later today with 0.25.1 support. You can statically compile a local crystal file using a docker one-liner that is included in the description.

That's great! I've only heard complaints that it's difficult to statically compile. Sounds like a solved problem though.

The docker approach is I think a well kept secret but I'm trying to get more people to realize it's a thing. My gcf.cr tool abstracts this away for you if you are deploying to a Google Cloud Function

Re: Crystal 0.25.1 released

#116
post #11

Earlier quoted context omitted.

I've programmed in both and as far as I can tell here's the best use case for each: Go - I want to program explicitly and don't mind a little extra code or syntax to do it. I want close to the best performance possible and a single distributable binary. I don't mind being encouraged to "roll my own" api / web app rather than using a framework. Crystal - I want to feel like I'm writing in Ruby, but with type checking…

> I don't mind being a little less performant than other compiled languages. What other languages? Because the language uses "Fast as C" as part of it's tagline. Is this a false claim?

It really ought to say "fast LIKE c" because none of the core devs actually want crystal to be used for systems programming.

All they want is ruby with static types, that runs fast. Those things will satisfy them alone.

Intelligently written C/C++/D/Zig/Rust will always knock Crystal out of the park. :(

Re: Crystal 0.25.1 released

#117
I've played around with a number of languages and settled on Crystal because:

* Speed

* Pleasant to use type system

* Doesn't get in my way

* Catches lots of bugs

* Fun!

I wrote http://luckyframework.org/ to write web applications with minimal boilerplate and as few runtime errors as possible. Take a look and let me know what you think

Re: Crystal 0.25.1 released

#118
post #99

Earlier quoted context omitted.

> wouldn't write a webapp in Rust https://rocket.rs looks nice ;)

What other people subject themselves to is none of my business :) And there is need for HTTP frameworks in Rust, for example embedded stuff often hosts HTTP servers. However, just like C we frameworks, it's my opinion they're not for the average use case.

Yes, and I can see HTTP frameworks in Rust useful for turning high-performance libraries into web services that can be used by other applications.

Re: Crystal 0.25.1 released

#119
post #100

Earlier quoted context omitted.

Great response. [EDIT - as highlighted by the replies below you can't use Rails with Crystal...my fault for misreading the parent] I didn't quite realize that I could use Rails with Crystal. That would be make it more interesting if I knew how to use Rails ^^

Lucky uses type safety extensively preventing a lot of bugs. My team really enjoys working with it. You should definitely check it out.

https://luckyframework.org

Re: Crystal 0.25.1 released

#120
post #109

Earlier quoted context omitted.

> I don't mind being a little less performant than other compiled languages. What other languages? Because the language uses "Fast as C" as part of it's tagline. Is this a false claim?

That's definitely such an underspecified claim that it's not even wrong. Fast as C under what conditions? I've personally found that a lot of Go's marketing is, if not misleading, outright false. As an example: https://blog.plan99.net/modern-garbage-collection-911ef4f8bd...

If you were to use Go you would know that the GC is indeed pretty fast, on part or faster than Java / C# in many scenarios.
Post reply on HN