#๐Ÿช…-progaming

1 messages ยท Page 18 of 1

fleet cedar
#

The popular one is serenity

lavish frigate
#

yep

#

serenity is better

thorny prism
#

i searched on the crates website for discord lmao

lavish frigate
#

just use google

thorny prism
#

okay

lavish frigate
#

๐Ÿ˜จ

lavish frigate
#

I LOVE THE WIN32 API!!!!!!!!!!!!!!!!!!!!!!

hushed pebble
#

buh

#

is this some arcane calculus homework

#

I see "abs" and "rel"

#

for absolute and relative maxima/minima?

frosty obsidian
#

its ranges

#

probably doing graphs

#

at least i think

#

idk

hushed pebble
#

WAIT

#

WTF

#

ARE THE BRACKETS BACKWARDS

#

oh my god I see it now

frosty obsidian
#

i recognized the union symbol

hushed pebble
#
a: 1. [-infinity, -5] union [-1, 4]
   2. [-5, -1] union [4, +infinity]
hushed pebble
frosty obsidian
#

no idea

hushed pebble
#

WHY ARE THEY BACKWARDS ๐Ÿ˜ญ

dusty moth
hushed pebble
#

I hate that they're backwards

ornate quiver
#

we use parentheses to indicate open range

final night
#

I remember something about that

ornate quiver
#

[0,inf)

hushed pebble
still jolt
#

<0, inf)

hushed pebble
#

whar

still jolt
#

poland probably being weird

final night
#

Math teachers get weird

#

I was taught to use the 3 types to just add clarity in nested brackets

hushed pebble
#

there are three types???

final night
hushed pebble
#

There are three types of interval notation?

final night
#

Im just talking about how i was taught to use different brackets

final night
still jolt
hushed pebble
#

or do you mean x + 3{y^2 - x[1 - 4y^4]} + z?

still jolt
#

never did it

hushed pebble
final night
#

I was taught to do that

hushed pebble
#

Yeah I don't do that

#

I'm used to nested parens

final night
#

All their math context is kinda gone for me
[Matrixes]
{Piecewise Notation}
|Math.abs or something with solving integrals|
(Everything else)

#

That's what I remember

hushed pebble
#

something with solving integrals
???

final night
#

I don't know

#

My brain told me it was right

hushed pebble
final night
#

No

hushed pebble
#

yeah I'm confused

final night
#

So am I

hushed pebble
#

this is something I don't know

final night
#

I have no idea how I got a 5 on ap calculus

hushed pebble
final night
final night
hushed pebble
#

hehe same :3

#

uh

#

wait no

#

I do remember the content

final night
hushed pebble
#

but same score :3

hushed pebble
final night
#

I chose statistics instead

hushed pebble
#

and APUSH, AP Lang, AP CSP, and AP Physics C Mech

hushed pebble
#

EUGH

#

SO BORING

#

STUPID CALCULATOR PUNCHING

#

I took stats as a college class

#

boooring!

final night
hushed pebble
#

DS&A?

#

Data science and...

#

analysis?

final night
hushed pebble
#

wdym

final night
hushed pebble
#

Oh

#

Data structures

#

wait wtf

final night
#

Basically just a precursor to machine learning

hushed pebble
#

what does stats have to do with th

hushed pebble
final night
#

Data structures and algorithms

hushed pebble
#

how are hash maps and such related to ML

final night
#

Anyways it was just the shit name my high school gave to machine learning

#

I learned hash maps in ap compsci the years before

hushed pebble
#

buh

final night
#

I wonder if I would've been happier if I went to college
Or lockheed didn't scale down their program that I was fucking accepted into until COVID

#

Now I'm a fucking web dev

lavish frigate
#

it feels cool when the entire screen is full of code

lavish frigate
#

nyatop

still jolt
#

if there's a laptop is there a lapbottom

hushed pebble
lavish frigate
#

or whateveryou are sitting on

still jolt
hushed pebble
still jolt
#

hop on poland

hushed pebble
#

:3

still jolt
#

ask the vencordian that's been at my house for my address

#

shrimple, really

lavish frigate
still jolt
#

your drawing skills are still better than mine

#

yeah, that makes sense

lavish frigate
#

im drawing with a mouse in pdn

still jolt
#

I usually draw with a mouse in gimp

lavish frigate
#

gimp ๐Ÿ˜ญ

still jolt
#

pdn isn't on linux :(

#

also too used to gimp

thorny prism
#

open range like the ppl said

thorny prism
#

its a basic excersize in 5th year belgium high school

hushed pebble
hushed pebble
thorny prism
#

no 6

#

u first have 4 years of preschool thing

#

then 6 years of idk

#

then 6 years of high school

#

but the grade like begin again if u enter high school

#

so rn im in grade 5

hushed pebble
#

buh

tender loom
#

quick question to anyone who would know, the Toasts.Type has a CUSTOM value, and i cant find anything that has actually used it. Does anyone know how it works, or if it works at all?

lavish frigate
#

oh my god gtk4 kinda sucks because it wants to be fully compatible with EVERYTHING meaning there is no window move function and not even an always on top option... some linux wms dont implement it so it just gets scrapped completely (less than 0.00000001% of all users use those wms)

royal nymph
#

gnome has it

lavish frigate
#

wayland wayland wayland

#

i dont get why gtk4 doesnt implement "try_move" or "try_always_on_top" or something

#

which tries to do it anyway and just doesnt do anything on wayland i guess

#

incredibly annoying making a windows only app with this

