Searching txt.sour.is

Twts matching #9:
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:

What’s interesting here
 Which is the interesting thing about Mu is the dual runtime. So the above solution for Euler Problem 9 finds the solution in ~429ms with the Go VM and ~327ms natively compiled to darwin/arm64. Not bad for a language I haven’t really done any optimization work on yet (correctness first obviously).

​ 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

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 » Numbered headings in blog posts, yay or nay?

@lyse@lyse.isobeef.org Besides, have a look at

Image

again: When it goes from item 9 to item 10, the indentation of the text (after the number) changes. Pretty ugly. In other words, a table of contents should be a table, not a list like it is at the moment. And that would require me to write my own extension for python-markdown 
 Probably not worth it.

​ Read More

Wind farm plan tipped to risk billions in energy investment and 26,000 jobs
An analysis estimates the Coalition’s proposed policy would put $3.9 billion in local wages and more than $200 million in landholder and community payments at risk. ⌘ Read more

​ Read More

Slåvnosti, ale aké?!
SprĂĄva o tom, ĆŸe Obec Báčsky Petrovec zaplatĂ­ takmer 9,6 miliĂłna dinĂĄrov za vystĂșpenie srbskĂ©ho folkovĂ©ho spevĂĄka Acu Pejovića na tohtoročnĂœch SlovenskĂœch nĂĄrodnĂœch slĂĄvnostiach, opÀƄ otvorila otĂĄzku, ktorĂĄ sa vracia prakticky kaĆŸdĂœ rok: Čo vlastne majĂș byĆ„ SlovenskĂ© nĂĄrodnĂ© slĂĄvnosti? ⌘ Read more

​ Read More

A Conspiracy Theory About QR Codes Has Led to Chaos Ahead of Georgia’s Midterms
The state of Georgia banned the use of QR codes for elections, based in part on the assertions of a man who’s boosted false claims about Israel and 9/11. Now no one knows how ballots will be counted. ⌘ Read more

​ Read More

I just wanted to look up 9V block battery prices online and these automatically generated descriptions are getting dumber by the minute:

Datum der Erzeugung: Verfallsdatum minus 7 Jahre

(Date of manufacturing: expiration date minus 7 years)

Or look at this one:

Die leistungsstarke 9 V-Block E Batterie, auch 6LR61 genannt, eignet sich besonders gut fĂŒr Taschenlampen, Radio oder Kinderspielzeug, die einen gleichbleibenden Strombedarf haben. Ihre max. Spannung betrĂ€gt 1,5 V.

(The high performance 9 V block E battery, also known as 6LR61, is particularly suitable for torches, radio or child’s toys, which have a steady power demand. Its max. voltage is 1.5 V.)

The battery is best suited for
 devices where it fits. No shit, Sherlock! Has anyboy ever come across 9V block torches? O_o I haven’t.

​ Read More

# AteliĂȘ aberto de desenho com programação

Quintas-feiras 14:30 às 17:00 no #SescAvPaulista - 12 participantes, a partir de 16 anos. Distribuição gratuita de senhas 30 minutos antes.

Nesta atividade aberta, o pĂșblico pode interagir com cĂłdigo de maneira lĂșdica e criativa, gerando desenhos a partir da modificação de programas em Python.

A cada encontro vamos explorar diferentes temas da chamada “#programaçãoCriativa”, estudando obras, exemplos visuais, e ideias da computação que inspiraram inĂșmeros artistas e programadores ao longo das dĂ©cadas.

Fevereiro

5 de fevereiro - Módulos geométricos

12 de fevereiro - AnimaçÔes em loop

19 de fevereiro - Imagens reticuladas

26 de fevereiro - Texturas algorĂ­tmicas

Março

5 de março - Recortes e colagens digitais

12 de março - ExploraçÔes combinatórias

19 de março - Malhas tridimensionais

26 de março - Tipografia experimental

Abril

2 de abril - SimulaçÔes físicas

9 de abril - Plantas e fractais

16 de abril - AutĂŽmatos celulares

23 de abril - Desenhos interativos

​ Read More

# AteliĂȘ aberto de desenho com programação

Quintas-feiras 14:30 às 16:30 no #SescAvPaulista - 12 participantes, a partir de 16 anos. Distribuição gratuita de senhas 30 minutos antes.

Nesta atividade aberta, o pĂșblico pode interagir com cĂłdigo de maneira lĂșdica e criativa, gerando desenhos a partir da modificação de programas em Python.

A cada encontro vamos explorar diferentes temas da chamada “#programaçãoCriativa”, estudando obras, exemplos visuais, e ideias da computação que inspiraram inĂșmeros artistas e programadores ao longo das dĂ©cadas.

Fevereiro

5 de fevereiro - Módulos geométricos

12 de fevereiro - AnimaçÔes em loop

19 de fevereiro - Imagens reticuladas

26 de fevereiro - Texturas algorĂ­tmicas

Março

5 de março - Recortes e colagens digitais

12 de março - ExploraçÔes combinatórias

19 de março - Malhas tridimensionais

26 de março - Tipografia experimental

Abril

2 de abril - SimulaçÔes físicas

9 de abril - Plantas e fractais

16 de abril - AutĂŽmatos celulares

23 de abril - Desenhos interativos

​ Read More

Ainda ando pasmado com o facto de uma sĂ©rie cheia de body horror, violĂȘncia contra crianças, gore e violĂȘncia gratuita (#StrangerThings) estar a ser agressivamente marketizada para um pĂșblico infantil

Ontem um amigo de 9 anos do meu filho estava a contar-me como Ă© a melhor sĂ©rie de sempre, e eu ainda estou burro de como hĂĄ miĂșdos que estejam a ver isto

Btw nĂŁo tenho problemas com a sĂ©rie (acabei ontem a 5ÂȘ temp e acho profundamente meh), Ă© este esforço em vendĂȘ-la a crianças quando Ă© claramente uma sĂ©rie 16+ no mĂ­nimo

​ Read More
In-reply-to » Day 9 also required some optimizations, if you aren't careful, you end up with really inefficient algorithms with time/memory complexity beyond what a typical machine has đŸ€Ł

@movq@www.uninformativ.de I shrank Day 9 Part 2 from “cover the whole map” to “only track the interesting lines.” By compressing coordinates to just the unique x/y breakpoints, the grid got tiny. I still flood-fill and do the corner-pair checks, but now on that compact grid with weighted prefix sums for instant rectangle checks. Result: far less RAM, way less CPU, same correct answer.

​ Read More

Day 9 also required some optimizations, if you aren’t careful, you end up with really inefficient algorithms with time/memory complexity beyond what a typical machine has đŸ€Ł

​ Read More
In-reply-to » Advent of Code 2025 starts tomorrow. đŸ„łđŸŽ„

Day 2 was pretty tough on my old hardware. Part 1 originally took 16 minutes, then I got it down to 9 seconds – only to realize later that my solution abused some properties of my particular input. A correct solution will probably take about 30 seconds. đŸ«€

Part 2 took 29 minutes this morning. I wrote an optimized version but haven’t tested it yet. I hope it’ll be under a minute.

Python 1 feels really slow, even compared to Java 1. And these first puzzles weren’t even computationally intensive. We’ll see how far I’ll make it 


Image

​ Read More

“A ZIP file containing 9 of Strangethink’s games, which were removed from their creator’s online pages in 2019.[
] The games included in this collection are -

Abstract Ritual
Art Machine
Error City
Glowing Bodies
Joy Exhibition
Mystery Tapes
Secret Habitat
The Pyramid Gate
These Monsters

I hope you enjoy these fascinating experiences!”

https://archive.org/details/strangethink-software via @Introscopia@Introscopia

​ Read More

Fark me đŸ€Šâ€â™‚ïž I woke up quite late today (after a long night helping/assisting with a Mainframe migration last night fork work) to abusive traffic and my alerts going off. The impact? My pod (twtxt.net) was being hammered by something at a request rate of 30 req/s (there are global rate limits in place, but still
). The culprit? Turned out to be a particular IP 43.134.51.191 and after looking into who own s that IP I discovered it was yet-another-bad-customer-or-whatever from Tencent, so that entire network (ASN) is now blocked from my Edge:

+# Who: Tentcent
+# Why: Bad Bots
+132203

Total damage?

$ caddy-log-formatter twtxt.net.log | cut -f 1 -d  ' ' | sort | uniq -c | sort -r -n -k 1 | head -n 5
  61371 43.134.51.191
    402 159.196.9.199
    121 45.77.238.240
      8 106.200.1.116
      6 104.250.53.138

61k reqs over an hour or so (before I noticed), bunch of CPU time burned, and useless waste of my fucking time.

​ Read More
In-reply-to » What do you do, when a recruiter throws you a PD or two and says the total compensation is ~2-3x what you're on now?! đŸ€”

@lyse@lyse.isobeef.org @bender@twtxt.net Pfft, they want folks to relocate to Sydney. Fuck that đŸ€Ł Sydney is a bit like San Francisco, I’m not actually sure which is worse. Fuck’n expensive as hell, the only palce you’d be able to afford to buy or rent is at least ~2hrs out of the city by public transport (i.e: train) and by that time you’ve just pissed your life down the toilet, because you’d be expected ot work a 9-10hr day + 2-3hrs of travel each way, buy the time you factor in having to wake up super early to get ready to travel in to work, you basically have zero time for anything else, let alone your ufamily,

Fuck that.

​ Read More

Terres rares : la Chine verrouille, Trump riposte, l’Europe paie
Coup de tonnerre sur le commerce mondial : les Chinois, d’habitude prudents, commerçants et cherchant le compromis, dĂ©cident d’imposer de nouveaux contrĂŽles drastiques Ă  l’exportation de leurs terres rares, y compris raffinĂ©es et utilisĂ©es dans les technologies modernes. Ainsi, dans une annonce rĂ©cente du ministĂšre chinois du Commerce datĂ©e du 9 octobre 2025, on apprend que [
] ⌘ Read more

​ Read More

Private Equity Tightens Its Grip on Outpatient Surgery
Jennifer Henderson,  Enterprise and Investigative Writer  -  MedPage Today

_Stephan: Depending on which poll you look at, between 25% to 40% of the emergency rooms in hospitals are not actually part of the hospital. Instead, they are owned by private equity investment firms, and the physicians and nurses are employees of those firms. Private equity firms also own approximately 8.5% to 9% of all private hospitals in 
 ⌘ Read more

​ Read More

[$] LWN.net Weekly Edition for October 9, 2025
Inside this week’s LWN.net Weekly Edition:

  • Front: Kernel Rust features; systemd v258, part 2; Cauldron kernel hackers; BPF for GNU tools; 6.18 merge window, part 1; Lifetime-end pointer zapping; Robot Operating System.

  • Briefs: OpenSSH 10.1; Firefox profiles; Python 3.14; U-Boot v2025.10; FSF presidency; Quotes; 


  • Announcements: Newsletters, conferences, security upda 
 ⌘ Read more

​ Read More

[$] 6.18 merge window, part 1
At the time of writing, there have been 9,099 commits in the 6.18 merge window,
8,475 non-merges and 624 merges. The
changes so far include core-kernel, graphics, and networking work, among others.
There are no big surprises, but several items that were discussed at this year’s
LFSMM+BPF Summit have now been merged. ⌘ Read more

​ Read More

Cascadia megathrust earthquake could trigger San Andreas fault
When the tectonic subduction zone beneath the Pacific Northwest moves, it does so in dramatic fashion. Not only is ground shaking from a magnitude 9+ earthquake incredibly destructive, the event triggers tsunamis and landslides to compound the damage. Now, a new study in the Geosphere suggests the “really big one” could also trigger a major earthquake in California. ⌘ Read more

​ Read More

9 macOS Tahoe Tips You’ll Actually Use
While the most obvious change to macOS Tahoe 26 is the newly rounded and translucent Liquid Glass interface appearance, there are also a variety of neat new features and customization options that you’re sure to appreciate easily well. Let’s review some of the most useful tips for macOS Tahoe that you’ll want to check out, 
 Read More ⌘ Read more

​ Read More
In-reply-to » is there consensus on what characters should(n't) be allowed in nicks? i remember reading somewhere whitespace should not be allowed, but i don't see it in the spec on twtxt.dev — in fact, are there any other resources on twtxt extensions outside of twtxt.dev?

@zvava@twtxt.net Good question. This is the spec, I think:

https://twtxt.dev/exts/metadata.html#nick

It doesn’t say much. đŸ€”

In the wild, I’ve only seen “traditional” nick names, i.e. ASCII 0x21 thru 0x7E.

My client removes anything but r'[a-zA-Z0-9]' from nick names.

​ Read More

we are now parsing and recursively fetching remote feeds somewhat successfully, gotta work on the media proxy and markdown way more, so so many fucky edgecases
.my friend’s feed with like four posts parsed correctly so i tried this account’s feed and well now im not going to bed on time

Video

​ Read More

search page, bookmarks page, improved thread view (that i will probably improve further), as well as a logo and a whole ui redesign. it is truly all coming together
were i to mark any items off the roadmap :p

Video

​ Read More

replies and following implemented! next step is further parsing of post contents, rendering threads, and then maybe i can finally start adding remote feeds
! though i kinda wanna redo the whole ui ^^’

Video

​ Read More