News for hackers. Stuff that matters.
Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by joseph on Friday February 05, 2016 @09:29PM (#11046225)
On the other hand, if you're already using Rust, why switch to another language just to talk to the database?
Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by Animats on Friday February 05, 2016 @09:40PM (#11046259)
There are much simpler standard ways to talk to a database from Rust:

https://crates.io/crates/postgres/

https://crates.io/crates/mysql/

This is an experimental approach. It might or might not be useful, but you don't have to use it.

Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by joseph on Friday February 05, 2016 @10:54PM (#11046481)
That's valid, but ORMs have been pretty standard for years now too. Most mature languages have either ORMs or some database abstraction libraries, so it's good to see Rust getting those now.
Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by mercurial on Saturday February 06, 2016 @02:53PM (#11049449)
> Most mature languages have either ORMs or some database abstraction libraries

And a lot of them really suck, too, because it's a hard problem. I'll take query builders or raw SQL over ORMs any day of the week.

Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by brandonbloom on Friday February 05, 2016 @10:04PM (#11046341)
+1

It seems like the intersection of good use case for Rust and need to use SQL, will also intersect with "minimal SQL needs", hence preference for simpler libraries.

[deleted]
Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by brandonbloom on Friday February 05, 2016 @10:14PM (#11046369)
Mentioned below where?

If you're talking about query string construction performance, I'm not sure I've ever seen even a Ruby application where query string building was a bottleneck vs the network.

Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by steveklabnik on Friday February 05, 2016 @10:15PM (#11046376)
Sorry, as you replied I had deleted my comment, because I decided I'd rather not get into an argument about this :) I will give you the link though:

https://news.ycombinator.com/item?id=11045700 <- "Diesel performs 33% faster than rust-postgres, and will be competitive with if not faster than ideomatic C. "

Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by brandonbloom on Friday February 05, 2016 @10:25PM (#11046401)
Forgive me, I didn't intend to be so argumentative. I genuinely want to understand. I'm trying to figure out if there are whole categories of use cases that I just don't have any exposure to.

As a side note: I keep trying Rust over and over again, and just can't get in to it. I think my brain just doesn't work that way. For my hobby project that needs super low level perf, I've moved a codebase from C, to Rust, and now to http://terralang.org/ and I'm finally quite satisfied with how the project is going.

Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by steveklabnik on Friday February 05, 2016 @10:31PM (#11046421)
Naw, it was my response that was more so than I wanted it to be. No worries. :)

Rust focuses on "zero-cost abstractions", that is, if you had to implement a feature yourself, you couldn't do it any better.

So this library, while more complex than a straightforward binding, has more features that are useful, like increased safety, while also being faster. A win-win. And very much in line with Rust's overall philosophy.

Re:Diesel: A Safe, Extensible ORM and Query Builder for Rust by rabidferret on Friday February 05, 2016 @10:31PM (#11046419)
It's a bit late here, but feel free to DM me in our Gitter room and I can give you a full explanation tomorrow.