ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.34.0 | 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
<FromGitter> <Blacksmoke16> anyone know how to hide channels on gitter?
<FromGitter> <Blacksmoke16> used to be able to..
<FromGitter> <Blacksmoke16> :0 hero
<FromGitter> <stronny> ```code paste, see link``` ⏎ ⏎ why? [https://gitter.im/crystal-lang/crystal?at=5e9501fc38198d56a19e5a66]
ur5us has quit [Ping timeout: 260 seconds]
<oprypin> @stronny: do --error-trace
<oprypin> tbh i don't see why i would ever not use that flag
<FromGitter> <stronny> I mean why not support Dir.open(Path) ?
<FromGitter> <stronny> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e950f41c52b6a38abe40034]
<FromGitter> <stronny> maybe do `.to_s` here? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e950f845b98016d6a33b7a0]
ur5us has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 256 seconds]
return0e has quit [Read error: Connection reset by peer]
return0e_ has joined #crystal-lang
<FromGitter> <neutrinog> @kinxer ⏎ ⏎ > @neutrinog `Prism::Common::Objects::Plain` is cheeky but should probably be renamed to have the correct spelling. :P ⏎ ⏎ Haha probably. I'm currently learning another spoken language so I might be mixing up some of my english ;) [https://gitter.im/crystal-lang/crystal?at=5e95195d1aaf8e4b8e7f0af4]
mjblack has joined #crystal-lang
alexherbo2 has joined #crystal-lang
alexherbo21 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 250 seconds]
alexherbo21 is now known as alexherbo2
_ht has joined #crystal-lang
_ht has quit [Remote host closed the connection]
_ht has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
_ht has quit [Quit: _ht]
_ht has joined #crystal-lang
ur5us has joined #crystal-lang
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 256 seconds]
watzon has quit [Quit: killed]
juanfra_ has quit [Quit: killed]
olbat[m] has quit [Quit: killed]
beepdog has quit [Quit: killed]
juanfra_ has joined #crystal-lang
beepdog has joined #crystal-lang
olbat[m] has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #crystal-lang
<FromGitter> <straight-shoota> @oprypin Already went with rconcr https://github.com/straight-shoota/rconcr
<FromGitter> <straight-shoota> But yeah, there are awesome possibilities :D
postmodern has quit [Quit: Leaving]
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 256 seconds]
<FromGitter> <naqvis> Will performing `Time.measure` in Fiber going to yield correct results? provided there is some kind of IO activity involved?
<FromGitter> <naqvis> i'm seeing some interesting results where time measured in Fiber is showing different value then the total execution time, captured in main running thread.
<FromGitter> <straight-shoota> @naqvis Time.measure just takes a measurement from monotonic clock before and after executing the block. So the result should always correctly represent the time spent in the block.
<FromGitter> <straight-shoota> If you're using fibers, maybe some fibers continue outside the block?
<FromGitter> <straight-shoota> Can you show some example what you mean?
ur5us has quit [Ping timeout: 240 seconds]
<FromGitter> <naqvis> I've been doing something like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e959865fea5216d697b3138]
<FromGitter> <naqvis> And here is what i'm seeing after execution ⏎ ⏎ ```Task1 | 920ms ⏎ Task2 | 404ms ⏎ ⏎ Total execution time: 404ms``` [https://gitter.im/crystal-lang/crystal?at=5e9598b25b98016d6a35a617]
<jhass> sounds like you're only waiting for task2, not task 1 :D
<FromGitter> <naqvis> inside Fibers i'm capturing the execution time like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e9598ed5d148a04600688fa]
<jhass> that's reimplementing Time.measure really
<FromGitter> <naqvis> true thing
<FromGitter> <naqvis> and don't think i've some stalled Fibers
<FromGitter> <naqvis> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e95996a38198d56a1a06205]
<FromGitter> <naqvis> Channel used is `Buffered`
<jhass> .start being a method that runs the task synchronously?
<FromGitter> <naqvis> yeah
<FromGitter> <naqvis> Tasks are doing network IO
deavmi has quit [Ping timeout: 250 seconds]
<jhass> https://carc.in/#/r/8vwf seems expected here
<jhass> it returns the max + a bit
<FromGitter> <naqvis> does having preview_mt enabled going to cause difference?
<FromGitter> <naqvis> let me do a quick run
deavmi has joined #crystal-lang
<FromGitter> <naqvis> ```crystal build --no-debug --release -Dpreview_mt test.cr``` [https://gitter.im/crystal-lang/crystal?at=5e959be8c52b6a38abe5f7ff]
<jhass> can't imagine so
<FromGitter> <straight-shoota> Multithreading doesn't make a noticeable difference when the tasks just sleep
<FromGitter> <straight-shoota> Can you share your code that behaves unexpectedly?
<FromGitter> <naqvis> got the cluprit ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e959ca5fea5216d697b3ff3]
<FromGitter> <naqvis> I had been using `GC_DONT_GC=1` to avoid XML seg-faults
<FromGitter> <naqvis> as using XML in MT, yields segfaults
<FromGitter> <naqvis> and don't know what could be the possible cause of this `GC_DONT_GC=1` is having on clock
<FromGitter> <straight-shoota> What is GC_DONT_GC? I don't think that's a bdwgc option...
<jhass> also 3 vs 4ms, probably rounded, I wouldn't even be sure it's not a floating point issue at that point
<raz> thanks to everyone who wrestles with preview_mt! :bow: i personally don't use it, might never need it, but love to watch how it matures.
<FromGitter> <naqvis> GC_DONT_GC is bdwgc option
<FromGitter> <naqvis> GC only runs when GC_DONT_GC=0
<FromGitter> <naqvis> quite outdated, but this issue does talk about this https://github.com/crystal-lang/crystal/issues/4721
<FromGitter> <straight-shoota> Oh
<FromGitter> <straight-shoota> Yeah but that shouldn't have any effect on the clock
<FromGitter> <straight-shoota> Are you aware you can also pass -Dgc_none to the compiler to compiler completely without bdwgc?
<FromGitter> <naqvis> agree, but i'm seeing those discrepancies and don't think that's just rounding issue
<FromGitter> <naqvis> TIL, thanks @straight-shoota
<jhass> I can't make any of the options affect my test code
<FromGitter> <naqvis> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e95a0779316f34b8d9f8830]
<FromGitter> <naqvis> just increase the sleep time
<FromGitter> <naqvis> and this behavior is not consistent
<FromGitter> <naqvis> but it does happens
<jhass> how do you mean increase? my sample uses 1 and 2 seconds, not 1 and 4 or 3 and 4 milliseconds
<FromGitter> <straight-shoota> Can you print the absolute values of `Time.monotonic` at the measuring points?
<FromGitter> <naqvis> ```sleep rand > 0.5 ? 20 : 30```
<FromGitter> <naqvis> yeah sure
<FromGitter> <naqvis> running few more tests
<jhass> no erratic behavior for me with 20/30 seconds either
<FromGitter> <naqvis> thank you jhass
<jhass> local platform is osx fwiw
<FromGitter> <naqvis> yeah, i'm also on osx
<FromGitter> <naqvis> jhass was right on the spot, seems its problem with `.milliseconds` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e95a34d38198d56a1a08451]
<jhass> oh
<FromGitter> <naqvis> i've no clue on how come 20.00 is treated as 4ms while 30.00 is treated as 3ms
<jhass> .millisecoonds returns just the milliseconds part
<jhass> it's not total_milliseconds
<FromGitter> <naqvis> aha
<FromGitter> <naqvis> then my understanding of milliseconds was wrong
<repo> it's a bit confusing :)
<FromGitter> <stronny> still, .0036 should be 4 in my opinion
<FromGitter> <naqvis> agree, rouding rule should be like that
<repo> i'm not sure if i agree
<jhass> it's not rounded
<repo> floored, right?
<jhass> it's just the milliseconds part
<repo> or yeah
<repo> that
<jhass> without the nanoseconds part
<FromGitter> <stronny> what do you mean "part"
<FromGitter> <stronny> are ms and ns stored separately?
<jhass> conceptually
<repo> would be confusing af if you were to format a string like "Time elapsed: %ds %dms %dns"
<FromGitter> <naqvis> sorry jhass and @straight-shoota for raising the false alarm
<jhass> no worries :)
<FromGitter> <stronny> so what does .nanoseconds return?
<jhass> the nanoseconds part :)
<repo> also the nanoseconds _part_
<repo> jhass: any reason why there's no total_microseconds?
<jhass> Time::Span has total_* accessors to get the total amounts
<FromGitter> <stronny> you mean 0..999 ?
alexherbo24 has joined #crystal-lang
<repo> stronny: yes
<repo> jhass: huh?
<repo> oh
<repo> has to be new then
<repo> not in 0.31.0 docs
<jhass> I believe straight-shoota did some work on Time::Span "recently" :)
<FromGitter> <stronny> what I see is ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e95a51f5b98016d6a35d002]
<FromGitter> <naqvis> so what i should be using is `total_milliseconds` instead, as I misunderstood the `milliseconds` lol
alexherbo2 has quit [Ping timeout: 250 seconds]
alexherbo24 is now known as alexherbo2
<FromGitter> <naqvis> yeah @stronny docs are some what confusing, at least to me
<repo> jhass: i also soooo wish there was some kind of pretty output for timespan which would determine the unit that's most suitable (e.g. the first unit that's > 1)
<FromGitter> <stronny> they are clear to me, they just disagree wuth @repo =)
<repo> i have implemented this for logging so many times
<FromGitter> <naqvis> lol
<jhass> can always issue and PR to suggest it :)
<repo> yeah
<repo> do you guys know the docs for devdocs are updated?
<repo> they're still at 0.31.0
<FromGitter> <stronny> https://carc.in/#/r/8vwz
<FromGitter> <stronny> I fail to see how int rounding would be a problem here
<repo> stronny: because of what i posted up there
<repo> "Time elapsed: %ds %dms %dns"
<repo> or to make it clearer: "Time elapsed: %d:%d:%d.%d"
<repo> if the values were rounded it would be plain wrong
<FromGitter> <stronny> you will have "Time elapsed: 1s 234ms 234567890ns", does that make sense?
<repo> hm yeah you're right. it doesn't... i too was confused about the output of the methods it seems
<repo> its clearly not 0..999
<repo> so none of it makes sense :D
<FromGitter> <stronny> so rounding seems appropriate
<repo> no
<repo> returning 0..999 seems appropriate
<repo> you can use total_* for rounding
<FromGitter> <stronny> I have a solution: drop the helper methods!
<repo> i'd like to hear one of the core devs to explain the behavior of those methods
<repo> maybe i'm missing something
<repo> so it seems to me that the methods always return the fraction relative to a second. Not relative to the next bigger unit
<repo> which does seem kind of pointless
<repo> straight-shoota: any thoughts?
alexherbo21 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 265 seconds]
alexherbo21 is now known as alexherbo2
kevinsjoberg has quit [Ping timeout: 240 seconds]
kevinsjoberg has joined #crystal-lang
deavmi has quit [Quit: No Ping reply in 180 seconds.]
teardown has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
<FromGitter> <straight-shoota> > it seems to me that the methods always return the fraction relative to a second. ⏎ ⏎ Yes, that's how it works.
<FromGitter> <straight-shoota> I suppose the idea behind that is that you often combine it with the seconds+ parts and only need subsecond precision to some extend.
<FromGitter> <straight-shoota> But I see how this might be confusing.
<FromGitter> <straight-shoota> A trivial solution would be to simply remove `microseconds` and `milliseconds`. I'm not sure whether there are actually relevant use cases for them.
<FromGitter> <stronny> well if you don't remove them how about rounding the values?
<FromGitter> <straight-shoota> Yes, if we keep them they should be rounded
darkstardevx has quit [Read error: Connection reset by peer]
<wmoxam> ~
<FromGitter> <kinxer> I was going to object to removing `#microseconds` and `#milliseconds`, but I realized that I thought they did what `#total_microseconds` and `#total_milliseconds` do... I also can't think of a good use case for the former two methods.
<oprypin> right
skrzyp has joined #crystal-lang
<skrzyp> Hello. I would like to ask about Kemal - I know this is not a 100% correct place to do so, but closest one I can find as I really don't want to get into these bloated and weird Gitter rooms.
<FromGitter> <Blacksmoke16> what about it?
<skrzyp> Does anyone know how to catch a route with parameter being a part of the path, including "/", like `get "/foo/:bar"` but with 'env.params.url["bar"]' containing the rest of the path with all its elements
<skrzyp> Currently Kemal throws 404 in such case
<FromGitter> <Blacksmoke16> i think that would have to be a feature request
<FromGitter> <Blacksmoke16> whats the use case/
<FromGitter> <Blacksmoke16> actually
<FromGitter> <Blacksmoke16> try like `get "/foo/*bar"`
<skrzyp> I'm doing something like a middleware for my private file hosting exposed publicly with various stuff. Not confidental at all, but I've got quite tired with giving all people the same basicauth creds and having access to all the data stored, mostly because they start to hard stuff. So I've got an idea to implement completely anonymous "tokens" with filepaths assigned to it (that's the only
<skrzyp> data I store, 100% gdpr compliance lol) and share them for specified people
<skrzyp> then someone can do "wget myserver.com/token/0000BEEF/photos/2020/staying-at-home.zip" and it'll reply with correct file
<FromGitter> <Blacksmoke16> wouldnt a header/query pram make more sense here?
<skrzyp> of course I would use X-Accel-Redirect to let HTTP server serve that instead of letting crystal HTTP server to lift the havy files
<skrzyp> Header/query might work, but I wanted to make these URLs nice and accessible for users who don't know much about HTTP
<FromGitter> <Blacksmoke16> `?token=FOO` and call it a day
<skrzyp> yeah, then someone's gotta encode paths with %2D on its own, good
<FromGitter> <Blacksmoke16> and ofc if no token is provided either only allow it to access public stuff, or 401 if trying to access non public
<FromGitter> <Blacksmoke16> why would they need to do that?
<skrzyp> Just because if file is "photos-2020.zip" and I share the link, I might add token access for "photos-2019.zip" and tell the person just to change the year in path. With query encoded pathss it might get a bit problematic
<skrzyp> Also, REST-style paths are actually looking better to everyone
<FromGitter> <Blacksmoke16> sorry, to be clear i mean just pass. the token as a query param, but keep everything as a path
<FromGitter> <Blacksmoke16> as yea, normally a token isnt part of the path
<skrzyp> ohhh
<skrzyp> okay then
<FromGitter> <Blacksmoke16> header is most common, query param if a header cannot be used
<skrzyp> but passing just "myserver.com/token/0000BEEF/" is intended to throw a filelist of all available files for that user
<FromGitter> <Blacksmoke16> `myserver.com?token=FOO`?
<skrzyp> and i'll probably support header and query params of course too, but I wanted to focus on that path-style first
<FromGitter> <Blacksmoke16> the files the user sees is tied to the token, not that path
<skrzyp> also, in meanwhile I steadted the "get /foo/*bar" and apparently it worked
<skrzyp> but I don't quite know why is that
<FromGitter> <Blacksmoke16> `*` represents a glob
<FromGitter> <Blacksmoke16> within the radix tree lib kemal uses for routing
<FromGitter> <Blacksmoke16> ^ yea that
<skrzyp> ahh, nice
<skrzyp> but that's not a part of the language specification for globbing?
<FromGitter> <Blacksmoke16> no, just something that shard has implemented
<skrzyp> okay
<skrzyp> hmm, the standard library of crystal is surprisingly comprehensive
<FromGitter> <Blacksmoke16> indeed
<skrzyp> I didn't expected that, especially in the Path module
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/master/URI.html also related
<skrzyp> As I should compare if requested file "/foo/bar/baz.zip" is within the path of "/foo/bar/". String matching might work unles someone gets smart with ".." and other path traversal tricks
<skrzyp> so if that Path object is comparable it might actually help
<FromGitter> <lbarasti> Hello 👋 I'm trying to port some code to 0.34.0. The following raises a warning ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ How would you change this to not have the warning and to also not have a meaningless `else`? Can I avoid `if a == true`? ... [https://gitter.im/crystal-lang/crystal?at=5e96052cc52b6a38abe7a0d7]
<FromGitter> <Blacksmoke16> make `a` not nilable, or add an empty `else`
<FromGitter> <Blacksmoke16> its warning because the case isn't handling `nil`
<FromGitter> <tenebrousedge> I wouldn't consider that to be a meaningless `else`, but you could do something like: ⏎ ⏎ ```opts = { ⏎ true => "A", ⏎ }``` [https://gitter.im/crystal-lang/crystal?at=5e9605b1fea5216d697ceff2]
<FromGitter> <Blacksmoke16> really you dont need a case here anyway
<FromGitter> <lbarasti> yes yes, I get why I get the warning
<FromGitter> <Blacksmoke16> if a == true ⏎ puts "A"
<FromGitter> <Blacksmoke16> ```if a == true ⏎ puts "A" ⏎ elsif a == false ⏎ puts "B" ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5e9605d46823cb38acd097dd]
<FromGitter> <Blacksmoke16> er, nvm you wanted to avoid that...
<FromGitter> <lbarasti> It's OK :)
<FromGitter> <Blacksmoke16> id go with if/else otherwise
<FromGitter> <lbarasti> all right, I'll just bite the bullet
<FromGitter> <tenebrousedge> making `a` not nilable is good too
<FromGitter> <Blacksmoke16> ^
<FromGitter> <lbarasti> well, there are legitimate use cases for making `a` nillable
<FromGitter> <Blacksmoke16> if `a` is not nilable you can just do `puts a ? "A" : "B"` and call it a day
<FromGitter> <Blacksmoke16> fair enough
<FromGitter> <lbarasti> especially if it represent a boolean flag
<FromGitter> <tenebrousedge> `a.try {|t| t ? "A" : "B" }`
<FromGitter> <lbarasti> :light-bulb:
<FromGitter> <Blacksmoke16> 👏
<FromGitter> <lbarasti> that takes the `nil` out of the picture! Thanks, let's see if the shard owner thinks :)
zorp has quit [Ping timeout: 256 seconds]
<FromGitter> <bararchy> @asterite hm... I don't think I own any slack other then our company one, but i'll make sure
<FromGitter> <bararchy> Oh ...yes no clue how but i'm the workspace owner? I guess I was the last one left? hahaha
<FromGitter> <sam0x17> how do I manually pass a proc to a method that takes a block?
<FromGitter> <tenebrousedge> `&` ?
<jhass> the_method(&the_proc)
<FromGitter> <tenebrousedge> `method(&my_proc)`
<FromGitter> <watzon> Hmm so I decided to profile a program using valgrind's massif and it seems like openssl is the biggest memory user
<FromGitter> <sam0x17> thx
<FromGitter> <watzon> If I could get my stuff to stop using openssl I think my memory usage for my program would be in the hundreds of kilobytes instead of almost 10MB
<FromGitter> <watzon> Unfortunately it doesn't seem as though you can get away with using HTTP::Client and not having the openssl dependency
<FromGitter> <watzon> Even though tls is off
<FromGitter> <Blacksmoke16> isnt there a flag for that
<FromGitter> <Blacksmoke16> `-D without_openssl`
<FromGitter> <watzon> Well yeah, but the HTTP client doesn't work without it haha
<FromGitter> <watzon> Looks like the problem may actually be in zlib though
<FromGitter> <Blacksmoke16> `-D without_zlib` :trollface:
<FromGitter> <watzon> It's `CRYPTO_zalloc` that
<FromGitter> <watzon> And it looks like `Flate::Writer` in the standard library uses zalloc
<FromGitter> <watzon> And the gzip reader/writer uses that
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <watzon> Hmm guess it is openssl. `-D without_zlib` gives the same result.
<jhass> pretty sure that's not actually a thing ;)
<jhass> oh wait it is :o
<FromGitter> <Blacksmoke16> 😏
<jhass> somehow I don't like these
<FromGitter> <sam0x17> `Time::Span` doesn't have `.total_months` :(((
<FromGitter> <Blacksmoke16> is what a span spanning multiple months would be no?
<jhass> months have varying amounts of days, so what would it return anyways?
<FromGitter> <Blacksmoke16> true
<FromGitter> <Blacksmoke16> total days would be more accurate
<FromGitter> <Blacksmoke16> or weeks
<FromGitter> <sam0x17> ah I get it
sz0 has quit [Ping timeout: 246 seconds]
<FromGitter> <sam0x17> it's because it can't be calculated accurately without knowing what months are being talked about
<FromGitter> <sam0x17> I'm just adding this for my own silly purposes here: ⏎ ⏎ ```struct Time::Span ⏎ def total_months ⏎ total_days / 30.4535 ⏎ end ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5e961a5bfea5216d697d3869]
<FromGitter> <Blacksmoke16> :thinking:
<FromGitter> <Blacksmoke16> fair enough
sz0 has joined #crystal-lang
sz0 has quit [Max SendQ exceeded]
sz0 has joined #crystal-lang
<skrzyp> Hmm, if I want to create a type which acts as a string (and is represented as string in arrays, can be compared and so on) but has its own properies and methods, how to do that properly?
<FromGitter> <Blacksmoke16> define a struct?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e962259f450c25cc8def3a0]
<skrzyp> wow, wait, so there are structs here?
<skrzyp> nice
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/master/toplevel.html#record(name,*properties)-macro
<skrzyp> yes, I'm there right now :D
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/master/Comparable.html related
<FromGitter> <Blacksmoke16> for your `can be compared` requirement
<skrzyp> that's better than I imagined
<skrzyp> neat
<FromGitter> <Blacksmoke16> 👍
<jhass> sharing a patch as a screenshot of gitk, that's a first for me
_ht has quit [Quit: _ht]
<FromGitter> <asterite> same :-)
<FromGitter> <bararchy> We just released `Wafalyzer` an opensource CLI tool to detect if a website sits behind a WAF and which WAF it is -> https://github.com/NeuraLegion/wafalyzer
<FromGitter> <bararchy> All in Crystal ofc :)
<skrzyp> logo.cr :D
<skrzyp> btw. seems like `sdl` examples are broken in Crystal's master, throwing OverflowError from sdl/surface.cr:27:57 in '[]=' and dl/surface.cr:31:5 in '[]='
ur5us has joined #crystal-lang
<FromGitter> <j8r> @bararchy yay, nice :) Interested about your use case a NeuraLegion?
postmodern has joined #crystal-lang
<FromGitter> <watzon> Good stuff @bararchy!
ur5us has quit [Quit: Leaving]
ur5us has joined #crystal-lang
<FromGitter> <bararchy> @j8r it's to detect if a target being scanned has a WAF online that might affect the scan results :)
<FromGitter> <bararchy> thanks @watzon !
ur5us has quit [Ping timeout: 256 seconds]
<hightower2> Hey is there an even more shorthand notation for somevar.try &.method, or that exists only in Ruby?
<hightower2> (like somevar&.method or similar)
<FromGitter> <tenebrousedge> only in Ruby
<hightower2> danke
alexherbo25 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 256 seconds]
alexherbo25 is now known as alexherbo2
alexherbo2 has quit [Remote host closed the connection]
<hightower2> Do we have any preferred shard for curl bindings?
<hightower2> I am looking at https://github.com/kostya/curl-downloader . There is a note that using libcurl will block the main thread. Is it really that run_with_fork (which literally calls 'fork') is necessary and it can't be done with fibers?
<FromGitter> <asterite> why not use http client?
<hightower2> well I assumed that HTTP::Client does not have support for sessions (which take advantage of keep-alive)
<hightower2> or rather, I see it has something similar, but requires me to manually implement reusing a client for pages in the same domain. OK.
zorp has joined #crystal-lang
<FromGitter> <straight-shoota> oprypin, I hope you had a least a lot of fun with your super-fancy refactor ;)
<hightower2> If I have an int variable and do 'var += ' from fibers, is this thread-safe or I need to Mutex.synchronize it ?
<FromGitter> <Blacksmoke16> prob the latter
<FromGitter> <Blacksmoke16> but dont quote me
teardown has joined #crystal-lang