#development

1 messages · Page 238 of 1

sharp geyser
#

really?

neon leaf
#

it shows % after its created

#

just tested

sharp geyser
#

Ah

knotty quartz
#

What do I do?

neon leaf
#

can you show more of your code? obviously redact password/username

sharp geyser
#

make sure your user and pass are correct

knotty quartz
lyric mountain
#

btw, depending on what's ur password, it might error if used in connect url

#

urls dont accept most special chars

sharp geyser
#

yea due to special characters

knotty quartz
#
const { Sequelize } = require('sequelize');

const sequelize = new Sequelize('REDACTED', 'REDACTED', 'REDACTED', {
  host: 'REDACTED',
  dialect: 'mariadb'
});

try {
    sequelize.authenticate();
    console.log('Connection has been established successfully.');
  } catch (error) {
    console.error('Unable to connect to the database:', error);
  }```
sharp geyser
#

oh god sequelize

knotty quartz
#

The host is just the endpoint

sharp geyser
#

I haven't used that in ages

#

You are using mysql right?

lyric mountain
#

maria

sharp geyser
#

same difference

knotty quartz
lyric mountain
#

technically, but less squizophrenic than mysql KEKW

neon leaf
sharp geyser
#

so it doesn't matter

knotty quartz
#
  host: '127.0.0.1',
  dialect: 'mariadb'
});

try {
    sequelize.authenticate();
    console.log('Connection has been established successfully.');
  } catch (error) {
    console.error('Unable to connect to the database:', error);
  }```
sharp geyser
#

or at least it shouldn't

lyric mountain
#

it aint a superset, it's a fork

sharp geyser
#

bro redacted 127.0.0.1

lyric mountain
#

127.0.0.1 is localhost lul

knotty quartz
#

I redacted everything 😭

sharp geyser
#

it adds on very little that makes it better

neon leaf
#

well are you 100% sure its a valid ipv4

sharp geyser
#

Not sure if it will help

neon leaf
#

run ping <host>
in your terminal and see if it works

knotty quartz
neon leaf
#

oh...

#

its one of those hosts

knotty quartz
#

I can open a ticket with them

neon leaf
#

yeah would be best

#

otherwise try your servers primary ip

#

maybe its on the same node

sharp geyser
#

Are you ssh into this?

neon leaf
sharp geyser
#

No idea what that is

lyric mountain
#

use your server's ip yeah

neon leaf
sharp geyser
#

Okay

lyric mountain
#

chances are the db is hosted in a separate sandbox

knotty quartz
sharp geyser
#

And they are using this to run what exactly

neon leaf
sharp geyser
#

if you can't even ssh into it sounds painful to use

lyric mountain
#

if so, it'll be the same address u used there

knotty quartz
lyric mountain
#

aside from the /endpoint ofc

#

well, then go to network tab as 0x said

sharp geyser
#

Why do people use a game panel for discord bots

neon leaf
sharp geyser
#

I guess

knotty quartz
#

Didn't work

neon leaf
#

well yeah ask in a ticket then

knotty quartz
#

Have done! Thank you!

lyric mountain
#

ptero makes things much harder than they need to be

neon leaf
#

this host seems to have it set up horribly

knotty quartz
#

They had there own host link 😭

#

Works now!

surreal sage
#

intel inside ❌
bomb inside ✅

proven lantern
#

zig is looking much better so far

neon leaf
#

I mean idk what exactly that is referring to but seems better yes

lyric mountain
#

tbh most performance issues are pebkac than language-bound

proven lantern
#

it's the code that needs to respond to discord within 3 seconds

proven lantern
#

i had to write everything myself in zig

lyric mountain
#

maybe, doesn't rust have some sort of profiler?

#

in java this usually tells me what's taking too long to finish

proven lantern
#

rust was pretty fast. maybe i could try to optimize it later for fun

#

the zig logic is the same as the rust logic. i didn't do anything different in rust

frosty gale
#

i dont see many people using zig

#

havent seen any mention of it in job adverts either

proven lantern
#

it's still new. not even v1 yet

#

but it is a pain to write

lyric mountain
#

very few would risk going into a new language for business, that's why jobs are scarce

#

at the end of the day knowing java, python, js/ts and dart covers almost 80% of all offers

neon leaf
#

when will there be a programming language called "english"

#

whose interpreter is just an ai

lyric mountain
#

there is

neon leaf
#

that turns it into another lang

lyric mountain
proven lantern
#

maybe an embedded programming job would want you to know Zig. not needed for webdev

#

and they probably like C/C++ more

lyric mountain
#

nah, it's too risky

#

not so long ago there was Carbon, which would "definitely kill c++"

#

it died in a week or so

proven lantern
#

zig is only trying to kill c

lyric mountain
#

businesses cant afford to build a project on a language that might not be continued for long

#

they usually seek for those with more estabilished foundation

frosty gale
#

ah didnt know its new

proven lantern
#

was/is carbon for profit?

frosty gale
#

was just about to mention carbon

#

i started getting spammed with tag updates for the repo a few weeks ago

#

so i think its still going on

#

will probably be production ready in a few months if it isnt already

#

but yeah the hype right now is basically dead for it

#

i dont hear any mention of it

proven lantern
#

looks like a google language

frosty gale
#

and its basically becoming rust since a lot of the contributors are rust people, if i want rust syntax i'll just use rust lol

#

i think its losing its focus as a result

#

appears like a messy language with no longer a clear goal

neon leaf
#

didnt they say theyd release 2025

proven lantern
charred nest
#

has anyone else here tried Outerbase?

warm imp
#

`Received one or more errors

input[0]
| ValidationError > s.object(T)
| Expected the value to be an object, but received string instead
|
| Received:
| | '## Server Bumped Successfully!'

input[1]
| ValidationError > s.object(T)
| Expected the value to be an object, but received string instead
|
| Received:
| | 'Details:'

input[4]
| ValidationError > s.object(T)
| Expected the value to be an object, but received string instead
|
| Received:
| | 'Bump Cooldown: 2 Hours'

input[5]
| ValidationError > s.object(T)
| Expected the value to be an object, but received string instead
|
| Received:
| | 'Bumped: Coming Soon'`

How to fix?

#

I need a object but how to do

lyric mountain
#

information is scarce, but I guess those texts are embed fields?

#

if so, you're supposed to pass fields, not pure strings (cuz a field has title, body and inline flag)

sharp geyser
charred nest
#

yeah, it brings it up as a table + you can edit/change on the site itself

sharp geyser
#

Interesting

#

dbeaver is free though

#

so I've never looked into other means

#

Might look at outerbase

lyric mountain
#

datagrip onionpray

sharp geyser
#

