digitalmars.D.announce - Joka/Parin update - Optional GC support
- Kapendev (23/26) Jun 20 [Parin](https://github.com/Kapendev/parin) is a game
- Doigt (2/7) Jun 28 I wonder who said that huh
- xoxo (10/18) Jun 28 Anyone working in the low latency/interactive field, including
- Doigt (10/24) Jun 28 Yeah no that's not happening. Maybe YOU are going to tell me
- JN (3/12) Jun 29 Well if you want to target the web you don't have access to D's
- Kapendev (5/10) Jun 29 Would not say bad. Depends also on how much control you have over
- Kapendev (3/11) Jun 29 It was... you.
[Parin](https://github.com/Kapendev/parin) is a game engine/framework I'm working on and [Joka](https://github.com/Kapendev/joka) is a utility library used by Parin. Both don't use the GC by default. I recently added a new version flag: `JokaGcMemory`. When defined, it changes the allocation strategy from manual memory management to using the GC. It basically disables the "free" functions and uses `new` for everything. So if you prefer GC-based code, it's now an option. Nothing changes unless you opt in. The idea for this came while reading some comments on a Discord server:yeah, people use D, but then go 'GC' is evil hurr durr nogc this nogc that like whyI personally don't hate GC. Manual stuff is just more fun for me and it makes it easier to run games on a web browser. GC + Kapendev = ❤️ (This line makes the post more professional) Anyway, the trickier part of adding this was working around the ` nogc` attribute. It wasn't too bad, but now ` nogc` effectively acts like a made up ` noallocation` attribute for my code, which is kind of nice. It would be easier to just ignore it, but I think it can be useful sometimes, so I do support it when I can. That's it. Nothing crazy, but it's a cool thing. Btw, check out my new game: https://kapendev.itch.io/worms-within 
Jun 20
On Friday, 20 June 2025 at 19:23:57 UTC, Kapendev wrote:The idea for this came while reading some comments on a Discord server:I wonder who said that huhyeah, people use D, but then go 'GC' is evil hurr durr nogc this nogc that like why
Jun 28
On Saturday, 28 June 2025 at 07:21:36 UTC, Doigt wrote:On Friday, 20 June 2025 at 19:23:57 UTC, Kapendev wrote:Anyone working in the low latency/interactive field, including game developers, will tell you the same things: GCs are bad, you need to prepare ahead of time, and you should reuse your buffers and objects. Although there are many counter-examples that fully utilize the GC, it's generally minimized because the majority of the work is done in C, C++, or Rust. The general rule, which applies to both malloc and GC, is to avoid allocating unless absolutely required.The idea for this came while reading some comments on a Discord server:I wonder who said that huhyeah, people use D, but then go 'GC' is evil hurr durr nogc this nogc that like why
Jun 28
On Saturday, 28 June 2025 at 09:16:22 UTC, xoxo wrote:On Saturday, 28 June 2025 at 07:21:36 UTC, Doigt wrote:Yeah no that's not happening. Maybe YOU are going to tell me that, but no, not just anyone. GC == Bad people are just extremists. Tell that to all the people making commercial games live near montreal where lots of video games companies operate and I know people who work for those companies... and they use I tell them about this silly little bacon dance the nogc folk are doing everyday in D land? I'll let you guess...On Friday, 20 June 2025 at 19:23:57 UTC, Kapendev wrote:Anyone working in the low latency/interactive field, including game developers, will tell you the same things: GCs are bad, you need to prepare ahead of time, and you should reuse your buffers and objects.The idea for this came while reading some comments on a Discord server:I wonder who said that huhyeah, people use D, but then go 'GC' is evil hurr durr nogc this nogc that like why
Jun 28
On Saturday, 28 June 2025 at 12:32:38 UTC, Doigt wrote:Well if you want to target the web you don't have access to D's GC anyway.On Friday, 20 June 2025 at 19:23:57 UTC, Kapendev wrote:The idea for this came while reading some comments on a Discord server:I wonder who said that huhyeah, people use D, but then go 'GC' is evil hurr durr nogc this nogc that like why
Jun 29
On Saturday, 28 June 2025 at 09:16:22 UTC, xoxo wrote:game developers, will tell you the same things: GCs are bad, you need to prepare ahead of time, and you should reuse your buffers and objects.Would not say bad. Depends also on how much control you have over the GC. I think the D GC lets you disable and enable stuff at runtime?The general rule, which applies to both malloc and GC, is to avoid allocating unless absolutely required.Yep.
Jun 29
On Saturday, 28 June 2025 at 07:21:36 UTC, Doigt wrote:On Friday, 20 June 2025 at 19:23:57 UTC, Kapendev wrote:It was... you. #exposed #drama #bignewsThe idea for this came while reading some comments on a Discord server:I wonder who said that huhyeah, people use D, but then go 'GC' is evil hurr durr nogc this nogc that like why
Jun 29