I actually can’t progress to day two till I get home 🤣 – I haven’t pushed the code for the mu compiler yet 🤦♂️ So no-one can check my work even if they were so kind 🤣
@bender@twtxt.net Amen and al ha 😂🤣
@bender@twtxt.net Haha 😂 It was such good beer 👌
@prologic@twtxt.net maybe they should dedicate one of their advent days to make sure their site is responsive. 😂
I see beer, and I upvote. I see “amazinf” beer, and I am thirsty already, and it’s not even 07:00! 😂
For those visiting Hanoi in the Old Quarters that are beer snobs like me; highly recommend this place called Local Craft Beer 🤩
Found this place in Hanoi in Vietnam 🥳 Amazinf beer!!! 🍺
completely untested as i have no remote way of running mu code from Vietnam 🤣
AoC Day #1 solution (mu): https://gist.mills.io/prologic/d3c22bcbc22949939b715a850fe63131
The most interesting part about mu is that the language is actually self-hosted and written in itself. There is a stage zero compound written and go on a stage one compiler written in mu
Thinking about doing Advent of Code in my own tiny language mu this year.
mu is:
- Dynamically typed
- Lexically scoped with closures
- Has a Go-like curly-brace syntax
- Built around lists, maps, and first-class functions
Key syntax:
- Functions use
fnand braces:
fn add(a, b) {
return a + b
}
- Variables use
:=for declaration and=for assignment:
x := 10
x = x + 1
- Control flow includes
if/elseandwhile:
if x > 5 {
println("big")
} else {
println("small")
}
while x < 10 {
x = x + 1
}
- Lists and maps:
nums := [1, 2, 3]
nums[1] = 42
ages := {"alice": 30, "bob": 25}
ages["bob"] = ages["bob"] + 1
Supported types:
int
bool
string
list
map
fn
nil
mu feels like a tiny little Go-ish, Python-ish language — curious to see how far I can get with it for Advent of Code this year. 🎄
Oh dear god 😱 The level of pollution on Hanoi is insane 🥺 I can’t stop coughing outside 🤯
@prologic@twtxt.net pretty neat looking boat. We don’t see boats like this around here. It looks to be made specifically to resemble an older boat.
@prologic@twtxt.net pretty cool! I like these, wish there was a way (I am sure there is, but not for tourists) to go to the top. :-)
@movq@www.uninformativ.de That’s also a quite clever approach. :-)
@prologic@twtxt.net Lol, these sails on that boat! :-D
Sharing some photos of our Vietnam trip so far…
Day 1 was surprisingly finnicky. A lot of people got it wrong, apparently. Me too. 🤣
@prologic@twtxt.net don’t seek the problems. If they exist, they will show at your doorstep. Hahahaha! Anyway, shame on me, I should be sleeping, so I ought to.
@bender@twtxt.net No, but if there’s a problem i want to know about it so i can address it 😆
The YAML forbidden knowledge of yarnd
@kingdomcome@yarn.girlonthemoon.xyz I want to see them too! 🙈
“The Internet Used To Be A Place”
@movq@www.uninformativ.de your reply got me almost ROFLMAO IRL. It drew a laudable laugh, for sure! 🤣
@prologic@twtxt.net geez, a simple “I don’t wanna” would suffice. 🤣
@bender@twtxt.net Ah, god damnit. 🤣
@movq@www.uninformativ.de yeah, you fetched it too quickly, it was edited seconds after picking the wrong image. LOL. Which brings us back in a whole, huge circle, to twtxt edits, and how to handle them. 😅
@movq@www.uninformativ.de Lots of things stop me 🤣 crappy wifi, no international roaming, no remote access (by design) just to name a few 😆
@prologic@twtxt.net Nothing stops you from programming while in Vietnam. 😏😈😅
@movq@www.uninformativ.de Oh damn ! I’m on holidays in Ciwtnam 🤣 I’ll be late to the party !
Advent of Code 2025 starts tomorrow. 🥳🎄
This year, I’m going to use Python 1 on SuSE Linux 6.4, writing the code on my trusty old Pentium 133 with its 64 MB of RAM. No idea if that old version of Python will be fast enough for later puzzles. We’ll see.
@bender@twtxt.net Hmm, something’s weird with that post:
https://movq.de/v/cf64f3a625/s.png
😅
@lyse@lyse.isobeef.org Damn. That was stupid of me. I should have posted examples using 2026-03-01 as cutoff date. 😂
In my actual test suite, everything uses 2027-01-01 and then I have this, hoping that that’s good enough. 🥴
def test_rollover():
d = jenny.HASHV2_CUTOFF_DATE
assert len(jenny.make_twt_hash(URL, d - timedelta(days=7), TEXT)) == 7
assert len(jenny.make_twt_hash(URL, d - timedelta(seconds=3), TEXT)) == 7
assert len(jenny.make_twt_hash(URL, d - timedelta(seconds=2), TEXT)) == 7
assert len(jenny.make_twt_hash(URL, d - timedelta(seconds=1), TEXT)) == 7
assert len(jenny.make_twt_hash(URL, d, TEXT)) == 12
assert len(jenny.make_twt_hash(URL, d + timedelta(seconds=1), TEXT)) == 12
assert len(jenny.make_twt_hash(URL, d + timedelta(seconds=2), TEXT)) == 12
assert len(jenny.make_twt_hash(URL, d + timedelta(seconds=3), TEXT)) == 12
assert len(jenny.make_twt_hash(URL, d + timedelta(days=7), TEXT)) == 12
(In other words, I don’t care as long as it’s before 2027-01-01. 😏😅)
@kingdomcome@yarn.girlonthemoon.xyz Oh, cool! Can we see the results? :-)
@shinyoukai@neko.laidback.moe What do you mean by that? 🧐 Clients don’t care about the order of twts in a feed. For display clients usually sort by timestamp.
Posting in anachronistic order, hah!
Got back into drawing! :)
I also made a couple (digital) collages today. Huge achievements
@bender@twtxt.net Yeah. something i’m trying to avoid in this 2nd attempt 🤞
@movq@www.uninformativ.de I see problems with that, yes. Case in point:
@prologic@twtxt.net yeah, it is only Manton (with which I don’t see eye to eye) for now. I am simply anticipating the issue, rather than experiencing it fully right now. If efforts continue on this direction, you see what I am writing about, right?
@kiwu@twtxt.net I see. I have no experience on the matter, sadly. :-( I am sure you can find plenty of recommendations online. Beware of anything below $100 (you will find plenty of cheap, but they are, indeed, cheap in the whole sense of the word). I’d say, a decent one will start around $250-$300, and up.