e_dub has joined #crystal-lang
rpag has quit [Ping timeout: 264 seconds]
e_dub has quit [Read error: Connection reset by peer]
e_dub has joined #crystal-lang
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
rpag has joined #crystal-lang
dts|airhocky is now known as dts
dts has quit [Ping timeout: 244 seconds]
asterite has joined #crystal-lang
waj has joined #crystal-lang
bcardiff has joined #crystal-lang
e_dub has quit [Quit: ZZZzzz…]
asterite has quit [Ping timeout: 272 seconds]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1663 (master - 1e7c539 : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
asterite has joined #crystal-lang
e_dub has joined #crystal-lang
asterite has quit [Quit: asterite]
jc00ke has joined #crystal-lang
asterite has joined #crystal-lang
waj has quit [Quit: Leaving.]
waj has joined #crystal-lang
dts has joined #crystal-lang
e_dub has quit [Quit: ZZZzzz…]
bcardiff has quit [Quit: Leaving.]
bcardiff has joined #crystal-lang
dts is now known as dTS
e_dub has joined #crystal-lang
jnoah has joined #crystal-lang
<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
<asterite> otherwise if you install crystal from apt ( http://crystal-lang.org/docs/installation/on_debian_and_ubuntu.html ) it will include a precompiled llvm (because it’s lacking in ubuntu… once it’s there we will probably remove it)
<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
<jnoah> got llvm 3.5 through http://llvm.org/apt/
<jnoah> "/usr/bin/ld: cannot find -ledit"
<asterite> Now you need libedit . You can check llvm’s dependencies with this: `llvm-config --system-libs`
<jnoah> what other dependencies are there?
<jnoah> oh, i have it. ugh. turns out the llvm 3.5 repo doesn't symlink the tools and all of them end in -3.5
<jnoah> so, clang-3.5, llvm-config-3.5, etc
<asterite> Ah, yes… we don’t like that either :)
<jnoah> oh well. i won't build crystal for now.
<asterite> what’s missing? You might be really close
b_lumenkraft has quit [Quit: b_lumenkraft]
<jnoah> i'm not sure which tools of the -3.5 I need to symlink without the version
<jnoah> symlinking all would take forever
<asterite> I think just llvm-config-3.5
<jnoah> ld is still complaining about -ledit and according to llvm-config, it is there
<jnoah> i did symlink llvm-config already - same error
<asterite> was it libedit-dev?
<asterite> I forgot about the -dev...
<jnoah> i don't need it. llvm-config said I already have it
<asterite> how does llvm-config says that?
<jnoah> i don't need to get it*
<jnoah> $ llvm-config --system-libs
<jnoah> -lz -lpthread -lffi -ledit -ltinfo -ldl -lm
<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:
<waj> export LIBRARY_PATH=/opt/crystal/embedded/lib
e_dub has quit [Quit: ZZZzzz…]
<jnoah> done. success. got it all working now
<jnoah> needed to add https://launchpad.net/~manastech/+archive/ubuntu/crystal and install libunwind
<jnoah> i just got 'hello world' to work :)
<asterite> Nice
<jnoah> crystal hello.cr 0.17s user 0.10s system 110% cpu 0.251 total
<jnoah> puts "hello world!"
<jnoah> haha, yes! a 2048 example
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1664 (master - 5534d36 : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
<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?
<jhass> just # for comments, yes
asterite has quit [Quit: asterite]
waj has quit [Quit: Leaving.]
bcardiff has joined #crystal-lang
e_dub has quit [Quit: ZZZzzz…]
bcardiff has left #crystal-lang [#crystal-lang]
asterite has joined #crystal-lang
asterite has quit [Ping timeout: 264 seconds]
e_dub has joined #crystal-lang