søren peter mørch

Timeline

Recent posts from feeds followed by sorenpeter@darch.dk

lyse (lyse.isobeef.org)

@movq @itsericwoodward Hahaha, a festival, indeed! :-D There was also "Raupenkrieg" (caterpillar war): jumping against each other in sleeping bags. I reckon that counts as pogo or mosh pit.

And back in the days, we had wonderful deep mud all around us, too! In extreme years we even needed to leave the camp ground for a day and walk to a gym with all the kids. There was just too much rain and the creek dangerously high.

We once had an actual creek running through the dining tent before the kids arrived. Luckily, it didn't originate from the official creek, but the water came down the hillside. Unimaginable today with all these droughts in summer. Many creeks around here are dried up for several weeks, if not months now.

There you go, enjoy my favorite selection of yummy chocolate on the ground!

It was a question of the mindset. Once we supervisors just made the best out of it and tried to had fun, the kids typically didn't mind the mess either. Besides building huts, one of the most favorite things ever was actually "Matschschöpfen" (scooping mud). The kids scooped puddles into wheel barrows using giant soup ladles from the kitchen. "Sorry kids, time is up for today. Whoever sits in the closing circle first gets to go first tomorrow." Unfortunatly, I don't find any photos from that.

In reply to: #wgxlpw5xsffg 3 months ago
itsericwoodward (itsericwoodward.com)

In #Magic last night, I debuted my new #Dune deck with an underwhelming performance - perhaps unsurprisingly for a desert-focused deck, I faced a real drought, starting the game with only 1 land in hand (even after a mulligan) and not pulling another land until turn 4(!). Because of our house starting mana, I wasn't totally sunk, but everything I got out was just luck. I did die last thanks to my big wurms (so I guess I was 2nd place?), but still... underwhelming.

For game 2, I wanted to bring the thunder (especially after my pitiful performance last week), so I dusted off my Night of 1000 Squirrels deck (headed by the infamous Chatterfang, Squirrel General). By turn 3, the #squirrel army was forming, and thanks to well-timed casts of Fog and Make a Stand, the squirrels managed to overrun everyone just a few turns later.

Another fun night overall. I won't be able to play for the next few weeks, so I'm glad this one ended with a win. 😁 #mtg

Read replies 3 months ago
prologic (twtxt.net)

And just like that Problem 10 is done and correct whoohoo 🥳 It was easy because in Problem 7 I'd already written an iterator to produce infinite primes. So the solution for finding the sum of primes under 2,000,000 is basically (shortened):

  primes := iter.take_while(iter.filter(prime_candidates(), is_prime), fn(p) { p < n })
  print(iter.sum(primes))

And of course the answer is: 142913828922 which took ~21.ss for the Go Vm to compuete.

In reply to: #tz4dru7nwzct 3 months ago
prologic (twtxt.net)

Oh man wow 😮 Problem 9 was quite hard 😱 I had to build two new functions in the Mu stdlib for computing combinations and permutations, but then the combinations of range(1000) for triples such as a + b == c is enormous! So i had to write iterator versions of these to do lazy evaluation. Anyway solution follows:

#!/usr/bin/env mu

// Special Pythagorean Triplet

import "iter"

fn usage() {
  print("Usage:", args()[0], "<n>")
}

fn sqr(x) { x * x }

fn main() {
  if len(args()) < 2 {
    usage()
    exit(1)
  }

  n := must(int(args()[1]))
  print("n:", n)

  // For a < b < c and a + b + c == n, both a and b are strictly less
  // than n/2. Generate only (a,b) combinations and derive c directly. This
  // keeps the search lazy and reduces n=1000 from C(999,3) = 165,668,499
  // candidate triples to C(499,2) = 124,251 candidate pairs.
  pairs := iter.combinations(iter.range(1, n / 2), 2)

  triples := iter.map(pairs, fn(xs) {
    a := xs[0]
    b := xs[1]
    return [a, b, n - a - b]
  })

  // Enforce b < c; a < b is already guaranteed by combinations over an
  // increasing range, and a + b + c == n holds by construction.
  triples = iter.filter(triples, fn(xs) {
    return xs[1] < xs[2]
  })

  // Euler 9 has one answer for n=1000. find() stops the entire upstream
  // iterator chain as soon as the first Pythagorean triple is found.
  answer := iter.find(triples, fn(xs) {
    return sqr(xs[0]) + sqr(xs[1]) == sqr(xs[2])
  })

  print(answer)

  if answer != nil {
    print(answer[0] * answer[1] * answer[2])
  }
}