fleet cedar
#

Gtk4 is for gnome internal use only ๐Ÿ’€

lavish frigate
#

wait actually

fleet cedar
#

Not officially

#

But it's clear that that's what it's designed for

lavish frigate
#

can someone PLEASE tell me why something for gnome internal use only has the best way to make windows native apps ??????????????

#

or am i getting extremely consfused rn

woven mesa
lavish frigate
#

im not using swift

royal nymph
#

and yeah wayland changes how windowing works

#

apps lose a lot of control for better security

lavish frigate
royal nymph
fleet cedar
#

Ouch, gtk in rust is unpleasant

royal nymph
#

but that makes wayland have some limitations too

lavish frigate
royal nymph
#

i used gtk in go and it was pretty nice

lavish frigate
lavish frigate
royal nymph
#

they're working on a keybind api

#

or you can run the program as root

woven mesa
#

this is literally gtk with swift

lavish frigate
lavish frigate
royal nymph
#

tauri now

lavish frigate
#

no.

cerulean plover
lavish frigate
#

why should apps not be allowed to set a specific size and position

cerulean plover
#

position and fixed size should be something that requires permission

lavish frigate
#

im not making a normal app though

#

its expected that the app sets size and position itself

#

and you can configure both size and position in the settings

cerulean plover
lavish frigate
#

not all apps are regular windows

cerulean plover
lavish frigate
#

yes it is an overlay

#

saying "apps shouldnt set their own size and position" is just stupid there are enough valid use cases

#

or there should be some api that covers those cases

#

overlay api or whatever

cerulean plover
#

yes there should be a dedicated overlay api

#

because always on top doesnt work for fullscreen

dawn ledge
dawn ledge
#

it looks horrendous

#

wanna be macos

#

ngl gnome is just wannabe macos

dawn ledge
#

there are so many options

dawn ledge
dawn ledge
#

and you can set size + position for those

dawn ledge
lavish frigate
#

actually i did try iced but couldnt figure it out at all

dawn ledge
lavish frigate
dawn ledge
#

oh did the convo switch to windows

#

sorry i'm dumb

#

(ignore me)

lavish frigate
#

nop

#

its just

#

windows problems i guess

#

if you want to make a one-fits-all framework all os'es and their de/wms need to support it

#

and with the permission mess on some and the api mess on others there is no one way to make an overlay then

dawn ledge
#

i guess you can hack in overlays on windows by pin on top

#

๐Ÿค”

#

how do pip windows work on windows

lavish frigate
#

thats how they work

#

undecorated window with always on top

#

and thats what im doing rn and thats why im missing always on top from gtk4

dawn ledge
#

๐Ÿ˜ญ

lavish frigate
#

but oh well i hacked it in

dawn ledge
#

why do they not have an official api for this

#

overlays arent a new thing for all i know

#

lol

lavish frigate
#

wrong one but whatever

dawn ledge
#

hop off gtk, make your own framework

lavish frigate
#

there

dawn ledge
#

society if i could understand how to render a fucking curve on the gpu (we'd the the best rust gui crate)

lavish frigate
#

i tried to learn volkano-rs but damn does it have a ton of boilerplate

woven mesa
dawn ledge
#

i mean its true

woven mesa
#

true

lavish frigate
# lavish frigate

bonus is this function doesnt suffer from whatever shit gtk3 is doing to the position

#

if your window doesnt fit neatly into the screen it just gives up

#

and if you set the position to low or to high or whatever it snaps to the borders

#

annoying

dawn ledge
#

if youre making a windows only app then why not directly use win api in rust (windows-rs?)

lavish frigate
#

i am

#

i just want an easy way to style and make more ui components

dawn ledge
#

oh

lavish frigate
#

so i dont want to write the entire thing with raw win32 api

lavish frigate
dawn ledge
#

i mean you could also spend 500 hours using the windows ui components from rust :^)

lavish frigate
lavish frigate
still jolt
#

you should relate to that โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹

calm ruin
serene elk
#

it suddenly

#

gets

#

closed

#

no one will ever know

calm ruin
cerulean plover
deep mulch
#

@calm ruin we should steal vees account login and merge every pr

calm ruin
#

soon

thorny prism
#

guys is it bad having littarly 0 achievements

deep mulch
#

isn't there a Firefox extension that makes your new tab like show GitHub feed and RSS feeds and it's customizable

#

I wanna find

thorny prism
#

yeah

deep mulch
#

insane

thorny prism
#

what do u think of c# btw

thorny prism
#

how c# feels after making it inpossible to use foreach() in the thingy so u have to make it empty to make outside the thingy and then scream at you for making it emtpy

royal nymph
#

what?

thorny prism
#

it was me being stupid

#

but it finally works

#

it now scans all files in a directory and based on that it will make those options in a discord bot slash command

#

u can even edit the token and scandirecotry via an appsettings.json

#

revolutionary ikr

lavish frigate
#

discord bot in c# husk

#

but wouldnt it be easier to just map

#

