Searching txt.sour.is

Twts matching #2
Sort by: Newest, Oldest, Most Relevant
In-reply-to » It is such a nice feeling that Mu is such a capable little language 😅 And I decided to write code code in Mu by hand 🤚 haha 🤣 and start solving Project Euler problems, like Problem 8 which works out to be a nice elegant solution in Mu:

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.

⤋ Read More
In-reply-to » It is such a nice feeling that Mu is such a capable little language 😅 And I decided to write code code in Mu by hand 🤚 haha 🤣 and start solving Project Euler problems, like Problem 8 which works out to be a nice elegant solution in Mu:

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()

⤋ Read More

It is such a nice feeling that Mu is such a capable little language 😅 And I decided to write code code in Mu by hand 🤚 haha 🤣 and start solving Project Euler problems, like Problem 8 which works out to be a nice elegant solution in Mu:

#!/usr/bin/env mu

// Largest Product in a Series

import "fp"
import "sys"

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

fn products(xs) {
  return fp.reduce(xs, 1, fn(x, y) {
    if y == nil {
      return x
    }
    return x * y
  })
}

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

  s := must(sys.read_all(0))
  if len(s) == 0 {
    usage()
    exit(1)
  }

  n := must(int(args()[1]))
  r := fp.max(fp.map(fp.sliding(fp.map(s, int), n), products))
  print(r)
}

main()

⤋ Read More
In-reply-to » I finally built a prototype of a marking gauge with a cutter wheel out of some scraps.

@david@daiwei.me Thanks, mate! I just finished my two full version marking gauges. And I’m rather pleased with them, I think they turned out great if I say so myself.

https://lyse.isobeef.org/tmp/streichmass-mit-messerrad/

The beech fences (80 and 100mm long) were part of a former table frame that I cut down. I plugged the dowel holes with, well, dowels. The horrific looking one was the stuck original one, though. Luckily, it’s a hell lot worse on camera than in person. If you take a close look, you’ll also be able to see the large but slight chamfers one one side each that I just left alone.

I really like beech wood. It looks beautiful, is rather heavy (at least in comparison to spruce which I typically use) and thus rock solid, is also a blast to plane and the list goes on. I sanded it with 180 grit and it’s smooth as a baby’s bottom.

The 25mm beech round stocks that house the brass knurled nuts are now roughly 4cm long. That’s one thing I wanted to change right after my first experience. If they were rounded or chamfered more, it would probably be even nicer for the fingers when using the marking gauge. They’re sunken in roughly 3mm in the fences. A forstner bit made quick work. This simplified alignment during glue-up a lot. Will definitely do that again if I happen to build more. I could fully concentrate on the grain orientation and it didn’t shift around.

Just like in the prototype, I used 8mm aluminium solid round bar again for one of the marking gauges. It’s also about 15cm in length. I figure that’s enough. The bought marking gauge has a twenty-something and some change steel rod. So far, all my markings didn’t even exceed probably 50mm.

I found the 8mm brass pipe laying around on the workshop. Didn’t know anymore I had it for ages. Unfortunately, the wall thickness is below a millimeter, so my 6mm wooden dowels are sliding in there. Thus, I put 8mm dowels in my drill chuck and reduced the diameter with a rasp. I went a tiny bit too far, the press fit is on the loose side. When drilling with a 2mm drill (I did that on purpose to hopefully cause the dowel to expand a bit more in the pipe, typically the tap hole for M3 is 2.5mm) and tapping M3, the downsized and glued in dowel slipped down the pipe. Should have used construction adhesive or something along those lines. Anyway, I might replace it with a solid one. I consider this a half-successful experiment. I fear that an unfavorable grain direction might pull out the cutting wheel during use. Let’s see.

The finish of all three is boiled linseed oil. It looks nice, but oh by, this smell. I really dislike it. My hands stink even after washing them several times. I still got several liters left, so I have the dubious joy to use it on many, many other projects to come.

Oh, one last thing. Didn’t manage to drill the tiny holes for my M3x16 bolts perfectly in center like for the prototype. They’re a tiny bit off. Also, on the longer fenced marking gauge, the hole for the knurled nut is a little to the side and at an angle. No idea how I messed this up. Luckily, it’s just a look thing but doesn’t impair use.

⤋ Read More
In-reply-to » @lyse Ja und auch so: „Raus mit den Entwickler:innen! Das Marketing macht seine Software jetzt mit KI selber!!1!“ Kannste dir alles nich ausdenken. (Jaja, ist natürlich im Moment billiger. Aber diese Kurzsichtigkeit …)

@lyse@lyse.isobeef.org

