#development

1 messages Β· Page 237 of 1

proven lantern
#

maybe stackoverflow man in wrong

quartz kindle
#

maybe my stackoverflow man is wrong too

#

Perl has an undefined value (often abbreviated "undef") separate from null or 0. It can be tested for with defined, and generally indicates a runtime error occurred (when exceptions are not in use). In a boolean context, it is considered false. You can get it by...

declaring, but never initializing, a variable: my $foo;
returning nothing from a subroutine: sub foo { return; }
explicitly setting a variable to undef: $foo = undef;
SQL has the NULL value. Unlike the undefined value, it is not false. It is a 3rd boolean state neither true nor false. This trinary logic often trips up people who may confuse NULL with false.

#

lmao

proven lantern
#

oh, that SQL's null not Perls

#

so if you use SQL with JavaScript you need to make sure to use the right null. extra confusing

lament rock
#

No??

#

Unless you're writing the statement yourself

#

Prepared statements that accept variables convert the js value of null to the SQL value of NULL just fine

#

Why would you inject things directly in your statement though

proven lantern
#

because you think you know what youre doing and end up breaking everything

#

JS is too easy to pick up

#

and sometimes it doesn't do what you would think

lament rock
#

Like what

proven lantern
#

all the wtfjs stuff

sharp geyser
#

None is more close to undefined/null

lament rock
#

null gets stringified to "null"

#

Idk how that's not expected

proven lantern
sharp geyser
#

Although None also has no correlation to undefined/null as well

proven lantern
sharp geyser
#

None simply means it doesn't exist

proven lantern
#

like Perl

sharp geyser
#

Also why are we arguing whether null/undefined is useful

#

just accept it exists and has its uses in the languages it is defined in

#

πŸ’€

lament rock
#

I can relent that JS is a deceptively hard language when you get into the nitty gritty, but everyone has to start somewhere and I wouldn't wish a low level language upon my worst enemy as a first language

proven lantern
#

goto has it's uses too

sharp geyser
#

I tell people to try rust as their first language

#

that way I can torment them

lament rock
#

Uninstall

proven lantern
#

zig has been much more painful for me

#

than rust

sharp geyser
#

how

#

zig looks easier than rust

proven lantern
#

mainly the library i used had a bug

#

a really tricky bug

sharp geyser
#

thats not a zig issue

#

thats the library dev fucking up issue

proven lantern
#

i had to figure out how to debug it

sharp geyser
#

welcome to programming

#

take a seat

proven lantern
#

zig build -Dtarget=aarch64-linux-musl -Dcpu=baseline -Doptimize=Debug

-Doptimize=Debug

#

took me awhile to figure out this flag

sharp geyser
#

me when cargo build --release

#

πŸ’€

quartz kindle
#

its like reading luca code

sharp geyser
#

you think every bad js code is lucas code

quartz kindle
#

:^)

sharp geyser
#

I never understood compilers making it harder on you to compile

#

I mean sure its cool to have such level of control

#

but cmon, at least set a standard / default

proven lantern
#

zigs default is to remove all info/debug logs

quartz kindle
#

zig default is to remove zig

#

:^)

sharp geyser
#

I really do not see the appeal behind zig

#

it just looks like a knockoff rust that tries its hardest to make it better

#

but all it has going for it is "faster" build times

#

which honestly mean nothing to me if it brings nothing else to the plate

quartz kindle
#

i mean, on paper zig looks pretty amazing

#

it feels like a major improvement over many of C/C++'s problems

#

and its much closer to C than rust is

#

so if you wanna stay near the C/C++ world, zig is a better choice than rust

#

otherwise rust has more maturity, larger community, more support/docs, and the package manager

#

as someone on reddit said: Zig is better C and Rust is better C++

sharp geyser
#

Indeed

#

But people compare zig to rust more than they do C

#

which is where I disagree

radiant kraken
scenic kelp
sharp geyser
#

Indeed

surreal sage
#

is there any way i can use pnpm workspaces in CD/CI?

#

as there is no lockfile in a monorepo's 'package' directory

#

and when you build with docker you usually set the root project dir

proven lantern
#

Does it make sense to try to create a std.StringHashMap([]const u8) or std.json.Value or something like that from a JSON file at comptime in Zig? Those things live in runtime memory so creating them at comptime doesn't make sense right? my best bet would be to generate a zig file from the JSON during the build right?

const std = @import("std");

pub const ApplicationKey = struct {
    id: []const u8,
    public_key: [64]u8,
    };

pub const application_keys = [_]ApplicationKey{
    .{ .id = "xxxxxxxxxxxxxxxxxxx", .public_key = "f47c8exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5a61cd".*, },
    .{ .id = "xxxxxxxxxxxxxxxxxxx4", .public_key = "430dbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxe2a66a0".*, },
    .{ .id = "xxxxxxxxxxxxxxxxxxx9", .public_key = "c1194xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9ca50da".*, },
    .{ .id = "xxxxxxxxxxxxxxxxxxx8", .public_key = "8e67exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx152713a".*, },
    .{ .id = "xxxxxxxxxxxxxxxxxxx", .public_key = "6787b8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3d18d8".*, },
    .{ .id = "xxxxxxxxxxxxxxxxxxx", .public_key = "bc77bbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7f29de".*, },
    .{ .id = "xxxxxxxxxxxxxxxxxxx", .public_key = "ec1016xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd54e41".*, },
    .{ .id = "xxxxxxxxxxxxxxxxxxx", .public_key = "bd9f7exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx690bd2".*, },
};

pub fn getPublicKey(id: []const u8) ?[64]u8 {
    for (application_keys) |key| {
        if (std.mem.eql(u8, key.id, id)) return key.public_key;
    }
    return null;
}
#

or can i just parse the JSON at runtime? the JSON file is loaded at comptime so there is no runtime file io, only parsing.

#

does zig have a file format for configs?

scenic kelp
#

if you did it at compile time wouldn't you have to rebuild every time you change a config value

proven lantern
#

everytime the lambda coldstarts it just needs to load the binary

#

good thing zig builds fast

proven lantern
#

i always have to compile anyways since i need a binary to test the runtime

quartz kindle
#

