ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.5 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dostoyevsky has quit [Ping timeout: 245 seconds]
dostoyevsky has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
vjdhama has joined #crystal-lang
vjdhama has left #crystal-lang [#crystal-lang]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
_whitelogger has joined #crystal-lang
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vD5To
<crystal-gh> crystal/master 8926897 Ary Borenszweig: LLVM: make Context keep a reference to its builders, and make an DIBuilder keep a reference to its module.
pawnbox has quit [Ping timeout: 255 seconds]
<travis-ci> crystal-lang/crystal#8926897 (master - LLVM: make Context keep a reference to its builders, and make an DIBuilder keep a reference to its module.): The build was fixed. https://travis-ci.org/crystal-lang/crystal/builds/203073874
squeaky_pl has joined #crystal-lang
_whitelogger has joined #crystal-lang
squeaky_pl has quit [Ping timeout: 255 seconds]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 268 seconds]
akwiatkowski has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 255 seconds]
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 260 seconds]
Dreamer3 has quit [Ping timeout: 240 seconds]
Dreamer3 has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 260 seconds]
Dreamer3 has quit [Ping timeout: 255 seconds]
IRCFrEAK has joined #crystal-lang
IRCFrEAK has left #crystal-lang [#crystal-lang]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 268 seconds]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bmcginty_ has quit [Remote host closed the connection]
bmcginty has joined #crystal-lang
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sz0 has joined #crystal-lang
bjz has joined #crystal-lang
Qchmqs has joined #crystal-lang
Dreamer3 has joined #crystal-lang
Dreamer3 has quit [Ping timeout: 268 seconds]
unshadow has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 255 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 260 seconds]
Raimondii is now known as Raimondi
pawnbox has joined #crystal-lang
Dreamer3 has joined #crystal-lang
akwiatkowski has joined #crystal-lang
Dreamer3 has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
squeaky_pl has joined #crystal-lang
squeaky_pl has quit [Read error: Connection reset by peer]
squeaky_pl has joined #crystal-lang
snsei has quit [Read error: Connection reset by peer]
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
akwiatkowski has quit [Ping timeout: 260 seconds]
bjz has joined #crystal-lang
Svenskunganka has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snsei has joined #crystal-lang
akwiatkowski has joined #crystal-lang
<jokke> hi
<jokke> i'm having some trouble with travis
<jokke> i need to use the trusty image
<jokke> but crystal fails to link
<jokke> /usr/bin/ld: /opt/crystal/embedded/lib/../lib/libgc.a(os_dep.o): undefined reference to symbol '_end'
Svenskunganka has quit [Quit: leaving]
schoening has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
unshadow has quit [Quit: leaving]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<schoening> Whohoo! Just installed Crystal. Can't wait to play around with it :D
<FromGitter> <sdogruyol> @schoening welcome!
<schoening> @sdogruyol Thanks :)
Qchmqs has quit [Ping timeout: 240 seconds]
<schoening> Hm.. I am trying to run the http server example on ubuntu but I get following error :o https://hastebin.com/ipivixozek.txt Can anyone help?
<RX14> schoening, you need to install openssl-dev package
<RX14> and it seems zlib-dev? I forget the package names
<RX14> let me look them up
<RX14> ok
<RX14> apt-get install libssl-dev
<RX14> should do it
<schoening> Thanks! Yeah it was the libssl-dev one. Was confused because I seem to have some libssl packages
<RX14> yeah debian does some weird stuff so that you can't link without the -dev package
<schoening> Ahh okay
<Papierkorb> yeah debian-esque systems (at least) choose to save a dozen KiB and not install development data and such
<schoening> Ohh this is Awesome :D I want to try to port some hobby Node.js stuff over to Crystal ^^
<Papierkorb> Check out Kemal, which is the right now most popular crystal web framework
<schoening> Yeah! I installed it already :p
<schoening> I have a little game using websockets and I was thinking of porting it over. I have no experience in Ruby tho so this is my first venture into whitespace land, besides Stylus and Jade
<FromGitter> <Rinkana> Is there a way that i can invoke callbacks for methods without defining them in said method? Something like this: https://play.crystal-lang.org/#/r/1nhn but i don't want to clutter Bar#method with the callback calls
<Papierkorb> No, someone has to call those methods. Either you from the outside, or using a helper method inside the class itself
<schoening> So I looked at the examples of the kemal web server and it does say that it can server static files, but it doesnt say how, just that it does out of the box.
<schoening> Is it just assumed I know Ruby, Sinatra and Rails etc if I want to try Crystal? o_o
<Papierkorb> schoening: It is not, but many Crystal users are Rubyists, so many things that are assumed to be obvious are actually not at all obvious. To your problem, http://kemalcr.com/docs/static_files/
<schoening> @Papierkorb: I did see that page, but I still don't know how my server code should look. I made a public folder, put an index.html inside it, but what do I put between the: get "/" do ... on my server?
<Papierkorb> schoening: Based on the description on the page, you don't need to put anything code-wise. it'll just work.
<schoening> I tried and got a "404" style page. That said "Kemal doesn't know this way" which sounds like a missing route to me, and that makes sense
<schoening> I guess I ask on SO or on their github instead of spamming here
<RX14> did you go to /index.html or /
<Papierkorb> schoening: You can just ask @sdogruyol here if he's around
<schoening> Papierkorb: Ok, cool, thx :) RX14: "/" I give /index.html a go
<schoening> Well, actually, it doesnt make a difference I guess, since I don't know what to put inside the block
<schoening> Oh
<schoening> Apparently it does make difference
<schoening> Well, that's good enough for now. Thanks RX14
<RX14> yeah it won't serve index.html on /
<schoening> Omgggg this is amazing! "spawn" is gonna be my setTimeout I guess.
<schoening> I just used "puts" on a HTTP::Websocket that disconnected and it wrote: #<HTTP::WebSocket:0xd51700> is that last bit a memory address, or an uid maybe?
<Papierkorb> schoening: It's the memory address, but that doesn't really matter, it's only used to e.g. differentiate between instances
<schoening> Papierkorb: Thanks mate.
<schoening> There isn't a way to "look into" objects is there? I need to look at the class file instead?
<Papierkorb> The default #inspect method does it, you can also use the `pp` macro to dump an object for "visual consumption"
<schoening> Thank you. I am trying to read the docs as fast as I can, I get over excited and ask stuff hehe
<Papierkorb> Don't worry, it's fine, this channel is here to help
<schoening> Hurray!
<schoening> My first Crystal Program :D
<schoening> That was fun. And the syntax is beautiful. I am totally gonna port my node.js stuff over ^^
schoening has quit [Quit: Page closed]
poulet_a has joined #crystal-lang
poulet_a has left #crystal-lang [#crystal-lang]
squeaky_pl has quit [Ping timeout: 240 seconds]
mhib has joined #crystal-lang
schoening has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<schoening> How would I go about creating a multidimensional array in Crystal? I need a grid that I can iterate
<RX14> schoening, just Array(Array(Foo)).new
<schoening> RX14: Thank you!
mhib has quit [Quit: Leaving]
<jokke> any help with my travis issue?
bjz has joined #crystal-lang
<schoening> items.each do |item, i| does not work. Isn't there a way to pass the iterator?
<RX14> schoening, ?
<RX14> do you mean each_with_index?
<RX14> items.each_with_index do |item, i|
<schoening> RX14: I guess I do, sorry about that, I was already looking through the api
<schoening> Thanks :)
<RX14> np
<schoening> Is it normal to get "undefined method" when trying to access a property? Is Crystal THAT oop that I can't access variables without a getter? :o
<schoening> @greeting = "Hi" But I can't access it directly from the outside
<BlaXpirit> schoening, well yes, all instance variables are private
<BlaXpirit> but then you write `property greeting` and it's as if it becomes public
<BlaXpirit> of course the only thing that's public in reality is methods
<schoening> I didn't understand that middle part. Probably coz im not a native english speaker. You mean I just "overload" (Is that the correct definition?) and make a method that has the same name as the variable and returns it? Coz thats what I am doing now hehe
<schoening> Just a new concept for me ^^, used to just accessing stuff
squeaky_pl has joined #crystal-lang
<BlaXpirit> schoening, yes, that is correct
<BlaXpirit> "make a method that has the same name as the variable and returns it" -> the shorthand for it is `getter some_name`
<schoening> Ok! Just wanted to make sure that there isnt an actual keyword named getter in the language :p
<schoening> Or maybe there is and I have not seen it yet
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BlaXpirit> and then you make a method that can change the value of the variable `def some_name=(value) ; @some_name = value; end` -> the shorthand for it is `setter some_name`
<BlaXpirit> and `property some_name` is adding both getter and setter at once
<BlaXpirit> these are core features of the language but they're not reserved words, just macros, which you'll hopefully learn about later
<schoening> Thanks for the info! Yeah I think I will. I think I am here to stay hehe
<Papierkorb> schoening: Considering the oe in your name, is German your mother tongue?
<schoening> Yeah :) but I have lived more than half my life in Denmark now and it is noticeable hehe
<FromGitter> <Rinkana> Oh god i love the german autobahn
<schoening> You are clearly german haha!
<Papierkorb> You mean you like traffic jams?
<FromGitter> <Rinkana> Well no
<FromGitter> <Rinkana> I just came from it :P
<FromGitter> <Rinkana> Dusseldorf <-> Arnhem. In just over 1h
<FromGitter> <Rinkana> If i go to work it takes me as much time and that is like half the KM
NIk-- has joined #crystal-lang
schoening has quit [Quit: Page closed]
<NIk--> Hi guys, simple DB query: db.query("select name from videos where uuid = ?", "dbd4b98f-0c1d-46a4-8795-b6d3ae777e71") do |rs| ––––– which is not showing anything and throwing ERROR: syntax error at end of input even though it should display something. What could be wrong? I think it's something stupid simple an I am overlooking something...
<RX14> NIk--, postgres? you need to use the postgres query param syntax
<RX14> which is $1 instead of ?
<RX14> the DB decides that syntax, instead of the DB library which is a bit confusing...
<NIk--> woops, yes that was it
<NIk--> thanks!!
<NIk--> ye, indeed a bit confusing
<RX14> it's mentioned in the crystal book, but I think it deserves a "gotchas" section in the readme
dhk has joined #crystal-lang
dhk has quit [Quit: Leaving]
squeaky_pl has quit [Ping timeout: 260 seconds]
squeaky_pl has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
msg has joined #crystal-lang
msg is now known as Guest67704
Guest67704 has quit [Ping timeout: 240 seconds]
NIk-- has quit [Quit: Textual IRC Client: www.textualapp.com]
squeaky_pl has quit [Ping timeout: 240 seconds]
squeaky_pl has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vD5hp
<crystal-gh> crystal/master d94bb7e Ary Borenszweig: Compiler: fixed ICE related to unknown ivars. Fixes #4050
<crystal-gh> crystal/master 18f079e Ary Borenszweig: Fixed some typos