Aber Auslöffeln werden es trotzdem wieder ganze andere Leute müssen. Wie immer. Das ist das bittere an der Sache. Trifft immer die Falschen.

Prinzessin Müllabfuhr. Den Namen mache ich mir jetzt zueigen. Mich dagegen wehren kann ich eh nicht. 😐

Kollege meinte mal halb sarkastisch, irgendwann werden Firmen dann wieder Menschen einstellen, weil die billiger sind.

Wir gehen teilweise von Cloud-IaaS-Hostern wieder zurück zu Hardware, weil das billiger, flexibler, schneller ist … Derzeit zumindest. Die Cloud-Hostern kommen mit dem Nachkaufen von RAM nicht hinterher, sodass ständig „die Cloud voll“ ist. (Und, ja, natürlich wird sich darüber heftigst aufgeregt, aber dass das genau am eigenen Verhalten, nämlich der religiösen Liebe zur AI, liegt, merken sie nicht.)

Es ist auch jedes Augenmaß weg. Die „fette“ Kiste mit 64 CPUs, 256 GB RAM und 2 TB Platte wird nach allen Regeln der Kunst vollgekleistert. Irgendein Furz-Workload braucht 24 GB RAM, aber das ist jetzt normal und wird akzeptiert. So ist das jetzt halt.

⤋ Read More
In-reply-to » Tell me which one of those “plus” icons on this screenshot you can click and which one is just decoration.

@lyse@lyse.isobeef.org Bingo!

Oh, yeah, newsboat is good. For this particular use case, I explicitly needed a graphical feed reader, though. 😅 I ended up using Thunderbird, which has its own interesting way of configuring/adding feeds:

https://movq.de/v/a3557e3dc9/vid-1784952576.mp4

Why are feeds categorized as “Mail”? What’s going on with that “Add” button on the left of the dialog? Why does the dialog indicate that there’s a folder called “list-files Recent Commits” which doesn’t really exist in the end? (Why does it take about 1-2 seconds to load 25 feed items?) And so on.

⤋ Read More

I finally built a prototype of a marking gauge with a cutter wheel out of some scraps.

https://lyse.isobeef.org/tmp/streichmassprototyp-mit-messerrad/

It had been a long time in coming, I bought some replacement cutting wheels three years ago for exactly that purpose. I also found out that I need more M3 countersink bolts for future marking gauges that I want to make (maybe two or three more). Luckily, I had exactly one. I thought I got way more than that, but M3 is very, very scarce in my collection. My M3 bolt was barely long enough to attach the cutting wheel to the bar. But it’s okay for the prototype.

I was pleasantly surprised that I managed to drill the 2.5mm diameter hole almost perfectly in center in the 8mm diameter aluminium round bar. Center finder, drill press and vise with a vertical prism for the win!

I knew upfront that the M5 steel bolt to lock the bar in place definitely needs to be replaced with a brass or aluminium one (maybe with a knurled head). Otherwise, it cuts into the aluminium bar and leaves ugly marks. These burrs might even scratch the workpiece. But, of course, I don’t have any brass on hand either. Alternatively, I swap out the aluminium bar for a steel or even stainless steel one. Stainless might be tricky to precisely drill and tap, though.

I already learned a few things by making this prototype. The final wooden fence can be even a bit bigger. This round thing behind is also too short, I’d like it to be a tad longer and thicker. The final one will be made from hardwood, not spruce. Other than that, it’s great and already more practical than my store-bought marking gauge with its round fence. This only causes the tool to roll around on the workbench. Or even roll off. Stupid design.

⤋ Read More
In-reply-to » I don't think I'm going to add edit and delete support in this app because I think it was a horrible mistake to add those features to a client 🤣

The only place where this would be an issue is the Twtxt Search Engine – But as the GDPR also points out:

Art. 17

The one place the “it propagated and I can’t recall it” problem is legally acknowledged is Art. 17(2), and it explicitly scales to what’s technically feasible:

“…the controller, taking account of available technology and the cost of implementation, shall take reasonable steps, including technical measures, to inform controllers which are processing the personal data that the data subject has requested the erasure…”

Best-effort, given the technology. A decentralised, append-only, content-addressed feed is the available technology, and its limits are baked into the standard the law applies. Nobody — not the user, not you — is obliged to guarantee every cached copy vanishes.

⤋ Read More
In-reply-to » We slept in the forest. It was really great except of my mate's fucking terror dog who was barking and snarling the entire night to each and every sound. I had maybe half an hour of sleep in total. Despite that, it was pleasantly warm. Well, the night, that is. The heat was brutal during the days. Literally streams of sweat were running down on us on the way there in the evening and back in the morning.

