HNHacker News
TopNewBestAskShowJobs

cjm42

116 karma · joined April 2, 2019

submissionscomments
cjm42··on Dates That Don't Exist (2015)
As da_chicken pointed out, it's also a problem if you want to record a date like February 29, 1700, which is a perfectly valid date in the Julian calendar but simply doesn't exist in the proleptic Gregorian calendar.

Dates are messy.

cjm42··on Dates That Don't Exist (2015)
Which is one of the reasons that the Perl DateTime library just implements the proleptic Gregorian calendar (i.e. "let's just pretend we've always used Gregorian and the Julian calendar never existed")
cjm42··on A road to Lisp: Why Lisp
This is the classic example of why you should always set the foreground color when changing the background color. Otherwise you end up with <code> blocks that are black-on-black. It probably works fine if your browser is in dark mode.

A workaround is to open one of the code elements in the browser's debugger and add color: white to the :not(pre) > code style.

cjm42··on Show HN: Echo, an iOS SSH+mosh client built on Ghostty
Does it allow truly persistent mosh connections? I can't remember which iOS client it was, but I've used one which forgot I was connected if I left the app for long enough. The mosh process was still running on the server, but my iPad had forgotten how to talk to it.
cjm42··on JetKVM – Control any computer remotely
I believe the primary use-case for devices like this is debugging "Why isn't this server rebooting?" without driving to the datacenter. Good luck figuring that out with AnyDesk or SSH.
cjm42··on Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
I've had decent results with html-pdf-chrome[0], which automates printing to PDF from Chromium or Chrome.

[0] https://github.com/westy92/html-pdf-chrome/

cjm42··on The Windows Subsystem for Linux is now open source
The most reliable fix is to get Windows to use UTC for the hardware clock, which is usually the default on Linux. (It's more reliable because it means the hardware clock doesn't need to be adjusted when DST begins or ends, so there's no need for the OSs to cooperate on that.)

https://wiki.archlinux.org/title/System_time#UTC_in_Microsof...

cjm42··on System Intiative is generally available
Not to me. It says "System Initiative is an Intuitive, Powerful, and Collaborative replacement for Infrastructure as Code" but I still don't understand what it does or why I would want to use it.
cjm42··on Purism Domain Puri.sm Suspended?
https://purismspc.com (the backup domain they registered after the 2018 outage) is sort of working. It responds, but links all go to puri.sm so they don't work, stylesheets don't load, etc.
cjm42··on Base64 Encoding, Explained
He meant approximately half a bit. Base64 uses 64 characters, which means 6 bits per character. 50 characters gives you about 5.64 bits per character. Unlike Base64's 3-bytes-equals-4-characters, that never comes out evenly.
cjm42··on Raku: A language for gremlins
Let's face it, the Perl 5/PCRE regex syntax is atrocious. The only reason it exists is that (? was a syntax error in earlier regex syntaxes, so it could be redefined to mean anything.

Raku is an attempt to design a sane regular expression language from first principles, now that we know what we want them to be able to express. The alternative is being stuck with (?:this|(?>or that)) for the next 30 years.

cjm42··on Ask HN: What's the coolest physical thing you've made?
I made a silverware holder custom-fit to my silverware.

I found a half-inch thick HDPE cutting board at a restaurant supply store, cut it to fit my drawer, then drilled holes in it and inserted short wooden dowels to hold the stacks of silverware in place. To position the dowels, I wrapped a nail in tape to match the diameter of the dowels, then placed my silverware on the board, slid the nail up next to it, and gave it a tap to mark the board where the holes needed to be drilled.

It worked really well and was quite easy to do. I highly recommend it.

cjm42··on SUSE is forking RHEL
redhat-release is a symlink to /etc/centos-release:

  $ cat /etc/redhat-release 
  CentOS Linux release 7.5.1804 (Core)
cjm42··on Joplin – An open-source note taking and to-do application with synchronisation
I've been using Joplin for a while now, syncing via Nextcloud.

One tip: I set up a cronjob to export into a Git repository so I have a complete history. The core of the script is:

  joplin sync
  joplin export --format=raw "$tmpdir"
  # Rsync that directory to the repository
  # This deletes files that no longer exist in the current export.
  /usr/bin/rsync -a --quiet --delete --exclude=.git "$tmpdir/" "./"
  /usr/bin/git add -A
cjm42··on One decade later, GNOME still sucks
MATE is a GNOME 2 fork created to continue its development without the radical turn of GNOME 3.

Cinnamon is actually a GNOME 3 fork created to turn it back into a more traditional desktop environment.

XFCE is not a fork of any version of GNOME, although it does have a UI similar to GNOME 2 and is based on GTK.

Personally, I switched to XFCE back when GNOME 3 came out, and have been happy with it.

cjm42··on Unicode Roman Numerals and Screen Readers
My browser can't even read that. It renders as "In Hamlet, Act [2163], Scene [2168]..." (where [2163] means a small box with those 4 digits). What font do I need to install to be able to read that as "In Hamlet, Act IV, Scene IX..."? (I'm using Firefox on Arch Linux.)
cjm42··on Is Google’s 20-year search dominance about to end?
Just for fun, I tried again today with a new chat:

Q: Who was the first US president whose surname begins with "R"?

