ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.4 | Fund Crystals 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
_whitelogger has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #3474: Compiler: don't use byval in codegen (master...feature/no_byval) https://git.io/vPjSS
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vPjSj
<crystal-gh> crystal/master 9186fde Ary Borenszweig: Iterator#with_index: fixed missing forwarding argument
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 265 seconds]
<travis-ci> crystal-lang/crystal#9186fde (master - Iterator#with_index: fixed missing forwarding argument): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/170632737
jwaldrip has quit [Ping timeout: 250 seconds]
jwaldrip has joined #crystal-lang
AckZ has joined #crystal-lang
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
<FromGitter> <iDev0urer> Control flow question. Why is it that this doesn't work? ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=581028d32236ab360f8c41a3]
<FromGitter> <iDev0urer> No matter what I get the error `undefined method 'call' for Nil (compile-time type is (Proc(String, String) | Nil))`
<FromGitter> <johnjansen> @convert_tags_to *might* be a Nil
<FromGitter> <johnjansen> its about where its called and how its referenced
<FromGitter> <johnjansen> somewhere its nilable
<FromGitter> <iDev0urer> But shouldn't the if statement check the type?
<FromGitter> <johnjansen> this is not a flow control problem
<FromGitter> <johnjansen> so cast it to a proc
<FromGitter> <johnjansen> `name = @convert_tags_to.as(Proc).call(name)`
<FromGitter> <johnjansen> it might be that a following if misbehaves at the moment, but im not sure
<FromGitter> <iDev0urer> Ahh ok. I don't 100% understand why this is necessary if it's in an if statement, but I'll roll with it
<FromGitter> <johnjansen> try a block version first
<FromGitter> <iDev0urer> I tried it as a block and with unless as well and got the same result
<FromGitter> <iDev0urer> I also tried using `nil?`
soveran has quit [Ping timeout: 260 seconds]
<FromGitter> <iDev0urer> `name = @convert_tags_to.call(name) unless @convert_tags_to.nil?`
<FromGitter> <johnjansen> just thinking about this a little
<FromGitter> <johnjansen> i feel like im missing something
<FromGitter> <iDev0urer> As do I haha
<FromGitter> <johnjansen> if it were this `name = some_method_that_returns_a_proc().call(name) unless some_method_that_returns_a_proc().nil?` i could totally understand it
<FromGitter> <johnjansen> ;-)
<FromGitter> <johnjansen> ok https://play.crystal-lang.org/#/r/1crw
pawnbox has quit [Remote host closed the connection]
<FromGitter> <bcardiff> @johnjansen @iDev0urer https://crystal-lang.org/docs/syntax_and_semantics/if_varis_a.html
<FromGitter> <bcardiff> > The above doesn’t work with instance variables or class variables. To work with these, first assign them to a variable:
<FromGitter> <johnjansen> @bcardiff did you see what he was trying
<FromGitter> <bcardiff> `name = @convert_tags_to.call(name) if @convert_tags_to.is_a?(Proc)`
<FromGitter> <bcardiff> @ivars can't be type-restricted with is_a? / nil? / etc.
<FromGitter> <johnjansen> ohhhhhhh
<FromGitter> <bcardiff> because the can potentially be changed between the condition evaluation and the body statement
<FromGitter> <iDev0urer> Why is that?
<FromGitter> <bcardiff> because they* ...
<FromGitter> <iDev0urer> Ahh
<FromGitter> <johnjansen> yeah of course
<FromGitter> <johnjansen> so assign them local first
<FromGitter> <bcardiff> yeap
<FromGitter> <johnjansen> thanks @bcardiff i knew i was missing something
<FromGitter> <iDev0urer> Ok that makes a little more sense
<FromGitter> <iDev0urer> Thans @bcardiff
<FromGitter> <bcardiff> welcome! time for bed here GMT-3
<FromGitter> <johnjansen> alot more sense
<FromGitter> <johnjansen> haha, go to bed
snsei has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
willl has quit [Quit: Connection closed for inactivity]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 250 seconds]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
bjz has joined #crystal-lang
<FromGitter> <iDev0urer> One more question. I'm trying to create a hash of `String => Hash(String, Self)`, or basically a Hash where the value can be a string or a hash, but that kind of type ends up becoming recursive like this `hash = {} of String => Hash(String, Hash(String, Hash(String, Hash(String, Hash(String, ...)))))`
<FromGitter> <iDev0urer> How do you to that without writing it like I did above? I was thinking of creating a type like this `type MyHash = String | Hash(String, MyHash)`, but that doesn't work
<FromGitter> <iDev0urer> Never mind, I'm stupid. It works if you use an `alias` instead of `type`
pawnbox has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mark_66 has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
HakanD__ has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snsei has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Client Quit]
bjz has joined #crystal-lang
snsei has joined #crystal-lang
pawnbox has joined #crystal-lang
snsei has quit [Ping timeout: 244 seconds]
idev0urer has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
gloscombe has joined #crystal-lang
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
bjz has quit [Ping timeout: 250 seconds]
bjz has joined #crystal-lang
soveran has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 276 seconds]
pawnbox has quit [Remote host closed the connection]
Philpax_ has joined #crystal-lang
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
mark_66 has quit [Quit: Leaving.]
mark_66 has joined #crystal-lang
mark_66 has quit [Client Quit]
mark_661 has joined #crystal-lang
mark_66 has joined #crystal-lang
mark_661 has quit [Ping timeout: 256 seconds]
Philpax_ is now known as Philpax
HakanD____ has joined #crystal-lang
HakanD__ has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vXeQO
<crystal-gh> crystal/master 8b7283b Julien Portalier: Fix: compile llvm_ext.cc with LLVM 3.5
<crystal-gh> [crystal] asterite closed pull request #3472: Fix compilation of `llvm_ext.cc` with LLVM 3.5 (master...master) https://git.io/vPhfo
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vXeQG
<crystal-gh> crystal/master 61a3b69 Gustavo Giráldez: Emit debug information for toplevel variables
<jokke> are there any bayesian analysis libs for crystal?
<travis-ci> crystal-lang/crystal#8b7283b (master - Fix: compile llvm_ext.cc with LLVM 3.5): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/170764338
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
guilleiguaran__ has quit [Quit: Connection closed for inactivity]
<FromGitter> <raydf> https://github.com/mperham/bayes_motel should be very easy to translate to crystal
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jokke> hm
HakanD____ has quit [Quit: Be back later ...]
HakanD____ has joined #crystal-lang
<travis-ci> crystal-lang/crystal#61a3b69 (master - Emit debug information for toplevel variables): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/170764571
HakanD____ has quit [Ping timeout: 244 seconds]
Manhattan has joined #crystal-lang
Manhattan has quit [Client Quit]
Philpax has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
michael_campbell has joined #crystal-lang
<RX14> dadmnit raspbian doesn't have openssl 10.2
<RX14> 1.0.2*
snsei has joined #crystal-lang
<FromGitter> <bcardiff> I read about jessie-backports having openssl 1.0.2 but I am not sure if that will be helpful for raspbian
<RX14> i presume that openssl 1.0.1x would work
<RX14> if i had openssl 1.0.1x on the host
<RX14> yep
<RX14> I could just set OPENSSL_102 = false manually
<RX14> but i'm almost finished compiling openssl now
mark_66 has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
<FromGitter> <asterite> @RX14 Hey! o/
<RX14> hi
<RX14> just compiled openssl
<RX14> and ran the specs
<RX14> and got 2 failures and a "failed to raise exception"
<FromGitter> <asterite> Cool
<FromGitter> <asterite> Ah, yes, I think those are the same as the ones ysbadadden got
<RX14> had to do some weird things due to the source code being in different directories on the host and target
<RX14> the specs really should use the cwd instead of compiled file localtion
<FromGitter> <asterite> for what?
<RX14> spec/std/data
<RX14> different patch
<RX14> path*
<RX14> and the paths are compiled in
<RX14> made a symlink and that was that
<FromGitter> <asterite> Oooh... I see
<FromGitter> <asterite> Yes, there are many things that aren't well thought for cross compiling... for example libcrystal.a
<RX14> well thats easy
<RX14> make llvm_ext libcrystal
<RX14> then just replace the paths in the link command
<FromGitter> <asterite> Yeah, but imagine a shard provides a .c file, you'd have to compile it again for a different architecture
<RX14> yeah
<FromGitter> <asterite> I don't know how we could automate that...
<RX14> well
<FromGitter> <asterite> In any case... Did you try not using the PR that removes byval? I didn't have a chance to try it yet
<RX14> no i havent tried that
<FromGitter> <asterite> Please try it if you can. In any case if it works for you with that PR it at least means it doesn't break anything :-D
<RX14> well
<crystal-gh> [crystal] samueleaton opened pull request #3475: Moves permalink hashtag into gutter in docs (master...feat/doc-permalink-gutter) https://git.io/vXvOh
<RX14> considering I can't get it working *with* the PR
<FromGitter> <asterite> Well, but without the PR you should have more failing specs, I think
<FromGitter> <asterite> It's a bit sad that LLVM is supposed to abstract the machine away, but then we have to juggle with code to make it work (like, not using byval or respect the C ABI in every front-end all over again)
<RX14> yeah
<RX14> i think that you shouldn't remove byval just for arm
<RX14> instead just bug the llvm devs
snsei has quit [Remote host closed the connection]
<RX14> ok, i've reverted the merge
<RX14> testing without your byval patch now
<RX14> i should probably test all this on a raspi 1 as well...
<RX14> we've got too many of those things
<FromGitter> <asterite> @RX14 So it seems the byval does change something :-)
<RX14> yes
<RX14> i wish I got the spec backtraces though
<FromGitter> <asterite> I think we should merge the PR... we could wait for LLVM devs, but then ARM support will be stuck until then
<RX14> i just get an F and an E
<RX14> and then it fails in thew spec handler
<RX14> well
<RX14> it changes something
<RX14> but it doesn't fix the specs
<FromGitter> <asterite> Yeah, our signal handler is not very good, I usually remove it and then run it through gdb and then I can get the backtrace
<RX14> i would still run it by the llvm mailing list because you don't have a definitive answer on the state of byval
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
kulelu88 has joined #crystal-lang
HakanD has joined #crystal-lang
<FromGitter> <johnjansen> on that subject (and i might have missed something very obvious), but how do i get a `Hash(String, String)` that has been serialized, deserialized as the same and not `Hash(String, JSON::Any)`
<RX14> you can parse_raw then cast to Hash(String, String)
<RX14> and then if it isn't
<RX14> you get an exception
<RX14> well actually
<RX14> no
<BlaXpirit> heh
<RX14> you want to Hash(String, String).from_json
<BlaXpirit> mm that's nice, i didnt know about it
<RX14> @johnjansen, https://carc.in/#/r/1cu3
<FromGitter> <johnjansen> magic, thanks … sometimes the docs (and ours are pretty good) can be a bit of a quagmire ;-)
<RX14> well yes
<RX14> because requiring json moneypatches a lot of thing to have to_json and from_json
<FromGitter> <johnjansen> yes thats @RX14 ive already changed and tested ;-)
<RX14> so you need to look at the docs of hash
<RX14> and you'll see from_json
<RX14> but it's not really documented well
<FromGitter> <johnjansen> so many places to look ;-)
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
<FromGitter> <bcardiff> maybe there should be categories/labels to lookup methods in the doc (?) thinking out loud here.
soveran has quit [Remote host closed the connection]
<FromGitter> <bcardiff> BTW is there anybody from Miami, FL. or New Orleans, LA. here? I will be around there in the following days, so send a PM via twitter or email.
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
gloscombe has quit [Quit: Lost terminal]
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
AckZ has quit []
<A124> Are there any resources that talk about memory efficiency of things written in crystal?
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vXvou
<crystal-gh> crystal/master 7eb738f Ary Borenszweig: JSON: some fixes based on http://seriot.ch/parsing_json.html...
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<FromGitter> <asterite> @RX14 Wow! https://github.com/nst/JSONTestSuite/pull/2
<FromGitter> <asterite> I saw it too and fixed some issues in the JSON parser
<RX14> yeah
<FromGitter> <asterite> Nice PR :-)
<FromGitter> <asterite> I thought about doing one myself and saw yours... super surpised :-)
<RX14> those two i linked earlier were the worst
<RX14> crystal seemed to do OK
<FromGitter> <asterite> Only 2 specs are failing now, one about a surrogate which I don't understand, and the other one about UTF-16 which we obviously don't support
<FromGitter> <asterite> There's some issue with play/carc.in, sometimes links are gone
HakanD has quit [Quit: Be back later ...]
<RX14> works for me...
<FromGitter> <asterite> Really??
<FromGitter> <asterite> Maybe it's me then...
<FromGitter> <jwoertink> Doesn't work for me in firefox
<FromGitter> <jwoertink> I have to open chrome to use that
<FromGitter> <asterite> Hm, works for me in a private chrome window
<FromGitter> <johnjansen> @jwoertink clear your cookies
<FromGitter> <jwoertink> I've cleared cookies, tried a private browser window, all kinds of stuff
<FromGitter> <asterite> @RX14 Seems I already fix those two cases :-)
<FromGitter> <johnjansen> im sure its a firefox extension
<RX14> carc.in works all the time it's not down for me, I don't seem to have the cookie issues
<FromGitter> <johnjansen> well ultimately its the back end, but being exposed by an ext
<RX14> and I have a whole load of extensions
<RX14> so idk
ponga has quit [Quit: Connection closed for inactivity]
<FromGitter> <iDev0urer> Clear cookies
<FromGitter> <iDev0urer> I keep having the same issue
<FromGitter> <iDev0urer> Download EditThisCookie for Chrome
<FromGitter> <johnjansen> has anyone tried `benoist/MessagePack`
idev0urer has quit [Ping timeout: 260 seconds]
<travis-ci> crystal-lang/crystal#7eb738f (master - JSON: some fixes based on http://seriot.ch/parsing_json.html): The build was broken. https://travis-ci.org/crystal-lang/crystal/builds/170858459
<A124> Damn gitter should have matrix like gateways.
<A124> @johnjansen From memory consumption perspective, should how does crystal at the moment perform, compared to Go? And what ar the outlooks?
<FromGitter> <johnjansen> im not the person to ask im afraid
<A124> Then I have to wonder, who would know, could judge?
<FromGitter> <johnjansen> lots of people here will have a more informed opinion / facts, than i can provide
<FromGitter> <johnjansen> i havent done any memory benchmarking
<RX14> @A124 it's probably about the same
<RX14> maybe crystal is a bit lower
<RX14> it depends on the usecase I think
<RX14> and GC performance
<RX14> what are you trying to do?
<A124> That is, honestly for what I hoped for. Go tends to blow in certain cases.
<A124> You know IPFS?
<RX14> yes
<A124> That. Plus mode.
<A124> s/mode/more/
<RX14> well
<A124> Sans FUSE, I dislike fuse, unless there will be a good driver / layer for that.
<RX14> i wouldn't say it's going to be drastically different
<RX14> i think how you manage memory is going to have a lot larger effect
<A124> Yeah, I come from Ruby, though my memory has hole and leaks. I do not dislike Go, but that is being done.
<A124> Thanks, this gives me a yellow light then.
jeromegn_ has quit [Ping timeout: 276 seconds]
soveran has joined #crystal-lang
jeromegn_ has joined #crystal-lang
soveran has quit [Ping timeout: 250 seconds]
<travis-ci> crystal-lang/crystal#7eb738f (master - JSON: some fixes based on http://seriot.ch/parsing_json.html): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/170858459
pawnbox has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<crystal-gh> [crystal] ggiraldez opened pull request #3476: Add specs for debug info output (master...debug/spec-with-gdb) https://git.io/vXvbA
HakanD has joined #crystal-lang
HakanD has quit [Client Quit]
HakanD has joined #crystal-lang
HakanD_ has joined #crystal-lang
HakanD has quit [Ping timeout: 245 seconds]
bjz has joined #crystal-lang
bjz has quit [Ping timeout: 250 seconds]
bjz has joined #crystal-lang
matp_ has joined #crystal-lang
matp has quit [Ping timeout: 250 seconds]
FromGitter has quit [Remote host closed the connection]
BlaXpirit has quit [Quit: Bye]
FromGitter has joined #crystal-lang
BlaXpirit has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
HakanD_ has quit [Quit: Be back later ...]
HakanD_ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 260 seconds]
soveran has quit [Remote host closed the connection]
HakanD_ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 256 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
txdv has quit [Ping timeout: 276 seconds]
bjz has joined #crystal-lang
bjz has quit [Client Quit]
txdv has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
HakanD_ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 256 seconds]
HakanD_ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 250 seconds]