HNHacker News
TopNewBestAskShowJobs

jws

12,720 karma · joined January 18, 2008

submissionscomments
jws··on The benefits of “low tech” user interfaces
For a Tesla at least, you can use voice commands for the common functions and keep both hands on the wheel.

That said, people I know have a strange resistance to using voice commands with their cars and phones.

jws··on Useless Use of "dd" (2015)
dd lets you specify the write block size. This is essential when writing to 9 track tape. Everything is a byte stream… except for the things which are not.
jws··on Low-cost, battery-like device absorbs CO2 emissions while it charges
I think what they are suggesting is that you charge by feeding air, with its very low percentage of CO2. Then when you discharge you are releasing concentrated CO2 which you capture and do something responsible with.

So it is an electrical storage device which incidentally is a CO2 concentrator.

Responsible use of the CO2 might be as simple as dumping it and the waste heat into a greenhouse to grow vegetables.

jws··on 2022/23 worldwide grain consumption will exceed production [pdf]
My experience growing small patches of grain is that migrating sparrows and sleeping deer will mostly wipe you out. These are relatively insignificant depradations for large fields, but if you only have 40 square meters they can destroy it all.
jws··on I made a virtual bookshelf
More specifically, in desktop Safari the books curtsey but are behind the unmoved books and you can't really see their covers.
jws··on Ask HN: Why is the PDF format so inaccessible?
If you are generating documents you ignore all the stuff you don’t need. You are left with a sane dictionary based format with some optional compression. Ignore the compression until you feel the need to optimize. There is a bit of a complicated bit for random access where you need to remember and regurgitate the offset of various dictionaries. Beyond that it is just a bunch of drawing commands. Of course these are 20 year old memories and maybe the horror of part of it has burnt that from my memory.

I do agree that writing a reader would be brutal.

jws··on Ask HN: Why is the PDF format so inaccessible?
The PDF specification, hosted by Adobe, free for you to download… (pay attention, this is a big PDF) https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/p... Adobe specifically negotiated to make this freely available.

From the document:

This document you are now reading is a copy of the ISO 32000-1 standard. By agreement with ISO, Adobe Systems is allowed to offer this version of the ISO standard as a free PDF file on it's web site. It is not an official ISO document but the technical content is identical including the section numbering and page numbering.

I include that, so you can Google up a copy when the URL changes again. (Copy is disabled, I had to retype it. The misuse of "it's" is present in the original.)

As afar as I know, they have always posted the PDF format for free. ISO’s business model is different, they pay the bills by selling the documents.

For generating PDF, assuming you aren’t some sort of sociopath that wants to embed JavaScript or some custom plugin, then you can just drop back to 1.3 or so and deal with a simpler spec. Use the parts you need, ignore the rest.

Some time around 2000 I wrote a PDF generator to do my type setting, so that was 1.2 or 1.3. Very straightforward format.

jws··on Apple says they're removing my game because it's more than 2 years old
Best case, check out your code, bump the version number, touch up your copyright date, hit "Run", do your testing¹, hit upload, have a sandwich, check it out in TestFlight, approve a release, maybe check a few boxes that say you aren't shipping super secret encryption technology to shunned nations.²

But usually after a few years Xcode will bitch at you about a lot of stuff, so maybe you raise the minimum OS version requirement, click "Fix it" on a lot of API respellings, find a couple that it can't automatically fix so you have to google that a bit. Then test and upload.

Maybe get in a fight with Xcode over your signing keys.

Sometimes something you were using gets deprecated and you have to use the newer replacement. That takes some coding.

It can get ugly if the 'owner' in the app store is not you or is an entity you no longer control. Then you have to get them involved to do the chain of trust signing.

If you produced it under contract, you may not be legally allowed to update it without a new contract.

␃

¹ do your testing is easy to say, but that could take an arbitrarily long time depending on how thorough you are. I expect this to be the dominant cost for most game updates.

² I pulled out one of my aging apps and just did all this to check, 10 minutes from "checkout" to "installed in TestFlight". The dreaded App Store review was 3 minutes. This isn't really a fair data point though, Xcode didn't suggest any source code changes so it was just bumping numbers and rebuilding.

jws··on Turning scrap copper into beautiful crystals
I suspend mine in jars of mineral oil.
jws··on Ask HN: Why isn't there a Google competitor emerging?
What would a competitor need to defy Google? – A billion users who have not already chosen a search engine.

I slightly better experience should get a larger portion of new users, but existing users do not say "Today I will develop a methodology to conduct a survey of internet search engines and select the best one for me."

At this point everyone has either chosen a search engine or had one chosen for them.

jws··on US schools can subscribe to an electric bus fleet at lower prices than diesel
The NHTSA recognizes that large busses are not cars and use a different solution.

Large school buses are heavier and distribute crash forces differently than passenger cars and light trucks do. Because of these differences, bus passengers experience much less crash force than those in passenger cars, light trucks, and vans.

NHTSA decided the best way to provide crash protection to passengers of large school buses is through a concept called “compartmentalization.” This requires that the interior of large buses protect children without them needing to buckle up. Through compartmentalization, children are protected from crashes by strong, closely-spaced seats that have energy-absorbing seat backs.

Statistics bear this out, taking a school bus to school is about 70 times more likely to deliver a student safely. In this context, 70 is huge.

jws··on AEG combi microwave unusable after update: device thinks it is a steam oven
A model number search reveals that it can be controlled by Google voice commands and there is an app which presumably does something.

It is a high end (costs 12x what I paid for my last microwave) with browning elements. If that is the device you cook with you are probably wanting more out a microwave than a single big red button that says “+30 seconds” on the front. Programming your defrost, cook, and browning cycle is probably nicer on an app.

jws··on Apple M1 Ultra Meanings and Consequences
Also, the style of that segment was a continuous monologue but changing speakers on each sentence. The speakers all had very similar voices, so it sounded very much like a single speaker. It was an interesting effect, though we lost the message because we started discussing whether they were processing the voices to be more similar or if Apple is just big enough to say to their customers “We need a female developer, camera ready, and her voice needs to sound like this.” and get 6 hits.
jws··on Lawn mowing frequency affects bee abundance and diversity (2018)
Nitrogen. Clover can fix its own nitrogen so the game gets tilted in its favor when other plants are struggling for nitrogen.
jws··on Walgreens replaced some fridge doors with screens, and some shoppers hate it
I agree these are a travesty no consumer wants, except I notice they do have a braille plaque and a button with a little grill. I presume they will speak their contents to you if you are vision impaired.

That might be nice. So, one redeeming feature.

jws··on The case for induction cooking
My vent is about 5 feet above the stove. We had to build a little soffit to get it just within code regulations. It has a huge blower that is located in a small attic space about 20 feet away. 100% recommend! You can’t hear it at all and you can watch all the vapor and smoke from the stove waft right up and away into the unit.

The remote eats a pair of CR2450 cells every three months, so that could have been done better.

jws··on The case for induction cooking
You made me look it up. Methane has no smell, so they add an odorant. Usually these contain sulfur, so there will be some amount of sulfur dioxide in the combustion products. Sulfur levels as limited to 70ppb, and are typically around 7ppb. This compares to a natural atmospheric level of sulfur dioxide at 1ppb. So unless you are breathing something like 10% combustion product the contribution is negligible.

The rest of the odor molecule is hyrdrogen, carbon, and oxygen, so likely goes to water and carbon dioxide or monoxide.

jws··on M1 Ultra Geekbench Score
The thermals suggest no. Twice the CPU heat is probably not in the current MacBook Pro design.
jws··on Apple Mac Studio
The dialog around unveiling the Ultra had a “one final member of M1” vibe to it. I think that is the end for M1. The next cpu bumps will be M2s.

Also I wonder about fabrication nodes. The iPhone SE is going to take a lot of dies and keep that fan very busy. M1 is on something else, but it isn’t going to free the A15 fab for other customers.

I expect M2 is on a different process.

jws··on Buffet – An All-inclusive Buffer for C
The layout of a bit field in C is implementation defined. That makes them not a great choice for interfacing with hardware registers/descriptors or interoperating with binary file formats. (unless you are fine welding yourself to a specific set of compilers)

In applications like this where you really don't care about the layout of bits, they are just fine.

However… there is a violation in this library. As nrdvana points out in another comment, the "uint8_t ssolen:4" and the "uint8_t type : 2" fields are assumed to layout on top of each other using the same bits of the same byte, but this isn't really guaranteed by the C standard, though I think any sane compiler will do it.

jws··on Buffet – An All-inclusive Buffer for C
A very well thought out set of functionality. It covers a lot of ground. In particular:

• The reference counting of the bft_view can simplify reasoning in a C program.

• The cheap bft_view may keep programmers from copying as much data. It's easy to fall into a "copy everything" mode in C since that's what the runtime library provides and consumes. Working with slices reduces your cache pressure and is just generally faster.

• Allocating only blocks sized by a power of two is potentially memory wasting. The exponent for the size has a range of 0...255, but it only needs to get to 2^32 since that's the largest allowed length. I suspect there is some clever base between 1 and 2 which is trivial to compute the exponent and inverse in integer arithmetic. (Or similarly shaped function, it doesn't have to be an exponential, just something that grows about like one.) This would provide better granularity.

• Alternatively, some bits could be harvested from 'cap' to say how the memory should be freed, usually it is 'free', but one could imaging adding a few lines to support 'mmap', then the release becomes 'munmap'.

• Now that we have imagined up mmap capability, this looks like a very nice way to handle many kinds of data files which are not character oriented streams processed sequentially.

jws··on Buffet – An All-inclusive Buffer for C
Definitely low bits:

#define DATA(buf) ((char*)((intptr_t)((buf)->data) << BFT_TYPE_BITS))

Older programmers tend to raise an eyebrow at added computation like the "<<", but here in 2022 we need to remember that we are about to do a memory access and even if it's in L1 cache, that "<<" is basically free by comparison.

jws··on iCloud+ custom email domains should be better
That's what stopped me from using iCloud+ for the family email domain. It was the easy winner except for that.
jws··on Cloudflare to acquire Area 1 Security for $162M
Did you just juxtapose "private" and "Gmail"?

I used to have domains whose MX records went to google, but I had no expectation that the mail would be private. "Just works" and "free" were powerful selling points. I was ok letting them analyze my email in exchange for providing the service.

jws··on Text Rendering Hates You (2019)
I miss monochrome for programming. I had a 19” portrait monochrome CRT back in the day. Still maybe the best monitor I ever used. Never had a color fringing issue!
jws··on Text Rendering Hates You (2019)
There was a time when people ditched their perfectly fine 8 bit LUT based graphic cards and computers for 24 bit true color ones. It made life much easier for developers. All the effort to manage a color palette within a program, and to try to do something reasonable to support more than one program on the screen at a time just went away, not to mention the choices around dithering algorithms. It was glorious.

Roughly speaking, we’ve had 25 years to get sub pixel vector glyph rendering right, and it still is consistently wrong in many places.

It is a clever hack whose time has come and gone, I will not miss:

- fails miserably if you rotate your screen.

- only works for horizontal text. Anything rendered at differently angles looks different.

- forces a different spatial resolution for brightness and color, in one axis but not the other.

- sensitive to the monitor’s physical subpixel layout. You really can’t rely on an end user to tell you the right answer after they plug in a monitor.

- color fringing is a thing, more so for people with better eyesight. Some people see it, some don’t.

- difficult to reconcile with high dpi printing to make sure what you see on the screen approximates what you are going to get.

- it’s hard to know if the person you send this too will see the same thing you do. Different platforms, renderer, and hardware means they may see something differently.

So, it was pretty good for horizontal text on a monitor where you knew the subpixel pixel order and you got everything right so it approximated the eventual printed output. But its time has passed.

Hand down that monitor to someone’s video game or media watching needs and if you deal with text, get a high dpi monitor.

jws··on Tesla FSD Beta Lunges Toward Bicyclist
As a driver in the beta program, unless there is a lot of clearance I generally take over when passing a bike. Not so much because I don't trust the software, but because I don't trust the bicyclist! Around here none of them signal. They appear to assume that you recognized the 250ms glance under their armpit they made two seconds ago as a formal and legally binding declaration of intent and just swerve across the non-bike lane to make their left while running the stop sign. (Old suburban smallish grid blocks with >50% stop sign coverage, so I guess it makes them grumpy.)

Also, a plea to other drivers… Please! Stay off the bumper of Teslas. The software is generally cautious and gets spooked. It rapidly decelerates a couple miles per hour in preparation for a full on evasion, which wouldn't be a problem for a driver with a sane following distance, but if you are close enough to angrily look down at my speed limit driving head through my glass roof things could get a little awkward.

jws··on Finding the average of two unsigned integers without overflow
For C at least, the spec says that unsigned addition is modulo 2^64 (or 32 or 16 or whatever) so, imagine you had an 8 bit unsigned, 128+128 gives you 0. Divided by 2 is 0. That’s the right answer by the language specification. The trick is to get 128.
jws··on Finding the average of two unsigned integers without overflow
Your compiler will take care of that. Leave the division for the humans to read.
jws··on Finding the average of two unsigned integers without overflow
Absolutely the same thing I did. I even had the low bit logic worked out by the time I scrolled the article down and saw the patented line. Clearly we have both had miraculous enlightenment because legally this is “not obvious”.
← PreviousPage 6 of 34Next →