ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.2 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
jwaldrip_ has joined #crystal-lang
FromGitter has quit [Ping timeout: 265 seconds]
ilovezfs_ has quit [Ping timeout: 265 seconds]
ilovezfs__ has joined #crystal-lang
jwaldrip has quit [Ping timeout: 265 seconds]
jwaldrip_ is now known as jwaldrip
GoldenBear has quit [Ping timeout: 265 seconds]
GoldenBear has joined #crystal-lang
FromGitter has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37 has quit [Read error: Connection reset by peer]
p0p0pr37_ is now known as p0p0pr37
cptaffe has quit [Ping timeout: 245 seconds]
Renich has quit [Ping timeout: 240 seconds]
kixune[m] has quit [Ping timeout: 245 seconds]
braidn[m] has quit [Ping timeout: 240 seconds]
kp666[m] has quit [Ping timeout: 255 seconds]
olbat[m] has quit [Ping timeout: 256 seconds]
byteflame has quit [Ping timeout: 260 seconds]
fifr[m] has quit [Ping timeout: 277 seconds]
return0e has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37 has quit [Ping timeout: 256 seconds]
p0p0pr37_ is now known as p0p0pr37
olbat[m] has joined #crystal-lang
<FromGitter> <S-YOU> @fgimian, not sure this is a solve issue. but for `struct.unpack( ...: '>6xBBQQQ',`, ruby / python, you can't touch memory directly so you have to do like that, In crystal or C, you can just write in struct and cast it.
<FromGitter> <fgimian> @S-YOU I realised that after I got into the detail yeah, but good point about using a struct, that will probably save me some code!
<FromGitter> <fgimian> thank you so much for the reply!! 😄
<FromGitter> <fgimian> atm I'm just using `IO.read_bytes` with the appropriate type for each byte, and that works great too
<FromGitter> <fgimian> it just leads to slightly more code 😄
<FromGitter> <S-YOU> I see. Yeah. Not sure read_bytes can be done without allocating memory, but struct can inline down to CPU instruction level.
<FromGitter> <fgimian> good point! I'll absolutely give it a try this evening
<FromGitter> <fgimian> thanks again, really appreciate your help and support 😄
<FromGitter> <codenoid> `if you're not familiar with the "diamon dependency" problem, or don't know what "NP-complete" is, then you need to read up on those`
<FromGitter> <codenoid> hi, can anybody here explain about `diamon dependency` and `NP-complete` problem, pls
return0e has quit [Remote host closed the connection]
<FromGitter> <codenoid> I better understand the explanations of members here, than elsewhere
cyberarm_ has joined #crystal-lang
cyberarm has quit [Ping timeout: 256 seconds]
<FromGitter> <bew> google is your friend.. really
return0e has joined #crystal-lang
<FromGitter> <codenoid> yeah, i understand
fifr[m] has joined #crystal-lang
byteflame has joined #crystal-lang
cptaffe has joined #crystal-lang
Renich has joined #crystal-lang
braidn[m] has joined #crystal-lang
kp666[m] has joined #crystal-lang
kixune[m] has joined #crystal-lang
moei has quit [Ping timeout: 248 seconds]
moei has joined #crystal-lang
return0e has quit []
return0e has joined #crystal-lang
<FromGitter> <skippi> Is there a case equality `===` expectation for Specs?
<FromGitter> <girng> hello!
<FromGitter> <fridgerator> @skippi I dont think so
<FromGitter> <skippi> @fridgerator Thanks anyway. Doesn't seem like `===` is functionally different from `==` (which is how the eq expection is implemented I think). For some reason, was thinking `===` could return false floats and integer comparison.
<FromGitter> <fridgerator> I didnt even know crystal had `===` tbh
<FromGitter> <skippi> I wrote a doctester for crystal, so I was looking for ways to implement strict comparisons.
Nathanaelle has joined #crystal-lang
Nathanaelle has quit [Read error: Connection reset by peer]
snsei has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
snsei has quit [Remote host closed the connection]
p0p0pr37 has quit [Ping timeout: 256 seconds]
p0p0pr37_ is now known as p0p0pr37
ilovezfs__ is now known as ilovezfs_
thews has quit [Read error: Connection reset by peer]
thews has joined #crystal-lang
thews has joined #crystal-lang
thews has quit [Changing host]
pabs has quit [Ping timeout: 248 seconds]
pabs has joined #crystal-lang
Nathanaelle has joined #crystal-lang
<FromGitter> <Grabli66> Hi! Is there a plan to make possible write plugins in crystal for crystal without IPC and marshaling?
Nathanaelle has quit [Ping timeout: 256 seconds]
Nathanaelle has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37 has quit [Ping timeout: 240 seconds]
p0p0pr37_ is now known as p0p0pr37
<FromGitter> <girng> What does === mean in crystal,I thought that was a JavaScript thing?
<FromGitter> <evandrojr> Kotlin has It too but os
<FromGitter> <evandrojr> Is different
csk157 has joined #crystal-lang
<FromGitter> <S-YOU> It is closer to ruby. Not strict check like javascript, but type check like ruby, in my understanding. ⏎ ⏎ ```irb(main):002:0> Numeric === 1 ⏎ => true``` [https://gitter.im/crystal-lang/crystal?at=5b0e4d9fe26c847ac8a12e6e]
<FromGitter> <yxhuvud> girng: === is what case use to compare with. And that is about the only thing you should ever use it for (but it makes for very nice case statements)
Guest23822 is now known as oz
<FromGitter> <hmans> I'm sitting in a train, doing some Crystal
<FromGitter> <hmans> 2018 is awesome
Nathanaelle has quit [Ping timeout: 240 seconds]
Nathanaelle has joined #crystal-lang
<FromGitter> <yorci> how to get client ip no behind any proxy i mean like nginx?
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
DSNTravellerbot[ has joined #crystal-lang
<FromGitter> <straight-shoota> @Grabli66 No, there are no plans. And there won't be anytime soon. Crystal's global type inference makes it nearly impossible to compile Crystal libraries and combine them later. You would have different types in the plugins and everything breaks.
<FromGitter> <Grabli66> But how to build a big application that has many modules?
<FromGitter> <Grabli66> I think about something like message bus. But it will be slow 😄
fytyhjubh has joined #crystal-lang
fytyhjubh has quit [Client Quit]
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 276 seconds]
<crystal-gh> [crystal] emq opened pull request #6145: [WIP] Redo HTTP::StaticFileHandler (master...redo_static_file_handler) https://git.io/vhsyl
Nathanaelle has quit [Read error: Connection reset by peer]
<FromGitter> <vladfaust> Trying to benchmark https://github.com/gothinkster/rails-realworld-example-app with wrk, getting "Can't verify CSRF token authenticity".
Nathanaelle has joined #crystal-lang
<FromGitter> <vladfaust> Also needed to install NodeJS (!) to run Rails 😕
duane has joined #crystal-lang
<FromGitter> <fridgerator> Atwoods Law
<FromGitter> <fridgerator> "any application that can be written in JavaScript, will eventually be written in JavaScript"
sz0 has quit [Quit: Connection closed for inactivity]
return0e has joined #crystal-lang
Nathanaelle has quit [Ping timeout: 245 seconds]
return0e_ has quit [Ping timeout: 255 seconds]
Nathanaelle has joined #crystal-lang
<FromGitter> <vladfaust> Just for lulz https://github.com/vladfaust/realworld-benchmark
<z64> are there any common gotchas as to why an `at_exit` hook wouldn't be working? specifically i have a UNIXServer i'm trying to clean up - `at_exit { server.close }` - but this leaves the `.sock` behind
<FromGitter> <forkev_twitter> @vladfaust "Rails and Ruby are dead for me." - lol
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
<FromGitter> <Val> nice =)
Rifa[m] has joined #crystal-lang
Nathanaelle has quit [Read error: Connection reset by peer]
return0e_ has joined #crystal-lang
Nathanaelle has joined #crystal-lang
return0e has quit [Ping timeout: 256 seconds]
<f1refly> I'm trying to write some tests currently, but my program executes every time i call `crystal spec`
<f1refly> Is there a way to have it not execute automatically?
<z64> f1refly: you can move the "executing" portion of your code to `run.cr` that is not required by your spec suite
<f1refly> z64: That'd be great, is there a way to exclude that file while requiring without listing everything manually?
<z64> say you have `src/foo.cr`, and `src/foo/*` where all your files are. you have `foo.cr` `require "./foo/*"` and then just have `src/run.cr`
<z64> and your spec_helper.cr will just `require "src/foo"`
<z64> does that make sense? i may have an example repo laying around
<f1refly> that seems very reasonable, yeah
<z64> alright cool
<RX14> I just put my running code in src/entrypoint.cr
<RX14> it then requires ./foo
<RX14> and then it's the usual src/foo.cr which is the entrypoint to all the requires and stuff
<f1refly> It just didn't come to my mind to move the main class out of the default position
<RX14> usually for me src/entrypoint.cr is just Foo.run ARGV
csk157 has quit [Ping timeout: 256 seconds]
<RX14> so i make a Foo.run method which takes argv
<RX14> so not much top-level code at all
Nathanaelle has quit [Ping timeout: 256 seconds]
<f1refly> It works perfecty now
<f1refly> thanks
<FromGitter> <j8r> does it makes sense to pass ARGV as an argument? This is a globally available "constant"
Nathanaelle has joined #crystal-lang
hightower2 has joined #crystal-lang
<z64> if you wanted to spec `Foo.run`, or wrap it in something that uses `Foo` programatically, it might be useful
<z64> *shrug*
Nathanaelle has quit [Ping timeout: 248 seconds]
<RX14> yes
Nathanaelle has joined #crystal-lang
<RX14> it's for when you want to pass arguments that aren't argv from the specs
<RX14> helps to pass in STDIN and STDOUT and return the exit code
<RX14> then you can basically spec the whole thing
<FromGitter> <j8r> you can `ARGV.replace ["whatever"]` before
<FromGitter> <j8r> Is there a way do have the terminal width/length?
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37 has quit [Ping timeout: 256 seconds]
p0p0pr37_ is now known as p0p0pr37
Nathanaelle has quit [Read error: Connection reset by peer]
Nathanaelle has joined #crystal-lang
Nathanaelle has quit [Ping timeout: 260 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
mofumofu3n has joined #crystal-lang
<FromGitter> <r00ster91> yes there is. in an xterm terminal you can use `tput lines` to get the the height and `tput cols` for width
mofumofu3n has quit [Client Quit]
Nathanaelle has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37 has quit [Ping timeout: 240 seconds]
p0p0pr37_ is now known as p0p0pr37
Nathanaelle has quit [Read error: Connection reset by peer]
Nathanaelle has joined #crystal-lang
<travis-ci> crystal-lang/crystal#9dbabca (ci/32bits - [WIP] Compile 32 bits packages in ci): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/385816427
Nathanaelle has quit [Read error: Connection reset by peer]
Nathanaelle has joined #crystal-lang
Nathanaelle has quit [Read error: Connection reset by peer]
Nathanaelle has joined #crystal-lang
Nathanaelle has quit [Read error: Connection reset by peer]
Nathanaelle has joined #crystal-lang
Nathanaelle has quit [Ping timeout: 260 seconds]
Nathanaelle has joined #crystal-lang
Nathanaelle has quit [Ping timeout: 245 seconds]
Nathanaelle has joined #crystal-lang
Nathanaelle has quit [Read error: Connection reset by peer]
Marrow16180 has joined #crystal-lang
Nathanaelle has joined #crystal-lang
<Marrow16180> Hi, is there a way to iterate through all methods of a specific class?
Nathanaelle has quit [Read error: Connection reset by peer]
<Marrow16180> and get some kind of information about them, name would be a good start
<FromGitter> <bew> It depends, why do you want that? What's your use-case?
<Marrow16180> I was just curious, didn't have anything very specific in mind.
<z64> you can check at compile time with macros, i.e.: https://carc.in/#/r/46e3
<Marrow16180> Thanks
emilsp_ble is now known as emilsp
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37 has quit [Ping timeout: 260 seconds]
p0p0pr37_ is now known as p0p0pr37
Nathanaelle has joined #crystal-lang
Marrow16180 has quit [Quit: Leaving]
faustinoaq has quit [Ping timeout: 256 seconds]
sz0 has joined #crystal-lang
Altarrel has joined #crystal-lang
Altarrel has quit [Client Quit]
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37 has quit [Ping timeout: 255 seconds]
p0p0pr37_ is now known as p0p0pr37
Nathanaelle has quit [Ping timeout: 245 seconds]
greengriminal has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
duane has quit [Ping timeout: 268 seconds]
duane has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 264 seconds]
Raimondii is now known as Raimondi
p0p0pr37_ has joined #crystal-lang
p0p0pr37_ has joined #crystal-lang
p0p0pr37 has quit [Ping timeout: 240 seconds]
p0p0pr37_ is now known as p0p0pr37
emilsp has quit [Ping timeout: 612 seconds]
faustinoaq has joined #crystal-lang
emilsp has joined #crystal-lang