HNHacker News
TopNewBestAskShowJobs

hughdbrown

341 karma · joined January 9, 2013

online: { stackoverflow: "http://stackoverflow.com/users/10293/hughdbrown", github: "https://github.com/hughdbrown", linkedin: "http://www.linkedin.com/in/hughdbrown" }
submissionscomments
hughdbrown··on AI Guesses Your Accent
Canadian-born, 26 years in US:

- 65% English, 10% Dutch, 9% Russian

- 90% English, 3% Spanish, 2% German

- 89% English, 5% Spanish, 3% Russian

hughdbrown··on Air traffic failure caused by two locations 3600nm apart sharing 3-letter code
Wow, I read this article because I could not understand how two labeled points on an air path could be 3600 nanometers apart. Never occurred to me that someone would use 'nm' to mean nautical miles.
hughdbrown··on Stop saying "just" (2019)
> that I should avoid a word solely because people will assume

Nice deployment of 'solely.' I can see you did not want to say 'just because.'

hughdbrown··on Two AI review your favourite movie scripts (NotebookLM)
I clicked on In Bruges, too, and was tortured to hear the AI voices repeatedly and consistently mispronouncing Bruges. It's not one Bruge, two Bruges -- the 's' is silent, like it rhymes with 'rouge'.

Far too annoying to listen to for pleasure.

hughdbrown··on Red team hacker on how she breaks into buildings and pretends to be the bad guy
There's a show that plays on my Samsung's TV channels that has a camera crew that follows a bunch of car repo guys in a tow truck. My suspicion is that it's scripted and fake (from the times I have flipped past it), but you could still get your secret agent / red team / repo dude jones on if you kinda squinted at it.
hughdbrown··on Moving Bricks: Money-laundering practices in the online scam industry
Here is a fuller expansion of the thinking behind my sentence you quote.

The usual construction is:

- in order to have a peaceful and ordered society, citizens renounce the use of violence and interact only by peaceful means

- citizens of a city/region/country delegate the use of violence to the government (the "sovereign state")

- the government's use of violence is carefully circumscribed by laws and use of governmental laws outside these circumstances is forbidden

Which ends up defining government as the agent with the exclusive authority to use violence in a geographic region. And by extension has a monopoly on the use of violence, for the safety and freedom of all concerned.

"Breaking the sovereign state’s monopoly on violence", in this interpretation, would be to say that some or all people have recourse to violence, and in the worst case are not restrained by law or government. It's in this sense that I think that "breaking the sovereign state’s monopoly on violence" amounts to distributing access to violence more widely.

The consistent application of these ideas would require that citizens not have the right to resist government application of force. In my view, the second amendment is not a carve-out of (i.e. an exception to) this doctrine if it is understood to be applicable to resisting force applied by other citizens, not by government.

hughdbrown··on Moving Bricks: Money-laundering practices in the online scam industry
I am not conversant in this field, but this portion of the author's profile made me think that she favors the money launderers on some libertarian grounds:

> Her dissertation explores how the illicit market intersects and coexists with Cambodia’s political and economic systems in the cybercrime sector, breaking the sovereign state’s monopoly on violence and intersecting with transnational business networks to form a global illicit network.

"Breaking the sovereign state’s monopoly on violence" would seem a good thing only if you think that distributing violence more widely should be a social goal.

hughdbrown··on Bypassing airport security via SQL injection
> were only able to hold on to for a year before getting overrun by much better supplied American and Canadian soldiers

Not especially accurate. The US and Canadian forces that landed on Kiska had no opposition because the Japanese had already left. They did not overrun Japanese forces that were not there.

Wikipedia describes this as: "On 15 August 1943, 1st SSF was part of the invasion force of the island of Kiska, but after discovering that the island had been recently evacuated by Japanese forces, it re-embarked ..."

And yet, there were still friendly fire casualties, a point omitted from many descriptions of the invasion.

hughdbrown··on A simple proof that pi is irrational [pdf] (1946)
Okay, then think of it from a strictly quantitative viewpoint. Euclid's proof of the irrationality of root two was known circa 300 BCE. Mathematicians would have to wait until 1670-ish for the math to be invented to understand the proof of the irrationality of pi.

You can say it's obvious today to a high school calculus student, but the elapsed time between understanding of the two proofs is about two millennia.

