<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?
<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?
<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]
<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