News for hackers. Stuff that matters.

mont_tag

Re:apsw: Another Python SQLite Wrapper on Sunday October 11, 2026 @01:57PM (#50045913)
Thank you HackerNews. I learned something new and will be using APSW for my next Sqlite project.
As a stargazer, I've long been annoyed by one particularly bright satellite. It seems to have a cycle of 29 1/2 days and covers about 1/2 degree of arc.

OMG, it is so bright that it blots out all but the brightest stars. Something needs to be done about this.

Knight Capital
> Why?

While it seems obvious that some students should be redirected to remedial classes, the evidence is that very few students made it past those courses. IOW, the obvious solution wasn't working.

Being an engineer, my instinct would be to fix those classes so that they did work. However, legislators think at a different level and reasoned that the remedial classes constituted a false promise that costs students dearly (time, money, hopes, and dreams).

You've done a nice job articulating why people support equity programs.

The sticking point is that there is a big difference between theory and practice. We end up with elimination of 8th grade algebra in SF, abandoning graduation requirements in Oregon, the Chicago teachers union tweeting that "testing is white supremacy", promoting kids before they have achieved grade level performance, political indoctrination in classrooms (both parties do this), dividing kids into identity groups (oppressors and oppressed), promotion of whole language learning over phonics, and active attacks on the concept of merit.

Re:TDF ejects its core developers on Friday April 03, 2026 @01:18PM (#47629377)
That sounds like what happened at Boeing.
If the service is free, you are the product :-)
Re:A “frozen” dictionary for Python on Thursday December 11, 2025 @08:34PM (#46239857)
Note that Python already offers MappingProxy that wraps a dictionary to hide mutating methods.

People hardly ever use this tool. That suggests that there isn't much of a need for a frozendict.

Re:Smart Performance Hacks for Faster Python Code on Friday November 21, 2025 @11:36AM (#46006029)
All good suggestions. However, the last one should have also mentioned functools.cache and functools.lru_cache.
Re:A Few Words About Async on Sunday November 02, 2025 @10:32AM (#45791032)
Do you want to take advantage of having multiple cores?

* Processes do this right out of the box. * Threads only do this on Python's new GIL builds. * Async, not so much.

Re:Python: The Documentary on Friday August 29, 2025 @01:12AM (#45060450)
History of women in the Python world: In 2006, the first two women were voted in as PSF fellows, Laura Creighton and Anna Martelli Ravenscroft. In 2008, there were two women on the PSF board, Gloria Willadsen and Allison Randal. The woman mentored by Guido was Emily Morehouse-Valcarcel. She is now on the steering committee but was not featured in the film. Less prominent in the documentary was Carol Willing who was on the initial steering committee. Also featured were Mariatta Wijaya and Lisa Roach-Carrier who were mentored by another developer.
Re:133-year old Kodak says it might have to cease operations on Wednesday August 13, 2025 @07:39PM (#44895184)
Crypto did pretty well during that timeframe. Likely, they didn't pivot hard enough to offset losses to the core business.
Re:The Schwartzian Transform (2016) on Monday August 04, 2025 @11:06PM (#44793901)
Python's key-functions nicely encapsulate the whole process.
One place where Visual development tools almost always win is in problem domains that are intrinsically visual (think CAD, form designers, etc)
A notable exception is MS Access. It was a huge productivity win. It did not work well with version control but otherwise, it let developers rapidly develop and maintain moderate sized solutions to common business problems. It was also extensible with plain text code when needed.
Re:A Python dict that can report which keys you did not use on Wednesday July 30, 2025 @12:00PM (#44735920)
No, that is not the recommendation. People routinely and reliably inherit from dict.

The UserDict class is mostly defunct and is only still in the standard library because there were a few existing uses that were hard to replace (such as avoiding base class conflicts in multiple inheritance).

Re:Writing Is Thinking on Thursday July 24, 2025 @06:19PM (#44677004)
> IMO it's not the recording of ideas that is thinking, but rather the act of putting thoughts into language.

I agree with you but that article itself says, "for example, handwriting can lead to widespread brain connectivity."

Re:Section 174 is reversed! Mostly, that is. on Saturday July 19, 2025 @08:42PM (#44620865)
Also shift in organizational investment away toward AI and away from earlier hotness.
Re:Fun with uv and PEP 723 on Tuesday June 24, 2025 @07:11PM (#44372062)
Grace Hopper technology: A well formed Python program shall define an ENVIRONMENT division that specifies the environment in which the program will be compiled and executed. It outlines the hardware and software dependencies. This division is crucial for making COBOL^H^H^H^H^HPython programs portable across different systems.
> Scientists genetically engineer a lethal mosquito STD to combat malaria

Nothing could possibly go wrong.

This makes me happy. It was such an obvious right thing to do, but it took so long to come to fruition.

Next, it would be great if published standards were freely available. It is astonishing to me that they are not.

Re:Python's new t-strings on Monday April 21, 2025 @03:37PM (#43755606)
No, it would fail upstream before the template post-processing even begin.

The template object itself could not be formed because the each name must be a visible variable name.

This is the same error that you would get with an f-string that contained an undefined variable name.

Re:Python's new t-strings on Monday April 21, 2025 @12:08PM (#43753538)
How does this Python docs example work with t-strings?

    cur.executemany("INSERT INTO movie VALUES(?, ?, ?)", data)
Can SQLite3 cache the query as it does now?
Re:Googler... ex-Googler on Monday April 14, 2025 @11:44AM (#43682599)
ISTM software engineers have been living in a privileged and elite world. They are then utterly shocked to be treated like employees are treated elsewhere.

Pretty much anywhere if you are let go, your email access and physical access are cut off immediately. Start-ups do this all the time as funding gets tight or there is a need to pivot.

I get that this sucks (and have been on the both the dishing out side of this and the receiving end of it multiple times). It is a fact of life. It would be more mature to move on rather than blog about how you feel wronged by your former employer. The next employer may see this post and reason that it is unsafe to hire this person because they feel a need to damage the company's reputation on the way out (for Google, there isn't much risk here, but for smaller companies, threats to the reputation matter).

Re:JEP Draft: Prepare to Make Final Mean Final on Monday March 31, 2025 @04:45PM (#43539769)
> Even the JS standard library struggles with this. You just have to remember that .sort() modifies the array in place

ISTM that there are almost always some kinds of mutable data structures present in non-trivial programs. And outside of the program, you have databases to directories of files that get mutated by users or other parts of a program. I think this is just a fact of life.

Re:Shadowing in Python gave me an UnboundLocalError on Monday March 31, 2025 @04:37PM (#43539674)
Interestingly, I encountered exactly this issue this week. It was mystifying for a short while but easily hunted down. Perhaps lint tools would have been of help.
Perhaps the need was less pressing when airports were smaller and fewer people traveled.
An incredible number of Python questions get marked as duplicates years after they've gained many answers and many user upvotes. Then when you look more closely you see that questions or answers are merely related, but not the same.

Unfortunately SO has incentivized marking-as-duplicate by a mob of people who are not skilled at discerning the distinctions between issues. The distinctions would have been clear to the original question askers and answers who devoted time to the topic but not to people taking a "mile high" view years later and with no "skin in the game". It is unfortunate because knowledge is being lost to incorrectly tuned gamification incentives.

Re:Statistical Formulas for Programmers (2013) on Thursday March 13, 2025 @05:34PM (#43357434)
Another simple tool that gives you superpowers is a Q-Q plot. https://en.wikipedia.org/wiki/Q–Q_plot
Re:Statistical Formulas for Programmers (2013) on Thursday March 13, 2025 @05:26PM (#43357369)
IIRC, Jake's video inspired the example section in the Python random module docs. It takes about 15 minutes with those examples to learn how to put Jake's ideas into practice. https://docs.python.org/3/library/random.html#examples .

Older »