isnt it counter intuitive to use json files at compile time?

#

the whole purpose of config files is to have flexible hot-swappable configuration without requiring rebuild

surreal sage
#

what do i tell someone when they try to start a docker compose and get network errors, but when i try it with the same configuration on a fresh server: it works fine

past field
#

i swear this is the best discord channel in history

proven lantern
#

zig doesn't have a config file type from what i can tell

#

no object literals

past field
proven lantern
quartz kindle
quartz kindle
proven lantern
proven lantern
past field
proven lantern
scenic kelp
#

yeah anonymous structs will just make a new type

#

you'd need runtime reflection to be able to look them up

sharp geyser
#

thats why we use it

proven lantern
sharp geyser
#

common zig L

proven lantern
#

im just going to parse json and call it a day

sharp geyser
#

why is that code so ugly and unreadable

#

also wtf is the point of inline there

#

unless inline doesnt do what I think

proven lantern
#

it's a comptime thing

scenic kelp
#

it's compile time reflection

proven lantern
#

yeah, it's looping over all the keys so it's O(n) instead of O(1)

scenic kelp
#

it's always going to be shitty because you're basically doing codegen too

#

if you're going to be doing smth like that you're better off using a dictionary/map

proven lantern
#

those require runtime memory so they would need to be serialized in some way right?

#

then loaded at runtime

scenic kelp
#

well whatever you're doing is going to be using memory if you're trying to dynamically load fields, no?

#

there is apparently a compile time string map

proven lantern
#

did ai tell you that?

scenic kelp
#

what

proven lantern
#

compile time string map

#

ai keeps telling me things exists like that

scenic kelp
#

i think it used to exist

proven lantern
scenic kelp
#

it links to the PR

#

it seems like they might have merged it then decided against it later?

proven lantern
#

oh nice, i could steal that code i guess

#

what is this slot_loop

scenic kelp
#

no idea i didn't read over the code at all

#

i am curious why a standard object wouldn't work for you though

#

ig are you trying to represent like nested JSON objects?

proven lantern
#

i am getting the application_id from discord when they invoke my interaction URL. i need to take that application_id and get the public_key so i can verify the signature

#
    .@"661xcxxxxxxxx6511" = "f47c8e6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0bbde3cb5a61cd",
    .@"108xcxxxxxxxx85884" = "430dbbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd4ea5fbae2a66a0",
    .@"108xcxxxxxxxx37009" = "c1194bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8cd432fd9ca50da",
    .@"112xcxxxxxxxx61018" = "8e67eaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd43ed41b152713a",
    .@"882xcxxxxxxxx2705" = "6787b84xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc3584c7b3d18d8",
    .@"918xcxxxxxxxx4829" = "bc77bb3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxad1a0a647f29de",
    .@"889xcxxxxxxxx2724" = "ec10160xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc2a96064d54e41",
    .@"935xcxxxxxxxx6752" = "bd9f7e1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx15a93c64690bd2",
};```
#

i need to do something like this in JS

const app_id = "661xcxxxxxxxx6511";
const pub_key = application_keys[app_id] ;
#

i can do this in Zig
const public_key = application_keys.@"661xcxxxxxxxx6511"

but i can't look up a value based on a dynamic string

const public_key = application_keys.@"{app_id}" // nothing like this exists
sharp geyser
#

this looks stupid

proven lantern
#

but it's the same thing again

proud plover
#

how do we get this checkmark?

deft wolf
#

I doubt this is possible

proud plover
deft wolf
#

This is custom css

proud plover
#

ooo xD mb

eternal osprey
#

i am trying to create a dashboard for my verification bot.
uhhm.. does anyone know how to fix this aesthetic

#

it looks like dookie

pearl trail
#

bro got all the characters πŸ’€

#

put 0 after 9

eternal osprey
#

its for my verification gang it's needed πŸ’€

pearl trail
#

πŸ’€ cant user just type it normally?

eternal osprey
#

is there a way to move the enter button to the right?

eternal osprey
pearl trail
eternal osprey
#

hmm is there a way to add empty buttons then?

#

Like filler buttons or sum

pearl trail
#

those buttons will make mobile client suffer lmao, tho it's up to you

#

i don't think so, not sure

eternal osprey
#

i see

#

thanks for the help though!!

#

btw a quic side quest:
i kinda want to look into react as i make all my personal websites using plain html bootstrap and vanillajs.
Is it smart to learn react? Does it make the whole development easier?

pearl trail
eternal osprey
#

owh damn you can use fillers

#

by escaping use unicode \200b

#

and 200c works too

pearl trail
#

ah yeah classic u\200b

#

anyways, can you screenshot that on mobile?

#

im curious

eternal osprey
#

i can't handle the fucking margin the embed has at the left

#

it's not aligning bro 😭

eternal osprey
#

I mean it’s okay

#

yeah no its ugly af

#

is there a way to know whether a user is on mobile or not, cuz then i can dynamiclly add or remove 1 button from the last row?

deft wolf
#

I mean there is such an option in discord.js

#

But you need to read the server member's presence for this

eternal osprey
#

ahh i see

#

but that does not work if people are offline

#

that sucks

deft wolf
#

Unfortunately

pearl trail
#

fair fair

#

oh yeah my bad, it's because there's only label and it's single character

#

unless it's a link button, a button with emoji, or with unorganized label length, it'd be a mess KEK

eternal osprey
#

owhh shit yeah

#

It looks alright now

#

test

frosty gale
#

too clunky

#

you need less characters

#

plus interactions might be a bit too slow and unreliable for this which can get annoying

neon leaf
#

you could probably make a select with max options and one of them is right

quartz kindle
#

i have a question tho, what exactly does this verificatrion solve?

#

what does it protect against?

neon leaf
#

"are you blind"

quartz kindle
#

yes

neon leaf
#

yes

#

it protects against the blind

#

90% less tickets

eternal osprey
#

it protects against raids

#

autoamted bots can't click buttons πŸ—£οΈ

#

(unless they are using discord on web and puppeteer to mimick actions)

#

and it protects against ppl that are dumb

quartz kindle
#

"if you are not a bot, click here"

eternal osprey
#

people can automate that though

#

join server -> wait for dm -> scan for button -> click button.

#

unless it's an actual captcha button

quartz kindle
#

ye but how often are people actually going to do that?

eternal osprey
quartz kindle
#

:^)

eternal osprey
#

that's stupid

#

what if it happens

#

then we are fucked

neon leaf
#

unless the server is valuable to raid

eternal osprey
#

i know but this will be a public bot.

#

so i can't just say, fuck it it will never happen

frosty gale
#

id opt in for different forms of captcha though

#

the one you're using already likely has models that are trained specifically to bypass it

lyric mountain
eternal osprey
#

the world would spin the other way

lyric mountain
#

seriously

eternal osprey
# lyric mountain seriously

no i have no clue, it's just a public verification bot. If i advertise it as secure, i want it to be secure.
not security by ignorance lmao

#

I am adding 3 levels of verifications.

#
  1. Random simple math questions. 2. captcha, 3. Verification by clicking on a weblink that is bound to a single user request
#

so user clicks -> creates a link for you specifically by using subpaths.

lyric mountain
#

what are you protecting?

#

ticket creation?

quartz kindle
#

the cocacola recipe

frosty gale
#

theyre best suited to solve it

#

they started giving captcha's before you can join a server (in suspicious joins)

#

and have these new mod and raid tools

sharp geyser
frosty gale
#

@quartz kindle or anyone do you know if you can disable eval in nodejs?

#

im getting very serious on tightening security and one of the logical steps would be to disable eval in applications that dont need it

#

to make rce much more difficult

#

i was thinking about replacing it with something else but im not sure

#

i dont think theres an experimental node permission for it either

#

luckily i can disable child process to prevent shell commands with permissions too

#

for fun i would happily make a nodejs patch that hardens eval if there isnt one already

sharp geyser
#

I mean I think you can disable it via v8

#

but idk bout any other way

eternal osprey
#

can someone explain me how substring works cuz it ain't making sense to me:

let test = "test"
console.log(test.substring(0, test.length))```
this returns me "test". test.length -1 returns me "tes".
Strings are basically arrays of characters, so we start at index 0...
test.length in this case is 4, how the fuck is 0,4 even a valid indice.
#

and why is 0,3 not simply "test"

sharp geyser
#

0 = t
1 = e
2 = s

eternal osprey
#

owh hehehe substring starts with index 1

lyric mountain
eternal osprey
#

no it doesn't

sharp geyser
#

yes?

lyric mountain
#

are u sure 0,3 isn't returning test?

#

afaik substring in js isn't end-exclusive

sharp geyser
#

How the fuck would 0 - 3 return test

lyric mountain
#

4th character is t

#

0,3 is 4 characters

eternal osprey
#

am i tweaking chat

sharp geyser
#

The substring() method of String values returns the part of this string from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.

lyric mountain
#

that's weird

frosty gale
sharp geyser
#

so 0,3 would be tes

eternal osprey
#

ooowh dayum that's dumb ngl

sharp geyser
#

Blame js

eternal osprey
#

tell them to change that in the next es

sharp geyser
#

idfk

#

chitty

#

if you think thats dumb

lyric mountain
frosty gale
sharp geyser
#
let mut iter = s.char_indices();
let (start, _) = iter.nth(10).unwrap();
let (end, _) = iter.nth(5).unwrap();
let slice = &s[start..end];

here is one of the ways (albeit a little clunkier) to get a substring in rust

lyric mountain
#

whatever js uses to reference the superclass then

eternal osprey
#

ahh helll nah

sharp geyser
#

in reality you can just do let slice = s[start..end] afaik

frosty gale
#

i could harden node itself with apparmor too but problem is theres only one node executable so id have to apply apparmor policies to all node programs

#

and i dont feel like having 5 different copies of node

lyric mountain
#

would it work if u did Object.prototype.eval = () => {}?

eternal osprey
#

this is how it is in haskell: to get index 2-5.

let list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
sublist = take (5 - 2 + 1) (drop 2 list)
sharp geyser
#
fn main() {
    let string = "Hello";
    println!("{:?}", &string[0..1])
}
#

this returns H

eternal osprey
#

mf's got not loops, only rescurive calls 😭

sharp geyser
#

even rust is end exclusive

#

it goes up to that index but doesn't grab it

#

That's where it stops

frosty gale
lyric mountain
#

yes but this would disable it globally

frosty gale
#

and eval is a global func dont think its part of object prototype

lyric mountain
#

"get from index A to index B"

eternal osprey
#

haskell as well... just need to select it manually lmao

quartz kindle
sharp geyser
#

so you can make it end inclusive or end exclusive

#

its up to you

quartz kindle
#

i dont think it supports eval yet

#

for now it only supports these

#

otherwise you can use a native addon to toggle v8 options from cpp

#

v8Isolate->SetModifyCodeGenerationFromStringsCallback(nullptr);

#

some npm libs claim to do that, but they are outdated and use older v8 calls which idk if they still work

#

wait, apparently there is also --disallow-code-generation-from-strings

#

ye it works lmao

sharp geyser
#

yea

#

I wasn't sure if that was legit or not

#

it was given to me by the google ai in the search results

#

πŸ’€

quartz kindle
#

although it says this This does not affect the Node.js node:vm module.

frosty gale
neon leaf
#

pretty easy to escape vm

#

afaik u can use some kind of object prototype

quartz kindle
#

ye vm bypasses the restriction

#

but an attacker wouldnt be able to create a vm in the first place without eval

pearl trail
#

@quartz kindle wat font you use in tabby?

surreal sage
#

hey so

#

i have a timezone offset in hours

#

e.g india

#

is utc+5:30

#

that would be 5.5 in hours

#

is there anything that lets me convert that back easily

#

(5.5 > 5:30)

#

format-duration maybe hm

pearl trail
#

just use scaling smth like 0-9 is 0-59

#

i forgot the formula πŸ’€

lyric mountain
lyric mountain
#

on a side note, this is the first time I'm seeing a timezone with minute offset

surreal sage
lyric mountain
#

no

#

60 * 0.5 is 30

#

if you divide 0.5 by 100 you'd get 0.005, which is 0.3 minutes (18 seconds)

