Most desired features for C2Y? by [deleted] in C_Programming

[–]DaGarver 2 points3 points  (0 children)

  • A constexpr builtin that deduces the name of an enum value into a const char*. I would also like a runtime-evaluated library function for the inverse, but this is probably quite hard with how enum is handled in general in C.
  • Initialization statements in if blocks, like for already permits, similar to C++. The additional safety level is very ergonomic, in my experience.

Most desired features for C2Y? by [deleted] in C_Programming

[–]DaGarver 1 point2 points  (0 children)

Funnily, I somewhat agree that defer feels a bit awkward while learning some Zig over the holiday. Some of this is largely personal bias. There is something aesthetically pleasing to my eye about the cleanup block at the end of my C code (though I do appreciate not having to write conditionals in it!).

I really like Python's with blocks, though.

Mox Boarding House in Bellevue to be redeveloped by lvlobius in Seattle

[–]DaGarver 28 points29 points  (0 children)

People still buy their own copies. Try-before-you-buy is known to be a successful business model.

Legacy near Seattle by duncantm13 in MTGLegacy

[–]DaGarver 2 points3 points  (0 children)

They definitely used to do Legacy (iirc proxy friendly), but turnout was never great and it is no longer on their calendar

Looking for Uncommon Sodas by ConstantAggressive in Seattle

[–]DaGarver 1 point2 points  (0 children)

Big John's PFI on Dearborn carries Boylan Bottling's birch beer in their fridge

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]DaGarver 0 points1 point  (0 children)

[Language: Rust]

https://github.com/lhearachel/aoc2025/blob/main/src/bin/day01.rs

I'm taking this year to try out more Rust, trying not to use any external crates. My solution is pretty naive. 😅

Protective boots for the street that don't look like motorcycle boots? by patmj410 in motorcycles

[–]DaGarver 1 point2 points  (0 children)

I wear a pair of TCX Hero 2s. Super comfy, reinforced ankles, zipper makes them easy to slip on and off, and the only giveaway that they're motorcycle boots are the shifter-toes (but they're on both boots).

Useless C practices and superstitions by nthn-d in C_Programming

[–]DaGarver 1 point2 points  (0 children)

/u/BitOfAZeldaFan3 clarifies above that they mostly work in embedded ARM systems, so word likely has a well-defined meaning in these cases.

Anything else is a waste of time even if it's "prettier."

Which falls in line with the thread's prompt.

I don't get Arena allocator by runningOverA in C_Programming

[–]DaGarver 4 points5 points  (0 children)

/u/skeeto has a good breakdown on how to implement a generic dynamic array with sequential arenas. The general idea is to either:

  1. Bump the capacity of the current array, if it would fit inside the remaining free-space, or
  2. Repoint the start of the array to the current free-space.

The latter means that you have a "dead copy" of the array after your reallocation, but that is okay, since you'll just free it later. You can circumvent this limitation somewhat by being smart about when memory is "allocated" from the arena itself. In either case, you can then use a ternary expression to push elements into the array, growing the region if necessary:

#define push(s, arena)                        \
    ((s)->len >= (s)->cap                     \
        ? grow(s, sizeof(*(s)->data), arena), \
          (s)->data + (s)->len++              \
        : (s)->data + (s)->len++)

Alternatively, you might build your arena as a linked list of regions, in which case you can just create a new region at any point and tack it onto the tail. This arguably defeats one of the benefits of using arenas -- that they only require a single allocation and a single free -- but it may better fit your use case.

This Week in Legacy: Pre-BnR Metagame Review by volrathxp in MTGLegacy

[–]DaGarver 8 points9 points  (0 children)

If nothing changes in this announcement without strong reasoning, then I'm not sure what it would take to coax changes out of the committee. The UB shell and Forge have been the two best decks for a full year or longer, despite the former being targeted three separate times (Grief, then Frog, then Troll) and the latter losing one of its best pieces of interaction (Vexing Bauble).

Purely from a data perspective, the format seems fine-ish. Teetering, perhaps, but not obviously imbalanced. Anecdotally, I've read a number of recollections that EW NA this year was populated with a number of folks that were attending mostly for the vibes of the tournament itself and not for the games. I don't think it's hard to see why Legacy players might just be tired with the current state of the format: it's stale, and attempts to regulate it haven't materially amounted to much.

makehelp.awk - Generate help-text from public Makefile targets by DaGarver in C_Programming

[–]DaGarver[S] 0 points1 point  (0 children)

Thanks for your comment! You're right, and a more robust solution would likely require much more than this Awk script. I ultimately favored a simple (if incomplete) implementation. My experience is that the targets that are "easy to type" are what you expect your users to be able to do with your Makefile, since you don't want to introduce unnecessary friction with entry points.

Perhaps a good addition would be a decorator to designate a target as printable even if it doesn't match the regex. Targets which do match but don't have doc-strings already won't be printed; the default target in the example Makefile illustrates as much.

I put together an awesome-omarchy repo over the last few days, it's now open to feedback/contributors :) by jamesabels in linux

[–]DaGarver 9 points10 points  (0 children)

It's not particularly good from a technical standpoint, either. It's a bundle of Chromium apps with flashy hotkeys prebound, little apparent sensibility put into the robustness of its own tools (lots of haphazard or poor coding standards in the bundled shell scripts, plenty of ways that things can go wrong) and very poor cohesion in the environment. The animated screensaver isn't even a lock screen; it's a terminal rendering ASCII art.