@prologic@twtxt.net Well, 15 shows the site. On the left, I had a roll mat on a tarp. I borrowed some “NVA tarps” from the scouts for this trip. The scouts got them from the National People’s Army, the German Democratic Republic’s armed forces after Germany was reunited. They’re 1.75m x 1.75m in size and weigh 1.3kg, quite heavy, but super awesome. One tarp on the bottom, another one to cover up the clothes, shoes and sleeping bag in order to protect against the thaw. Finally, a mosquito net over all that, hung from a rope between two trees.

My mate just used a hammock with a mozzie net on the right hand side. The third tarp served as the luxurious bedside carpet. :-)

We sat on my second tarp to chill and enjoy the sunset and surroundings. It was nice to notice birds etc. die down. It took a really long time for the last light to fade away. Since we have a very high risk of forest fires, we of course couldn’t have a camp fire. But after all the exhaustion, I didn’t even miss it for one second.

Since we had dinner at home before leaving, all we brought were two lye rolls, two grain rolls, two brezels, some sausage and chocolate biscuits for breakfast. From the 2.5l of water, I ended up using 2l. It’s always good to have a little extra, despite the unnecessary weight. We had brekkie a few kilometers further on a bench in the shade. The first bench was already in direct sun.

Our camp site was maybe 30m to the side and a few meters down of a summit path hidden behind some trees and bushes. We were quite lucky, the other side of the hill got quite a bit of a breeze at night. We could hear the leaved treetops making much more noise behind us.

@movq@www.uninformativ.de Yes, these kind of dogs should really be strictly forbidden!

It’s not illegal if you own the forest or ask the owner. :-)

@david@daiwei.me Yeah, no clue. But my mate said the dog is disqualified from such adventures in the future. :-)

The temps were supposed to hit 14°C just before sunrise. Since we didn’t bring a thermometer, I can’t tell for sure. I was rather hot in my sleeping bag, so I had to pull out my arms every now and then. My mate’s sleeping bag was a little lighter and, unfortunately, the zipper jammed up. Since it didn’t close all the way, it felt quite a bit cold I was told in the morning. When we got up at 6ish (we said, we don’t care about time at all), it was probably already 16°C if not more. I brought a jumper, but a t-shirt was already nice enough to wear. The jumper just served as my pillow. The mercury raised by the minute then.

Yeah, I circled the spot with a biro to keep an eye on it. Until now, there’s absolutely nothing to see. Looks like I got lucky.

⤋ Read More

@GabesArcade@gabesarcade.com 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@daiwei.me 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 )

⤋ Read More

Okay, wow. Windows NT 4 wasn’t part of my timeline back then, so this is the first time I’m seeing it in action. And this thing came with IE 2, which I’ve also never seen before. (That’s interesting, because I remember using IE even on Win 3.x, but apparently that was already IE 3?)

It also makes me really happy to see my website work in these old browsers. Fullscreen images are “broken” because those are PNG or WebP, but the rest works just fine. 🥳

https://movq.de/v/56243a3e54

⤋ Read More

Interesting, HTTPS is almost twice as slow as plain HTTP on my server (~72 ms vs. ~135 ms):

$ hyperfine -r 50 "curl -so /dev/null 'http://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'"
Benchmark 1: curl -so /dev/null 'http://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'
  Time (mean ± σ):      72.7 ms ±  17.2 ms    [User: 6.2 ms, System: 4.8 ms]
  Range (min … max):    49.5 ms …  99.7 ms    50 runs

$ hyperfine -r 50 "curl -so /dev/null 'https://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'"
Benchmark 1: curl -so /dev/null 'https://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'
  Time (mean ± σ):     135.5 ms ±  28.9 ms    [User: 17.8 ms, System: 5.6 ms]
  Range (min … max):    93.2 ms … 198.5 ms    50 runs

⤋ Read More
In-reply-to » Speaking of UIs, this is how Thunderbird looks now:

@lyse@lyse.isobeef.org

But it’s Windows, it doesn’t have a place in my heart.

The older I get, the more I’m glorifying anything pre XP. 😅 But that’s only because everything today is so horrible.

Well, not anything pre XP. 3.0 or newer would be nice, because Windows 2.x was still pretty bare bones:

https://movq.de/v/00162b9df8/

(OS/2 was great, though, except for the lack of a good file manager.)

⤋ Read More

I indexed 669 GB of my GoPro videos using my M1 Max computer and local ML models
TLDR: I had 2,207 GoPro videos, and I need to rewatch them to find interesting moments from my cycling journey. I built a project to index them locally on my M1 Max using open-source ML models, search for those moments, and send the best clips straight to my DaVinci Resolve timeline. I indexed 628 videos (668.68 GB, 15h 13m 18s of footage duration), more details in the metrics table in the last section of this article.

