#development

1 messages · Page 296 of 1

patent bramble
#

Email isn't that inconvenient lol

wheat mesa
#

It seems like you’re already GDPR compliant though, since you have an operational need to store the data indefinitely

stiff dust
#

There was a npm package for creating image from messages like discord chat anyone know it? I forgot the name of the package...

frosty gale
#

lmfao cursor ai writing unsafe code in something that can easily be done safely

eternal osprey
#

guys, is it me

#

or is the worst part about ts the tsconfig

#

EACH IMPORT I MAKE I GET A NEW ERROR

quartz kindle
lyric mountain
#

just migrate to dart :v

eternal osprey
#

waddahel is dart

#
const { createConnection } = require("mysql2");
const { getSecret } = require("../../Agents/AWS/awsModule");


module.exports = async function createDB() {
  try {
   
    const dbName = (await getSecret("Data", "key")).toString();
    // fetch other secrets in the same way
  
    const db = createConnection({
      host: "ip",
      user: dbUser,
      password: dbPassword,
      database: dbName,
    });


    async function executeQuery(queryString: string, params: string[]) {
      return new Promise((resolve, reject) => {
        db.execute(queryString, params, (err: any, results: any) => {
          if (err) {
            console.error("DB Error:", err);
            return reject(err);
          }
          resolve(results);
        });
      });
    }

    return { db, executeQuery };
  } catch (err) {
    console.error("DB initialization failed:", err);
    process.exit(1);
  }
};

hey guys, this is my database handler.
In my main.js, my entrypoint of the script, i have await createDb().

For some reason, the data returned by aws here is ALWAYS empty. Even my aws module logs data correctly, just this function doesn't seem like its awaiting?

stark kestrel
lyric mountain
eternal osprey
#

if i am learning a new language its going to be rust.

stark kestrel
lyric mountain
#

if u know js u prolly know dart

#

the only difference is that the latter has proper types

eternal osprey
#

facts, i just like rust though.
It's syntax reminds me of haskel in a very very very vague way

lyric mountain
#

put vague in that

eternal osprey
#

my favourite lang is haskell and i'll die by it

eternal osprey
#

loll i was right

stark kestrel
eternal osprey
#

haskell is just simple.

neon leaf
#

rust is also a cult

eternal osprey
#

i just like the way you must give a function signature in abstract format

#

it's also super fast, and has no side effects.

#

most of the compute stuff in my backend, i just wrote it in haskell for the funs.

eternal osprey
quartz kindle
#

that makes no sense at all

#

also why dont you use mysql2/promise

eternal osprey
#

but the whole thing is, it stillreturn an empty buffer.

#

I am absolutely stunned

#

all my other code is receiving their secrets nicely, only the connector of my db is not working.

#

ahhhhh ayayay

#

i know what's up

#

my encryptBuffer is encrypting the buffer and resetting the buffer

quartz kindle
#

you're encrypting in-place?

#

or just erasing it after

eternal osprey
#

requesting from aws each call is fucking expensive, hence i created a cache that i encrypt.

#

So eventhouhg that stays in memory, its encrypted.

#

i am mainly scared for memory dumps, not sure why.

neon leaf
#

if they are encrypted, they need to be decrypted

#

how are they decrypted?

eternal osprey
#

Using another secret lmao

#

But that secret isnt stored on the machine, just at modt a few seconds in memory

#

But nothing to do against that

#

Unless i create some sort of signing algo such that the key never leaves the environment

neon leaf
#

or quit the never ending game

eternal osprey
#

yup

#

I wont tho

#

Moving yo privy made it a lot safer tho

#

No more private keys on my server

#

All signed by a trusted third party

frosty gale
#

😵‍💫

scenic kelp
#

OCaml or F#

#

both are mostly functional but also let you do some imperative stuff when performance would benefit

quartz kindle
#

if that were an actual real world concern, nobody would be using secrets/keys/passwords anywhere in their programs lol

#

also, if you're using js, pretty sure any string you create will be cached in the engine for performance reasons

#

nodejs has string deduplication built into the engine, any string you create, even if temporary, will be stored in a string table

queen needle
#

interesting

#

I never knew that

quartz kindle
#

of course there are cases where it doesnt kick in, but thats up to the engine to decide

queen needle
#

TimJS when

quartz kindle
#

all copies of that string have the same address, so its all the same string, even if you write it literally, the engine checks if it already exists in the table

queen needle
#

Oh that's neat

#

I like thet

neon leaf
#

(rope strings)

eternal osprey
#

I mean i got a cache for private keys.. it just feels super exposed hahaha

quartz kindle
#

there isnt a single software in the world that isnt vulnerable to memory dumps, if thats what you're worried about

eternal osprey
frosty gale
#

lol cloudflare outage

#

half of the internet going down again i presume

deft wolf
#

Yes

#

Thank god youtube works without any problems kappalul

waxen silo
#

a dangit, my fav corn site runs on cloudflare smh

#

/jk

deft wolf
#

A lot of them actually kapp

frosty gale
#

i realised because i was working and the service we use stopped working so i messaged everyone asking if theyre having an issue too

#

messaged the dev and he told me its cloudflare

unreal mist
#

Yeah someone just shared this to another server I’m in

frosty gale
#

another global outage from cloudflare

#

not a good look

#

uptime sla must be cooked

unreal mist
#

Cloudfare: "aight peace out 🤞 "
Cloudfare status: "wait wat about me"
Cloudfare: "dw, u will join me later"

neon leaf
#

first cf outage that actually affected my stuff

#

🙏

deft wolf
#

Real

unreal mist
#

Thankfully my website isn’t affected KEKW

waxen silo
deft wolf
#

Hiding origin IP, ddos protection, free SSL cert and hotlinking protection in my case

waxen silo
deft wolf
#

Do you really want to use it after today's outage? kapp

unreal mist
#

I use fastly KEKW

#

For the ssl cert

deft wolf
#

I mean for ssl you can just use cert bot but cf's dashboard is also cool I guess

neon leaf
waxen silo
#
        if not ctx.author.guild_permissions.kick_members:
            embed = discord.Embed(
                title="Missing Permissions",
                description="You do not have the permissions to execute this command!",
                color=EmbedColor
            )
            embed.add_field(name="Permission Needed:", value="`Kick Members`", inline=False)
            await ctx.send(embed=embed)

Anyone that can spot a mistake i made in discord.py?
im guild owner so no clue why it does this TwT

unreal mist
#

It’s going off the permissions, yes guild owners have them but it’ll return as false unless you have a role with it

waxen silo
unreal mist
#

You could check

if ctx.author == ctx.guild.owner:

waxen silo
#

i hate dev lmfao

unreal mist
#

If you want guild owners to always have access to using?

#

I think that’s the right way for that

waxen silo
#

thats the whole thing
as simple as that
but for some reason discord says "fuck you"

unreal mist
#

Yes but guild owners will always have those perms by default anyway?

waxen silo
#

Exactly
why tf aint it working then TwT

unreal mist
#

Does the bot have the intent?

waxen silo
#

bot has all intents, and the bot has its own perms

#

