News for hackers. Stuff that matters.
Re:Rust-Query by vlovich123 on Saturday November 30, 2024 @11:57AM (#42282562)
> You can't get any higher level than SQL.

Can’t you? Wouldn’t higher level be a goal oriented natural language like “what’s the most popular music file in the database” and an AI agent just figured out how to give you the answer?

Re:Rust-Query by ninetyninenine on Saturday November 30, 2024 @12:00PM (#42282580)
Well. You know what I mean.

AI is also unreliable. Place chatGPT over a database and it's going to start lying about what is in it eventually.

That being said my statement likely isn't strictly true even when you account for ML. I'm sure there are even higher level languages that are not probability based and thus deterministic with expected results. But in terms of a software developers average experience, SQL is the highest level you can get without getting into the minefield that is LLMs.

Re:Rust-Query by threeseed on Saturday November 30, 2024 @04:04PM (#42284019)
> SQL is the highest level you can get without getting into the minefield that is LLMs

You can use NLPs to safely write SQL in more business language.

And of course there are GUIs.

Re:Rust-Query by kelnos on Saturday November 30, 2024 @06:10PM (#42284747)
> SQL is the highest level you can get without getting into the minefield that is LLMs

That's trivially false.

I'm currently playing with sea-orm[0], and I can write things like:

    let db = Database::connect(...).await?;
    let yesterday: chrono::DateTime<chrono::Utc> = ...;
    let foos: Vec<foos::Model> = Foos::find()
        .filter(foos::Column::Status.eq(FooStatus::Frobbed))
        .filter(foos::Column::UpdatedAt.gt(yesterday))
        .left_join(Bars)
        .also_select(Bars)
        .all(&db)
        .await?;
How is that not higher-level than SQL?

[0] https://crates.io/crates/sea-orm

Re:Rust-Query by cwbriscoe on Sunday December 01, 2024 @03:01PM (#42290349)
Why not just write SQL, it would be much more readable.
Re:Rust-Query by cmrdporcupine on Sunday December 01, 2024 @12:09AM (#42286342)
> SQL is the highest level you can get without getting into the minefield that is LLMs.

I mean, not really true. Datalog is relational, like SQL, but gives you a higher level rule-oriented mechanism for querying that can avoid a lot of the mechanics of explicitly joining things, for example.