jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.17.3 | 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
soveran has joined #crystal-lang
bjz has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
ozra has quit [Ping timeout: 276 seconds]
jokke has quit [Quit: WeeChat 1.5]
jokke has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
NeverDie has joined #crystal-lang
NeverDie has left #crystal-lang ["http://radiux.io/"]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
A124 has quit [Quit: '']
A124 has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 260 seconds]
Philpax has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
trapped has joined #crystal-lang
emancu has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
emancu has quit [Remote host closed the connection]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 244 seconds]
soveran has joined #crystal-lang
bjz_ has quit [Ping timeout: 246 seconds]
soveran has quit [Ping timeout: 244 seconds]
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
<jhass> pawnbox: Run hello of which instance?
soveran has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
Philpax has quit [Quit: Leaving]
Philpax has joined #crystal-lang
TheLemonMan has joined #crystal-lang
tombruijn has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
bjz_ has quit [Ping timeout: 276 seconds]
bjz has joined #crystal-lang
soveran has quit [Remote host closed the connection]
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 246 seconds]
soveran has joined #crystal-lang
tombruijn has quit [Quit: Leaving]
jokke has quit [Quit: WeeChat 1.5]
jokke has joined #crystal-lang
jokke has quit [Remote host closed the connection]
<pawnbox> Ok I got the previous question wrong. What I need is to store an array of all the instances of a generic class. Since I can't have class var for a generic class, I had to go this way.
jokke has joined #crystal-lang
<jhass> probably a limitation of the current language
<jhass> until we can have parameterless generics in type declarations
<pawnbox> jhass: There is kind of a similar issue in mocks.
jokke has quit [Remote host closed the connection]
jokke has joined #crystal-lang
jokke has quit [Remote host closed the connection]
jokke has joined #crystal-lang
|2701 has joined #crystal-lang
soveran has quit [Remote host closed the connection]
emancu has joined #crystal-lang
soveran has joined #crystal-lang
ozra has joined #crystal-lang
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
emancu has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rolha has joined #crystal-lang
bjz has joined #crystal-lang
emancu has joined #crystal-lang
rolha has quit [Ping timeout: 260 seconds]
rolha has joined #crystal-lang
Philpax has quit [Ping timeout: 252 seconds]
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
ozra has quit [Ping timeout: 244 seconds]
ozra has joined #crystal-lang
ome has joined #crystal-lang
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<emancu> I would like to know if the GC frees the memory by consumed by first named tuple in the following code:
<emancu> a = {test: 4}
<emancu> a = {this: "is a new one", overrides: true}
<jhass> emancu: named tuples are allocated on the stack
<emancu> right
<emancu> hmm so if I do that code inside a class
<emancu> it will remain forever
<jhass> you can see the size of your class with crystal tool hierarchy
<emancu> jhass: thanks for the tip! I also would like the code generated after extracting all the macros. Can I do that?
<jhass> is crystal tool browser still a thing? it does that to some degree, but it didn't display much toplevel code last time I checked
<jhass> there's the {{debug()}} macro call, but that only shows the current expansion, not recursively
buggs has quit [Quit: WeeChat 1.4]
buggs has joined #crystal-lang
emancu has quit [Read error: Connection reset by peer]
emancu has joined #crystal-lang
emancu_ has joined #crystal-lang
emancu has quit [Ping timeout: 276 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<emancu_> jhass: do you know how to create an empty NamedTuple ?
<emancu_> reading the docs I see NamedTuple.new => {}
<emancu_> but it doesn't work :/
<jhass> mh, Ary might've updated it too eagerly
<jhass> iirc there was something with it requiring an unreleased compiler feature
<jhass> emancu_: yeah, works in HEAD
<emancu_> hmm
<emancu_> can't create instance of generic class NamedTuple(T) without specifying its type vars
<emancu_> i need to wait then
<asterite> yes, it'll be possible in 0.18.0. It couldn't be done in 0.17.0 because in that version double splat was introduced too
<asterite> so there was no way to write new(**args)
<BlaXpirit> fun with bootstrapping
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<emancu_> asterite: how can I instantiate a NamedTuple without the syntaxSugar {named: "tuple"} ?
jokke has quit [Remote host closed the connection]
jokke has joined #crystal-lang
<jhass> emancu_: NamedTuple.new(named: "tuple")
Raimondi has quit [*.net *.split]
Raimondi has joined #crystal-lang
<emancu_> jhass: i was expecting something like NamedTuple.new([[:named, "tuple"]]) =(
<jhass> emancu_: That would need to heavily special case NamedTuple.new in the compiler and even then only work with the literal directly passed to it
<jhass> so I don't quite see the point
<jhass> so while you can do https://carc.in/#/r/z6y it's pretty pointless
ome has quit [Quit: Connection closed for inactivity]
<emancu_> jhass: that's clever and I think it is just what I want
<emancu_> you are a genius
Ven has joined #crystal-lang
<BlaXpirit> inb4 "oh, it doesn't work on a non-literal array"
<jhass> indeed
triangles has joined #crystal-lang
emancu_ has quit [Read error: Connection reset by peer]
emancu has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TheLemonMan has joined #crystal-lang
emancu has quit [Read error: Connection reset by peer]
emancu has joined #crystal-lang
emancu has quit [Read error: Connection reset by peer]
emancu has joined #crystal-lang
emancu has quit [Read error: Connection reset by peer]
emancu has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 240 seconds]
emancu has quit [Read error: Connection reset by peer]
soveran has quit [Remote host closed the connection]
emancu has joined #crystal-lang
sp4rrow has joined #crystal-lang
trapped has quit [Ping timeout: 244 seconds]
sp4rrow has quit [Ping timeout: 264 seconds]
sp4rrow has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
sp4rrow_ has joined #crystal-lang
sp4rrow has quit [Ping timeout: 260 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Philpax has joined #crystal-lang
ryanw-se has joined #crystal-lang
sp4rrow_ has quit [Quit: The Internet needs a break and I need a cookie]
Philpax has quit [Ping timeout: 252 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
emancu has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vrat5
<crystal-gh> crystal/master 1a2ec57 Ary Borenszweig: Merge branch 'release/0.17'
sp4rrow has joined #crystal-lang
bjz has joined #crystal-lang
emancu has joined #crystal-lang
<travis-ci> crystal-lang/crystal#1a2ec57 (master - Merge branch 'release/0.17'): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/132149643
bjz has quit [Ping timeout: 276 seconds]
emancu has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vram7
<crystal-gh> crystal/master 1ce3c18 Ary Borenszweig: Merge branch 'release/0.17'
pawnbox has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
<travis-ci> crystal-lang/crystal#1ce3c18 (master - Merge branch 'release/0.17'): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/132154498