rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
konflikt has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
konflikt has quit [Client Quit]
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
rmosolgo has quit [Ping timeout: 240 seconds]
leafybasil has joined #crystal-lang
<ukd1>
I'm trying to convert an array to a hash - ["a", "b", "c", "d"] ---> {"a"=>"b", "c"=>"d"}, I'm failing with Hash.new(*some_array). Any help would be great!
leafybasil has quit [Ping timeout: 255 seconds]
NeverDie has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
rmosolgo has joined #crystal-lang
Philpax has joined #crystal-lang
leafybasil has joined #crystal-lang
Philpax has quit [Quit: Leaving]
bcardiff has joined #crystal-lang
leafybasil has quit [Ping timeout: 268 seconds]
bcardiff has quit [Quit: bcardiff]
pawnbox has joined #crystal-lang
xd1le has joined #crystal-lang
canhtak has joined #crystal-lang
unshadow has joined #crystal-lang
BlaXpirit has joined #crystal-lang
canhtak has quit [Quit: canhtak]
unshadow has quit [Quit: leaving]
Ven has joined #crystal-lang
trapped has joined #crystal-lang
Netfeed has left #crystal-lang ["WeeChat 1.0.1"]
reed_ has joined #crystal-lang
leafybasil has joined #crystal-lang
reed_ has quit [Ping timeout: 256 seconds]
leafybasil has quit [Ping timeout: 260 seconds]
nakilon has joined #crystal-lang
gamemanj has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
elia has joined #crystal-lang
trapped has quit [Client Quit]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
ssvb has quit [Ping timeout: 268 seconds]
<crystal-gh>
[crystal] adlerhsieh opened pull request #1803: Remove extra curly brackets in documentation (master...add-doc-2) http://git.io/vWZmX
nakilon has quit [Ping timeout: 272 seconds]
globalkeith has joined #crystal-lang
<crystal-gh>
[crystal] ysbaddaden closed pull request #1803: Remove extra curly brackets in documentation (master...add-doc-2) http://git.io/vWZmX
<jhass>
rmosolgo: you need to get a better connection :P
<rmosolgo>
:'(
rmosolgo has quit [Read error: Connection reset by peer]
rmosolgo has joined #crystal-lang
<jhass>
rmosolgo: I mean seriously
<jhass>
but to answer your question, not that I'm aware of, and I don't see a real need to reimplement guard. In fact I'd consider just writing a guard plugin instead
pawnbox_ has quit [Remote host closed the connection]
<xdougx>
jhass: changed everything, going not to use block to work in this case, simplified using methods, its just a script to validation and import, its not an abstraction, its just an case that i have to work
rmosolgo has quit [Read error: Connection reset by peer]
<jhass>
xdougx: you do see what I changed though?
<jhass>
xdougx: in your real code your hash type is Hash(String, String|Nil)
<xdougx>
jhass: yeah, "c": nil, but to not get an nil exception hash.fetch(key).to_s
<jhass>
that should be fixable in the standard library by providing overloads on the smaller type for the bigger type as parameter, if you want to take a look
<mroth>
jhass: gotcha... I somehow didn't find that issue when searching GitHub, thanks
<mroth>
as per https://github.com/manastech/crystal/pull/1611#issuecomment-143506095, "spawn will be parallel soon" -- I'm also having trouble locating information related to that happening on the GitHub repo (GitHub search unfortunately leaves a lot to be desired), anyone know where I can look?
<mroth>
Apologies for all the newbie questions
<jokke>
jhass: i'm trying to ship a crystal bin to a centos box
<jokke>
but i'm missing libpcl.so.1
<jokke>
any idea where i might get it from?
<jokke>
it's not in the centos repo
<jhass>
you're asking me something about CentOS? Are you really sure you want to do that?
<jokke>
:D
<jhass>
I hate CentOS, clear?
<xdougx>
^^^^ LOL
<jokke>
jhass: yeah, i understand that :D
<jokke>
i just need it for one project
<jokke>
i'm doing fpga programming this semester and need a centos nspawn container for this piece of shit software for programming the fpga
edaaa_ has quit [Quit: leaving]
reed_ has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
edaaa_ has joined #crystal-lang
<edaaa_>
is there something like ruby's array#pack in crystal?
<jokke>
jhass: oh oh...
<jokke>
vimctl-client: symbol lookup error: vimctl-client: undefined symbol: GC_get_push_other_roots
<jhass>
jokke: ah well, that old friend
<jhass>
get a patched libgc?
<jokke>
oh god
<jokke>
where from? :D
<jhass>
probably getting the rpm spec, modifying it to apply the patch and rebuilding it
<jokke>
m(
<jhass>
alternatively get a static version of libgc and compile against it
<jhass>
edaaa_: nope, what do you need exactly?
<jokke>
ok that kinda sucks...
<jokke>
i guess i need to write this in ruby then :(
<edaaa_>
i have an array of bytes and basically i want to transform it into a binary sequence but according to a specification
<edaaa_>
jhass, like interpret each byte as an int32
<edaaa_>
jhass, i'm totally new to crystal so i guess there is a way to do that with crystal's stdlib
<xdougx>
jhass: why i cant cast (Nil | String | Int64 | Float64 | Bool | Hash(String, JSON::Type) | Array(JSON::Type)) into Int64? getting cast to Int64 failed (TypeCastError)
<jhass>
xdougx: that's a runtime error, no?
<xdougx>
jhass: yes
fowlduck has joined #crystal-lang
<jhass>
edaaa_: that's a little vague. Convert each byte to a int32 (so pad with 3 0-bytes?) or interpret create a byte sequence of int32's?
<jhass>
(so transform each int32 you have to four bytes and concatenate everything)
<jhass>
xdougx: so you don't have an Int64 where you think you have one
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
edaaa_: best you detail a bit of what you exactly have and what you want to do with it
A124 has quit [Quit: '']
<xdougx>
jhass: is "1" the value
<jhass>
xdougx: that's a string
<xdougx>
is that possible to cast into int64?
<jhass>
you can't _cast_ a string to a number (in a meaningful way), however you can _convert_
<xdougx>
exists any implementation of inflection in crystal
<xdougx>
?
<jhass>
you mean for i18n or...?
<xdougx>
pluralization, but i dont think its necessary
<jhass>
doesn't gettext handle inflection too these days? it does pluralization for sure. So I'd look into doing a gettext binding
edin__ has quit [Ping timeout: 240 seconds]
<xdougx>
gettext binding, going to search
<jhass>
I don't think there's one yet
<jhass>
but it might actually be something I'd argue for (eventual) inclusion into stdlib
<xdougx>
thats nice
<xdougx>
is that possible to add into property macro to add the params into a variable like `attributes` or `properties` to call Foo.new.properties => [a, b, c, d]
<jhass>
yes, but I don't think that'll be accepted into stdlib
shama has joined #crystal-lang
benoist has quit [Remote host closed the connection]