* Posts by Bill Gray

332 publicly visible posts • joined 12 Aug 2014


HP exec says quiet part out loud when it comes to locking in print customers

Bill Gray

Re: Honestly....

> HP LaserJet 6MP

Friends of ours had one. They were Mac users; many years back, Apple decided nobody would be using something that old. They offered it to me; I used it up until it finally went to Hardware Heaven a year or two ago. Truly a workhorse.

The only other bit of HP hardware I have is an HP-15C. Our local recycling center has a "gift shop" if you have stuff somebody else might use, and somebody had left a 15C there, in excellent shape. I'd never have been able to afford one when I was a pimply youth.

But come to think of it, I've never purchased HP gear. And given the issues with the current stuff, it looks unlikely that I ever will.

Small but mighty, 9Front's 'Humanbiologics' is here for the truly curious

Bill Gray

Re: As I wrote about something else a month or so ago ...

I heard of someone local who couldn't/didn't want to cough up the money to be organically certified. He labelled his produce as "certifiably organic". Not the only case I've heard of; I think you have a good bit of company.

Musk tells advertisers to 'go f**k' themselves as $44B X gamble spirals into chaos

Bill Gray

Re: Delusional narcissist

> Just because he says he believes doesn't mean in private that he believes.

Admittedly quite possible, and I suspect many idiotic ideas espoused by our leaders are for public consumption. For example, you hear often about Republicans praising He-Who-Must-Not-Be-Named-While-Eating in public, then privately complaining about him. But from what I've read, it would appear that Mike Johnson is a true believer.

Bill Gray

Re: Delusional narcissist

> But isn't Speaker just two sudden deaths away from becoming POTUS?

Which means we're currently looking at the possibility of President Mike Johnson. A man who believes the universe is 6000 years old, created on 23 Oct 4004 BC at 9:00 AM Garden of Eden time, and who would not stand out, intellectually, in the fish tank of a dentist's waiting room. It's hard to imagine there's an alternative to President Elon Musk who would be even worse, but you could argue that's what we have right now.

My mind upon considering the above -- >

Potential sat-bothering cannibal coronal mass ejection slams into Earth's atmo tonight

Bill Gray

And here in the northeastern US, it's raining. Not sure for what event El Reg ran this quite accurate assessment of the correlation of clouds with interesting astronomical events, but it's lined up with my experiences all too well.

On 2024 April 08, the path of a total solar eclipse will pass a couple hours' drive north of me. I am not inclined to believe in long-range weather forecasts of the "it will be raining on day X four months from now". But I might make an exception here.

Bank boss hated IT, loved the beach, was clueless about ports and politeness

Bill Gray

Re: Every single time

I'm writing this post on a laptop (Toshiba Satellite) with an RJ11 modem port and three USB ports. (Not that I've had occasion to use the former. I'm not even sure any current Linux would support it. I'm not sure what I'd use it for in 2023; it has an RJ45 port as well, and WiFi.)

Logitech's Wave Keys tries to bend ergonomics without breaking tradition

Bill Gray

Re: Ergonomic ...

Long-time Dvorak user here, since 1994. I don't think you could get a keyboard labelled in Dvorak at the time, so I learned to touch-type without looking at the keys. Even had a labelled keyboard been available, I sometimes have to use somebody else's machine with a xWERTx keyboard; I can switch their computer to Dvorak and type away happily. (Though I sometimes forget to switch it back, leading to a "why is my keyboard producing gibberish?" inquiry... fortunately, my wife and my mother, the usual inquirers, have learned how to switch back to their favored QWERTY layout.)

Another minor advantage : I was looking around for a decent second-hand ergonomic keyboard, and saw some for sale with Korean layouts. Not an obstacle if you aren't looking at the keys anyway.

BOFH: Groundbreaking discovery or patently obvious trolling?

Bill Gray

I think if you read the first of phuzz's links, you'll see that (given certain idealized assumptions and a modest amount of handwaving) you can minimize the component count by choosing a base close to e. Given the currently available integers, that would make ternary optimal.

And if you live in a jurisdiction where the Biblical value of π = 3 is accepted, then ternary has yet another advantage.

Will anybody save Linux on Itanium? Absolutely not

Bill Gray

How do slanted characters become a disaster?

Think! about! Yahoo!

Your password hygiene remains atrocious, says NordPass

Bill Gray

Re: What about sites that force you to make it easier?

> the most plausible reason I can come up with is that the password is stored raw

This. It's just about the only reason I've been able to come up with. Which is horrifying. Salting and hashing is not rocket surgery.

GhostBSD makes FreeBSD a little less frightening for the Linux loyal

Bill Gray

> BSD is for experts

I've tried a few variants of BSDs over the years and always ran into problems (I'm almost entirely a Linux user and have never gotten along well with Macs). I tried GhostBSD a couple of years back, and... it Just Worked. I think I could install it for my aged mother (who runs Xubuntu) and she'd not notice the difference much (she mostly just runs Firefox, Thunderbird, and Libre Office anyway).

I tried it out of curiosity and because I write software that I need to compile and test on a variety of OSes. I've not tried this latest version yet, but am looking forward to doing so.

Of course, my anecdote is not data. The machines on which I run GhostBSD have wired Internet access and generic, somewhat elderly hardware. Neither your experience nor mine can be generalized all that far. Many people actually like Windows... seems weird to me, but de gustibus non disputandum est (and such preferences really do come down to taste).

Shock horror – and there goes the network neighborhood

Bill Gray

I'm reminded of a former colleague who came up with the following, all-purpose blanket denial : "I didn't do it, nobody saw me do it, you can't prove it, it was like than when I got here." To which you could add, "Honest!"

FBI boss: Taking away our Section 702 spying powers could be 'devastating'

Bill Gray

Re: It is funny

> Not everything is about the thing that you happen to care about.

I expect that for the Congresscritters, in this case, it is all about what they care about. If you're a Republican, you worry that law enforcement will turn up more stuff on Trump, and/or turn into an instrument of left-wing, Dogless Socialism oppressing freedom-loving Americans. If you're a Democrat, you can be reasonably concerned that the second Trump administration would use law enforcement on its opposition to ensure permanent political power. Bipartisan agreement, for mirror-image reasons.

Food robots delivering bombs? Oregon State campus shut down by 'prank'

Bill Gray

Re: Umm ...

Yes, they're different lengths. A metric hour is 0.1 day. (Used briefly in France after the Revolution, though I can't imagine it got a _lot_ of use.) 10 metric hours per day, 100 metric minutes per metric hour, 100 metric seconds per metric minute.

Still doesn't work out, though. 6 kilometers in a metric hour would be about 1.5 miles/imperial hour.

Boffins say their thin film solar cells make space farms viable

Bill Gray

Not sure why you're being downvoted here.

This should certainly be useful for (for example) solar-electric (ion drive) propulsion, such as was used for the Dawn mission. Spacecraft using this usually have lots (and lots) of solar panels. Lower-mass panels means more payload or more power or some of each. There are probably some other space-based applications that could profit from having more or lower-mass solar power.

NASA just patched Voyager 2's software but spared Voyager 1 the risky rewrite

Bill Gray

I've never been able to accurately assign blame to a cosmic ray for a problem in my code. I have been able to blame the full moon for a software issue, though.

What did the VisiCalc fairy bring you for Spreadsheet Day?

Bill Gray

Re: Damn

Excel has been a day off since 1900 Feb 29. Most of us are aware that 1900 was not actually a leap year; Microsoft, apparently, was not.

I'm not sure if that means that Spreadsheet Day is today, or was two days ago.

Falcon Heavy sends NASA probe to metal-rich asteroid Psyche

Bill Gray

Re: I wish they'd have a mission to 33 Polyhymnia

Don't believe a word of it, unfortunately.

(33) Polyhymnia has gotten a rash of publicity recently. Some nuclear physicists did some theoretical computations of the density of extremely high-Z nuclei (well beyond the currently known transuranic elements), and found that in an expected further "island of stability", you'd get extreme densities. All quite plausible.

They then uncritically accepted some of the really high estimates for asteroid densities. Formally, the density for (33) Polyhymnia is 75.28 +/- 9.71 gm/cm^3. However, the nature of computing asteroid masses is that you sometimes get fluke results that are either negative or obviously way too high. You need to report these so that people understand that any asteroid mass value has to be treated with caution. But it appears to have misled our nuclear physicist colleagues. (Asteroid sizes are usually determined with decent accuracy; it's the masses that are very hard to get.)

(I am the author of a program that is used, among other things, to determine asteroid masses based on their perturbations of other asteroids. The recent publicity didn't go over well with those of us in the asteroid research community. There are some very solid mass determinations out there, but this wasn't one of them.)

Bill Gray

Images of Psyche and booster in space

They have been imaged several times on their way out. In this image, the telescope was tracking on Psyche and its booster, which is why all the stars are trailed. Psyche is the fainter of the two dots at center. They were both about 190000 km away (roughly half the distance to the moon).

And a Romanian astronomer got this video of the booster (Psyche was too faint to show up in this one) a bit later and slightly further out.

(The images were not made "just for fun", though that was a part of it. JPL will do an excellent job of tracking the spacecraft, but our knowledge of where the booster is going comes from images of this sort. In particular, we'd like to be able to identify it if the asteroid-hunting surveys catch it again in a few years; we find "mystery" objects returning from heliocentric orbit every now and then.)

Chinese citizens feel their government is doing such a fine job with surveillance

Bill Gray

The general sentiment here is that this survey must be complete rubbish. I lean in that direction, and certainly hope it is, but...

I remember that after 9/11, most of my fellow USAians were perfectly happy to give up liberty in the pursuit of "security". Core values we supposedly had of a right to a fair trial, freedom from surveillance, etc. were merrily discarded. (As they had been fifty years earlier during the McCarthy era. And somewhat so during the post-WW1 Red Scare.)

The Chinese government has almost total control of what their citizens know about, of the sort Western politicians can (thus far) only dream of. I doubt most Chinese people think that they, personally, need to be surveilled. But they may be convinced that everybody else on the planet needs to be surveilled.

Go ahead, let the unknowable security risks of Windows Copilot onto your PC fleet

Bill Gray

"if we've learned anything about AI chatbots, it's that theory is a very poor guide to practice..."

More generally : in theory, theory and practice are the same thing. In practice, they aren't.

(I do realize that some people have no really practical choice but to use Microsoft software*. Articles such as these make me very relieved that it's been a long time since I've been in that group.)

(*) I was going to write 'Microsoft products'. But I actually do like my Microsoft natural keyboard. Even Satan has his good days.

New information physics theory is evidence 'we're living in a simulation,' says author

Bill Gray

Re: how much it would take to simulate the human brain or, for that matter, 7 billion human brains

https://www.census.gov/popclock/world states that the current world population is a bit over eight billion, with some other sites going to 8.1 billion. So we have about eight billion humans, only 7 billion of whom have (real or simulated) brains... well, that does sometimes seem about right.

ELKS and Fuzix: Linux – and Unix – writ very, very small

Bill Gray

Re: nxworld

I similarly found that map familiar. I think it's the "World Data Bank II" (or maybe III) dataset. I used it in an early version of my astronomy software for maps such as this one . It was a very useful dataset. It's not all that detailed, but it's quite easy to make maps from it.

I have put the data for WDB on my site (about 1.2 MBytes compressed, 4.7 MBytes uncompressed). Its only real downside is that it dates back to 1992 and must have been based on older data, which is why you don't see (for example) boundaries within the former Soviet Union, and East and West Germany have a border between them.

Beta driver turned heads in the hospital

Bill Gray

Re: Landscape/portrait

> Afterwards the managed thanked me and said it was very useful talking to a real user, rather than someone just testing the application.

I'm a one-man band (write, test, sell the software, which is used by -- among others -- observers at telescopes looking for asteroids.) I talk a lot with users and sometimes _think_ I've gotten things right.

But I remember the first time I actually went up on the mountain for a night of observing and saw my software in use and how they actually did what they do, and realized just how many stupid things I'd done. Many weren't things anybody had complained about; I just hadn't realized that people were doing X because they didn't see superior option Y. Or in other cases, that adding an option Z would be a truly excellent idea.

i wholeheartedly concur with your point about the utility of talking with real users. I'd add to that that it's amazingly helpful to _watch_ real users in action.

Apple's iPhone 12 woes spread as Belgium, Germany, Netherlands weigh in

Bill Gray

Re: Follow the money

> What does it matter?

In a sense, you're right, but I'd still be curious. Manufacturers often self-certify, so they have the relevant testing gear around and it mostly sits unused until you release your next product. I could imagine somebody checking out what the competition's phones do.

If so, I'd see it as a good thing. It doesn't seem government agencies can keep up with the testing, and self-certification is apt to be iffy if nobody checks your work.

Mozilla calls cars from 25 automakers 'data privacy nightmares on wheels'

Bill Gray

Re: A long time ago...

I'm a Nissan owner. Could you explain that joke? (I believe you're supposed to reply, "Okay, I'll speak slowly" here.)

(Actually, it's a pretty good car... aside from the data collection. As noted elsewhere, I'm working on borking that.)

Bill Gray

Re: Any way to disable the connection?

Thank you. Your reply (and a few others on Stack Exchange) suggest that at the very least, I need not fear borking the car. (I was reasonably sure that removing the fuse or wrapping the antenna in tinfoil would be safe. After all, Nissan has to assume that you'll sometimes lose the cell signal. But it's good to see that others have done this successfully.)

Bill Gray
Thumb Up

Re: Any way to disable the connection?

> You many not have to worry if it's really old

Yup, I read about some folks with the 3G versions complaining that they couldn't connect to their car. (There actually _are_ some uses for being able to do so : set the car to start heating/cooling a bit before you get into it, for example, while it's still charging. Not enough to make me willing to accept the surveillance.) Anyway... my vehicle is fairly new.

The thought did occur to me that the antenna ought to be accessible. Apparently, these cars have a TCU (telemetry control unit); some comments suggest I may be able to justt pull out a fuse, which is well within my limited vehicle repair skills. As you note, further research is required... I'm finding depressingly little on "how to shut off telemetry" and too much of "how do I get the telemetry to work". But the latter is giving me ideas on the former.

Bill Gray

Any way to disable the connection?

I tend to drive vehicles as long as possible, aided by an excellent mechanic. But when our last car died, I bought a used... Nissan Leaf.

It's actually pretty good, as a car. If you could disable all the "helpful extras" and have it be a battery connected to motors connected to wheels, sort of like a yestercentury car except using electricity instead of hydrocarbons, it'd be Just Fine.

I'd really like to just wrap some tinfoil around whatever transmitter/receiver our surveillance state overlords have implemented. (Or snip a wire or two, or whatever else would do the job.) I'm a software guy, though. Any commentards have thoughts about how you'd fix this monstrosity?

ArcaOS 5.1 gives vintage OS/2 a UEFI facelift for the 21st century

Bill Gray

Re: Compilers?

I've used OpenWATCOM 1.9, cross-compiling to OS/2 from Linux. However, that compiler hasn't been updated in some years, and some limitations may apply.

What happens when What3Words gets lost in translation?

Bill Gray

Re: Was that sheep (singular) or sheep (plural)?

Ummm... well, yes, if the first and third 'sheep' are plural and the second one is singular.

FreeBSD can now boot in 25 milliseconds

Bill Gray

Re: VM vs Process

About three decades ago, I quit my day job and wrote a desktop planetarium software for DOS, then moved it to Windows. When it came time to do a Linux version, I tried simply running the program under Wine. There were a few bugs, almost all of which turned out to be "me" problems (bugs I'd made that had somehow gone undetected on "real" Windows). Fixing these and working around the few remaining Wine issues, I effectively had the desired Linux version of my program, with very little effort.

The required changes were roughly at the level I've encountered when Microsoft created a new fork of Windows (a few changes required for Vista, then for Win7, etc.) You do have the problem that vendors will make those fixes for a Microsoft fork of Windows, but will rarely make them for Wine.

Note that this was about ten years back. Wine has improved a fair bit since then.

If you have source code, Wine is an excellent idea. I'd recommend it just for the ability to catch bugs. I've had decent success with closed-source code on Wine, but when it fails, there's less you can do to fix/work around it.

The choice: Pay BT megabucks, or do something a bit illegal. OK, that’s no choice

Bill Gray


I learned to type on a QWERTY keyboard with the Biblical method ("seek and ye shall find"). When I developed carpal tunnel, I switched to Dvorak(*) and did so touch-typing. Nearly thirty years later, I still touch-type on Dvorak, but have to look at the keyboard for QWERTY.

(*) The carpal tunnel went away and hasn't come back. However, I also switched to an ergonomic keyboard and better chair/desk at the same time (the carpal tunnel was really bad and treatments limited back then), so I don't really know if it helped. The switchover did raise my typing speed immensely, though,

Yahoo! comeback! continues! as! fresh! listing! planned!

Bill Gray

Only! reason! for! this! story!

is! that! El! Reg! hacks! wanted! an! excuse! to! add! italicized! exclamation! marks! to! each! word!

(Though in fairness, it was the only reason for me to comment, too. It appears that as a lowly commentard, I can't italicize the comment title.)

Europe's Euclid telescope launches to figure out dark energy, the universe, and everything

Bill Gray

Re: L2?

The James Webb telescope is already at L2

Also Spektr-RG (Russian-ESA collaboration X-ray/gamma-ray telescope) and Gaia (ESA spacecraft getting very exact measurements of the positions, motions, and distances of about a billion stars). All three spacecraft stay roughly opposite the sun in the sky, but can wander around dozens of degrees from that point. Every few months, they have to apply small maneuvers to stay "balanced" at L2, similarly to how you might move to keep a yard/metre-stick balanced on your palm.

Anyway... the spacecraft in question have lots of room to play in; there's no risk of a collision.

(I'm aware of all this because my day job is with the asteroid surveys. In images, these objects are about the same brightness and have motions similar to near-earth asteroids. So we have to keep track of them, plus some spacecraft in lower Earth orbits. We've had a few instances where spacecraft were "discovered" and briefly thought to be asteroids... in fact, I'm currently in the process of adding Euclid and its Falcon 9 booster to the list of objects we check.)

Quirky QWERTY killed a password in Paris

Bill Gray


I switched to Dvorak decades ago in hopes of relieving severe carpal tunnel(*). The keyboard has US keycaps, and I can switch between QWERTY, Dvorak, and Russian layouts. Which does puzzle my wife and daughter briefly on the rare occasions that they need to use my computer, until they remember to set the QWERTY layout.

Converting 'password1' to 'кфжжбыщр1' is another benefit.

(*) The carpal tunnel went away. But I also switched to a split keyboard and a more ergonomic desk, so I don't really know what did the trick.

Dialup-era developer writes ChatGPT client for Windows 3.1

Bill Gray

Re: One question

I can date this with some exactness.

In July 1992, I quit my day job and started work on astronomical software (a star charting and desktop planetarium program). In spring 1993, I took the ~200 MByte hard drive out of my computer and visited a friend at his workplace; we burned the software and data onto CDs. I think the burner was well in the thousands of dollars range (readers were much cheaper). I sent the recorded CD off to be stamped onto CD-ROMs. I repeated the process a few months later for version 2.0.

In summer 1994, I had my own CD burner (a pizza-box sized peripheral) and used it to burn the master copy for version 3.0. It was a slow device and not something most people had, but they were out there, with Win95 a year away.

If you want a big brain, make a habit out of daytime naps

Bill Gray

Re: Cause and Effect

My favorite example of cause/effect confusion :


Microsoft and Helion's fusion deal has an alternative energy

Bill Gray

Aneutronic fusion

"...Helion will not be putting a 100 million degree, neutron-spewing reactor of unknown design anywhere in public by 2028"

Should note that the reason for using He-3 is to avoid spewing neutrons. The idea is that the fusion products are (mostly/almost entirely) charged particles, whose energy can be captured and turned into electrical current directly.


Thus, you avoid (most of) the radiation problems and can capture energy much more efficiently. On the other hand, you need a much higher temperature.

Overall, minus the phrase "neutron-spewing", I concur with the author. For Microsoft, this is about appearing to care about "being green", with no real concern about whether the technology actually works.

I'm a fairly strong proponent of trying some "out there" methods for energy production, carbon capture, etc., simply because the payoff would be huge. If this had, say, a one in 100 chance of success, it'd be worth trying, because the payoff would be about a thousand to one. You're talking about upending the world's energy supply and ending global warming. If you took that view, Microsoft would have a 99% chance of good PR and a 1% chance of unexpected success. I guess that were I they, I'd put crowbar to wallet and buy in... maybe even if I thought it was 100% and 0%, respectively. (Which I kinda do.)

Uncle Sam sounds like it may actually do something about rampant visa H-1B fraud

Bill Gray

Re: Indian Immigration Visa

Fair enough. Though as a middle-aged US person with only US citizenship, and looking around at the right-wing loons (and some of the left-wing loons, and some non-political loons) in my country with some horror, I wouldn't mind having a backup.

Bill Gray

Re: Indian Immigration Visa

Making this up as I go along :

If I were in the intended category for this program, and I were in India or China, I might be quite eager to "escape" to the United States. If I were in much of Europe... well, it's rare that I hear European/UK commentards on this site speak well of the US.

Agree with the earlier comment that drawing applicants at random, rather than applications (so that submitting ten applications doesn't bump up your chances tenfold) would be a good step.

Microsoft mucks with PrtScr key for first time in decades

Bill Gray

"mid-life crisis" / "over 60s club"

<sad voice> I just turned 61. My life is almost half over. </sad voice>

Goddard Space Flight Center's new boss swears in on holy Pale Blue Dot

Bill Gray

This does have me scanning my bookshelves and thinking about what "holy book" I'd use in such a situation. Perhaps _Table of Logarithmic & Trigonometric Functions_. If the situation involved my profession more directly (I write software for the asteroid detection/planetary defense community), I'd probably go with _Fundamentals of Celestial Mechanics_. Plenty of good options.

Pager hack faxed things up properly, again, and again, and again

Bill Gray

Re: what fun it was writing configuration scripts in the Hayes ‘language

I'd almost completely forgotten about Hayes modem commands until a few years ago, when the scam/telemarketing calls on our landline became a near-hourly menace. (In the US, telcos profit from these and are disinclined to stop them. I don't know if that's an issue elsewhere.)

To my surprise, I found that I still had an old PCI 56K hardware modem, with the ability (among other things) to scan Caller ID data. Combine with a bit of C code, a check against the NoMoRobo database, and those calls got one ring and then were disconnected. (I played with having them responded to with a fax tone, but that didn't seem to help.)

It seems to me that having a PC (or, say, Raspberry Pi) be able to interface with phones, either landline or cellular, ought to be a straightforward thing, not requiring one to have kept some obsolete kit for ~20 years. Perhaps it is, and I didn't find the "current" solution. Admittedly, once I found one that worked, I didn't look much further.

Apple bags patent for folding phone that closes as it's dropped

Bill Gray

Tie a piece of bread, buttered side up, to the top of the cat, and you have a perpetual motion machine. Harness the resulting power, and the battery on your phone never dies.

Can we interest you in a $10 pocket calculator powered by Android 9?

Bill Gray

Re: Ok... I have to ask

Our local recycling center has a "gift shop" where people leave items of possible interest to somebody else. A few months back, I found an HP-15C there, in quite good condition. Started it up, and it worked Just Fine. (I gather they're noted for long battery life.)

A bit before that, I got a Versalog slide rule at Goodwill. No battery issues at all with that...

If we plan to live on the Moon, it's going to need a time zone

Bill Gray

Re: Just set the entire moon to Coordinated Universal Time (UTC +0) ...

> I'm pretty sure it's only so on certain days of the year

You are correct. There is an 'equation of time' correction, which can cause a sundial to run about a quarter hour ahead or behind mean solar time over the course of a year. (Except for some really clever sundials, usually with an oddly-shaped gnomon or other way of correcting for this.) Thus, where I live, the Sun is due south at about 11:36 AM local time, but it can be between about 11:21 and 11:51, depending on the time of the year.

Also, note that the sun will only pass overhead if you're in the tropics, and then only twice a year.

Arm has legs: VMware's Bitnami starts packaging apps for Graviton and Ampere

Bill Gray

ARM has legs

I am reminded of a headline from when Saddam Hussein was still in power : IRAQI HEAD SEEKS ARMS.

Which in turn reminds me of :






McDonald's pulls plug on Wi-Fi, starts playing classical music to soothe yobs

Bill Gray

Re: print car number plates on takeaway bags to discourage customers from littering

> Do they not do money-back deposits on cans & bottles in the UK any more?

I'm in Maine, where it's the same five or ten cents a can. Back when we started with returnables, in the mid-1970s, cans and bottles mostly disappeared from the roadsides. The deposits have been mostly unchanged since then; with inflation, some people feel it simpler to toss the items out the window.

Must concede that while the proposed scheme would identify litterers, actually getting lawn forcement to pursue such cases might be difficult.

Bill Gray

Re: print car number plates on takeaway bags to discourage customers from littering

Probably best if the bag (and perhaps cups and chip-holders and such) have a serial number on them. Most people, it appears, use credit/debit cards, AKA identifying tracking devices, when purchasing fast "food". So you pick up the trash, and the emporium in question can correlate the number with the card owner and their billing data.

At least around here, it's certainly true that ~60% of roadside litter is fast "food" packaging (remainder is cigarettes and soda/beer cans/bottles). I'd expect the legal issues involved would make this hard to do in most jurisdictions, but I'm not so sure there are practical problems with it... certainly something a totalitarian society such as China or Singapore could implement without much trouble.