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
davic has joined #crystal-lang
<FromGitter> <Blacksmoke16> tl;dr allows using `Crylog` with a var/property typed as the stdlib's `Logger`
<FromGitter> <Blacksmoke16> forgot to hit enter 😬
gangstacat has quit [Quit: Ĝis!]
gangstacat has joined #crystal-lang
return0e has joined #crystal-lang
gangstacat has quit [Quit: Ĝis!]
return0e has quit [Ping timeout: 240 seconds]
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 265 seconds]
<hypercore> anyone know why i get this error (https://paste.ubuntu.com/p/8K394nRKcF/) when i try to create a user running lucky in production? (following this guide -> https://paste.ubuntu.com/p/8K394nRKcF/)
f1refly has joined #crystal-lang
<FromGitter> <Blacksmoke16> sure the db exists?
f1reflyylmao has quit [Ping timeout: 245 seconds]
<hypercore> i'm using the standard config/database.cr, but it says i haven't given it a username or password
<hypercore> yeah pretty sure
<hypercore> definitely
<hypercore> just checked
<hypercore> also it says to create a systemd service (with env variables), but when i try to run it, it says it can't find ".env"
<hypercore> -> Environment="DATABASE_URL=postgres:///lucky_production"
<FromGitter> <Blacksmoke16> that would prob do it?
<hypercore> it fixed that particular issue, but now i get the one i pasted above (on ubuntu paste)
<FromGitter> <Blacksmoke16> make sure you're defining db creds for prod env?
<hypercore> ah that's probably it, thank you!
<hypercore> in the Lucky::Env.production? clause, it just has a DATBASE_URL config (https://paste.ubuntu.com/p/SVBZbGp5BZ/)
<hypercore> shouldn
<FromGitter> <Blacksmoke16> ``` if Lucky::Env.production? ⏎ settings.url = ENV.fetch("DATABASE_URL")``` [https://gitter.im/crystal-lang/crystal?at=5da68c0e894dee56e54edecc]
<FromGitter> <Blacksmoke16> yea
<hypercore> shouldn't it alos have DB_USER, DB_PASS, etc
<FromGitter> <Blacksmoke16> so is that URL env var correct?
<hypercore> i'm just using the one from https://luckyframework.org/guides/deploying/ubuntu
<hypercore> so "postgres:///luck_production"
<hypercore> * "postgres:///lucky_production"
<FromGitter> <Blacksmoke16> well yea that doesnt have a user/pass
<FromGitter> <Blacksmoke16> would have to fill that in
<hypercore> oh, do i need to include the username and password in that url?
<FromGitter> <Blacksmoke16> well yeua
<hypercore> ah ok, i've never had to do that before with other frameworks :P
<hypercore> so like postgresql://user:secret@localhost?
<FromGitter> <Blacksmoke16> prob something like that
<hypercore> cool, i'll give that a shot. Thanks for the help ;)
rohitpaulk has joined #crystal-lang
<FromGitter> <Blacksmoke16> np
ht_ has joined #crystal-lang
<FromGitter> <s0kil> Are there any plans to support Brotli compression?
<FromGitter> <Blacksmoke16> prob as a shard
ht_ has quit [Remote host closed the connection]
ht_ has joined #crystal-lang
<FromGitter> <s0kil> Does the gzip module link to the lib installed on OS or its a complete implementation?
rohitpaulk has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> if using the release binary its prob statically linked within it?
<FromGitter> <Blacksmoke16> i could be wrong tho
<FromGitter> <s0kil> Been looking through source, I don't recognize any external system calls
ht_ has quit [Remote host closed the connection]
return0e has joined #crystal-lang
return0e has quit [Ping timeout: 240 seconds]
absolutejam has joined #crystal-lang
Nekka has quit [Ping timeout: 265 seconds]
<FromGitter> <mavu> @asterite Thank you for the ByteFormat hint, that should be safer.
absolutejam has quit [Ping timeout: 240 seconds]
dwdv_ has joined #crystal-lang
absolutejam has joined #crystal-lang
Nekka has joined #crystal-lang
f1refly has quit [Quit: bye fags]
f1refly has joined #crystal-lang
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
return0e has joined #crystal-lang
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 240 seconds]
return0e_ has quit []
return0e has joined #crystal-lang
chemist69 has joined #crystal-lang
alexherbo2 has joined #crystal-lang
absolutejam has quit [Ping timeout: 264 seconds]
absolutejam has joined #crystal-lang
<FromGitter> <ilanpillemer> does crystal have a debugger
alexherbo2 has quit [Read error: Connection reset by peer]
alexherbo2 has joined #crystal-lang
<jhass> not really. You can use gdb/lldb but the symbols are not awesome tbh
<jhass> so depends a bit on your problem, but print debugging probably is faster for most cases still
<FromGitter> <ilanpillemer> ok. can you do an overlapping regex scan?
<FromGitter> <ilanpillemer> ie if I want to find all <aba> matches.. on string β€œzazbz” it would give me β€œzaz” and β€œzbz"
<FromGitter> <ilanpillemer> scan seems to only return non-overlapping matches.. so it only returns β€œzaz"
<jhass> if you need it now you can pull in that code as a monkey patch into your project
<FromGitter> <ilanpillemer> Thanks! I will read through it now. 😁
<erdnaxeli> according to the test, each_match() does not overlap
<FromGitter> <ilanpillemer> yes, precisely. The referred pull requests enriches the API to allow that. I am looking for overlapping matches!
<erdnaxeli> non, the overlapping feature what removed from the PR
<erdnaxeli> no*
<erdnaxeli> this comment explains how to do it : https://github.com/crystal-lang/crystal/pull/8162#discussion_r323785453
<FromGitter> <ilanpillemer> looks like it just repeatedly matches against the string, by going forward one char at a time
<FromGitter> <ilanpillemer> it looks at the next char, gets how many bytes it is, shifts forward and repeats
<erdnaxeli> the iterator the PR wants to add shift by the bytesize of of the matched string
<FromGitter> <ilanpillemer> oh. well then it won’t work I guess for over lapping
<jhass> ah, true sorry, I forgot
<jhass> yes right, you can do this with a lookaround
<jhass> since that has a zero match width
<erdnaxeli> yep
<FromGitter> <ilanpillemer> the `?=` does something
<FromGitter> <ilanpillemer> I need to capture as well
<jhass> though I'm actually not sure it generalizes given lookarounds need to be static width (no +/*/? modifiers)
<jhass> you can put a capture group into the lookaround
<FromGitter> <absolutejam_gitlab> Jesus christ, every time I get comfortable hacking some crappy js together I get hit with js madness
<FromGitter> <absolutejam_gitlab> ```let newVal = typeof val === "object" ? sanitizeObject(val) : val;```
<FromGitter> <ilanpillemer> yes it works
<FromGitter> <absolutejam_gitlab> `null` == typeof object
<jhass> why you think there's so few "fullstack developers"? :P
<FromGitter> <absolutejam_gitlab> I need to write this plugin and get the hell away from js
<FromGitter> <ilanpillemer> `scan(/(?=(.)(.)\1)/)`
<FromGitter> <absolutejam_gitlab> ^ boobs
<FromGitter> <ilanpillemer> hurts my eyes though
<FromGitter> <dscottboggs_gitlab> @absolutejam_gitlab the scary thing is crystal can be written to be just as confusing or worse ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=5da70ee51e314c04671bd435]
<FromGitter> <dscottboggs_gitlab> @absolutejam_gitlab the scary thing is crystal can be written to be just as confusing or worse ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5da70f2a894dee56e5527c91]
<FromGitter> <absolutejam_gitlab> My issue was `null` is a type of `object`
<FromGitter> <dscottboggs_gitlab> oh god
<FromGitter> <dscottboggs_gitlab> nevermind that's worse
<FromGitter> <dscottboggs_gitlab> this is why people hate JS
<FromGitter> <dscottboggs_gitlab> anyway, is there any way to access annotations on arbitrary constant values (i.e. an enum variant)
<FromGitter> <Blacksmoke16> idt
<FromGitter> <dscottboggs_gitlab> fucks sake
<FromGitter> <Blacksmoke16> sec
<FromGitter> <Blacksmoke16> yea no
<FromGitter> <dscottboggs_gitlab> do you think a PR would be accepted adding that? I think it could cause side-effects either way...If constant names are a new macro type, that's a breaking change. OTOH, adding annotation checking to everything that's a`MacroID`might not be good either...
<FromGitter> <Blacksmoke16> whats the use case?
<FromGitter> <dscottboggs_gitlab> I have an enum for which I want to override the string representation of some of them. ⏎ ⏎ Wait....JSON::Field does this somehow...
<FromGitter> <dscottboggs_gitlab> no that's on ivars
<FromGitter> <Blacksmoke16> override `to_json` within the enum
<FromGitter> <Blacksmoke16> is prob what you would have to do
<FromGitter> <dscottboggs_gitlab> for example ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5da7116bf88b526fb94b9f60]
<FromGitter> <dscottboggs_gitlab> I expected I could do like`E::VariantTwo.to_s # => "in another way"
<repo> i'm pretty amazed how far wasm-bindgen has come
<repo> soon nobody will have to be writing javascript anymore <3
<FromGitter> <dscottboggs> repo, is that for crystal?
<FromGitter> <tenebrousedge> it would be glorious to not need JS any more
<repo> unfortunately not
<repo> it's rust
<repo> not sure how practical it would be to run a gc in wasm :)
<repo> it's pretty damn impressive
<repo> with that api you can write whole frontend frameworks for rust
absolutejam has quit [Ping timeout: 268 seconds]
<FromGitter> <phykos> can I connect a MySQL database to a Crystal script? if yes, how?
<FromGitter> <phykos> @FromIRC thx
<FromGitter> <phykos> lmao what
<erdnaxeli> ahah
<erdnaxeli> yes I'm comming from irc x)
<FromGitter> <straight-shoota> `From IRC` is a bot that bridges messages between gitter and IRC. The message was sent by erdnaxeli via IRC
<FromGitter> <phykos> mh ok
<FromGitter> <tenebrousedge> you can't do destructuring assignment in a Proc literal, right?
fifr has joined #crystal-lang
<fifr> Hi, I have a question: why does 'a = [1]; a[0..] = [1, 2]' work but 'a = [] of Int32; a[0..] = [1,2]' or 'a = [] of Int32; a[..] = [1,2]' do not? Is this intended?
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/cr could you make an example here?
<FromGitter> <Blacksmoke16> easier to see the errors and such
<FromGitter> <tenebrousedge> the error is because in the other examples a[0] doesn't exist
<FromGitter> <tenebrousedge> so you get an index out of bounds
<FromGitter> <tenebrousedge> I think that's more-or-less intentional
<FromGitter> <tenebrousedge> if you think that *should* be possible, you might make an issue
<FromGitter> <tenebrousedge> I'm not sure how much support you'd get
<fifr> Well, imho it should work if replacing an empty range is ok, in particular the last example (but also in the second example the range 0.. is empty for that array)
<FromGitter> <tenebrousedge> replacing a range where the first element doesn't exist provokes an index out of bounds error
<fifr> yes, I know (or that's what I assume what happens in these examples) ... the question is whether it should be that way
<fifr> I think one can argue if this makes sense for explicit indices ... but what about the last example with the unbounded range?
<FromGitter> <kinxer> @fifr Why should the language allow `a[..] = [1, 2]` when that is exactly the same as `a = [1, 2]`?
<FromGitter> <kinxer> The second option is shorter and more clear.
<FromGitter> <tenebrousedge> I think it's consistent. This isn't Ruby, where accessing unset elements returns `nil`. Also , I don't think the unbounded range is actually unbounded as applied to this context
<FromGitter> <Blacksmoke16> `Because the begin and end are now optional, we can also write (..). It doesn't have much use, really. We could forbid it. But right now you can use it:`
<FromGitter> <tenebrousedge> arrays start at 0
<fifr> kinxer: it is? I thought that `a = [1,2]` create a *new* array, whereas `a[..] = [1,2]` should *replace* the content of the array
<fifr> i.e. after something like `a = []; b = []; a[..] = [1,2]` the two variables should still refer to the same array
<hypercore> what's method do you guys usually use for building binaries? i'm from the dynamic language world, so i've never really had to do this before, and am not really sure about best practices in this regard
<fifr> that's actually the reason how I came to this question
<FromGitter> <kinxer> @fifr That's a fair distinction. Okay, then, in order for the behavior of `a[]` to be consistent, `a[..] = [1,2]` should replace all elements of `a` with the array `[1,2]`. If `a` is empty, there are no elements to replace and therefore, by trying to replace an element, you would get an `IndexOutOfBoundsException`.
<FromGitter> <tenebrousedge> fifr that example declares two empty arrays
<FromGitter> <tenebrousedge> maybe you meant `b = a` ?
<fifr> ah, sorry, I mean `a = []; b = a`, yes
<hypercore> also i want to run them on the smallest VPS possible, but i think i need at least 2GB to build crystal binaries, so i'm having to pay for a more expensive vps. It would be good if i could build the binaries somewhere else, and then upload it to my 1GB server
<FromGitter> <tenebrousedge> fifr if you want to replace the entire array, there is `array#replace`
<fifr> kinxer: well, it's a philosphical question if you can replace "nothing" by "something" ;)
<FromGitter> <tenebrousedge> it would be in Ruby, but in Crystal we throw an exception if you try to access elements that don't exist
<fifr> tenebrousedge: sure ... but `a[..]` is valid and does not fail because, well, we only access the empty range hence we do not really access a non-existing element ... anyway, I just wanted to raise question, thanks for the discussion
<FromGitter> <kinxer> I am displeased by the semantics of `Array#[](Range)`: https://play.crystal-lang.org/#/r/7tgc
Nekka has quit [Ping timeout: 268 seconds]
<fifr> kinxer: ok, now it gets interesting ;)
<FromGitter> <tenebrousedge> you're replacing each element in the array with `[1,2]`
Nekka has joined #crystal-lang
<FromGitter> <tenebrousedge> ...now that's a bit weird
<FromGitter> <tenebrousedge> but wait, aren't there multiple invocations of `[]` ?
<FromGitter> <tenebrousedge> you're calling two different functions, apparently
<FromGitter> <kinxer> More clearly defining my expectations and reality: https://play.crystal-lang.org/#/r/7tgh
<FromGitter> <kinxer> Well, I guess the docs do define the methods the way they're behaving...
ht_ has joined #crystal-lang
<FromGitter> <kinxer> For quicker reference: https://crystal-lang.org/api/0.31.1/Array.html#[]=(range:Range,value:T)-instance-method
absolutejam has joined #crystal-lang
ua has quit [Excess Flood]
ua has joined #crystal-lang
<FromGitter> <vlazar> hypercore, you could use docker container with apline linux to build statically linked binaries
<FromGitter> <vlazar> see https://hub.docker.com/r/jrei/crystal-alpine for example
<FromGitter> <vlazar> another one https://hub.docker.com/r/durosoft/crystal-alpine/
<FromGitter> <vlazar> I think there are many others or you can build your own docker container
<FromGitter> <asterite> I think the array .. thing is a bug. Please report it
<hypercore> thanks vlazar, i'll give it a try
absolutejam has quit [Ping timeout: 265 seconds]
<FromGitter> <kinxer> @fifr You brought the question; you want to make the GitHub issue?
Nekka has quit [Ping timeout: 240 seconds]
Nekka has joined #crystal-lang
absolutejam has joined #crystal-lang
absolutejam has quit [Ping timeout: 276 seconds]
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
absolutejam has joined #crystal-lang
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
Seich has quit [Remote host closed the connection]
<FromGitter> <ImAHopelessDev_gitlab> > @absolutejam_gitlab the scary thing is crystal can be written to be just as confusing or worse ⏎ > ⏎ > ``` ⏎ > newVal = val.class == "SomeClass" ? sanitize_SomeClass(val) { raise "error handling here because why not" } : val ⏎ > ``` ... [https://gitter.im/crystal-lang/crystal?at=5da77fd6894dee56e555c725]
<FromGitter> <absolutejam_gitlab> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5da78031894dee56e555c9b5]
<FromGitter> <absolutejam_gitlab> essentially?
<FromGitter> <ImAHopelessDev_gitlab> Yeah, what happens to `newVal`, when the exception happens
<FromGitter> <absolutejam_gitlab> well if it's unhandled, nothing?
<FromGitter> <tenebrousedge> things go splodey
<FromGitter> <absolutejam_gitlab> If it is handled, it gets raised to the handling block anyway?
<FromGitter> <absolutejam_gitlab> Dunno, just guessing here
Seich has joined #crystal-lang
<FromGitter> <tenebrousedge> I think you're right. `newVal` would go out of scope
<FromGitter> <tenebrousedge> it wouldn't be initialized
<FromGitter> <absolutejam_gitlab> the more I toy with the likes of Go and JS, the more I appreciate the constructs available in Crystal's stdlin
<FromGitter> <absolutejam_gitlab> Sure, Go has a comprehensive stdlin for other stuff, like SSH
<FromGitter> <absolutejam_gitlab> stdlib*
<FromGitter> <tenebrousedge> JS is Just Sad
<FromGitter> <absolutejam_gitlab> it really is the worst
<FromGitter> <absolutejam_gitlab> The front-end devs I work with don't even defend it, they just respond with 'yeah, you just get used to that kinda shit'
ht_ has quit [Remote host closed the connection]
<FromGitter> <ImAHopelessDev_gitlab> Yeah I'm a front-end dev, I feel the same way. However, vanilla JS will always be in my heart, and sometimes I might feel like I need to defend it (dependent on my mood)
<FromGitter> <marynowac> Hi, ⏎ I came across a problem with the database connection. A standard piece of code: ⏎ ⏎ ```DB.open "postgres://myuser:mypasswd@remoteserver/mydb" do |db| ⏎ # some code ⏎ end``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5da78955870fa33a4d05379e]
<erdnaxeli> It's related to your database configuration
<erdnaxeli> There must be a way in the code to change the authentication type
<erdnaxeli> Here you are trying to use a clear auth, wich your database configuration does not allow
<FromGitter> <marynowac> I have no influence on the database configuration.
<FromGitter> <marynowac> I did some tests and I successfully connect there using php. But not Crystal.
<erdnaxeli> Yep, it's your code that need to be fixed. I'm looking at the doc but it don't see how yet πŸ€”
<FromGitter> <marynowac> Me too. What's reason why I asked you for help :)
<FromGitter> <ImAHopelessDev_gitlab> there's something related. i don't use postgres but did some searching on google for help
<FromGitter> <ImAHopelessDev_gitlab> no idea, sorry
<FromGitter> <marynowac> PHP works on very basic configuration: ⏎ ⏎ ```$db = new PDO("pgsql:dbname=mydb host=remoteserver", "myuser", "mypasswd");``` [https://gitter.im/crystal-lang/crystal?at=5da78c032d59854e7f162f75]
<FromGitter> <marynowac> @ImAHopelessDev_gitlab ⏎ It seems that clear text auth is removed from the driver…
<FromGitter> <ImAHopelessDev_gitlab> @marynowac i wonder why, is it a security issue?
<FromGitter> <marynowac> Don't know. I'm a hopeless dev too :-]
<FromGitter> <ImAHopelessDev_gitlab> πŸ˜†
Nekka has quit [Ping timeout: 268 seconds]
Nekka has joined #crystal-lang
<FromGitter> <phalcondroid> Hi Guys, im going to start to develop an application with an administrator and api, i was temped to use amber for both functionalities but i don't sure if i can develop the api with amber too, do you think its better for API other framework as Kemal?
<FromGitter> <phalcondroid> or use amber only for web admin?
<FromGitter> <sam0x17> you could pretty easily use amber for an API -- just inherit from one ApiController where you specify that it should use JSON etc
<FromGitter> <sam0x17> on my app I went all kemal, though
Nekka has quit [Ping timeout: 240 seconds]
Nekka has joined #crystal-lang
<FromGitter> <phalcondroid> and is good the amber performance?
<FromGitter> <Blacksmoke16> prob good enough
<FromGitter> <Blacksmoke16> anything crystal is going to be decent enough for real world use
<FromGitter> <Blacksmoke16> is also Athena, however its quite young. depending on how it will be used might not be the best choice
<FromGitter> <sam0x17> lucky has really good docs and is similar to amber
<FromGitter> <sam0x17> I'm not using any of them though until they strip out the (optional) nodejs dependency by default and replace it with something like https://github.com/sam0x17/html-minifier
<FromGitter> <Blacksmoke16> dont have a nodejs dep if you dont render any html πŸ˜‰
<FromGitter> <sam0x17> true dat
<FromGitter> <sam0x17> I saw a website back in the day that was a dynamically generated (php) gif with image maps defining all the navigation
<FromGitter> <sam0x17> technically html but still
<FromGitter> <phalcondroid> Guys do you think is a good choice amber/crystal to production application?
<FromGitter> <ImAHopelessDev_gitlab> yeah
<FromGitter> <phalcondroid> haha thanks, just the nudge that i need
<FromGitter> <ImAHopelessDev_gitlab> :D
<FromGitter> <ImAHopelessDev_gitlab> Are you starting something fresh? Or converting an old codebase into Crystal?
<FromGitter> <phalcondroid> i have an administrator of my application actually in phalcon/php is good and i liked but, i would try on crystal i think it is very awesome
<FromGitter> <ImAHopelessDev_gitlab> noicee
<FromGitter> <phalcondroid> but I don't want to lose my job and migration of code if the language and framework are not yet mature
<FromGitter> <ImAHopelessDev_gitlab> LOL
<FromGitter> <ImAHopelessDev_gitlab> haha i feel ya
absolutejam has quit [Ping timeout: 240 seconds]
hypercore has quit [Ping timeout: 260 seconds]
<FromGitter> <Blacksmoke16> @tenebrousedge you'd prob have a thought on this
<FromGitter> <Blacksmoke16> `logger.info("STRING".colorize :yellow)`
<FromGitter> <Blacksmoke16> would you expect a logger to make it `[2019-10-16T23:33:43.733675000Z] main.INFO: STRING` (imagine thats colored) be colored if logging to STDOUT, but strip the colorize chars if logged to a file
<FromGitter> <Blacksmoke16> `[2019-10-16T23:32:12.035641000Z] main.INFO: STRING`
<FromGitter> <Blacksmoke16> (or if anyone else has thoughts)
<FromGitter> <Blacksmoke16> i can either:
<FromGitter> <Blacksmoke16> 1) Just strip all colors (easiest) ⏎ 2) Try and do something hacky to support this
hypercore has joined #crystal-lang
<FromGitter> <Blacksmoke16> im leaning towards one, just to keep things simple and not like you're going to be watching logs
<FromGitter> <tenebrousedge> I think you could try to detect whether the output was going to a terminal that supports colors
<FromGitter> <tenebrousedge> I'd do the hacky thing
<FromGitter> <Blacksmoke16> problem is, currently a logged message is a string, so id have to go and add `Colorize::Object(String)` and carry that around
<FromGitter> <tenebrousedge> oh, you went and put type restrictions in your code?
alexherbo2 is now known as alex```
<FromGitter> <Blacksmoke16> (this is for my logging shard)
<FromGitter> <tenebrousedge> I mean, a colorized string is still a string, it just has escape sequences in it
<FromGitter> <Blacksmoke16> exactly, but since its a string i cant just do `str.toggle(false)` anymore
<FromGitter> <tenebrousedge> huh? what's that?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5da7ad73809de9699f4e5a59]
<FromGitter> <Blacksmoke16> basically is a wrapper that controls if it should add the color codes or not
<FromGitter> <tenebrousedge> it's a shame that `colorize` doesn't result in an object that extends `String`
<FromGitter> <Blacksmoke16> what about something like `message.message.gsub(/color_code_regex/, "") if !@io.tty? || !Colorize.enabled?`
<FromGitter> <Blacksmoke16> feels kinda hacky to me to have to use gsub to handle this, but hmm
<FromGitter> <tenebrousedge> `delete` might be a better option
<FromGitter> <Blacksmoke16> prob
<FromGitter> <Blacksmoke16> the other problem is i dont have access to `@io` until im in the handler