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
soveran has joined #crystal-lang
marciogm has joined #crystal-lang
ome has joined #crystal-lang
soveran has quit [Ping timeout: 255 seconds]
marciogm has quit [Quit: Lost terminal]
<FromGitter> <ezrast> So this is weird https://play.crystal-lang.org/#/r/1kum
<FromGitter> <ezrast> I can't believe that's a minimal repro, but take away any of the code that shouldn't do anything and the error stops happening.
marciogm has joined #crystal-lang
<FromGitter> <MaxLap> Wow, i love that the puts needs to have at least 2 characters like that for the crash to occur. This has to be a compiler bug.
<FromGitter> <ezrast> Oh good, I'm not crazy
fedruantine has quit [Ping timeout: 248 seconds]
fedruantine has joined #crystal-lang
Raimondi has quit [Ping timeout: 252 seconds]
Raimondi has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 245 seconds]
<travis-ci> crystal-lang/crystal#4d03a56 (master - Fixed wrong username in changelog (#3929)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/194132029
early has joined #crystal-lang
early` has quit [Quit: Leaving]
fedruantine has quit [Ping timeout: 258 seconds]
fedruantine has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
fedruantine has quit [Ping timeout: 252 seconds]
soveran has quit [Ping timeout: 240 seconds]
marciogm has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Max SendQ exceeded]
bjz has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
bjz has quit [Ping timeout: 255 seconds]
bjz has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 264 seconds]
ome has quit [Quit: Connection closed for inactivity]
akwiatkowski has joined #crystal-lang
mark_66 has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 256 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 258 seconds]
soveran has joined #crystal-lang
badeball_ is now known as badeball
gloscombe has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 252 seconds]
Raimondi has quit [Ping timeout: 252 seconds]
Raimondi has joined #crystal-lang
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 255 seconds]
gloscombe has quit [Read error: Connection reset by peer]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ome has joined #crystal-lang
bjz has joined #crystal-lang
soveran has quit [Remote host closed the connection]
marciogm has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
akwiatkowski has joined #crystal-lang
marciogm has quit [Read error: No route to host]
<crystal-gh> [crystal] bcardiff pushed 1 new commit to master: https://git.io/vM59X
<crystal-gh> crystal/master 15032cc Brian J. Cardiff: Playground: fix .cr files served in workbooks. end of lines were chomped
ome has quit [Quit: Connection closed for inactivity]
sz0 has joined #crystal-lang
<travis-ci> crystal-lang/crystal#15032cc (master - Playground: fix .cr files served in workbooks. end of lines were chomped): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/194495285
bmcginty has quit [Ping timeout: 258 seconds]
bmcginty has joined #crystal-lang
plukevdh has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
plukevdh has quit [Quit: Textual IRC Client: www.textualapp.com]
unshadow has quit [Ping timeout: 260 seconds]
unshadow has joined #crystal-lang
marciogm has joined #crystal-lang
unshadow has quit [Ping timeout: 240 seconds]
unshadow has joined #crystal-lang
gloscombe has joined #crystal-lang
DeBot has quit [Read error: Connection reset by peer]
DeBot has joined #crystal-lang
soveran has quit [Remote host closed the connection]
maxpowa has quit [Ping timeout: 246 seconds]
maxpowa has joined #crystal-lang
unshadow_ has joined #crystal-lang
unshadow has quit [Ping timeout: 255 seconds]
marciogm has quit [Ping timeout: 255 seconds]
gloscombe has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
sz0 has quit [Quit: Connection closed for inactivity]
soveran has quit [Ping timeout: 245 seconds]
soveran has joined #crystal-lang
unshadow has joined #crystal-lang
unshadow_ has quit [Ping timeout: 276 seconds]
<FromGitter> <drosehn> Hmm. Did the handling of NaN get sorted out? NaN is defined to be not-equal NaN, and that is not a weird decision. `0.0/0.0 == NaN`, but so does `42*0.0/0.0`. But you don't want the language to claim that `0.0/0.0 == 42*0.0/0.0`.
soveran has quit [Remote host closed the connection]
<FromGitter> <drosehn> NaN is *not* some specific value. It's a place-holder to say "whatever this value is, the computer has no way to represent it".
<Papierkorb> > But you don't want the language to claim that `0.0/0.0 == 42*0.0/0.0`.
<Papierkorb> Why, I mean, that's a correct statement math-wise
<FromGitter> <drosehn> Imagine NaRN, for "Not a Rational Number". pi and e are both "not a rational number", but that does not mean `pi == e`.
<Papierkorb> but `pi.narn? == e.narn?` would hold true
<Papierkorb> I get your point I think, but I also don't think there's a good solution to it
<Papierkorb> NaN is already pretty weird in math terms
<Papierkorb> A number that doesn't exist? huh?
<FromGitter> <drosehn> But it has to have the behavior that it has. In that sense, it is not weird. It's the only way to make it work right.
<Papierkorb> yes
<FromGitter> <drosehn> I'm not completely sure I understand where the earlier discussion left off. I just wanted to point out that you really don't want one NaN to be equal to some other NaN. Not unless the language keeps track of what generated each NaN.
<FromGitter> <MaxLap> You can see the discussion in the issues: https://github.com/crystal-lang/crystal/issues/3923
<FromGitter> <MaxLap> What you need is a different equality method for hashes (ruby has #eql? for this exact purpose)
<Papierkorb> Sounds reasonable
<FromGitter> <drosehn> There are a few cases where this causes a problem, and offhand I can only think of one. Note that in ruby: `bb = Hash.new ; bb[0.0/0] = 1 ; bb[0.0/0*40] = 2` gives you a hash which is: `{NaN=>1, NaN=>2}`
<RX14> adding more equality methods seems stupid personallt
<FromGitter> <drosehn> and `bb.has_key?(0.0/0) => false`
bjz has joined #crystal-lang
<Papierkorb> I don't have much stake in it tbh, but is it an actual problem? Adding an eql? equivalent has a cost, but is it worth it?
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<Yxhuvud> papierkorb: no, mathwise it is an *undefined* statement.
<Papierkorb> Yxhuvud: are they different undefineds too?
<Papierkorb> (I guess so, but...)
<FromGitter> <mverzilli> @drosehn I think I agree with you
<Yxhuvud> statement doesn't make sense. undefined is undefined - there are no equality operation defined for it.
<FromGitter> <mverzilli> @papierkorb think of algebra of limits in Math
<FromGitter> <mverzilli> you can't claim inf == inf unless you know they "progress at the same speed"
<Yxhuvud> I kinda dislike that Hash[] is dependent on ==, but tbh, I don't feel it is worth caring too much about it. Any performance and most clean code concerns would probably be more important. It is an edge case that isn't so cute, but still an edge case.
unshadow has quit [Ping timeout: 258 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
unshadow has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <drosehn> Hmm. I'm installing the newest crystal using `brew` on MacOS, and it tells me that "autocode is not installed". And `brew` does not know about any package called `autocode`. Que pasa aqui? (<- spanish from my high school days, many many years ago. Possibly incorrect spanish.)
<FromGitter> <drosehn> MacOS Yosemite (10.10.5), if that matters.
bjz has joined #crystal-lang
bjz has quit [Client Quit]
<FromGitter> <mverzilli> that's good Spanish :)
<FromGitter> <mverzilli> I'm on Sierra, but let me give it a try
<FromGitter> <drosehn> There are only a few phrases that I remember, but we used to say that one a lot.
<FromGitter> <mverzilli> looks to work alright on Sierra, I was going to suggest that you opened an issue, but I see you just did :)
<FromGitter> <mverzilli> just in case, could you run `brew doctor`and paste the results here or an issue?
<FromGitter> <drosehn> Well, actually I mentioned it in reply to a different issue.
<FromGitter> <drosehn> `brew doctor` complains: ```cr
<FromGitter> <drosehn> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58867f19e836bf7010817c41]
<FromGitter> <drosehn> ... it's in /opt/homebrew, because I didn't want `brew` to be doing anything in /usr/local (where I have some other packages).
<FromGitter> <drosehn> I don't seem to have any file named `autocode\*` under /opt/homebrew.
<FromGitter> <drosehn> There is a: ⏎ /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/autocode.rb ⏎ I'll see if I can do something with that.
soveran has quit [Remote host closed the connection]
<FromGitter> <drosehn> Hmm. I think I've done something which may have fixed things. Or it may have broken them in different ways.
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
<FromGitter> <mverzilli> that's good, or bad
<FromGitter> <mverzilli> would you elaborate?
<FromGitter> <drosehn> Ugh. Well, I think I'm in a mess which is mostly because brew needs to do things in a way that I don't want it to. Namely, it wants to own /usr/local, and I want to box it into /opt/homebrew. I now have autocode installed okay, but now when I go to install crystal I'm told "autocode 1.3.1 already installed". Why, *yes*, it's installed. You said you needed it installed, and I had brew install it.
marciogm has joined #crystal-lang
<FromGitter> <drosehn> This has me unhappy, but I don't want to rant about it here.
<FromGitter> <mverzilli> sorry about that! I'm not sure what's the right place to rant about this issue :worried:
unshadow has quit [Ping timeout: 240 seconds]
unshadow has joined #crystal-lang
<FromGitter> <bcardiff> @drosehn i think latests versions of brew are able to work without owning /usr/local. Also you can download crystal binaries from github if you prefer other installation methods
<FromGitter> <drosehn> Well, I don't mean "owning" as in the unix sense of `chown`. I mean they want to have total say in what goes on in that directory and all subdirectories. And I don't want `brew` to have *anything* to do with /usr/local.
<FromGitter> <drosehn> I may have a work-around though. I'll keep experimenting for awhile.
<FromGitter> <drosehn> I recently used `brew` to upgrade to a new version of `ripgrep`, and ran into problems there too. So I suspect I'm tripping over issues in the newer versions of `brew`, or that the fact that I'm still on yosemite is causing more and more problems as time goes on. Probably both!
<FromGitter> <drosehn> I might have to wait until tomorrow to continue experiments. We have a snowstorm coming in very soon, and I should head home! :smile:
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 240 seconds]
<FromGitter> <crisward> Anyone can give me some help on json builder?
<FromGitter> <drosehn> I'm not sure I can help, but what's the problem?
<FromGitter> <crisward> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=588693ca074f7be7630b6675]
<FromGitter> <crisward> This outputs json from a model with a json mapping. However, I'm not getting any commas after each row of data.
<FromGitter> <crisward> ok worked it out, thanks.
<FromGitter> <drosehn> I haven't worked at that level of json. You want a comma after each `model.new(resultSet).to_json(ctx.response)`? I'd be tempted to just add that as a separate command in the innermost `do` loop. I'll guess you'd do that with `json.raw(".")`
<FromGitter> <crisward> `model.new(resultSet).to_json(ctx.response)` should have been `model.new(resultSet).to_json(json)`
<FromGitter> <drosehn> Hmm. did that come out as a comma or a period? I meant to type a comma.
<FromGitter> <drosehn> ah.