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
<FromGitter> <watzon> @jgillich if it's a reserved keyword I'd recommend either prefixing it with something, like `redis_return` or shortening it/spelling it a different way like `ret`. Is return the only command like that?
<FromGitter> <tenebrousedge> they mentioned `return`, `with`, and `union`
<FromGitter> <jgillich> Yep those are the ones. The idea is to have a nice interface similar to the html_builder shard, so I'm not a fan of prefixing all methods. I'll look into macros, but I agree with you guys, probably a bad idea. Although they'd only be overwritten in the query builder block and there's no reason to return from that anyway...
<FromGitter> <Blacksmoke16> got an example of it not working? are ways around certain cases
<FromGitter> <watzon> Yeah Lucky's HTML builder ended up having to make some compromises too, like `para` instead of `p`
<FromGitter> <watzon> Just make sure you document differences and you should be ok
<FromGitter> <tenebrousedge> wow
<FromGitter> <tenebrousedge> okay, nvm, just weird `icr` behavior
<FromGitter> <tenebrousedge> https://carc.in/#/r/851k
<FromGitter> <tenebrousedge> in `play` you get an error, in `icr` all methods subsequently return 3
<FromGitter> <Blacksmoke16> prob makes sense knowing how it works
<FromGitter> <tenebrousedge> I suspect that it would be best to report it as a bug, but...I ain't gonna
dwdv has quit [Ping timeout: 276 seconds]
duane has joined #crystal-lang
<FromGitter> <tenebrousedge> lovely. So I based my AoC2019 day 3 solution off a Python one. I noted a comment by it: ⏎ ⏎ > How long did it take your program to run? My program took 10 minutes. ⏎ Crystal: 418.7 milliseconds (not with `--release`) [https://gitter.im/crystal-lang/crystal?at=5de8613b1659720ca8fe0c5d]
<FromGitter> <tenebrousedge> nothing very interesting about it (https://github.com/tenebrousedge/aoc2019-cr/blob/master/src/3/first.cr)
blackbeard420 has quit [Quit: ZNC 1.7.4 - https://znc.in]
hpyc9 has quit [Quit: ZNC 1.7.4 - https://znc.in]
<Stephie> trying to avoid entering a rant about macos every 10 seconds on the github issue tracker
hpyc9 has joined #crystal-lang
<Stephie> it's trult fustrating how many bugs are just purely apple's fault
blackbeard420 has joined #crystal-lang
<FromGitter> <tenebrousedge> example?
* FromGitter * tenebrousedge is penguin powered
<FromGitter> <watzon> I wish that the converter for JSON::Field could just be a proc
<FromGitter> <watzon> Maybe have a to_converter and a from_converter
<FromGitter> <watzon> Because I rarely want to go define a whole module and look up how to do it all over again
<FromGitter> <tenebrousedge> make it so, number one!
<FromGitter> <tenebrousedge> is there an `Integer#digits` equivalent, and it not, why?
<FromGitter> <tenebrousedge> 😅 what an odd coincidence that many people have discovered the need for this at the same time
f1refly has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 276 seconds]
raz has quit [Quit: *fump*]
sagax has joined #crystal-lang
<FromGitter> <watzon> Is there a good built in way to indent a whole IO?
<FromGitter> <Daniel-Worrall> Lol Stephie, just wait till Windows support comes out. It'll dominate the macos issues
<FromGitter> <watzon> Oh it definitely wi;;
<FromGitter> <watzon> Answered my own question
<FromGitter> <watzon> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5de8879105eec2433dd720b9]
<FromGitter> <watzon> This should be added to the standard library imo
<FromGitter> <watzon> I find myself needing it alot
<FromGitter> <tenebrousedge> and this is a case where the distinction between `^` and `\A` is important
<FromGitter> <tenebrousedge> @watzon why `[ \t]` and not `\s` ?
<FromGitter> <watzon> Actually that would be better
<FromGitter> <watzon> I copied this from activesupport
<FromGitter> <tenebrousedge> ah
<FromGitter> <tenebrousedge> well otherwise I think it's fine
<FromGitter> <watzon> I'm writing a class generator right now and a method like that really helps for making sure everything is properly indented
ur5us__ has quit [Ping timeout: 250 seconds]
duane has quit [Ping timeout: 250 seconds]
yukai has quit [Ping timeout: 250 seconds]
yukai has joined #crystal-lang
yukai has quit [Ping timeout: 265 seconds]
yukai has joined #crystal-lang
ht_ has joined #crystal-lang
ht_ has quit [Quit: ht_]
yukai has quit [Ping timeout: 240 seconds]
ur5us__ has joined #crystal-lang
Nazral has quit [*.net *.split]
Nazral has joined #crystal-lang
ur5us__ has quit [Ping timeout: 250 seconds]
<FromGitter> <j8r> @watzon I would avoid monkey patching the stdlib as much as possible
<FromGitter> <watzon> In this case it's just a single script, not meant to be imported or used in anything else
<FromGitter> <j8r> because it's harder to know where the method comes from
<FromGitter> <watzon> Normally I wouldn't
<FromGitter> <j8r> ok
<FromGitter> <watzon> But I think it would be nice if the stdlib had a method like that
<FromGitter> <watzon> Don't know if anyone would be for it though
<FromGitter> <j8r> there is `ljust`
<FromGitter> <j8r> and `rjust`
<FromGitter> <watzon> I don't think those would work on something that's multiline though, would they?
<FromGitter> <watzon> The idea of the `indent` method is to have it work with a whole body of text, inserting space before each line
<FromGitter> <j8r> It's pretty simple to do, no sure it's worth it or common enough to put it in stdlib
<FromGitter> <watzon> *shrug*
<FromGitter> <j8r> each_line + String.build + ljust, done
<FromGitter> <watzon> I have found plenty of instances where I could use it, but you're right it's easy enough to do