#

ops, I see the issue lul

#

it's multiply, not divide

quartz kindle
#

consolas 14pt

#

that screenshot is not tabby tho, its windows 11 terminal

#

i only use tabby for ssh lel

pearl trail
#

ahh i see

#

oki thanks

#

i still can't get the "emojis" working lmao

quartz kindle
pearl trail
#

:O damn pretty old lmao

#

alr well ig i won't have fancy cli look

neon leaf
#

wait so how do indexes for dates work

#

in pg/mysql

lyric mountain
#

dates are just glorified numbers

neon leaf
#

ok well I guess same question there

#

I only get how strings could be indexed

pearl trail
#

iirc it's Unix timestamp

lyric mountain
#

depends on the database, some use floating point, some use biginteger

lyric mountain
neon leaf
#

ah okay I see

lyric mountain
#

you'd average where it would be and then flip some pages to find it

#

and if you were looking for a specific topic but didn't know the page, you'd have an index table (first page in most books) to quickly find which page it's in

neon leaf
#

okay thanks yes this makes sense

wheat mesa
#

@lyric mountain any advice on how to learn frontend with flutter

#

I'm gonna start back up on that project

#

But I have no idea how to use containers and such, I find it really difficult to think about the structure of frontend

#

It hasn't clicked for me yet

neon leaf
#

my face when I only realized yesterday that you need to manually make the indexes

lyric mountain
#

you have 2 types of "flex" containers: row and column

#

then you have divs, which are Container

#

and divs made for sizing purposes, SizedBox

#

Scaffold is the skeleton of the app pages, giving you areas for AppBar (the bar at the top of every app), body, bottomNavigation, drawer, etc

#

it's very similar to react native if you've used it before

wheat mesa
#

I haven't done much frontend at all

lyric mountain
#

best tip is to try and make something out of it, then searching on documentation what you're looking for

wheat mesa
#

Which I am starting to realize is going to hurt me since I have nothing to really "show off" on my resume

neon leaf
#

@lyric mountain will this work if a build can have multiple hashes or does primary key make it unique or something?

export const hashes = sqliteTable('hashes', {
  buildId: integer('build_id').primaryKey().notNull(),

  primary: integer('primary', { mode: 'boolean' }).notNull(),

  sha1: text('sha1', { length: 40 }).notNull(),
  sha224: text('sha224', { length: 56 }).notNull(),
  sha256: text('sha256', { length: 64 }).notNull(),
  sha384: text('sha384', { length: 96 }).notNull(),
  sha512: text('sha512', { length: 128 }).notNull(),
  md5: text('md5', { length: 32 }).notNull()
}, (hashes) => ({
  buildIdx: index('build_idx').on(hashes.buildId),
  sha1Idx: index('sha1_idx').on(hashes.sha1),
  sha224Idx: index('sha224_idx').on(hashes.sha224),
  sha256Idx: index('sha256_idx').on(hashes.sha256),
  sha384Idx: index('sha384_idx').on(hashes.sha384),
  sha512Idx: index('sha512_idx').on(hashes.sha512),
  md5Idx: index('md5_idx').on(hashes.md5)
}))```
lyric mountain
#

it'll click after u make a couple of pages

lyric mountain
neon leaf
#

okay, do I need a primary key on this or will it be fine?

lyric mountain
#

well, it depends

#

all tables in sqlite do have a primary key ROWID

#

but if you have a field that's guaranteed to be unique, you can use it as a PK for querying purposes

neon leaf
#

hm

#

I think the indexes should be enough

#

I usually either want all hashes for a buildid, or the build of a given hash

lyric mountain
#

just note that if a columns isn't declared as UNIQUE, it'll iterate till the end of the table for matches

neon leaf
#

even if limit is 1?

#

ah wait you probably mean for all hashes for a build

lyric mountain
#

no, for example, if you were looking for a buildId abcde1234 it'd go till the end to see if there are any more matches

#

limiting to 1 might prevent this, but it'd make composite queries difficult

neon leaf
#

interesting

#

well im trying to save as many rows as possible since I have a limited amount before I pay

lyric mountain
#

for sqlite?

neon leaf
#

the table will have 810k rows

neon leaf
lyric mountain
#

why dont you host the database on the same server as your app?

neon leaf
#

the app is a worker

lyric mountain
#

yes?

#

sqlite isn't a service-based database

neon leaf
#

a worker doesnt keep running after a request ends

#

and doesnt have permanent storage

lyric mountain
#

the former doesn't matter, but the second yeah that's a valid reason

neon leaf
#

I get 25 billion row reads per month

lyric mountain
#

you'll need a cache at some point

neon leaf
#

additional million are 0.001$ so its not the end of the world but keeping it down would be nice

neon leaf
#

cloudflare kv

#

its unlimited keys and unlimited reads

#

nvm they forgot to change it on some sites

#

1gb storage, 10mil reads per month

#

well I will see

frosty gale
#

i never knew this

#

if you have an iframe which is sandboxed and click a link which opens a new tab

#

that tab is also sandboxed

#

there is absolutely no indication that the tab is part of the sandbox which is why i was surpsied

lyric mountain
#

anything from inside an iframe stays in the iframe

#

it's like, the whole thing with it, it cannot escape containment

knotty quartz
#

does .findAll still work? I'm getting errors with it

deft wolf
#

In mongodb?

knotty quartz
#

I just change to Mongo from sqlite

deft wolf
#

Try .find()

knotty quartz
quartz kindle
knotty quartz
digital swan
#

why would you go from a sql db to mongo though

#

would it not be easier to go to another sql db

knotty quartz
knotty quartz
# deft wolf Try `.find()`

Now I get:

Uncaught MongooseError MongooseError: Operation `users.find()` buffering timed out after 10000ms

frosty gale
#

whats with these undescriptive confusing errors

#

come on lib devs it takes a few extra seconds to write a better error message

digital swan
#

does it not just mean the query took too long

knotty quartz
quartz kindle
#

mongoose ew

digital swan
#

tim the biggest mongo hater

quartz kindle
#

lmao

frosty gale
#

mongoose is the only saving grace for mongodb tbh

#

it actually enforces a strict schema on collections

digital swan
#

isnt one of the big things about mongo being schemaless

knotty quartz
#
    const storedBalances = await Users.find();
    storedBalances.forEach(b => client.currency.set(b.user_id, b));
});```

Same error everytime
frosty gale
quartz kindle
frosty gale
#

with mongoose you still get some flexibility though

quartz kindle
#

mongoose has a really weird way or operating, it allows you to call all of its methods without actually being connected

frosty gale
#

you can compare schemaless databases to javascript, you can very rapidly create and set something up but you get a lot more runtime errors in return

knotty quartz
quartz kindle
#

mongoose.connect()

knotty quartz
quartz kindle
knotty quartz
#

Isn't that not it?

quartz kindle
#

yeah

knotty quartz
#

I have got it

quartz kindle
#

double check your uri and options

#

also check for errors

knotty quartz
#

Uncaught MongooseError MongooseError: Operation users.find() buffering timed out after 10000ms

digital swan
#

how many users is there

knotty quartz
#
mongoose.connect(process.env.MONGODB_URI, {
    useNewUrlParser: true,
    useUnifiedTopology: true,
    useCreateIndex: true, // Add this line to use `unique: true` in your schema
}).then(() => console.log('MongoDB Connected'))
  .catch(err => console.log(err));
quartz kindle
knotty quartz
digital swan
#

oh

quartz kindle
#

are you using a service like atlas or a selfhosted mongo?

knotty quartz
quartz kindle
#

did you white list your ip address?

knotty quartz
quartz kindle
#

thats not it

knotty quartz
#

fixed

neon leaf
#

god I love drizzle syntax

export default function(router: GlobalRouter) {
    buildRouter(router)
    buildsRouter(router)
    versionRouter(router)

    router.get('/api/v1/types', async({ req, env }) => {
        const data = await req.cache.use('types::all', () => req.database.select({
                type: req.database.schema.builds.type,
                builds: countDistinct(req.database.schema.builds.id),
                versionsMinecraft: countDistinct(req.database.schema.builds.versionId),
                versionsProject: countDistinct(req.database.schema.builds.projectVersionId)
            })
                .from(req.database.schema.builds)
                .groupBy(req.database.schema.builds.type)
                .all(),
            time(10).m()
        )

        return Response.json({
            success: true,
            types: Object.fromEntries(types.map((type) => [
                type,
                {
                    ...extraTypeInfos[type],
                    icon: `${env.S3_URL}/icons/${type.toLowerCase()}.png`,
                    builds: data.find((d) => d.type === type)?.builds ?? 0,
                    versions: {
                        minecraft: data.find((d) => d.type === type)?.versionsMinecraft ?? 0,
                        project: data.find((d) => d.type === type)?.versionsProject ?? 0
                    }
                }
            ]))
        })
    })
}```
knotty quartz
#

The IP address is fixed

past field
#

you guys are amazing

#

been playing all day lol

deft wolf
knotty quartz
#

Anyone here uses Mongoose?

pearl trail
#

used to

surreal sage
#

wsp

knotty quartz
# surreal sage wsp

My database says client not connected like it can't perform the operation

But in console says mongoDB connected

#

I'm on phone right now

#

So I can't send the proper error

surreal sage
quartz kindle
#

perchance

surreal sage
#

you can't just say perchance

quartz kindle
#

quality reference

#

lets-a go, keep it up baby

knotty quartz
surreal sage
#
  • some config fucked up on client and/or db server
  • wrong order of calls
quartz kindle
#

triple caution, triple caution

surreal sage
#

samir you are not listening to my calls

#

you are damaging the car samir

quartz kindle
#

mongo is not listening to his calls

#

:^)

knotty quartz
pearl trail
#

you sure you didn't do smth like mongoose.connection.close() anywhere in your code?

knotty quartz
#

Wait

#

One second

#

going to use ctrl f

#

Yeah, I just checked the dbInit and it closed it in there

Now I get this error:

```Error connecting to MongoDB: MongooseError: The uri parameter to openUri() must be a string, got "undefined". Make sure the first parameter to mongoose.connect() or mongoose.createConnection() is a string.

#

(Sending it here so I can read it πŸ’€)

knotty quartz
surreal sage
knotty quartz
knotty quartz
frosty gale
#

most smooth mongodb setup experience

eternal osprey
#

it's coming from canvas... is it save?

sharp geyser
#

Buddy I cant read that

buoyant estuary
#

neither can i lol

#

not sure my bot having this would let me get it approved lol

deft wolf
#

On top.gg? No, this is considered a privacy breach

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

buoyant estuary
#

im willing to remove it for verification lol

#

ye all dev commands are locked to me only

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

buoyant estuary
#

the other commands i have for it

quartz kindle
# eternal osprey

yes, those libs are required to build canvas, these are the deps for mac:
pkg-config cairo pango libpng jpeg giflib librsvg pixman python-setuptools

buoyant estuary
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

buoyant estuary
#

the server list was to make sure if i had reports of a server abusing the bot i could investigate

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

deft wolf
#

πŸ€·β€β™‚οΈ

sage bobcat
#

One message removed from a suspended account.

buoyant estuary
#

ah

sage bobcat
buoyant estuary
#

ill switch it to server id instead

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

you cannot invite yourself to random servers

sage bobcat
#

One message removed from a suspended account.

buoyant estuary
#

so i can remove bot from guild

quartz kindle
#

also, is that a global slash command? if so, make it a guild-only slash command, and set it to your guild only

#

or a hidden test guild you own

#

so it doesnt show up on other servers

buoyant estuary
#

they are global rn

#

is this better

quartz kindle
#

that is gonna blow up if your bot grows

neon leaf
#

nah sending a 800k line embed to discord is fine

quartz kindle
#

:^)

buoyant estuary
#

so i should add a list

#

of pages

neon leaf
#

btw @quartz kindle I have rereredecided on using workers

quartz kindle
#

honestly, i wouldnt even try doing a list command like that, way too much work

#

much easier to have an eval command or something

neon leaf
#

progress is slow but performance is okay

#

its like +50ms but I am guaranteed to not have people screaming for downtime often

