jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.14.1 | 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
marcosdsanchez has quit [Read error: Connection reset by peer]
marcosdsanchez has joined #crystal-lang
endou has quit [Ping timeout: 244 seconds]
pawnbox has joined #crystal-lang
endou has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
matp has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
Philpax has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
jokke has quit [Quit: WeeChat 1.4]
anthony_ has joined #crystal-lang
jokke has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
anthony_ has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
ytti has joined #crystal-lang
ytti has quit [Ping timeout: 240 seconds]
tony_ has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
tony_ has quit [Ping timeout: 246 seconds]
A124 has quit [Read error: Connection reset by peer]
A124 has joined #crystal-lang
pawnbox has joined #crystal-lang
fridgerator has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
fridgerator has quit [Client Quit]
willl has quit [Quit: Connection closed for inactivity]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
bcardiff has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
fridgerator has joined #crystal-lang
fridgerator has quit [Client Quit]
<travis-ci> bcardiff/crystal#0309024 (master - Playground: do not instrument constants declarations #2353): The build passed. https://travis-ci.org/bcardiff/crystal/builds/118413971
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 268 seconds]
<emancu> does anyone connected @here ?
<emancu> *is
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
trapped has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
pawnbox has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
marcosdsanchez has quit [Ping timeout: 248 seconds]
bcardiff has quit [Quit: bcardiff]
onionhammer1 has joined #crystal-lang
onionhammer has quit [Ping timeout: 240 seconds]
ytti has quit [Ping timeout: 240 seconds]
ytti has joined #crystal-lang
kulelu88 has joined #crystal-lang
kulelu88 has joined #crystal-lang
emancu_ has joined #crystal-lang
ytti has quit [Ping timeout: 240 seconds]
emancu has quit [Ping timeout: 240 seconds]
_kfpratt has quit [*.net *.split]
ytti has joined #crystal-lang
_kfpratt has joined #crystal-lang
kfpratt has joined #crystal-lang
ytti has quit [*.net *.split]
_kfpratt has quit [*.net *.split]
kulelu88 has quit [Quit: Leaving]
ytti has joined #crystal-lang
ytti has quit [*.net *.split]
ytti has joined #crystal-lang
ytti has quit [Ping timeout: 240 seconds]
elia has joined #crystal-lang
ytti has joined #crystal-lang
ytti has quit [Ping timeout: 240 seconds]
ytti has joined #crystal-lang
ytti has quit [Ping timeout: 240 seconds]
ytti has joined #crystal-lang
ytti has quit [Ping timeout: 240 seconds]
ytti has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
trapped has joined #crystal-lang
elia has joined #crystal-lang
kulelu88 has joined #crystal-lang
dome22xl has joined #crystal-lang
marcosdsanchez has joined #crystal-lang
kulelu88 has quit [Quit: Leaving]
tony__ has joined #crystal-lang
tony__ has quit [Read error: Connection reset by peer]
tony__ has joined #crystal-lang
<Philpax> hmm - should this work? https://play.crystal-lang.org/#/r/v7h
<Philpax> my line of thought is that raise is NoReturn, and the if statement should be doing a type filter
<Philpax> so if it's nil, the program's over - otherwise, we've removed it from the set of types, leaving just Int
<RX14> Philpax, thing is, instance variables are always nullable
<RX14> because another thread could modify the instance varible to be nil inbetween accesses
<Philpax> grr
<Philpax> hmm
<RX14> you can do `if var = @var`
<RX14> then var is not nillable
<Philpax> yeah, I remember running into this before now
<Philpax> that's still annoying though, especially as I _definitely_ know it can't be modified
<RX14> well
<RX14> use .not_nil! then
<RX14> I don't see why you can't make it a normal variable anyway
rolha has joined #crystal-lang
<rolha> hi everyone
<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
<DeBot> RX14: Syntax error in eval:21: unexpected token: DELIMITER_START - https://carc.in/#/r/v7n
<RX14> >>class Foo; def self.bar; "test"; end; end; p Foo.bar
<DeBot> RX14: "test" - more at https://carc.in/#/r/v7o
<RX14> rolha, ^
<rolha> Philpax: ah, cool. thanks! Is that in the docs? I couldn't find it.
<RX14> it probably isn't
<rolha> RX14: ok :) thanks again!
<Philpax> http://crystal-lang.org/docs/syntax_and_semantics/class_variables.html it's mentioned in the code example here
<Philpax> not sure if it's mentioned elsewhere
<rolha> Philpax: oh, I missed that... :-P thanks
<Philpax> no worries :)
<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> gsl_rng?
bcardiff has quit [Quit: bcardiff]
<BlaXpirit> rolha, that would be gsl_rng*
<BlaXpirit> >> LibC::Double
<DeBot> BlaXpirit: # => Float64 - https://carc.in/#/r/v8i
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
ragmaanir has joined #crystal-lang
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
ragmaanir has quit [Quit: Leaving]