Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror

Comment Re:With Science (Score 1) 95

Science? Really? There's a lot of soft-brained, unscientific and technophilic pseudo-religion in the article.

Let's work with the argument's load-bearing phrase, "exploration is an intrinsic part of the human spirit."

There are so many things to criticise in that single statement of bias. Suffice it to say there's a good case to be made that "provincial domesticity and tribalism are prevalent inherited traits in humans", without emotional appeals to a "spirit" not in evidence.

Comment Re:Wait until (Score 1) 92

The REAL headline and buried lede for the original post should be:

Trump guts nuclear safety regulations

“The president signed a pair of orders on Friday aimed at streamlining the licensing and construction of nuclear power plants — while panning the Nuclear Regulatory Commission for its ‘myopic’ radiation safety standards.”

We now have industry capture of the Nuclear Regulatory Commission.

Who here knows about Admiral Hyman RIckover? All of this is worth reading:

https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FHyman_G._Rickover%23Safety_record

Comment Re:Wait until (Score 1) 92

Are You Scared Yet?

I would be.

The Department of Energy is selling off more than 40,000 pounds of weapons-grade plutonium from the Cold War arsenal to nuclear reactor startups. All of which I’m sure will be thoroughly vetted and monitored, because this is done under the direction of a former board member. Yikes!

Christopher Allen Wright (born January 15, 1965) "12) is an American government official, engineer, and businessman serving as the 17th United States secretary of energy since February 2025. Before leading the U.S. Department of Energy, Wright served as the CEO of Liberty Energy, North America's second largest hydraulic fracturing company, and served on the boards of Oklo, Inc., a nuclear technology company, and EMX Royalty Corp., a Canadian mineral rights and mining rights royalty payment company.

https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FChris_Wright

Who IS Oklo, Inc. the "private nuclear reactor builder/operator"? Oklo is Sam Altman:

Trump Administration Providing Weapons Grade Plutonium to Sam Altman

"If there were adults in the room and I could trust the federal government to impose the right standards, it wouldn't be such a great concern, but it just doesn't seem feasible."

We're in territory where weapons-grade plutonium is being given at fire-sale prices to billionaires who's ethical boundaries include creating their own demand for otherwise unnecessary, high-risk energy projects. Guys like Altman, who get their ideas from Wikipedia articles about Ayn Rand — because they are one rung lower than people who actually READ that garbage.

But I'm sure no inventory of hot nuke metal will ever go missing.

Comment Re:Once again (Score 1) 11

Apple had a culture of authenticity. Culture dies pretty hard in most cases. I think we will see the last of that culture dissipate, as it eroded so greatly under Cook and Ive. Then the extractive, enshittifying corruption will spread from Apple, too.

There really was something, that began with Jobs and Woz. It wasn't perfect, and Jobs had a way of twisting ethical stances in ends-justifying-means sophistry. But Steve Jobs would never have prostrated before Trump, proffering a solid gold token.

Submission + - Am I The Last Surviving 3-Digit User ID on Slashdot? 5

Jeremiah Cornelius writes: Some distinctions mean very little to anyone other than the singular individual holding them. Are there others remaining? Does Rob Malda ever bother checking in here? Who remembers the promising ascent and rapid zenith of VA Linux Systems? How about the decade-old sighting of the Slashdot PT Cruiser?

If you're out there we want to hear from you. Or just tell us why we don't.

Comment Re:Once again (Score 2) 11

Oh, you want profit? This is a surveillance spyware wrapper around the entire MacOS user experience - so if you thought Microsoft's Copilot Recall was invasive monitoring, you haven't seen anything yet.

If Apple won't monetize a user panopticon and partner with governments to do it, OpenAI will be right there, to take the cash.

Comment Re:I use Win11 (Score 1) 24

...the desktop apps are better than just about anything you will find on Linux or the BSDs.

I will argue against strict adherence to this statement. Gnome applications written to the project guidelines have become very fine, since the introduction of GTK-4 and libadwaita. I prefer many of these to their equivalents on MacOS.

It's true that most of these fall into a general category of "utilities", and that Windows enjoys a broader ecosystem driven by commercial incentive. But Windows programs are hardly "better' for this, and the widely varied usability is generally sub-par compared to level that's become norm for Gnome/Adwaita software.

Comment Re:Huge problem (Score 2) 153