ive done discord.Intents.all()

#

bruh
when printing ctx.author permissions (mine), it returns an empty string

unreal mist
#

What happens if you print perms of the author to console?

#

Beat me to it

#

Have it print the type of author

#

If it says user then that’ll be why

lyric mountain
#

try using channel.permissions_for for checking permissions

quartz kindle
#

i dont use it in any of my project because of that

#

rather have uptime than "protection" lol

wooden ember
#

its probably because they are so big, "sure my site is down, but so is everyone else's"

#

even if your site is up and its something people use for work, chances are they alreasy have the day off becuase all their work stuff is bricked. Not a good mentality but would you rather deal with some more downtime, or have to pay people to fix the issue while you are loosing money from it as well?

#

either way, cloudflare does not concern me, floor desktops have me covered.

steel oxide
#

added stat displays to my top.gg page which was fun

#

shoutout to claude for making the svg for me KEKW

unreal mist
#

#jealous

steel oxide
#

i wanna get into graphics and stuff more

#

always thought that stuff is really cool

unreal mist
#

You shouldddd

#

I’ll get you to draw me another theme to Toastoku

steel oxide
eternal osprey
#

boys i am kinda tweaking.
What's the difference between export and module.exports?

#

for example, when i use export, i must import it.
If i use module.exports i must use require.

#

I know that it has to do with the fact that import is web based and require is a nodejs thingy, but never really looked into it.

waxen silo
lyric mountain
#

also @quartz kindle wtf is happening with google auto-translate lmao

#

who tf is snapstromegon

quartz kindle
#

back then js had no concept of modules, all js was loaded into the global window scope

#

so a lot of people invented ways to simulate a modularized environment, among them was nodejs's own require system, which later became known as commonjs.
other similar systems worth mentioning are AMD (asynchronous module definition), requirejs and systemjs

#

pretty much all of them are obsolete and ESM is the one and only official standard now, although it does have its flaws and limitations, which is why a lot of people still prefer using commonjs in node

frosty gale
#

mostly for dos protection but i'd rather have the independence over getting dos protection that sometimes works sometimes doesnt for a site that isnt targeted by them anyways (and even if it does there isnt really a loss for me)

#

i think hetzner offers some ddos protection for free so thats good, an improvement over galaxygate which charges for it

quartz kindle
#

i use cloudflare turnstile and sometimes analytics though

unreal mist
#

What’s the turnstile do?

quartz kindle
#

last i checked, cloudflare's analytics does not require cookies, so you dont need a cookie banner for using it

stark kestrel
#

modern captcha

quartz kindle
#

while most other analytics do

quartz kindle
unreal mist
quartz kindle
#

its a bit clunky to work with, but it works pretty well, and often verifies by itself without user interaction

#

you can also hide it from view and only show if the user did not pass the automated tests and needs to interact

unreal mist
#

Fair enough

quartz kindle
#

you can also set it up to protect the entire website by redirecting you do a full screen captcha, but i dont like that one

frosty gale
#

its better than google captcha at least

quartz kindle
#

yeah better than anything that uses "please click on all cars/buses/bycicles"

frosty gale
#

but im not a fan of captchas in general though i prefer defence against bots/automation by design instead (but sometimes i acknowledge thats not really possible or easy)

quartz kindle
#

yeah there are many ways to protect yourself, but for something public/production-ready this is the safest bet i guess

#

i use it in login forms and all public facing forms

#

once the user logs in i disable it though

stark kestrel
quartz kindle
#

i also have a honey pot in my forms for another layer of protection but its w/e at this point

neon leaf
#

@frosty gale did you know this syntax exists

#

just reremembered it exists

stark kestrel
#

let-else iirc

frosty gale
frosty gale
quartz kindle
#
const a = switch(x) {
  case 1: return "a";
  case 2: return "x";
  case 3: {
    dosomerthing();
    return false;
  }
}
queen needle
#

that'd be neat

quartz kindle
#

there is a proposal to bring this to js, but the proposed syntax is ugly as hell

queen needle
#

WHat is it?

quartz kindle
#

its still in stage 1 (hasnt moved in 5 years lol), so its not finalized

#
match(<subject-expression>) {
    when <pattern>: <value-expression>;
    when <pattern>: <value-expression>;
    ...
    default: <value-expression>;
}
queen needle
#

idk i like that ngl

