ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
wtR has left #crystal-lang [#crystal-lang]
avane has quit [Ping timeout: 252 seconds]
avane has joined #crystal-lang
Peter0x44 has quit [Ping timeout: 252 seconds]
Peter0x44 has joined #crystal-lang
Stephie- has joined #crystal-lang
adam124 has joined #crystal-lang
Peter0x41 has joined #crystal-lang
dostoyev1ky2 has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
void09_ has joined #crystal-lang
Stephie| has joined #crystal-lang
avane has quit [*.net *.split]
Peter0x44 has quit [*.net *.split]
dostoyevsky2 has quit [*.net *.split]
adam12 has quit [*.net *.split]
Stephie has quit [*.net *.split]
f1refly has quit [*.net *.split]
xybre has quit [*.net *.split]
void09 has quit [*.net *.split]
f1reflyylmao is now known as f1refly
cfebs_ has joined #crystal-lang
cfebs has quit [Ping timeout: 252 seconds]
cfebs_ is now known as cfebs
adam124 has quit [Ping timeout: 252 seconds]
Stephie- has quit [Ping timeout: 252 seconds]
avane has joined #crystal-lang
straight- has joined #crystal-lang
kiwiroy_ has joined #crystal-lang
human_g33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 252 seconds]
kiwiroy has quit [Ping timeout: 252 seconds]
kiwiroy_ is now known as kiwiroy
straight-shoota has quit [Ping timeout: 252 seconds]
Elouin has quit [Ping timeout: 252 seconds]
Elouin has joined #crystal-lang
xybre has joined #crystal-lang
cfebs_ has joined #crystal-lang
cfebs has quit [Ping timeout: 252 seconds]
notzmv has quit [Ping timeout: 252 seconds]
r0bby has quit [Ping timeout: 252 seconds]
cfebs_ is now known as cfebs
kiwiroy has quit [Ping timeout: 252 seconds]
notzmv- has joined #crystal-lang
kiwiroy has joined #crystal-lang
r0bby has joined #crystal-lang
dostoyev1ky2 has quit [Quit: leaving]
dostoyevsky2 has joined #crystal-lang
fifr_ has joined #crystal-lang
Peter0x44 has joined #crystal-lang
fifr has quit [Ping timeout: 252 seconds]
Peter0x41 has quit [Ping timeout: 252 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
void09_ has quit [Quit: void09_]
void09 has joined #crystal-lang
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 252 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 245 seconds]
taupiqueur has joined #crystal-lang
sagax has joined #crystal-lang
<FromGitter> <Dan-Do> It seems there is a bug in compiler ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=6159b2b7a41fd20699c18425]
pixel has joined #crystal-lang
taupiqueur has quit [Quit: taupiqueur]
taupiqueur has joined #crystal-lang
<FromGitter> <Blacksmoke16> What's the code that causes this?
<FromGitter> <Dan-Do> I am trying to reproduce, but can't get there. Anyway, here is a small bug https://carc.in/#/r/bzqr ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=6159bba19d20982e4f9c523a]
<FromGitter> <Dan-Do> error `syntax error in eval:12 ⏎ Error: expecting token 'EOF', not 'end'`
<FromGitter> <Dan-Do> But if you remove all comments, it works
<FromGitter> <Blacksmoke16> i mean what's with the ternary that uses an `if`?
<FromGitter> <Blacksmoke16> i think you'd want `#{!body.is_a?(String) ? body : body.to_json}`
<FromGitter> <HertzDevil> if you have ⏎ ⏎ ```macro foo(message) ⏎ # {{message}} ⏎ end ⏎ ⏎ foo "1 #{2 if 3} 4"``` [https://gitter.im/crystal-lang/crystal?at=6159bf1fd3ae402e4729a62b]
<FromGitter> <HertzDevil> the comment expands into something like ⏎ ⏎ ```# "1 #{if 3 ⏎ 2 ⏎ end} 4"``` [https://gitter.im/crystal-lang/crystal?at=6159bf29a41fd20699c19c3c]
<FromGitter> <Blacksmoke16> ^ macro code that is commented out is still expanded
<FromGitter> <HertzDevil> well the problem is the newline is implicitly added
<FromGitter> <Dan-Do> Yeap, my bad , it's not a compiler bug :)
<FromGitter> <Dan-Do> I will try to reproduce the above bug
<FromGitter> <Blacksmoke16> `"foo" * -1` would prob do it
<FromGitter> <HertzDevil> that bug is probably fixed by #11008
<FromGitter> <Dan-Do> uhm, I didn't use `--error-trace`
<FromGitter> <Dan-Do> but it related to the `macro code that is commented out is still expanded`
<FromGitter> <Dan-Do> sorry I cannot reduce the code :(
human_g33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
notzmv- is now known as notzmv
<FromGitter> <HertzDevil> what does it mean for an ast node to `bind_to` itself
ur5us has joined #crystal-lang
Guest3 has joined #crystal-lang
Guest3 has quit [Quit: Client closed]
<FromGitter> <aaaScript> I was wondering if anyone has any tips on using the Logger against a DB model. Basically my use case is that in addition to printing to STDOUT, I want to also create an entry in a Granite model that can be accessible through other means such as an web API. Would anyone have any input on this?
<FromGitter> <Blacksmoke16> i.e. output logged messages to STDOUT and store them in a db table?
<FromGitter> <Blacksmoke16> you essentially just want a custom implementation of https://crystal-lang.org/api/master/Log/Backend.html
<FromGitter> <aaaScript> Yup correct. Like a way to overload whatever it currently does and do a Syslog.new(severity: severity, message: message).
<FromGitter> <Blacksmoke16> then point it at what backends should handle what
<FromGitter> <aaaScript> I think that makes sense. I think I just need to figure out how the backend works. From diving in it looks like I point it towards my backend. Then that backend should have the logic to display via STDOUT and the model.
<FromGitter> <Blacksmoke16> could also use this to handle emitting to multiple backends
<FromGitter> <Blacksmoke16> oh nvm, that's an internal type, should just be able to bind the same same source when configuring logging
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=615a2b773f09d85736f2886b]
<FromGitter> <aaaScript> Thanks yeah I was wondering about that and wasn't sure if the last one would overwrite.
<FromGitter> <jrei:matrix.org> I was looking at `Log` docs, and for a moment by going to the code, I was thinking of `Log` being a log line, but no it is the Logger object itself
taupiqueur has quit [Ping timeout: 252 seconds]
taupiqueur has joined #crystal-lang
ur5us has quit [Ping timeout: 252 seconds]
taupiqueur has quit [Ping timeout: 252 seconds]