/ linq (c# is horrible)

#
var options = accountFiles.ToList().ConvertAll<DiscordApplicationCommandOptionChoice>(file => new DiscordApplicationCommandOptionChoice(file, file));
#

or something

#

idk c#

#

actually

ornate quiver
#

this can be a one liner

lavish frigate
#

even php has map..

thorny prism
#

cuz i suck at c# and idk linq lmao

#

linq is sql and idk sql at all

ornate quiver
#

no there's extension methods for linq

#

which is the better way to use it

thorny prism
#

hmm okay ill try it but first i gotta fix the embed

lavish frigate
#

not sure if that works btw

#

the last time i did c# was about a year ago

thorny prism
#

yeah ill test it

lavish frigate
#

using winforms

thorny prism
#

isnt that like the oldest one ๐Ÿ˜ญ

lavish frigate
#

that is an old native ui framework for windows yes

thorny prism
#

yea

#

tbh .net naming is stupid asf cuz u got like .net which is only windows and .net core which is on windows and macos and linux

ornate quiver
#

it was .net framework that was windows only

thorny prism
#

yeah

lavish frigate
#

and thats why you just stop with microsoft java and move on to better languages like ts and rust

thorny prism
#

uhh

#

maybe

#

but c# is still cool

#

okay i might switch to ts

#

cuz there are like 0 usable docs on an embed in discatsharp

#

i even downloaded webstorm just in case

#

is it good

royal nymph
#

no

#

use vscode

thorny prism
#

oh

#

uhh

#

ok

royal nymph
#

well it's subjective so it's up to you

#

but most people use vscode for js/ts

#

webstorm is kinda clunky

ornate quiver
#

i use webstorm
even though it saps my entire memory

thorny prism
#

im not used to vscode and i use jetbrains for like everything

#

cuz i got used to it cuz visual studio sucks for c#

#

and i like the ui

#

but ill try vscode

formal belfry
thorny prism
#

ig i only used it for arduino and they depracated the extension

#

common microsoft L

dusty moth
#

idk i just use neovim for everything, including kotlin

thorny prism
lavish frigate
# thorny prism i even downloaded webstorm just in case

the problem with not vscode for js/ts is that the js/ts eco system (being the most popular languages) evolves at a MUCH faster pace than other languages, thus jetbrains and its plugins quickly become outdated because developers prefer writing extension/language support for the most popular code editor (vscode) only to save on time

dusty moth
thorny prism
#

i even made my own vscode extension btw

#

if u have a touchbar macbook pro download it :)

#

(littarly no one does except for me)

autumn sigil
#

i hate node-gyp

thorny prism
#

lol

formal belfry
#

lol

thorny prism
#

ok let me try ts

#

btw @lavish frigate is it okay to just not have npm installed and use pnpm for everythign

autumn sigil
#

npm comes with node

thorny prism
#

i disabled it

lavish frigate
#

why

thorny prism
#

no idea

#

whats the difference between tracked git file.s

formal belfry
#

With what, untracked ones?

thorny prism
#

yea

formal belfry
#

Tracked files are monitored for changes and are committed in your repo, while untracked files aren't, they just are in your workspace if I'm correct

thorny prism
#

oh okay

formal belfry
#

Pretty sure Chloe can give a better definition but I think it's pretty much it

thorny prism
#

intellisense errors this but when i run it it works

formal belfry
#

Btw since you're using ts, you can pretty much use es6 imports

thorny prism
#

Cannot find name 'require'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.

formal belfry
thorny prism
#

no idea what that is

formal belfry
#

Example: import { Stuff } from 'thingies';

#

With discord, you can do import { Client, Events, GatewayIntentBits } from 'discord.js'; and use those in your code

thorny prism
#

oh yeah thx

formal belfry
#

Same with your config.json file normally

thorny prism
#

it didnt error after i fixed the first one but i did it anyway

#

yeah this is fine

#

okay until now js is pretty cool

#

ts

#

whatever ts is js with extra steps anyway

formal belfry
#

TS is chill like that

formal belfry
thorny prism
#

thats kind of crazy

royal nymph
thorny prism
#

no npm ๐Ÿคซ

royal nymph
#

???

thorny prism
#

i dont have npm installed

royal nymph
#

then install it bruh

thorny prism
#

perhaps

royal nymph
#

hmm yes let me just use nodejs without package manager

formal belfry
royal nymph
#

then u install with pnpm...

#

pnpm i --save-dev @types/node

formal belfry
thorny prism
#

im kind of stupid

#

its fixed anyway

formal belfry
#

Nice job

thorny prism
#

i think its time to let go of the extension

formal belfry
#

True

autumn sigil
# autumn sigil i hate node-gyp

nice! i cannot use electron 32 because it updates v8 to 12.8 which requires nan to make breaking changes but they dont wanna do that because of backwards compat!
and since nan only really cares about node this will not get done any time soon blobCatCozy

#

is it really time to switch to zig for native modules? i guess so!

fleet cedar
#

I don't think my nan cares much about js runtimes

royal nymph
#

wtf is nan

#

not a number???

autumn sigil
#

Native Abstractions for Node.js

autumn sigil
#

and im not rewriting that

#

actually it doesnt look that bad

thorny prism
#

is this peak typescript?

#

bruh it still dont work

fleet cedar
#

Contains an any so no

thorny prism
lavish frigate
#

mfw Arc<Mutex<Option<&(dyn Any + Send + Sync)>>>

thorny prism
#

man i keep forgetting important stuff

#

