
Crystal 0.27.0 released - ksec
https://crystal-lang.org/2018/11/01/crystal-0.27.0-released.html
======
sam0x17
Major props to the Crystal team for this release and for addressing our
concerns about running in Google Cloud Functions. This has enabled gcf.cr
([https://github.com/sam0x17/gcf.cr](https://github.com/sam0x17/gcf.cr)) to
work more consistently and has paved the way for doing crystal compilation in
a cloud function, which until now has been impossible.

FYI for the curious, running crystal in a google cloud function is now as
simple as:
[https://gist.github.com/sam0x17/5b26ffa0ae663f3137fdf6c98256...](https://gist.github.com/sam0x17/5b26ffa0ae663f3137fdf6c982567993)

------
simpsond
I recently ported a fairly simple ruby project to crystal, and am happy with
the result. I'm now writing another smallish project in crystal, and finding
it quite productive. I like the syntax and language features of ruby, but I
prefer static typing... so it's a nice addition. I'm glad to see crystal has
momentum.

~~~
lbotos
Did a quick search but I wasn't able to find anything on the site:

\- Goals of Crystal over say Ruby? Speed? Safety?

\- What drew you to try it?

~~~
bhaak
On [https://crystal-lang.org/](https://crystal-lang.org/) "Fast as C, slick as
Ruby".

There's a list on [https://crystal-lang.org/docs/](https://crystal-
lang.org/docs/) that is less tongue in cheek.

~~~
aerovistae
Is it actually as fast as C? That seems like quite a claim.

~~~
petre
My Crystal test code with primes managed to run 4x faster than the D version
and 1.15x faster then the Go version when built with the --release switch, but
when I ran it up to 100k it filled up all my 8GB of memory and started
swapping. The D and Go versions run fine up to 100k without any issues and
without filling up the memory. Running it up to 100k probably also causes
integer overflow and I couldn't make the range iterations work with uint64 as
I'm not quite familiar with the language.

Crystal [https://p.thorsen.pm/f4b376d71d1a](https://p.thorsen.pm/f4b376d71d1a)

Dlang [https://p.thorsen.pm/f5f7d6b09480](https://p.thorsen.pm/f5f7d6b09480)

Golang [https://p.thorsen.pm/369b79e836a8](https://p.thorsen.pm/369b79e836a8)

~~~
sam0x17
You should definitely consider using Set(Int32) instead of Hash(Int32, Bool).
Not sure why it is using so much RAM but I strongly encourage you to submit
this as an issue on the crystal lang github.

~~~
petre
The problem is that not all the languages tested have a Set type. This is why
all the implementations use a Hash or map or associative array type, which are
roughly the same thing. Othwerwise we are comparing apples with oranges. I
also refuse to use anything which is not included in the standard library. The
program does really basic stuff, so all of its building blocks should be in
the core language. This is why the Rust implementation is slower than D or Go
- because it uses HashMap which is slower than D's associative arrays or Go's
maps.

------
nik736
Looking forward to Windows support and parallelism. After that a stable v1.0
and I am more than happy to use Crystal for my productive projects.

Great work so far, thanks! Absolutely in love with the language.

~~~
Doctor_Fegg
Absolutely. My favourite bit of these release notes:

> Next releases should enable some stories around parallelism

------
IshKebab
> &+, &-, & __. They will perform additions, subtraction and multiplication
> with wrapping

It's definitely good that languages are adding this but it's a shame they
didn't go for %+, %- and % __. Some other language (I forget which) uses those
and they are a lot more obvious in my opinion (because % means modulo pretty
much everywhere and it is essentially a modulo operation).

~~~
cytzol
I haven’t used Crystal, but wouldn’t that cause some parsing ambiguities? `a
%- b` would clash with `a % -b`.

~~~
woodruffw
I've only done some minor patches to Crystal, but I don't think so -- after
all, `a & -b` is a perfectly legal operation as well.

------
devmunchies
Awesome to see #dig merged in. I did the original PR 2 years ago but didn’t
follow through. Glad someone else picked it up. This makes unmapped JSON much
more sane.

------
nerdponx
_From now on, if the arguments of a method call are to be splitted across
multiple lines, the comma must be at the end of the line, before the line
break._

Out of curiosity, what's the purpose of this change? Style enforcement?
Simpler parser?

~~~
RX14
Simpler code. This style of code was accepted by the parser but not the
automated code formatter. We decided it was easier to disallow it, as the
style was uncommon (especially so as ruby doesn't accept that style either,
and a lot of crystal's style guidelines are based off ruby's)

------
svnpenn
Windows support is... not good.

[http://github.com/crystal-lang/crystal/issues/26](http://github.com/crystal-
lang/crystal/issues/26)

~~~
proyb2
There is on-going checklists to implement the remaining tasks:

[https://github.com/crystal-
lang/crystal/issues/5430](https://github.com/crystal-lang/crystal/issues/5430)

------
jamescrypto
Crystal has both speed and expressiveness because it doesn't need ridiculous
parentheses, curly brackets, semicolons, lots of line of code like you get in
most languages.

I favour writing as productive and testing spec as I can and minimal the code
smell and don't need colours highlighting in my code.

Beside, having the ability to write pure or system calls in C within Crystal
is a big wins.

------
NetOpWibby
I've always found Crystal interesting whenever I came across it and finally
installed it and got a simple local server running.

Are there any notable applications written in Crystal, for reference?

------
canhascodez
I appreciate having the pull requests linked. I did read through a couple of
the discussions on those.

------
askaboutit
Just choose elixir, golang or C# with .net. Crystal has been “almost ready”
since 2016.

~~~
carlivar
Where does your "almost ready" quote come from?

------
singularity2001
It will be my language of choice once they compile to wasm

------
jpittis
The Haskell style comma before the next element is soooo nice for adding and
removing elements over time. I wish more languages used that style.

~~~
floatboth
It works best with Haskell-style indentation though. With more "conventional"
syntax based languages, it's best to just always have a comma at the end

