Earlier quoted context omitted.
I'm curious how possible it is in practice to write large software that relies exclusively on global type inference. Does the compiler itself go without ever explicitly specifying a type?
GHC does global type inference, and has very sophisticated types.
The Crystal Programming Language
81–90 of 180 posts
Re: The Crystal Programming Language
#82I'm looking for something beautiful like Ruby but fast like Go. Do you think Crystal fits this bill? Also, are there packages/libs/gems for Crystal? What are they called? What do I google for? One of the major reasons why I dumped Go is that it's just too verbose and makes me write too much boilerplate code. I want to sort a collection and I have to write the same algorithm every single time for every single type. It…
It should be easy to beat Go in performance and match or exceed Ruby in elegance and simplicity.
It's Achilles heel(s) right now though are multi-threading and JIT compilation times (which should be alleviated once caching is implemented).
It sounds really close to what you want. Its package management is even based off of github. Want to get a package to write out image files? Pkg.add("Image"). Update all your libraries? Pkg.update()
Over the next 5 years I think it might eat into a lot of the territory of scripting languages.
Also the generic programming focus means you should never have to write anything more than a new comparison for your new types.
Re: The Crystal Programming Language
#83http://programmingisterrible.com/post/42432568185/how-to-par...
Re: The Crystal Programming Language
#84I don't understand why Ruby's syntax is seen as so elegant. It's ambiguous and a nightmare to parse. http://programmingisterrible.com/post/42432568185/how-to-par...
Re: The Crystal Programming Language
#85I've been looking at the benchmarks https://github.com/kostya/benchmarks and am pleasantly surprised about the speed. It definitely smokes Ruby, but also is usually faster than Go. I know that all benchmarks are relative but Crystal seems a great language from a performance viewpoint.
Indeed it's becoming quite promising (using crystal already for few pet scripts which were too slow even for rubinius). Where it's most lacking at the moment is gc - it uses stop-world off the shelf boehmgc which is ok but not exactly great for memory heavy tasks.
You basically need 3 types of memory: First for the objects in your language, 2nd for foreign light weight objects, where you only know a pointer, and 3rd for foreign heavy weight objects, that gets their memory from your GC.
> it uses stop-world
A fully concurrent GC is impossible, if variables are mutable. Regardless how tricky your GC delays the problem, there will come a point, where it has to stop all threads to collect the edge cases. This creates the GC dilemma, because currently only number of cores and amount of memory becomes cheaper, while single core performance stayed same for nearly 15 years.
Re: The Crystal Programming Language
#86I don't understand why Ruby's syntax is seen as so elegant. It's ambiguous and a nightmare to parse. http://programmingisterrible.com/post/42432568185/how-to-par...
Elegant to program with. Not write a parser for.
Re: The Crystal Programming Language
#87Earlier quoted context omitted.
Elegant to program with. Not write a parser for.
An ambiguous syntax is not elegant to program with. Is this a variable reference? Is it a method call? I dunno!
Re: The Crystal Programming Language
#88Earlier quoted context omitted.
We like the way Ruby lets you quickly prototype things, but its performance isn't very good (it's just good) and it also lacks static type checks (for example "undefined method '...' for Nil" is a very common runtime error). So, we are trying to create a language with all the nice aspects of Ruby but with static checks and better performance. Of course that comes at a price: no dynamic aspects (no eval, no instance_e…
People talk about how Crystal's performance is better because it's statically compiled and removes Ruby's dynamic features, but I'm not sure static compilation is the best way to achieve performance, and I don't think the dynamic features need to damage performance. For example, JRuby+Truffle runs Crystal's own sample programs around twice as fast as Crystal does, without static compilation, and while still supportin…
Re: The Crystal Programming Language
#89I'm looking for something beautiful like Ruby but fast like Go. Do you think Crystal fits this bill? Also, are there packages/libs/gems for Crystal? What are they called? What do I google for? One of the major reasons why I dumped Go is that it's just too verbose and makes me write too much boilerplate code. I want to sort a collection and I have to write the same algorithm every single time for every single type. It…
Re: The Crystal Programming Language
#90Earlier quoted context omitted.
GHC does global type inference, and has very sophisticated types.
...and is a slow compiler compared to for example Go :-(