RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.21.0 | 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
Hates_ has quit [Ping timeout: 245 seconds]
danzilio has quit [Ping timeout: 245 seconds]
[spoiler] has quit [Ping timeout: 245 seconds]
dzv has quit [Ping timeout: 245 seconds]
dzv has joined #crystal-lang
greenbigfrog has quit [Ping timeout: 240 seconds]
Hates_ has joined #crystal-lang
danzilio has joined #crystal-lang
greenbigfrog has joined #crystal-lang
[spoiler] has joined #crystal-lang
FromGitter has quit [Ping timeout: 240 seconds]
_whitelogger has joined #crystal-lang
braidn[m] has joined #crystal-lang
gloscombe has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
M-mva1985 has joined #crystal-lang
acheron[m] has joined #crystal-lang
sz0 has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
braidn[m] has quit [Ping timeout: 252 seconds]
olek_poz has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 260 seconds]
braidn[m] has joined #crystal-lang
snsei has joined #crystal-lang
gloscombe has joined #crystal-lang
olek_poz has quit [Read error: Connection reset by peer]
olek_poz has joined #crystal-lang
gloscombe has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 268 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: No route to host]
pawnbox has joined #crystal-lang
acheron[m] has quit [Ping timeout: 252 seconds]
gloscombe has joined #crystal-lang
snsei has quit [Remote host closed the connection]
acheron[m] has joined #crystal-lang
<FromGitter> <tekjar> Hi is there a shorter way to do accumulation like that
<FromGitter> <tekjar> ?
<FromGitter> <tekjar> Similar to this?
<FromGitter> <sdogruyol> unfortunately inject won't work on Array(String)
<FromGitter> <tekjar> So Map + Sum ?
<FromGitter> <sdogruyol> yup
<FromGitter> <tekjar> Cool. Thanks @sdogruyol :)
<FromGitter> <sdogruyol> cheers :+1:
braidn[m] has quit [Ping timeout: 252 seconds]
braidn[m] has joined #crystal-lang
akwiatkowski has joined #crystal-lang
olek_poz has quit [Ping timeout: 260 seconds]
snsei has joined #crystal-lang
fazibear has joined #crystal-lang
snsei has quit [Ping timeout: 252 seconds]
Qchmqs has quit [Ping timeout: 240 seconds]
<FromGitter> <crisward> Out of interest, are there any documented memory leaks in crystal. Our site when first launched uses around 7mb of ram inside a docker container. After 24hrs it is up to 140Mb.
<sija> shameless self-promotion for any1 here using Sentry: see https://github.com/Sija/raven.cr :)
<FromGitter> <crisward> @Sija Very cool. We use sentry and that was on my list of things to write soon. I'll give it a go and let you know how I get on.
<FromGitter> <sdogruyol> @sija good job :)
<sija> @crisward gr8! let me know how did it go :)
<FromGitter> <crisward> @Sija You should add it to awesome crystal https://github.com/veelenga/awesome-crystal
<sija> @sdogruyol thx!
<sija> i just did
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
fazibear has quit [Ping timeout: 260 seconds]
akwiatkowski has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 255 seconds]
mark_66 has quit [Remote host closed the connection]
<literal> is there a profiling tool available for Crystal that produces a flame graph?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
snsei has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <tekjar> Hi. Is it possible to create methods on union types?
<Papierkorb> No
<Papierkorb> You add class methods to `Union`
<Papierkorb> tekjar,
<FromGitter> <tekjar> Ohhh
<Papierkorb> *you can add
<Papierkorb> Union is pretty special, it exists but doesn't really ;) There are union types, but no union instances
<FromGitter> <tekjar> Yeahh..Makes sense (I guess :P). Can you please point me to some docs on class methods?
<FromGitter> <tekjar> Papierkorb
fazibear has joined #crystal-lang
<FromGitter> <tekjar> Or some sources where unions has class methods
snsei has quit [Remote host closed the connection]
acheron[m] has quit [Ping timeout: 252 seconds]
M-mva1985 has quit [Ping timeout: 252 seconds]
akwiatkowski has joined #crystal-lang
braidn[m] has quit [Read error: Connection reset by peer]
<Papierkorb> tekjar, the JSON and YAML libs do things with it, and I do too here https://github.com/Papierkorb/cannon/blob/master/src/cannon/core_ext.cr#L154
<Papierkorb> and just now I notice that `end`s indention being way off
<jokke> Papierkorb: we need crystalcop :P
<Papierkorb> Well there's the format tool which I never use..
<jokke> dito
<jokke> but that's just formating
<jokke> and i don't like tools that automatically change my code
<Papierkorb> I don't agree with all syntax formatting rules, so without being able to configure it it's not for me. (Is there a way to configure it?)
<RX14> well personally I think that's just stubborn
<RX14> you shouldn't have an opinion about how your code looks
<Papierkorb> Oh but a program has it?
<Papierkorb> Am I serving the machine now?
<RX14> you should use the standard format for the programming language you're using
<RX14> for personal projects it doesn't really matter
<RX14> but for team projects it does
<RX14> and I like to get in the habit
<RX14> crystal tool format is what you should use
<RX14> (it's a tad buggy at times with corner cases but thats another matter)
<Papierkorb> Syntax formatting doesn't matter as long the grand scheme is consistent
<Papierkorb> Annoying someone to put a single space somewhere while everything else is great is just being picky and not helpful
<RX14> but you don't have to annoy them
<RX14> because it's automatic
<jokke> i agree that formatting should not be a matter of opinion but i still would rather have a tool that complains about my code so that i can change it and learn from my "mistakes" than one that silently changes my code
<RX14> my editor just does it before i save
braidn[m] has joined #crystal-lang
<RX14> but I disagree
<RX14> because when you just ctrl-s and your code is formatted it's great
<RX14> you don't have to care any more
<RX14> you just ctrl-s and it's done
<jokke> nah
<jokke> not for me
<Papierkorb> Sometimes, a rule violation is helping readability
<jokke> it's creepy and it requires you to set up your editor so that it does that
<Papierkorb> And thus, anything that does changes without asking is more harmful
<RX14> Papierkorb, crystal tool format is nearly always right
<Papierkorb> > nearly
<RX14> bugs
<Papierkorb> It's not a human, it can't decide if a trailing if or a if-with-block is more readable
<Papierkorb> Deciding just on line length doesn't cut it
<RX14> yes but crystal tool format doesn't do that
<RX14> it doesn't touch on either of those
<RX14> go got it right on this one - it's time for developers to swallow their opinions
<RX14> well, on this matter
<Papierkorb> https://crystal-lang.org/ seems slow
<RX14> it does...
<RX14> wonder whats going on
<RX14> i think it's hosted on AWS?
<Papierkorb> Seems like it, with tons of nodes if you believe DNS
<Papierkorb> And now it's down
<RX14> it's up now
<Papierkorb> Huh, https://crystal-lang.org/docs/ was, but the home page was fine
<RX14> the hompage was down for me
<FromGitter> <tekjar> https://crystal-lang.org/api down for me
<RX14> yeah it's all tumbing down
<FromGitter> <fridgerator> must just be certain regions, my ohio region is still working
<FromGitter> <fridgerator> haha
<Papierkorb> lawl
M-mva1985 has joined #crystal-lang
acheron[m] has joined #crystal-lang
matp has joined #crystal-lang
Ven has joined #crystal-lang
<FromGitter> <sdogruyol> @crisward are you using connection pooling e.g?
<FromGitter> <crisward> @sdogruyol on the database, yes.
<FromGitter> <sdogruyol> connection pool reserves some memory for sure but 7 to 140 is a bit much
<FromGitter> <sdogruyol> are you rendering or fetching many objects at once
<FromGitter> <crisward> The increase in memory if very slow. I restarted it a few hours ago, it went down to 7mb, is upto around 60mb at the moment.
<FromGitter> <sdogruyol> i'd be happy to help you track down what's causing that @crisward
<FromGitter> <tekjar> Hi. Are channels mpmc in crystal?
Renich has joined #crystal-lang
gloscombe has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
<Yxhuvud> Not yet. It is in the works.
<Yxhuvud> or hmm, if that 'p' is 'producer' and not process, then I don't know
lacour has joined #crystal-lang
<FromGitter> <tekjar> I mean multi producer multi consumer
<RX14> they are
<RX14> any fiber can send or recieve from a channel
<FromGitter> <tekjar> Ahh I wish these docs are working. I want to understand how `close` semantics work in crystal. IIRC golang people call `chan.close()` or something similar in `defer`so that transmitter knows when a fibre is down
<FromGitter> <tekjar> In rust, you don't even have to `close` explicitly
<FromGitter> <tekjar> `tx` just errors out when `rx` is out of scope
fazibear has quit [Ping timeout: 252 seconds]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
<RX14> crystal really cannot handle multiple compilers...
<Papierkorb> ?
<RX14> multiple compile processes
<RX14> at the same time
<RX14> messes with the cache
<Papierkorb> the cache is funky eitherway
<RX14> it is
<Papierkorb> *cough* set CRYSTAL_CACHE_DIR to something
<RX14> yeah i'm just doing that
<RX14> this happened when I set #executors to 2
theodorton has joined #crystal-lang
<RX14> check out this weird log
<RX14> I set the cache dir and it's reporting it as "@2/.crystal-cache"
<RX14> when it's really not
<Papierkorb> The cache needs a revamp eitherway. I still suspect the gradual slowdown some ppl face is due to it placing everything into the same directory, which some FS drivers don't like much. Will be especially slow for HDD users
<RX14> i've flock'd out the compiler processes
<RX14> (because of ram, not cache issues)
<Papierkorb> uargh Groovy. for some reason, I always have to think of the guy from the WarioWare games: http://www.tigmo55.com/wwsmjmyt.jpg (middle)
<RX14> groovy's pretty ok
<RX14> what on earth?
<Papierkorb> It's creating art!
<Papierkorb> Can't you run each runner in its own Docker container or so?
<RX14> how would that help?
<RX14> they're all running in dirrect directories
<RX14> with different cache directories
<Papierkorb> each would be forced to use their own everything
<RX14> but they already should be
<Papierkorb> I'd actually admire it if they'd still clash
<RX14> they would clash on memory
<RX14> also i'm not running docker for this
<RX14> it's a million times too much work
<RX14> well
<RX14> I guess building in parallel is out
<Papierkorb> Wanna "finish" (well, this one will never be finished I guess) my current project first, which can take be anything between days and a month or two. Else I'd actually be interested in trying my hand at the caching stuff
<RX14> the problem is that merely running the specs, and compiling the compiler at the same time uses more than 8gb of memory
<RX14> crystal is such a memory hog
<Papierkorb> For me it's a 500MiB difference between --release and not (so, optimizations on/off) when pulling in the whole compiler
<Papierkorb> That's 25% of residential memory for that thing here just for LLVM poking at the code
<RX14> Papierkorb, crystal will just straight not compile unless it has > 4gb ram
<Papierkorb> To be fair, many compilers need tons of memory to compile and link themselves
<Papierkorb> or other projects like firefox, with their interesting hacks to get around the memory limit for their 32bit builds
<RX14> actually crystal itself isn't bad
<RX14> it just needs a few gb
<RX14> the spec suite needs > 4gb
fazibear has joined #crystal-lang
Renich has quit [Quit: leaving]
fazibear has quit [Ping timeout: 260 seconds]
theodorton has quit [Read error: Connection reset by peer]
theodorton has joined #crystal-lang
<FromGitter> <drosehn> Btw, I meant to mention that the memory usage might not seem so painful on MacOS because Apple does tricks with compressing virtual memory.
<FromGitter> <drosehn> I had turned that feature off long ago (when it first appeared, and was a little buggy), and just turned it back on in the last month. It's pretty impressive how much farther 16-gig goes when the compression is on!
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
<RX14> !memo jhass test
<DeBot> RX14: Added memo for jhass.
<RX14> !memo jhass could you update carc.in for 0.21.0 please?
<DeBot> RX14: Added memo for jhass.
<RX14> nice
akwiatkowski has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] RX14 opened pull request #4090: Change Spec::JUnitFormatter to use XML::Builder (master...feature/junit-rewrite) https://git.io/vyYKe