like irl :(

#

not in ts

#

cuz it isnt even working but ok

#

ill just find a boilerplate

umbral mirage
thorny prism
#

dc bot

umbral mirage
#

no shit

thorny prism
#

but like even just nothing but a basic project and it already throws errors

umbral mirage
#

what's wrong now

#

i've done too many discord bots

thorny prism
#

give me a moment i have to set up everything again on my macbook

#

btw do u guys use npm or pnpm

umbral mirage
#

i use npm but that's only because i barely know pnpm, i might like it better if i use it for anything other than building vencord

thorny prism
#

oh okay

umbral mirage
#

but like

#

what discord bot are you trying to make

lavish frigate
#

"barely know pnpm" you are only gonna type pnpm i pnpm i (package) maybe pnpm rm and pnpm run anyway there is not much to know ๐Ÿ˜ญ

#

and its the same on both package managers

autumn sigil
lavish frigate
#

bun is the future.

umbral mirage
#

bun is definitely the future

#

but i won't use it yet

thorny prism
umbral mirage
thorny prism
#

basically

umbral mirage
#

well i gtg, good luck with your bot

thorny prism
#

bye

#

imma use bun

autumn sigil
#

im having fun

hushed pebble
thorny prism
#

it erros in vscode but if i run it it works

fleet cedar
#

Inaccurate type definitions will do that

thorny prism
#

oh but it doesnt throw an error while urnning

#

i switched to js

fleet cedar
#

Yes, if your type definitions are inaccurate you might get type errors even though the code works

thorny prism
#

oh okay

#

but the guide is in normal js so yeah

lavish frigate
thorny prism
#

bun doesnt create js files so it doenst recognise them

#

the code

#

and if i change it to search for ts files it just creates an error

#

okay it works now

#

:)

royal nymph
#

you can add it, js allows that, but if you want ts to know that you have to update the types

#

or use OOP

but this will have incorrect type for msg.client soo

#
class MyClient extends Client {
    commands = new Collection<string, Command>();
}

const client = new MyClient();
#

best to just have commands as a global variable that is exported so you can import it anywhere

dawn ledge
dawn ledge
thorny prism
#

cuz there wasnt rlly a reason to use ts

lavish frigate
#

of course you can live your whole life without ts

#

but ts only reason is type safety

#

and type safety is an insanely good reason

dawn ledge
#

the s in ts stands for safety, thats why they call it typescript instead of typesafety

blazing haven
#

the t in ts stands for testosterone

lavish frigate
#

ts actually stands for technical slaughterhouse

hollow locust
#

is really there anything wrong in having spaces in plugin names in vencord?

fleet cedar
#

It's against convention, but I don't think there's any technical problems with it

formal belfry
#

anyone?

blazing haven
brave burrow
# formal belfry anyone?
const { editMessage } = findByPropsLazy("editMessage");
    start() {
        this.clickListener = addClickListener(async (msg, channel, event) => {
            await editMessage(channel.id, msg.id, { content: "banana" });
        });
    },
    stop() {
        removeClickListener(this.clickListener);
    }
lavish frigate
#

web dev is still so insane to me cuz i have this much shit for exactly 3 pages

meager turret
#

so true

lavish frigate
#

NEW FOLDER: types

lavish frigate
royal nymph
#

WHY IS IT ALL TOP LEVEL

#

please

#

src folder

#

I am begging

lavish frigate
#

?!

#

nuxt does not work with src folder

#

i dont get why id even need an src folder!

royal nymph
#

nuxt sooo bad

royal nymph
lavish frigate
#

root > src > src2

royal nymph
#

so much cleaner than having everything top level

calm ruin
#

go users would hate you

royal nymph
autumn sigil
royal nymph
#

Astro + svelte = cutest couple ever

viscid grove
#

Is there a way to make it use Vendicated/Vencord or automatically sync my fork so I don't have to sync fork then update vencord?

cerulean plover
#

It's definitely possible just not a feature at the moment

meager turret
lavish frigate
#

oh my god

meager turret
#

this is called the circular import skill issue

#

what I call it anyway

royal nymph
#

you don't need a fork

viscid grove
#

how do you do that?

#

and also that seems like it would be more annoying than this

#

or was that a joke since you don't have to fork it

autumn sigil
#

instead of bringing entire framework

royal nymph
#

typescript support so bad

#

do u actually type them too

#

so that u can do <thing and intellisense suggests attrs

lavish frigate
#

WDYM G

#

g

cerulean plover
autumn sigil
#

dont cry bestie

#

ultra small bundle size and good perf

lavish frigate
#

i like

#

you know

#

what

#

FOURTEEN folders

#

my site currently looks like THIS i do not need FOURTEEN FOLDERS for this

autumn sigil
#

see convo abou src

lavish frigate
#

because it just puts 14 folders into one folder

#

and then you have one more

#

OMG

autumn sigil
#

too bad

lavish frigate
#

lc.xkcd standards

visual shellBOT
lavish frigate
#

situation: there are 14 folders
14? RIDICULOUS! We need to create one source folder that contains everything (yeah!)
soon: situation: there are 15 folders

autumn sigil
#

idk man learn to organize your shit then

#

dont complain about it

lavish frigate
#

the problem is its too organized.

#

im not putting layouts in components and im not putting types into server
im complaining that web apps have become too complicated

#

my proposed solution is: take every single major framework developer and contributer and put them on an island

#

give them maybe jquery only

#

task them with creating 1 (one) website

frosty obsidian
#

use framework designed for simple websites

#

nuxt is for more complex use cases

royal nymph
lavish frigate
lavish frigate
royal nymph
#

your source code being separate from node modules and config files already goes a long way

#

organising into subfolders has always been a good form of keeping stuff clean

#

music goes in the music folder
videos go in the videos folder
source code goes in the src folder

frosty obsidian
#

we should go back to the stone age

frosty obsidian
#

plain html css and js

#

no frameworks

royal nymph
deep mulch
#

Wing spotted

#

everytime i see wing i feel lively

lavish frigate
frosty obsidian
#

website should be as simple as index.html in the www folder

royal nymph
#

index.php

lavish frigate
#

www folder in the var folder

deep mulch
#

im updating aliucord RoleColorEverywhere plugin @frosty obsidian

lavish frigate
#

fuck one folder too many

#

we cant escape the folders

deep mulch
#

making the typing color better

frosty obsidian
#

good

deep mulch
#

it will be slightly more efficient

lavish frigate
#

hey

#

whats shitpoop

frosty obsidian
#

vee just gives everyone access to her vps

royal nymph
lavish frigate
royal nymph
#

i used to have wildcard dns to my vps so manti made shitpoop without me even knowing

deep mulch
#

make vencord virus

lavish frigate
#

venrus

snow grail
#

How do I duplicate a file/folder in git while preserving its git history but without making the commit history ugly

dusty moth
#

you'd need to rewrite every commit that touched the object to also touch a copy of the object in the same way

#

due to the blockchain you'd touch every commit since the object was created

deep mulch
#

@royal nymph help

#

im trying to figure out how the channel favoriting syncs to other clients

#

i have the network inspector tab open

#

on another client i favorite/unfavorite

#

and nothings ever put in the inspector but the client updates to show the new channel

#

nvm im dumb i forgot that the websocket request was at the very start and thats where it goes

#

guh its all encrypted

royal nymph
#

not encrypted

#

just compressed

#

you can enable gateway log in devtools

#

with experiment plugin

deep mulch
#

oh

royal nymph
deep mulch
royal nymph
#

you will love using that on Aliucord

deep mulch
#

it isnt

#

im gonna add to favorite channels

royal nymph
#

you're lucky it isn't

deep mulch
#

no need to bundle huge protobuf lib

#

@royal nymph you will use

#

its not getting sent to aliucord gateway whar

royal nymph
#

capabilities moment maybe

deep mulch
#

oh

#

how do i see the capabilities on desktop is there a dev option

royal nymph
#

doesn't list anything relevant tho

deep mulch
#

i think its missing this api event

#

30717 is the value sent in desktop websocket

frosty obsidian
#

you probably shouldn't mess with capabilities

#

i don't actually know if you even can

deep mulch
#

why

frosty obsidian
#

its sent in the identify payload

#

idk how the timing works out

supple vault
deep mulch
# frosty obsidian its sent in the identify payload
private final void doIdentify() {
    this.seq = 0;
    this.sessionId = null;
    IdentifyData invoke = this.identifyDataProvider.invoke();
    if (invoke == null) {
        handleClose(true, 4004, "No connection info provided.");
        return;
    }
    this.connectionState = 3;
    this.identifyStartTime = clock.currentTimeMillis();
    this.token = invoke.getToken();
    Companion.log$default(INSTANCE, this.logger, "Sending identify.", false, 2, null);
    send$default(this, new Outgoing(Opcode.IDENTIFY, new OutgoingPayload.Identify(invoke.getToken(), 100, true, 351L, this.identifyProperties, invoke.getClientState())), false, null, 4, null);
}
#

351L

#

might be best to add aliucord api to add new capabilities

frosty obsidian
#

you would need to verify if the capability breaks anything

deep mulch
#

i dont think it would

#

if its just allowing new events to come in to the gateway

frosty obsidian
#

did you find out which one

deep mulch
#

could be this maybe

#

the event name is USER_GUILD_SETTINGS_UPDATE

frosty obsidian
#

guh that changes an existing model

deep mulch
#

whats that mean

frosty obsidian
#

if aliu doesn't have that capability then it'll crash

frosty obsidian
#

would break deserialization

deep mulch
#

we can fix that though i think

#

extending the class

frosty obsidian
#

lot of work

deep mulch
#

ill try

frosty obsidian
deep mulch
#

yes

#

thats why an aliucord api for it would be good

#

like GatewayAPI

#

minky is laying on me purring @frosty obsidian

deep mulch
#

evilv

frosty obsidian
# deep mulch 30717 is the value sent in desktop websocket

Capabilities(AUTH_TOKEN_REFRESH | AUTO_CALL_CONNECT | CLIENT_STATE_V2 | DEBOUNCE_MESSAGE_REACTIONS | DEDUPE_USER_OBJECTS | LAZY_USER_NOTES | MULTIPLE_GUILD_EXPERIMENT_POPULATIONS | NON_CHANNEL_READ_STATES | PASSIVE_GUILD_UPDATE_V2 | PRIORITIZED_READY_PAYLOAD | USER_SETTINGS_PROTO | VERSIONED_READ_STATES | VERSIONED_USER_GUILD_SETTINGS)

#

why husk

viscid grove
#

double husk husk

frosty obsidian
#

those are the capabilities used

deep mulch
#

where

frosty obsidian
#

desktop

deep mulch
#

how did you get

frosty obsidian
#

i literally replied to the relevent message

deep mulch
#

guh

#

im getting funny crash

#

java.lang.NullPointerException: Attempt to read from field 'android.view.View androidx.recyclerview.widget.RecyclerView$ViewHolder.itemView' on a null object reference in method 'androidx.recyclerview.widget.RecyclerView$ViewHolder androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(android.view.ViewGroup, int)'

frosty obsidian
deep mulch
#

i think i need to update the thing

#

to add the new field

#

oh

#

