Better HN
topnewbestaskshowjobs
Log inSign up

cjm42

116 karma · joined Apr 2, 2019 (7y ago) · 41 submissions

Submissions

comment 3mo ago · link · parent

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.

comment 3mo ago · link · parent

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")

comment 4mo ago · link · parent

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.

comment 9mo ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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/

comment 1y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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

  $ cat /etc/redhat-release 
  CentOS Linux release 7.5.1804 (Core)

comment 3y ago · link · parent

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

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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

comment 3y ago · link · parent

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

comment 3y ago · link · parent

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)

comment 3y ago · link · parent

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.

comment 4y ago · link · parent

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.

comment 4y ago · link · parent

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

comment 4y ago · link · parent

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

comment 4y ago · link · parent

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.

comment 4y ago · link · parent

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

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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

comment 5y ago · link · parent

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.

12