<livcd>
Do you think there is a space where Crystal really shines ?
<FromGitter>
<tenebrousedge> is there a focus on more beginner-level stuff, or more expert-level stuff?
<livcd>
I think Crystal cannot really compete with Go mainly because of lack of support of some of the platforms that Go supports + compile times + the ecosystem. Of course lots of it is because of smaller community and lack of corporate support but still...
<FromGitter>
<bararchy> I think both has a place
<FromGitter>
<bararchy> but the winning thing is never the technical details, programmers are humans, what makes them happy will make or break a lang
<FromGitter>
<bararchy> as long as devs preffer to write crystal, it will win in the end
<FromGitter>
<tenebrousedge> Go does not make me happy
<FromGitter>
<bararchy> ^ yap
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<FromGitter>
<Daniel-Worrall> Windows sipport will make me happy
<FromGitter>
<Daniel-Worrall> Then I can push out some client facing apps without the Linux or vm restrictions
f1refly has quit [Ping timeout: 265 seconds]
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
duane has quit [Ping timeout: 245 seconds]
<FromGitter>
<Daniel-Worrall> It'd be great if I could build docs for shards I have installed without having to do `cd lib/shard_name` `crystal doc -o ../../docs`
<FromGitter>
<Daniel-Worrall> and if it didn't overwrite the index
<FromGitter>
<Daniel-Worrall> or combined them somehow idk
<FromGitter>
<Daniel-Worrall> maybe someone has made a shard that'll do that
<jhass>
crshdoc() { shards=(); for shard in lib/*/; do shards+=($shard/src/$(basename $shard).cr); done; crystal doc $shards[@]; }
<FromGitter>
<Daniel-Worrall> stick that in where
<FromGitter>
<tenebrousedge> ot
<FromGitter>
<tenebrousedge> it's a bash script. You could run it as a post-commit maybe?
<jhass>
can just paste it into your shell to try if it works for you, I just came up with it and tested it on one small project :D
<FromGitter>
<Daniel-Worrall> welp let's have a go
<FromGitter>
<Daniel-Worrall> whatever it did did not do the thing
<jhass>
errored somehow?
<FromGitter>
<Daniel-Worrall> nothing output
<FromGitter>
<Daniel-Worrall> I'm on shitty WSL 1 Ubuntu
<jhass>
no output should be find, check docs/index.html?
<jhass>
*fine
<FromGitter>
<Daniel-Worrall> crshdoc on its own `Error: File lib/ameba//src/ameba.cr[@] does not exist`
<jhass>
uh, awesome
<jhass>
apparently I used some zsh idiom without noticing :D
<FromGitter>
<tenebrousedge> yay zsh
<jhass>
crshdoc() { shards=(); for shard in lib/*/; do shards+=($shard/src/$(basename $shard).cr); done; crystal doc ${shards[@]}; }
<FromGitter>
<Daniel-Worrall> well I'm getting errors for the shards now
<FromGitter>
<Daniel-Worrall> so it's probably working :^)
<FromGitter>
<Daniel-Worrall> god damn shards failing their doc builds
<FromGitter>
<Daniel-Worrall> JENNIFER!
<FromGitter>
<Daniel-Worrall> okay, just temporarily deleting jennifer build the docs
<FromGitter>
<Daniel-Worrall> thanks jhass
<jhass>
<3
<FromGitter>
<Daniel-Worrall> What's the point in wrapping it in crshdoc?
<jhass>
so you can stick it into your ~/.bashrc
<jhass>
and don't have to type it everytime you want to use it
<FromGitter>
<tenebrousedge> or you can stick in in `~/bin` or summat
<FromGitter>
<Daniel-Worrall> hmm okii
duane has joined #crystal-lang
<FromGitter>
<Daniel-Worrall> so if it was in bashrc, it'd run every time I opened a terminal in a crystal folder
<jhass>
no
<jhass>
it just makes crshdoc available as a command
<FromGitter>
<Daniel-Worrall> then what
<FromGitter>
<Daniel-Worrall> oh so it defines a command called crshdoc
<jhass>
yeah
<FromGitter>
<Daniel-Worrall> crystal shard doc
<FromGitter>
<Daniel-Worrall> Yeah, I thought it was like crash doc or something
<FromGitter>
<Daniel-Worrall> Terminal noob
<jhass>
you can name it whatever you want
<jhass>
(without spaces)
<FromGitter>
<Daniel-Worrall> yeah yeah
<FromGitter>
<Daniel-Worrall> I set it so it also opens index.html in chrome
<FromGitter>
<Daniel-Worrall> Delicious
ht_ has quit [Quit: ht_]
alexherbo28 has quit [Ping timeout: 245 seconds]
alexherbo2 has joined #crystal-lang
alexherbo2 is now known as alex```
<FromGitter>
<Daniel-Worrall> Hmm, how best to turn `Hash(String, String?)` to `Hash(String, String)`
<FromGitter>
<tenebrousedge> `as` or `try` or `transform_values`
<FromGitter>
<j8r> you have to create a new one, I am afraid
<FromGitter>
<tenebrousedge> `as` does not work, `transform_values` does
<FromGitter>
<Daniel-Worrall> If I'm doing that, I may as well create getters for each expected hash key
<FromGitter>
<tenebrousedge> and yes, this does return a new hash
<FromGitter>
<tenebrousedge> you should definitely use a default block as appropriate