jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.9.1 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
conorreedy1 has joined #crystal-lang
pawnbox has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 265 seconds]
ismaelga has joined #crystal-lang
havenwood has quit [Remote host closed the connection]
ismaelga has quit [Remote host closed the connection]
conorreedy1 has quit [Quit: conorreedy1]
petercommand has quit [Quit: leaving]
ismaelga has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
havenwood has joined #crystal-lang
havenwood has joined #crystal-lang
swistak35 has joined #crystal-lang
<swistak35> hello
<swistak35> tried to write simple crystal program, stuck at one thing
<swistak35> crystal eval 'foo = gets; puts foo' does work, but 'foo = gets; puts foo.size' doesn't
<swistak35> from error message it looks like `foo` was nil, but it didn't even gave me a chance to type some input?
<jhass> swistak35: when you press Ctrl-D (send EOF), gets returns nil
<jhass> swistak35: so gets returns the union of String and Nil, String|Nil or String? for short
<jhass> swistak35: puts has no issue printing nil, since Nil#to_s is a thing
<jhass> however Nil#size is not
<swistak35> well, but when I run the first program, it gives me a prompt, and I can type a word there
<jhass> so you need to check whether you got nil: puts foo.try(:size) || "Got EOF!"
<jhass> er, .try(&.size) it is
<swistak35> and the word is passed correctly to foo variable, and then displayed -- so definitely `foo` is not nil in the first example
<jhass> swistak35: at compile time we don't know that
<jhass> crystal eval writes the argument to a temporary file, compiles it and then runs the resulting executable
<swistak35> oh, ok, now I get it
<swistak35> I thought it's runtime error already :)
<swistak35> thank you
<swistak35> +1 jhass
ismaelga has joined #crystal-lang
fowlduck has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 272 seconds]
ismaelga has quit [Remote host closed the connection]
uberTaco has joined #crystal-lang
uberTaco has quit [Client Quit]
sidoaight has joined #crystal-lang
uberTaco has joined #crystal-lang
<uberTaco> hola
<uberTaco> just starting to poke around with Crystal on an OSX Yosemite machine, via homebrew
<uberTaco> when running crystal run hello-world.cr (which just contains puts "hello world")
<uberTaco> I get clang errors about linker commands failing
<uberTaco> specifically "ld: library not found for -levent"
<uberTaco> derp, found a github issue. So sorry to bother you all
barosl has quit [Ping timeout: 272 seconds]
shama has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 255 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vBmd5
<crystal-gh> crystal/master d4a58a0 Ary Borenszweig: MemoryIO can now be created to read/write from a Slice(UInt8). In this mode MemoryIO can't be exapnded, and can optionally be written. And when creating a MemoryIO from a String, it's non-resizeable and read-only. Fixes #1775
swistak35 has quit [Quit: leaving]
shama has joined #crystal-lang
sidoaight has left #crystal-lang ["We need to work as a team. Which means doing what I say."]
<travis-ci> manastech/crystal#d4a58a0 (master - MemoryIO can now be created to read/write from a Slice(UInt8). In this mode MemoryIO can't be exapnded, and can optionally be written. And when creating a MemoryIO from a String, it's non-resizeable and read-only. Fixes #1775): The build has errored. https://travis-ci.org/manastech/crystal/builds/92858028
<DeBot> https://github.com/manastech/crystal/pull/1775 (MemoryIO added initializer for Slice(UInt8))
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
fowlduck_ has joined #crystal-lang
fowlduck has quit [Read error: Connection reset by peer]
fowlduck_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 252 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
trapped has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
trapped has joined #crystal-lang
trapped has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
barosl has joined #crystal-lang
pawnbox has joined #crystal-lang
lokulin has joined #crystal-lang
lokulin has quit [Changing host]
fowlduck has joined #crystal-lang
bougyman has quit [Ping timeout: 252 seconds]
bougyman has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
fowlduck has quit [Ping timeout: 246 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
ismaelga has joined #crystal-lang
ismaelga has quit [Read error: Connection reset by peer]
ismaelga has joined #crystal-lang
conorreedy1 has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
barosl has quit [Quit: Leaving]
fowlduck has quit [Ping timeout: 252 seconds]
ismael_ has joined #crystal-lang
ismaelga has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
A124 has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
barosl has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conorreedy1 has quit [Quit: conorreedy1]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
conorreedy1 has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
conorreedy1 has quit [Quit: conorreedy1]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
ssvb has quit [Ping timeout: 272 seconds]
barosl has quit [Quit: Leaving]
conorreedy1 has joined #crystal-lang
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
ssvb has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
trapped has joined #crystal-lang
Ven is now known as Guest9025
Reiser has joined #crystal-lang
<Reiser> Very very new to the language, silly question, if I have a module with a method in it. Why can't I do Module::method to invoke it?
<crystal-gh> [crystal] asterite closed pull request #1904: Uncommented TODO, released !~ operator (master...patch-1) http://git.io/vBU8O
Guest9025 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<travis-ci> manastech/crystal#001908c (master - Merge pull request #1904 from MakeNowJust/patch-1): The build has errored. https://travis-ci.org/manastech/crystal/builds/92950633
<DeBot> https://github.com/manastech/crystal/pull/1904 (Uncommented TODO, released !~ operator)
ozra has joined #crystal-lang
Ven_ has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vBsWl
<crystal-gh> crystal/master c0db7f3 Ary Borenszweig: Travis: try not to install gmp (seems to be already installed)
<travis-ci> manastech/crystal#c0db7f3 (master - Travis: try not to install gmp (seems to be already installed)): The build passed. https://travis-ci.org/manastech/crystal/builds/92955018
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven_ has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
barosl has joined #crystal-lang
pawnbox has joined #crystal-lang
trapped has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 272 seconds]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wmoxam> Reiser: you probably defined it as an instance method
<Reiser> wmoxam, Ah, so 'def foo' wouldn't actually 'bind' it to the module itself then, I have to explicitly do that with self
<wmoxam> Reiser: sort of. Basically you would need an instance of Module to be able to call it, but modules are not instantiable
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Reiser> Ah I see, I follow, thanks wmoxam
<wmoxam> Reiser: instance method in modules are used to share code between classes (by including them). Ex: https://gist.github.com/wmoxam/f3478c403ef2844a4301
trapped has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
shama has joined #crystal-lang
ismael_ has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
sdogruyol has quit [Client Quit]
ismaelga has joined #crystal-lang
<[spoiler]> Raimondi: also take not that `class << self` won't work (it does in Ruby)
<[spoiler]> oops I meant Reiser
<[spoiler]> Sorry
<[spoiler]> All the cool programming languages sound like stripper names, don't they
<[spoiler]> Hmm Python could be a male stripper. Makes me wanna use Python now
ismaelga has quit [Remote host closed the connection]
<RX14-> ...
<[spoiler]> What
RX14- is now known as RX14
trapped has joined #crystal-lang
ozra has quit [Ping timeout: 246 seconds]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox_ has joined #crystal-lang
trapped has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
pawnbox_ has quit [Ping timeout: 264 seconds]
pawnbox has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 272 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
A124 has quit [Quit: '']
Bofu2U has quit [Ping timeout: 250 seconds]
Bofu2U has joined #crystal-lang
kulelu88 has joined #crystal-lang
kulelu88 has joined #crystal-lang
ismaelga has joined #crystal-lang
fowlduck has joined #crystal-lang
conorreedy1 has quit [Quit: conorreedy1]
fowlduck has quit [Remote host closed the connection]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
kulelu88 has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
havenwood has joined #crystal-lang
havenwood has quit [Changing host]
fowlduck has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
kulelu88 has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
grindhold has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 240 seconds]