HNHacker News
TopNewBestAskShowJobs

palsecam

889 karma · joined February 7, 2008

https://paul.fragara.com/
submissionscomments
palsecam··on Messing with scraper bots
Yes @ 444 (https://http.cat/status/444). That’s indeed the lightest-weight option.

> You have an image on your error page, which some crappy bots will download over and over again.

Most bots won’t download subresources (almost none of them do, actually). The HTML page itself is lean (475 bytes); the image is an Easter egg for humans ;-) Moreover, I use a caching CDN (Cloudflare).

palsecam··on Messing with scraper bots
I do something quite similar with nginx:

  # Nothing to hack around here, I’m just a teapot:
  location ~* \.(?:php|aspx?|jsp|dll|sql|bak)$ { 
      return 418; 
  }
  error_page 418 /418.html;
No hard block, instead reply to bots the funny HTTP 418 code (https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/...). That makes filtering logs easier.

Live example: https://FreeSolitaire.win/wp-login.php (NB: /wp-login.php is WordPress login URL, and it’s commonly blindly requested by bots searching for weak WordPress installs.)

palsecam··on XSLT removal will break multiple government and regulatory sites
Exactly. The Atom feed of my website declares an XSLT stylesheet which transforms it to HTML. That way it can be served directly to, and renders prettily by, a web browser (see https://paul.fragara.com/feed.xml). For the curious, the XLST can be found here: https://gitlab.com/PaulCapron/paul.fragara.com/-/blob/master...

Btw, you can also apply an XSLT sheet to an XML document using standard JavaScript: https://developer.mozilla.org/en-US/docs/Web/API/XSLTProcess...

palsecam··on Tor: How a military project became a lifeline for privacy
Btw, a Tor relay can be relatively lightweight. I run one on a $5/mo VPS (which does many other things). You need 1 GiB of RAM, but a single basic CPU core largely suffices. My relay sends/receives ~150 GiB of traffic per day (~15 Mbits/s). It’s not an exit node, so no legal worries.

Here’s my torrc:

  SocksPort  0
  ExitRelay  0

  ORPort     NNNN
  DirPort    NNNN

  Nickname     X
  ContactInfo  X@X.com

  RelayBandwidthRate    80 megabits
  RelayBandwidthBurst  120 megabits

  MaxMemInQueues  384 megabytes

  AvoidDiskWrites  1
  HardwareAccel    1
  NoExec           1
  NumCPUs          1
Here’s my override config for systemd (Ubuntu 24.04):

  $ sudo systemctl edit tor@default
  [Service]
  Nice=15
  CPUAffinity=0
  CPUWeight=60
  StartupCPUWeight=6
  IOWeight=60
  TimerSlackNSec=100us

  MemoryMax=896M
  MemoryHigh=800M
  OOMScoreAdjust=1000

  LimitAS=2G
  LimitNPROC=512
  LimitNOFILE=10240

  PrivateDevices=true
  ProtectSystem=true
  ProtectHome=true
palsecam··on XSLT: A Precision Tool for the Future of Structured Transformation
Oh but yes, Firefox (and Chrome) do support XSLT natively! See https://paul.fragara.com/feed.xml as an example (the Atom feed of my website, styled with XSLT).

FTR, there’s also XSLTProcessor (https://developer.mozilla.org/en-US/docs/Web/API/XSLTProcess...) available from Javascript in the browser. I use that on my homepage, to fetch and transform-to-HTML said Atom feed, then embed it:

  const atom = new XMLHttpRequest, xslt = new XMLHttpRequest;
  atom.open("GET", "feed.xml"); xslt.open("GET", "atom2html.xsl");
  atom.onload = xslt.onload = function() {
    if (atom.readyState !== 4 || xslt.readyState !== 4) return;
    const proc = new XSLTProcessor;
    proc.importStylesheet(xslt.responseXML);
    const frag = proc.transformToFragment(atom.responseXML, document);
    document.getElementById("feed").appendChild(frag.querySelector("[role='feed']"));
  };
  atom.send(); xslt.send();
Server-side, I’ve leveraged XSLT (2.0) in the build process of another website, to slightly transform (X)HTML pages before publishing (canonicalize URLs, embed JS & CSS directly in the page, etc.): https://github.com/PaulCapron/pwa2uwp/blob/master/postprod.x...
palsecam··on Buffett to step down following six-decade run atop Berkshire
> and directly running it? How much more personally involved can you get?

Ms. Farmer is the CEO of BNSF Railway[1], she is the one “directly running it”.

Moreover, Berkshire/Buffet is notorious for _not_ micro-managing, for letting its subsidiaires enjoy greater autonomy than they would in an usual conglomerate.

1: https://en.wikipedia.org/wiki/Kathryn_Farmer

palsecam··on AI Horseless Carriages
> My pet theory is the BigCo's are walking a tightrope of model safety and are intentionally incorporating some uncanny valley into their products, since if people really knew that AI could "talk like Pete" they would get uneasy. The cognitive dissonance doesn't kick in when a bot talks like a drone from HR instead of a real person.

FTR, Bruce Schneier (famed cryptologist) is advocating for such an approach:

We have a simple proposal: all talking AIs and robots should use a ring modulator. In the mid-twentieth century, before it was easy to create actual robotic-sounding speech synthetically, ring modulators were used to make actors’ voices sound robotic. Over the last few decades, we have become accustomed to robotic voices, simply because text-to-speech systems were good enough to produce intelligible speech that was not human-like in its sound. Now we can use that same technology to make robotic speech that is indistinguishable from human sound robotic again. — https://www.schneier.com/blog/archives/2025/02/ais-and-robot...

palsecam··on Toulouse University wants to host US researchers whose work is at risk
Nice username btw ;-) https://en.wikipedia.org/wiki/Oulipo
palsecam··on Toulouse University wants to host US researchers whose work is at risk
Ironic indeed.

For ref: https://en.wikipedia.org/wiki/Operation_Paperclip (I didn’t get it at first)

The Operation Paperclip was a secret United States intelligence program in which more than 1,600 German scientists, engineers, and technicians were taken from former Nazi Germany to the US for government employment after the end of World War II in Europe, between 1945 and 1959; several were confirmed to be former members of the Nazi Party, including the SS or the SA.

palsecam··on Toulouse University wants to host US researchers whose work is at risk
“Reverse brain drain”, so to say.

Well, good for Europe. Like it was good for the USA when (jewish) scientists emigrated there in the 30–40s.

palsecam··on Deregulation in Argentina: Milei Takes "Deep Chainsaw" to Bureaucracy
You have a point, for sure; the _whole_ previous century (couple centuries, even) of Japan economical history is one-of-a-kind (as is Argentina’s).

However, wtr. “lost decades are quite easy to understand with conventional economics”: that’s more debatable. For example, stagflation is common(ly explained), but stag-deflation (as in Japan) is more unusual and has weirder effects. The US subprime crisis was also a real estate bubble (which, here also, rippled to the financial markets), but its burst had quite different fallouts.

Anyway, thanks for adding to the discussion, and disclaimer: IANAE (I Am Not An Economist — thanks God ^^)

palsecam··on Deregulation in Argentina: Milei Takes "Deep Chainsaw" to Bureaucracy
The “Lost Decades” (1990–2010), during which Japan GDP hardly grew and deflation occured: https://en.wikipedia.org/wiki/Lost_Decades
palsecam··on France rejects backdoor mandate
> I'm positively surprised by some deputies remarks.

Not personally surprised, but I agree, they talk sense and understand the matter quite well. Thanks for finding and sharing the debate video, btw!

> Retailleau is either totally incompetent technically, with his advisors as well, or is a liar.

Sadly, gotta agree here too. M. Retailleau seems off the mark. He looks (to me) like he speaking in good faith tho, and that he “just” doesn’t get it.

Nevertheless, he has a point when he mentions Apple and CSAM (Child Sexual Abuse Material). Apple has shown that using homomorphic encryption could be 1) actually practical, and 2) helpful on such matters. Cf. https://www.apple.com/child-safety/pdf/CSAM_Detection_Techni... & https://machinelearning.apple.com/research/homomorphic-encry... & https://repositorio.fgv.br/items/047aca31-ccdc-45bd-a7d3-6c0....

