Live data from Hacker News

A new year resolution to have Crystal reach the 1.0 milestone in 2017

crystal-lang.org

51–60 of 79 posts

Re: A new year resolution to have Crystal reach the 1.0 milestone in 2017

#51
post #9

Earlier quoted context omitted.

Go is really more of a Java than a C replacement.

This sentiment is actually very interesting to me. I had (/have?) the same kind of sentiment toward Go, but when I spent time playing with it recently I realized just how close to C it actually is. Enough so that when someone says it's a C replacement, I can actually see where they're coming from/somewhat agree with them. And the reason for that is that Go actually seems to follow a lot of C conventions pretty darn c…

Research Oberon and Modula-3, just as two possible examples.

You can go even further back into history of computing and check the Mesa/Cedar workstation at Xerox Parc.

Re: A new year resolution to have Crystal reach the 1.0 milestone in 2017

#52
post #47
post #42

Earlier quoted context omitted.

> But the problem here is not the suitability of languages themselves, the problem is the huge undertaking required to build a gui library which can compete with Qt, gtk etc. Well, the whole Cocoa/QT/WinForms scope might be huge, but we don't even have good minimal UI libs -- e.g. with just the few basic widgets: buttons, text fields, labels, radio buttons, checkboxes, kind of what HTML forms can do -- and only very…

Libui, which was on hn a while ago, looks like the basic minimal cross-platform gui library to me. And that's already got bindings to crystal.. I think most developers are searching for something more.

Yep, something exactly like that, with good documentation, and bindings for multiple languages, can go a very long way for lots of apps.

Re: A new year resolution to have Crystal reach the 1.0 milestone in 2017

#53
post #23
post #4

Earlier quoted context omitted.

There is no need to demonstrate anything. Go is a good enough replacement for C, for user space applications. With some improvements, even for more lower level tasks. As for the flaws, anyone that had the pleasure to work with the Algol and Wirth family of languages is well aware of them.

> As for the flaws, anyone that had the pleasure to work with the Algol and Wirth family of languages is well aware of them. I just don't want to have to deal with a bunch of second guessing judgmental jerks anymore. Nobody in the Crystal community is going to go after me for something "not idiomatic" I published.

Ok, for my purpose I would be far less interest in programing language which has no idioms, no critical feedback, that is basically a mutual admiration society.

Re: A new year resolution to have Crystal reach the 1.0 milestone in 2017

#54
post #15

I think Crystal is a very practical language to work in for web. It doesn't have the polish of Go (yet), but it feels more approachable to me. Rust has its place with low-level systems work, but Crystal gives you something that is reasonable to write and still compiles to a binary. In turn, it performs well and is easy to distribute, deploy, and containerize as well.

If I'm already using, say, OCaml, why would I want to switch to Crystal? (assuming that multicore takes the same amount of time to arrive in each). Whenever I've read about Crystal it sounds like a broadly sensible language, but it doesn't sound like it brings anything new to the table - in which case I'll favour the more mature language with the bigger library/tool ecosystem.

If you write a FOSS project, more people will help you if it's Scala or Crystal over Ocaml. My guess at a little over 1,000 stars for Ocaml but 7,000 for Crystal. There's that. ;)

For psychological reasons, things that build on what's familiar get increased adoption. Trend started with C syntax that I can tell.

Re: A new year resolution to have Crystal reach the 1.0 milestone in 2017

#56
post #9

Earlier quoted context omitted.

Go is really more of a Java than a C replacement.

This sentiment is actually very interesting to me. I had (/have?) the same kind of sentiment toward Go, but when I spent time playing with it recently I realized just how close to C it actually is. Enough so that when someone says it's a C replacement, I can actually see where they're coming from/somewhat agree with them. And the reason for that is that Go actually seems to follow a lot of C conventions pretty darn c…

The language was designed by an expert on Wirth-style languages plus the two inventors of C. They wanted to create minimal, useful language based on old techniques with only features they could all agree on. Pike used Oberon-2 back in the day, knowing its advantages. The C inventors naturally wanted it more like C. The result is a merger of these. The concurrency stuff was an exception that came from Limbo language Pike worked on.

The Wirth languages were categorized by a focus on absolute simplicity and safety with just enough complexity to make building large programs easier. They constantly added or removed features in various language revisions in a search of balance. His main metric was compile time: anything that took too long was kicked out. The result was these languages were easy to learn, compiled fast (100kloc a sec on good machine), rarely crashed, and ran reasonable speed. They had GC's but also allowed manual management. They were objectively better than C language because people could produce correct programs more quickly with same effort put in due to design.

