RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.25.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
RX14- has quit [Remote host closed the connection]
rx14_ has joined #crystal-lang
Vexatos has joined #crystal-lang
Vexatos has quit [Client Quit]
rx14_ has quit [Client Quit]
rx14_ has joined #crystal-lang
Vexatos has joined #crystal-lang
<FromGitter> <bew> @Blacksmoke16 `on_to_yaml` is called when already in a `yaml.mapping` block, so: https://play.crystal-lang.org/#/r/4jzc
wontruefree has quit [Quit: bye]
<FromGitter> <Blacksmoke16> ah so need two to denote key and value?
<FromGitter> <bew> yes
<FromGitter> <Blacksmoke16> any reason why it doesnt work like json `json.field key, value`?
<FromGitter> <bew> no idea, I guess it's because YAML is more flexible and you can have many kind of different things (no idea..)
<FromGitter> <bew> actually you can even have a mapping as the key: https://play.crystal-lang.org/#/r/4jzf
<FromGitter> <Blacksmoke16> fair enough
<FromGitter> <paulcsmith> I've been working on some screencasts and an app to host them. I've only got 2 up. More coming soon. Starting with some simple ones and will add some more complex topics soonish :) https://www.crystalmastery.io/episodes
<FromGitter> <paulcsmith> I've got a few more recorded that need some pretty heavy editing still 🙃
<FromGitter> <fridgerator> awesome!
<FromGitter> <icyleaf> Can crystal detect a class’s ancestors of variable in method or macro? code like this: https://play.crystal-lang.org/#/r/4k05
<FromGitter> <bew> From a method you can use `def meth(cls : T.class) forall T` then use `T` in your macro
<FromGitter> <bew> Sorry, in your method
<FromGitter> <bew> From the macro, you can convert a `Path` to a `TypeNode` using `Path#resolve`
<renzhi> hi, is there a more precise way to calculate memory consumption of an object? All I can think of now is taking GC.stats.total_bytes before and after, what's a better way?
<FromGitter> <icyleaf> @bew Thanks, let me try it
<FromGitter> <bew> @renzhi there is `sizeof` to get the size of an object, but it won't get the memory usage of an array or an hash for example
<FromGitter> <bew> to get a precise memory consumption of the object, you'll have to implement something yourself
<renzhi> I'm trying to figure out the size of built-in types, and add up when compare with more complex object, but things do not add up quite right :)
<renzhi> I'll think about it more. thx
<FromGitter> <icyleaf> @bew works, many thanks
<FromGitter> <bew> and it probably won't be generic enough :/ it might be interesting to have sth good in stdlib though
<FromGitter> <bew> @icyleaf nice! have fun ;)
<renzhi> that's what I think, it would be nice to have something generic and precise in stdlib. It would help with profiling and planning
akaiiro has quit [Ping timeout: 276 seconds]
akaiiro has joined #crystal-lang
<FromGitter> <icyleaf> @bew it not contain include module name use `T`, is it a bug? https://play.crystal-lang.org/#/r/4k0t
<FromGitter> <bew> you forgot `.class` in the method sigature
<FromGitter> <icyleaf> > .< sorry
<FromGitter> <bew> ^^
<FromGitter> <icyleaf> It is my new working with configuration support JSON/YAML/dotenv format, and also mapping to struct support, have nice try: https://github.com/icyleaf/totem
pabs has quit [Ping timeout: 260 seconds]
pabs has joined #crystal-lang
avdi has quit [Ping timeout: 276 seconds]
Majost has quit [Ping timeout: 276 seconds]
confact has quit [Ping timeout: 276 seconds]
avdi has joined #crystal-lang
confact has joined #crystal-lang
Majost has joined #crystal-lang
confact has quit [Changing host]
confact has joined #crystal-lang
confact has joined #crystal-lang
cyberarm has quit [Ping timeout: 260 seconds]
cyberarm has joined #crystal-lang
rohitpaulk has joined #crystal-lang
moei has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
rohitpaulk has joined #crystal-lang
akaiiro has quit [Remote host closed the connection]
<FromGitter> <aisrael> Is there a quick 'n' easy way to replace capture groups in a Regex match? e.g. in Ruby ⏎ ⏎ ```s.gsub(/(.*)wolf/, '\\1wolves')``` [https://gitter.im/crystal-lang/crystal?at=5b50485a8fe2780689c3471c]
<FromGitter> <aisrael> Ahh... there is in String (gsub with `backreferences`)
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
alex`` has joined #crystal-lang
Jenz has joined #crystal-lang
<Jenz> So, will there be exhaustiveness checks?
rohitpaulk has quit [Ping timeout: 256 seconds]
Jenz has quit [Ping timeout: 276 seconds]
<rx14_> maybe
rx14_ is now known as RX14
<FromGitter> <bararchy> oh no, RX14 what happened to your nick hahaha
<RX14> just had to update my bouncer because of a CVE in znc
<RX14> and then forgot to change my nick back once services kicked me off
hightower3 has joined #crystal-lang
alex`` has quit [Ping timeout: 264 seconds]
alex`` has joined #crystal-lang
Jenz has joined #crystal-lang
alex`` has quit [Ping timeout: 256 seconds]
<Jenz> Mein Vater, mein Vater!
<Jenz> und hörest du nicht,
<Jenz> Was Erlenkönig mir leise verspricht?
alex`` has joined #crystal-lang
<Jenz> I wonder wether I am mad, weird, or whatever
<Jenz> s/wether/whether
alex`` has quit [Ping timeout: 260 seconds]
alex`` has joined #crystal-lang
<FromGitter> <umutuluer> hi guys
<Jenz> Hello
<FromGitter> <umutuluer> i try to any crystal file to run, it runs on my machine but executable file does not run my friends os
<FromGitter> <umutuluer> Library not loaded: /usr/local/opt/bdw-gc/lib/libgc.1.dylib
<FromGitter> <umutuluer> in my friends computer
<FromGitter> <umutuluer> all of us have Mac OS x
<FromGitter> <umutuluer> in my computer crystal is installed, but all of them it is not
<FromGitter> <umutuluer> but it is not important because the file is executable
<FromGitter> <umutuluer> any idea?
shalmezad has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<hightower3> umutuluer: (re)install package libgc-dev
<hightower3> or whatever the name on your system is
rohitpaulk has quit [Ping timeout: 244 seconds]
<FromGitter> <umutuluer> libgc package was missing we installed but same error :/
<shalmezad> Have you opened a new shell and/or restarted your system since installing libgc?
moei has quit [Ping timeout: 276 seconds]
duane has joined #crystal-lang
rohitpaulk has joined #crystal-lang
DTZUZO has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
Jenz has quit [Ping timeout: 276 seconds]
<FromGitter> <umutuluer> yes, we did, but no result
<FromGitter> <bararchy> libgc-dev right?
<FromGitter> <umutuluer> no, libgc
<FromGitter> <bararchy> can you ask any of them to run `ldd` ?
<FromGitter> <paulcsmith> https://www.reddit.com/r/crystal_programming/comments/9069w0/crystal_screencasts_at_crystalmasteryio/ in case anyone missed it last night. I'm super excited to release these and to get some new ones up soon!
<FromGitter> <hugoabonizio> this is awesome @paulcsmith 🎉
<FromGitter> <paulcsmith> Thanks :D
<FromGitter> <paulcsmith> Forgot to mention you can view the source code at https://github.com/paulcsmith/crystal-mastery. It's a pretty simple CRUD app with auth but maybe someone finds it useful
<FromGitter> <straight-shoota> awesome
akaiiro has joined #crystal-lang
<FromGitter> <robacarp> Does anyone have any idea what is going on with this type mismatch? It’s reproducible, and feels like a bug in Crystal. https://github.com/amberframework/granite/issues/258
<FromGitter> <robacarp> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b50a282fd1b3474a69f49f0]
<FromGitter> <robacarp> Are there two classes named Example?
akaiiro has quit [Remote host closed the connection]
<FromGitter> <fridgerator> Has anyone had issues connecting services using docker links? Im getting `Socket::Error: No address found for redis:6379 over TCP` where `redis` is a linked service
<FromGitter> <fridgerator> I saw this in Rancher when deploying, but I can replicate this locally
<FromGitter> <fridgerator> If I use a local Dockerfile then the link works, but once I switch to using an image pulled from docker hub then I see that error
akaiiro has joined #crystal-lang
<FromGitter> <paulcsmith> @robacarp Try adding `::` to the type retriction to make sure it is using the one you expect. Maybe there is more than one and it isn't resolving correctly
<FromGitter> <paulcsmith> Either way I would think that seems like a bug since if it is resolving to a different type than it is printing out, that is also a problem :P
<FromGitter> <fridgerator> nvmd, I think its related to how sidekiq.cr does its environment variables
rohitpaulk has joined #crystal-lang
<FromGitter> <fridgerator> seems like there is some weirdness going on with hostname resolution
Jenz has joined #crystal-lang
wontruefree has joined #crystal-lang
alex`` has quit [Ping timeout: 240 seconds]
<robacarp> https://www.youtube.com/watch?v=SUD9rj0rRxg interspersed amidst the specifics about Rails is a lot of great general advice about contributing and managing open source projects
rohitpaulk has quit [Ping timeout: 264 seconds]
hightower3 has quit [Ping timeout: 276 seconds]
hightower3 has joined #crystal-lang
Jenz has quit [Quit: leaving]
Groogy has joined #crystal-lang
Excureo has joined #crystal-lang
rohitpaulk has joined #crystal-lang
alex`` has joined #crystal-lang
Jenz has joined #crystal-lang
shalmezad has quit [Quit: Leaving]
Jenz has quit [Quit: Lost terminal]
Jenz has joined #crystal-lang
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
wontruefree has quit [Client Quit]
wontruefree has joined #crystal-lang
duane has quit [Ping timeout: 240 seconds]
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
Yxhuvud has quit [Read error: Connection reset by peer]
Yxhuvud has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 256 seconds]
Jenz has quit [Ping timeout: 260 seconds]
moei has joined #crystal-lang
wontruefree has quit [Quit: bye]
wontruefree has joined #crystal-lang
wontruef_ has joined #crystal-lang
wontruefree has quit [Ping timeout: 244 seconds]
hightower3 is now known as hightower4
<hightower4> Hey is there a way for HTTP handlers to automatically execute one after another, or a call to call_next is always explicitly needed?
<FromGitter> <fridgerator> AFAIK if you dont call `call_next` then the request stops there
wontruef_ has quit [Quit: bye]
<FromGitter> <straight-shoota> yes, a handler has to explicitly forward the context to the next one
wontruefree has joined #crystal-lang
johndescs_ has joined #crystal-lang
johndescs has quit [Ping timeout: 240 seconds]
johndescs_ is now known as johndescs
wontruefree has quit [Quit: this is not the client you are looking for]
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 240 seconds]