palsecam··on France rejects backdoor mandate
Vladimir Arnol’d (the famous Russian mathematician) touches on that subject in his essay « Sur l’éducation mathématique » <https://smf.emath.fr/system/files/filepdf/Gaz-78-Arnold.pdf> (in French; Arnol’d also taught in France).

According to him, mathematical teaching has become overly abstract, leading to students being disgusted by maths, seeing it as disconnected from reality. Some of these students then end up being ministers… Original quote:

« Comme de telles mathématiques scolastiques, séparées de la physique, ne sont adaptées ni à l’enseignement, ni à aucune application éventuelle à d’autres sciences, les mathématiciens se sont fait haïr des lycéens (dont certains ensuite sont devenus ministres) et des utilisateurs. »

palsecam··on Learn You Some Erlang for Great Good (2013)
(2015)
palsecam··on Solitaire
I just removed interstital ads.
palsecam··on Solitaire
Thanks for letting me know. That’s not my choice but AdSense. However, I can manually disable ads like this one, I’ll look into it.
palsecam··on Solitaire
I’m glad you like it :-)
palsecam··on Solitaire
Thank you!
palsecam··on Solitaire
Ah, thanks for letting me know!

I may have found a fix. I previously applied CSS `overscroll-behavior: contain` on <body>, it seems it also needs to be set on <html> (see https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-... and https://stackoverflow.com/a/60565197).

I pushed that (supposed) fix, please let me know if that solves the issue for you (you may need to “refresh” by launching-quitting-relaunching the app.)

If not, please tell me what Android version and browser you are using, so that I can investigate more.

palsecam··on Solitaire
Using a lightweight PWA (progressive web app) is also an option: https://FreeSolitaire.win (self-plug).

Doesn’t generate unwinnable games[1] & detects dead-ends. Works offline after the first visit. No ads until game over, and they aren’t obtrusive.

Often lauded on HN, e.g. https://news.ycombinator.com/item?id=41972075 or https://news.ycombinator.com/item?id=42031052.

1: The probability that a random deal is unwinnable is ~20%. Wikipedia has a section on the subject: https://en.wikipedia.org/wiki/Klondike_(solitaire)#Probabili...

palsecam··on Show HN: Bracket City – A daily, exploded (?) crossword puzzle
That’s a fun variation of crosswords! I like it.

Btw, a self-plug, for the polyglots out-there: https://paul.fragara.com/cw.html Poly-alphabets crosswords, mixing Latin and Cyrillic letters!

palsecam··on Hitting the Jackpot: The Birth of the Monte Carlo Method – LANL (2023)
They are missing (for me too). Unfortunately, they are also missing on the Internet Archive (https://web.archive.org/web/*/https://www.lanl.gov/media/pub...) :-(
palsecam··on Hitting the Jackpot: The Birth of the Monte Carlo Method – LANL (2023)
> While playing solitaire to while away the time during rest, Ulam asked himself a straightforward question: what are the chances that a hand laid out with 52 cards will come out successfully? It is a deceptively challenging problem—there are around 8 × 10^67 ways to sort a deck of cards (a number approaching the estimated number of atoms in the observable universe). He wondered if instead of applying pure combinatorial calculations, which would be monstrously difficult, he could simply lay out the cards one hundred times and count the number of successful plays. Implicit was the assumption that each play started with randomized conditions.

Indeed, the best “results”, to this day, are still approximations based on brute-forcing a huge number of deals (aka, using Monte-Carlo.)

“The probability of being able to win a game of Klondike [Solitaire] with best-possible play is not known, and the inability of theoreticians to precisely calculate these odds has been referred to by mathematician Persi Diaconis as "one of the embarrassments of applied probability"” — https://en.wikipedia.org/wiki/Klondike_(solitaire)#Probabili...

“Here we show that a single general purpose Artificial Intelligence program, called “Solvitaire”, can be used to determine the winnability percentage of 45 different single-player card games with a 95% confidence interval of ± 0.1% or better. For example, we report the winnability of Klondike as 81.956% ± 0.096%” — https://arxiv.org/pdf/1906.12314v3 (2019)

More on HN here: https://news.ycombinator.com/item?id=42372083

palsecam··on Ask HN: Those making $500/month on side projects in 2024 – Show and tell
ZA (South Africa) is 15–20% of revenue.
palsecam··on A visual proof that a^2 – b^2 = (a + b)(a – b)
There is https://en.wikipedia.org/wiki/Proof_without_words / https://commons.wikimedia.org/wiki/Category:Proof_without_wo...
palsecam··on How God Plays Chess (2018)
Many thanks for that pointer!
palsecam··on Ask HN: Those making $500/month on side projects in 2024 – Show and tell
> I wish I could double-click a card to automatically move it up to its respective suit stack (if possible)

Oh but you can!

But, as I said recently (in an e-mail to another player): “Someone once told me about how ‘double-click is finicky on Windows/Chrome’. But now you are two encountering the same issue, and not on the same OS/browser combo. So it looks like problem is in the game. Thanks, I shall look into it.”

> able to move a card from its suit stack back onto the board […] Either way, I like that

That’s on purpose, glad you like it! It can help you get unstuck sometimes.

palsecam··on Ask HN: Those making $500/month on side projects in 2024 – Show and tell
Yes, revenue is ads-based (and a few donations). I use Google AdSense. ~40% of players use an ad-blocker; I let them block ads, I don’t play cat-and-mouse.
palsecam··on Ask HN: Those making $500/month on side projects in 2024 – Show and tell
Thanks for the feedback! Yes, as mentioned in this thread (https://news.ycombinator.com/item?id=42382673), I should do something about the cards design, which is currently too rough.
Page 1 of 6Next →