A: The first US president whose surname begins with the letter "R" was John Quincy Adams.

Q: Adams does not begin with "R"

A: I apologize for the mistake. The first US president whose surname begins with the letter "R" was Rutherford B. Hayes.

Q: Hayes does not begin with "R"

A: My apologies for the mistake, the first US president whose surname begins with the letter "R" was James A. Garfield.

Q: Garfield does not begin with "R"

A: I apologize for the error. The first US president whose surname begins with the letter "R" was Richard Nixon.

Q: Nixon does not begin with "R"

A: I apologize for the mistake. The first US president whose surname begins with the letter "R" was George Washington.

Q: Washington does not begin with "R"

A: I apologize for the mistake. The first US president whose surname begins with the letter "R" was Franklin D. Roosevelt.

Q: Wasn't Theodore Roosevelt president before FDR?

A: Yes, you are correct. Theodore Roosevelt was the 26th President of the United States, serving from 1901 to 1909. He was the first US president whose surname begins with the letter "R." Thank you for pointing out the error in my previous answer.

So at least it's capable of parroting the correct answer after you deliver it. :-)

cjm42··on Ask HN: Whatever Happened To Freelancing?
It is: Contractors' Handbook: The Expert Guide for UK Contractors and Freelancers (3rd Edition; 13 Nov. 2017) by Dave Chaplin (ISBN-10: ‎1527216039; ISBN-13: 978-1527216037)
cjm42··on Is Google’s 20-year search dominance about to end?
The problem is that if you don't already know the answer, it's hard to tell the difference between ChatGPT giving you the correct information and ChatGPT authoritatively spouting the wrong information.

Here's a chat I had today with ChatGPT:

Q: Who was the first US president with a last name starting with R?

A: Rutherford B. Hayes was the first US president with a last name starting with "R."

Q: no, a surname starting with R

A: Rutherford B. Hayes was the first U.S. President with a surname starting with "R."

Q: no, Rutherford is his first name

A: The first US president with a surname starting with "R" was Richard Nixon.

Q: no, Richard is his first name

A: The first U.S. President with a surname starting with "R" was James A. Garfield.

Here it's obvious ChatGPT is spouting nonsense, but in other cases it may not be.

cjm42··on Ask HN: Which Linux terminal emulator do you prefer and why?
xfce4-terminal, because I switched to Xfce when GNOME went on their "reinvent the UI" trek. I was happy with the UI I already had, thanks very much.
cjm42··on Ask HN: What game do you wish existed?
The Babylon 5 space combat game that was cancelled late in development. Think Wing Commander, but in the Babylon 5 universe as a Starfury pilot.

https://babylon5.fandom.com/wiki/Babylon_5:_Into_the_Fire_(G...

cjm42··on US Senate votes unanimously to make daylight savings time permanent
The bill would eliminate Daylight Time and redefine Eastern Standard Time etc. to be the same offset they currently are during daylight time.

https://www.congress.gov/bill/117th-congress/senate-bill/623...

cjm42··on Using www-authenticate for user authentication
The big problem with this is that mobile Safari on iOS won't autofill passwords for sites using WWW-Authenticate. It used to, but that feature got dropped years ago, which really ticks me off, as I regularly use a couple of sites that use it.
cjm42··on Ask HN: Twilio suspended account because someone sent us a fraud text
They could at least provide an indication when delivering the spam that "Twilio believes this message is spam and will block your account if you try to resend it".
cjm42··on The reports of Perl’s death have been greatly exaggerated
I believe https://metacpan.org/pod/PDL would be the closest Perl equivalent, but it's not my field and I haven't used it.
cjm42··on Frum – Fast and modern Ruby version manager written in Rust
That's the way I read it, although I don't understand why they're focusing on installation. That seems like choosing a car based on how long it takes to change the oil.

I'd be more interested in a benchmark of how much slower it is than having the right version of Ruby directly in your path, or versus rbenv shims.

cjm42··on iPad Pro M1
If I type "3 + 6 + 9" as fast as I can, then hit "=", I only get 18 about half the time. Sometimes I get 12, sometimes 15, occasionally something else. This is with a iPhone 11 Pro on iOS 14.4.2. It's ridiculous. I always hear the same number of clicks, though.
cjm42··on International Backup Awareness Day (2009)
I've always liked NearlyFreeSpeech.net's FAQ on "Should I make my own backups?" [0] which begins:

Yes. Assume that we are storing crates of sweaty dynamite on top of the servers that hold your important data and design your backup strategy accordingly.

[0] https://faq.nearlyfreespeech.net/q/backups

cjm42··on String length functions for single emoji characters evaluate to greater than 1
And if you try to say emoji.length, you'll get an error:

No such method 'length' for invocant of type 'Str'. Did you mean any of these: 'codes', 'chars'?

Because as the article points out, the "length" of a string is an ambiguous concept these days.

cjm42··on The CNAME of the Game: Large-scale Analysis of DNS-based Tracking Evasion
Yes, it would cause issues with hosting services that use CNAMES in the way they were intended. e.g www.example.com might be CNAMEd to example.bigwebhost.com so that bigwebhost can change the IP addresses used by example.com without having access to example.com's DNS. Your proposed change would make every site hosted by bigwebhost part of the same domain, potentially leaking cookies to each other.
Page 1 of 2Next →