jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | 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
<FromGitter> <Blacksmoke16> added a new DI feature, service proxies ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ For the use cases where you want to delay the actual instantiation of a service to if/when its used [https://gitter.im/crystal-lang/crystal?at=600cba9ed8bdab4739560b38]
<FromGitter> <wyhaines> So, you could use an exception to do that, but....exceptions are expensive, and trying to structure your code so that you don't have to do that is probably the better answer. :)
<FromGitter> <wyhaines> Oh... Hahaha. I was answering something from a ways back because I was not scrolled to the bottom. Ignore me.
<FromGitter> <Blacksmoke16> 🙈
<FromGitter> <watzon> @mattrberry that's a good point, I don't think I built in release mode
<FromGitter> <watzon> Let me try again
<FromGitter> <watzon> Ok in release mode it's much better
<FromGitter> <watzon> Audio is still crap though
<FromGitter> <mattrberry> @watzon Is audio crap even when it's running at full speed?
<FromGitter> <mattrberry> If so, could you send a recording or something? That seems odd
f1refly has quit [Ping timeout: 264 seconds]
f1reflyylmao has joined #crystal-lang
<FromGitter> <watzon> Yeah I’ll try to get you something. The audio definitely comes through, but there’s this screechy background noise.
avane has quit [Quit: ZNC - https://znc.in]
avane has joined #crystal-lang
<FromGitter> <HertzDevil> what do `{% yield %}` and `{{ yield }}` do
<FromGitter> <HertzDevil> looks like they don't do what i think they should do
<FromGitter> <watzon> @HertzDevil those are macro yields. Idk if they have the same behavior, but at the very least `{{ yield }}` allows you place content within a macro body at a specific position. So ⏎ ⏎ ```# something here ⏎ puts "bar" ⏎ # something else here``` [https://gitter.im/crystal-lang/crystal?at=600d13a13855dd07fd74b911]
<FromGitter> <watzon> It's pretty different from traditional blocks
<FromGitter> <HertzDevil> https://carc.in/#/r/aawq hmm
<FromGitter> <HertzDevil> wrapping the block inside `{% begin %} doesn't help
<Andriamanitra> you can't use {{ }} outside the macro definition
<FromGitter> <HertzDevil> oh you can here
<FromGitter> <HertzDevil> it's the `{%` that breaks
<Andriamanitra> hm, really? D:
<Andriamanitra> ok, it seems i actually have no clue how macros work :p
<FromGitter> <HertzDevil> oh no
<FromGitter> <HertzDevil> @Andriamanitra that block is apparently somewhere between "inside" and "outside" the macro definition
<FromGitter> <HertzDevil> and also macro yields are undocumented 😂
<FromGitter> <mattrberry> Is there any way to detect where memory is being allocated in a crystal program? Ideally, I'd like to see where anything that *is* getting gc'd is coming from
<FromGitter> <mattrberry> Any kind of memory profiler?
<FromGitter> <mattrberry> Also @HertzDevil now that I have alpha blending working, I'm probably going to spend some time tomorrow working on audio improvements. For one thing, PSGs hopefully won't be way too loud anymore
<FromGitter> <mattrberry> Bought some time back by replacing some iterators..
_ht has joined #crystal-lang
_ht has quit [Read error: Connection reset by peer]
_ht has joined #crystal-lang
ua has quit [Ping timeout: 256 seconds]
ua has joined #crystal-lang
<FromGitter> <watzon> @mattrberry valgrind will work, but it's not a perfect solution
<FromGitter> <watzon> You can do `valgrind ./program --tool=massif` and then use massif visualizer to get a good visual overview of memory usage.
<FromGitter> <watzon> But unfortunately that only works on linux, so it doesn't help me much
_ht has quit [Remote host closed the connection]
<FromGitter> <watzon> Interesting. Any time I try to use a `-d` flag I get the error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=600dfa266244ee1450ad60b9]
<FromGitter> <watzon> Happens with `-dpreview_mt` as well as my own custom flag.
<FromGitter> <Blacksmoke16> `-D`
<FromGitter> <watzon> Ahhhh
<FromGitter> <watzon> Fuck
<FromGitter> <watzon> Lol
<FromGitter> <Blacksmoke16> probably shouldnt do that tho...
<FromGitter> <watzon> Now I'm curious what `-d` is
<FromGitter> <watzon> No?
<FromGitter> <Blacksmoke16> `--debug`
<FromGitter> <oprypin:matrix.org> aah it's beautiful ⏎ https://github.com/oprypin/install-crystal/runs/1758696003
<FromGitter> <asterite> nice