datagrip is not free

lyric mountain
#

it's free if ur a maintainer in some project

sharp geyser
#

Yea

#

But im not

#

so

lyric mountain
#

skill issue

sharp geyser
#

says you

lyric mountain
charred nest
#

its mostly sql based

quartz kindle
#

is that like a cloud db that supports 84848 different dbs?

neon leaf
#

84849 dbs

charred nest
#

it accesses data of an already existing db

#

basically data management

neon leaf
lyric mountain
#

why are u converting a hash to int?

#

also all hashes by definition will match that regex

#

last but not least, I seriously doubt mojang would use anything but a single hash type for their builds

#

which is likely to be md5, as security isn't a concern

frosty gale
#

how did you scan that code so quick

#

kuuhaku is chatgpt confirmed

lyric mountain
#

eh, it aint that complex

frosty gale
#

im probably just dyslexic

#

have to move my chromium clone to hdd because its taking up like 20% of my ssd

lyric mountain
#

...you forked chromium?

frosty gale
#

youre the second person that said that

#

yes i did

#

and i see why its an issue

lyric mountain
frosty gale
#

wait until you hear about me trying to build it next

neon leaf
neon leaf
neon leaf
lyric mountain
#

well, you can use or

#

WHERE buildhash = :hash OR buildid = :id

#

also do you need that inner join?

neon leaf
#

I mean yes, I need the build data unless im understanding incorrectly

lyric mountain
#

oh right, nevermind the froms are different

#

u can select from builds and inner join with buildHashes

#

then use the OR condition as I mentioned

neon leaf
#

wouldnt that effect performance negatively

#

I mean I dont fully understand sql logic yet

lyric mountain
#

if the keys you're joining are indexed it wont matter at all

neon leaf
#

but Id think it selects all builds and hashes internally to then compare

#

ah okay

lyric mountain
#

it's not exactly in the sequence you declare operations

#

tim sent the full sql logic here long ago

#

SELECT is actually the last operation in the sequence

neon leaf
#

I mean my main focus is on doing as little requests as possible and scanning as little rows as possible

#

since it takes like 150ms for any db call minimum

frosty gale
#

that database is taking its sweet time

#

probably network latency

neon leaf
#

yeah serverless moment

lyric mountain
neon leaf
#

I see

lyric mountain
#

yes, use a sub query

neon leaf
#

Alr I'll look into it tomorrow when I slept more than 1 minute

eternal osprey
#

I once tried to load 8tb into my own hdd, i was such a fool back then lol (it was a week ago)

#

thankfully it didn't even run, really strange it actually did ran and transferred 10gb but then stopped for some reason.
idk scala been acting up

frosty gale
#

if i understood correctly theyre supposed to be like stores in react and svelte but in native js

#

so you can listen to reactive changes

sharp geyser
#

For what reason

frosty gale
#

this is supposed to be

#

replaced by this

#

@quartz kindle might be interesting to read

sharp geyser
#

I mean cool ig

frosty gale
#

i doubt this will be added

#

not a big fan of it

#

still in stage 1 and its been a year

quartz kindle
#

if anything you could use the same approach as Atomics do

#

but otherwise it would create a syntax mess

#

imo reactivity should be controlled and implemented in userland, it doesnt make much sense to have it built in when you already have stuff like atomics and proxy that can acomplish the same thing

plain bough
#

YOOOO

#

MY BOT GOT APPROVED

past field
#

i’ve fucked up my game

#

and i get this error

#

so basically i tried to remove the "games_played" and it messed up the game so i tried to undo the changes i made and now i get this

#

any help is greatly appreciated

sharp geyser
#
game.players.forEach(playerId => {
                            const stmt = db.prepare('INSERT INTO players (id, games_played, games_won, click_war_coins, player_lives) VALUES (?, 1, 0, 0, 0) ON CONFLICT(id) DO UPDATE SET games_played = games_played + 1');
                            stmt.run(playerId);
                        });
#

this part right here is the cause

#

id is not unique or a primary key it seems

#

So you can't use on conflict

past field
#

how do i fix it?

#

thank you for responding so quickly

sharp geyser
#

You will have to make id unique / a primary key

#

or use an already defined unique / primary key field

#

If this is a database with data already in it

#

look into ALTER and migrations

#

It will mitigate data loss

past field
#

so look into alter and migrations to mitigate data loss and make id unique/primary key?

sharp geyser
#

yup

#

either that or use another field that is already unique/ a primary key

#

generally though your id field should be unique and a primary key

past field
#

hm

#

ok fixed it

#

the data is all screwed up though

#

i just wanted to get rid of the games_played and the win percentage

past field
# sharp geyser yup

how can i just remove games played and win percentage so that my /profile command only showed number of games won, click war coin balance and purchased lives balance

sharp geyser
#

you will have to use ALTER like I said

#

That is if you want to remove it from the database entirely

past field
#

ah ok i gotcha

proven lantern
#

remember when Flux was big and almost got decorators added to ecmascript. that would have been so bad

grave drift
#

hmm how can i make topgg votes leaderboard command in discord.py

neon leaf
#

@lyric mountain it works

WITH current_build AS (
    SELECT *
    FROM "minecraftServerBuilds"
    WHERE id = 174773
),
latest_build AS (
    SELECT *
    FROM "minecraftServerBuilds" msb
    WHERE msb."type" = (SELECT "type" FROM current_build)
      AND (
          msb."versionId" = (SELECT "versionId" FROM current_build) 
          OR 
          msb."projectVersionId" = (SELECT "projectVersionId" FROM current_build)
      )
    ORDER BY msb.id DESC
    LIMIT 1
),
builds_count AS (
    SELECT 
        COALESCE(cb."versionId", cb."projectVersionId") AS version_id,
        COUNT(*) AS build_count
    FROM "minecraftServerBuilds" cb
    WHERE 
        cb."versionId" = (SELECT "versionId" FROM current_build)
        OR cb."projectVersionId" = (SELECT "projectVersionId" FROM current_build)
    GROUP BY COALESCE(cb."versionId", cb."projectVersionId")
),
version_data AS (
    SELECT 
        v.*,
        COALESCE((SELECT "versionId" FROM current_build), (SELECT "projectVersionId" FROM current_build)) AS version_id
    FROM 
        "minecraftVersions" v
    WHERE 
        v.id = COALESCE((SELECT "versionId" FROM current_build), (SELECT "projectVersionId" FROM current_build))
)
SELECT 
    cb.*, 
    COALESCE(bc.build_count, 0) AS build_count, 
    vd.*
FROM 
    current_build cb
LEFT JOIN 
    builds_count bc ON bc.version_id = COALESCE(cb."versionId", cb."projectVersionId")
LEFT JOIN 
    version_data vd ON vd.id = COALESCE(cb."versionId", cb."projectVersionId")

UNION ALL

SELECT 
    lb.*, 
    COALESCE(bc.build_count, 0) AS build_count, 
    vd.*
FROM 
    latest_build lb
LEFT JOIN 
    builds_count bc ON bc.version_id = COALESCE(lb."versionId", lb."projectVersionId")
LEFT JOIN 
    version_data vd ON vd.id = COALESCE(lb."versionId", lb."projectVersionId")
WHERE 
    COALESCE(lb."versionId", lb."projectVersionId") IS NOT NULL;```
quartz kindle
#

holy sql

lyric mountain
neon leaf
#

yes

#

it only scans 3100 rows though

#

this is already 200ms faster than the original

#

but is there anything else I could change

lyric mountain
#

well, yes

#

WITH is not a stored resultset you see, it's basically an alias

#
SELECT * -- returned
FROM build b -- the build
WHERE b.id = :id -- with the specific id
   OR b.id = ( -- and
      SELECT max(b2.id) -- the highest id
      FROM build b2 -- build
      WHERE b2.version_id = b.version_id -- for a specific version_id
        AND b2.type = b.type -- and type
   )
#

you just need to convert your spoken requirements into sql

#

usually translates 1:1

frosty gale
#

so its possible in a year or so it will be moved to stage 2 if its considered further

#

id honestly give up trying to propose anything to ES

#

id have lost motivation by year 1

#

i have a feeling this is to weed out bad suggestions and to give the community time to criticise it

#

and to weed out people unwilling to pursue the change long term

neon leaf
#

if thats true i need to use project_version_id

#

and change how I get the build count

lyric mountain
#

just use coalesce(b2.version_id, b2.project_version_id) = coalesce(b.version_id, b.project_version_id)

neon leaf
#

even if version_id is set on the initial id

#

idek why

lyric mountain
#

then the id isn't unique

neon leaf
#

it is

lyric mountain
#

because that select should return exactly 2 rows

neon leaf
#

all ids returned are different

#

id is a pk too

lyric mountain
#

it's just not possible for it to return more than 2

neon leaf
#

same issue in postgres

#

so not a d1 problem

lyric mountain
#

execute the inner select to see what it returns, replace b.version_id and b.type with what'd be the values

neon leaf
lyric mountain
#

doesn't make sense then

#

but try this:

neon leaf
#

I think its fetching for each build for each type and version

civic scroll
#

database shenanigans

lyric mountain
#
WITH spec_build AS (SELECT * FROM build WHERE id = :id)

SELECT b.*
FROM build b
INNER JOIN spec_build sb ON sb.id = b.id OR (sb.version_id = b.version_id)
#

hm no, wont work

#

it'll return a single row

neon leaf
#

that only returns latest

#

yes

lyric mountain
#

it doesnt

#

it returns both on a single row

neon leaf
#

o

lyric mountain
#

try this

neon leaf
#

wait ill try to fix

#

okay well almost fixed

#

but it returns all waterfall 1.18 builds

lyric mountain
#

oh, right, I forgot type on it

#

no wait

#

there

#

nah scratch that

#

having doesnt work with windows

#
WITH spec_build AS (SELECT * FROM build WHERE id = :id)

SELECT *
FROM spec_build

UNION ALL

SELECT *
FROM (
  SELECT b.*
  FROM build b
  INNER JOIN spec_build sb ON sb.id = b.id OR (sb.version_id = b.version_id AND sb.type = b.type)
  ORDER BY b.id DESC
  LIMIT 1
) x
#

what about this?

neon leaf
#

returns 1 row, the latest build

#

seems to just be both in the same row again

lyric mountain
#

hm, maybe the limit is global

neon leaf
#

that seems to work

lyric mountain
#

then limit is global

#

actually, u can change that a bit more

#

nvm, u cant

neon leaf
#

got it to work with COALESCE

#
WITH spec_build AS (SELECT * FROM builds WHERE id = 174853)

SELECT *
FROM spec_build

UNION ALL

select * from (
SELECT b.*
FROM builds b
INNER JOIN spec_build sb ON sb.id = b.id OR (COALESCE(sb.version_id, sb.project_version_id) = COALESCE(b.version_id, b.project_version_id) AND sb.type = b.type)
ORDER BY b.id DESC
LIMIT 1
) x```
#

alr so last thing needed now is to join minecraftVersions when version_id is not null

#

and count the builds for version_id or if not there project_version_id

#

how would that now work with union all in that place

lyric mountain
#
WITH spec_build AS (SELECT * FROM build WHERE id = :id)

SELECT *
     , 0 AS build_count
FROM spec_build

UNION ALL

SELECT *
FROM (
  SELECT * 
  FROM (
    SELECT b.*
         , count(1) OVER () AS build_count
    FROM build b
    INNER JOIN spec_build sb ON sb.id = b.id OR (sb.version_id = b.version_id AND sb.type = b.type)
    ORDER BY b.id DESC
  ) x
  LIMIT 1
) x
#

just do this

#

then sum build_count when showing it

#

I'm not sure if LIMIT affects window functions, you can try without the second inner select

#

if it doesnt affect then you dont need it, otherwise it has to be like that

neon leaf
#
WITH spec_build AS (SELECT * FROM builds WHERE id = 5364)

SELECT *
     , 0 AS build_count
     , '' as version_type
     , 0 as version_java
     , 0 as version_created
     , 0 as version_supported
FROM spec_build

UNION ALL