Full article: https:// … ⌘ Read more

⤋ Read More
In-reply-to » Oh boy, I absolutely hate this stupid trend of not writing changelogs anymore! Why the fuck would one seriously consider it to be a viable option to just let some shitty bot spew all merge requests on a goddamn GitHub release?! First of all, these merge request titles suck balls. The order of the changes in this "changelog" is completely random (well, probably merge time, which is as useless as the dick on the Pope). They are not grouped by anything at all. Additions, changes, removals, deprecations, etc. randomly mixed up in one giant list. And then "Add feature X", seventeen kilometers further down "Revert 'Add feature X'". Fuck you! Don't include this shit in the first place!

@movq@www.uninformativ.de You may want to include another antipattern to avoid in your article:

  • bump $same_dependency from 1.0.0 to 1.0.1
  • bump $same_dependency from 1.0.1 to 1.0.2
  • bump $same_dependency from 1.0.2 to 1.1.0
  • bump $same_dependency from 1.1.0 to 1.2.0

⤋ Read More

Show HN: I built 80 mini-games using Fable before it was shut down
Dear Hacker News,

I’m kindly asking for your participation in the open beta for my AI-managed mini-games website. Thank you in advance!

For a limited time window, I’m setting the all-free feature flag to true. I hope you have a lot of fun exploring the AI’s sense for games! Here and there, I tweaked it to help with visual consistency.

I would be deeply grateful if you opted into analytics.

$2,300 in API tokens…

Cheers!

Comments URL: [https://news.ycombinator.c … ⌘ Read more

⤋ Read More

Every now and then, I think that I have carefully proof-read my message enough times and hit the “Add message” button in tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt’s cache. This is rather tidious:

  1. Recall the sqlitebrowser ~/.local/share/twtxt/tt2.sqlite from my shell history.
  2. Switch to the “Browse data” tab.
  3. Go to the messages table and wait a second or two until it’s loaded.
  4. Sort by the created_at column twice, so that I get descending order.
  5. Select the first message, which is typically the one in question.
  6. Find the “Remove currently selected row” button in the tool bar.
  7. Commit the changes.
  8. Close sqlitebrowser.

So, I finally implemented the removal of messages from the cache in tt. I can now hit d and confirm the removal. Bam! Should have done that ages ago!

Image

Next up is the search, I think.

⤋ Read More

NSW universities took $3.2 billion from domestic students but are still running at a loss
Full-time domestic students cost an average of $12,000 each even though they are paying for expensive degrees, a parliamentary report has found. ⌘ Read more

⤋ Read More
In-reply-to » @lyse @tftp Someone has pointed out that there’s OpenRsync:

Actually, I’m stupid: I’m using the normal rsync on OpenBSD as well.

And regarding OpenRsync’s general usability:

https://marc.info/?l=openbsd-misc&m=178090751524547&w=2

Right now openrsync is limited in functionality and is primarily present
for rpki-client. The limited functionality makes it unusable for generic
use and so any diff or change like the above will not be considered since it
is simply not ready.

First problem to solve is to remove the mmap usage in openrsync. After
that modern protocol versions need to be added. Once that is in place one
can start a discussion about using openrsync as a default on OpenBSD.

⤋ Read More

Plan ‘abandoning’ nearly built motorway in Sydney’s south secretly explored
Confidential documents reveal abandoning the $3.2 billion underground motorway project has been canvassed in a secret scoping study and other reports. ⌘ Read more

⤋ Read More

Cocaine, heroin, meth: Two charged over 80kg drug haul in WA’s South West
WA Police have seized 57 kilograms of methamphetamine, 23 kilograms of cocaine and 2.5 kilograms of heroin in a series of raids kicked off by a traffic stop in the South West. ⌘ Read more

⤋ Read More
In-reply-to » @bender … boom, 5500+ hits on that blog post. 🤣 Should I start monetizing this shit?! 🤪 (Don’t worry, I won’t. German law gets super annoying if you do that kind of thing.)

We’re at close to 20k hits now, but it has slowed down considerably. Nobody cares about page 2. 😅

⤋ Read More

Launch HN: Minicor (YC P26) – Windows desktop automations at scale
Hey we’re Faiz and Saheed and we built Minicor so AI companies who need to integrate to desktop systems with no API can quickly build scalable desktop RPAs. Demo: https://www.youtube.com/watch?v=MD0GHZIJ1cw

We were working on non-RPA integrations when a customer promised to sign a deal in 2 days if we could unblock a sale of theirs that involved integrating with a clinic’s Windows based medical record system. We didn’t know it at … ⌘ Read more

⤋ Read More