HN user

susam

24,525 karma
              ,-------------------------------------------.
              |                                           |\
              |   ,===================================.   | \
              |   |                                   |   |  \
              |   |  C:\>lynx susam.net               |   |  |
              |   |                                   |   |  |
              |   |                                   |   |  |
              |   |                                   |   |  |
              |   |                                   |   |  |
              |   |                                   |   |  |
              |   |                                   |   |  |
              |   |                                   |   |  |
              |   |                                   |   |  |
              |   |                                   |   |  |
              |   |                                   |   |  |
              |   |___________________________________|   |  ,
              |                                           | /-,
            ,-|___________________________________________|/ /|
           /         (_____________________________)        / |
          /_______________________________________________ /  |
         |                                                 |  |___
         | [@]                                             |  |   )
         |                                    [==========] |  /  /
         | ||||||||||                         [==========] | /  /
         |_________________________________________________|/  /
         _________________________________________________    /
        /  #  = = = =  # # # #  = = = =  # # #  /- - -/  /,__/
       /                                                //
      /  = = = = = = = = = = = = = ##  # # #  # # # #  //
     /  ## = = = = = = = = = = = = =  # # #  = = = #  //
    /  ### = = = = = = = = = = = ##         = = = #  /`
   /  #### = = = = = = = = = = ###    #    = = = #  /
  /  ###  ### ============= ## ##  # # #  === = #  /
  `-----------------------------------------------'
Posts2,124
Comments933
View on HN
www.youtube.com 5d ago

How Cathode Ray Tubes Work [video]

susam
1pts0
www.bbc.co.uk 9d ago

Waitrose to suspend mackerel sales due to overfishing concerns

susam
1pts0
assets.publishing.service.gov.uk 9d ago

The Renters' Rights Act Information Sheet 2026 [pdf]

susam
2pts0
www.gov.uk 10d ago

The Highway Code: Using the road (Rules 159 to 203)

susam
2pts0
matadornetwork.com 1mo ago

In Mizoram, India, the Shops Have No Shopkeepers (2020)

susam
5pts0
timesofindia.indiatimes.com 1mo ago

Why Mizoram has shops without shopkeepers (2024)

susam
2pts0
archive.org 1mo ago

Byte, Vol. 7, No. 8 (1982) [pdf]

susam
3pts0
www.mylondon.news 1mo ago

New York City-style air conditioning rules for London rejected by City Hall

susam
2pts0
www.bbc.co.uk 1mo ago

New charter gives River Wye the right to be free from pollution

susam
8pts0
www.youtube.com 1mo ago

Linux Startup and Shutdown Sounds [video]

susam
2pts0
codeberg.org 1mo ago

HN Skins – Read Hacker News in Style

susam
2pts1
gopher.floodgap.com 1mo ago

gopher://gopher.floodgap.com/

susam
4pts0
www.superjumpmagazine.com 2mo ago

The Forgotten Art of the LAN Party (2023)

susam
160pts87
web.archive.org 2mo ago

Couple of Emacs Hacks (2003)

susam
2pts0
news.ycombinator.com 2mo ago

Ask HN: Do you have a colophon for your personal website?

susam
13pts7
www.youtube.com 2mo ago

How Was This Allowed to Happen? – 2025 Washington National Crash [video]

susam
3pts0
susam.net 2mo ago

Sequence Points (2010)

susam
1pts0
susam.codeberg.page 2mo ago

List of known personal websites that host Wander, a tool to wander the small web

susam
3pts0
diamondgeezer.blogspot.com 2mo ago

Why is it called Kent House?

susam
45pts9
itsfoss.com 2mo ago

Why Is Debian Called the Universal Operating System?

susam
2pts0
sites.math.rutgers.edu 2mo ago

A Good Lemma Is Worth a Thousand Theorems (2007)

susam
91pts21
utcc.utoronto.ca 2mo ago

Moving from lsp-mode in GNU Emacs to Eglot

susam
2pts0
lookup.london 2mo ago

London's Smallest Public Sculptures

susam
40pts6
www.openculture.com 2mo ago

The greatest shot in television: James Burke had one chance to nail this scene (2024)

susam
364pts193
freenode-math.fandom.com 2mo ago

Freenode IRC Mathematics Seminars (2010)

susam
2pts0
susam.net 2mo ago

From RSS Feeds to Atom Feeds

susam
1pts0
utcc.utoronto.ca 2mo ago

Notes on using GNU Emacs' Tramp system in an unusual shell environment

susam
29pts0
chrismorgan.info 2mo ago

I’ve banned query strings

susam
576pts297
www.blu-ray.com 2mo ago

The Making of Steven Spielberg's Jurassic Park (2012)

susam
9pts3
www.techtownforum.com 2mo ago

Voltage Tester vs. Multimeter

susam
2pts0

I have been maintaining my own metalist of directories where one can submit their indie/personal websites to. In alphabetical order, here is what it looks like right now:

https://blogroll.org/

https://blogs.hn/ (by @surprisetalk)

https://hnpwd.github.io/ (I am one of the maintainers)

https://iii.social/ (by @freshman_dev)

https://indieblog.page/ (by @splitbrain)

https://kagi.com/smallweb/ (by @freediver)

https://marginalia-search.com/ (by @marginalia_nu)

https://minifeed.net/ (by @freetonik)

https://susam.net/wander/ (I developed this)

https://text.blogosphere.app/ (by @ramkarthikk)

https://wiby.me/

A clarification: The Wander link above (which I developed) is not something where you list your website. It is a tool you host on your website to become part of a decentralised network of personal websites (much like in a webring, except that the network is shaped like a graph rather than a ring): https://susam.codeberg.page/wcn/. More details here: https://codeberg.org/susam/wander

One of my favourite Grothendieck stories from <https://www.ams.org/notices/200410/fea-grothendieck-part2.pd...>:

One striking characteristic of Grothendieck's mode of thinking is that it seemed to rely so little on examples. This can be seen in the legend of the so-called "Grothendieck prime". In a mathematical conversation, someone suggested to Grothendieck that they should consider a particular prime number. "You mean an actual number?" Grothendieck asked. The other person replied, yes, an actual prime number. Grothendieck suggested, "All right, take 57."

PHP's Oddities 2 months ago

I attended a talk by Rasmus Lerdorf at a FOSS conference in 2006. It has been a long time, so I remember only a few things from the talk, but one thing I remember him talking about is how people love to complain about PHP, often on forums that are themselves written in PHP.

This is fantastic! The voting statistics of the community would have been very interesting. I have emailed the moderators to see if they would consider giving this post a second chance at /pool.

I meant the latter. I think the question is fine. It can lead to a good discussion, similar to what we are having in this thread. It has been a long time (almost 20 years), but I remember that most interviewers who asked this seemed to be convinced that the output they had seen with their compiler version was the correct answer. What could be a nice and relevant discussion, especially considering that some classes of bugs and security issues result from it, was seen only as a trivia quiz by the interviewers, with the expectation of an answer that was incorrect, no less.

Your phone screen story is quite nice. When I read your question, I would have answered with successive doubling as well. In fact, I faced the same question at an AWS interview a long time ago. The question was mathematically the same question but formulated differently. I answered with the doubling solution too, which leads to an O(log n) time solution, asymptotically. Your interviewer's immediate objection to your squaring solution seems like a major failure in their intuition. When I read your solution, purely by intuition, that is, without resorting to any rigorous reasoning, I felt: wow, that's interesting, your solution would land on the zero region in merely O(log log n) time. Why didn't I think of it? I think your solution should spark interest rather than dismissal in a curious person. Of course, the binary search after that to find the exact transition point blows up the time consumed back to O(log n).

Once again, thanks for these really interesting comments!

I searched K&R to see if there is any language that implies a += a++ + a++ to be undefined. I couldn't find anything. I found the following excerpt which is closest to what I claim, in spirit. But still, it does not explicitly spell out that an object must not be modified more than once between sequence points. From § A.7 Expressions:

The precedence and associativity of operators is fully specified, but the order of evaluation of expressions is, with certain exceptions, undefined, even if the subexpressions involve side effects. That is, unless the definition of the operator guarantees that its operands are evaluated in a particular order, the implementation is free to evaluate operands in any order, or even to interleave their evaluation. However, each operator combines the values produced by its operands in a way compatible with the parsing of the expression in which it appears. This rule revokes the previous freedom to reorder expressions with operators that are mathematically commutative and associative, but can fail to be computationally associative. The change affects only floating-point computations near the limits of their accuracy, and situations where overflow is possible.

So I think, the text in K&R serves as warning against writing such code, at best. The C99 draft has more relevant language. From § 4. Conformance:

If a "shall" or "shall not" requirement that appears outside of a constraint is violated, the behavior is undefined. Undefined behavior is otherwise indicated in this International Standard by the words "undefined behavior" or by the omission of any explicit definition of behavior. There is no difference in emphasis among these three; they all describe "behavior that is undefined".

This along with the § 6.5 excerpt already mentioned in my post implies a += a++ + a++ to be undefined. When I get some more time later, I'll make an update to my post to include the § 4. Conformance language too for completeness.

Thank you for the nice comment!

The code in the post seems very similar to the one in my own post from 2010: https://susam.net/sequence-points.html

  int a = 5;
  a += a++ + a++;
I do remember that this particular code snippet (with a = 5, even) used to be popular as an interview question. I found such questions quite annoying because most interviewers who posed them seemed to believe that whatever output they saw with their compiler version was the correct answer. If you tried explaining that the code has undefined behaviour, the reactions generally ranged from mild disagreement to serious confusion. Most of them neither cared about nor understood 'undefined behaviour' or 'sequence points'.

I remember one particular interviewer who, after I explained that this was undefined behaviour and why, listened patiently to me and then explained to me that the correct answer was 17, because the two post-increments leave the variable as 6, so adding 6 twice to the original 5 gives 17.

I am very glad these types of interview questions have become less prevalent these days. They have, right? Right?

dBase: 1979-2026 2 months ago

I remember dBASE IV from my childhood days when my father, who had no computer background, was required to take computer training by his workplace. My father and his colleagues were given free evening computer lessons by their company, taught by the same teachers who used to teach us, the kids, computers in our school.

After their first class, he brought home a fat dBASE IV manual. Since I was very interested in computer books, I read a good portion of it even though I had never touched dBASE in my life. I would daydream of all the little forms, queries, reports and labels I could make with dBASE. But I never got to touch dBASE in my life. We kids used to get LOGO lessons instead in school.

One day my father came back from his evening lesson mildly distressed about something he had learnt. He said they were being taught loops but in the loop there was an equation that seemed just plain wrong. It was:

  i = i + 1
How could that be a valid equation? How could i ever equal i + 1? He mentioned that he had asked the teacher about it and from what I could gather, my teacher and my father were talking past each other. The teacher probably tried explaining that it was not an equation but an instruction instead, whereas my father continued to interpret i = i + 1 as an equation due to the algebra he was so familiar with. It sort of held up the class for a while.

The teacher asked my father's name, perhaps so that he could talk to him separately later. But when he learnt my father's name, he realised that his son, me, went to the same school where he taught. So he told my father, 'When you get back home, ask your son about i = i + 1. He will explain it to you better than I am able to.'

And indeed I was able to explain it to him pretty well. I was eight or nine years old back then. And that was probably the first thing I taught my father!

From one of the answers [...]

Thank you for highlighting that answer. It is one of my favourite pieces of writing about the culture of mathematics. I just want to add that that particular answer is now affectionately known as Thurston's Paean.

Good pedagogy is a problem even for graduate-level mathematics students and professional mathematicians. The proofs in many graduate-level mathematics textbooks are, in my humble opinion, not really proofs at all. They are closer to high-level outlines of proofs. The authors simply do not show their work. The student then has to put in an extraordinary amount of effort to understand and justify each line. Sometimes a 10-line argument in a textbook might expand into a 10-page proof if the student really wants to convince themselves that the argument works.

I am not a mathematician, but out of personal interest, I have worked with professional mathematicians in the past to help refine notes that explain certain intermediate steps in textbooks (for example, Galois Theory, by Stewart, in a specific case). I was surprised to find that it was not just me who found the intermediate steps of certain proofs obscure. Even professional mathematicians who had studied the subject for much of their lives found them obscure. It took us two days of working together to untangle a complicated argument and present it in a way that satisfied three properties: (1) correctness, (2) completeness, and (3) accessibility to a reasonably motivated student.

And I don't mean that the books merely omit basic results from elementary topics like group theory or field theory, which students typically learn in their undergraduate courses. Even if we take all the elementary results from undergraduate courses for granted, the proofs presented in graduate-level textbooks are often nowhere near a complete explanation of why the arguments work. They are high-level outlines at best. I find this hugely problematic, especially because students often learn a topic under difficult deadlines. If the exposition does not include sufficient detail, some students might never learn exactly why the proof works, because not everyone has the time to work out a 10-page proof for every 10 lines in the book.

Many good universities provide accompanying notes that expand the difficult arguments by giving rigorous proofs and adding commentary to aid intuition. I think that is a great practice. I have studied several graduate-level textbooks in the last few years and while these textbooks are a boon to the world, because textbooks that expose the subject are better than no textbooks at all, I am also disappointed by how inaccessible such material often is. If I had unlimited time, I would write accompaniments to those textbooks that provide a detailed exposition of all the arguments. But of course, I don't have unlimited time. Even so, I am thinking of at least making a start by writing accompaniment notes for some topics whose exposition quality I feel strongly about, such as s-arc transitivity of graphs, field extensions and so on.

Yes, that's fair. Indeed my so called improvement requires continual maintenance to add new parameters to the blocklist, which somewhat defeats what is perhaps the main purpose: convenience.

While it is clear that your solution works well for you and would probably work for me too for most types of 'bad' URLs, I am noting down an allowlist based solution for my own satisfaction and future reference:

  javascript:(()=>{const u=new URL(location.href);[...u.searchParams.keys()].forEach(k=>{if(!['p','q'].includes(k)){u.searchParams.delete(k)}});navigator.clipboard.writeText(u.href)})();
Tested with the following URL:
  https://duckduckgo.com/?ia=web&origin=funnel_home_website&t=h_&q=hello+world&chip-select=search
The bookmarklet copies this cleaned version of the URL:
  https://duckduckgo.com/?q=hello+world

This corrupts a URL like:

  https://example.com/?p=20&utm_source=spam
to:
  https://example.com/
when in fact we want the following:
  https://example.com/?p=20
A possible improvement can be:
  javascript:(()=>{const u=new URL(location.href);[...u.searchParams.keys()].forEach(k=>{if(k.startsWith('utm_')){u.searchParams.delete(k)}});navigator.clipboard.writeText(u.href)})();

Independence tells us how to compute the probability of a sequence like HT or TH:

  P(HT) = P(H)P(T) = p(1 - p)
But the question I am addressing is not just "what is the probability of HT?" It is "given that the two flips are different, what is the probability that the order was HT rather than TH?"

That is a conditional probability:

  P(HT | HT or TH)

I'll start with the clarification that the moderators have changed the URL of the original post from <https://susam.net/no-query-strings.html> to <https://chrismorgan.info/no-query-strings>. Hopefully, this will prevent any confusion about why we are discussing random walks in a post about query strings. Now let me answer your question.

Is it not a random walk? Might sound pedantic but if there is graph structure I am interested.

The network is a directed graph. Every Wander Console declares a few other consoles as its neighbours. The person setting up the console decides who they want to list as their neighbours. So if we call the network graph X, then the set of vertices is:

  V(X) = the set of all URLs that point to Wander Consoles
and the set of directed edges is:
  E(X) = {(u, v) in V(X) : u declares v as its neighbour}
The traversal between consoles is not strictly a random walk. If I could call it something, I would call it randomised graph exploration with frontier expansion. On each click of the 'Wander' button, the tool picks one console at random from the set of discovered consoles and visits that console. It then fetches the neighbours declared by that console and adds any newly discovered consoles to the set.

The difference from a random walk is that the next console is not chosen from the neighbours of the last visited console. It is chosen from the whole set of consoles discovered so far. In other words, each click expands the known part of the graph, but the console used for that expansion is selected randomly from all discovered consoles, not just from the last console visited.

And for people who like equations, here is my attempt at explaining it.

Assume each flip is independent and the bias remains same in each flip.

Let

  P(H) = p,
  P(T) = 1 - p.
Then
  P(HH) = p^2,
  P(HT) = p(1 - p),
  P(TH) = (1 - p)p,
  P(TT) = (1 - p)^2.
Therefore
  P(HT or TH) = 2p(1 - p).
Now calculate
  P(HT | HT or TH) = p(1 - p) / (2p(1 - p)) = 1/2,
  P(TH | HT or TH) = (1 - p)p / (2p(1 - p)) = 1/2.

I very much prefer a well-written product guide compared to a product tour. A guide does not interrupt me when I am trying to get work done. I can read it at a time that is convenient to me. I can bookmark it, revisit it and share it with others as well.

You are quoting a point from my summary and extrapolating what my post might be saying.

Even in that quote, I do not say that the user must be responsible. The point is that responsibility and accountability should remain with some humans. Depending on the case, those humans may be the people who manufactured the tool, the people who deployed it or the people who took bad output from the tool and applied it to the real world.

Did you read the actual section at <https://susam.net/inverse-laws-of-robotics.html#non-abdicati...>? It has more nuance than what the summary alone can capture.

I recently wrote a blog post where I argued that there are a few principles we should consistently follow when talking about AI: https://susam.net/inverse-laws-of-robotics.html

To summarise them:

1. Do not anthropomorphise AI systems.

2. Do not blindly trust the output of AI systems.

3. Retain full human responsibility and accountability for any consequences arising from the use of AI systems.

I would like to see the language around AI become less anthropomorphic and more technical. I believe that precise language encourages clear thinking and good judgement. If we treat AI like another tool and use language that reflects that, it will become abundantly obvious that in many cases, the responsibility of any 'mistake' made by the tool falls on the user of the tool.

But alas, ideas like this do not travel very far when I express them on my small website. It would help if more prominent personalities articulated these principles, so they become more widely adopted.

When I first read the title, my reaction was: how dare they say my website isn't for me? Of course it is. It's my space to share thoughts, jot down notes from things I come across, publish small tools, and so on. That made me click through and see how the article could possibly argue otherwise.

Then I realised that the article talks about business websites, not personal websites. Quoting from the article:

The website isn't for the founder, the marketing manager, or the board. It's for the person you've never met - the customer weighing up a purchase, the lead chasing a phone number, the visitor sizing up your credibility or the member signing up to access gated content.

Yes, I agree. While not really a business, I've always liked https://nhs.uk/ for its simplicity. I especially like the A-Z section where we can find details about a large number of medical conditions. Among actual businesses (small ones particularly) I like https://buttondown.com/ and https://kagi.com/ quite a bit.

That said (and this is off-topic for this article), the part of the web I enjoy most is where your website is indeed for you, the small web of personal websites. That part of the web was an important part of me growing up from my late teens into adulthood and it remains the part I enjoy most even now. I want this part of the web to remain healthy and vibrant for as long as possible.

My recent project named 'Wander Console' has gathered a growing community of independent website owners who host the console tool on their websites. You can try it out here: https://susam.net/wander/

It is a small, decentralised, self-hosted web console that lets visitors to your website explore interesting websites and pages recommended by a community of independent personal website owners. It is a bit like StumbleUpon, but fully decentralised. See here for more details: https://codeberg.org/susam/wander

Since I announced it six weeks ago, many people have copied this tool to their websites. This has helped the community grow and made the network richer with plenty of good web page recommendations from the small web of personal websites.

I recently developed a crawler to find out how many consoles are there. While it is difficult to determine exactly how many people have set up Wander Console on their websites due to the decentralised nature of the tool, the crawler found over 50 consoles recommending more than 1,400 web pages: https://susam.codeberg.page/wcn/

Creating personal websites, browsing others, viewing their source and learning from them have been an important part of growing up for me, so it brings me great joy to have contributed to this ecosystem with my own small project. I am especially glad that others like me have found it interesting and that a community has formed around it.

Hello HN!

Wander is a small, decentralised, self-hosted web console that lets visitors explore interesting personal websites and pages from the small web recommended by a community of independent personal website owners. It was first announced here on HN:

https://news.ycombinator.com/item?id=47422759 (370 points, 89 comments)

Since its initial announcement five weeks ago, more than 50 Wander consoles with over 1450 page recommendations have appeared across various personal websites. I wrote a small crawler that traverses this network of consoles and publishes a list of all known consoles along with the websites and pages they recommend. This post links to the output of that crawler.

I once saw a man with a notebook and pencil drawing these kinds of diagrams, at the time I saw them as graph theory.

I have been engaged in some work on s-arc transitive graphs in algebraic graph theory. You'd be surprised how rarely I have to draw an actual graph. Most of the time my work involves reasoning about group actions, automorphisms, arc-stabilisers, etc.

For anyone curious what this looks like in practice, I have some brief notes here: <https://susam.net/26c.html#algebraic-graph-theory>. They do not cover the specific results on s-arc-transitivity I have been working on but they give a flavour of the area. A large part of graph theory proceeds without ever needing to draw specific graphs.

A few years ago, when I wrote my own Invaders-like game [1], I was quite unhappy with the rendering quality of the HTML Canvas fillText() method. The antialiasing introduced multiple shades of green, whereas I wanted to render the text in a solid monochrome green while the glyphs retained their crisp, jagged edges. Although `canvas { image-rendering: pixelated }` improved the crispness and jaggedness, it could not entirely eliminate the multiple shades of green.

I finally decided to take the matter into my own hands. I looked for IBM PC OEM fonts [2] and similar ones [3], stored the bitmaps as integer arrays within my code [2], and used them to render each character cell by cell. I am very happy with the results.

It was a childhood dream of mine to write a game like this, but I did not have sufficient access to computers as a child. So I could fulfil this dream only as an adult, a few years ago. The implementation is very simple, and everything on the canvas, including the text, is drawn using fillRect().

By the way, if you happen to do something similar, I have made all the bitmaps available as integer arrays in a separate, standalone project [5].

[1] https://susam.net/invaders.html

[2] https://int10h.org/oldschool-pc-fonts/fontlist/

[3] https://www.dafont.com/modern-dos.font

[4] https://codeberg.org/susam/invaders/src/branch/main/invaders...

[5] https://codeberg.org/susam/pcface#readme

Great to see another IndieWeb project on the HN front page. The more the merrier. At this point, it almost feels like we need a meta-directory to keep track of them all. For others like me who are fond of these projects, here are a few other directories and indices worth checking out:

https://blogroll.org/

https://blogs.hn/ (by @surprisetalk)

https://hnpwd.github.io/ (I am one of the maintainers)

https://indieblog.page/ (by @splitbrain)

https://kagi.com/smallweb/ (by @freediver)

https://marginalia-search.com/ (by @marginalia_nu)

https://minifeed.net/ (by @freetonik)

https://susam.net/wander/ (I developed this)

https://text.blogosphere.app/ (announced by @ramkarthikk on 'Show HN' yesterday)

https://wiby.me/

Much higher quality images are available on the NASA Image Library:

Dark Side of the Earth: https://www.nasa.gov/image-detail/amf-art002e000193/

Hello World: https://www.nasa.gov/image-detail/fd02_for-pao/

On images-assets.nasa.gov, we can find the 5567x3712 resolution versions of these pictures:

Dark Side of the Earth: https://images-assets.nasa.gov/image/art002e000193/art002e00...

Hello World: https://images-assets.nasa.gov/image/art002e000192/art002e00...