buoyant estuary
#

for 10 per page

neon leaf
#

for some reason I didnt think of using indexes before

#

with indexes its so much better for db queries to d1

buoyant estuary
#

how would i add buttons to the botss status

sharp geyser
#

Ima be real tracking something like that makes no sense.

eternal osprey
#

guys why is it illegal for for managers/supervisors to work me in properly.

#

i ain;t even lying i am arriving at the job this mf tells me to access this database at xxx and do xxx on the data on a hfds.
Tries for 4h, fails, went to manager, find out you got missing keys, cry

brittle shore
#

lol

surreal sage
#

nay for the frustration though xd

eternal osprey
#

I am paid by the hour but still if I have to push my findings by a certain deadline 😭

surreal sage
neon leaf
surreal sage
#

where the eslint at

neon leaf
#

no

surreal sage
eternal osprey
#

nah honestly my coworkers thing that i am 🌟 special πŸ’«

#

cuz i always take too long

surreal sage
#

"i do qa myself, it's why i take so long"

#

who invented gifs

#

and why did they fuck up so bad

#

that the filesize is larger than normal videos

quartz kindle
neon leaf
#

3 weeks in working hours

quartz kindle
#

and pretty much has no inter-frame interpolation

#

each frame is a full lossless png

pearl trail
#

when using gif is more heavy than webm

#

or compressed mp4

neon leaf
#

apng for the win

quartz kindle
#

videos on the other hand are lossy jpegs further compressed by interleaving frames and shit

#

:^)

pearl trail
#

aight

#

imma do canvas

quartz kindle
#

store canvas frames in a raw file

#

full unpacked 4byte per pixel

pearl trail
quartz kindle
#

1000x1000 canvas frame = 4mb

pearl trail
#

hmmmm

civic scroll
#

i wonder if you can extrude a shape in css

quartz kindle
#

you cant extrude a cube from a plane, but you can create 6 planes and build a cube with them

civic scroll
#

what i wanted to do was a bit more complicated

#

wanted to do edges alongside segment display

quartz kindle
civic scroll
#

if i can bridge between two layers, that will be nice

quartz kindle
civic scroll
#

yes

quartz kindle
#

damn your css is amazing as always

civic scroll
#

that's all with css and svg

quartz kindle
#

ah so there is svg as well

civic scroll
#

i can do that with just css

#

but why should i

quartz kindle
#

i know you can

#

xD

civic scroll
#

the texts are all done with text element, but i kept segmented display as-is for glitch

quartz kindle
#

you want to add thickness to these edges?

civic scroll
quartz kindle
#

yeah the only way is to create new planes for them

civic scroll
#

here's a clearer one

quartz kindle
#

as css is pretty much 2d only

#

maybe you can do some haxoring with shadows

#

as shadows have enough parameters to simulate depth

civic scroll
civic scroll
lyric mountain
#

You can do 3d with css

pearl trail
#

translate3d Trolled

civic scroll
#

i can't extrude

civic scroll
#

also just 3d is not enough

#

you will need perspective as well

past field
#

my bingo game is πŸ”₯πŸ”₯πŸ”₯

#

thank y’all for your help fr

lyric mountain
buoyant estuary
#

im working on a multipurpose discord bot and i need suggestions for more commands to add

buoyant estuary
sharp geyser
#

Multi purpose bots are useless.

#

Theres thousands of them

#

At this point its not worth it unless you're making it only for one server

digital swan
#

youre wrong hes gonna make a revolutionary new multi purpose bot

sharp geyser
#

Impossible

digital swan
#

itll take over the world

deft wolf
#

With our ideas and Tim's optimization it will be the best bot in the world poggythumbsup

buoyant estuary
#

I just finished the dev commands lol

deft wolf
#

No, I rather do things that are useful to me personally

buoyant estuary
#

ah

#

could use oppions on the bot lol

deft wolf
#

The thing about multipurpose bots is that you can put anything into them, which is why they are not "unique" at all

#

Such bots have a lot of functions that most people will not use at all

digital swan
#

if you want it to be good/successful its best to focus on a specfic niche/feature and make it super good and unique

eternal osprey
#

hey guys i am deadass colorblind so i got a question here

#

what color did they use to fill the inner circle

#

cuz i know they use opacity, but i see fucking pink and that cant be right

craggy pine
#

Runescape gold huh

eternal osprey
#

yessir

#

we minin

craggy pine
eternal osprey
#

dayuuum

#

show your inventory

#

you got some loot πŸ—£οΈ

craggy pine
#

I dont got shit lol Im just farming a minigame for a specific drop atm. But, in regards to your question I know using a color drop tool wouldn't work well here since opacity technically changed the color. I do know I had the transparent png of the gold stack however.

#

in my opinion it looks like a white / gray color. Not pink

eternal osprey
#

hmm i see, i am fucking bad with colors

#

thankksss πŸ™‚

craggy pine
#

np

neon leaf
#

I love sql

past field
#

can someone look over my bingo code and give me some suggestions? side_eye i’m hoping to improve board generation speed and button reply speeds

quartz kindle
#

how many ms

#

theres nothing you can do to improve the speed of the button itself, as thats discord + network ping essentially

#

but if board generation is taking 100ms+, you can improve that

sharp geyser
#

uh oh

#

tim is getting his optimizing glasses on

past field
#

whoa wait

#

im just looking at the errors im hetting

#
Unhandled promise rejection: HTTPError [AbortError]: The user aborted a request.
    at RequestHandler.execute (C:\Users\Maurice\Desktop\Click War Bot\node_modules\discord.js\src\rest\RequestHandler.js:201:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async RequestHandler.push (C:\Users\Maurice\Desktop\Click War Bot\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
    at async InteractionWebhook.editMessage (C:\Users\Maurice\Desktop\Click War Bot\node_modules\discord.js\src\structures\Webhook.js:328:15)    
    at async ButtonInteraction.editReply (C:\Users\Maurice\Desktop\Click War Bot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:150:21)
    at async InteractionCollector.<anonymous> (C:\Users\Maurice\Desktop\Click War Bot\commands\bingo.js:172:17) {
  code: 500,
  method: 'patch',
  path: '/webhooks/1250437664587649025/aW50ZXJhY3Rpb246MTI2MjE0MTk5ODIyODQzOTE4NDprTkIzeE80UnBpa29MbVlDYXRkYVBtVnoxRjc4MFpZR3Zta1oxSUdOY2dxYTlKOWVLWnpDdzJiNW56dmRPalVjYjJqWmRIbFM4NlFRcXlVdTQxWTc1aUt0ODNWUk4zN3RkMVR4aWhqV1pDRjUzb1hsejE3NEhLR3V6NWZnR1hrcQ/messages/@original',
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: [Array],
      sticker_ids: undefined,
      thread_name: undefined
    },
    files: [ [Object] ]
  }
}
#

