RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.0 | 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
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <j8r> 😂
<FromGitter> <j8r> @rishavs I find them unneeded and even confusing too
<FromGitter> <j8r> Personnally I never use `[] of ` and `{} of`
non-aristotelian has quit [Quit: non-aristotelian]
non-aristotelian has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> How would you create a YAML mapping to parse a `shard.yml`, specifically the dependencies.
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c2d601f6649aa1f820fa1de]
<FromGitter> <Blacksmoke16> since its not really an array and you dont know the keys
<FromGitter> <Blacksmoke16> prob just YAML.parse it and add it manually
<FromGitter> <Blacksmoke16> i did a thing
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c2d651d0b7fc97caadd7423]
<FromGitter> <Blacksmoke16> of all the shards pushed to in last 2 months, those are a count of shards listed in n of those shards
<FromGitter> <Blacksmoke16> that have more than 1
<FromGitter> <Blacksmoke16> and are public
<FromGitter> <Blacksmoke16> pg is much more popular the mysql :p
<FromGitter> <dwightwatson> is there any reason that OpenSSL::Cipher isn't in the visible in the API docs?
Raimondi has quit [Ping timeout: 240 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
cyberarm has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
_whitelogger has quit [Ping timeout: 250 seconds]
_whitelogger has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
Raimondi has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
return0e_ has quit [Remote host closed the connection]
return0e has joined #crystal-lang
<FromGitter> <Blacksmoke16> how would you guys handle form data: ⏎ option 1: set the param type to `HTTP::Params` and let the user decompose it how they want/need? ⏎ option 2: break down the form data so each param in the action maps to a piece of the form data?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c2e6efcbabbc178b221a563]
<FromGitter> <Blacksmoke16> or
<FromGitter> <Blacksmoke16> ``````
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5c2e6f558d31aa78b1416c5e]
return0e has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> im thinking option `
<oprypin> well definitely not 2
<FromGitter> <Blacksmoke16> oh yea, that would get loooong really fast ha
<FromGitter> <kevinelliott> Yeah, seems that method signature form of defining attributes/params would be unwieldy in many cases.
<oprypin> main thing is it's extremely inflexible
<FromGitter> <Blacksmoke16> deff wont be as slick as if they were using JSON, but giving them the full param obj is prob best bet. then they are free to do what they want with what data they get
<FromGitter> <kevinelliott> > But a reference like ruby-toolbox would certainly be nice. I've been working on that in the last week or two. ⏎ ⏎ Funny you say that @straight-shoota I was working on one too.
<FromGitter> <Blacksmoke16> if they were smart could define a `self.from_params` on their objects, and use a custom `ParamConverter` and should just work
<FromGitter> <Blacksmoke16> yea, think ill go with option 1
<FromGitter> <Willyboar> @kevinelliott he said that will be open source
<FromGitter> <Willyboar> so you can combine them if your is open too
<FromGitter> <kevinelliott> Yes, would definitely consider it
<FromGitter> <Willyboar> 👍
spacemanspam has quit [Read error: Connection reset by peer]
<FromGitter> <drum445> What's the most efficent way to remove the last char from a string?
<FromGitter> <Blacksmoke16> .chomp
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/0.27.0/String.html#chomp%28suffix%3AChar%29-instance-method
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/0.27.0/String.html#rchop-instance-method or if you dont know what the last char is
<FromGitter> <drum445> yeah that'll work ta, seems I have to pass the last char through to that though
<FromGitter> <Blacksmoke16> ^^
<FromGitter> <drum445> haha thanks @Blacksmoke16
<FromGitter> <Blacksmoke16> np
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
spacemanspam has joined #crystal-lang
<FromGitter> <drum445> sorry, got another one. What's the best way to convert an array of Hash to json please?
<FromGitter> <Blacksmoke16> use an array of structs and use json::serializable :P
<oprypin> ???
<oprypin> `require "json"; p [{"a": 5}].to_json`
<FromGitter> <Blacksmoke16> :0 that works too
return0e has joined #crystal-lang
<FromGitter> <drum445> oh ffs, I was just missing the import lol
<FromGitter> <drum445> thanks lads
akaiiro has joined #crystal-lang
Raimondi has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Ping timeout: 256 seconds]
laaron has joined #crystal-lang
Raimondi has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
jokke has quit [Read error: Connection reset by peer]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang