Fork me on GitHub
#off-topic
<
2024-04-25
>
mauricio.szabo14:04:15

Whattt??? If this works, it'll be amazing!

💥 4
p-himik14:04:31

Or, from a different perspective: "PostgreSQL? Isn't that just one of the MySQL engines?"

mauricio.szabo14:04:35

Well, most developers that I know have less knowledge about databases than I feel comfortable, so I'm ok with this approach if the database ends up using the indexes correctly :rolling_on_the_floor_laughing:

p-himik14:04:25

I think any kind of correctness in the MySQL world greatly depends on the engine. It's been some time and I looked only briefly, but I think there's at least one engine that can be compared to PostgreSQL in this sense. Also, it's not that rare that I hear that MySQL is actually better when it comes to ops. But I myself have never used MySQL at all, so don't trust what I say here. :)

thomas14:04:30

my colleague was telling me the other day that MySQL was great... but that it sometime corrupted data.... :thinking_face:

😂 1
p-himik14:04:45

That's... a take, I suppose.

Ed14:04:37

Having been responsible for keeping both running in production, I concur. Mysql has much easier tooling to deal with things like backups and replication. Mysqldump will also produce output with very specific options that will need to be set to make the application run correctly - dumping your db from mysql and importing it into pg and expecting it to just work is pretty naive, I think.

mauricio.szabo14:04:07

I hear people saying that managing PostgreSQL is indeed not that easy, but MySQL usually is worse in any engine. I remember having 300x better performance in PG instead of MySQL, and I don't think the scenario changed that much

Samuel Ludwig14:04:29

I'm not a trained DBA, but interface with and manage multiple (InnoDB) MySQL databases in my day to day at work. I'm not sure how other databases handle these problems, but when we ever get to a point of scale where we either need to move data, rotate data, or modify something, want to make something more reliable, it is what i imagine to be the actual physical manifestation of computerized depression.

Ed14:04:16

I think it very much depends on the app. I've seen mysql out perform pgsql in quite a lot of scenarios ... but pg has so many more features that it's often worth the effort

mauricio.szabo14:04:49

That's completely not my experience, really... especially with more complex queries. I remember 4 years ago, MySQL could not understand aggregations if the aggregated fields lived in two different tables - it would refuse to filter the query (basically - it first aggregated the whole query then filtered the result) or not use any index, or need a composite index to even consider it on the query. I still have some PTSD on a job I had, where people discovered I knew how to write some complex queries and would ask me for help optimizing MySQL stuff 😢

Ed14:04:02

Oh yeah, totally. Sub-selects were a huge missing query feature in mysql for the longest time. Often you could rewrite the query into a series of joins, but that required some mental gymnastics 😉 ... but for basic stuff, mysql was easier to get up and running, faster and easier to keep running. I've had terrible experiences with both, but at least they're not MSSQL 😜

isak15:04:21

Language and query-wise I actually prefer MSSQL, since you get variables (table and scalars), which you don't get in pg. That can be really important and powerful for complex queries. But the license is obviously a deal-breaker for today's world.

mauricio.szabo15:04:45

In my case there weren't even sub-selects, they were GROUP BY clauses and aggregations - which is hard, because it isn't possible to rewrite as joins 😞

mauricio.szabo15:04:32

I have no idea what are these vars 😄. For me, what I don't like MSSQL is how you can "escape" protection with NOLOCK, and because at the time I used, it locked stuff by page which could lock half of the table (and it did multiple times). The combination of both it what irked me...

isak15:04:42

Yea that is a problem. For newer ones I think you can use snapshot isolation to avoid that.

isak15:04:33

What I was talking about with the language is that it is just much richer than the pg sql - you can do control flow, variable assignments, etc. Table variables, either in memory or disk based. Haven't seen that for other dbs - I think you'd need to use a language extension. It is useful sometimes if you want to keep the logic close to the data, keep transactions quick, etc.

p-himik15:04:44

I think depending on how complex what you're doing is, you can use CTEs. And outside of the realm of standard SQL (and some PG extensions), you can always use plpgsql.

isak15:04:37

Yea CTEs work for some cases. And they might be better in pg, because I think the execution model does them more eagerly. In SQL server, it is more like a text substitution. Though even when they do work, they are collections, not scalars, which makes the usages noisier.

p-himik15:04:49

> the execution model does them more eagerly It depends. You can let the engine decide depending on the query and the data, or you can explicitly specify what you want. But yeah, noisy they are. With too much noise, plpgsql is the way. Or even Tcl or Perl or Python - PostgreSQL supports all of them by itself. There might be extensions for other langs.

👍 1
isak15:04:30

Hmm ok I need to look into that more. In SQL Server one cool thing is you can always use their version of plpgsql. In pg, it seems like it is only for functions/procedures, which is a bummer.

p-himik15:04:06

Oh, not at all! This is a plain query, outside of a function/procedure:

DO
$$
    DECLARE
        user_name TEXT;
    BEGIN
        user_name := 'isak';
        RAISE NOTICE 'Hello %s', user_name;
    END;
$$;

😮 1
isak15:04:36

Very cool, I will look into that more

seancorfield16:04:12