2024-09-14 00:00:35.026 12323-12323 Discord com.aliucord E java.lang.NoSuchFieldException: No field identifyDataProvider in class Lcom/aliucord/api/GatewayAPI; (declaration of 'com.aliucord.api.GatewayAPI' appears in /data/user/0/com.aliucord/code_cache/Aliucord.zip) (Ask Gemini)

#

guh i was doing getDeclaredField on the wrong class

frosty obsidian
#

zeet please

deep mulch
#

WHAT

#

WHATTTT

#

tell

deep mulch
#

oh

frosty obsidian
#

Capabilities(AUTH_TOKEN_REFRESH | DEDUPE_USER_OBJECTS | LAZY_USER_NOTES | MULTIPLE_GUILD_EXPERIMENT_POPULATIONS | NO_AFFINE_USER_IDS | VERSIONED_READ_STATES | VERSIONED_USER_GUILD_SETTINGS)

#

alius

deep mulch
#

what

#

aliucords?

frosty obsidian
#

yes

deep mulch
#

how did you get that from 351

frosty obsidian
deep mulch
#

show

#

i put the number in just to see and its so broken

#
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
  at j0.l.c.j.run(ScheduledAction.java, [Aliucord] Uncaught exception on thread Main-StoreThread:3)
  at j0.l.c.c$a.run(ExecutorScheduler.java:9)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
  at java.lang.Thread.run(Thread.java:1012)```
 but the app is still working kinda
frosty obsidian
#

its based on reflection with the wrapper i wrote for capabilities

deep mulch
#

i dont understand but okay

frosty obsidian
#

its just code specific to cadence

deep mulch
#

how do i add bitmask together

frosty obsidian
#

or

deep mulch
#

351L or (1 shl 3) just returns 351 am i doing it wrong

frosty obsidian
#

bc aliu already has that capability

deep mulch
#

it doesnt receive the gateway event

#

maybe its another one

frosty obsidian
#

bc thats not the capability responsible for that event

deep mulch
#

which one is it

frosty obsidian
#

i don't know

frosty obsidian
#

yes

#

unless theres an undocumented capability

deep mulch
#

ConnectionTimeStats: "GatewayHello" ended without starting!

#

did aliu always log that on startup

frosty obsidian
#

strange

#

i modified the capabilities cadence uses to match desktop and i don't get that event

deep mulch
#

hm

#

Discord RN gets teh event

frosty obsidian
#

it could be me using older version code

deep mulch
#

ill try the desktop one and se if the event is logged at all

#

startup is extremely slow

#

thats weird

#

even with the 351L

frosty obsidian
#

actually nvm

#

i forgot i use my alt in cadence

#

i do get the event

deep mulch
#

oh

#

i think this is the ready payload

#
val sessionId = GatewaySocket::class.java
    .getDeclaredField("sessionId")
    .apply { isAccessible = true }

val identifyDataProvider = GatewaySocket::class.java
    .getDeclaredField("identifyDataProvider")
    .apply { isAccessible = true }

val identifyStartTime = GatewaySocket::class.java
    .getDeclaredField("identifyStartTime")
    .apply { isAccessible = true }

val clock = GatewaySocket::class.java
    .getDeclaredField("clock")
    .apply { isAccessible = true }

val token = GatewaySocket::class.java
    .getDeclaredField("token")
    .apply { isAccessible = true }

val identifyProperties = GatewaySocket::class.java
    .getDeclaredField("identifyProperties")
    .apply { isAccessible = true }

val capabilities = 30717L

patcher.instead<GatewaySocket>("doIdentify") {
    GatewaySocket.`access$setSeq$p`(this, 0)
    sessionId[this] = null

    val identity = (identifyDataProvider[this] as `StoreGatewayConnection$buildGatewaySocket$socket$1`)()
        ?: return@instead `access$handleClose`(this, true, 4004, "No connection info provided.")

    GatewaySocket.`access$setConnectionState$p`(this, 3)
    identifyStartTime[this] = (clock[this] as Clock).currentTimeMillis()
    token[this] = identity.token

    GatewaySocket.Companion.`log$default`(
        GatewaySocket.Companion,
        GatewaySocket.`access$getLogger$p`(this),
        "Sending identify",
        false,
        2,
        null
    )

    @Suppress("UNCHECKED_CAST")
    GatewaySocket.`send$default`(
        this,
        Outgoing(
            Opcode.IDENTIFY,
            OutgoingPayload.Identify(
                identity.token,
                100,
                true,
                capabilities,
                identifyProperties[this] as Map<String, Any>,
                identity.clientState
            )
        ),
        false,
        null,
        4,
        null
    )
}
frosty obsidian
#

that messes with settings

#

enables protos

#

still need to find the specific capability

deep mulch
#

if i just remove USER_SETTINGS_PROTO it should be fine right

deep mulch
#

i think 1 << 15 is it

#

idk

frosty obsidian
#

no

#

not real

deep mulch
#

im having a dumb

frosty obsidian
#

im removing capabilities one by one until i no longer see the event

deep mulch
#

okay

#

need to figure out what the ready payload looks like for it too

frosty obsidian
#

funny thing

#

i get the event using alius capabilities

deep mulch
#

guhh me too

#

are you able to figure out the field that contains favorites in the payload

frosty obsidian
#

i haven't looked

deep mulch
#

there i think i found it

#

user_guild_settings

#

its already in the model

frosty obsidian
#

its probably a flag in the channel override

autumn sigil
#

wtf u doing zt

deep mulch
#

making favorite channels sync to aliucord

frosty obsidian
#

yeah its a flag

deep mulch
#

i also just found this

frosty obsidian
#

probably not a flag aliu has

#

so you'll need to do the bitmask stuff yourself

deep mulch
#

probably

frosty obsidian
#

gl

deep mulch
#

thank

#

@frosty obsidian even though the capabilities patch wasn't needed here do you think I should make thing for aliucord core

frosty obsidian
#

nah

deep mulch
#

I think for my frecents plugin I will need USER_SETTINGS_PROTO

#

or wait

frosty obsidian
#

it breaks stuff

#

removes the settings update event that aliu uses

#

and the property from the ready event

deep mulch
#

o don't think that's right

#

something is weird

#

USER_SETTINGS_PROTO is 512

#

the capabilities is 351

#

but it's still getting the event

pearl stagBOT
deep mulch
#

this works

#

somehow

frosty obsidian
#

oh i think it just removes the old stuff then

frosty obsidian
#

it doesn't have the field

#

guess you're parsing the event yourself

deep mulch
#

oh

frosty obsidian
#

you will also need to find it in the ready event

deep mulch
#

yes

#

minky is purring @frosty obsidian

#

most of the stuff is already there

frosty obsidian
#

yeah its literally just missing the flags property

deep mulch
#

no its there

#

6144 - favorited

#

4096 unfavorited

frosty obsidian
#

no i mean the model

deep mulch
#

the flags are just a bitmask right

frosty obsidian
#

the property was not there

frosty obsidian
deep mulch
#

its there but its like notifications oriented

#

2048 is the flag

#

which is like

frosty obsidian
#

im probably looking at older source

deep mulch
#

guh?

#

1 << 11

#

thats it

frosty obsidian
#

im looking at the decomp repo juby has

deep mulch
#

oh

#

i love jadx gui

frosty obsidian
#

i think the flags stuff was added very late into alius life

#

you probably got pretty lucky

deep mulch
#

probably

#

flags are used for threads/forums

#

@frosty obsidian how do i reverse adding the flag

#
StoreStream
    .getUserGuildSettings()
    .setChannelNotificationFlags(ctx, model.channel, ((model.channel.flags ?: 0) or (1 shl 11)).toInt())
``` adds to favorites
deep mulch
#