SELECT *
FROM (
  SELECT *
  FROM (
    SELECT b.*
         , count(1) OVER () AS build_count,
         mv.java as version_java, mv.created as version_created, mv.supported as version_supported, mv.type as version_type
    FROM builds b
    INNER JOIN spec_build sb ON sb.id = b.id OR (COALESCE(sb.version_id, sb.project_version_id) = COALESCE(b.version_id , b.project_version_id) AND sb.type = b.type)
    LEFT JOIN minecraftVersions mv ON mv.id = b.version_id
    ORDER BY b.id DESC
  )
  LIMIT 1
) x```
#

this seems to work as I need it

#

however

#

how tf did this happen

lyric mountain
#

yk u can just mv.* right?

neon leaf
#

I dont need all fields

#

and I need custom aliases

lyric mountain
#

aight

#

that happened because u need to coalesce version_id

#

if it's null then it'll mv.id = NULL

neon leaf
#

I mean

lyric mountain
#

also

neon leaf
#

the fields are switched

#

why is version_supported the value of mv.type

lyric mountain
#

you should left join on the outer select

#

not inside

neon leaf
#

whats the difference

#

I still dont understand joins

lyric mountain
#

if you join inside you'll join rows that'll be ignored right after

#

due to LIMIT 1

#

joining in the outermost scope will join a single row

neon leaf
#

okay

#

done, seems to not change anything so fine ig

neon leaf
lyric mountain
#

highlight the inner select, run it alone

#

remove spec_build join so u can run it

#

it's likely the actual values are switched in your table

neon leaf
#

well no the table is fine

#

I dont think a string is suddenly in an integer field

lyric mountain
#

oh, wait

#

you didn't honor the column sequence

neon leaf
#

hm?

#

OOO

lyric mountain
#

when doing union all, the firstmost select defines the column names

#

the others dont need alias at all

neon leaf
#

uhhhhhh

#

the left join broke things

#

it made max be the highest build in the table

#

rest seems fine now

#
WITH spec_build AS (SELECT * FROM builds WHERE id = 5364)

SELECT *
     , 0 AS build_count
     , '' as version_type
     , 0 as version_java
     , 0 as version_created
     , 0 as version_supported
FROM spec_build

UNION ALL

SELECT *
FROM (
  SELECT *
  FROM (
    SELECT b.*
         , count(1) OVER (),
         mv.type, mv.java, mv.created, mv.supported
    FROM builds b
    INNER JOIN spec_build sb ON sb.id = b.id OR (COALESCE(sb.version_id, sb.project_version_id) = COALESCE(b.version_id , b.project_version_id) AND sb.type = b.type)
    LEFT JOIN minecraftVersions mv ON mv.id = b.version_id
    ORDER BY b.id DESC
  )
  LIMIT 1
) x```
lyric mountain
#

yes, because you're joining with another table

#

possibly duplicating rows or adding rows that wouldn't be there

#

as I said before, move it to the outermost scope

neon leaf
#

you mean in the scope the limit 1 is in?

#

or even further

lyric mountain
#

outermost, the one right below union all

#

joining where limit is would result in the same thing

neon leaf
#

LEFT JOIN spec_build sb ON sb.id = x.id OR (COALESCE(sb.version_id, sb.project_version_id) = COALESCE(x.version_id , x.project_version_id) AND sb.type = x.type)?

lyric mountain
#

outermost aka "the one that's not nested in any from"

neon leaf
#

okay

#

I think my main issue I cant actually see syntax errors

#

because my sql client has half assed d1 support

lyric mountain
#

why are u left joining it?

#

you already have all that data

neon leaf
#

ok now im confused

lyric mountain
#

like, you're repeating the same join you did inside that block

neon leaf
#

yes but wasnt I supposed to move that one outside

lyric mountain
#

you were supposed to move minecraftVersions outside

neon leaf
#

o

#

works 👍

#

holy

#

[wrangler:inf] GET /api/v1/build/174266 200 OK (203ms)

#

100ms faster than before

#

and only 412 row reads

lyric mountain
#

use PLAN ANALYZE to check query stats

#

perhaps it can get even faster

neon leaf
#

welp before I do that there is one last edgecase

#

if the type is arclight, project_version_id when split by dashes will have the last segment be fabric, neoforge or forge, when fetching the latest build I need to make sure that matches

eternal osprey
#

Guys how long did it take yall to finish bachelor in cs at a university? I think that I need a 4th year 🥲

neon leaf
#

0 years because im not old enough for university yet

lyric mountain
#

3 years

#

6 semesters

candid oracle
#

Who know how make this? and this

lyric mountain
frosty gale
#

but other than that above 3 is too long

candid oracle
deft wolf
#

Your bot must be additionally verified and Discord must have enough data to display "try my commands"

digital swan
#

Anyone here able to confirm if these are healthy hard drive sounds? First time having big drives and the noise they’re making makes me nervous

4x seagate ironwolf

sharp geyser
#

You never dropped them have you?

digital swan
#

Nope

sharp geyser
#

Have they ever been dropped?

digital swan
#

I hope not

#

I just got them yesterday

#

New as far as I know

sharp geyser
#

This is typically not a good sound

#

It sounds like its grinding

neon leaf
#

final query

WITH spec_build AS (
                    SELECT builds.*
                    FROM ${hashType && req.params.build.match(/^[a-f0-9]+$/)
                            ? sql`buildHashes INNER JOIN builds ON builds.id = buildHashes.build_id WHERE ${sql.identifier(hashType)} = ${req.params.build}`
                            : sql`builds WHERE id = ${int}`
                    } LIMIT 1
                )

                , filtered_builds AS (
                    SELECT b.*
                    FROM builds b
                    INNER JOIN spec_build sb
                        ON sb.id = b.id 
                        OR (COALESCE(sb.version_id, sb.project_version_id) = COALESCE(b.version_id, b.project_version_id) AND sb.type = b.type)
                    WHERE (
                        (sb.project_version_id LIKE '%-fabric' AND b.project_version_id LIKE '%-fabric')
                        OR (sb.project_version_id LIKE '%-forge' AND b.project_version_id LIKE '%-forge')
                        OR (sb.project_version_id LIKE '%-neoforge' AND b.project_version_id LIKE '%-neoforge')
                        OR (sb.project_version_id NOT LIKE '%-fabric' AND sb.project_version_id NOT LIKE '%-forge' AND sb.project_version_id NOT LIKE '%-neoforge')
                    )
                )

                SELECT *, 0 AS build_count, '' AS _version_id, '' AS version_type, 0 AS version_supported, 0 AS version_java, 0 AS version_created
                FROM spec_build

                UNION ALL

                SELECT x.*, mv.*
                FROM (
                    SELECT *
                    FROM (
                        SELECT b.*, count(1) OVER () AS build_count
                        FROM filtered_builds b
                        ORDER BY b.id DESC
                    ) LIMIT 1
                ) x
                LEFT JOIN minecraftVersions mv ON mv.id = x.version_id;```
sharp geyser
#

Which if it is, that means the read/write head is damaged and causing damage to the platters

#

which results in data loss

digital swan
#

Oh shit

#

It’s the constant clunking that has me worried

sharp geyser
#

HDD's are very susceptible to damage if dropped

digital swan
#

That’s during a light read

sharp geyser
#

I mean I could be wrong, but it does sound like what happens when its grinding on the platters

digital swan
#

Could I somehow test if it is or do I just have to pray

neon leaf
#

I cant really hear anything in that vid

sharp geyser
#

Is your audio not up?

#

It sounds clear as day for me

neon leaf
#

ok now I do

#

no it does not sound normal

#

if you read many small files you can hear something similar

#

but its way less deep

#

and faster

sharp geyser
#

Its not worth the risk, even if it is possibly okay

#

That just sounds too abnormal

digital swan
#

So return and buy 4x new or you think should I go with a different seller

sharp geyser
#

I'd go with a different seller

#

If you bought 4 of them and they all sound like that

#

chances are the entire stock sounds like that

digital swan
#

alright lovely

deft wolf
#

Then your users just need to use its commands

runic flame
#

Discord won't show your bot's commands in its profile if any of the commands includes an inappropriate name or description

eternal osprey
lyric mountain
sharp geyser
#

they sound new

#

so hopefully not

lyric mountain
#

Refurbished hdds

sharp geyser
#

Could be yea

#

Do they open up refurbished hdds?

#

I guess they do to see if its damaged

neon leaf
#

check the smart data

#

smartctl -a /dev/sda | grep Power_On_Hours

lyric mountain
#

Sometimes the platter is fine but the hand needs replacement, some techies open it to fix

#

Ofc if ur not in a sterile room there's the risk of contamination

digital swan
sharp geyser
#

did you buy it new or used

lyric mountain
#

Well something has to have happened, hdds are mostly silent

digital swan
#

new on amazon

sharp geyser
#

oh amazon

#

yikes

#

They likely dropped that shit 💀

neon leaf
#

welp

digital swan
#

oh fr?

neon leaf
#

amazon often sends you the returned disks of customers

#

so if someone sent one back as "wrong purchase"

#

you may get it

sharp geyser
#

Either that or you got the returns

lyric mountain
#

Noise means friction, and friction means any of the rotating parts aren't perfectly aligned

digital swan
#

wouldnt surprise me

lyric mountain
#

So yeah, dropping causes this

sharp geyser
#

Amazon loves sending out items that are meant to be returns to other customers purchasing the same thing

#

You likely got the short end of the stick

neon leaf
#

yeah thats why you can choose why you send it back

digital swan
#

anyone know if 'scan' is a more reputable place to buy drives from?

neon leaf
#

if you say its broken they manually check it first

sharp geyser
#

Honestly

#

If you can go in person to buy the disks, less risk still relying that they didnt get fucked in shipment to the store

neon leaf
sharp geyser
#

I dislike buying HDDs on the internet

#

HDDs are volatile

digital swan
#

UK

lyric mountain
#

Just say "product is suspiciously noisy", you don't have to keep an item that's not what you expected

#

You have 7 days of no questions asked return

digital swan
#

yeah ive already started the return

#

just quickly transferring some files off and ill pack them back up

lyric mountain
#

Any pc part is supposed to be silent, aside from vents

#

Like car parts

digital swan
#

theyre nas drives though

lyric mountain
#

Still, things are mostly frictionless in pcs

sharp geyser
#

HDDs should be relatively silent

lyric mountain
#

Well lubricated bearings don't make noise, and noise means wearing out over time

#

Hdd especially

digital swan
neon leaf
#

they should only make noise when writing/reading many small files

lyric mountain
#

Kinda, when the hand moves

digital swan
lyric mountain
#

But it's a very brief noise

lyric mountain
sharp geyser
#

buddy

digital swan
#

yeah i thought something was wrong

sharp geyser
#

those drives are cooked if thats the case

#

At most you should only be able to hear it from a few feet away

#

not behind a closed door

digital swan
#

rip

#

anything other than those is about £100 more per drive

runic flame
#

That device sounds like there's a monster trying to kick its way out

digital swan
#

for same capacity

lyric mountain
#

Doesn't WD have an official site?

digital swan
#

american i believe

lyric mountain
#

Their hdd are pretty solid

digital swan
#

£360/drive for the same capacity

lyric mountain
#

How much capacity are we talking?

digital swan
#

14tb

lyric mountain
#

...

runic flame
#

Jesus Christ

sharp geyser
#

He did say its for NAS

#

makes sense

lyric mountain
#

Wouldn't an hdd bundle be cheaper?

#

Like, some sell them for server owners, for raid

#

Sometimes multiple smaller hdds are cheaper than a single big hdd

#

Plus u share the wear between them, so longer lifetime

digital swan
#

yeah im using raid on those

#

all the bundles i can find are like prebuilt nas's

#

i think ill go with the same brand/line of drives as i got but 16tb instead of 14

#

seems to be the best deal on scan

lyric mountain
#

Ah seagate

digital swan
#

i would prefer wd red since i know they have a really good reputation but they are just mega expensive

lyric mountain
#

Red also includes a long-time warranty iirc

#

But yeah, server hardware is expensive

frosty gale
#

can vouch for both seagate and western digital

#

drive reliability is basically their entire brand image and they take it seriously

#

id avoid brands like samsung for drives

#

they had issues with ssds failing prematurely with no warning in the past

neon leaf
#

well samsung does have the highest nvme reliability

#

ssd has been meh

frosty gale
#

samsung is in basically every industry so they dont have as much on the line if their drives fail

#

i no longer have faith in samsung as a reliable storage provider with these kinds of headlines

neon leaf
#

those headlines exist for most companies

#

atleast most that offer ssd/nvmes

frosty gale
#

thats a good thing

#

tells you which companies to avoid

lyric mountain
#

I hate when the empire fires a laser to brick my ssd

runic flame
#

Micron SSDs are pretty good ngl

pearl trail
#

i agree

#

33tb write and 65tb read only take 5% health

neon leaf
#

my samsung nvme has 100tbw/105tbr

wooden ember
#

if they make that sound and no data is being written then thats an issue cuz that means the heads are not seeking the tracks properly but other thant that sounds like normal data being read.

#

not sure if a defrag would help since idk how whatever NAS software you are using would deal with that.

digital swan
wooden ember
#

ah well

digital swan
wooden ember
#

only thing that could be is if it was reading loads of tiny files or something is not happy

digital swan
#

yeah im returning and buying from a different shop

wooden ember
#

it doesnt sound like the dying drive I am used to

#

oh damn they are new?

#

seagate moment

digital swan
#

supposedly

#

from amazon

wooden ember
#

yeah tbh I mainly just buy used drives

digital swan
#

i got them yesterday and have wrote less than a tb to them all

wooden ember
#

oof

#

well I guess you cvan never been to cairfull

digital swan
#

yeah

#

lets hope we're not all mistaken and the drives are supposed to sound like that

#

otherwise what a waste of time and money

wooden ember
#

mate of mine just built a first pc and it worked fine for a day and then the gpu stopped existing, motherboard posts but no output so its not out of the relm of possibility

#

yeah if the replacement drives sound like this then its probably normal

#

as I said before they dont sound like the drives I have known to fail.

#

and trust me I run my shit into the ground lol

digital swan
#

but would you say they sound like healthy new drives

wooden ember
#

had a drive that worked well enough to boot but when it tryed to write it just spat out IO errors and the os just remounted it as readonly and I used that ser4ver like that for months before I actually needed to edit a file and replaced it.

wooden ember
#

see it just sounds like periodic accessing

#

all the lights on the front flash in unison so it might just be the fact that all 4 drives are clunking at the same time and thats why it sounds so loud.

digital swan
#

even if i can hear it maybe 4 meters away with a door closed?

wooden ember
#

but then what small random files it would be accessing I wouldnt know. unless its trying to cache something?

wooden ember
bitter granite
digital swan
#

well lets hope im not just throwing away money buying different drives

bitter granite
#

atleast i have a fail safe with 4 diffrent brand of nvme in my laptop

wooden ember
digital swan
#

a month i believe

bitter granite
wooden ember
#

because I would just have them in there for a couple weeks and see what happens.

#

yeah something like that

digital swan
#

if theyre faulty though they could just fail any time prematurely

wooden ember
#

don't you have backups?

digital swan
#

nope

wooden ember
#

also it is in a raid aray too so if one fails you should be good

wooden ember
digital swan
#

yeah raid 5

#

im more bothered about it failing early and losing money not the data

#

the data isnt that important

wooden ember
#

well if it fails then you can still return it.

#

look the drive up on seagate's warenty page and you should see if they have a warenty they would honer

digital swan
#

not if its outside the return window

wooden ember
#

true

digital swan
#

the amazon page said 3 or 5 years warranty i cant remember wich

#

i looked one of them up on the warranty page

#

2025 😐

wooden ember
#

what is the date on the drive?

bitter granite
wooden ember
#

because I know seagate does a 5 year warenty atleast

digital swan
bitter granite
#

Here i use vgen 15years

#

For warrenty

digital swan
#

on one of them

bitter granite
#

And their warrenty is no question asked
Just sent the nvme and they send a new one

wooden ember
#

hmm bit old stock but thats still not old enough to be used

#

I would imagine they are fine, I would be questioning why they are being accessed randomly like that

#

because if it was clunking from errors the hdd lights usually dont come on or just stay lit in my experiance

digital swan
#

theyre all 13th november 2023 actually

wooden ember
#

yeah same batch probably

frosty gale
#

i dont think they fail spontaneously, just degrade much faster

#

if they did that would be even worse

digital swan
#

i've already started the return now anyway

bitter granite
digital swan
#

warranty page says this

wooden ember
digital swan
#

interesting for something i bought as new

wooden ember
#

that just means that the reseller probably bought it direct from china in bulk and impoirted it to get it cheeper

digital swan
#

oh well

#

i hope amazon refunds quickly so i can get new ones ordered

wooden ember
#

amazon is usually pretty good abou tthat stuff

digital swan
#

usually

#

ive never had to return anything worth this much before

wooden ember
#

lol

#

same

#

I just buy drives used

#

there is a used pc store in town

sharp geyser
#

Better hope you havent done too many returns

#

Amazon is a stickler on that

wooden ember
#

true but thats what alt accounts are for lol

bitter granite
digital swan
wooden ember
#

not really

digital swan
#

like the odd thing

lyric mountain
#

how would bezos build another rocket to go to mars otherwise

#

gotta be strict on those returns

sharp geyser
#

Lol

wooden ember
#

well amazon was started on shady business practices so would make sence

#

when they where just a book company and you canted just one book they would order a batch and then return them all but the one you ordered so only on book was dispached.

#

so eh you either die the hero or live long enough to see yourdelf become the villan lol

#

but then tbh if people have a history of high returns then its probably justified to be suspicious of that

#

also bruh just realised I can view the smart data on my nvme

#

how wacky

#

my hdds come in fine

#

my newest drive is gonna have a year of uptime soon

bitter granite
wooden ember
#

seams reasonable

#

wish they would have the capasity for eveyone to have manual checking because AI is cringe

bitter granite
wooden ember
#

lol

#

true

bitter granite
# wooden ember lol

Just imagine
A conpany sent a broken ram
Then when i requested a warrenty
They blame my laptop for being broken and ask me to send my laptop to them

wooden ember
#

why would you send the entire laptop to the company that made ram?

#

that is daft

bitter granite
wooden ember
#

either that or they are intentional trying to scare peopel off so they dont have to deal with more RMAs?

bitter granite
lyric mountain
#

here we have mercadolivre, their refund/return system works pretty well (at least for the buyer)

#

also they deliver most things in like 1-2 days maximum

digital swan
#

seagate is 300 and wd is 280

#

rip bank account

bitter granite
digital swan
#

i just bought 4 ironwolfs from amazon for 200 each at 14tb and most people here said the noise wasnt healthy

bitter granite
digital swan
#

yeah thats what the internet says

#

but it was a weird sound

bitter granite
#

Wierd as in?

digital swan
lyric mountain
#

enough to hear from another room

sharp geyser
#

NAS hdd is not meant to be THAT loud from what I recall

#

maybe its changed in the last few years though

digital swan
bitter granite
sharp geyser
bitter granite
#

Not like super loud

sharp geyser
#

I mean if he can hear it behind a closed door

#

that is bad enough

digital swan
#

i dont expect them to be quiet but theyre in the opposite corner of my room and i can hear it clunking away

#

while theyre not doing anything intensive

bitter granite
digital swan
#

yeah its on a thickish carpet

bitter granite
bitter granite
sharp geyser
#

I thought he said all of them made that sound

digital swan
#

ive already started the return and packed them all up

digital swan
sharp geyser
#

Well then its likely its only a few of them

#

I thought you said it was all of em

digital swan
#

nah i dont have time for that

#

id rather return them all and buy all different ones

sharp geyser
#

Fair enough

bitter granite
sharp geyser
bitter granite
sharp geyser
#

Maybe im not used to "NAS" hdds

#

didnt know there was a distinction

bitter granite
#

Damn i check the price and it is not as expensive as it used to be

digital swan
#

well lets hope when i get new ones ordered they arent exactly the same and ive wasted all the time and money 😁

bitter granite
#

If not better read head

#

Since lots of hdd is almost next to each other

digital swan
bitter granite
#

So idk

neon leaf
#

I can vouch for seagate

#

no issues with them yet

bitter granite
digital swan
#

alright seagate it is

#

my poor bank account

sharp geyser
#

I can't vouch for WD Red specifically

#

but WD is definitely a good brand

#

They make some of the best SSDs and their HDDs were known to be among the best as well

sharp geyser
#

Reddit is always a good place to look for reviews

#

I'd also like to throw out Seagate Expansion 16tb external drive is the noisest thing I've ever heard. Changed my entire setup just to get it further away, when it first churns up I can hear it through the ceiling even though it sits on a rubber mat on a drawer.

frosty gale
#

my hdds are awfully loud

#

probably because theyre not secured with rubber properly

#

you can hear the hum going through the case because of the platter spinning

neon leaf
#

mine are attached with tape

sharp geyser
#

Wtf

#

Okay actually tbf

#

My HDD was in sideways

#

💀

neon leaf
#

thats fine

#

just dont move it while running and no issues

sharp geyser
#

Uhm

#

It wasn't secured

#

it was just there

neon leaf
#

oh

sharp geyser
#

I had no bracket

#

💀

#

Struggles of a budget pc build

frosty gale
#

and it doesnt help that windows loves to power on the hard drive at random times

sharp geyser
#

Didnt get an ssd until a year later

neon leaf
sharp geyser
#

and even that was not secured and just resting ontop of the rack

#

I plan on going all out for my next build

#

Saving up like 5-6k

#

3k for the pc and the rest in peripherals

neon leaf
#

why spend so much

#

are you sure you need it

sharp geyser
#

Well if I ever pursue what I want sure

#

Problem is actually getting the motivation to do it

#

💀

#

I want to get back into video editing and 3D modeling at some point

bitter granite
sharp geyser
#

I used to enjoy video editing

#

shit was fun

bitter granite
sharp geyser
#

3D modeling I always struggled with because my pc was terrible for it

#

Even though I had a beefy system

#

Dk if it was blender settings

#

but my fps struggled

#

and blender lagged

#

I hada. i7 12700KF and a 4070 ti

bitter granite
sharp geyser
#

so its not like I had a shit system

bitter granite
sharp geyser
#

Yea idk what was blender's problem

#

but it was lowkey annoying

bitter granite
sharp geyser
#

I was starting to get good at it a bit

bitter granite
sharp geyser
#

Well

#

the 12700KF doesnt have an integrated gpu

#

so I assume it was using my 4070ti

bitter granite
neon leaf
#

make sure to use the optix renderer

#

its optimized for rtx card

sharp geyser
#

I dont have that system anymore

#

So I will never be able to solve it

wooden ember
#

parcially the reason I buy used, I can see the drive in person and make a judgement on it if its worth the gamble.

#

here in the UK we have CEX and they often have 1tb drives for less than a tenner.

#

just the other week I bought a 160gb drive for 75 pence

#

usefull for testing things, toss in a random drive and install an os to test something and boom all works.

#

no need to shell out loads on cheap ssds that will probably not last as long.

digital swan
sharp geyser
#

Glad the issue was resolved

#

Quite frankly I guess my knowledge on HDDs are limited. I never knew there was a distiction between NAS and normal hdds

#

Sorry if I caused confusion

#

Typically sounds like that are not normal in HDDs at least in the ones i've used its always been a bad sound

neon leaf
#

I mean

#

one of my drives that died 2 days later did that

digital swan
# sharp geyser Glad the issue was resolved

well i wouldnt say quite yet i dont trust them

i can definitely see myself thumping my head against the wall after seeing red lights on the enclosure as soon as i start believing theyre healthy

neon leaf
#

however that noise was directly correlated to the bad sector count

#

so if its at 0 id call it fine

surreal sage
#

30 minutes later..........

vapid parrot
#

Anyone not currently have a bot they're focusing on and down to collaborate on one? Almost everything built already and currently has a lot of active users. DM me.

lyric mountain
#

yeah no, that never ends well

#

and this aint the best place to ask

vapid parrot
#

The development channel isn't a good place to look for developers? 😂

sharp geyser
#

You're better off not

vapid parrot
#

The bot is gaining like 500-1000 users per day right now, but I don't have a lot of free time to provide updates. Need to find someone who is willing to collaborate.

sharp geyser
#

Users dont matter

vapid parrot
#

Updates do.

sharp geyser
#

Also this may be the development channel, but thats for help with code not looking for developers

vapid parrot
#

"Channel for chatting about development."

#

Which is exactly what I'm doing.

lyric mountain
vapid parrot
#

Hahaha true. That's why I prefaced by saying "Anyone not currently have a bot they're focusing on"

lyric mountain
#

and then there're also the rules, mods might jump on you for seeking helpers

vapid parrot
#

2 developers looking to collaborate is against the rules? Where?

#

Show me.

lyric mountain
#

oh right, not exactly against rules they just mention it whenever someone appears here asking for devs

vapid parrot
#

I see. Not hiring someone to develop a bot, looking for a partner on an already developed product. 🤷‍♂️

#

Thanks for showing example though

lyric mountain
#

beware when looking like that btw, some people would jump on it just to take the token and use the bot for nefarious purposes

#

especially if it's a bot with good amount of servers/users

vapid parrot
#

Yeah I wouldn't give access to that, only for the staging bot & stuff like that which can me pushed to production once approved. That sort of thing.

bold grotto
#

Do we need to write a webhook url in the code to log vote loggers?

sharp geyser
#
  1. Trust is hardly given
  2. personally the skillset of a lot of these people here are not the best as a lot of them are just learning those who are skilled are busy with their own stuff or dont do bots anymore
proven lantern
#

they are broken

sharp geyser
#

Ima get the best cpu on the market rn

#

7800X3D

#

Best cpu for the price

#

Even the next one up only barely does better and thats only in some situations

proven lantern
#

yep, intel dropped the ball

sharp geyser
#

Did you hear the news about the new 50 series cards from nvidia?

proven lantern
#

not really. 500000 cuda cores?

sharp geyser
#

Apparently its upper ranges are going to use 500 W

proven lantern
#

as long as it can handle it without crashing thats fine

sharp geyser
#

Yea

#

That just begs the question

#

What are the actual specs of the cards

#

If they are rated to use up to 500 W

#

There has to be a reason for drastic increase in TDP in years

#

Usually they hover around 450 or lower

#

Finally those people buying 1000 W psu's for no reason finally have a reason

lament rock
#

Mostly rumors at this point

sharp geyser
#

Indeed rumors

#

But a leading psu maker essentially leaked it

#

So I'd say its fairly believable

lament rock
#

Wattage usually doesnt tell much. Peak loads can exceed 500W which is probably what they're targeting

sharp geyser
#

Indeed

proven lantern
#

more power is like more mana.

sharp geyser
#

I mean the 40 series cards are already extremely powerful for what they are

#

What is the 50 series going to bring to the table

lament rock
#

The 40 series are not much more powerful at pure rasterization compared to the 30 series. Their gimmick was DLS 3 frame gen. But a gripe about the 40 series cards was VRAM options being too little compared to the trend games are taking. I have heard they might look into compressing textures in GPU memory, but that's just a rumor. But their stance on VRAM might have changed to be more generous or they could still be headass

sharp geyser
#

I heard (rumour) that the lowest card is going to be pretty generous on the vram

#

Though I would not be surprised if they were dicks about it

frosty gale
#

the lower end cards with more vram tend to have slower memory and smaller bus widths

#

rtx 3060 for example has 12gb vram when a 3080 only has 10

#

but the 3080's vram is much better

wheat mesa
sharp geyser
#

It has 12

#

Depending on which you are speaking of

#

the Ti has 8

past field
#

i have an inappropriate joke in the chamber rn but i don’t wanna get kicked

eternal osprey
#

i am about to make integrate my api but i want to kep track of an ip log.
If i state it clearly, is it allowed?

digital swan
#

I think it’s expected for websites to save your ip at least temporarily

eternal osprey
#

i see sounds good then

quartz kindle
#

anyone wanna help me reverse engineer google meet webrtc?

#

lmao

#

i got as far as intercepting the webrtc packets containing events such camera/mic/text messages, but the format is weird

pearl trail
#

bro is onto something

quartz kindle
#

nah i made a chrome extension to track what people do in a meeting, like how many seconds spent with cam on/off, how many seconds spent talking, how many messages send, etc

#

but its wonky, slow and unreliable because its based on html mutation observers and other shits that break easily

#

so if i manage to get that data from the webrtc instead of waiting for html changes it would be much better

#

but shit's hard

pearl trail
#

oooo

frosty gale
#

the one youre talking about is probably a ti or super which has faster memory but less

quartz kindle
#

@frosty galeever messed with protobuf and shit?

#

i found out that the messages im getting from webrtc are protobuf, and i need the proto files to decode them, the proto files have a bunch of imports from other proto files and idk how to build them, they say to use something called bazel, but it also requires installing msys2, what the fuck are all these

sharp geyser
#

the ti comes with 8gb

#

Actually

#

3060 super doesnt exist

#

There is only the ti and and 3060

#

One comes with 12gb, the other 8gb

frosty gale
#

i mean it is google after all

#

ah i see

#

i dont think you need to compile them like that though

#

the proto files should be the structure for the data

#

i think you can do it with the js library which will do that for you

#
#

protobuf.load("awesome.proto", function(err, root) {

#

i dont think you need to compile anything because that sounds overkill

sharp geyser
#

wth is protobuf

#

Oh protocol buffers

lyric mountain
#

protobuf is a serialization format like json

#

it's more efficient, at the cost of not being human readable at all

solemn quest
#

Hey! Sorry if this question has been asked here before, or if I'm asking it in the wrong place -- but I was wondering how I would be notified when my bot is approved? Thanks!

quartz kindle
#

i tried feeding it to a protobuf decoder and it errors because of this

quartz kindle
solemn quest
#

Sweet. Thanks a lot!

deft wolf
#

Out of curiosity

#

-notified

frosty gale
#

does your directory structure match up with it?

#

so the root is the protobuf file, then you have google directory

#

honestly if you cant get it to work i'd just inline the imports by copy pasting them into the same file

eternal osprey
#

hey guys is someone here good at OCR using tesearct?

#

whether it's the python or js version

#

I am trying to extract some horizontal image data but it keeps returning me the data vertically?

#

If someone knows, let me know so i can hit you up in the dm, cuz it's quite personal info.

sharp geyser
sharp geyser
frosty gale
#

but im sure it shouldnt have to come to that

sharp geyser
#

with tesearct you can't really do this iirc

#

At least I dont remember being able to

eternal osprey
#

nah but my shit extracts vertically

#

it's really strange

#

can i dm you aaron?

#

how i felt asking that

sharp geyser
#

I mean you can, but ima be real I hardly used it

#

Literally only used it to extract info from IDs

#

So idk how much ima be of help since it was rather straight forward

quartz kindle
#

omfg protobuf is so trash wtf

frosty gale
#

youre trash

#

i barely used it before so i cant help much

#

but you should be able to just import that

#

when it comes to things like protobuf i prefer to write my own implementation

#

when it comes to languages like rust, c++ its very easy since you can use structs

#

javascript is where it starts to get annoying

#

and json doesnt really have a killer performance penalty

quartz kindle
#

im just gonna give up on getting the proto files to work and use it as is

#

apparently i can parse the data without a proto file, i just lose the key names

quartz kindle
eternal osprey
#

nah wait let me send you an example

#

god bless i got it working

sharp geyser
slender wagon
#
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Error(s) encountered validating runtime. Your runtime version for nodejs22 is past End of Support. Please upgrade to the la

nah wtf google

pearl trail
#

it's funny that it throws error instead of warning

eternal osprey
#

owhh

#

how about now

slender wagon
#

Is there any libraries for editing videos in web? With vue or native js

neon leaf
#

how can I insert a row intop sqlite and get back the id column but if there is already a row that causes a unique index duplicate I get back the existing row id

quartz kindle
#

you may need to wrap that inside another select query, as on conflict do nothing cancels the returning part i believe

lyric mountain
#

it's IGNORE instead of NOTHING but yeah, it'll skip

#

your only option would be to do a select before inserting, but since it's a pkey search dont worry about performance loss, it'll be O(1)

quartz kindle
#

yeah most solutions im seeing on SO suggest doing an INSERT OR IGNORE and then a SELECT

neon leaf
#

So I need to save on queries

lyric mountain
#

well, you can make a procedure

#

code whatever you're doing in the database, instead of locally

#

fun fact postgres supports most mainstream languages

neon leaf
#

Well does sqlite

lyric mountain
#

ah, right, I forgor

quartz kindle
#

wtf

lyric mountain
#

sqlite functions can only be in sql, so yeah wouldn't be possible

neon leaf
#

On the worker it's fine but this is seperate logic

lyric mountain
#

ok, so what you can do, is make a view with insert trigger

#

nvm, just use a regular insert with ON CONFLICT(id) UPDATE

#

but dont update anything

#

or do, if that's your intention

#

as long as you're doing an operation it'll work with RETURNING

neon leaf
#

Okay I'll test in like 6min

#

so thjis?

quartz kindle
#

you're supposed to be inserting some UNIQUE value no?

#

otherwise ON CONFLICT wont trigger

neon leaf
#
  result: [],
  success: false,
  errors: [
    {
      code: 7500,
      message: 'UNIQUE constraint failed: configs.location'
    }
  ],
  messages: []
}```
quartz kindle
#

so location is unique?

neon leaf
#

yes

quartz kindle
#

then ON CONFLICT (location)

neon leaf
#

ahhhhhhhhh