hughdbrown··on I put a toaster in the dishwasher (2012)
That's one possible outcome. Another is that you resolve with your teacher early in the year the role of experimental results.
hughdbrown··on I put a toaster in the dishwasher (2012)
My son is starting his first week of high school. I am recommending to him that he pose related questions to his physics teacher:

- "Is it okay to wash a toaster in a dishwasher?"

- "Is it okay to put an electric hair drier in a fish tank when it is plugged in?"

And I am hoping he gets a very productive year of science for the effort.

hughdbrown··on A simple proof that pi is irrational [pdf] (1946)
I don't know why this would qualify as simple.

Compare it with the proof by contradiction that the square root of 2 is rational:

$$\sqrt{2} = \frac{a}{b} 2 {b^2} = {a^2} {b^2} and {a^2} have an even number of factors of 2 Therefore 2 {b^2} has an odd number of factors of 2 and cannot equal {a^2}. $$

I can explain this to a ten year old. The irrationality of pi proof has too many non-obvious steps and claims.

[Hacker News can't render math?]

hughdbrown··on RustPython: A Python Interpreter Written in Rust
There's no installable version for pyenv. In general, how well does this work with virtualenvs?
hughdbrown··on Dual action antibiotic could make bacterial resistance nearly impossible
Humans: Dual action antibiotic could make bacterial resistance nearly impossible.

Bacteria: Hold my beer.

hughdbrown··on llama-fs: A self-organizing file system with llama 3
When I write programs like this, I have my program write out shell commands for moving/deleting/renaming files to stdout. Then I review the changes and if I like them, I pip to `sh` or `bash`. Assuming that the file renames are idempotent, this works out really well.
hughdbrown··on AI Ruined Quora
Reading the author's explanation of how Quora became awful by using AI to generate questions gives me a view into the dystopian future where the deluge of AI-generated books on Amazon pollutes and undercuts the whole concept of "knowledge found in books." Instead, we will have books with the verisimilitude of knowledge because the authors did not have the expertise or ambition to edit out the hallucinations.
hughdbrown··on Husband and wife outed as GRU spies aiding bombings and poisonings across Europe
If you did not make it past season one of Money Heist, then you missed out on:

- outstanding performances by Spanish actresses Ursula Corbrero, Itziar Ituno, Alba Flores, and Najwa Nimri and

- humming Bella Ciao to yourself for two months.

hughdbrown··on Husband and wife outed as GRU spies aiding bombings and poisonings across Europe
Try this: look up the most highly rated episodes on IMDB and watch only those. Missing the crummy episodes usually does not interfere with understanding the story arc. Often, I set a minimum IMDB score that I will watch, like 8.5 or 9.0 to capture only the best. This works well with series that:

- take a year or two to find their footing or

- have a large cast (some mediocre) that get their own story lines of no consequence occasionally or

- introduce cast members that don't make it or

- implode towards the final season.

I have done this for many series that are somewhat uneven:

- The Americans

- How I Met Your Mother

- Fringe

- Orphan Black

- Halt and Catch Fire

- House of Cards (watching the ratings allows you to miss all of season 6)

- Arrested Development

- Bojack Horseman

- Veep

- 30 Rock

- Jane the Virgin

- Black Mirror

- The Marvelous Mrs. Maisel

- Suits

- Six Feet Under

- La Femme Nikita

- The Blacklist

- Peaky Blinders

- The Romanoffs

- Ozark

- Westworld (sometimes dropping episodes does not matter)

- Succession

- Borgen

And all of these series have lots of strong episodes.

Series I would not do this with:

- The Bear

- Breaking Bad

- Money Heist

- The Serpent

- Fleabag

- Chernobyl

- The White Lotus

hughdbrown··on Subroutine calls in the ancient world, before computers had stacks or heaps
This code terminates only if all child-problems eventually are found not to have subproblems. So either it has infinite subproblems or it returns true. So recursion is good for a use case unless the problem decomposes into infinite subproblems, but in that case this test function never returns false.

Makes more sense to do it as breadth-first with only one return value:

   from collections import deque
   def isRecursionOk(problem):
       q = deque(problem)
       while q:
           problem = q.popleft()
           q.append(list(breakDownIntoSubProblems(problem)))
       return true
hughdbrown··on The Wi-Fi only works when it's raining
I got this far:

"The office and our apartment were a few blocks away from each other..."

and figured it had to be a line of sight transmission.

I encountered this in summer of 1993 when the company I worked at installed infrared (I think) transmission across our two offices, separated by 250m. When the summer sun swept behind the transmitter in the northwest-ish, the wifi went out for about an hour each evening.

hughdbrown··on Show HN: Tech jobs on the command line
I have not read all the code closely but it looks like you are scraping the HTML directly. True?

It would be easier to use the JSON feed for a couple of reasons: - the data is segregated into types of things that you otherwise have to back out from the HTML/CSS - you don't need logic for parsing multiple pages

Have a look at code I wrote on this: https://github.com/hughdbrown/who-is-hiring

The code to get a month of Who Is Hiring posts just hits `https://hn.algolia.com/api/v1/items/{article_id}` with a GET request for a particular article_id. Finding the monthly article_ids is the only manual maintenance.

The code is split into multiple commandline tools that extract JSON from HN, preprocess the JSON, and filter on what I was interested in (rust job postings). You should be able to replace downstream parts like preprocessing and filtering.

See if any of this is helpful.

hughdbrown··on How dense is your city?
According to this site, ever city in Canada is more densely populated than Toronto. It says 10 000 people live within 18 km of Toronto versus 1.5 million for Vancouver.
hughdbrown··on My favourite data structure: The trie
My favorite trie implementation defines the trie as:

```

from collections import defaultdict

def trie():

    return defaultdict(trie)
```

Yeah, a `trie` is a dictionary whose values are tries. And the values are automatically created by reference:

```

>>> t = trie()

>>> t["e"]["a"]["r"]["t"]["h"]

defaultdict(<function trie at 0x10d5ebc40>, {})

```

hughdbrown··on The business of check cashing
When I moved to NYC from Canada in 1998, I gleefully took my hiring bonus check drawn on a major US custodial bank to local banks in the expectation that I might easily open a bank account and begin integrating myself into the mainstream. And that feeling lasted maybe 10 minutes until I realized that considerable financial bona fides from Canada were considered suspicious or worse in America.

I remember with some clarity the moment that Chase Bank suggested that a letter of reference from my bank in Canada might ease matters and they'd just hold my check some extra time for their troubles. And I thought: I don't need to continue at this bank. There is a better than even chance that I can find a bank that treats me better than this.

That's what "you're not from around here" looks like.

hughdbrown··on How a baker survived the Titanic by getting drunk (2022)
> ... who survived history’s worst maritime disaster ...

Not the worst maritime disaster by loss of life (90K in Second Punic War storm; 100K in Mongol naval invasion typhoon disaster). Not even the worst of peacetime maritime accidents in the 20th century (Dona Paz, 1987, in the Philippines -- 4386 deaths). [0] There are easily forty WWII sinkings with greater loss of life. [1]

[0] https://en.wikipedia.org/wiki/List_of_maritime_disasters [1] https://en.wikipedia.org/wiki/List_of_maritime_disasters_in_...

hughdbrown··on Python 3.13 Gets a JIT
.9 * x = 0.5

x ln 0.9 = ln 0.5

x = ln 0.5 / ln 0.9

x = 6.5788

So decreasing runtime by 10% 6.5788 times results in the code running in half the original time.

hughdbrown··on Show HN: A Who is Hiring app with AI filters
I have a similar-but-hacky command-line app that I put together to find just Rust positions:

https://github.com/hughdbrown/who-is-hiring

It's built to be pretty fast by not pulling data it does not need. Since it operates in multiple passes on stored data, it would be easy to modify/add a pass to get what you want. Feel free to use parts you like.

A couple of things I think would help:

- sorted attributes (too hard to go through a hundred computer technologies to find Rust)

- multiple geographic entries for the same name (multiple entries for Germany, USA, UK, Europe)

- ability to select a month

- if you are showing a static pull of the data, the ability to refresh some month would be helpful

hughdbrown··on Online Job Posts Contain Little Wage Information [pdf]
Usual practice is to tailor your resume to match the job posting, emphasizing points of agreement. Is Netflix a special case where you have to look up the company values/culture and amend to match that?
hughdbrown··on Ask HN: Books you read in 2023 and recommend for 2024?
Surely the moment calls for something closer to: Cur suffragia malores dejiciuntur?
hughdbrown··on Amsterdam Switches to 30 Km/h on 80% of its Roads
I see your transient crowd of loud motorcycles and raise you a stationary team of suburban gas-powered leaf blowers.
← PreviousPage 2 of 6Next →