<zipR4ND>
hi all, trying to use this library: https://github.com/trans/clik i get an error upon compilation: "clik/src/clik.cr:48: splatting a union (Array(String)) is not yet supported" (https://github.com/trans/clik/blob/master/src/clik.cr#L48). it seems splatting arrays into functions is not supported. is there any workaround to this preserving the libs functionality?
<jhass>
zipR4ND: looks like somebody just took a ruby script and slapped .cr to it
<jhass>
I don't think it ever worked
<zipR4ND>
oh sad
<zipR4ND>
i think it could work if this splatting was somehow possible ..
<jhass>
I don't think it ever will be for this case
<jhass>
the compiler can't generate the correct call since the contents of argv there are only known on runtime
<zipR4ND>
if i have a proc, can i somehow inspect the arguments it is taking on compile time?
<zipR4ND>
how can I make an argument obligtory with option_parser?
<zipR4ND>
hey, just found out: this doesn't work: if (hash.has_key[:some_bool_key] && hash[:some_bool_key]) because the second boolean expression is evaluated, although the first one is already false .... throws an error ..
<jhass>
>> h = {a: 1}; h.has_key?(:b) && h[:b]
<DeBot>
jhass: false
<jhass>
>> h = {a: 1}; h.has_key?(:b) && h[:a]
<DeBot>
jhass: false
<jhass>
>> h = {a: 1}; h.has_key?(:a) && h[:a]
<DeBot>
jhass: 1
<jhass>
>> h = {a: 1}; h.has_key?(:a) && h[:b]
<DeBot>
jhass: MissingKey: Missing hash value: b
<jhass>
seems to work like expected
jtarchie has joined #crystal-lang
<jtarchie>
morning, channel.
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: http://git.io/vf2mN
<crystal-gh>
crystal/master a2c3aef Ary Borenszweig: Use memmove/memcpy llvm instrinsics in Pointer operations when possible
<jhass>
jtarchie: hi!
<travis-ci>
manastech/crystal#2256 (master - a2c3aef : Ary Borenszweig): The build is still failing.
<jhass>
and as said, just Hash(String, String).from_json File.read("list.json")
<a5i>
thanks !
DerisiveLogic has quit [Ping timeout: 264 seconds]
havenwood has quit []
havenwood has joined #crystal-lang
<a5i>
so far so good
rrrrrrrr has quit [Quit: Page closed]
ponga has quit [Quit: Leaving...]
JBat has joined #crystal-lang
Kache has joined #crystal-lang
havenwood has quit [Remote host closed the connection]
Kache is now known as Kache4
Kache4 is now known as Kache4_
Kache4_ is now known as Kache
Kache has left #crystal-lang [#crystal-lang]
Kache4 has joined #crystal-lang
strcmp1 has quit [Ping timeout: 245 seconds]
zipR4ND has quit [Ping timeout: 264 seconds]
DerisiveLogic has joined #crystal-lang
JBat has quit [Quit: Computer has gone to sleep.]
a5i has quit [Quit: Connection closed for inactivity]
DerisiveLogic_ has joined #crystal-lang
DerisiveLogic_ has quit [Remote host closed the connection]
DerisiveLogic_ has joined #crystal-lang
DerisiveLogic has quit [Ping timeout: 256 seconds]
waj has joined #crystal-lang
orliesaurus has quit [Ping timeout: 276 seconds]
BlaXpirit has quit [Quit: Quit Konversation]
orliesaurus has joined #crystal-lang
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: http://git.io/vfrza
<crystal-gh>
crystal/master 9fd3bd6 Ary Borenszweig: Better error message, location and trace when assigning a wrong type to a variable/instance-var with a fixed type