jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.12.0 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
tomchapi_ has joined #crystal-lang
tomchapin has quit [Ping timeout: 248 seconds]
<crystal-gh> [crystal] ysbaddaden closed pull request #2216: Adjust YAML spec to use `parse` instead of `load` (master...yaml-load-renamed) https://git.io/v2ZNT
nulpunkt has joined #crystal-lang
nulpunkt_ has quit [Ping timeout: 244 seconds]
<Kilo`byte> btw, how can i subscribe the mailing list. Can't seem to find any documentation on that?
trapped has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
<travis-ci> manastech/crystal#84db87a (master - Merge pull request #2216 from luislavena/yaml-load-renamed): The build was fixed. https://travis-ci.org/manastech/crystal/builds/111358599
<DeBot> https://github.com/manastech/crystal/pull/2216 (Adjust YAML spec to use `parse` instead of `load`)
pawnbox has quit [Ping timeout: 240 seconds]
marcosdsanchez has joined #crystal-lang
x0f has quit [Ping timeout: 244 seconds]
x0f has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
shama has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
tomchapi_ has quit [Ping timeout: 248 seconds]
tomchapin has joined #crystal-lang
Philpax has quit [Ping timeout: 248 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
tomchapi_ has joined #crystal-lang
tomchapin has quit [Ping timeout: 250 seconds]
tomchapi_ has quit [Ping timeout: 248 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] matiasgarciaisaia opened pull request #2219: Fix: crystal init honors custom directory (master...honor-crystal-init-directory) https://git.io/v2c8N
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 250 seconds]
r00takaspin has joined #crystal-lang
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Ven_ has joined #crystal-lang
Ven has quit [Ping timeout: 240 seconds]
trapped has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
alsm has joined #crystal-lang
r00takaspin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
r00takaspin has joined #crystal-lang
trapped has joined #crystal-lang
r00takaspin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
triangles has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r00takaspin has joined #crystal-lang
r00takaspin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
r00takaspin has joined #crystal-lang
Ven has joined #crystal-lang
<crystal-gh> [crystal] marceloboeira closed pull request #2217: Add support to markdown task lists (master...markdown-tasks-list) https://git.io/v2neV
r00takaspin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
r00takaspin has joined #crystal-lang
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<jokke> Kilo`byte: that'd be awesome
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
luislavena has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Philpax has joined #crystal-lang
trapped has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<trapped> BlaXpirit: how does https://crystalshards.herokuapp.com find shards exactly? it doesn't, for example, find https://github.com/trapped/sqlite_adapter.cr
<BlaXpirit> :( trapped, I don't know. everything on your side seems correct
<trapped> BlaXpirit: is that heroku app open source? i'd give it a quick look even just for curiosity
<BlaXpirit> trapped, uh it seems like it displays only top modules
<BlaXpirit> seems silly
<BlaXpirit> trapped, source code? sure https://www.google.com/search?q=crystalshards+github
<trapped> seems it only fetches the first page of 100 repos
<trapped> maybe paging is implemented in the client
<trapped> doesn't seem like it
<trapped> yeah, it seems to only show the first 100
<BlaXpirit> well that's lame
Ven has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/v2CSi
<crystal-gh> crystal/master f072612 Matias Garcia Isaia: Fix: crystal init honors custom directory...
<crystal-gh> crystal/master 09c2f3a Ary Borenszweig: Merge pull request #2219 from matiasgarciaisaia/honor-crystal-init-directory...
Philpax has quit [Ping timeout: 244 seconds]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/v2CQ4
<crystal-gh> crystal/master 941201c Ary Borenszweig: Merge pull request #2211 from sdogruyol/patch-1...
<crystal-gh> crystal/master ee4c044 Serdar Dogruyol: [ci skip] Fix typo in ecr
triangles has quit [Ping timeout: 240 seconds]
<travis-ci> manastech/crystal#09c2f3a (master - Merge pull request #2219 from matiasgarciaisaia/honor-crystal-init-directory): The build passed. https://travis-ci.org/manastech/crystal/builds/111480954
<DeBot> https://github.com/manastech/crystal/pull/2219 (Fix: crystal init honors custom directory)
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cyrus has quit [Ping timeout: 240 seconds]
luislavena has quit [Ping timeout: 240 seconds]
luislavena has joined #crystal-lang
Cyrus has joined #crystal-lang
Cyrus is now known as Guest74012
plukevdh has joined #crystal-lang
<plukevdh> hey folks. i'm the dude that's been bugging you on GH Issues lately ;)
<miketheman> I'm pretty certain I'm doing something wrong here: https://carc.in/#/r/sye
<miketheman> If anyone would care to help me wrap my brain around this.
<miketheman> it _feels_ like I'm doing way too many steps to get at the end results of pct_success
<BlaXpirit> well slight improvement here https://carc.in/#/r/szk
<miketheman> .to_h ?? That really works? I've been trying to find that - what Object has that?
<miketheman> (thanks, by the way. :) )
<miketheman> The whole reason I was doing the josn.mapping thing to begin with was because there wasn't a "json to hash" that I could find.
<BlaXpirit> miketheman, http://crystal-lang.org/api/Array.html ctrl+f "to_h"
<BlaXpirit> miketheman, oh there is json to hash, but i just did array of pairs to hash
<miketheman> http://crystal-lang.org/api/Enumerable.html#to_h-instance-method (for posterity of the parent class and method)
<miketheman> BlaXpirit: I was trying to get the json (a response from a web call) to get turned into a Hash, but couldn't - so I had to end up building structs and doing the `from_json` approach
luislavena has quit [Ping timeout: 276 seconds]
<miketheman> BlaXpirit: might you have an example a json to hash?
<BlaXpirit> >> JSON.parse(%({"a": [1,2,3]}))
<DeBot> BlaXpirit: undefined constant JSON - https://carc.in/#/r/szn
<BlaXpirit> >> require "json"; JSON.parse(%({"a": [1,2,3]}))
<DeBot> BlaXpirit: in line 21: can't require dynamically - https://carc.in/#/r/szo
<BlaXpirit> pls
<BlaXpirit> miketheman, https://carc.in/#/r/szp
<miketheman> BlaXpirit: thanks - I feel like I've tried this, I'll go ahead and try it again
<BlaXpirit> miketheman, well there's a reason this is not such a popular approach
<BlaXpirit> you see, each value could be anything - an array, a string, an int, a float
<BlaXpirit> it can't be determined at compile time
<BlaXpirit> so you must do type assertions and whatnot
marcosds1nchez has joined #crystal-lang
<miketheman> so I'd have to wrap each time I try to access a piece of the unknown parsed json object with a "if is a string, then access the string" ?
<BlaXpirit> miketheman, something like that
<miketheman> I guess I was looking for the equivalent of http://johnnunemaker.com/httparty/ in crystal
<miketheman> where ` puts item['user']['screen_name']` is potentially an unknown, but the compiler won't let me do that without a typecheck.
marcosds1nchez has quit [Client Quit]
<miketheman> I think I get it now, thanks.
marcosds1nchez has joined #crystal-lang
marcosds1nchez has left #crystal-lang [#crystal-lang]
marcosds1nchez has joined #crystal-lang
marcosds1nchez has left #crystal-lang [#crystal-lang]
marcosdsanchez has quit [Quit: Page closed]
marcosdsanchez has joined #crystal-lang
trapped has joined #crystal-lang
marcosdsanchez has quit [Client Quit]
marcosdsanchez has joined #crystal-lang
luislavena has joined #crystal-lang
marcosdsanchez has quit [Client Quit]
marcosdsanchez has joined #crystal-lang
marcosdsanchez has quit [Quit: leaving]
marcosdsanchez has joined #crystal-lang
marcosdsanchez has quit [Client Quit]
marcosdsanchez has joined #crystal-lang
pawnbox_ has joined #crystal-lang
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
pawnbox has quit [Ping timeout: 244 seconds]
Ven has quit [Ping timeout: 248 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/v2WlP
<crystal-gh> crystal/master 9d2db49 Ary Borenszweig: README: add Crystal logo
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/v2W4Z
<crystal-gh> crystal/master 38c4a2b Ary Borenszweig: Formatter: small fix
<crystal-gh> crystal/master 18dc93d Ary Borenszweig: Replace "manastech" with "crystal-lang"
<miketheman> woohoo - a GitHub org! https://github.com/crystal-lang
marcosdsanchez has quit [Read error: Connection reset by peer]
marcosdsanchez has joined #crystal-lang
<BlaXpirit> miketheman, good news
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/v2W0b
<crystal-gh> crystal/master 6d77e25 Ary Borenszweig: Renamed "manastech" to "crystal-lang" in non-code
<travis-ci> crystal-lang/crystal#9d2db49 (master - README: add Crystal logo): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/111517983
<trapped> miketheman: finally
<plukevdh> i was going to ask about that at some point
<plukevdh> +1
<plukevdh> is it possible to have a JSON::Mapping that has an entry of sort of unknown type?
<plukevdh> I have a JSON blob being returned that has a field `config`
<plukevdh> which is a hash with variable types inside of it
<plukevdh> "config": {
<plukevdh> "whitelist": [
<plukevdh> "docs"
<plukevdh> ]
<plukevdh> },
<plukevdh> "config": {
<plukevdh> "hide_credentials": true
<plukevdh> },
<asterite> Try using JSON::Any as the mapping type
<plukevdh> of the hash or at the root? so { type: Hash(String, JSON::Any) } or { type: JSON::Any } ?
<plukevdh> the latter appears to work
<plukevdh> as dies the former? interesting...
<plukevdh> *does
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<asterite> The first one makes sure it's a hash (object) with any values inside it, the second makes it so that the value could be a number, string, object, but not necessarily an object (I guess Hash(String, JSON::Any) makes more sense here)
<travis-ci> crystal-lang/crystal#6d77e25 (master - Renamed "manastech" to "crystal-lang" in non-code): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/111524128
Excureo has quit [Remote host closed the connection]
Excureo has joined #crystal-lang
alsm has quit [Ping timeout: 250 seconds]
plukevdh has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A124 has quit [Ping timeout: 240 seconds]
plukevdh has joined #crystal-lang
luislavena has quit [Ping timeout: 276 seconds]
A124 has joined #crystal-lang
Guest74012 is now known as Cyrus
Cyrus has joined #crystal-lang
Cyrus has quit [Changing host]
r00takaspin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
luislavena has joined #crystal-lang
trapped has joined #crystal-lang
luislavena has quit [Quit: Leaving]
pawnbox_ has quit [Remote host closed the connection]
marcosdsanchez has quit [Read error: Connection reset by peer]
marcosdsanchez has joined #crystal-lang
alsm has joined #crystal-lang
pawnbox has joined #crystal-lang
r00takaspin has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
ssvb has quit [Quit: Leaving]
<crystal-gh> [crystal] AlexWayfer opened pull request #2224: Added random methods with max of Float and range of Floats (master...rand_float_range) https://git.io/v2l0u
<plukevdh> So I've opened up a couple issues now (or almost opened) where Crystal is missing a method from the Ruby stdlib
<plukevdh> but in most cases, Ruby has another method that does the same thing
<plukevdh> example inject vs. reduce
alsm has quit [Ping timeout: 276 seconds]
<plukevdh> is Crystal attempting to keep those method dups to a minimum? there are just enough a deviations from Ruby stdlib that catch me unawares quite frequently
<plukevdh> and I start out implementing some of those methods then find out it was a similar or identical method or alias...
<plukevdh> so more a question of design goals
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
<Kilo`byte> plukevdh: well, it kinda makes sense
<Kilo`byte> when you don't have to care about compatibility (all code will need porting anyways) you can start off cleanly
<Kilo`byte> ruby keeps most those methods for compatibility
<Kilo`byte> although the name reduce surprised me there :P i'd have expected fold
<bjmllr> on multiple methods for the same thing: https://github.com/crystal-lang/crystal/issues/651#issuecomment-102551631
<robacarp> plukevdh: Crystals philosophy is to keep aliased methods at a minimum
<BlaXpirit> plukevdh, duplicate methods are actively discouraged.
<plukevdh> i appreciate that about Crystal so far, its just a surprise initially
<BlaXpirit> plukevdh, i think renaming inject to reduce was a recent change even, it's intentional
<Kilo`byte> well, inject IS a weird name for that function :P
r00takaspin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has quit [Quit: Textual IRC Client: www.textualapp.com]
trapped has joined #crystal-lang
<crystal-gh> [crystal] davydovanton opened pull request #2225: Fix typo in documentation (master...fix-typo) https://git.io/v2l5i
Philpax has joined #crystal-lang
Dreamer3 has quit [Quit: Computer has gone to sleep.]
plukevdh has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]