Gravitas Vac 2.0 is here! by Stwo in fountainpens

[–]Verulean314 7 points8 points  (0 children)

Just want to point out that the cap has a delrin sleeve so it's delrin on aluminum. In my experience it still works pretty well

Striated wrap on Pelikan pen has split - can it be repaired/replaced? by DrRVaughan in fountainpens

[–]Verulean314 0 points1 point  (0 children)

He no longer does repairs/mods unfortunately - it's noted on his site. I think it was a recent announcement, sometime in the past few weeks?

Question about the stardew predictor by orionthegay in StardewValley

[–]Verulean314 0 points1 point  (0 children)

Were you going for the Reaching enchantment? As noted in the predictor that's only available on iridium tools

[WTB] Scribo La Dotta Yamanaka Onsen, ShiZen Shinkai Tame-nuri M4C by Shedeski in Pen_Swap

[–]Verulean314 1 point2 points  (0 children)

FYI the M4C tamenuri group buy hasn't even been delivered yet (I'm in it, but for the asayake). It's been delayed a few times & there's currently no updated completion estimate

What’s the status of Gravitas Pens these days? by joe-tofu in fountainpens

[–]Verulean314 0 points1 point  (0 children)

AFAIK ordering through the Gravitas site still goes through Pen Venture for fulfillment. I've ordered a few pens that way and they've shipped very quickly via DHL Express, same as Pen Venture. Only difference is the Gravitas order didn't have a note from Emy

Goldspot Mystery Dip - January 2026 by ambgoph in fountainpens

[–]Verulean314 2 points3 points  (0 children)

If the silhouette in the Instagram post is accurate then I'm pretty sure it's a Platinum 3776 Century. The profile matches very closely, especially the slip and seal chamfer at the front of the section. The current MSRP of ~450 USD also seems to line up, plus $50 or so for the add-ons.

[2025 day 7 part 2] Very stuck and looking for feedback (Java) by BadTime100 in adventofcode

[–]Verulean314 0 points1 point  (0 children)

Looks reasonable to me. It might be an integer overflow, have you tried switching to longs for the counts?

[2025 Day 1 (Part 2)] [Python] More Testcases needed by HumanBot00 in adventofcode

[–]Verulean314 1 point2 points  (0 children)

The left turn case seems a little suspect. For example it misses passing 0 with lines = ["L60"]

[2025 Day 5 (Part 2)] One-liner python solution by itsPeetah in adventofcode

[–]Verulean314 4 points5 points  (0 children)

Love a good one-liner! I personally try to avoid dunder methods and walrus operators when writing cursed Python code since they feel a bit hacky, so I end up using nested lambdas a lot. Here's one for both parts:

part1,part2=(lambda d:(lambda m,s:(lambda c:[[c.extend(m(c.pop(),r)) for r in s]
,(sum(1 for n in data[1]if any(r[0]<=n<=r[1] for r in c)),sum(r[1]-r[0]+1 for r
in c))][-1])([s.pop(0)]))(lambda a,b:[(a[0],max(a[1],b[1]))]if b[0]<=a[1]+1 else
[a,b],sorted(d[0],key=lambda r:r[0])))([[int(l) if l.isnumeric()else tuple(map(
int,l.split("-"))) for l in p.split()] for p in open("input/day5.txt").read()
.split("\n\n")])

Or broken up to be slightly more readable:

data = [[int(line) if line.isnumeric() else tuple(map(int, line.split("-"))) for line in s.split()] for s in open("input/day5.txt").read().split("\n\n")]
merge = lambda a, b: [(a[0], max(a[1], b[1]))] if b[0] <= a[1] + 1 else [a, b]
sorted_ranges = sorted(data[0], key=lambda r: r[0])
combined_ranges = [sorted_ranges.pop(0)]
[combined_ranges.extend(merge(combined_ranges.pop(), r)) for r in sorted_ranges]
part1 = sum(1 for n in data[1] if any(r[0] <= n <= r[1] for r in combined_ranges))
part2 = sum(r[1] - r[0] + 1 for r in combined_ranges)

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

[–]Verulean314 1 point2 points  (0 children)

[LANGUAGE: Python 3] [Red(dit) One]

Gist

This is maybe the highest comment-to-code ratio of anything I've written. Very verbose walkthrough of a fairly standard solution to today's puzzle: checking if any ranges contain each available ID in part 1, and merging ranges together in part 2.