quartz kindle
#
match (command) {
  when ['go', let dir and ('north' or 'east' or 'south' or 'west')]: go(dir);
  when ['take', /[a-z]+ ball/ and {let weight}: takeBall(weight);
  default: lookAround()
}
queen needle
#

what in the python

#

i take back what I said

quartz kindle
#

exactly

#

xD

queen needle
#

i thought it'd be

neon leaf
#

I like how rust does it but wont really work with js sadly

queen needle
#
const direction = match(command){
when "north": "West"
...
}```
quartz kindle
#
match (res) {
  when isEmpty: ...;
  when {data: [let page] }: ...;
  when {data: [let frontPage, ...let pages] }: ...;
  default: ...;
}
#

it has some weird form of destructuring built in

queen needle
#

odd

#

i don't like that

quartz kindle
#
match (res) {
  when { status: 200, let body, ...let rest }: handleData(body, rest);
  when { const status, destination: let url } and if (300 <= status && status < 400):
    handleRedirect(url);
  when { status: 500 } and if (!this.hasRetried): do {
    retry(req);
    this.hasRetried = true;
  };
  default: throwSomething();
}
#

like how does this even make sense

neon leaf
#

yeah, this doesnt really work without a static type system

eternal osprey
#

day 4 of rewriting my code structure

#

i got so many folders i like it

unreal mist
#

i need to check if im actually allowed to use external c++ libraries for my assignment memefacepalm

#

if not then i cant read/write to json for saving and loading kekw

neon leaf
#

Ive gotten so used to types this nested at this point

frosty gale
frosty gale
#

200 byte structs as well 😍

neon leaf
frosty gale
#

dop i have a choice

neon leaf
#

this already has like 10 boxes

#

cant count apparently

#

unless RwLocks also box

frosty gale
#

your heap must look like a barcode atp

neon leaf
#

well atleast these objects usually live for the entire programs duration

#

but it is a mess ye

#

need to get ram usage down

#

50mb idle is too much for my liking

wheat mesa
#

hyper optimization

#

wish I was doing that

frosty gale
#

rust technically isnt the problem here but it encourages these types of patterns in some cases

wheat mesa
#

instead I'm writing a website where my chrome tab is taking up 300mb of ram to run it

neon leaf
#

also I found that the rust xz crate leaks memory if you dont read the sys crates docs

wheat mesa
#

btw maybe I'm tripping but I like that font

#

what font are you using

neon leaf
#

because when you enable mt, it does the compression completely outside of any of your logic

#

and its buffer never fills up

#

so you end up using 400gb ram

frosty gale
neon leaf
#

'Droid Sans Mono', 'monospace', monospace

wheat mesa
#

thank you

neon leaf
# neon leaf because when you enable mt, it does the compression completely outside of any of...

so this is my genius solution

impl<'a, W: Write + Send + 'static> Write for CompressionWriter<'a, W> {
    #[inline]
    fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
        match self {
            CompressionWriter::None(writer) => writer.write(buf),
            CompressionWriter::Gz(writer) => writer.write(buf),
            CompressionWriter::Xz(i, writer) => {
                *i += 1;

                if *i % 64 == 0 {
                    writer.flush()?;
                }

                writer.write(buf)
            }
            CompressionWriter::Bz2(writer) => writer.write(buf),
            CompressionWriter::Lz4(writer) => writer.write(buf),
            CompressionWriter::Zstd(i, mt, writer) => {
                if *mt {
                    *i += 1;

                    if *i % 64 == 0 {
                        writer.flush()?;
                    }
                }

                writer.write(buf)
            }
        }
    }

    #[inline]
    fn flush(&mut self) -> std::io::Result<()> {
        match self {
            CompressionWriter::None(writer) => writer.flush(),
            CompressionWriter::Gz(writer) => writer.flush(),
            CompressionWriter::Xz(_, writer) => writer.flush(),
            CompressionWriter::Bz2(writer) => writer.flush(),
            CompressionWriter::Lz4(writer) => writer.flush(),
            CompressionWriter::Zstd(_, _, writer) => writer.flush(),
        }
    }
}
#

(same issue on zstd)

frosty gale
neon leaf
#

seems so yeah

wheat mesa
neon leaf
#

the sys crate say it just continues without stopping

#

and the xz crate seems to not know that or something

#

flushing does force it to stop and finish though

wheat mesa
#

also guys NEVER use laravel

#

worst technology I've ever worked with

neon leaf
#

🙏

#

I do not like starting projects with it, but I dont hate working on it

frosty gale
#

never use php jk its a bit dated but its ok still

wheat mesa
#

I spent like 2 days working on setting shit up because I had to go in and manually modify my php.ini file to get something working

#

And then I had to find some random ass library binary online and tell php where to find it and shit

#

Honestly worse than setting up a C++/C lib

#

I thought the whole purpose of a language meant for web dev was to make it fucking easy

#

So glad I'm being moved to a different project next week

neon leaf
#

did you do it on windows or what?

wheat mesa
#

Also not to mention the intellisense for php is awful

neon leaf
#

never had these issues

wheat mesa
#

Yeah windows

neon leaf
#

that explains it

wheat mesa
#

All the machines at my work are windows

#

I'm sure it's not as big of a pain in the ass on linux

#

But we recently switched to using laravel for most projects because they found it "made us more efficient"

#

Which is a total lie, I've been slower than ever using PHP due to lack of intellisense and terrible language features that aren't consistent

neon leaf
#

would probably consider setting up wsl2

wheat mesa
#

Can't run it through WSL

neon leaf
#

but yeah the language itself is a total mess

wheat mesa
#

Can't remember why, but there's a reason I can't

neon leaf
#

me when I explode and implode a string

wheat mesa
#

We're using Herd

#

Yeah what an awful name for COMMON string functions

neon leaf
#

strrev and then str_contains

wheat mesa
#

"split"? nah, EXPLODE

neon leaf
#

at least laravel reexports most of these with more sane apis and names

wheat mesa
#

laravel is horrific

#

I hate everything about this framework

#

We're using it combined with Inertia Vue

#

So at least the frontend is somewhat tolerable, but god the whole laravel model is NOT meant to work with an SPA

neon leaf
#

it's funny because laravel has official templates for spa

wheat mesa
#

Yeah but the whole idea of laravel just doesn't work well with SPAs

unreal mist
#

-# any of you use c++

neon leaf
#

yeah

wheat mesa
#

It's just SSR disguised as an SPA

wheat mesa
neon leaf
unreal mist
#

any experience with json with it 😭

neon leaf
#

yes

wheat mesa
#

a bit

unreal mist
#

how difficult would it be to create a header allowing nested variables (idk if this is worded right)?

wheat mesa
#

Like your own JSON parsing library?

unreal mist
#

kind of? im not entirely sure if im allowed to use external libraries but im wanting something like this:

{
    "overall": {
        "draws": 1,
        "total_games": 4
    },
    "player1": {
        "losses": 0,
        "name": "Noah",
        "piece": "N",
        "wins": 3
    },
    "player2": {
        "losses": 3,
        "name": "Noah2",
        "piece": "C",
        "wins": 0
    }
}

i know external libraries would be easier, however if im unable to, id rather learn how to make my own?

neon leaf
#

heh, i think your expectations are too high for c++

wheat mesa
#

It depends on your level of comfort with C++ and with language parsing

#

This isn't necessarily a super difficult task if you are familiar with C++ and parsing in general, but could prove to be very difficult to make it efficient

unreal mist
#

oh im not lookign for something extreme, will literally only store minimal data

wheat mesa
#

The general pattern to handle JSON in statically typed langs is to have some sort of recursive structure of classes

unreal mist
#

ill be asking my tutor if thats allowed tomorrow anyway just to be safe, just also need to look at other possibilities if not

wheat mesa
#

E.g.
JObject -> holds Map<String, JObject>

#

And at some point you'd have some sort of disciminated union to be able to convert a JObject to a JString or a raw string, etc.

#

This is just a general pattern, you may want to look at how popular libraries actually handle this

unreal mist
#

any youd recommend to look at?

wheat mesa
#

It's been a while since I've done anything with json in C++, you can probably find a billion libs by just searching "C++ JSON library"

unreal mist
#

alright

eternal osprey
#

does anyone know an online service for saving secrets?

#

I don't want to have my shit in a .env

#

i know aws secrets manager, i am still in shock cuz i didn't understand shit. You got iam policies, iam identity center, resource policies, resources, roles, roots, brah, so rather want a diff one

patent bramble
#

Don't know why but Discord keeps ignoring my X-Audit-Log-Reason specifically on role deletes 😭

clever tundra
eternal osprey
#

feels scary.

#

if my shit gets breached i am cooked basically

clever tundra
#

Just have a self implode button on your desk

eternal osprey
#

Actually what about google cloud secrets?

#

They any good

patent bramble
#

I use Cloudflare Workers, they have secrets. Works perfect for me. If I ever reset my bot token I just update there and GitHub and refresh/clear clipboard to erase traces of it. As long as bad code isn't pushed and neither get breached it won't be exposed.

#

I've even considered a separate worker to autonomously rotate it every x days, but that might be overkill.

patent bramble
eternal osprey
swift lava
#

Hello

patent bramble
clever tundra
#

@shell tundra

shell tundra
#

.ban @wild shoal 7 scammer

shell echoBOT
#

Banned mummyrose0864

eternal osprey
#

or a way to store secrets alongside your vps

#

only feature i feel like is missing

#

anyone that used anything else than .env and can vouch for a cloud based secrets manager?

stark kestrel
#

since we host stuff on azure, its keyvault is kinda nice

eternal osprey
#

hmm, you got nothing else you used in the past?

#

I don't want to just google stuff w/o knowing which one to trust.

stark kestrel
#

haven't used others nope

#

heard good about hashicorp but can't say anything about it personally

eternal osprey
#

actually i read about doppler, their process is super sick

patent bramble
#

some larger companies might have something to support it though but your basic VPS providers likely won't. At least not for a while I'd think

stark kestrel
unreal mist
eternal osprey
#

you can run your node with the doppler built in cli, this will then inject a process.env into your program. So sick.

frosty gale
neon leaf
eternal osprey
#

hey guys what are yall up to

#

yall having a wonderful day?

deft wolf
#

Not really, I was dizzy all day sad

frosty gale
frail tinsel
cedar crescent
#

@steel oxide check dm please

steel oxide
pearl trail
#

proof that we can't trust AI fully:

#

casually just pinged 305k+ members multiple times

deft wolf
lyric mountain
quartz kindle
#

cloudflare runs on amazon?

#

explains why they have so many outages

#

:^)

prime cliff
pearl trail
#

🤫 🤫

acoustic bough
lyric mountain
#

lmao

vivid fulcrum
#

looks fun though. cross plat is always welcome

frosty gale
#

but tbh anything is more performant than react/react native at this point

vivid fulcrum
#

i've been using tauri lately. it isn't a "native" library. in a sense that it just wraps webview2
but it still does it very well and I get to keep using JS/TS on the frontend

#

and the build sizes are reasonable

frosty gale
#

ah it uses webview

#

makes sense

queen needle
prime cliff
lyric mountain
#

dont forget windows using electron for the start menu :v

lament rock
#

🤢

queen needle
lyric mountain
#

it is

quartz kindle
neon leaf
#

need to make a really simple mobile app that just reads nfc tags and calls some apis, does anyone have recommendations that are easy to develop with (including nfc support while developing!!!!)? android only

prime cliff
#

Wait what start menu is electron hu?

lyric mountain
#

should be pretty quick to get something up and running

neon leaf
#

alr thanks!

#

first time trying flutter ig

lyric mountain
#

it's similar to js, in a way

#

but well, just create a project and read the tons of comments it'll include in the example

stark kestrel
neon leaf
#

how does testing while developing work? adb?

stark kestrel
#

emulator and adb

lyric mountain
#

I use intellij, but vsc also has a good integration plugin

#

dont recommend doing it raw

prime cliff
#

My phone is rooted for adb wifi mmLol

lyric mountain
#

bro u dont need root for wifi debugging KEKW

prime cliff
#

With older android versions you do sadly

lyric mountain
#

ah right

neon leaf
#

maybe consider custom roms then?

lyric mountain
#

hm?

prime cliff
#

I do but it's still a higher android version

#

I wouldnt want to upgrade to 11/12 anyway those versions had issues and restrictions like the stupid obb block

neon leaf
#

mmm, im running rooted stock nothing os on android 15

prime cliff
#

Have fun when google annoys you with sideloading 🙂

neon leaf
#

eh, SAI will cover it

#

sideloads apps using root

#

so bypasses any bullshit

frosty gale
neon leaf
#

youd think so

frosty gale
#

google and developers when i want to actually own my phone:

neon leaf
#

but 2h later and safetynet is completely fixed

#

can even download banking apps

#

and run them

frosty gale
#

yeah i use the play integrity fix on an old phone i rooted too, but its a cat and mouse game at this point because they rely on leaked TEE certificates from older android devices with less security and google constantly bans them so you have to keep rotating

#

and eventually we'll probably run out of insecure android devices to leak those certificates from

neon leaf
#

it is what it is

#

dont really use my phone much anyway

frosty gale
#

although i'll still choose owning my device any day of the week over bs restrictions

#

by the way think google is starting to cave into the pressure over the sideloading restrictions, i think they'll allow you to install unverified apps if you do some "this is unsafe do you want to enable this" typa shit

#

although i have a feeling there will be some curveball to this as with everything google does

neon leaf
#

beautiful sketchiness

neon leaf
#

i just hope the EU will ensure its atleast still usable

frosty gale
#

albeit i think the EU is actually part of the problem, at least for bootloader unlocks so not exactly related
samsung recently removed all bootloader unlocking mechanisms from their devices and its speculated its because of the EU's new radio law which requires manufacturers to lock devices down to prevent people (including owners) from potentially tampering with radio equipment on the device

neon leaf
#

waaaaaaaaa

frosty gale
#

truth is 90% of devices dont allow tuning the radio even with root since its encoded in the firmware/radio chip itself but might be an overkill solution just to comply

neon leaf
#

i mean its not hard to just buy radio equip

frosty gale
#

yeah, and just like that samsung completely alienated their entire root/custom rom community they've built up over a decade with not even a newsletter or post as to why

neon leaf
#

rust is finally catching up 🙏

quartz kindle
prime cliff
#

pog got it working with websocket and message sending

clever tundra
#

Alright I'm desperate I need a py library that can reliably detect the language of a string and:

  • handles short strings
  • handles all langs
  • returns country code/name

I've tried about 8 and all aren't great at all

frosty gale
#

i still remember how carbon banged on about being the successor and replacment to c++ (everyone forgot about it)

neon leaf
#

I mean its not released yet is it

frosty gale
#

then in that case the hype and claims they made was way too early because its been ages

delicate zephyr
stark kestrel
#

They always said, IF it becomes to a stage where it can be production ready, it wil be a successor to C++

delicate zephyr
#

which 3

clever tundra
stark kestrel
#

And the production ready stage was always said to be in years from now, if at all - it's an experiment

clever tundra
#

Will try the rest tho

delicate zephyr
#

i guess try the other 2 then

clever tundra
#

Yeah

frosty gale
stark kestrel
#

You should read the entire thing

#

It's an experiment they do to see if a language successor to C++ can be done

#

It never claimed like other languages do to be the successor and replacement of a language

#

It first goes by its initial experimental phase to see if it's even possible

#

Unlike other languages that straight up say the opposite

#

cough V cough

frosty gale
stark kestrel
#

You should read the entire project's ideology and phases/development stages

#

They may stop it tomorrow because they consider the experiment to not be a success

#

Production ready was always said to be in the years, with no deadline or specific year, exactly for the reason that it may not continue

scenic kelp
#

the best thing that could happen for C++ is just a preprocessor that denies usage of older C++ features

frosty gale
#

i sorta use c++ like c with classes and on steroids but thats starting to change after using rust more

#

i started out jumping into c++ without actually learning any of the modern mechanics and interfaces in it so at the moment its a mess of c and c++ apis, random mallocs and news etc

#

ive only learned about RAII a few months ago... after using c++ for 2-3 years lol

neon leaf
#

oof

frosty gale
#

in all fairness i started out c++ when writing embedded code so no standard library so got used to the old legacy c constructs to do everything

unreal mist
#

I started c++ this year with my assignments KEKW

quartz kindle
#

i surrendered and bought 1 month of claude pro

#

lets see if its worth it

pearl trail
#

ong tim fell into ai hole

deft wolf
#

My goat disappointed me mans_sad

steel oxide
#

the results...very good

#

but admittedly it's made me a lazy programmer 💀

feral aspen
clever tundra
#

because claude is best for coding

neon leaf
#

tbh the newer models are worse than the old ones

#

atleast in the real world

frosty gale
#

every ai company copying each other's $20 a month lol

#

i still remember how sam altman did a poll on how much people would pay for chatgpt pro and according to them it came to $20 a month

quartz kindle
delicate zephyr
#

sad because im gonna have to tell my work to take me off their copilot seat so I can use my own so i can have claude

#

or I just get cursor

frosty gale
#

cursor has all the major llms and includes most of them in their pro plan so its worth it if you want the best bang

#

has claude too and the latest sonnet models

#

although doesnt github's copilot include claude as an option too?

scenic kelp
#

we're mixing references and pointers with no rhyme or reason

#

like something that logically should be nullable must return a reference????

lament rock
#

I think some people get caught up in their own ways of programming, which is true for just about everyone unless they can break out of that and become "agile". People find whatever works for them and aren't always about how to do things "properly" or in the most efficient way because of how they're able to apply their logic or because of past experiences. I taught a few people entry level JS and I'm certain I did things in a decent enough manner as they've gotten relatively good at it, but I'm certain what I told them is a bit dated or not the most uh... Ideal I guess for lack of a better word.

I think it's really hard to teach people your own ways of logic as you have that fundamental understanding, but not everyone applies logic the same way

scenic kelp
#

i'm not even saying she should be using smart pointers and RAII everywhere

#

pointers and references are fundamental C++ features and the fact that she's mixing them with no purpose is insane

frosty gale
#

but you still probably wont get away from using those in your course since many c++ codebases still use them without RAII/safe alternatives so probably just preparing you for reality of c++ codebases

scenic kelp
#

remember this is end of term too so she has very much explained how they should be used properly

frosty gale
#

☠️

#

i would just ask since it seems nonsensical at first

prime cliff
frosty gale
prime cliff
scenic kelp
frosty gale
#

its a bit funny tho lmao

#

if you posted that on the c++ subreddit youd get slaughtered

scenic kelp
#

the majority of roles I have seen are C#, Java, JS or C++

#

C++ was the only weak link for me and I also needed to take either cpp or some fuckass networking course

frosty gale
#

learning any of those in the big 2025 when we have chatgpt? wild

unreal mist
#

I’d rather cpp than networking too

prime cliff
#

C++ is more suited for lower level jobs with more experience required so it's a higher barrier of entry compared to C#, JS, Python

scenic kelp
#

yeah but that's also a major weak area of mine

#

I didn't really have any systems language experience

frosty gale
#

rust makes it a lot harder to get wrong at the cost of some power (but lets you do a lot of that using unsafe)

steel oxide
#

does anyone happen to know if the GuildEmojiDelete event fires when a server loses extra emoji slots? (from losing nitro boosts) Thonk

unreal mist
#

the ones locked when sent, just send like this :emojiname: instead of the actual emoji

steel oxide
steel oxide
#

it's just a pet peeve of mine when they look like :emoji: KEKW

#

ty for the answer lapamauve

unreal mist
#

youre welcome

unreal mist
steel oxide
#

reuploading 100 emojis each time u unlock new slots sounds so fun! 🤣

unreal mist
#

i know right!!!

eternal osprey
#

hey guys is the ip of a vps @ datalix a /32 or /24 mask?

neon leaf
#

/24

eternal osprey
#

i set up trusted policies to make sure only my ip can access it, i added the ip as a /32, but i get rejected lol

eternal osprey
neon leaf
#

if you set it to /24 it will allow everyone on the ip block

#

depends where you use the mask in

#

for networking /24 is correct

#

for whitelisting /32 is

eternal osprey
#

owh wait so my vps doesn't get to use the whole mask?

#

damn

neon leaf
#

a /24 block costs like 500€/month

eternal osprey
#

my bad lol

#

why the fuck is doppler rejecting my ip then

neon leaf
#

ipv6?

eternal osprey
#

my home network gets in though

#

that's what i don't get

#

Doppler Error: Your IP address is not allowed to access this config. Please contact the workplace owner for access.

neon leaf
#

your vps has a /64 ipv6 block

eternal osprey
#

really strange dafuq

#

may it actually be cuz of the ddos mitigate portal that datalix is running?

eternal osprey
neon leaf
#

yes

patent bramble
#

How long does it take Discord to approve intents? I thought it was quick but I'm going on 4 days now and hit the 100 limit. Can't join any new guilds. Heck I can't even add it, which is wild because it's mine lmao

stark kestrel
#

It used to be a few months, so I wouldn't complain if it takes like a week or so KEKW

lyric mountain
acoustic fern
#

Mine was like 2 days I believe, wasn’t long at all

#

Maybe I just got lucky lol

unreal mist
#

I think for me, it was 33hrs after applying? Could be wrong but I also believe it’s only M-F they deal with the requests too

clever tundra
#

and good hekkin luck lmao

frosty gale
clever tundra
patent bramble
patent bramble
patent bramble
patent bramble
#

Kinda sucks because there's nowhere to check the status to know. Bot page still shows the need for the application, but it said that ever since I submitted it and I got the email about it so I know it went through.

unreal mist
#

I’d say you’d hear back by the end of the week, next week possibly at the latest?

prime cliff
queen needle
#

Looking nice!!!

amber rose
crystal wigeon
#

yo uh, is it possible to send 60k users dms from discord bot?

#

im doing a christmas event where users get some reward but I want to dm them

#

to make them aware of the reward they received

#

is it possible?

deft wolf
#

Is it? Yes. Should you? Probably not unless you know they dmed your bot first

crystal wigeon
#

yeah these are all players who registered/played on my bot

lament rock
#

Sending that many messages at once is definitely how to get your bot's account flagged

crystal wigeon
#

but dont you get rate limited if u send 5 dms a second or seomthing.

#

yea

#

worried about that

deft wolf
#

Rate limited =//= flagged no?

lament rock
#

You'll have to spread it out over a considerable amount of time. If you need to update your users that care about something, I set a status

#

The rate limit is 5 messages per 5 seconds per channel but sending the same message is sus

crystal wigeon
#

so the scenario is. when users receive a gift they get a dm from the bot. and I've decided to gift everyone for my bot's anniverary

#

and theres like 60k players on the bot

#

not sure how to approach this flork_think

lament rock
#

Just set a status. Dont send a message for that. If the user later finds out they have it, sufficed it's in an obvious spot then they'll see it

crystal wigeon
#

hmm but the goal also is to bring back inactive players

deft wolf
#

You could inform them when they use your bot next time that they received something

crystal wigeon
#

so they will never know about the reward right?

#

hmm

deft wolf
#

If they don't care about your bot do you really think "gift" would make them come back?

lament rock
#

If people don't bother to check of their own accord then I take a stance that you shouldn't get in their way and try to force your way back into things

crystal wigeon
#

ig I can reward them when they interact with the bot again

#

thanks

lament rock
#

Honestly I could check how often ppl use my bot regularly but I don't care tbh. Will only get me worried over nothing tbh

unreal mist
#

Could always do it as an announcement, first time they interact with the bot since you added it, the bot will tell them in the channel that they have a reward they can claim?

crystal wigeon
#

but i wonder how do these ticketing bots work?? i assume 100k+ users use it and they get dms from this bot no

crystal wigeon
lament rock
#

The messages are usually different

crystal wigeon
#

i see

lament rock
#

some bigger bots have relaxed limits as well

unreal mist
#

Ticket bots usually send an ephemeral (hidden message) to say the ticket was created and usually only dm if a) user has them open b) ticket was closed but that’s also something that is setup server side for the dming part

#

Not all servers have it where it’ll dm the user once it’s closed

crystal wigeon
#

gotcha

lyric mountain
crystal wigeon
patent bramble
unreal mist
#

Tomorrow is a holiday?

patent bramble
#

US Holiday

unreal mist
#

Oh right yeah I forgot it was TG tomorrow

#

Someone mentioned it yesterday actually despite us being in the UK

patent bramble
#

then Black Friday/Cyber Monday chaos ensues

unreal mist
#

Yeah I know Black Friday is this weekend

patent bramble
#

although it's never like it used to be lol

#

well Black Friday is always the day after Thanksgiving 😛

twilit hull
#

?verify

deft wolf
deft wolf
#

Polish users Classic

eternal osprey
#

hey guys, how do i pass a whole ReactNode as a data prop ?

#

I basically want a main function that wraps my children in a header and footer to mitigate repeated code.

unkempt stream
#

🇵🇱

quartz kindle
#

o kurwa

frail tinsel
#

@deft wolf i really dig your profile pic

#

my attempt at one of those community pixel things

unreal mist
lyric mountain
#

Most vpns allow for ip rotation

frosty gale
# unreal mist 1 star per ip per hour (so with mobile data that’s 2 an hour 👀)

initializing my botnet to start placing stars as we speak

-# The preceding statement contains figurative or humorous language and does not describe any real or intended use of automated systems, “botnets,” or any activity that violates Discord’s Terms of Service, Community Guidelines, or applicable law. I do not operate, condone, or participate in unauthorized automation, distributed control networks, or any activity that could compromise platform integrity or user safety. Any interpretation suggesting otherwise is incorrect.

neon leaf
#

dude I swear some companies deserve to go under

#

I got access to a companies full network with a basic path traversal exploit, and now they are denying it

#

so I have to go to the state now because they have to report this and are refusing

quartz kindle
#

@frosty gale did you see that hetzner has different plans now?

#

they have a "cost-optimized" section and a "regular-performance" section

#

cost-optimized has 4gb ram and 2 vcpus for 3.5 eur

#

i would like to run some benchmarks on these lol

frosty gale
#

might switch over because the old plan im on now is slightly more expensive than the new ones

#

but dont know how it compares on performance

pearl trail
frosty gale
#

current plan vs new plan
not sure if its worth it

quartz kindle
#

im on the CPX11 plan because USA location

#

so im stuck with higher price and only 2gb ram lol

#

for now

quartz kindle
#

let me look at them, but i dont like OVH's reputation lol

pearl trail
pearl trail
#

my friend's been using ovh for their business and it's been working just fine

quartz kindle
#

but idk

pearl trail
#

wow

quartz kindle
pearl trail
#

i see, thanks for the info

neon leaf
#

it was a long time ago already

quartz kindle
#

here is side by side for OVH (right 4 cpu 8gb) and hetzner (left 2 cpu 4gb)

#

this particular benchmar has weird results

#

here is another benchmark for the exact same hetzner plan

#

you get widly different numbers depending on your luck, since the company is free to provision you with whatever hardware they have available at the time, as long as it fits the specs

#

which is utter bullcrap imo

#

but you pretty much have to create/delete instances until you get one with good performance lol

frosty gale
#

i'll try test mine see what i get

#

man i really want to get a better server but logically it doesnt justify the cost given my traffic and stuff i have on there

#

im basically the only one aside from a few occasional outside people using stuff on there since its mainly private so bottom hardware makes sense

#

oh you have to enter ssh credentials 💀 i'll just do some benchmarks manually

quartz kindle
#

just call the yabs script

frosty gale
#

imagine if they temporarily increase your specs if they detect youre running a benchmark

quartz kindle
#

lmao

#

honestly from looking at these benchmarks i dont see much gain in paying for more expensive plans, the results are so wild you often have cheap plans outperforming dedicated plans

#

wildly different results in different instances of the same plans as well

frosty gale
#

this cant be real

quartz kindle
#

well, these are user submitted benchmarks, we dont know the context nor environment they did it in

#

but still

#

network speed is totally unreliable, since it further depends on testing servers being used

#

bottom line:
buy cheap intel/amd hetzner vps, check if you got AMD EPYC, if not, delete and remake untill you get it

frosty gale
#

will try do a disk bench later too

neon leaf
#

just get the arm servers 🙏

#

usually better perf for better price

solemn latch
#

Just get a shared plan if you're on hetzner.

Or like 0x7d8 said, arm is surprisingly good.

frosty gale
#

but ive never used an arm server for anything major so id have to do a lot of porting

#

but it is incredibly fast, we losing out with ancient x86

solemn latch
#

Fex I think it's the nail in the coffin for x86

lyric mountain
#

just wait till gabecube gets traction

#

one of the selling points is that it supports any x86 software despite being arm

frosty gale
#

sounds cool

#

but yeah in general x86 is just a dated architecture as much as i love it, decades of backwards compatibility and design decisions behind it, it has served us well but we might want to move to arm/riscv or something similar in the future

neon leaf
#

the gabecube is x86 (zen 4)

#

you are talking about the frame (snapdragon 8 gen 3)

lyric mountain
#

Oh right

neon leaf
#

I will (hopefully) be buying an 80-core arm server from 2021 soon™

#

will be fun to play around with

lyric mountain
#

The hell will u do with 80 cores?

#

That's like, 160 native threads

neon leaf
#

no clue

#

I will make something work

vivid fulcrum
#

run bungeecord

neon leaf
#

I was indeed thinking of resuming my crazy player tests

#

got to 5000 players on a single 7443P

#

but the bottleneck was the cpu

neon leaf
#

yes Ampere Altra

lunar trail
#

How da hell do I import commands from discord

frail tinsel
lunar trail
frail tinsel
lunar trail
#

okay

#

its fine

spark flint
#

this is the channel to ask for coding support

lunar trail
#

aight

swift barn
quartz kindle
#

@frosty gale i recommended hetzner to a friend, they created an account, got asked to send documents (they are from ukraine), they sent them, and 24 hours later the account was gone, deleted, blocked, no explanation, no email

#

lmao

#

so now i have to recommend them a new host

#

OVH, DO, or any other recomendation?

#

dont want contabo, dont know if datalix is reputable enough but it does look good on paper (they want to build an actual business, they are not devs)

#

@pearl trail i guess you vouch for OVH?

quartz kindle
#

im leaning towards the Datalix EPYC servers right now, but still waiting for the friend to say what they want to do

swift barn
deft wolf
#

They are german kappalul

quartz kindle
#

but might be different now

#

i still remember their old website, used to be so bad xD

neon leaf
quartz kindle
#

website from early 2000s

swift barn
swift barn
quartz kindle
#

all my vps's are ~5 usd/eur ones

neon leaf
#

my Ampere Altra Q80-30 server should be ready in max 2 weeks, very excited to benchmark

quartz kindle
#

ayyy

neon leaf
#

sadly I was only able to buy 16gb ram for now, im not paying the inflated prices (Ill just take 128gb from my epyc)

quartz kindle
#

are you gonna offer hosting?

neon leaf
quartz kindle
#

xDDDD

neon leaf
#

apparently this cpu is crazy in multithreading though, even compared to my 7443P and 9900X

#

which will hopefully make up for the 1000€ motherboard cost...

swift barn
quartz kindle
#

datalix EPYC is sold out @_@

neon leaf
#

they are also suffering from the ram pricing

#

cant build any new nodes

#

for all product lines

#

since all of them use ddr4

deft wolf
quartz kindle
#

rip

#

the EPYC was listed as in stock in their website like 30min ago xD

neon leaf
#

its a dynamic stock system

#

so immediately free once a server expires

lament rock
#

You should read this

#

(disclaimer, I wrote this)

swift barn
lament rock
#

Great their customer support has improved, but should a VPS have 2 major outages lasting almost half a day

neon leaf
#

might not even take 2 weeks after all

#

I just hope I dont need to buy 100€ import fees again

swift barn
prime cliff
#

Bot stuff done 😄

prime cliff
#

@harsh nova scam

pearl trail
#

i also use it and it's price is really good for the specs that i need compared to other providers

quartz kindle
#

banned from hetzner, payment refused from ovh, things are not looking good for him xD

deft wolf
#

Servers out of stock on Datalix 😔

pearl trail
deft wolf
#

War crimes

pearl trail
#

xD

low marten
#

Hey i have a question regarding being listed on top.gg

#

my set-up is primarily web-based, my bot has no commands, it simply sits there to gather message timestamps, and user IDs. I'm not sure if my bot qualifies, due to this, can anyone confirm?

stark kestrel
#

document the main feature, ideally you'd still have a help command that links to the dasboard or give information about the bot

frosty gale
frosty gale
quartz kindle
neon leaf
#

ye hetzner is annoying to use outside of germany

#

Ive never had to provide any identification in 2 years

quartz kindle
#

you can get either cpu, but intel always has worse perf than amd

frosty gale
#

why is there always so much lore to these cheap hosts

deft wolf
#

Holy scam

quartz kindle
#

its funny but this is true for a lot of hosts out there, if they make no guarantee of which cpu you get, that means its a mixed hardware pool, and you get wildly different performance results depending on your luck lmao

stark kestrel
#

well that was quick

frosty gale
#

i reported this exact same casino scam site to cloudflare, absolutely no action was taken

deft wolf
#

Well they won't do anything if they are using them as a proxy only

frosty gale
frosty gale
neon leaf
#

on all my vps

#

except the arm ones ofc

quartz kindle
quartz kindle
neon leaf
quartz kindle
neon leaf
#

memory is fine

quartz kindle
#

1gb swap should be fine

neon leaf
#

disk is scary

#

because all edge nodes are this full

frosty gale
# neon leaf oof

instruction list for free ram

sudo fallocate -l 2G /swapfile || sudo dd if=/dev/zero of=/swapfile bs=1M count=2048
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab
sudo sysctl vm.swappiness=10
echo "vm.swappiness=10" | sudo tee -a /etc/sysctl.conf
quartz kindle
#

disk is easy to get more no? you should be able to increase your disk size for a few cents more

neon leaf
#

I can buy block volumes but too slow for db

quartz kindle
neon leaf
#

zram is a life saver

#

barely touches performance and usually over 50% compression ratio

#

NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 zstd           46G 41.2G   18G 18.2G      24 [SWAP]
frosty gale
#

otherwise with higher i think it swaps earlier but not sure

frosty gale
#

might try it for a low memory server but for my hetzner vm im not even using all of it for multiple services

#

i think android uses zram too

quartz kindle
neon leaf
#

I mean even on lowest settings its going to be insanely effective

#

due to all the padding in modern programs

frosty gale
#

but i think the compression ratios you get will depend on what kind of stuff your programs are storing in memory

#

if its primarily zeroed buffers or predictable bytes it will probably be much better than disk swap

neon leaf
#

indeed

#

especially because the decompression reaches over 9GB/s easily

#

so even if it doesnt have a high ratio, it wont slow stuff down more than a few %

#

so never bad to have

frosty gale
quartz kindle
#

i've seen people say that you can safely set zram to double/triple your physical ram lmao

neon leaf
#

I don't trust it that much yet

quartz kindle
#

testing it at 1.5x ram right now

#

the interesting/tricky part is that zram only cares about logical memory, ie if your zram is 2gb, its 2gb uncompressed, even if the actual compressed data only uses 10mb ram, zram will simply refuse to compress more data

neon leaf
#

thats the reason you can set it to 2x safely

quartz kindle
#

so your actual ram usage for 2gb physical + 2gb zram (with 100x compression ratio, hypothetical) would be 1980mb + 20mb compressed

teal wharf
#

What is the best hardware for a bot that has every feature a server needs, like music and most Mee6 and Dyno features?

digital swan
#

literally anything from the last decade until it's big

prime cliff
neon leaf
#

is there still no properly maintained rust library for yaml with serde ?????

#

I mean the current ones work but why does noone have a maintained one

#

@solemn latch

solemn latch
#

tyty

teal wharf
frosty gale
neon leaf
#

not for configs

#

imo

frosty gale
#

😠

#

yeah i guess yaml isnt too bad for configs

#

bit friendlier than json

vivid fulcrum
#

what do you mean you aren't obscuring your app configuration behind 20 undocumented environment variables

frosty gale
#

on top of that no local caching like spotify can so you have to stream constantly

teal wharf
deft wolf
#

Yes, breaking ToS is not hard

pearl trail
quartz kindle
#

and we would often configure it to a fixed prealocated size to prevent it from dynamically resizing the swap file, because slow as fuck on HDDs

pearl trail
#

xDdd that’s why old laptops with small ram + hdd often find their disk is at 100%

quartz kindle
#

that and windows update running in the background

#

xDDD

frosty gale
frosty gale
#

they really havent optimized ntfs for hdd use at all

#

ext4 handles hdds much better mostly since it actively tries to prevent fragmentation while ntfs just dumps parts of files anywhere where theres free space on the disk

quartz kindle
neon leaf
#

tim, the ampere server may be ready next week

#

want me to run any tests?

quartz kindle
#

you can run YABS or something but its for sure gonna be a beast

crimson vapor
patent bramble
#

So apparently I submitted my privileged intent request incorrectly and referred to the wrong API endpoint (get guild member vs list guild members). Since I technically don't need this right now (still WIP), can I disbale the intent but still get approval for it the same way, or do I need to request it a different way? 👀

frosty gale
#

but once you have it you cant disable it (not that youd probably want to anyways)

lament rock
#

You can also exclude the privileged intents from your gateway identify at no consequence

neon leaf
#

I broke typescript

digital swan
#

Is that what happens with strict mode off

neon leaf
#

bruh

#

thank you for that message lol

frosty gale
#

sigma boy

neon leaf
#

😄 🔫

low marten
#

sigma boy

#

im actually unsure if this is brainrot or math

neon leaf
#

its brainrot in this case

quartz kindle
#

a friend of mine (same guy that was banned from hetzner and ovh) said his website is broken and the css is all screwed up, and asked me to help fix it

#

turns out someone changed the main css file and broke it by adding "na" at the beginning of the file, im guessing by accident? or some AI did it? idk

#

literally first line was changed from @import ... to na@import ... and turned the entire css file invalid lmao

neon leaf
queen needle
jaunty cypress
#

guys ussaly how many minutes will it takes that discord uplaod / global slashcom?

rocky heron
clever tundra
prime cliff
#

Pog added friends, requests, ignored and blocked
I'm also adding friend flags for important (bypasses do not disturb notifications) and pinned 😄

dense merlin
#

@cunning current

neon leaf
#

@quartz kindle

quartz kindle
frosty gale
#

blocked

quartz kindle
#

you guys saw nvidia's new cpu? or rather "gaming cpu"

quartz kindle
#

wa

neon leaf
#

Nvidia has confirmed the development of its first desktop CPUs, the Nvidia N1X and N1, which are based on the Grace Blackwell Superchip (GB10) and will be integrated into mini-PCs, notebooks, and KI workstations.
The Nvidia N1X, featuring 20 ARM cores (10 Cortex-X925 and 10 Cortex-A725) and a Blackwell GPU, delivers a PetaFLOP of AI performance and supports up to 128 GiB of LPDDR5x system memory.
These processors are expected to launch in devices running Windows 11 on ARM and Linux later in 2025, though a traditional desktop form factor is considered unlikely.

https://www.nvidia.com/de-de/products/workstations/dgx-spark/

#

I guess?

#

not sure if tims referring to these

frosty gale
clever tundra
#

since hosting is a big topic here:

  • i currently host my bot and dashboard on a raspberry pi.
    downside: therefore if anyone is mildly tech literate they can find my IP
    upside: the location for IP isnt that exact and ive shared general location in other servers so its not a big deal

**question: **is there a way to host the dashboard in a way on eg. oracle cloud free that doesnt show my ip?
all of it routes back to a py file integrating via ipc smth into my main bot
i have no clue how it works but it does, sooo if you have questions feel free?

spark flint
neon leaf
#

you could use cloudflare tunnels

spark flint
#

^

#

or route through cloudflare with ddns

#

and make it so that the webserver can only be accessed through cf ips

neon leaf
#

benefit of cf tunnels: you dont even need to port forward

clever tundra
clever tundra
spark flint
#

Zen are cool

clever tundra
#

oh yeah

#

i get pretty good speeds

#

the fact then therefore you can see that is the issue i want to prevent

spark flint
#

yup

#

took 2 seconds

clever tundra
spark flint
#

gg

neon leaf
#

i will keep dreaming of fiber

clever tundra
#

downside is the plan is up to, not guaranteed

stray veldt
clever tundra
#

planning to get some ubiquiti gear towards the new year psobs

clever tundra
quartz kindle
clever tundra
#

assuming the latter?

#

ts too complicated

#

tomorrow

atomic pewter
#

Living in this hell while u guys get arnd 1gb

warm surge
patent bramble
#

Ha, what a nerd. Snowflakes falling. I laughed tho lmao

swift barn
frosty gale
#

bruh

quartz kindle
neon leaf
quartz kindle
#

looking good

queen needle
#
const id = String(lowerRange + i);
    if (id.length % 2 === 0) {
      const mid = id.length / 2;
      const left = id.slice(0, mid);
      const right = id.slice(mid);
      if (left === right) {
        totalWrongIds += parseInt(id);
        continue;
      }
    }``` this is part of my solution for advent of code today, it works no issues, but looking at it is just kind of looks ugly and I was wondering if anyone knows of a better way to do this
lyric mountain
#

what is it supposed to do?

stark kestrel
queen needle
# lyric mountain what is it supposed to do?

basically you're given like
"99-111" and that's a range so 99, 100, 101 etc you have to check if any number is just made up of a repeat, so like 99 is just 9 and 9 or 1111 is 11 and 11 or 12341234 is 1234 and 1234 etc, so i turn the number into a string, if it's even, get the middle number, slice by it, and check if the left is equal to the right

#

This was the explanation I gave someone else

stark kestrel
#

the part 2 was interesting, did a small google search and magic

queen needle
#
 const doubled = id + id;
 const substring = doubled.slice(1, -1);
 if (substring.includes(id)) {
    totalWrongIds += parseInt(id);
    continue;
}```
#

Part 2 was easy

stark kestrel
#

yeah

#
.filter(|&n| {
            let s = n.to_string();
            let ss = format!("{0}{0}", s);
            ss[1..ss.len() - 1].contains(&s)
        })
queen needle
stark kestrel
#

You probably gotta make a small helper library

#

Funnily I edited mine before AoC and added ranges parsing KEKW

lyric mountain
#
const id = lowerRange + 1;
if (String(id).match(/(.+)\1/g)) {
  totalWrongIds += id;
}
stark kestrel
#

Now today I see ranges, banger

queen needle
lyric mountain
#

that is just regex lul

stark kestrel
#

not pure regex

#

people make solutions in crazy ways

#

sqlite my beloved

stark kestrel
lyric mountain
#

I mean, idk if I can remove that if

queen needle
#
console.log(
  (await Bun.file("input.txt").text() as string)
    .split(",")
    .map(i => i.split("-"))
    .reduce((acc, [start, end]) => {
      for (let i = +start; i <= +end; i++)
        acc += +((/^(\d+)\1+$/.test("" + i)) && i)
      return acc
    }, 0)
)``` i just stumpled upon this
lyric mountain
#

ah it's reading from a file?

queen needle
queen needle
#
import * as fs from "fs";

type Line = `${number}-${number}`;

const inputFile = "input.txt";

const fileContent = fs.readFileSync(inputFile, "utf-8");
const lines = fileContent.trim().split(",") as Line[];

let totalWrongIds = 0;
for (const line of lines) {
  const [lowerRange, upperRange] = line.split("-").map(Number) as [
    number,
    number
  ];
  for (let i = 0; i <= upperRange - lowerRange; i++) {
    const id = String(lowerRange + i);
    if (id.length % 2 === 0) {
      const mid = id.length / 2;
      const left = id.slice(0, mid);
      const right = id.slice(mid);
      if (left === right) {
        totalWrongIds += parseInt(id);
        continue;
      }
    }
  }
}

console.log(totalWrongIds);
#

my full solutoin

frosty gale
# neon leaf

this is making me want to buy an arm chip and motherboard also

neon leaf
#

if you have money to throw, go ahead

frosty gale
#

although i havent done anything with my raspberry pi pico yet though so i should start with that
it supports both arm and riscv which is awesome

#

obviously not desktop level capability though