never seen this one before

past field
sharp geyser
#

no ty

past field
#

πŸ˜‚

quartz kindle
# past field https://pastes.dev/uwaRss8MpL
  1. first of all give measurements:
const timer = performance.now();
await generateBoardImage();
console.log(performance.now() - timer);
  1. does the image really need to be 1428, 2000? check if you can make it smaller
  2. images dont need to be loaded every time, you can store and reuse images
sharp geyser
#

Why not make a bunch of premade boards before hand?

quartz kindle
#

only 5524464740611248601600000 possibilities

#

:^)

eternal osprey
#

Tim lemme give you a combinatorics question to test your mind

#

Suppose you have 5 red and 5 blue balls. You randomly select a ball each time without replacement. What is the minimal balls you need to draw to ensure 3 consecutive blue balls

past field
#

blue balls is the worst.

neon leaf
#

but I only have 2 balls

quartz kindle
#

like the minimal possible is 3 if you're lucky, but you mean how many do you have to take out to get 100% chance of getting 3 blues in a row?

quartz kindle
neon leaf
#

I am very excited for when I deploy my mcvapi worker soon

#

cloudflare d1 is suprisingly fast

frosty gale
#

coffeescript users:

#

i still remember when it was used seriously

neon leaf
#

lol

frosty gale
#

but we have typescript now

sharp geyser
sinful crest
quartz kindle
#

your html will be inserted into the top.gg existing html, it already has the topgg's header and body tags

#

your style.css file will also not load

#

because it will look for a style.css inside topgg's servers

lament rock
#

Gotta embed the css

quartz kindle
#

also this doesnt look like valid css

sinful crest
quartz kindle
#

you cant use scss directly

#

it needs to be compiled into css

sinful crest
#

I see

sinful crest
#

Quick question, how can I get images to be in my long description?

past field
plain bough
quartz kindle
sinful crest
#

Also, how could I fix this?

#

the dots are not next to the sentences...

quartz kindle
sinful crest
# sinful crest Also, how could I fix this?
### Partnership Features

##### 1. Partnering with a Random Server


- How it works: Bridgify randomly selects a server for you to partner with, providing details like member count, category, name, and unique ID. You can choose to Accept or Decline

- Accept: A request is sent to the chosen server. If they agree, both servers exchange ads in their partnership channels, and you'll be notified of their decision. `(Note: Yes, the bot will post the exchanged ads in to appropriate channel!)`

- Decline: Wait for the cooldown to expire before using `/partner` again.

sinful crest
sinful crest
quartz kindle
#

oh i thought you were talking about embed description in your bot

sinful crest
quartz kindle
#

my bad

sinful crest
quartz kindle
#

you can add images on top.gg using html <img src="image">

sinful crest
#

Okay

quartz kindle
#

the image needs to be uploaded somewhere

#

for example an image sharing website

sinful crest
quartz kindle
#

i guess most people use imgur, but there are dozens of websites that do it

quartz kindle
past field
#

how much of an effect does the size of the lobby have on the games functionality?

past field
quartz kindle
#

the thing that has the most effect is the image size

#

canvas performance degrades exponentially with image size

past field
#

ah

sinful crest
sinful crest
quartz kindle
quartz kindle
sage bobcat
sinful crest
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

sinful crest
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

sinful crest
sharp geyser
quartz kindle
#

from 5 years ago

#

xD

sharp geyser
#

πŸ’€

sinful crest
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

sharp geyser
#

akamai seems so expensive for what it offers

quartz kindle
#

akamai targets business customers mostly

#

why do large businesses buy overpriced shit i dont know

#

probably money laundering

sharp geyser
#

πŸ’€

#

Fair enough ig

#

As a business i'd try to save money

#

cloudflare offers good features even on their free plan that most businesses should survive long enough before needing to upgrade

quartz kindle
#

i guess once you get to a certain point, you dont really care about saving money

#

you only care about pocketing it

sharp geyser
#

tell that to all those companies that do layoffs

#

they saving that money for themselves

#

πŸ’€

quartz kindle
#

yup

sharp geyser
#

financially speaking a lot of companies dont need to do layoffs

#

they only do so because they realize they are giving too much money to employees and not getting enough for themselves

quartz kindle
#

honestly i wouldnt be surprised if people trade services like that, company A buys overpriced service from company B, half the money disappears and is pocketed by both A and B CEOs and/or used as a tax deductible

sharp geyser
#

its crazy

#

businesses can buy things "for" the busiensses

#

and write off majority of the cost

#

"Oh the company needs x? Write it off on next years taxes"

quartz kindle
#

it gets worse, company A and B are both owned by the same people

#

so they pay themselves and pay no taxes

sharp geyser
#

Dont CEOs pay themselves in donations to avoid paying higher busienss taxes and personal taxes?

#

Donations cant be taxed at least in the US

quartz kindle
#

ye

#

among other things

#

like company shares

#

real estate under company ownership

sharp geyser
#

or they will outright buy things and write it off as company expenses

#

like houses, cars, etcetc

quartz kindle
#

also that

#

also they take loans

sharp geyser
#

yup

quartz kindle
#

and use their "earnings" to pay off the loans, and it counts as an expense, not as income

sharp geyser
#

take loans they dont need just to buy something they could of bought outright

#

purely to evade taxes and what not

quartz kindle
#

pretty much

sharp geyser
#

Its insane how corporate america works

#

and im sure it functions similarly in other places in the world too

buoyant estuary
#

