<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>
<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
<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...
<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)
<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
<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