@frosty obsidian http toolkit has free dark mode now

#

weird

#

its not sending a network request

#

ill have to manually do it

#

it works

valid jetty
lavish cloak
#

chat i want to make a social media app, React web app and reactive native mobile app. How much will React Web App Server + SQL Database server for posts and comments + DB server for user passwords + Domain name cost in total?

#

here's my plan so far

#

Which cloud hosting should i use also?

fleet cedar
#

All of them simultaneously

supple vault
#

host it all on the same 64gb ram server

#

30euro/mo

calm ruin
#

probably that would be very overkill

frosty obsidian
#

you can get a decent vps for $10-20/mo and domains don't usually cost more than $30/yr

#

although most services will charge less for the first year

supple vault
#

so I'm working on something and I have this

#
import {app} from "electron";
import {createDiscordWindow} from "./discord/discordWindow.js";
import "./startup.js";

app.whenReady().then(() => {
    createDiscordWindow();
});
#

startup.js

// To be run at every startup

import {app} from "electron";
import {getConfig} from "../shared/config.js";

app.setPath("sessionData", `${app.getPath("userData")}/sessionData`);
getConfig("fileExistsDoNotTouch");

app.commandLine.appendSwitch("enable-features", "UseOzonePlatform, WaylandWindowDecorations");
app.commandLine.appendSwitch("ozone-platform-hint", "auto");
#

when I build and run the app, it opens in X11

#
    "scripts": {
        "build": "tsc",
        "start": "electron dist/main/index.js",
        "dev": "pnpm build && pnpm start"
    },
#

in theory I shouldnt have to add the flags on the dev script

royal nymph
supple vault
#

guhhhh

royal nymph
#

has to be added via cli flag

supple vault
#

sucks

royal nymph
#

and these are both obsolete app.commandLine.appendSwitch("enable-features", "UseOzonePlatform, WaylandWindowDecorations");

#

enabled by default in modern electron

royal nymph
supple vault
supple vault
#

right okay

#

thank you for saving me from making a braindead bug report

royal nymph
#

you using electron builder?

#

you can use a simple wrapper shell script for linux

#

that will add the flag u want

supple vault
#
    "scripts": {
        "build:dev": "sucrase ./src -d ./out --transforms typescript",
        "build:prod": "tsc",
        "start": "electron out/main/index.js --ozone-platform-hint=auto",
        "dev": "pnpm build:dev && pnpm start"
    },
#

this seems pretty simple to me ngl

autumn sigil
#

i cant believe this works

#

thank you staltz

supple vault
#

@royal nymph how to you make vesktop interpret the preload file as a module without specifying .mjs and .mts?

#
    const window = new BrowserWindow({
        webPreferences: {
            backgroundThrottling: false,
            preload: join(import.meta.dirname, "../../preload/preload.js")
        },
        autoHideMenuBar: getConfig("autoHideMenuBar")
    });
#

sucrase doesn't seem to support transpiling mts to mjs with the correct extension

royal nymph
#

don't use esm

#

don't use sucrase idk wtf that is

#

hop on esbuild

supple vault
supple vault
supple vault
deep mulch
#

@frosty obsidian this is weird

#

i got it syncing properly

#

