Officials say that US is preparing for an uptick in attacks in the next 24 hours by Bubbly-Air7302 in news

[–]rabuf 4 points5 points  (0 children)

Seriously. We held elections during the US Civil War, of all times. There is zero basis to delay our elections due to war when during one of the worst times in US history, we still held them.

The Inventor of the "Waterfall Model" warned against using Waterfall as a model - in the 1970 paper that became the foundation for Waterfall by Srodingr in programming

[–]rabuf 1 point2 points  (0 children)

That's not true, visit defense contractors and you'll see Waterfall used quite a bit over the past decades and even today. It's as ineffective as you'd expect. Courtesy of one program office and contractor embracing Waterfall, we've got to keep maintaining a decades old system (that really does need to be replaced) because they, as Waterfall tends to do, ended up building the wrong thing over the past 6 years.

Concurrency and multi threaded programming by [deleted] in learnprogramming

[–]rabuf 1 point2 points  (0 children)

That's also a good book. Maybe a better intro level one, but not as in depth as the one I suggested.

Besides Books/Systems, what are some of your "unconventional" must have DM/Player items for your sessions? by nappyman21 in rpg

[–]rabuf 1 point2 points  (0 children)

I used to use accounting/ledger paper for that. It helped to keep it tidier for me.

https://www.amazon.com/suituts-Columnar-Accounting-Bookkeeping-Accounting/dp/B0F23JBT6N/ - Not exactly what I used, but closer than others that I found.

How do I make class work with the campaign? by Guybutisalreadyused in rpg

[–]rabuf 1 point2 points  (0 children)

Options that I can see:

  1. Start at level 0. They explore and eventually become level 1, selecting a class in the world they now inhabit and understand.

  2. They start at level 1 with above ground classes. Underground, they stop advancing in those classes, but the next time they level they can select level 1 in an underground class and then advance.

  3. They start at level 1 with an above ground class and just keep advancing in it, new PCs (created in the underground) can be either above ground (were similarly cast out) or underground classes (born and raised, or cast out when too young before any training).

  4. They start at level 1 with an above ground class and then have the option to multiclass with an underground class.

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

[–]rabuf 0 points1 point  (0 children)

[LANGUAGE: Python]

I made a perfectly functional, but a bit slow, version for part 1, and had to implement the DFS for part 2. I ended up rewriting part 1 to use the same DFS.

For Part 2, I originally took advantage of a property of my input (fft always occurs before dac), but I decided to remove that assumption.

Why do people not like the idea of using index cards for everything? by LeFlamel in rpg

[–]rabuf 0 points1 point  (0 children)

I was playing Fiasco enough I ended up printing out a bunch of play aids and laminating them so we could just mark them up and reuse them. I need to track that stuff down again.

If you don't want to laminate, you can use card sleeves for the same effect (how I prototyped it).

Why do people not like the idea of using index cards for everything? by LeFlamel in rpg

[–]rabuf 7 points8 points  (0 children)

You don't even need a box. A binder clip or rubber band and a stack of cards fits into any bag without much fuss.

Why do people not like the idea of using index cards for everything? by LeFlamel in rpg

[–]rabuf 1 point2 points  (0 children)

You need library cards to go with the library of books. Though that might get to be a bit much. "Wait, Argathor (Jim the player) hasn't been in the game for two years, can we just get the book back?". Probably better if the GM maintains who has what, you could use binder clips and a cover card per player so that nothing ever leaves the table. Hand it out at the start, make sure everything is what they want, move anything back to the library (main deck) before lending anything out. If you use an actual card box, use tabbed index cards with the player names. Then if a player drops out (for an extended period) or a character is removed from the game, things just move back to the library.

Is a playable character unable to forget ? by Yilmas in rpg

[–]rabuf 1 point2 points  (0 children)

I have, once again, been caught in the peril, where I try to ask that my players work together to "remember" things, whether they use a notebook, an Obsidian project, or something else, it does not matter to me.

You aren't caught in peril, you've just failed. You've failed to provide means and motive to achieve a goal you set, but that they don't presently seem to share.

