ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.31.1 | 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
hightower2 has quit [Ping timeout: 252 seconds]
hightower4 has quit [Ping timeout: 240 seconds]
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
duane has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo28 has joined #crystal-lang
return0e_ has joined #crystal-lang
alexherbo28 has quit [Ping timeout: 240 seconds]
return0e has quit [Ping timeout: 276 seconds]
<FromGitter> <phangs> @Blacksmoke16 thank you very much, and sorry for beeing so noob
chachasmooth has quit [Ping timeout: 245 seconds]
chachasmooth has joined #crystal-lang
f1refly has joined #crystal-lang
Xeago has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 276 seconds]
sagax has quit [Ping timeout: 245 seconds]
ht_ has joined #crystal-lang
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 240 seconds]
ht_ has quit [Remote host closed the connection]
sagax has joined #crystal-lang
DTZUZO has quit [Ping timeout: 265 seconds]
alexherbo28 has joined #crystal-lang
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 246 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 245 seconds]
Flipez0 is now known as Flipez
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 265 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Remote host closed the connection]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 252 seconds]
DTZUZO has joined #crystal-lang
<FromGitter> <Blacksmoke16> np, ill ping you when i get that updated, prob today/tonight sometime
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 265 seconds]
duane has quit [Ping timeout: 265 seconds]
duane has joined #crystal-lang
livcd has joined #crystal-lang
ht_ has joined #crystal-lang
DTZUZO has joined #crystal-lang
teardown has joined #crystal-lang
hightower2 has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
<livcd> Is there any update about Crystal on Windows ?
<FromGitter> <tenebrousedge> I don't think so. I'm not sure how many developers even have Windows systems to test things with
<livcd> bummer
<livcd> nvm
<FromGitter> <tenebrousedge> if you have Windows dev experience I'm sure the team would appreciate the help
<livcd> My experience is not really on that level
<FromGitter> <wontruefree> I have just locked in another talk for Chicago Crystal but we are still looking for more ideas
<FromGitter> <wontruefree> if you have any let us know https://forms.gle/g4k2Ep5j2ty1jSJ66
<livcd> I am not sure hmm
<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
jua_ has joined #crystal-lang
<FromGitter> <Blacksmoke16> could use that @Daniel-Worrall
<FromGitter> <Daniel-Worrall> There's guaranteed no nils
<FromGitter> <Daniel-Worrall> just the hash is coming from a shard
<FromGitter> <Blacksmoke16> then that would still do what you want no? without making a new array
<FromGitter> <Daniel-Worrall> uh no because then the type of hash values are still `String?`
<FromGitter> <Blacksmoke16> ah really?
<FromGitter> <Daniel-Worrall> yeah, the hash won't change type
<FromGitter> <Daniel-Worrall> that'd be weird
<FromGitter> <Blacksmoke16> use the non bang one then?
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/81jy
<FromGitter> <tenebrousedge> or just use `try` to eliminate the `Nil` when you use it
<FromGitter> <tenebrousedge> `a[key].try do |val|`
<FromGitter> <Daniel-Worrall> ooh, maybe
<FromGitter> <Daniel-Worrall> yeah, I already do `try` sometimes
<FromGitter> <Daniel-Worrall> but depending on the context, it can cause a lot of clutter
<FromGitter> <tenebrousedge> it adds a level of nesting
<FromGitter> <oceanfish81_twitter> Who is interested to support Crystal for the userspace of https://www.zephyrproject.org/ ?
<FromGitter> <tenebrousedge> there's also `not_nil!`
<FromGitter> <Daniel-Worrall> yeah, but if I'm using 5 of the values, then 5 levels of nesting
<FromGitter> <Daniel-Worrall> I'm using not_nil! a lot
<FromGitter> <tenebrousedge> you could also use `fetch(key, "")`
<FromGitter> <tenebrousedge> I think
<FromGitter> <watzon> Yes you can
<FromGitter> <watzon> `Hash#fetch(key, default_value)`
<FromGitter> <tenebrousedge> @oceanfish81_twitter what is that and what does it mean to support Crystal? What is involved?
<FromGitter> <Daniel-Worrall> it's an architecture
<FromGitter> <tenebrousedge> @watzon it seems that doesn't eliminate the `Nil` union, actually
<FromGitter> <watzon> @tenebrousedge what do you mean?
<FromGitter> <watzon> fetch?
<FromGitter> <tenebrousedge> assuming `a` has type `Hash(String, String?)` then ⏎ ⏎ ```b = a.fetch("a", "") ⏎ typeof(b) #=> String | Nil``` [https://gitter.im/crystal-lang/crystal?at=5dd3248cea7d147cb3a29337]
<FromGitter> <watzon> That's weird, it shouldn't be that way
<FromGitter> <tenebrousedge> you'd think
<FromGitter> <Daniel-Worrall> `transform_values`doesn't either btw
<FromGitter> <tenebrousedge> huh, that's odd
<FromGitter> <Daniel-Worrall> unless I have to do...
<FromGitter> <watzon> transform_values should though
<FromGitter> <watzon> https://carc.in/#/r/81k0
<FromGitter> <Daniel-Worrall> oh, no, transform_values does
<FromGitter> <Daniel-Worrall> sorry, I did something wrong
<FromGitter> <watzon> transform_values! doesn't though
<FromGitter> <watzon> https://carc.in/#/r/81k1
<FromGitter> <watzon> Because that one is operating on the same hash
<FromGitter> <Daniel-Worrall> yeah, cause it changes in place
<FromGitter> <Daniel-Worrall> anyway, I've completely changed my mind in how I'm going to do it
<FromGitter> <tenebrousedge> 👀
<FromGitter> <Daniel-Worrall> I'm gonna lazily call `not_nil!` since these are all acting on continuous structs and I don't want to slow it down
<FromGitter> <Daniel-Worrall> Will still need to do stuff, but lazily do it so I'm not processing stuff I don't need yet
<FromGitter> <Daniel-Worrall> if at all
<FromGitter> <Daniel-Worrall> It'll improve the API too once I lib'ify it
jua_ has quit [Quit: Leaving]