http://www.projectoberon.com/

Modula-3, designed at DEC, was probably the best of that line given it's like a safer, simpler C++ with a subset closer to C. Here it is:

https://en.wikipedia.org/wiki/Modula-3

Used in SPIN operating system that let you live-load code into the kernel for acceleration safely due to type-safe linking on top of memory-safe interfaces. Quite a few commercial deployments. Didn't take off since C was too popular & programmers only went with C-like alternatives. Lots of vulnerabilities and crashes happened.

Another alternative was Delphi, which succeeded for a while. Way more productive and crash-resilient than using VC++. It fell away due to C/C++ popularity but Free Pascal community still maintains a variant of it. Their compiler targets a ton of platforms which was common for Pascal.

http://www.freepascal.org/

Re: A new year resolution to have Crystal reach the 1.0 milestone in 2017

#57
post #8
post #4

Earlier quoted context omitted.

There is no need to demonstrate anything. Go is a good enough replacement for C, for user space applications. With some improvements, even for more lower level tasks. As for the flaws, anyone that had the pleasure to work with the Algol and Wirth family of languages is well aware of them.

>Go is a good enough replacement for C, for user space applications. Are you sure you are not describing Rust?

Go is based on Oberon: a family of simple, safe languages that were used to write OS's. Started with Modula-2 in Lilith project. At one point, the machines ran ETH University. By Oberon, they got a GC but could also do unsafe manipulations for hardware interfaces or performance. Forced you to put it all in modules declared SYSTEM ("unsafe").

The neat thing about the OS was that it and its compiler were simple enough for students to understand that they regularly ported or improved it a few months at a time. It's also one of the most, well-documented OS's in existence.

http://www.projectoberon.com/

That Go is basically a modified Oberon means Go, currently or with some modification, could be used for low-level, systems code up to operating systems. Even with a GC since the Oberon OS's are written in GC language. Most recent, graphical one is A2 Bluebottle if you want to look it up.

Re: A new year resolution to have Crystal reach the 1.0 milestone in 2017

#58
post #18

I think Crystal is a very practical language to work in for web. It doesn't have the polish of Go (yet), but it feels more approachable to me. Rust has its place with low-level systems work, but Crystal gives you something that is reasonable to write and still compiles to a binary. In turn, it performs well and is easy to distribute, deploy, and containerize as well.

I think crystal has several advantages over go, first of which is the type inferrence. In crystal, you never specify types in method bodies. You don't have to specify types in method arguments either. Type unions are really expressive, and handing nil is as easy as `raise/return unless nillable_variable`. Second of which is `yield`, ruby's extremely powerful way of passing code to functions. In crystal, functions whi…

Text templating can't possibly be better than (quasi)quoting.

> you're essentially just writing crystal code

even more so in a quasiquote, since you don't have to worry about adding extraneous parenthesis "just in case" etc.

Having structured input is already way better than full token-level solutions like C, but why not go all the way ?

Re: A new year resolution to have Crystal reach the 1.0 milestone in 2017

#59
post #15

Earlier quoted context omitted.

If I'm already using, say, OCaml, why would I want to switch to Crystal? (assuming that multicore takes the same amount of time to arrive in each). Whenever I've read about Crystal it sounds like a broadly sensible language, but it doesn't sound like it brings anything new to the table - in which case I'll favour the more mature language with the bigger library/tool ecosystem.

> it doesn't sound like it brings anything new to the table A fast and typed Ruby, isn't it enough? ;)

It's not a Ruby. It doesn't even pretend to be a Ruby. I mean, to be a Ruby, this needs to work:

    a = Object.new
    list_of_modules.each { |mod| a.extend(mod) }
Ruby cannot be separated from its dynamism and to claim it can is misleading.

Re: A new year resolution to have Crystal reach the 1.0 milestone in 2017

#60
post #34
post #15

Earlier quoted context omitted.

If I'm already using, say, OCaml, why would I want to switch to Crystal? (assuming that multicore takes the same amount of time to arrive in each). Whenever I've read about Crystal it sounds like a broadly sensible language, but it doesn't sound like it brings anything new to the table - in which case I'll favour the more mature language with the bigger library/tool ecosystem.

Ruby itself never brought anything new to the table, just a really well polished collection of ideas taken from other languages. Crystal is mostly the same, marrying Ruby stdlib with go channels and compilation to native code.

Thanks for the summary; helpful as I've not checked out Crystal at all yet. Maybe they can steal it as their everywhere blurb.
Post reply on HN