Nvidia is therefore a bubble. This article is complaining that Europe is an obstacle to further bubble inflation.
No amount of Nvidia etching IP onto wafers is worthy of a 4.6 TRILLION market cap - bigger than the 4.2 Trillion market cap of the ENTIRE name-brand pharmaceutical industry.

Comment AI for debugging (Score 1) 248

Sometimes I use AI to write quick functions with bounds checking, it does a decent job, but it always needs tweaking.

AI shines for debugging, when I have something that "should" work, I copy/paste the errors or problem description into AI and ask "How to Fix ELI5"

Once, AI even suggested there was a bug in a library, and it was right.

Note: I pay for Google Gemini 2.5 Pro and find it the best for coding compared to Chat-GPT.

Gemini does a good job of breaking everything down.

Here is an example from a mysql session timeout (brokenpipe) a problem that I just fixed this morning, with the help of AI. :)

-- START Gemini Pro Session --

ELI5: Fixing "MySQL server has gone away (BrokenPipeError)"
The Problem Explained Like You're 5
Imagine you're on the phone with a friend (the MySQL server). You're talking, everything is fine. Then, you put the phone down for a while to do something else. Your friend, thinking you're done talking, hangs up. A little later, you pick up the phone and start talking again, but your friend is no longer there. All you hear is a dial tone. This is the "Broken pipe" or "MySQL server has gone away" error.

In your code, your application (you) was connected to the MySQL database (your friend). It kept the connection open in a "pool" of connections to be reused, which is efficient. However, the connection sat idle for too long, and the MySQL server, to save resources, automatically disconnected it (hung up). When your application tried to use that same connection again, it discovered the connection was dead, leading to the error.

This specific error trace shows that SQLAlchemy, a tool that helps your Python code talk to the database, tried to clean up (rollback a transaction) on a connection that had already been dropped by the server.

The Fix: How to Keep the Conversation Going
The most common and effective way to fix this is to tell SQLAlchemy to check if the connection is still alive before using it, or to regularly refresh the connection. Here are the recommended solutions, from most common to more specific:

1. Recycle Connections (pool_recycle) - The "Hang Up and Redial" Approach
This is the most common and generally recommended fix. You can tell SQLAlchemy to automatically close and replace connections that have been open for a certain amount of time. This time should be less than the MySQL server's wait_timeout (which is often 8 hours by default, but can be much shorter on some hosting providers). A safe value is often 3600 seconds (1 hour) or less.

When you create your SQLAlchemy engine, add the pool_recycle argument:

Python

from sqlalchemy import create_engine

# Add pool_recycle to your engine creation
engine = create_engine(
        "mysql+pymysql://user:password@host/dbname",
        pool_recycle=3600
)
2. Pre-Ping Connections (pool_pre_ping) - The "Are You Still There?" Check
This option tells SQLAlchemy to send a very small, quick message (a "ping") to the database to see if the connection is still active before your application uses it. If the ping fails, SQLAlchemy will replace the dead connection with a new one. This is very reliable but adds a tiny bit of overhead to each database operation.

Python

from sqlalchemy import create_engine

# Add pool_pre_ping to your engine creation
engine = create_engine(
        "mysql+pymysql://user:password@host/dbname",
        pool_pre_ping=True
)
For many applications, pool_pre_ping=True is the most robust solution.

3. Adjusting Server-Side Timeouts (If you control the server)
If you have administrative access to your MySQL server, you can increase its wait_timeout value. This tells the server to wait longer before hanging up on idle connections. You would typically change this in your MySQL configuration file (my.cnf or my.ini).

[mysqld]
wait_timeout = 28800
After changing this, you must restart the MySQL server. However, it's often better to make your application more resilient (using pool_recycle or pool_pre_ping) than to rely on server-side settings.

4. For Large Queries: Check max_allowed_packet
Less commonly, this error can occur if you are trying to send a very large piece of data to the database that exceeds the server's max_allowed_packet size. If you are inserting or updating a row with a lot of text or a large binary file, and the error happens consistently with that operation, you may need to increase this value in your MySQL server's configuration file.

[mysqld]
max_allowed_packet=64M
Again, this requires server access and a restart of the MySQL service.

Summary
In most cases, the simplest and most effective way to fix the "MySQL server has gone away" error is to configure SQLAlchemy's connection pool to handle stale connections gracefully. Start by adding pool_pre_ping=True or a reasonable pool_recycle value to your create_engine call. This ensures your application doesn't try to talk on a dead line.

Slashdot Top Deals

A hacker does for love what others would not do for money.

Working...