jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.10.0 | 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
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
<jhass> Anyone at 32C3?
elia_ has quit [Quit: Computer has gone to sleep.]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 265 seconds]
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
dylanmei has quit [Client Quit]
kulelu88 has joined #crystal-lang
kulelu88 has quit [Changing host]
kulelu88 has joined #crystal-lang
sadin has joined #crystal-lang
dylanmei has joined #crystal-lang
dylanmei has quit [Client Quit]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
kulelu88 has quit [Ping timeout: 256 seconds]
sadin has quit [Quit: Leaving]
waterlin1 has joined #crystal-lang
kulelu88 has joined #crystal-lang
waterlink has quit [Ping timeout: 260 seconds]
A124 has quit [Read error: Connection reset by peer]
A124 has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 245 seconds]
dylanmei has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
dylanmei has quit [Quit: ZZZzzz…]
kulelu88 has quit [Quit: Leaving]
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]
osiutino has joined #crystal-lang
waterlin1 has quit [Ping timeout: 265 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
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
trapped has joined #crystal-lang
vikaton has quit [Quit: Connection closed for inactivity]
robacarp has quit [Ping timeout: 245 seconds]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robacarp has joined #crystal-lang
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
elia_ has joined #crystal-lang
elia_ has quit [Read error: Connection reset by peer]
elia_ has joined #crystal-lang
<pawnbox> I was trying to convert yaml file to hash object. This is what I tried https://carc.in/#/r/p0y. Any ideas?
<BlaXpirit> pawnbox, that's exactly what PullParser isn't supposed to do
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
bmcginty has quit [Ping timeout: 240 seconds]
trapped has joined #crystal-lang
bmcginty has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
osiutino has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
bmcginty has quit [Ping timeout: 264 seconds]
bmcginty has joined #crystal-lang
pawnbox has joined #crystal-lang
<pawnbox> BlaXpirit: I thought that from_yaml.cr would help me out with that.
<BlaXpirit> pawnbox, i dont know.
<BlaXpirit> you need Parser and not PullParser
<BlaXpirit> to just get a hash object with arbitrary data in it
<BlaXpirit> pawnbox, so just try YAML::Parser.new(string).parse
<BlaXpirit> if this doesnt work then i dont know
<pawnbox> BlaXpirit: got it. Thanks
<pawnbox> By the way YAML.load(string) also works.
<BlaXpirit> good
<pawnbox> Is before(:each) supported in crystal?
bmcginty has quit [Ping timeout: 250 seconds]
bmcginty has joined #crystal-lang
<BlaXpirit> pawnbox, if you could say what you actually want, that would be great
<BlaXpirit> and i'm going away
<pawnbox> BlaXpirit: I want to specify setup data for following specs.
<pawnbox> Like before(:each) in Rspec.
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elia_ has quit [Quit: Computer has gone to sleep.]
trapped has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
waterlink has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
elia_ has joined #crystal-lang
vikaton has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bofu2U has quit [Ping timeout: 265 seconds]
dylanmei has joined #crystal-lang
trapped has joined #crystal-lang
osiutino has joined #crystal-lang
osiutino has quit [Ping timeout: 276 seconds]
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
osiutino has joined #crystal-lang
osiutino has quit [Ping timeout: 255 seconds]
<BlaXpirit> Array is too fat
elia_ has quit [Read error: Connection reset by peer]
<BlaXpirit> what's a nice way to write a[0]*b[0] + a[1]*b[1] + a[2]*b[2] ......
<BlaXpirit> I see that zip exists but it's not very nice to have a counter and just write += in zip
<BlaXpirit> scratch that. i actually want [a[0]*b[0], a[1]*b[1], ...]
elia_ has joined #crystal-lang
Bofu2U has joined #crystal-lang
<jhass> BlaXpirit: a.zip(b).map {|a, b| a*b } ? No idea if it actually works in crystal
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yxhuvud> jhass: zip in ruby already takes a block, so no need to save it temporarily in a map there.
<yxhuvud> *in an array
<BlaXpirit> i don't think it works in crystal cuz think about it. why would map take 2 arguments?
<BlaXpirit> and what good is the fact that zip takes a block if it doesn't accumulate results?
<jhass> >> [1, 2 3].zip([3, 2, 1]) {|a, b| a*b }
<DeBot> jhass: Syntax error in eval:21: unexpected token: 3 - https://carc.in/#/r/p1o
<jhass> >> [1, 2, 3].zip([3, 2, 1]) {|a, b| a*b }
<DeBot> jhass: # => [1, 2, 3] - https://carc.in/#/r/p1p
trapped has joined #crystal-lang
<BlaXpirit> uh that's incorrect
<BlaXpirit> it fooled me first
<jhass> well
<jhass> it's like each
<jhass> yield the results and return the receiver
<BlaXpirit> yes
<yxhuvud> may it should be reported as a bug though
<jhass> mh
<jhass> no
<jhass> we don't want to allocate a new array there unless explicitly requested
<jhass> >> [1, 2, 3].zip([3, 2, 1]).map {|p| p[0]*p[1] }
<DeBot> jhass: # => [3, 4, 3] - https://carc.in/#/r/p1q
<yxhuvud> hmm. seems I remember wrong. it matches the ruby behaviour except for ruby returning nil if block is given
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
osiutino has joined #crystal-lang
osiutino has quit [Read error: Connection reset by peer]
osiutino has joined #crystal-lang
osiutino has quit [Ping timeout: 265 seconds]
elia_ has quit [Quit: Computer has gone to sleep.]
trapped has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
osiutino has joined #crystal-lang
osiutino has quit [Ping timeout: 240 seconds]
elia_ has joined #crystal-lang
elia_ has quit [Quit: Computer has gone to sleep.]
osiutino has joined #crystal-lang
mlitwiniuk has quit [Ping timeout: 246 seconds]
osiutino has quit [Ping timeout: 240 seconds]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mlitwiniuk has joined #crystal-lang
osiutino has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
osiutino has quit [Ping timeout: 265 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 272 seconds]
dmonster has joined #crystal-lang
osiutino has joined #crystal-lang
elia_ has joined #crystal-lang
osiutino has quit [Ping timeout: 272 seconds]
pawnbox has joined #crystal-lang
elia_ has quit [Quit: Computer has gone to sleep.]
slash_nick is now known as \nick
elia_ has joined #crystal-lang
\nick is now known as slash_nick
trapped has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
osiutino has joined #crystal-lang
osiutino has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
osiutino has joined #crystal-lang
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 276 seconds]
osiutino has quit [Ping timeout: 265 seconds]
pawnbox has quit [Ping timeout: 264 seconds]
<crystal-gh> [crystal] ysbaddaden opened pull request #1977: Time#epoch return local timestamps instead of UTC (master...std-time-epoch) http://git.io/vESMw
trapped has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
Renich has joined #crystal-lang