<RX14>
raise/return if x.nil? really should make x not-nillable for the rest of the block
<Philpax>
RX14: my instance variable is created in a function called by the initialize function, and then the initialize function uess the instance variable
<rolha>
how do I call a static method in Crystal? Is it the same syntax as Ruby? i.e class Foo self.Bar() // end-> Foo.Bar()?
<Philpax>
I can use if a = @a or make a copy of it, but that's still annoying
<Philpax>
oh, well
<Philpax>
rolha, Class.staticMethod(...)
<Philpax>
(parens optional, as per usual)
<RX14>
>>class Foo; def self.bar "test" end; end; p Foo.bar
<dome22xl>
Is there anyway of seeing the code that has been generated by macros ?
<RX14>
{{debug()}}
<RX14>
dumps code generated so far by the current macro
<RX14>
you can also use expand.cr to dump a whole source file completely expanded
<dome22xl>
aah ok thankyou i'll check that out i'm playing with the Artanis framework and trying to work out exactly what its doing.
<RX14>
black magic with macros most likely
tony__ has quit [Ping timeout: 276 seconds]
adam| is now known as adam
adam is now known as adam12
<dome22xl>
Well thats help alot yes its crazy stuff
<dome22xl>
at least i can read it now.
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 246 seconds]
tony__ has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
Dreamer3_ has quit [Quit: Computer has gone to sleep.]
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rolha has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
rolha has quit [Remote host closed the connection]
rolha has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
matp has quit [Remote host closed the connection]
bcardiff has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
matp has joined #crystal-lang
marcosdsanchez has quit [Read error: Connection reset by peer]
marcosdsanchez has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
willl has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
bcardiff has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
teukka has joined #crystal-lang
Raimondi has quit [Quit: The road to wisdom?—Well, it's plain and simple to express: Err and err and err again, but less and less and less. — Piet Hein]
Raimondi has joined #crystal-lang
greengriminal has joined #crystal-lang
ragmaanir has joined #crystal-lang
zodiak has quit [Quit: Leaving]
rolha_ has joined #crystal-lang
rolha has quit [Ping timeout: 260 seconds]
greengriminal has quit [Quit: Leaving]
rolha_ has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
rolha has joined #crystal-lang
<rolha>
how do I specify a depency on a local library with shards?
<rolha>
ah, got it
<rolha>
"path"
<crystal-gh>
[crystal] vjdhama opened pull request #2367: fixed couple of typos in documentation (master...master) https://git.io/vajND
elia has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
Rinkana has joined #crystal-lang
<Rinkana>
Hey there, is anyone using the Crystal HTTP::Server with Vagrant? I can't get the server to handle those requests. Port forwarding within vagrant is set up
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rinkana has quit [Read error: Connection reset by peer]
rolha has joined #crystal-lang
dome22xl has quit [Remote host closed the connection]
ragmaanir has quit [Quit: Leaving]
Excureo has quit [Remote host closed the connection]
Excureo has joined #crystal-lang
yxhuvvd has quit [Quit: Leaving]
yxhuvud has joined #crystal-lang
bcardiff has joined #crystal-lang
<rolha>
In a C binding, how can I define the type for this function: double gsl_ran_gaussian (const gsl_rng * r, double sigma)
rolha has quit [Remote host closed the connection]
bcardiff has joined #crystal-lang
rolha has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
pawnbox has quit [Remote host closed the connection]
<tilpner>
How does String#to_unsafe interact with the GC? Does the dynamic link to libgc mean Crystal uses the conserative Boehm GC?
donpdonp has left #crystal-lang ["WeeChat 1.4"]
<tilpner>
If it does, would that mean the source string is not freed as long as I keep the unsafe slice around?
mgarciaisaia has joined #crystal-lang
bcardiff has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
<tilpner>
Judging from the filename src/gc/boehm.cr, it's probably Boehm. :D
<BlaXpirit>
tilpner, is boehm and yes, i think this fact is used throughout the code
<BlaXpirit>
like, Array allocates a memory region and never even deletes it
<tilpner>
I may be misunderstanding something, but wouldn't any Crystal binary potentially accumulate memory leakage as it runs? How does that work for long-running tasks?
<BlaXpirit>
tilpner, ugh yes, that happens
<BlaXpirit>
i didn't properly study this but it does eat up memory
<BlaXpirit>
though I didn't see it grow without bounds
<crystal-gh>
[crystal] tmatilai opened pull request #2368: Add `Etc` module with methods for fetching user information (master...feature/etc_module) https://git.io/vVeV6
<tilpner>
That's... sad, but not surprising. :(
* tilpner
doesn't find an issue on this.
<tilpner>
Thanks once again, BlaXpirit. :)
Philpax has joined #crystal-lang
Dreamer3_ has joined #crystal-lang
tony__ has quit [Ping timeout: 248 seconds]
<crystal-gh>
[crystal] MGerrior opened pull request #2370: Fix typo in Regex::MatchData documentation (master...patch-1) https://git.io/vVe6b