i screwed up in getting my bot verifed lol

#

messed up a singal command forgeting to make it dev only

plain bough
#

Wonder when mines gonna get reviewed

lament rock
buoyant estuary
#

I did lol

frosty gale
#

the main goal is to make profit and minimise loss

#

they dont employ people for fun or because theyre kind

proven lantern
#

I just finished writing my zig replacement for a rust lambda. zig is looking a bit faster so far

Zig cold start response time
Billed Duration: 36 ms Memory Size: 128 MB Max Memory Used: 12 MB Init Duration: 10.94 ms

Rust cold start response time
Billed Duration: 141 ms Memory Size: 128 MB Max Memory Used: 18 MB Init Duration: 36.92 ms

#

build time with rust

#

build time with zig

proven lantern
#

last week of duration metrics for Rust code.

surreal sage
proven lantern
#

😦

surreal sage
#

rust btw*

proven lantern
#

Not too bad for Mac at least.

#

Do you need to use a macos machine to build? Or do you use the zig toolchain to cross compile?

sharp geyser
radiant kraken
#

such a goat

#

u can support over a dozen of targets with little effort

surreal sage
radiant kraken
#

is tauri only limited to those targets?

surreal sage
#

idk

sharp geyser
#

tauri should be able to. build to just about any target

knotty quartz
#

Any free sqlite databases

#

That are online.

neon leaf
#

cloudflare d1

lyric mountain
neon leaf
#

(or access to permanent storage on local disk (when using a bot hosting))

knotty quartz
neon leaf
#

then use d1

lyric mountain
#

while sqlite has WAL mode, it works poorly with many threads writing at the same time

#

d1 is likely to use queueing tho, so you'll probably have no concurrency issues, but still

knotty quartz
neon leaf
#

I think the issue is constantly moving hosts then

#

because any cloud database will be slower than local

#

by a good amount

lyric mountain
#

ideally you'd have a local cache of the remote database and use that for reading/writing

#

and then periodically push changes to remote

#

also mongo is largely different to sqlite, don't attempt to use the same structure for both databases

knotty quartz
#

However, the files don't upload without corrupting so I have to reset and re-install and manually add everything back via override commands by extracting the db

neon leaf
#

do your hosts not include a mariadb database option

knotty quartz
knotty quartz
neon leaf
#

huh?

#

if they are using ptero its mariadb

knotty quartz
#

Ah then yeah

neon leaf
#

yes thats mariadb

#

why not use that

knotty quartz
neon leaf
#

should be if you are already using sqlite

#

syntax is similar

knotty quartz
# neon leaf syntax is similar

Thank you! Might try it, would it work to write to as part of tests from my PC VSC? As I have to push everything from VSC as deploy-commands doesn't work on the host unless I script it to run everytime index is refreshed which I could do

neon leaf
#

you can connect to their database from anywhere

knotty quartz
#

Is it easy to move/manage?

neon leaf
#

also you can run deploy commands by just requiring it in the index file or putting it there

neon leaf
knotty quartz
#

would something like:

const deploy = require('./deploy-commands.js');

neon leaf
#

require('./deploy-commands.js');
should be enough

#

no need to assign it to something you wont use

#

unless you do

#

idk

knotty quartz
#
const sequelize = new Sequelize('primary_test', 'REDACTED', 'REDACTED', {
  host: 'localhost',
  dialect: 'sqlite',
  logging: false,
  storage: 'database.sqlite', // What goes here? Just the connection link?
});

Would this still work and where it has database what would I put? The name?

neon leaf
craggy pine
#

Maria is what I use. Quite nice

knotty quartz
#

Thanks

knotty quartz
neon leaf
#

v7 seems to be beta

#

so replace dialect and remove storage

knotty quartz
#

and add this:

#

I might use a connection URI

#

Which would you recommend? URI or the current layout I have?

neon leaf
#

your choice

#

im my experience urls are less reliable

#

because some dont en/decode passwords properly

knotty quartz
#

Plus if I wanted to use .env it's a nightmare

#

I'm having an issue with the error detector it's self 😭

knotty quartz
#

I changed .findAll to .find and it flags an error again

neon leaf
#

well whats the error

knotty quartz
#

It worked this time?

#

Idk what's happening. It just spammed console saying .find is not a function

#

Then I removed some code that wasn't needed anymore and it worked

#

and pushed all the database tables

lyric mountain
#

please take some time to sanitize your code, if you removed something seemingly unrelated and stuff started working then it means you have some loose ends there

knotty quartz
#

Right, it seems to be working other than one database isn't registering.

knotty quartz
neon leaf
#

it seems like its still trying to use sqlite somewhere

lyric mountain
#

since it's an online database, you can download some dbm and connect to it

#

just make sure to disconnect before starting the bot

#

this way u can check what's really inside the database

knotty quartz
#

It is setup

neon leaf
#

why is it using sqlite now?

knotty quartz
neon leaf
#

the dialect is still sqlite

knotty quartz
#

Wrong db choice

#

Sorry I thought I did option 2 I did option3

neon leaf
knotty quartz
#

Connection has been established successfully.

#
    dialect: 'mariadb'
  });```
neon leaf
#

the host is on the website

#

labeled endpoint ususally

knotty quartz
#

It's just an IP

neon leaf
#

yeah use that as host

#

not localhost

lyric mountain
#

also port

knotty quartz
#

Unless it's in the pre-made URI link which says mySQL

knotty quartz
#

Uncaught HostNotFoundError SequelizeHostNotFoundError: getaddrinfo ENOTFOUND REDACTED

neon leaf
#

make sure to remove :3306 from the end

knotty quartz
sharp geyser
#

Hello dev channel

knotty quartz
#

Now this

sharp geyser
#

Whatever you are connecting to isn't open and or accepting connections

knotty quartz
#

In the URL thingy it has this jdbc:mysql

neon leaf
#

sir

knotty quartz
neon leaf
#

in the bottom field

#

nothing, right?

knotty quartz
sharp geyser
#

πŸ‘€

knotty quartz
neon leaf
#

you need to leave it blank

sharp geyser
#

Leave it blank

neon leaf
#

o wait nvm its fine