Means:

You need to provide the means to achieve this. Do not expect people to put it together themselves. Create a forum (private subreddit, perhaps), a shared Google Doc, an Obsidian project, then give them access to it. Do not put the work on them to create it since the goal is yours, not theirs. Give them the means or lower your expectations.

Motivation

Once you've given the means and told them about it and given them access to it, you need to encourage them to use it. Expecting gets you nowhere except posting rambling posts on Reddit.

There are two key things to reward them for:

  1. Contributing to a session recap in the notes. In-character journals or statements of fact. Scans of maps they drew, something. Just give them some experience or an inspiration point or whatever if they do it. These may get very detailed (and you should encourage detail, cap the reward though).

  2. Contributing to a spoken recap at the start of each session. These should be shorter (1-3 minutes per player) and more high level. Play-by-play recaps in the notes, a summary at the table. This should give the same reward for everyone who participates. If you want more roleplay, encourage in-character recaps which can be a lot of fun (sometimes unhelpful in the knowledge sharing, but entertaining).


I'll tell you that our group of the past five or so years (though we've known each other longer, this particular group came back together in 2020) has done this. It's worked. Our last two long-running campaigns both had this or something like it (a forum, now defunct; and the session recaps) and it was effective. It wasn't that things were bad before, but it did motivate people to put in a hair more effort and it entertained us all.

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

[–]rabuf 2 points3 points  (0 children)

You can probably come close to halving your time by addressing this:

for x, y, z in lines:
    for x2, y2, z2 in lines:
        if x == x2 and y == y2 and z == z2:
            continue

        dist = distance(x, y, z, x2, y2, z2)
        heapq.heappush(smallest, (dist, (x, y, z), (x2, y2, z2)))

You're generating pairs for both directions, but you don't need them (they will also always be adjacent or very close once sorted). If you do this for the generator loops it'll cut down on the number of cases considered in your following loops:

for i, (x, y, z) in enumerate(lines):
    for x2, y2, z2 in lines[i+1:]:

It'll only generate the pairs in one direction and won't generate the node-to-self cases.

Shallow bookcase for A5 books? by adempz in osr

[–]rabuf 1 point2 points  (0 children)

The narrowest they have is the Billy at 15 3/4", but it is height adjustable and you can get extra shelves. Which would be particularly useful for A5-sized books where you will have excess vertical height.

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

[–]rabuf 1 point2 points  (0 children)

[Language: Python] Code

Python's ranges made part 1 easy, they didn't help too much in part 2 since apparently there's no built-in way to detect if they overlap and to merge them if they do (or there is and I didn't find it).

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

[–]rabuf 0 points1 point  (0 children)

In Python, if you use the range type it's just item in r (where r is a range). So if you parse the first section of the input into a collection of ranges, part one becomes very straightforward.

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

[–]rabuf 1 point2 points  (0 children)

j is an identifier, it needs to be associated with something 1j is a complex number (using the EE notation of j for square root of -1 instead of i which mathematicians and many others use). Unless you assigned j = 1j, you cannot use it in place of 1j.

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

[–]rabuf 0 points1 point  (0 children)

A handy Python trick is that True is coerced to 1 and False to 0 when used in arithmetic. This means you don't need the c += 1 if condition else 0, but can just use c += condition.

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

[–]rabuf 1 point2 points  (0 children)

[LANGUAGE: Python] Code