As someone who maintains SQL / JDBC related OSS projects, I love MySQL and I hate PostgreSQL 🙂

p-himik16:04:48

Because of the extensions to SQL?

seancorfield17:04:59

Mainly, yes, including their non-standard JDBC exception hierarchy and weird stuff like so much normalization of metadata that PG requires additional SQL queries behind the scenes that other DBs don't need... The majority of my maintenance pain for both HoneySQL and next.jdbc (and clojure.java.jdbc before it) is dealing with PostgreSQL users 😉

😞 1
gratitude 1
mauricio.szabo17:04:40

Well, that is for sure - MySQL supports less things than PG, so for libraries it's indeed complicated... I think the same could be said for Oracle, which also have a handful of their own extensions to SQL which complicates tooling support (at the time I used, don't know if things are still like that)

seancorfield17:04:27

We have used MySQL at work for 15 years and it's been great. We have some tables that have over 245M rows and it handles that fine.

seancorfield17:04:54

(meant to press enter on that half an hour ago!)

mauricio.szabo17:04:15

I kinda envy people that had good MySQL experiences, honestly hahahaha. My ones were nothing but pain and suffering 😄

pez14:04:35

Suno is pretty amazing. 😃

3
🎵 3
andy.fingerhut16:04:49

Suno is generative AI for music, I guess? What kind of prompt did you give it?

pez16:04:15

Yes, http://suno.com. This was the prompt: > bluegrass female quire: The REPeL is love. Interactive Programming keeps it fun. The Clojure Way. Immutable data. Just use maps! Value semantics! Higher order functions. conj, cond, some, assoc!

andy.fingerhut16:04:56

That is impressive

pez16:04:04

It writes songs in Swedish too, which is extra cool.

andy.fingerhut16:04:17

While casually browsing the sample generated songs, I happened across some Korean opera. I don't know Korean, so can't vouch for its language accuracy.

Jason Bullers16:04:28

The generated transcript is having a stroke 😄

Jason Bullers16:04:52

That's our guy

Jason Bullers15:04:20

Hope this kind of thing is okay to post here. A long, long time ago, I enjoyed playing Warhammer 40k and was really drawn in by the universe. I'd always found writing (and reading, of course) to be an enjoyable thing, and so I decided to write an original story set in the 40k universe. I got (what I can now say is) about halfway through before stalling out and having it end up in the project graveyard. Last year, I got back to writing (some technical blogs), primarily because I wanted to capture what's going on in my head for my son; maybe he'll find it interesting in the future. This year, I set myself the goal of finishing the story. I've also got a bunch more in the backlog (40k and wholey original stuff) that I intend to get to (gotta keep that momentum!) So, if any of you are interested, here it is: https://m.fanfiction.net/s/2718920/1/Dovator

🎉 5
💀 2
andy.fingerhut17:04:25

Happy Ubuntu 24.04 release day!

🎉 14
Jacob O'Bryant17:04:26

maybe this one will work with my external monitor 🤞

Ben Sless17:04:02

Oh, Snap

💥 4
Ben Sless17:04:10

How deep into the rabbit hole am I that I can complain, even rant, about Canonical and GNOME?

practicalli-johnny15:04:34

Loved using Ubuntu for the last couple of decades. I have switched back to Debian as I prefer not to have all those snap packages. The deb package has served me well since ~1995 so I don't see the need to change to snaps, flat packs, etc

borkdude20:04:57

Since today I have a red thing on the home icon in slack and I find it pretty distracting... Any idea what is causing this?

Jacob O'Bryant20:04:21

for the past... several months at least? the mobile app has always shown the distraction dot for this workspace whenever I'm in a different workspace, regardless of if there are new messages or not. I've given up hope of it ever being fixed.

borkdude20:04:52

only since today, it's red in my case

hiredman20:04:55

could be something under "later"

hiredman20:04:30

if you set a reminder for stuff now it isn't one and done, you have to explicitly dismiss it under later

borkdude20:04:36

that's all clear here at the moment

Jacob O'Bryant20:04:39

looks like you can email <mailto:[email protected]|[email protected]>; could be worth sending a bug report if it doesn't go away

Eduardo Caceres20:04:14

I think this is because you need to clear out your "Activity" tab

borkdude20:04:37

I also cleared out all the stuff on the activity tab

dharrigan21:04:15

I had it too, and I did "shift+esc" to mark everything everywhere as read, and the red dot disappeared, if that helps.

borkdude21:04:44

cool, I'll try that tomorrow, I'm on my other laptop now and everrything is normal black here

👍 1
borkdude21:04:38

I guess the only difference is the color. Probably if I refresh this browser window, it will get red too :/

borkdude21:04:53

since it's probably their new style or so

adi05:04:42

@U04V15CAJ looks like the red colour is a function of the theme ... if I set "aubergine", the dot is light gray, but if I set the theme to "gray", the dot becomes red

Martynas Maciulevičius07:04:30

For me the Ubuntu-style navigation isn't useful so I decided to disable it by hiding it. I use this CSS via an addon and I never see the sidebar (the green border is my window border):

.p-client_workspace {
  margin-left: -80px;
}
.p-tab_rail {
  display: none;
}