jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
sagax has quit [Ping timeout: 240 seconds]
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 240 seconds]
_whitelogger has joined #crystal-lang
tsujp has joined #crystal-lang
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
ryanprior has quit [Ping timeout: 240 seconds]
riffraff169 has quit [Ping timeout: 240 seconds]
riffraff169 has joined #crystal-lang
<FromGitter> <grkek> does this look oaky?
<FromGitter> <grkek> okay*
<FromGitter> <grkek> I mean the syntax is it explicit ? nd stuff
ryanprior has joined #crystal-lang
zorp has joined #crystal-lang
lunarkitty7 has quit [Ping timeout: 240 seconds]
<oprypin> damn i just realized something
<oprypin> people want a Hash(x, Object)
<oprypin> well - it's very much possible, make it a Hash(x, Void*), access the value through Box.box and Box.unbox
<FromGitter> <j8r> Clever
<yxhuvud> does Box keep track of the type or would you have to do that yourself?
<oprypin> yxhuvud, have to do yourself
<oprypin> ok i think i've actually done it
<oprypin> behold https://carc.in/#/r/9ou8
<oprypin> 🤯
sagax has joined #crystal-lang
<FromGitter> <asterite> wow, that static thing is real sorcery
<raz> looks not very practical to me tho
<raz> more like an impressive card trick :D
<raz> but i love the {file:line} as key trick
<raz> i wonder if that type of black magic could be used to solve such it in a more general fashion at a compiler level (without magic macros)
<raz> like, a RubyHash type, that just magically behaves like a ruby hash, nesting and all
* raz puts down the pipe for a moment
<oprypin> raz, re "not very practical" - see the alternative in the other link. i'm just converting preexisting c++ code which abused static, and unless i do the same, i'm forced to move the definitions away from the usages *and* manually resolve naming collisions
<oprypin> aaa i really need a good merge tool now. really it's enough for me just to see the side by side view and make it editable
<oprypin> seems like Meld will do
<oprypin> also needed this one apparently, cuz reasons.. https://stackoverflow.com/a/21283815
renich has joined #crystal-lang
<renich> Hello!
<renich> Where can I find documentation about the T object? I mean, every time I look at the crystal source code, I see a ton of use of T and I dunno where to read about it.
<FromGitter> <naqvis> renich convention is to say type as *T* in generics. When you use generic types like collections for example then you provide the actual type for which you want the container to represent. For example when you want to create an `Array` of `Int32` you will do `Array(Int32).new`, similary same generic code will allow you to create an Array of other types like `String`, `Float32` etc
<renich> naqvis: OK. Thanks a lot. Kind of get it. It's like a wildcard type that will become whichever type you assign to it. Right?
<FromGitter> <naqvis> yeah 👍
<renich> awesome. Thanks a lot. Did you find that in the docs? If so, where?
<renich> naqvis: thank you, very much!
<FromGitter> <naqvis> But `Generics` concept is language agnostic and many languages support Generics and Crystal is one of them
<renich> naqvis: right on.
<FromGitter> <naqvis> 👍
renich has quit [Quit: Leaving.]
<oprypin> following up on [16:33:15] <oprypin> raz, re "not very practical" - see the alternative in the other link. i'm just converting preexisting c++ code which abused static, and unless i do the same, i'm forced to move the definitions away from the usages *and* manually resolve naming collisions
<raz> ah gotcha, didn't know it was part of a larger thing
<FromGitter> <grkek> what do you guys think of this, https://github.com/grkek/iu
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
lunarkitty7 has joined #crystal-lang
hightower3 has joined #crystal-lang
<raz> a way to write a native app for OSX without having to mess with swift? sign me up!