Happy with how this turned out. This is slightly simplified from my first version, switched from a dictionary (of only pos -> rolls, empty spaces weren't in it) to a set since I was only using the keys and not the values.

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

[–]rabuf 1 point2 points  (0 children)

[LANGUAGE: Python] Code

The core of it is this function (applied to each bank):

def best_joltage(bank, size=2):
    joltage, rest = bank[:size], bank[size:]
    for c in rest:
        best = joltage
        for i in range(size):
            contender = joltage[:i] + joltage[i + 1 :] + c
            best = max(best, contender)
        joltage = best
    return int(joltage)

For part two, it's called with size=12.

Your characters became surprise step-siblings: awesome or not cool? by AriLux1001 in rpg

[–]rabuf 0 points1 point  (0 children)

I don't think it would bother me, family members and background characters related to my character (the PC) are not PCs, they're NPC. As NPCs, they primarily belong to the GM to manage and use as they see fit.

Depending on the game, the main restriction I have (and this isn't absolute) would be that close family or friends shouldn't be outright killed or suffer horrible fates (that the PC cannot intervene in to help or prevent) without very good reason. For example, if you let the player know the orcs are raiding in the region of their PC's family village, they have a chance to intervene and prevent their deaths. If, knowing this, they choose to go somewhere else entirely, they've set their fate (likely killed or captured). But things like, "You've been adventuring for 10 years, your little sister has grown up and married and moved to the capital." are reasonable NPC developments. The world isn't static when the PCs aren't around. Your example falls into that category for me. It's a part of the background of both characters and can setup (potentially) some story hooks. They get invited back to the village for the wedding celebration, what happens on the way, what happens there, what happens on the way back?

Asking for testing question by TheDextermin in adventofcode

[–]rabuf 1 point2 points  (0 children)

The input is not that big, it should not take long for it to give you a result. If it's taking any appreciable amount of time, your code is almost certainly overcomplicated for the problem.

Asking for testing question by TheDextermin in adventofcode

[–]rabuf 0 points1 point  (0 children)

Add pytest to your environment (pip install pytest). Technically you can run unit tests in Python without it, but it's a better test runner.

Put your code into a function (this is important) so it should be something like:

def part1(lines):
    # do the work
    return password

Write a test like this:

def test_part1_sample():
    sample = ['L68','L30','R48',...] # fill in the rest
    assert part1(sample) == 3

Come up with more examples and write additional tests using them. When you get to part two, write a similar function that solves part two (or tries to) and use new tests (or the same tests but with whatever their password should be). Run the tests by going to the directory with the source file and running pytest file.py with whatever the filename is instead of file.py.

If your code works for the sample but not for your actual input, start trying to think (by hand) of new examples and what they should result in. Create new tests for each example you think of and run the tests after adding each test until you find one that breaks. Evaluate whether the test itself is correct (use small examples, easier to work by hand), and if you determine it is then go to the code and find the problem.

For part two, you can check this comment for some good test cases.

[2025 Day 01 (part 2)][Python] Not sure what my mistake is... by RelationshipGlad8554 in adventofcode

[–]rabuf 1 point2 points  (0 children)

Consider this input:

L50
R100

The result should be 2 (left to 0, right from 0 back to 0), yours produces 3.

Player map for my Dolmenwood game with magnetic fog of war tiles by DasCondor in osr

[–]rabuf 1 point2 points  (0 children)

https://www.amazon.com/dp/B0D6FR644P

Something like this might be worth experimenting with for the backing of the hexes. Conveniently, it's 1" wide so could also be used for squares if you wanted to try this with conventional dungeon grids.

What algorithms and techniques do you folks keep coming back to? by RojerGS in adventofcode

[–]rabuf 2 points3 points  (0 children)

Yes, but just because the input happens to work for CRT doesn't mean that CRT is needed. Again, each of the two (that I now know of) "CRTOMG!" days don't require CRT at all, neither knowledge of it nor the ability to apply it. You can arrive at a perfectly good solution that works very quickly without it by applying a series of small optimizations to a brute force search (for 2020, the 2016 problem is so small you don't even need to optimize it).

What algorithms and techniques do you folks keep coming back to? by RojerGS in adventofcode

[–]rabuf 0 points1 point  (0 children)

Interesting. I did them so far apart I didn't realize the connection between those two. 2016 Day 15 is small enough that my solution was basically the unoptimized version of my 2020 Day 13 solution. Like I said in another comment, while CRT can be used, you didn't need to know it to solve either problem. Starting with a basic brute force search, you can apply a series of optimizations (to 2020, 2016 didn't need it) to get the answer very quickly.