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