ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.5 | Fund Crystal's 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
sz0 has joined #crystal-lang
squeaky_ has quit [Quit: Leaving]
akwiatkowski has quit [Ping timeout: 240 seconds]
<FromGitter> <drosehn> When I wrote a program which used `JSON.mapping`, I had a separate constant which I used to switch the value of `nilable` on a few lines, while I was trying to figure out the correct mapping for the files I was looking at.
Raimondi has quit [Quit: WeeChat 1.6-dev]
BlaXpirit_ has joined #crystal-lang
ome_ has joined #crystal-lang
hmans_ has joined #crystal-lang
bmcginty_ has joined #crystal-lang
Liothen- has joined #crystal-lang
Liothen has quit [Ping timeout: 255 seconds]
hmans has quit [Ping timeout: 255 seconds]
aemadrid has quit [Ping timeout: 255 seconds]
BlaXpirit has quit [Ping timeout: 255 seconds]
bmcginty has quit [Ping timeout: 255 seconds]
ome has quit [Ping timeout: 255 seconds]
M-mva1985 has quit [Ping timeout: 255 seconds]
M-mva1985 has joined #crystal-lang
Liothen- is now known as Liothen
hmans_ is now known as hmans
BlaXpirit_ is now known as BlaXpirit
M-mva1985 has joined #crystal-lang
M-mva1985 has quit [Changing host]
ome_ is now known as ome
aemadrid has joined #crystal-lang
Raimondi has joined #crystal-lang
bjz has joined #crystal-lang
Svenskunganka has quit [Ping timeout: 256 seconds]
Rinkana has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
bjz has joined #crystal-lang
akwiatkowski has joined #crystal-lang
bjz has quit [Client Quit]
snsei has quit [Remote host closed the connection]
Qchmqs has joined #crystal-lang
<FromGitter> <chyzwar> When using stirng interpolation #{} I would expect that to_s will get called on objects?
<FromGitter> <chyzwar> https://carc.in/#/r/1n4o in this case my custom class to_s should be used ?
<Qchmqs> I always expect that casting isn't done automatically
<FromGitter> <chyzwar> Ruby will use custom to_s when interpolating string https://repl.it/FkHO/0
<FromGitter> <crisward> @sdogruyol Thanks! Think I've got every tweak I could think of to keep it quick, despite the very big images. If you ever need to put together a who uses kemal section on your site feel free to include us.
mark_66 has joined #crystal-lang
bjz has joined #crystal-lang
gloscombe has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
Qchmqs has quit [Ping timeout: 268 seconds]
Qchmqs has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 256 seconds]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Remote host closed the connection]
<FromGitter> <asterite> Marcin: you need to override to_s(io)
gewo has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
bjz_ has quit [Quit: Textual IRC Client: www.textualapp.com]
bjz has joined #crystal-lang
bew78 has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vD1IW
<crystal-gh> crystal/master ee3baad Dylan Drop: User-Agent should be properly capitalized in exec
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<travis-ci> crystal-lang/crystal#ee3baad (master - User-Agent should be properly capitalized in exec): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/201857347
bew78 has quit [Ping timeout: 240 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
snsei has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
pduncan has quit [Read error: Connection reset by peer]
soveran has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
snsei has quit [Read error: Connection reset by peer]
snsei has joined #crystal-lang
soveran has joined #crystal-lang
Qchmqs has quit [Remote host closed the connection]
Qchmqs has joined #crystal-lang
Ven has quit [Ping timeout: 268 seconds]
Rinkana has quit [Quit: Page closed]
pduncan has joined #crystal-lang
soveran has quit [Remote host closed the connection]
snsei has quit [Remote host closed the connection]
Svenskunganka has joined #crystal-lang
Qchmqs has quit [Quit: Konversation terminated!]
mark_66 has quit [Remote host closed the connection]
soveran has joined #crystal-lang
Rinkana has joined #crystal-lang
Raimondi has quit [Quit: WeeChat 1.6-dev]
soveran has quit [Remote host closed the connection]
<Papierkorb> asterite, are you here?
<FromGitter> <asterite> Yup, here
<Papierkorb> Quick chat about the digest PR if you have time: I didn't realize, but with the class Context change we can now just have the MD5/SHA1 things as class, inherit from Base (for the self. methods) and thus get rid of the funky abstract module
<FromGitter> <asterite> Yes, that's what I imagined the final design to be :-)
<Papierkorb> Great, will push that in a few mins then
<Papierkorb> Was really really pleased to hear about the at some point coming memory allocation optimization btw
<FromGitter> <asterite> But we'll make an entire review of the std before 1.0, right now we are focusing more on the language... that's why I won't spend much time reviewing and designing this at this particular moment (but maybe others in the team will, but then again it might change again before 1.0)
<FromGitter> <asterite> No, it's not guaranteed. It's something that some languages does, so we could do it, but it's pretty hard
<FromGitter> <asterite> but maybe a small allocation here and there isn't that bad, if the design is better
<Papierkorb> That's great to hear. I actually put in the issue cause I just didn't want to see myself telling people that it's Crypto::MD5 in 5 years when we're well past version 1.0
<FromGitter> <asterite> :D
<FromGitter> <asterite> Yeah, that's definitely the wrong module for MD5 to be
<FromGitter> <asterite> Adler32 and CRC32 should also be under Digest, right now we added things without much consideration for a good namespace
splitty__ has joined #crystal-lang
<Papierkorb> There's also an open issue for a SHA256 or SHA512 iirc
<Papierkorb> Aaand it's up
<FromGitter> <asterite> Yes, but openssl provides that. I added a pure crystal SHA1 because otherwise we couldn't ship the playground without depending on openssl. I'm not sure Digest::SHA1 will remain there (or yes, but it will probably use that of openssl, I don't know if we'll implement all algorithms all over again, and the same goes for MD5 too)
splitty_ has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
<Papierkorb> I'd be fine with using OpenSSL with shims in Digest, to not have a hard dependency on OpenSSL in every program ever. I'd love it when you could e.g. throw in BoringSSL instead and it'd just work
unshadow has joined #crystal-lang
<RX14> wow, EC2 is expensive
<Papierkorb> for a company it may be fine, but for personal use .. you can get whole root servers at reputable hosting companies for less money
<RX14> yeah
<FromGitter> <raydf> digitalocean is a very good platform
<RX14> i'm trying to set up CI for crystal
<RX14> and apparently manas use EC2 so they want the CI to run on there too
<RX14> so I have to test on there
<Papierkorb> Isn't the free version enough for that RX14?
<Papierkorb> It gets you one or two m1.tiny's and some drive space
<FromGitter> <raydf> for a limited time there's the free version, i believe is like a year.
<Papierkorb> yep
<RX14> well i need to run a jenkins slave *and* compile crystal on each node
<RX14> so that's a jvm + crystal compiler
<FromGitter> <spalladino> That's what I was going to mention: there's a free tier which is typically good enough for personal tests; but if you need something more powerful for the tests, let me know and I'll set up a node for you.
<RX14> i'll see how the free tier ones go
<RX14> but it's only 1gb ram
<FromGitter> <sdogruyol> @RX14 that's mission impossible
<RX14> AWS really throws you in the deep end though
<Papierkorb> Needs moar swap
<RX14> I never configure swap
<RX14> i'd rather the OOM killer go off than the server just die
<RX14> which is what seems to happen every time my servers need to swap
<RX14> well, run out of memory
<RX14> it gives you maybe half an hour's warning I guess, depending on how fast your memory is leaking
<Papierkorb> RX14: btw, I can get 180k requests/sec with cannon rpc if I use two tcp connections, each giving 90k. after that it doesn't scale further though.
<RX14> hmm
Raimondi has joined #crystal-lang
<Papierkorb> If I use a fiber per incoming request to not block the connection (like I want) it's stabilizes at 2x75k/sec
<RX14> but does it scale more?
<unshadow> Can you bind another process on the same port ? that will give you another core to use
<Papierkorb> RX14: 4x40k = 160k, or actually 10k more
<RX14> unshadow, yes it will but that's a whole new dimension
<RX14> optimize single-process rate before you start thinking about having multiple
<Papierkorb> unshadow: in theory yes, but this thing's actually meant to do fast, stateful IPC on a machine or over the network
<RX14> I always forget that crystal's specs fail in release mode
<RX14> hah
<RX14> we were talking about Digest::SHA1 recently anyway
<Papierkorb> Those tests run fine locally and on jenkins?
<Papierkorb> err, and on travis
<RX14> not in release mode
unshadow_ has joined #crystal-lang
<RX14> crystal build --release spec/all_spec.cr
<RX14> and run it
<RX14> you'll (likely) see it breaks Papierkorb
<Papierkorb> RX14: are you on master or in my digest revamp PR?
<RX14> master (a while ago tho)
<RX14> I just rebased onto current master
<Papierkorb> > Module validation failed: inlinable function call in a function with debug info must have a !dbg location
<Papierkorb> > %0 = call %"WeakRef(.../crystal/spec/std/weak_ref_spec.cr::Foo)"* @"*WeakRef(.../crystal/spec/std/weak_ref_spec.cr::Foo)@WeakRef(T)::allocate:WeakRef(.../crystal/spec/std/weak_ref_spec.cr::Foo)"(i32 4989)
<RX14> well
<Papierkorb> --no-debug to the rescue
unshadow has quit [Ping timeout: 258 seconds]
unshadow has joined #crystal-lang
unshadow_ has quit [Ping timeout: 240 seconds]
unshadow has quit [Client Quit]
<Papierkorb> Is it possible to use valgrind to do code speed profiling?
<RX14> Papierkorb, what do you mean?
<RX14> when you say code speed profiling do you mean finding hot spots
<RX14> because yes, you can do that
<RX14> using callgrind
<RX14> Papierkorb, I use valgrind --tool=callgrind --dump-instr=yes --collect-jumps=yes --simulate-cache=yes --toggle-collect=GC_init --collect-atstart=yes ./built_executable
<Papierkorb> thanks
<RX14> then you install kcachegrind and run kcachegrind callgrind.out.whatever
<RX14> it puts the pid in the filename
<RX14> the GC_init stuff is just so that you can ingore the GC init times if the thing only runs for a short time
bjz has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<crystal-gh> [crystal] matiasgarciaisaia closed pull request #4023: document use (and risk) of $N special capture group variables (#3979) (master...feature/regexp_capture_doc) https://git.io/vDwMB
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
soveran has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Papierkorb> Huh, the compiler segfaulted on the CI while running some spec: https://travis-ci.org/crystal-lang/crystal/jobs/201959274#L1001
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
<RX14> failed in a finalizer it seems Papierkorb
<Papierkorb> Weren't there one or two issues just recently about that?
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RX14> i guess
<RX14> also the std_specs don't seem to compile with --release any more
<RX14> they just sort of sit there forever
<Papierkorb> Yeah I killed it after 10mins
<RX14> I didn't
<RX14> it OOMed
bjz has joined #crystal-lang
<RX14> currently using 3.9GB of ram and slowly rising
<Papierkorb> Now I wonder how much it consumed for me
<Papierkorb> For science, I can spare a cpu core and some 30 gigs of ram, let's see if it'll OOM or not
<RX14> well
soveran has joined #crystal-lang
<RX14> i'll get a perf trace on what it's doing Papierkorb
<RX14> i have no idea what i'm looking at lol
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Papierkorb> So it compiled
<Papierkorb> running the tests now
<Papierkorb> only took 8 minutes to do its thing? huh?
<Papierkorb> > 12061 examples, 0 failures, 0 errors, 13 pending
<Papierkorb> Looks fine here
<RX14> Papierkorb, how much ram?
<Papierkorb> I noticed it uses the cache, emptied it and now retrying
bjz has joined #crystal-lang
<Papierkorb> RX14: VIRT 3800M RES 3765M
<Papierkorb> $ bin/crystal build --release --no-debug spec/all_spec.cr
<RX14> oh
<RX14> --no-debug
<RX14> i havent tried it with that
<Papierkorb> The residential and virtual memory values increased almost at the same pace
<RX14> i'm at 6.8GB
<RX14> doesn't seem to fail with the debug stuff tho
<Papierkorb> Took 8mins here to complete
<Papierkorb> That same command but with spec/std_spec.cr segfaults though
<Papierkorb> > Failed to raise an exception: END_OF_STACK
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Papierkorb> I spare you the ??? lines
<RX14> great
<RX14> lets tray again without debug
<RX14> i don't think it'll make a difference
<RX14> Papierkorb, what processor is that 8 mins on?
<Papierkorb> My desktop computers 6600K
<Papierkorb> the one with the way too many requests per seconds from yesterday ;)
<RX14> hmm
<RX14> arch? llvm 3.9.1?
<RX14> i guess --no-debug will be the deciding factor
<Papierkorb> Yes, both
<RX14> that makes my compile fail and yours not
<RX14> but it's weird that you got the
<RX14> the compile error
<RX14> for the debug locations
<RX14> Papierkorb, been going 12 mins using 4.2gb ram with --no-debug and it's still going
<Papierkorb> anyway, w.r.t. to my digest PR, can I somehow retrigger the CI and hope for the best or will it happen again anyway?
<RX14> maintainers can retrigger
<FromGitter> <spalladino> @Papierkorb retriggered, let's hope it works now
<Papierkorb> Great, Thanks
<FromGitter> <spalladino> Please, thank *you* for all the hard work on that PR!
<Papierkorb> When we're done with that I'm looking forward to continue getting stuff into crystal :D
<Papierkorb> Thinking about adding ArrayLiteral#reduce() for example. Sounds like a easy compiler beginner task. I actually do have a use-case at hand!
<Papierkorb> And CharLiteral#ord too
<RX14> that std_spec compile has been going for over 20 mins now Papierkorb
<RX14> what command did you use to compile?
<Papierkorb> The same one I wrote above but with s/all/std/
<RX14> you compiled std_spec?
<Papierkorb> yes
<RX14> hmm
<RX14> me too
<Papierkorb> or rather, it crashed while trying to do so
<Papierkorb> yes, even with --no-debug
<RX14> oh...
<RX14> i thought you completed
<Papierkorb> the all_spec completed
<RX14> what
<RX14> how
<RX14> does that work
<RX14> flipping compilers
<Papierkorb> well considering that today, we already saw crystal producing garbage for SHA1 in --release mode on your CI, I think having it not work at all is better
<RX14> well
<RX14> it hints at a codegen issue
<Papierkorb> yep
<RX14> which could manifest itself in ANY release build
<Papierkorb> Which is atm really over my head
<RX14> yep
<Papierkorb> Maybe in a few months I'd be more of a help, I may want to use LLVM and do something funny with it and Crystal in my bachelors thesis
bjz has joined #crystal-lang
Rinkana has quit [Ping timeout: 260 seconds]
soveran has quit [Remote host closed the connection]
<RX14> Papierkorb, try this:
<RX14> make crystal
<RX14> then use the build compiler to compile the std_spec
<RX14> that works for me
Raimondi has quit [Read error: No route to host]
soveran has joined #crystal-lang
<Papierkorb> Works for me too
<RX14> interesting results
soveran has quit [Remote host closed the connection]
gloscombe has quit [Remote host closed the connection]
akwiatkowski has quit [Ping timeout: 260 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
bjz has joined #crystal-lang
<travis-ci> crystal-lang/crystal#809baa9 (master - Merge pull request #4023 from karlseguin/feature/regexp_capture_doc): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/202001630
<DeBot> https://github.com/crystal-lang/crystal/pull/4023 (document use (and risk) of $N special capture group variables (#3979))
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang