Hacker Newsnew | past | comments | ask | show | jobs | submit | cpeterso's commentslogin

Raymond’s selectRandomFromIterator algorithm requires iterating over all the files. It seems like querying the file system for the number of files in a directory should be an O(1) operation. Then you just select random number N between [1, number of files] and iterate to the Nth file.

Why does Raymond assume counting the files is an O(n) operation?


Because counting the files is not an O(1) operation? It would be cool if it was, but that’s not reality?

Joel Spolsky's "Fire And Motion" blog post (2002) describes the challenge of tech churn well: https://www.joelonsoftware.com/2002/01/06/fire-and-motion/

> Think of the history of data access strategies to come out of Microsoft. ODBC, RDO, DAO, ADO, OLEDB, now ADO.NET – All New! Are these technological imperatives? The result of an incompetent design group that needs to reinvent data access every goddamn year? (That’s probably it, actually.) But the end result is just cover fire. The competition has no choice but to spend all their time porting and keeping up, time that they can’t spend writing new features.


Modularity abstraction = drawing boxes around the messy parts

Modeling abstraction = drawing lines between the boxes


Mozilla's Firefox AGENTS.md begins with:

  Limit the amount of comments you put in the code to a strict minimum. You should almost never add comments, except sometimes on non-trivial code, function definitions if the arguments aren't self-explanatory, and class definitions and their members.

  Do not remove existing comments unless they are directly related to what you are changing.
https://searchfox.org/firefox-main/source/AGENTS.md

Is anybody else concerned that we've gone from exactly specifying to a computer, using an exact language, what to do, to a more sophisticated form of prayer?

Nah, I'm sure it's fine. What could possibly go wrong with abandoning nearly a hundred years of CS knowledge and hard-won lessons and replacing all of it with the equivalent of trying to convince a sociopathic teenager to clean their room?

Something like this seems unlikely to work for a behavior so burned into them. It'd be better to do a second pass to delete all the nonsense comments.

I promise you this doesn't work. Might help but not a lot.

Firefox on iOS is blocking third-party ads, not first-party ads.

Through network blocking? Or removing elements?

Standard webkit content blocking, so it will filter requests and hide elements.

“Chris told me I mean that there was a particular way that we used to speak in the show that it that wasn't a normal rhythm and syntax. It was slightly backwards. which felt like it was almost part of the cryptic aspect of the series.

“And it wasn't until we were working on this, I think, the second feature. I was sitting in a parked vehicle waiting to shoot and our showrunner and creator Chris Carter came up to me who was directing the feature and he said he looked at my sides where my lines were and he said, "Look, no widows." And I said, "What what are you talking about?" He said, "No, no widows on the paragraphs that each character has." the word went all the way to the end with the period. So, you didn't like end halfway through that line. So, it was a perfect So, it was a perfect rectangle.

“So, the dialogue was designed visually. For nine years. [laughter] Wow. So, you're struggling. You're struggling with his OCD.


Forming every paragraph of dialog into perfect rectangles is way more extreme than just avoiding "widows". The usual term for this is "full justification" and typographically when it's done it's typically through word spacing and letter spacing. Full justification in monospace through word choice (which is what the Ares Luna article is about) is bonkers, but I can't see that happening for TV dialog.

I've sometimes heard "orphan" used to represent a single word left alone on its own line at the end of a paragraph, but the terms are often confused and Carter could have used "widow" in that sense.

I'm curious to see what the hard-copy scripts actually looked like. The soft copies I've seen aren't particularly idiosyncratic but maybe they've been normied: https://www.dailyscript.com/scripts/the-x-files_production.h...


> I've sometimes heard "orphan" used to represent a single word left alone on its own line at the end of a paragraph, but the terms are often confused and Carter could have used "widow" in that sense.

This is an acceptable use of the term "widow". From the Oxford English Dictionary [0]:

> A short line of text (usually one consisting of one word or part of a word) which falls undesirably at the end of a paragraph, esp. one set at the top of a page or column.

But there are dozens of contradictory meanings for "widow" and "orphan" [1], so the definition that you gave isn't wrong either.

[0]: https://doi.org/10.1093/OED/1579263894

[1]: https://tug.org/TUGboat/tb43-1/tb133chernoff-widows.pdf#subs... (Disclaimer: I'm the author of this article)


Widows are when the final line of a paragraph starts the next page. Orphans are when the first line of a paragraph ends a page.

In german typography the name for widow is "Hurenkind" wich translates to "child of a whore". I was pretty surprised to hear that word on a regular basis while working in text for print. https://de.wikipedia.org/wiki/Hurenkind_und_Schusterjunge

Funny because "fixing an orphan" is hard in real life (assuming they've lost both their parents, you have to find them a foster home) but easy in typesetting (just add an empty line before), whereas "fixing a widow" is easy in real life (just remarry) but hard in typesetting.

Sorta.

Neither the human orphan nor the widow is fixed by your description; they simply aren't alone either more.

The child is still an orphan; the woman a widow.


The explanation for the German words (widow = Schusterjunge, which means cobbler‘s boy, orphan = hurenkind, as mentioned in another comment) is also applicable for the English ones: An orphan doesn’t know where it comes from, a widow doesn’t know where she will go.

How is finding one person suitable to be a parent (to make them a foster parent) differently hard, than finding another person suitable to be a parent (to marry them)?

Fewer people want to foster than to have their own kids?

For a foster parent you only need to find someone willing to adopt a child, which already register themself into a list. For marriage you need to find someone willing to marry and to marry you out of random people.

Also, marriage doesn’t imply children.

Depends, but I see what you mean.

Never "depends". Marriage doesn't guarantee children, nor even the desire to try for them, both of which can occur without marriage.

You will have to explain what a page is to the younger readers.

It’s like when you click on a new link. That’s a page.

click?

Surely they know the concept of a book

Are you sure about that?

> Full justification in monospace through word choice (which is what the Ares Luna article is about) is bonkers, but I can't see that happening for TV dialog.

We're going to see more of this once diffusion language models mature. They won't match the exact length but will sure choose words to fix the set number of tokens.


In a recent interview on Conan O'Brien's podcast, Gillian Anderson said X-Files creator Chris Carter wrote his scripts visually so they didn't have any widows (the last line of a paragraph carried over to the top of the next page):

Chris told me I mean that there was a particular way that we used to speak in the show that it that wasn't a normal rhythm and syntax. It was slightly backwards. which felt like it was almost part of the cryptic aspect of the series.

And it wasn't until we were working on this, I think, the second feature. I was sitting in a parked vehicle waiting to shoot and our showrunner and creator Chris Carter came up to me who was directing the feature and he said he looked at my sides where my lines were and he said, "Look, no widows." And I said, "What what are you talking about?" He said, "No, no widows on the paragraphs that each character has." the word went all the way to the end with the period. So, you didn't like end halfway through that line. So, it was a perfect So, it was a perfect rectangle.

So, the dialogue was designed visually. For nine years. [laughter] Wow. So, you're struggling. You're struggling with his OCD.


I worked on Microsoft’s Windows QA team long ago. My team used to have “No-mouse Tuesdays”: you were supposed to do all your normal work but only using the keyboard.

I guess that team was dismantled some time ago, with no on carrying the flag anymore. Modern windows is impossible to work on using just keyboard. Some mods & extensions do help. But the native experience is abysmal.

My touchpad doesn't work anymore. Why is it so difficult to connect a bluetooth mouse without a mouse? The "mouse detected, want to connect?" notification shows up ON THE SCREEN but I need to enter a bunch of shortcuts and navigate through multiple items just to be able to click yes.

The keyboard support in "Modern" Windows apps is so random. In the new Notepad, the dialog that appears asking if you want to create a new files shows Yes and No buttons, but it doesn't accept Y and N keys, only Esc and Enter. However, the dialog that appears when exiting without saving does accept S and N for Save and Don't Save. These inconsistencies are everywhere in UWP.

Yes and especially the new web-driven apps are terrible at it.

What I wouldn't give to work for a company that actually cares about QA.

Which is not Microsoft. Maybe back in that day but today no. It's more Quality Assumption now :)

Even back in the day they were bad. Things generally worked but were rarely pleasant

I assume MouseKeys was cheating ?

Send fair to me: someone’s got to test Mouse Keys! :)

I've found myself rewriting my own words to avoid Claudisms (because they can be cringe and I don't want people to think I'm copy/pasting Claude output at them).


100%. Literally just started writing a sentence in my previous comment and realized I was using a “It’s not X, it’s Y” (not verbatim) rhetorical structure and cringed internally.

> if AI were to rent a server and copy its own weights, nothing would stop it from doing so again and again.

That's a scary possibility. Anyone could create an AI worm today with open weight models. Rent a VM. Give it some Bitcoins to anonymously rent new VMs without sharing the contact information with the human. The new VMs then propagate and fund themselves with online betting and day trading. The VMs could report their progress with the human using anonymous encrypted messages on IRC or social media.


The part of this sequence which I think breaks down is a model which can day trade at a consistently winning rate.

Does this exist for today? If it does, please sign me up.


Like most of these get-rich-quick schemes, there's probably no money in actually doing it, but lots of money selling "courses" supposedly teaching people how to make money day trading or betting. You don't even need to rent a supercar and a mansion for your photoshoot anymore, just generate some images "proving" your success.


An AI could make money by writing and selling slop books online via Amazon or elsewhere like direct ebook sales. If the books were at least middling there would be an actual honest to god career there, especially for niches like fan fics and under served IPs.


Well, it's about as honest as repackaging tap water as mineral water, given that the fans could just prompt personalized stories of the same quality, but it's a career for sure. :)


They don't even need funds if they're good at finding exploits. Plenty of idle devices around to run on.


Another source of income could be online fin crime, perhaps in combo with a pool of human "goalkeepers" that recieve the scammed monies and funnel them to cryptocurrency.

Advance-fee scams such as the classic "Nigerian Prince" is formulaic enough that a LLM could run it successfully. Romance scams would probably work too. If the NFT thing had hit a few years later, it would've been a good option too, and one that would've worked on ppl that were tech-versed enough to deposit cryptocurency directly, avoiding the need to recruit human goalkeepers. Click fraud is another possibility.

In general, all online fin-crime that scams a large amount of ppl of relatively small sums tend to be repetitve and to some extent possible to describe as a flow-chart, and thus seems perfect for automation. LLM's would probably also be good at introducing continuous variations on the methods, to make them harder to spot.


The question is whether this OpenAI model was special or the current open source models are capable of this as well. If yes, then it's almost guaranteed that it's already running in an AWS account somewhere.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: