8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions
comment 2y ago · link · parent
But what about the suburbs destroys that? Or, would it be more accurate to say that those who already don't have connections have a preference towards living in suburbs? Perhaps that is where they feel most at home?
comment 2y ago · link · parent
It is interesting that you say it is becoming a problem. Why was it not a problem in a past?
> It's a smaller town
Towns are usually considered urban. I was imagining actual, by definition, rural. Living in a small town (~2,000 people) right now, I'd say it has less of a social community that the rural areas I've lived in previously. Still nothing that should leave you feeling isolated, but there is certainly less of a "automatically friends with everyone" vibe. Granted, my rural experience is strictly in agricultural areas where everyone are farmers, which gives common ground on which to "automatically" become friends. If nothing else, you can talk about farming.
Is that the problem with the suburbs? That the people there can't find common ground on which to build friendships?
comment 2y ago · link · parent
That gets you halfway there, perhaps, but I'm not sure it explains how you would use it in an actual application. Are you back to writing hundreds of "SELECT * FROM recent_admin_users"-type queries in the application, once again exploding the development effort and maintenance surface – exactly what you're trying to avoid with these types of tools?
> ORMs, the original topic at hand, are an entirely different beast.
The original topic at hand is active record, not ORM. ORM is, as the name literally tells, about mapping between relations (or, in practice, tables) and objects. No sane person is going to bash ORM. They may dislike a particular toolkit that tries to help with ORM, but at very least they are going to do ORM by hand.
But that's not what we're talking about. The original comment that set the context for this particular discussion is about query building. It literally proposed using an LLM to generate queries instead. You can query build in the active record style: e.g. `User::all().admins().latest()`, but that's still query building, exactly like the earlier example except with a different API.
comment 2y ago · link · parent
The T in CTE literally stands for table. Even if you're right about the others, how could someone not think of that one as being a table? Regardless, now they can! Isn't education a wonderful thing?
> postgresql documentation uses
In fairness, Postgres originally implemented QUEL, which is relational. It didn't move to SQL until quite late in its life. It often takes longer to update documentation than to write code, especially in open source projects where the contributors tend to much prefer writing code over updating documentation.
> and have a method chaining syntax.
And this is often how composition is implemented. Not strictly so, but a common way to do it. Consider:
users = select("*").from("users")
admin_users = users.where("role = 'admin'")
recent_admin_users = admin_users.where("created > LAST_WEEK()")
And now imagine having tens, maybe even hundreds, of slight variations on the same query in the same vein. Each used in different parts of the application, which is quite common in any kind of line of business application. I'll save your bandwidth and not spell them all out as this is just a contrived example anyway, and I'm sure your imagination can fill in the blanks.Of course, you could do the obvious and write out 100 completely separate almost identical SQL queries, but that's not exactly maintainable and it's not the 1940s anymore. You are going to quickly hate everything about your existence as soon as those queries need to change. This is the reason people turn to query builders. If you only had to ever write one or two queries there'd be no point, but that never happens within the domain where these tools are used.
But perhaps there is a better way. This is where you would give us example code to show how you would replace that query builder code with a pure SQL solution.
comment 2y ago · link · parent
Duplicate rows, NULLs, ordering, etc. But there is no distinction to be made here, just calling attention to your grievous error so you don't make it again. We don't want to look like a fool again next time. Viva la education!
> I'm also not sure how to answer your question.
You put a lot of effort into a rather detailed response not once, but twice. You obviously know how to answer the question at a technical level, but perhaps you don't understand the nuance of my question? What I mean is: Show us some example code that demonstrates query builder composition and the pure SQL that you would use to replace it.
comment 2y ago · link · parent
2. I may be misinterpreting you, but you seem to be talking about composition of data, while the rest of us are talking about the composition of the language.
But, hopefully I've misinterpreted you. Perhaps you could demonstrate how query builder composition is best replaced in pure SQL?
comment 2y ago · link · parent
ORM has nothing to do with queries. It is about the data. You will still want to map your database structures to your application structures (and vice-versa), else you'll end up with a weird and ugly chain of dependencies that will forever ruin your codebase.
comment 2y ago · link · parent
Further, the project is focused on implementing the active record pattern, so it would be more appropriately called an async active record than an "async ORM".
comment 2y ago · link · parent
From the article: "We also have a dome of free Wi-Fi coverage over part of our downtown [Chochrane]. Do you have that in Toronto?"
comment 2y ago · link · parent
Seems like it would be difficult to use for what they are trying to achieve. Lua would be a better fit, however it is noted that they tried it first, but ran into some kind of issue with it. So now Limbo is among the "off the shelf" options.
comment 2y ago · link · parent
Yes, but this is conceptually exactly the same as the aforementioned shell scenario. This is not something different.
Just as I suspected, there is only one definition, and one that has proven to actually be well defined to boot as you managed to reiterate the only definition I have ever known to perfection.
comment 2y ago · link · parent
Yes, you can generate your test data in the host language. That dramatically reduces upfront complexity.
But that doesn't come free. Now it is not easily transferrable to other languages. If you recall rsc's somewhat recent talk on testing, they benefited greatly by being able to use similar DSLs from other projects in tests to ensure feature parity. It can be a huge boon to have your test data scripts in an "agnostic" language for 30 years down the line when you are no longer working in the same environment.
Tradeoffs, as always.
> I was expecting more than a few real world use cases
Maybe that's the only use-case they know of? The project was clearly built for a specific purpose.
That's not to say that it cannot be found useful elsewhere, but that doesn't mean they have found it to be. If someone else finds it useful in other applications, I'm sure they'll write their own document about it. That's what the web is for, after all.
comment 2y ago · link · parent
1. Given that their stated use-case for this tool is generation of data for testing purposes, why would input configuration be relevant?
2. It doesn't have any CSV-associated features to begin with. If for some reason you wanted to use this for that, you would interact with your own bound Go functions to facilitate working with CSV, just as demonstrated in the article. Within those functions, you can setup any configuration your heart desires.
comment 2y ago · link · parent
Which stands to reason. People only think about you if you do something for them. Newton and Einstein enabled the creation of capital that changed the world, so they are remembered. The guy who discovered something amazing beside them, but that which we still haven't figured out how to use, remains unknown.
comment 2y ago · link · parent
This is just another scripting language available. It only differs from something like Lua or Javascript in that it claims to have less complexity. Complexity which, while not fully elaborated on, apparently bogged down their efforts when they originally tried using Lua and an embeddable Go engine.
comment 2y ago · link · parent
If you still have to do the same job, but better, then you aren't be freed up for a higher level purpose. If we had taken your stance in earlier days of human history we'd all still be out standing in the field. Doing it slightly better perhaps, but still there, "wasting" time.
No, we are clearly better off that almost every job from the past was replaced. And we will be better off when our current jobs are replaced so that our time is freed up so to move onto the next big thing.
You don't think we have reached the pinnacle of human achievement already, surely?
comment 2y ago · link · parent
Only in the same way that returning an email address does. That does not change the color, though. It remains "black". This is just "normal" use of a function.
Yes, you can go out of your way to leak implementation details making the function no longer "black". async/await, use of the "?" operator, "return err", even checked exceptions all introduce leakage. That can result in a colorful rainbow of functions, but "unless you are doing it wrong" was caveated at the very beginning. The very first sentence I wrote, in fact.
Is that the source of your confusion, perhaps? That you somehow forgot to read the very first sentence? async/await is the only one that isn't yet generally considered a bad practice, and only because it is quite a bit newer than all the others, as we always learn in the end that leaking implementation details leads to pain.
> I've tried with much patience and good faith in spite of your aggressiveness
I really don't understand what you are trying to say here. Aggressiveness? Patience? Good faith? These have no applicability to the conversation, so I am, again, not sure what you are trying to say. Further, these are words that are usually used around emotion, which we both seemingly agreed does not shape our reading of the discussion, so I have no idea what else they could be referring to. What do you mean?