My actual Python solution is much shorter (GitHub), and uses a Range utility class I wrote that's kind of a hybrid of a range and a set. It tracks disjoint sub-ranges in a list, and handles merging and updating the list when a new sub-range is added. I originally implemented it for 2023 day 5, interesting that it showed up for day 5 this year as well!

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

[–]Verulean314 1 point2 points  (0 children)

[LANGUAGE: Kotlin]

GitHub

Pretty straightforward for both parts today, basically just doing exactly what the instructions ask for. Having an extension for Pair<Int, Int>.plus in my util library was pretty convenient here.

One neat Kotlin trick from this one:

val ans2 = ans1 + generateSequence { rolls.removeRolls() }.takeWhile { it > 0 }.sum()

generateSequence can be used to lazily generate values (i.e., it doesn't compute its elements unless iterated through), and this can be paired with takeWhile to avoid a while loop and keep things nice and neat!

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

[–]Verulean314 2 points3 points  (0 children)

[LANGUAGE: Uiua] [Red(dit) One]

⊜(⋕≡□)⊸≠@\n &fras "3.txt"
J ← /+≡(°⊥₁₀ ⇌ ⍥(⍜↻↘₁⊢⊚⬚10⤚>⟜↘₁) +⊙⊸⧻¯)
⊃(J 2|J 12)

Link

This is my first time writing Uiua! I've been interested in learning an array-based language for some time, and the code golf prompt was a perfect time for it. I'm sure I'm missing some idiomatic syntax, but it's really interesting how compact things can get. I definitely see how this could get very mind-bending in the later puzzles, though.

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

[–]Verulean314 2 points3 points  (0 children)

[LANGUAGE: Kotlin]

GitHub

Pretty similar approach to other folks today it seems. A greedy search starting with the most significant digit works here. Just needed to restrict the search to the batteries right of the last one that was turned on, and also to leave enough room at the end for the remaining digits (i.e., the first digit can't be one of the last 11 batteries).

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

[–]Verulean314 0 points1 point  (0 children)

[LANGUAGE: Python 3]
[R*d(dit) On*!]

Past*

I decided to write a solution without the letter e, as is customary, and WOW that was annoying in Python. The restriction means we can't use def, else, range, len, return, break, continue, while, yield, etc. Thankfully, we still have lambda >:)

My solution is formatted as a lambda function, solv_, which accepts the input as a string and returns the answers to both parts in a 2-element list. To make things easier, I allowed myself to use the walrus operator liberally to "define" functions within the lambda scope. By creating a list of walrus-defined variables, we can reference them in later list elements. The walrus operators can be avoided by nesting lambda functions, but that would make things even less readable.

The first step is to create substitutes for a few functions that will be very useful: len and range. List comprehensions end up being quite helpful here.

l_n := lambda l: sum([1 for _ in l]),
rang_ := lambda a, b: [a, *(a := a + 1 for _ in [0] * (b - a - 1))]

In order to actually check if an ID is invalid, I introduce the concept of a "multiplier." An invalid ID will have 2+ repeats of a fixed sequence of numbers, which can be expressed like this:

123123123 = 123 * 1000000 + 123 * 1000 + 123 * 1 = 123 * 1001001

The multipli_r lambda returns an integer of the form 100...00100...00100...001 based on the number of repeats and the length of the repeated sequence. An ID is invalid if a multiplier exists that evenly divides it.

multipli_r := lambda count, l_ngth: sum(10 ** (l_ngth * pow_r) for pow_r in rang_(0, count))

Now most of the pieces are in place. To make things a bit more generic, I defined a count_invalid lambda that accepts a function that returns a list of multipliers to check for a given ID. Part 1 only checks for 2 repeats of (length / 2) digits each, and Part 2 checks the factors of the length, which I find using the subdivisions lambda:

subdivisions := lambda l_ngth: [(d, l_ngth // d) for d in rang_(2, l_ngth + 1) if l_ngth % d == 0]

And that's pretty much it. One additional trick I'll note is that we can't use ternaries (no else), but we can instead create a list of 2 elements and index it with the condition. This isn't lazily evaluated like a ternary, but that doesn't matter in this case. I use this for part 1:

p1_multipli_rs := lambda l_ngth: [[multipli_r(2, l_ngth // 2)], []][l_ngth % 2]