13 ms·
A new year resolution to have Crystal reach the 1.0 milestone in 2017
- camus2 10y agoWell I hope you succeed. Competition is good and in the "Go" space, there's need to be more competition to demonstrate the technical flaws of Go, or just give an option for those who want to quit an obnoxious and patronizing community. You should really be set on the type system and concurrency by now.
- pjmlp 10y agoThere 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.
- mapcars 10y ago>Go is a good enough replacement for C, for user space applications. Are you sure you are not describing Rust?
- pjmlp 10y agoNo, please research Oberon and read the Project Oberon book.
- nickpsecurity 10y agoGo 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/ 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.
- groovy2shoes 10y agoSince when is Go "based on Oberon"? Pike himself claims that it was "based on C", with obvious influence from his own work on Squeak and Newsqueak.
- nickpsecurity 10y agoThe last history people here gave me had him describing the joy of programming in the safe, fast Oberon-2. And wanting to re-create that with the new language. Resulting language is very Wirth-like in style, esp simplicity, compile speed focus, and safety. Modified with C syntax, concurrency from Limbo, and I dont recall what else. Clearly way closer to Oberon-2 or Modula's than to BCPL like C copied/extended.
- pjmlp 10y agoThe method definition syntax, package model and unsafe package are taken from Oberon-2. You missed that Robert Griesemer is also part of the Go team.
- groovy2shoes 10y agoI didn't miss that at all. According to Pike, it was actually Griesemer's idea to start with C.
- pjmlp 10y agoWasn't aware of it. In any case, my view is a bit different, I see Go as a mix of an AOT version of Limbo mixed with bits of Oberon-2.
- groovy2shoes 10y agoI definitely "feel" the Limbo influence, but I've not worked with Oberon-2 (only the original Oberon, and only a bit), so I didn't pick up on it. I do "feel" the C influence as well, though.
- the_duke 10y agoGo is really more of a Java than a C replacement.
- FreezerburnV 10y agoThis 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 closely, and not provide as high level of an interface as Java does. You're much more likely to work in raw "arrays" (aka: slices) in Go than you are in Java, it doesn't have generics, "classes" are structs that are defined very similarly to structs in C, error codes as return values, etc. The main differences that are adding to C as far as I'm currently aware are interfaces, the ability to add a "method" to a type (which is effectively the same as calling a function with a type as the first argument, except in the case of interfaces), and the garbage collector. All of which, to me, feel like a kind of evolution on C. A different path instead of C++ in a way. While people would argue that having a GC ruins what C is good at, it can also be viewed as a version of C that's much more memory safe, while still allowing you to dip into very low level if you need to. ...there's probably some other stuff I could say, and probably more coherently, but it's early (for me) and I kind of just wanted to get that thought out there. I hope it's at least a bit thought-provoking, or something. If not, well, my apologies for rambling at you ;)
- geodel 10y agoMaybe it makes sense. It is replacement of Java because convenient GC, decent runtime and networking/http/ssl/xml/json libs comes standard. This is where is Java is mostly used as backend server side stuff. It is replacement of C as in low memory usage, decent level of control over memory layout, no overengineered abstractions, no classes, no generics, no exceptions, fewer concepts to grasp etc. It does not need VMs and generates executables to directly run on machines.
- pjmlp 10y ago
- camus2 10y ago> 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.
- pjmlp 10y agoGo is not on my top 10 languages that I would use, but still I see some value on it being used. What I meant with that remark was that those languages already had fast toolchains and were more expressive. So in this regard I also appreciate Crystal, specially since RubyMotion decided to focus on mobile.
- geodel 10y agoOk, 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.
- ksec 10y agoLooking forward to 1.0, and cant wait to see an implementation of Ruby in Crystal, going full circle. It will still be CRuby, but the "C" is Crystal.
- singularity2001 10y agoAs stated elsewhere Crystal could become a big success if either * they compile to WebAssembly * they become official 'native ruby' (similar to cython) * they reduce compliation time to under half a minute (to become a template for other languages)
- RX14 10y agoCompiling to web assembly should actually be quite easy, given llvm's support. The hard part will be porting the standard library to the environment wasm provides. We're already well past the point where we could become "native ruby" and I'm glad of that. Ruby has quite a few warts, and I'm glad most of them haven't been copied by crystal. Compilation times are already well under a minute for the whole of the crystal compiler itself. It was actually improved quite a bit on Linux in the latest crystal release.
- alehander42 10y agoWindows support is very important for all kinds of apps and libraries
- galfarragem 10y agoI didn't 'play' yet with Crystal exactly for that reason: lack of Windows support. edit: Windows 7
- RX14 10y agoIf you just want to play with it, and have windows 10, it runs fine in the Linux emulator thingy.
- devmunchies 10y agoor use docker for windows
- throwaway7645 10y agoHaving a hacky workaround isn't the same thing as first class support. Bash on Windows 10 is in my mind similar to resorting to Cygwin. No thanks. I despise Windows, but if you have an overbearing IT dept, that's your only option. Edit* Just saw where you said "play"
- andyfleming 10y agoCheck out the docs, online "playground", and/or test it on a linux VM or droplet!
- andyfleming 10y agoI 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.
- dingdingdang 10y agoI agree with this sentiment, Crystal, for the better, lacks Go's obsession with odd tooling conventions (see vendoring saga) while retaining the ease of use when it comes to actual programming and cross compilation capability.
- lmm 10y agoIf 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.
- galfarragem 10y ago> it doesn't sound like it brings anything new to the table A fast and typed Ruby, isn't it enough? ;)
- lmm 10y agoOCaml (well, actually Scala in my case, but I can understand why people wouldn't want to have to use the JVM) is already that, as far as I can see. What is it that Crystal offers that OCaml doesn't?
- galfarragem 10y agoA gentle learning curve for developers with a Ruby background.
- greyman 10y agoCan it be used (in the future) to implement cross-platform desktop apps?
- RX14 10y agoOnce it has windows support, it would be very possible to build something like ruby's shoes in crystal. In fact we already have libui bindings.
- coldtea 10y agoNot any more than several other languages, because as usual, the show stopper is the lack of decent cross-platform desktop GUI libraries. There's QT, which is huge and unwieldily and not so good looking on OS X, GTK+ which is a mess on both Windows and OS X, wxWidgets (based on other libs), and a few fringe, and incomplete libs. For one-platform apps, though, or a single backend for multiple platform UI frontends, it will do just fine, provided we get bindings for Cocoa, Windows UI libs, GTK etc.
- RX14 10y agoBut 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. Crystal at the very least has good support for binding C so maybe this will be the language which finally produces a modern gui toolkit, but with the move towards web apps its becoming increasingly unlikely.
- gravypod 10y agoIt's a huge undertaking because it's an undefined specification. No one really knows what a cross-platform UI library should look like. How do you follow all of the native app standards automatically? How do you handle updates and distrabution?
- coldtea 10y ago>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 limited functionality (e.g. no fancy text formatting in the labels or whatever). Tons of programs could be GUI-fied with just the above (sort of what Tk does, but decent looking).
- gravypod 10y agoThis was very good but... "reach a point where breaking changes to the core of the language are down to a minimum" I'm very afraid of the word minimum in this context. This is why "no one was ever fired for picking Java".
- RX14 10y agoI think that's a mistake in the article, we will follow semver after 1.0.0, and we definitely don't want a 2.0.0 less than two years after 1.0.0. I'm sure crystal will provide the same stability guarantees as go and rust.
- gravypod 10y agoMy main concerns are development time and tooling. Crystal looks great and offers some great features that no other native-compiled languages really offer at this time (which is amazing) but I am the kind of person that needs first-class IDE support to take a look. I think crystal would be the perfect platform for some great software development. Aside from tooling I need a guarantee that my code, if following all of the best practices, should be compilable from now till the foreseeable future.
- spalladino2 10y agoThe idea is to avoid falling into a Python 2 vs 3 situation, by being very careful in how we break compatibility when moving to the next major.
- nailer 10y agoHow does Crystal handle concurrency?
- tyingq 10y agohttps://crystal-lang.org/docs/guides/concurrency.html https://crystal-lang.org/docs/guides/concurrency.html
- Svenskunganka 10y agoLike Golang, using fibers & communicating via channels. I/O is also asynchronous similar to Node (using an event loop). You can read more here: https://crystal-lang.org/docs/guides/concurrency.html https://crystal-lang.org/docs/guides/concurrency.html
- preordained 10y agoWow. I like this. I already like Ruby, so I'm happy to see a language taking after and improving, adding more. This as opposed to "here's a bunch of new synataxes and conventions to keep straight!"