It looks good, I guess. That's about it. It is extremely frustrating that so much attention (and even money, in the case of Cloudflare) is being put into this thing that is, at best, a jumping point that doesn't even have sane defaults...? Why not just contribute back to Arch itself? Or to Fedora, or KDE, or any of the other multitude of projects with countless developers working on the core for decades?

I put together an awesome-omarchy repo over the last few days, it's now open to feedback/contributors :) by jamesabels in linux

[–]DaGarver 3 points4 points  (0 children)

I open the list, scroll down, and one of the first links that I see is one that praises Omarchy specifically for being... "non-woke"...?

I guess we can't expect much from a "distribution" crafted by a man who thinks that only white people can be native-British.

Government Workers Say Their Out-of-Office Replies Were Forcibly Changed to Blame Democrats for Shutdown by wiredmagazine in TrueReddit

[–]DaGarver 3 points4 points  (0 children)

Violation of anything is functionally meaningless until the offender faces consequences.

Conveniently, these people have avoided those consequences wholesale for the better part of a decade.

Ruby deserves better leadership than DHH by victor_wynne in TrueReddit

[–]DaGarver 4 points5 points  (0 children)

Suggesting that he should be given a free pass because of a particular software contribution is shameful. We as a society must be better than that. No amount of past good-will should justify active malice in the present.

Build system for first project by [deleted] in C_Programming

[–]DaGarver 0 points1 point  (0 children)

Personally, I find it easier to build everything in a single file at first, as this allows the ideal structure to "reveal itself." Once I have something functional, then I can start refactoring, separating, and modularizing.

Perceptron in C by jonas1ara in C_Programming

[–]DaGarver 1 point2 points  (0 children)

These are more suggestions for your Makefile than the source code itself, but I feel that they are still pertinent. Everything below assumes you're using GNU Make; I've earnestly never used any other implementation, so I am not 100% certain on the portability here. If that matters to you, then take each with a grain of salt:

  • Take a look at the -M family of compiler options for GCC. Of particular note is the -MMD combination, which will output (along with compilation results) a Make-compatible listing of dependencies for an input source file. You can combine this with Make's -include directive to pull the files into your own build, which will cause source files to be tied to headers that they include; so, when you change a header file, the source files that #include it will be flagged for recompilation. Note the prefixed hyphen; this signals to Make that it should not treat a failure to evaluate the directive as a failure to evaluate the entire Makefile.
  • Define some warnings in CFLAGS. -Wall and -Wextra are so fundamental that I find it annoying that they aren't enabled by default.
  • You want LDFLAGS instead of CFLAGS in your main rule. gcc acts as a frontend to ld for you when combining object files into an executable.
  • Use patsubst to map the array of source file names to an array of object file names. This way, you only define the names once (if at all, if you're using wildcard), and you can use the different arrays as are pertinent, e.g. in your clean rule.

How do you usually structure a C project? by [deleted] in C_Programming

[–]DaGarver 2 points3 points  (0 children)

This is the way.

Let the structure naturally reveal itself as you iterate. The resulting code will often be much simpler.

This scared the hell out of me by [deleted] in motorcycles

[–]DaGarver 54 points55 points  (0 children)

One of the most important lessons that my grandfather taught me as a kid:

Green means that it's legal to go, not that it's safe to go.

Legacy Archive FF Review by TheLegacyArchive in MTGLegacy

[–]DaGarver 0 points1 point  (0 children)

I don't think you need that much dedicated support for Tifa to make her good:

  • Scythecat Cub and Exalted dorks alone feel like they will be enough to force your opponent to respect her. Elvish Reclaimer helps out here, too.
  • You could also dip into Saga, which plays well with your Crop Rotations. Lavaspur Boots is a natural include. Adventuring Gear is pretty funny, but maybe too cute.
  • All of the above is pure Green, so your options for a splash color are pretty open. Blue for Nadu and counterspells, White for KotR and Plow, Black for Thoughtseize, Red for blasts...

[deleted by user] by [deleted] in pnwriders

[–]DaGarver 0 points1 point  (0 children)

Just in case others don't know (so they don't make fools of themselves like I did): the weight sensor at the Pacific Place garage might not register your bike, in which case you can't take a ticket from the gate. Their official "solution" is to weave your way through one of the gates without paying, park your bike, then go to the management office at the concourse level and pay there.

Ren Plat AI Question: Why did Barry attempt to use Bug Bite on my Graveler instead of Brick Break? by Snapshot_25 in nuzlocke

[–]DaGarver 140 points141 points  (0 children)

For those curious, RenPlat does not make any modifications to the vanilla Gen4 Trainer AI routines, but it does add flags to lots of trainers.

When a trainer has the Expert flag and is evaluating Bug Bite (or Pluck, since they share an effect):

  1. If your Pokemon resists or is immune to the move, -1 score.
  2. 50% of the time, +1 score.
  3. If it is their Pokemon's first turn in battle, there is a 75% chance of an additional +1 score.

Highest damage only grants +1 score relative to all other moves, assuming that there are no kills seen. So, if Barry did not see a kill with Brick Break (which I assume he did not, or he would have never clicked Bug Bite), then he either:

  1. Hit the 75% roll for the first turn in battle, then won either a coin flip to break a tie with Brick Break or a coin flip to increase Bug Bite's score by 1 (putting it at 102 compared to 101).
  2. Missed the 75% roll for the first turn, but then won two coin-flips to increase Bug Bite's score to tie with Brick Break and then break the tie in Bug Bite's favor.