but channels like offtopic and regulars only show up in aliucord if theyre unread

royal nymph
deep mulch
#

the unread channels are there in the gateway event

#

the flags dont change

supple vault
#

because all your preload files seem to be in ESM

#

oh I see

royal nymph
#

all code is bundled with esbuild to commonjs

royal nymph
supple vault
royal nymph
#

xD

#

too bad

supple vault
#

since electron supports it now

royal nymph
#

rename the files with ur script

#

because esm sucks

supple vault
#

balls

supple vault
#

curious

royal nymph
#

because it does

#

also vesktop bundles to a single file lol

supple vault
#

horror

#

the only reason I picked sucrase for dev builds was speed over tsc

#

i guess ill use esbuild

#

i dont see why I didnt use it in the first place

supple vault
royal nymph
#

wdym cock

#

it wasn't

#

too bad = rip

royal nymph
#

but tbh i would just recommend against using esm it's kinda cursed

#

you don't really need it

supple vault
#

I've always used ESM

royal nymph
#

and pretty sure u can't even use esm in renderer

supple vault
#

I prefer it over CJS

supple vault
royal nymph
#

it doesn't really matter what the output is and from my experience cjs is easier to make work

#

the fact that esm kills __dirname soooo annoying

supple vault
#

indeed

royal nymph
#

well anyway if u like esm better sure do use it

supple vault
#

I suppose it is just opionated in the end

royal nymph
#

fwiw you could just rename the file to mjs

royal nymph
royal nymph
#

I suggest using .mjs (or mts with tsx package) scripts for all npm scripts that aren't super simple

supple vault
#

yeah im just making esbuild.js now

#

this is a lot less painful than config files actually

royal nymph
#

oh wait vesktop is using && too for a lot

supple vault
royal nymph
#

maybe it's not thaaat big of a deal

#

but mjs scripts still good xD

supple vault
#

sucrase doesn't support keeping the m for whatever reason

#

so esbuild it is

royal nymph
#

that's so weird tho are u sure

supple vault
#

afaik

#

i saw issues relating to it

royal nymph
#

is this for a discord client btw?

supple vault
#

yes

royal nymph
#

wonder if you could use vite as ur build tool

supple vault
#

eh i tried

#

a lot of the documentation assumes you are creating the vite app

#

and not just running someone elses app

royal nymph
supple vault
supple vault
#

both had the same name

royal nymph
supple vault
#

different authors though

#

I couldn't help but notice both have a large chinese audience - i have no idea why

royal nymph
supple vault
#

yeah i saw that

royal nymph
supple vault
#

fair enough

royal nymph
#

more than that actually

#

every 6th person

supple vault
#

sob

royal nymph
#

if you are new to electron it might help to use their template

#

it has docs for all concepts

supple vault
#

sob

royal nymph
#

perhaps try dev -- --ozone-platform-hint=auto

#

-- is generally used to indicate end of argument parsing

supple vault
#

ty

autumn sigil
thorny ingot
#

how cursed is this

dawn ledge
#

why

thorny ingot
fleet cedar
#

The windows registry is a curse by itself

thorny ingot
#

it just regedits your system so it uses the custom font

tight dawn
#

Maybe not the place to ask this, but are there any new mobile clients/vendetta forks that devs are moving to?

With bunny being killed, idk what to work on anymore. Would love to help get something off the ground if it exists.

jade stone
thorny ingot
#

dunno i didnt make it

fleet cedar
royal nymph
#

yes it's C#

royal nymph
fleet cedar
#

How ironic, that the csharp is blurry

thorny ingot
thorny ingot
fleet cedar
#

That doesn't sound like the ideal way to use a custom font

thorny ingot
#

i dont think it is

#

but i unno

#

mabey this is the normal way of doing it

tight dawn
#

Didn't development stop on that? I'll have to check

north harbor
#

I mean I know they have been stuck on the same version for ever but I didn't know they actually stopped development

fleet cedar
#

I'm still on vendetta. It's not broken yet, so eh.

#

Though polls being invisible is a bit annoying

lavish cloud
#

Does anyone here understand the windows input system?

#

I'm trying to figure out what the equivalent of evdev is, where you can grab exclusive control over an input device and read key events from it

fleet cedar
#

Check what ahk does I guess

#

Though maybe that's not open source

tight dawn
fleet cedar
#

205.15 here

tight dawn
#

Damn this blows

lavish cloud
dusty moth
autumn sigil
#

@serene elk btw why do you use zlib-sync for oceanic? doesnt node already have an api for that? or is the flush special somehow?

#

or pako for that matter ig

autumn sigil
#

asking because im considering dropping zlib-sync entirely because of node-gyp

fallen nebula
serene elk
#

they are the one who chose it

#

it might also be because eris had it as an option

autumn sigil
#

maybe

#

i mean idek why im using this

#

ik discord uses pako because renderer proc

#

but i have nodeintegration in workers

jade stone
#

/testcommand testimgarg:

formal belfry
elder yarrowBOT
austere idol
#
typedef struct {
    int a;
    char* b;
    /* ... */
} struct_t;

or

struct Struct {
    int a;
    char* b;
    /* ... */
};

?

lavish frigate
#
struct Struct {
  a: i32,
  b: String,
  /* ... */
}

:3

austere idol
lavish frigate
#
struct Struct {
  a: i32,
  b: String,
  /* ... */
}

impl Struct {
  pub fn new(a: i32, b: String) -> Self {
    Self {
      a,
      b
    }
  }
}