Better HN
topnewbestaskshowjobs
Log inSign up

randomdata

8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions

Submissions

comment 2y ago · link · parent

To be clear, we're talking about what would more reasonably be called a query builder, but which for some reason has taken on the "ORM" monicker. Ever since duality views were invented, it's questionable how relevant ORMs (in the original sense) even are – maybe as a remaining stop gap for working with DB engines that haven't yet acquired such a feature.

I'm not sure if "add" is the right framing, but I posit the reason people reach for query builders/ORMs is:

1. Because SQL is not reasonably composable.

2. Because SQL syntax is horrid.

3. Because SQL implementations are terribly inconsistent.

Adding some layer of protection above the pitfalls Codd speaks to in this paper is an additional benefit, but I don't expect that is a driving motivator; still something to address. I'm probably forgetting other things, but something that tackles those issues would go a long way in reliving any desire to add another abstraction, with its own set of problems, on top.

comment 2y ago · link · parent

> In the end, we all learned to work with SQL, and to go around its idiosyncrasies.

In the same way we've learned to work with C and all its memory idiosyncrasies. But let's keep that between you and me as the poor Rust crowd is going to cry when you tell them that their language is unnecessary.

The problems Codd speaks of here are exactly the source of database-related bugs I continually see out in the wild. I'd expect to see it even more frequently, but a lot of developers have started using higher level languages like 'ORMs' that add some layer of protection from those issues. It aged quite well, frankly.

comment 2y ago · link · parent

Leaving the following claims that you think are true:

1. There is still a lot of criticism about SQL.

2. Users use higher level languages (e.g. "ORMs") [without involving SQL?]

3. Its flaws don't impact all that many people.

4. It is a shame [that SQL is mostly used as a compiler target] as it needn't be that way.

5. A well designed relational calculus could avoid these abstractions that come with their own problems.

To be fair, it could be that you don't know what you think about those claims, but since, as the original link points out, SQL does not have a "don't know" representation...

comment 2y ago · link · parent

He invented Alpha as part of his relational theorem, although it was never implemented. QUEL, of the Ingres/Postgres lineage, was heavily influenced by the design of Alpha and is the closest thing we have to what he envisioned.

SQL comes from Boyce and Chamberlain.

comment 2y ago · link · parent

There still is, but SQL is mostly used as a compiler target these days, with users using higher level languages (e.g. "ORMs") to hide the nastinesses. As such, its flaws don't impact all that many people.

Which is a shame as it needn't be that way. A well designed relational calculus could avoid these abstractions that come with their own problems.

comment 2y ago · link · parent

People meaning him, which is why he won't "chest thump" anything related to functional programming. After all, chest thumping is a display of dominance. The others witnessing the chest thumping are meant to be scared. You wouldn't hold back because they are scared.

Which is to say that he is not actually afraid, it's just a roundabout way to say that the only reason he is on the Rust trumpeting bandwagon is because it what is in fashion.

comment 2y ago · link · parent

> Have you looked at this per province or per 1mm+ population city, rather than a Canada wide average?

Not exhaustively, but it is as true nationally, as it is in Toronto, Vancouver, Calgary and even many rural areas. Sure, there is probably some outlier – there always is – and CREA (Canada's unfortunate source of housing price information) doesn't collect/publish data for every last nook and cranny of the country anyway, but the general trend is abundantly clear.

comment 2y ago · link · parent

Let's assume, for the sake of discussion, that it is. Is rudeness not rooted in the very same misguided and flawed identity concept? I don't suppose a monkey that you cannot discern from any other monkey giving you the middle finger congers any feelings of that nature. Yet, here the output of software has, I suspect because the software presents the message alongside some kind of clear identity marker. But is it not irrational to be offended by the output of software?

comment 2y ago · link · parent

> When numerous AI experts and luminaries who left their jobs in AI are advocating for AI regulation, that's much more likely to be being done in good faith.

Their big revelation that they left their jobs over is that AI might be used to usurp identities, which, admittedly, is entirely plausible and arguably already something we're starting to see happen. It is humorous that your takeaway from that is that we need to double down on their identity instead of realizing that identity is a misguided and flawed concept.

comment 2y ago · link · parent

Yes, the bet was that the provinces would agree with the action. As you point out, it turns out they did not.

You win some, you lose some. 'Tis the nature of betting.

comment 2y ago · link · parent

> the speed it's increasing is insane.

I suppose you are referring to rent? On average, the price of buying a Canadian home in nominal dollars hasn't really changed since 2021, which, thanks to inflation, means that buying a home is around 12% less expensive now. That's a decrease, and not an insignificant one at that.

comment 2y ago · link · parent

> (bye-bye GM!)

To be fair, at this point only the Ultium EV-based models won't have CarPlay, and they are struggling to build them anyway. Even if they do figure out the production issues and achieve the targets of their wildest dreams, they will still only account for around 6% of all the vehicles GM produces. They're not exactly betting the farm on it.

comment 2y ago · link · parent

They released "App Store" for the average Joe. We can all agree it is not suitable for power users, but at the same time what would power users gain over existing solutions if they were to introduce something?

comment 2y ago · link · parent

CoreData is an object graph and persistence framework. It is more like an ORM toolkit than like a database engine. Indeed, SQLite is one of the possible 'backends', but it is not limited to SQLite. It also supports XML, binary, and in-memory stores out of the box, and you can also create your own if none of those suit.

comment 2y ago · link · parent

> Why?

Why not?

"Highly skilled" people are highly sought after because, by and large, they are the people most likely to create new capital. Success in creating new capital begets a desire to create even newer capital and so long as the people continue to be successful in capital creation efforts, there is really no end.

Not a whole lot different as to why Silicon Valley hasn't stabilized with Detroit. Of course, Detroit is also interesting here because it provides a cautionary tale as to what happens when capital creation seizes up. That is what Canada is desperately trying to avoid by trying to bring in the "highest skilled" people from other countries.

comment 2y ago · link · parent

> Rust brings some of the virtues of functional into procedural code/average developer hands

But so does, say, ATS and does a better job on the aforementioned merits. But, indeed, it is not in fashion.

> At the end of day, people are afraid of functional languages.

To be fair, they are also afraid of Rust.

comment 2y ago · link · parent

> I chest thump because more errors happen at compile time, and fewer at runtime.

Why Rust, then? It is not particularly good on this front. Hardly the worst, but is still pretty Mickey Mouse compared to the languages that excel here.

I expect the zealotry/chest thumping is entirely a product of fashion. There are some things about Rust that are truly great, but nobody would go out of their way to mention it if it wasn't what is in style.

comment 2y ago · link · parent

> If they could spend 3 times less by simply training developers to use Smalltalk instead, they'd be doing it.

No they wouldn't. While not bad long-term thinking, by the time developers are up to speed with Smalltalk and realizing three times the output, the competition using the ecosystem its developers already knew will have launched something and won over the customers. It doesn't matter how much software you can crank out after you've already lost.

comment 2y ago · link · parent

Complete, not Turing complete. How on earth did you manage to add an entire new meaning into the discussion that wasn't there before? I'm getting flashbacks of the earlier comment that started randomly going off on some weird tangent about how tests don't catch all bugs.

Anything to avoid the actual topic at hand, I guess?

comment 2y ago · link · parent

> They didn't realise because they hadn't written a test.

If someone hates future developers so much that they wouldn't write a test, why would they suddenly take care to write proper types? I've worked with those kind of people before. The reality is that they won't define any specific types either, relying on `any` (or whatever the language's equivalent is) to minimize the social footprint.

> They asked me to check if it fixed my issue

I get you work with an asshole who hates other developers, but why would they need to ask if it solves your issue when they can just run the tests you wrote to assert the issue you discovered? Well, okay, being an asshole they maybe just wanted to see what meaningless busywork they could force you to do, but then why didn't you at least run your tests rather than spending minutes hunting up and down for something that your test would have found instantly? Something doesn't quite add up here.

> when an IDE with static types would have told them their mistake instantly.

And most likely even an IDE with type inference, a la the original article. Did you even apply a type checker when faced with this problem? It would be quite ironic if you didn't.

> when an IDE with static types would have told them their mistake instantly.

As would the test, at least for any developers who don't have an intense hatred for other developers.

comment 2y ago · link · parent

The discussion taking place is about type checking plain Javascript. The comment you replied to questions why Microsoft didn't go down that road, something they ended up doing eventually anyway, instead of introducing a new language.

comment 2y ago · link · parent

> This is actually a fairly fundamental fact about static typing.

If you have a complete type system. But as we are specifically talking about partial type systems, you have to already cover all your bases for where the type system is lacking, and by virtue of that you are going to overlap with what the type system also covers.

> It's not stupid if you have a static typing system available!

There is no reason for it, static type system or not.

comment 2y ago · link · parent

If you have a complete type system, sure. Then you have constraint on the subtle mistakes one is likely to make.

The partial type systems found in languages people actually use, though, only constrain the most glaring of mistakes that you are almost never going to make. Not impossible that you could make one, but highly unlikely. Certainly not on the order of "lots". More like once in a blue moon.

Refactoring is a different story. Having an editor that lights up like a Christmas tree when code changes breaks existing relationships is a huge boon, and with good refactoring tools you almost never have to break the relationships in the first place. This is where (partial) static typing truly shines.

comment 2y ago · link · parent

> I didn't say it catches all bugs.

It is always telling when someone starts getting worked up about something, especially when that something wasn't even said or implied.

> Also the fact static typing eliminates entire classes of bugs means you need to write far fewer tests.

You don't need to write any more tests in the absence of static types. The purpose of testing is not to act as a replacement for static types and if you find yourself writing tests just for the sake of testing types, you know you're doing something horribly wrong. But, you necessarily have to encode type information into the tests in order of them to execute. After all, if that wasn't the case, you wouldn't even be able to catch bugs with a type system. As such, you gain that indirectly.

> I've seen Python tests that literally fed different types into functions and verified that they accepted them. What a misguided waste of effort!

Sure, I've seen developers do all kinds of stupid things too. In fact, give them Typescript and they will just litter the code with `any` everywhere – something I've witnessed far too often. There is no technical solution to bad developers. Was there supposed to be some meaningful takeaway here?

comment 2y ago · link · parent

> but there are no large smalltalk projects for two reasons:

But mostly because it was expensive. Objective-C and Ruby got you halfway there for free, and there is nothing developers love more than something that is free.

comment 2y ago · link · parent

> Many other languages haven't passed the PoC stage.

Wouldn't it be more accurate to say that WASM hasn't passed the PoC stage? There are quite a few languages that have great WASM support, to the extent WASM allows, but have to bring all kids of workarounds to deal with the shortcomings of WASM as it sits. An especially challenging problem as it relates to browser use with those workarounds is that they bloat the artifact size. Few are willing to subject users to multi-megabyte downloads.

Work is being done on WASM to address those shortcomings, but hands are pretty much tied until that arrives. Until then, the "lower level" and heavily constrained languages will be left to stand alone.

1
515253
256