Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment Re:Eighty-Five MILLION? SERIOUSLY? (Score 2) 117

Or you could NOT cut up the priceless historic artifact for no real real practical reason. Seriously? Am I stuck in a fking cartoon?

(Because TX really really wants it is not an actual reason)

How much we gonna bet that this is actually happening precisely because of those millions. It's either a payout for services rendered, or somehow designed to destroy somebody who refused the render said services... or maybe it's just another petty slight between our lofty lawmakers.

Comment Weird, (Score 1) 241

It's almost like when you go mask off and start rounding people up with your secret police and fill the leadership positions with useless angry goons people might stop buying bullshit and might even start getting serious about where they put their money.

Who could have seen this coming?

 

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.

Comment Re:Status quo has changed (Score 1) 43

This is bullshit. This is like proclaiming that all the houses are going to fall down because we invented a nail-gun.

LLMs allow me to hammer out a design framework and project flow in minutes. I'm still doing my own creating, my own art, and my own writing, I just don't have to fuck around doing a lot of the boring shit I don't enjoy doing. I can bounce ideas off of it without worrying about somebody stealing my ideas, and it sometimes pushes me in directions I hadn't considered before. Doing outlines and story framework is boring, and sometimes it's hard to even start a project knowing that shit is involved.

People using LLMs to generate creative works or content are fully in two categories. Those who would be doing what they're doing without the LLMS help, and those who would not, and the difference is obvious when you look at the finished product.

There's already a clear divide between AI slop and real content online, but I don't think it's going to lead to a content crash like the videogame crash of the 80s.

Amazon is already full of low effort obviously generated garbage, and the internet as a whole is already bursting with endless low effort bullshit pushed by untalented ghouls looking for a quick buck and clueless edgy teenagers not realizing their internet antics could follow them for years.

People are seeing the garbage that low effort fools are producing with LLMs and assuming that's all it can do because you cant even tell it was involved if it's used properly.

The real problem I see coming down the pipe is the dependency people are developing. There WILL come a time for profit, and when that time comes, we're going to have an entire generation of people who've already outsourced their cognitive abilities to their chosen LLM and simply wont be able to function with it.

I see the natural evolution of this tech a lot like the personal computer. Eventually, it's gonna be just another appliance in every home.

Today, nobody knows how to open a can of beans without a can opener, and I'm afraid we wont be able to learn without our learning machines.

Comment A new name then? (Score 1) 77

What's the new name gonna be? Colossus? HAL? Mother?

It's funny, you can tell what books the billionaire class are reading by the schemes they dump their money into and what they choose to call them. Zuck must finally be over his Snow Crash kick.

I'm honestly surprised it took Zucko this long to pivot. There's still too many actual tech people left in the world to convince the masses to "buy" invented Cyberspace real estate from a digital land baron.

The meta scam will work eventually. Maybe in 20 years, when the lions share of us graybeards are pissing ourselves and drooling.

Comment and it'll work too (Score 1) 62

Marketing will turn it around because normal people are not tracking Intels string of colossal fuckups.

Normal people buy laptops and game systems every 5 years or so. MS is forcing the turn this time, and people will buy what they know.

Open Source

FaunaDB Shuts Down But Hints At Open Source Future (theregister.com) 13

FaunaDB, a serverless database combining relational and document features, will shut down by the end of May due to unsustainable capital demands. The company plans to open source its core technology, including its FQL query language, in hopes of continuing its legacy within the developer community. The Register reports: The startup pocketed $27 million in VC funding in 2020 and boasted that 25,000 developers worldwide were using its serverless database. However, last week, FaunaDB announced that it would sunset its database services. FaunaDB said it plans to release an open-source version of its core database technology. The system stores data in JSON documents but retains relational features like consistency, support for joins and foreign keys, and full schema enforcement. Fauna's query language, FQL, will also be made available to the open-source community. "Driving broad based adoption of a new operational database that runs as a service globally is very capital intensive. In the current market environment, our board and investors have determined that it is not possible to raise the capital needed to achieve that goal independently," the leadership team said.

"While we will no longer be accepting new customers, existing Fauna customers will experience no immediate change. We will gradually transition customers off Fauna and are committed to ensuring a smooth process over the next several months," it added.

Slashdot Top Deals

Thus spake the master programmer: "After three days without programming, life becomes meaningless." -- Geoffrey James, "The Tao of Programming"

Working...