RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.2 | 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
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
qard has left #crystal-lang ["Textual IRC Client: www.textualapp.com"]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
Liothen has quit [Changing host]
Liothen has joined #crystal-lang
kulelu88 has quit [Quit: Leaving]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 248 seconds]
<wmoxam> I missed the discussion on templating earlier ... would anyone be interested in a Crystal version of Liquid?
Philpax has joined #crystal-lang
<FromGitter> <bcardiff> I think the whole point of liquid is to be safe to be executed by hosted servers or to run templates inputed by an (untrusted) user. That's the reason why it's too limited the things that you can express.
<FromGitter> <bcardiff> A native parser / renderer could be fun though. for sure.
<wmoxam> Yeah, a CMS is def a primary use case for Liquid
Oliphaunte has joined #crystal-lang
bew78 has quit [Read error: No route to host]
Oliphaunte has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 276 seconds]
Philpax has joined #crystal-lang
<FromGitter> <piedoom> Isn't that what Jekyll uses?
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 244 seconds]
soveran has joined #crystal-lang
Oliphaunte has joined #crystal-lang
soveran has quit [Ping timeout: 264 seconds]
Oliphaunte has quit [Ping timeout: 265 seconds]
matp has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <raydf> wmoxam, that would be amazing for developing an open source cms :). I'll love to see that project.
<FromGitter> <piedoom> I have some critiques and ideas for crystal's current homepage designs. Would they be welcome here/on github when I finish?
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 276 seconds]
Guest_84884 has joined #crystal-lang
<Guest_84884> allah is doing
<Guest_84884> sun is not doing allah is doing
<Guest_84884> moon is not doing allah is doing
<Guest_84884> stars are not doing allah is doing
<Guest_84884> planets are not doing allah is doing
<FromGitter> <piedoom> aight b
<Guest_84884> galaxies are not doing allah is doing
<Guest_84884> oceans are not doing allah is doing
<Guest_84884> mountains are not doing allah is doing
<Guest_84884> trees are not doing allah is doing
<Guest_84884> mom is not doing allah is doing
<Guest_84884> dad is not doing allah is doing
<Guest_84884> boss is not doing allah is doing
<Guest_84884> job is not doing allah is doing
<Guest_84884> dollar is not doing allah is doing
<Guest_84884> degree is not doing allah is doing
<Guest_84884> medicine is not doing allah is doing
<Guest_84884> customers are not doing allah is doing
<Guest_84884> you can not get a job without the permission of allah
<Guest_84884> you can not get married without the permission of allah
<FromGitter> <piedoom> welp
<txdv> not the first channel I see this pakistani dude write this shit
<FromGitter> <piedoom> lmao
<FromGitter> <piedoom> here spammer dude, made you a script. ⏎ ⏎ https://gist.github.com/piedoom/9b4f1c86132ff6aa1233111193c0b33f
<txdv> i dont undestand this 'x is not doing allah is doing'
<FromGitter> <piedoom> I think they were saying that "everything is possible because of allah"
<FromGitter> <piedoom> Which hey, I don't have a problem with. Just hate when people space :(
<FromGitter> <piedoom> *spam
<txdv> the compiler will only compile if you believe in god, right?
<FromGitter> <piedoom> hahaha
pawnbox has quit [Remote host closed the connection]
<FromGitter> <piedoom> issue #3335: compiler does not work if atheist
<FromGitter> <piedoom> Really curious now if that guy was actually a guy or just some automatic bot that finds servers with irc ports open and posts that every time
<txdv> also, how do i get a permission for a job from allah
<txdv> ?
<txdv> where do i have to apply, or send a message?
<FromGitter> <piedoom> might be on IRC
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
Guest_84884 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
soveran has quit [Ping timeout: 255 seconds]
soveran has joined #crystal-lang
ssvb has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 276 seconds]
A124 has quit [Ping timeout: 276 seconds]
A124 has joined #crystal-lang
Philpax has joined #crystal-lang
soveran has quit []
soveran has joined #crystal-lang
Philpax has quit [Ping timeout: 276 seconds]
ome has joined #crystal-lang
mark_66 has joined #crystal-lang
Philpax has joined #crystal-lang
pawnbox has quit [Read error: No route to host]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
sandelius has joined #crystal-lang
<greenbigfrog> good morning
<greenbigfrog> what does the "Program received and didn't handle signal SYS (31)" mean?
Oliphaunte has joined #crystal-lang
pawnbox has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 264 seconds]
<BlaXpirit> greenbigfrog, do you get this on your computer also?
<greenbigfrog> no
<BlaXpirit> greenbigfrog, well it's probably blocked to prevent abuse
<greenbigfrog> ok
<BlaXpirit> accessing the internet is blocked, that is
<greenbigfrog> wasn't aware of that :)
<greenbigfrog> is there anything like hastebin, which supports cr highlighting? (or jsut use rb?)
bjz has joined #crystal-lang
<greenbigfrog> anyway: http://hastebin.com/gojefiwiki.rb
<BlaXpirit> greenbigfrog, i hate hastebin so much D:
<BlaXpirit> greenbigfrog, https://gist.github.com/
onethirtyfive has joined #crystal-lang
<greenbigfrog> how can I make/be sure that response doesn't just point to the "HTTP::Client.get "http://api.yomomma.info/"" but actually to the result?
<BlaXpirit> I don't imderstamd
pawnbox has quit [Remote host closed the connection]
<BlaXpirit> I don't understand
<greenbigfrog> if you run the code from the hastebin, (in icr), you get a diffrent result for "puts res" since it just points to the mthod...
pawnbox has joined #crystal-lang
<greenbigfrog> BlaXpirit: you understand what I mean?
<BlaXpirit> no
<BlaXpirit> I ran the code and can't detect any problem
<greenbigfrog> if you do "puts res" it prints something else each time... (because it polls the API each time)
<BlaXpirit> greenbigfrog, finally I understand
<BlaXpirit> you are running into the magic of icr
<BlaXpirit> basically it concatenates the code and reruns everything you've typed until now every time
<BlaXpirit> there is nothing like 'pointing to the method' happening here
<BlaXpirit> sadly, icr is dangerous :(
<BlaXpirit> please use `crystal play` instead
<greenbigfrog> ok
<greenbigfrog> :)
<greenbigfrog> sorry :)
<greenbigfrog> I actually had wondered in the beack fo my head if that could be the cause
<BlaXpirit> greenbigfrog, yeah because it's a compiled language there is no good way to make an interactive shell, so `icr` has to do that magic
<greenbigfrog> yep
<greenbigfrog> thanks!
<BlaXpirit> works seamlessly in most cases but it reruns everything :(
* greenbigfrog still has to learn a lot about crystal "workflow"
pawnbox has quit [Remote host closed the connection]
<BlaXpirit> write a program, run it
<BlaXpirit> `crystal play` is the best for quickly trying things
pawnbox has joined #crystal-lang
<greenbigfrog> yep
matp has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<BlaXpirit> greenbigfrog, oh and another thing that may be confusing. I didn't mean "use play.crystal-lang.org" (though that's nice too) but run `crystal play` to run the browser-based tool
<BlaXpirit> (sorry if that was clear anyway)
<greenbigfrog> was clear! but thanls fpr trying to be as clear as possible!
globalkeith has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
globalke_ has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
globalkeith has quit [Ping timeout: 272 seconds]
bjz_ has joined #crystal-lang
bjz_ has quit [Read error: Connection reset by peer]
bjz has quit [Ping timeout: 264 seconds]
Oliphaunte has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 240 seconds]
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
matp has quit [Quit: ZZzzzZz...]
pawnbox has joined #crystal-lang
bew78 has joined #crystal-lang
<FromGitter> <piedoom> I'm probably oversimplifying this a ton, but I thought swift has an interactive shell and it uses the same tools as crystal. Would that mean making a shell for crystal could be the same process?
<FromGitter> <piedoom> Also apologies in advance for someone who understands next to nil about compilers and lexers and all that jazz
<BlaXpirit> i honestly think that an interactive shell is not useful
<BlaXpirit> 'crystal play' beats such a shell by all comparisons
matp has joined #crystal-lang
onethirtyfive has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
<FromGitter> <piedoom> eh it's good for playing around but for quick stuff I'd rather not open up a web browser
<FromGitter> <piedoom> especially if I'm in an ssh session or something
pawnbox has joined #crystal-lang
onethirtyfive has joined #crystal-lang
ome has quit [Quit: Connection closed for inactivity]
onethirtyfive has quit [Ping timeout: 244 seconds]
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 265 seconds]
bew78 has quit [Ping timeout: 240 seconds]
soveran has quit [Remote host closed the connection]
bjz has quit [Ping timeout: 265 seconds]
bjz has joined #crystal-lang
soveran has joined #crystal-lang
<greenbigfrog> how can "merge"(?) string (fergot to rename) into hash? << is obviously wrong
Oliphaunte has joined #crystal-lang
bew78 has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 272 seconds]
<BlaXpirit> wait what
<BlaXpirit> greenbigfrog, please make the question clearer.
<BlaXpirit> have you read the introductory documentation anyway?
<greenbigfrog> yes
<greenbigfrog> in ruby I can do sth like: a = []; a << "hi"
<BlaXpirit> so..?
<greenbigfrog> how can I do sth like that in crystal
* greenbigfrog is confused
<FromGitter> <helper2424> in ruby [] is an Array, not Hash)
<greenbigfrog> yes
<greenbigfrog> ok... So it seams to work with arrays... but why does << not exist for Hashes?
<BlaXpirit> greenbigfrog, probably because hash is not a collection of singular items
<FromGitter> <helper2424> Because hash require `key`
<greenbigfrog> I think I'm just messing sth up horribly ATM...
<BlaXpirit> biggest problem is thinking you know something in crystal because you know it in ruby
<FromGitter> <helper2424> Hash - is a strcture with `key`: `value` format. It's impossible to put inside this just `value`
<greenbigfrog> oh... I think know now where the knot in my brain was...
<greenbigfrog> thanks!
<greenbigfrog> https://gist.github.com/greenbigfrog/093949e27748d9987e2954821672a211 I'm confused why .as_s.to_f works, but .as_f doesn't...
<asterite> greenbigfrog: `as_f` assumes the underlying value is a Float, and uses `.as(Float)`, while `to_f` converts a string to a float by parsing it
<greenbigfrog> but isn't the underlying value a float?
<asterite> "price":"0.00000037"
<asterite> the value is between double quotes
<greenbigfrog> oh... yep
<greenbigfrog> thanks
trapped has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 255 seconds]
pawnbox has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
pawnbox has joined #crystal-lang
Oliphaun_ has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 248 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
<BlaXpirit> I have this problem where a C library manages an object's lifetime and then a pointer to the object gets introduced to Crystal code, and whenever the pointer is gone, the GC deletes that memory. how can I avoid the problem?
<RX14> BlaXpirit, create the memory that that object's in using normal malloc, instead of the GC malloc?
<BlaXpirit> RX14, i do not create the memory
<RX14> uhh
<RX14> shouldn't it be using system malloc then
<RX14> and just work?
<RX14> thats weird
<BlaXpirit> i'm not entirely sure this is what happens but it really seems so
<BlaXpirit> if only it wasnt such a huge pain to set up a conclusive test
<RX14> BlaXpirit, malloc something using LibC.malloc, create a pointer to it from crystal
<BlaXpirit> hm i suppose. maybe that'll do it, no actual C involved
pawnbox has joined #crystal-lang
<RX14> we really should start running test suites on all platformed merged into core
<RX14> like the BSDs
<BlaXpirit> easier said than done
<RX14> can we use quemu+kvm on travis?
<BlaXpirit> i sure doubt that
<BlaXpirit> i mean these are VMs in the first place
<BlaXpirit> RX14, does not reproduce, i fully expected that. https://carc.in/#/r/1afv
<RX14> BlaXpirit, uhh
<RX14> uhh
<RX14> Lib::S.new
<RX14> that uses GC malloc
<BlaXpirit> well it's a struct anyway so it can't be GC
<RX14> yes
<BlaXpirit> just tried to create similar circumstances to what is happening in my case
<RX14> bit it's not because the pointer points into the stack
<RX14> not malloc'd memory
<BlaXpirit> please examine the code more carefully
<RX14> the malloc call gets overwritten when you call value= i'm sure
<BlaXpirit> well then you tell me how to set the memory in a different way
<RX14> just remove line 8
<BlaXpirit> . . .
<BlaXpirit> well it shows zeroes as output which is correct. so?
<RX14> you already malloc'ed on line 7
<RX14> i'm not exactly sure what value= does tbh
<RX14> it either changes the pojnter to point at the value, or memory copies it to the place
<BlaXpirit> well i am sure what it does
<BlaXpirit> it copies indeed
<RX14> uh yeah
<RX14> well i guess that code works then
<RX14> BlaXpirit, yeah i guess i'm wrong
<BlaXpirit> alright, i've reproduced it
<BlaXpirit> no
<BlaXpirit> this is wrong, sorry :(
<BlaXpirit> ah that's the thing that the reproduction code doesn't take into account
<BlaXpirit> the original `ptr` is still there
<BlaXpirit> while in my case it's somewhere in C
<BlaXpirit> I can't get it to fail even like this https://carc.in/#/r/1agg
<Papierkorb> How can I get a pointer to a C `fun` function?
<BlaXpirit> uhhhh that's an interesting one
<crystal-gh> [crystal] jwaldrip closed pull request #3328: Discussion: Crystal Install - Install Crystal Command Line Tools (master...master) https://git.io/vi1CU
<BlaXpirit> &->Lib.fun(Int32) sth like this maybe
<Papierkorb> (A real pointer, not a Proc which gets destroyed in the next moment)
<BlaXpirit> i think this is it
<BlaXpirit> as long as there are no { } it shouldn't be a new Proc
<Papierkorb> BlaXpirit: And then I can use Proc#pointer. Thanks
Oliphaun_ has quit [Remote host closed the connection]
<BlaXpirit> Papierkorb, at least u can call the same thing twice and check that it returns the same pointer
<Papierkorb> I reran the program in the playground, and as expected it showed the same pointer
<BlaXpirit> Papierkorb, well i mean copypaste the code twice to be really sure
<BlaXpirit> maybe it happened to be the same pointer
Oliphaunte has joined #crystal-lang
<Papierkorb> I did, the pointer address is also pretty small, far away from the heap
<BlaXpirit> good
Philpax has quit [Ping timeout: 255 seconds]
trapped has quit [Read error: Connection reset by peer]
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
greengriminal has joined #crystal-lang
<crystal-gh> [crystal] kostya opened pull request #3337: fix base64 decode bug (master...base64_fix) https://git.io/viQep
Oliphaunte has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
kostya has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
globalke_ has quit [Ping timeout: 265 seconds]
Oliphaunte has quit [Remote host closed the connection]
globalkeith has joined #crystal-lang
<RX14> BlaXpirit, did you read the issue on commandline package management?
<BlaXpirit> no
<RX14> oh
<BlaXpirit> "issue"
<RX14> yeah its weird I know
<BlaXpirit> i don't really care, it's gonna end up bad anyway
Ven_ has joined #crystal-lang
<tilpner> Why? Is there no way to make it acceptable?
<BlaXpirit> yes, acceptable to some people and some use cases
<FromGitter> <jwoertink> > node gyp error what the f*** does that mean
<FromGitter> <jwoertink> LOL! :joy:
<BlaXpirit> uhhhh
soveran has joined #crystal-lang
Oliphaunte has joined #crystal-lang
globalkeith has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
soveran has quit [Ping timeout: 240 seconds]
Ven_ has quit [Ping timeout: 240 seconds]
Oliphaunte has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
Oliphaunte has joined #crystal-lang
Ven_ has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
pawnbox has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby_ has joined #crystal-lang
kostya has quit [Quit: Leaving]
mgarciaisaia has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/viQ0I
<crystal-gh> crystal/master 9156f79 Ary Borenszweig: Spec: error if unknown arguments are given. Fixes #3336
<crystal-gh> crystal/master c208aa7 Ary Borenszweig: Issue template: say that you should search a bug before submitting it
ponga has quit [Quit: Connection closed for inactivity]
Oliphaunte has quit [Remote host closed the connection]
greengriminal has quit [Quit: This computer has gone to sleep]
Oliphaunte has joined #crystal-lang
Ven_ has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sandelius has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
globalkeith has joined #crystal-lang
soveran has quit [Remote host closed the connection]
globalkeith has quit [Client Quit]
globalkeith has joined #crystal-lang
globalkeith has quit [Client Quit]
globalkeith has joined #crystal-lang
<FromGitter> <piedoom> Why exactly is there both a haml and html version of the Crystal website index?
<travis-ci> crystal-lang/crystal#9156f79 (master - Spec: error if unknown arguments are given. Fixes #3336): The build is still failing. https://travis-ci.org/crystal-lang/crystal/builds/161695045
<DeBot> https://github.com/crystal-lang/crystal/issues/3336 (crystal spec on unexpected file)
globalkeith has quit [Ping timeout: 272 seconds]
<BlaXpirit> piedoom, must be a leftover
Oliphaunte has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Oliphaunte has quit [Ping timeout: 276 seconds]
Oliphaunte has joined #crystal-lang
<RX14> why on earth does this compile? https://carc.in/#/r/1ah0
<RX14> "/foo" isn't a LibC::Char*
<BlaXpirit> RX14, why not
<BlaXpirit> it has to_unsafe that is that
<RX14> BlaXpirit, but you don't call to_unsafe
<RX14> you just pass a strinbg
<RX14> so String should be incompatible with LibC::Char*
<RX14> does calling a lib function automatically call to_unsafe?!
greengriminal has joined #crystal-lang
A124 has quit [Quit: '']
<RX14> ugh
<RX14> too magic
<RX14> just like yielding tuples
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
A124 has joined #crystal-lang
Ven__ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
mgarciaisaia has joined #crystal-lang
<RX14> *sigh*
Oliphaunte has quit []
Ven__ has quit [Ping timeout: 248 seconds]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
ruby_ has quit []
mgarciaisaia has left #crystal-lang [#crystal-lang]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
greengriminal has joined #crystal-lang
bew78 has quit [Ping timeout: 272 seconds]
Ven_ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
bazaar has quit [Quit: leaving]
bazaar has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
pabs has quit [Quit: irssi upgrade]
pabs has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vi7fN
<crystal-gh> crystal/master d657b9a Ary Borenszweig: Fixed #3332: incorrect cast placement of `to_u32`
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ssvb has joined #crystal-lang
onionhammer has quit [Ping timeout: 248 seconds]
onionhammer has joined #crystal-lang
soveran has quit [Remote host closed the connection]
greengriminal has quit [Quit: Leaving]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 248 seconds]