News for hackers. Stuff that matters.

cjm42

Re:Dates That Don't Exist (2015) on Tuesday August 04, 2026 @06:47PM (#49176322)
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.

Re:Dates That Don't Exist (2015) on Tuesday August 04, 2026 @06:15PM (#49175964)
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")
Re:A Road to Lisp: Why Lisp on Thursday July 09, 2026 @04:58PM (#48852281)
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.

Re:Show HN: Echo, an iOS SSH+mosh client built on Ghostty on Wednesday February 18, 2026 @04:52PM (#47066965)
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.
Re:JetKVM – Control any computer remotely on Monday October 27, 2025 @02:59PM (#45724937)
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.
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/

Re:The Windows Subsystem for Linux is now open source on Monday May 19, 2025 @05:03PM (#44034830)
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...

Re:System Intiative is generally available on Wednesday September 25, 2024 @01:04PM (#41649497)
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.
Re:Purism Domain Puri.sm Suspended? on Wednesday August 28, 2024 @05:53PM (#41384833)
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.
Re:Base64 Encoding, Explained on Monday October 23, 2023 @03:25PM (#37990369)
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.
Re:Raku: A Language for Gremlins on Monday August 07, 2023 @05:53PM (#37041469)
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.

Re:Ask HN: What's the coolest physical thing you've made? on Monday August 07, 2023 @12:58PM (#37037188)
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.

redhat-release is a symlink to /etc/centos-release:

  $ cat /etc/redhat-release 
  CentOS Linux release 7.5.1804 (Core)
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
Re:One decade later, GNOME still sucks on Wednesday April 26, 2023 @05:31PM (#35720285)
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.

Re:Unicode Roman Numerals and Screen Readers on Wednesday March 15, 2023 @03:30PM (#35173526)
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.)
Re:Is Google’s 20-year search dominance about to end? on Monday February 13, 2023 @04:16PM (#34780663)
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. :-)

Re:Ask HN: Whatever Happened To *Free*lancing? on Friday February 10, 2023 @10:54AM (#34741305)
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)
Re:Is Google’s 20-year search dominance about to end? on Wednesday February 08, 2023 @05:50PM (#34716717)
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.

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.
Re:Ask HN: What game do you wish existed? on Wednesday May 25, 2022 @04:23PM (#31510036)
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...

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...

Re:Using www-authenticate for user authentication on Friday February 18, 2022 @03:46PM (#30390838)
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.
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".
Re:The reports of Perl’s death have been greatly exaggerated on Wednesday October 20, 2021 @11:46AM (#28932136)
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.
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.

Re:iPad Pro M1 on Tuesday April 20, 2021 @04:28PM (#26881137)
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.
Re:International Backup Awareness Day (2009) on Wednesday March 31, 2021 @10:49AM (#26648026)
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

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.

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.

Older »