main()
In reply to: #tz4dru7nwzct 3 months ago
itsericwoodward (itsericwoodward.com)

Went 0-for-3 tonight, first time in a while. I was doing well both of the first two games, but the 3rd game... Well, the less said the better.

For next week, I guess it's time for the return of Chatterfang and another Night of 1000 Squirrels.

Just remember, they brought it on themselves...

Read replies 3 months ago
movq (www.uninformativ.de)

I am sooooooooooooooooooooooooooooooooooooooooooooooooOOOOOOOOOOOOOOoooooooooooooooo tired of “fast-moving” software. ruff changed a ton of stuff and now all my code bases “need fixing”. Blah.

And SemVer is worth nothing if your 4 year old program with over 16'000 commits is still at “version 0.x”. Blah!

Everything is horrible.

Read replies 4 months ago
movq (www.uninformativ.de)

@GabesArcade The no-JS part is one thing, but you also have to disable the (nowadays common) forced-HTTP-to-HTTPS-redirect, because those old browsers can’t do modern crypto. And make sure that your webserver serves the correct page even if no Host header is sent by the client. And don’t even think about serving UTF-8 or even just putting utf-8 in the content type. 😅 And for the JPEG thumbnails I pass a special flag to ImageMagick so that IBM Web Explorer from OS/2 won’t trip. 🤣 And always use link rel="stylesheet" for CSS, because some browsers render inlined CSS as literal text. And … probably more that I forgot by now. 😂

@david Not sure, actually. Let’s see. Those are the ones where I still have the original disks (or have bought them on eBay again):

  • SuSE Linux 6.4 (it’s a massive 7 CD distro with a huge manual, best thing ever)
  • OS/2 2.1
  • OS/2 Warp 3 (red and blue spine because $reasons)
  • OS/2 Warp 4
  • PC DOS 7
  • MS-DOS 6.22
  • Windows 3.1
  • Windows for Workgroups 3.11
  • Windows 95 C
  • Windows 98
  • Windows NT 4 Workstation (still in the mail, though 😅)
  • Windows 2000
  • Windows XP Professional (last Windows I ever used on my private PCs)

(Plus a few “classic” office products as can be seen here: https://movq.de/blog/postings/2024-05-23/0/POSTING-en.html )

In reply to: #6icxocaexwil 4 months ago
lyse (lyse.isobeef.org)

@arne Ist die Zahl 2000 ein Verweis auf das Erscheinungsjahr oder einfach nur eine fortlaufende Nummerierung der Zeitungsausgabe und bei Erreichen der zweitausendsten Ausgabe dann als Bonus beigelegen? Frohes Schmökern!

In reply to: #4qg5vigo4p7a 5 months ago
lyse (lyse.isobeef.org)

@bender @movq Ta! I don't know about regional differences. But at the moment, they first start slowly appearing at around 21:45 to 22:00. And then it gets more and more. You've got about an hour until it's over.

People often say that they are in and over the meadows close to the edges of the forest. But at least over here, there are literally magnitudes more in the forest. So far, I've maybe seen thirty, fourty (30-40) fireflies outside at the meadows, but one or two thousand (1000-2000) inside. Exactly like last year.

They like a little bit openish spots in the forest. Not like a clearing, but if you can see ~10 meters from the path into the woodland, chances are that fireflies will pop up. But if it's really thick brush, the odds are very slim. The hotspots also slowly wander around over time. So, I just keep on walking after a few minutes of stopping to enjoy the show.

In reply to: #7jia5xq 5 months ago
lyse (lyse.isobeef.org)

@bender I wish I could do that. Unfortunately, my camera is not good enough. Not even close. It's just all black. :'-( #000. Or maybe #060508 if you're really lucky.

But I will take my tripod tonight and see what I can do.

In reply to: #g2i352q 5 months ago
Reply via email