<jnoah>
hello all. why crystal? Does it solve something that's difficult in all other languages? Or is it just a fun project? [not an attack, just curious]
b_lumenkraft has joined #crystal-lang
<asterite>
Hi jnoah :)
<asterite>
I think the difficult part is having efficient global type inference
<asterite>
We really like Ruby’s syntax: it’s very clear and without lots of noise
<asterite>
I think someone in the reddit thread said that it’s the combination of features that is nice, not any individual feature… and I think I agree
<asterite>
Besides, it is a fun project! And we learned a lot in the way. But in reality it started as a proof of concept… but now we can’t stop, it turned to be really nice to program in it, plus it’s efficient
<jhass>
I also see a lot of value in a statically typed compiled language that the average ruby dev can pick up in no time
<jnoah>
awesome, good to know :)
bcardiff has quit [Quit: Leaving.]
<asterite>
In Ruby it’s also hard to refactor if you don’t have tests, but here the compiler will point out the mistakes… and it’s really easy to refactor because there are so few type annotations, you have very little things to change
<jnoah>
btw, HN brought me here
<asterite>
Yes, something happened that a lot of people are talking about Crystal right now
<asterite>
it happens from time to time :)
<jnoah>
it's on the front page.
<jnoah>
ah
<asterite>
(well, actually, it only happened once before)
<asterite>
jnoah: what are your thoughts about the language? In which languages you program? (or you like)
<jnoah>
It's an interesting idea. I use python and javascript. I've touched on a bit of Ruby, Rust, and Haskell
jwang1 has joined #crystal-lang
<jnoah>
is llvm 3.5 required? Ubuntu 14.04 only has 3.4 currently
<asterite>
jnoah it’s required if you want to compile the compiler
<jnoah>
i installed that one, then tried to build master and it failed
<asterite>
You’d need to install llvm 3.5 somehow… but to try out the language you won’t need it
<asterite>
Sorry, I said something wrong. The crystal executable has llvm statically linked, that’s why it works. But to compile a new compiler you’d need llvm on your system
<jnoah>
i now have llvm/clang 3.5, attempting another build
<asterite>
Oh, those are the required libs, not the ones it already has
<asterite>
so you’ll need to install libedit-dev
<jnoah>
oic
<jhass>
mmh, doesn't -dev only contain the .h files?
<jnoah>
jhass: basically, yeah
<jhass>
so shouldn't be necessary to link
waj has quit [Quit: Leaving.]
<jnoah>
it cantains other things as well
<jnoah>
other build dependencies for the lib
<jnoah>
asterite: that did it
<jnoah>
i just built crystal
<asterite>
Yay! :)
<asterite>
How long did it take?
<jnoah>
ballpark guess....15-30sec
<asterite>
Ok
<jnoah>
cleaned and ran `time make`: results - make 12.21s user 28.81s system 144% cpu 28.466 total
<asterite>
We still need to improve those times :)
waj has joined #crystal-lang
<jnoah>
is 'crystal' the only executable? can i now uninstall crystal and symlink .build/crystal as /usr/bin/crystal?
<asterite>
I think so
<jnoah>
cool, it works
<asterite>
:D
<jnoah>
ohgeez. what do i need for ld to not complain about -lgc?
<jnoah>
/usr/bin/ld: cannot find -lgc
<asterite>
You’d need to install libgc… but you need version 7.4 but it’s not in ubuntu yet
<waj>
Instead of replacing /usr/bin/crystal you might want to replace /opt/crystal/embedded/bin/crystal
<waj>
Anyway… why do you want to replace the binary?
<asterite>
Also, when you invoke `make` it saves the compiler in `.build/crystal`. Now if you do `bin/crystal` it will use that new compiler… in case you want to try the new compiler but be able to go back to the current one (`make clean`)
<waj>
If you're planning to make some coding in the Crystal compiler, it should work executing the generated compiler with a relative path
<jnoah>
oic, that's a good idea
<waj>
mm… actually it doesn't work unless you have the libraries installed
<waj>
the thing is Crystal have some required libraries that aren't released in every linux distribution
<waj>
that's why the package includes some private libs
<waj>
by default installed in /opt/embedded/lib
<waj>
I mean /opt/crystal/embedded/lib
<waj>
so… the generated compiler should start working if you:
<asterite>
jhass is the author of that, it’s the most fun sample so far :)
<jhass>
:P
waj has quit [Quit: Leaving.]
waj has joined #crystal-lang
e_dub has joined #crystal-lang
<jnoah>
how do 3rd party libraries work with crystal right now?
<jnoah>
will there be something like virtualenv from python?
<asterite>
We recently started a dependency manager, but it’s very basic right now and it’s not documented
<jnoah>
where does/will crystal look for dependencies?
<asterite>
Right now only in github
<jnoah>
so if you want to write a lib, write it directly in the tree?
<jhass>
you can set CRYSTAL_PATH include new directories into the search path
<asterite>
You can write a lib outside the tree. The compiler has embedded the standard library path plus “src:libs” in the current directory. So you can develop in another directory and compile from there
dTS is now known as dts
<jnoah>
is it still the case that only single line comments are supported?