#๐ช -progaming
1 messages ยท Page 18 of 1
just use google
okay
๐จ
I LOVE THE WIN32 API!!!!!!!!!!!!!!!!!!!!!!
buh
is this some arcane calculus homework
I see "abs" and "rel"
for absolute and relative maxima/minima?
that's algebra at best
its ranges
probably doing graphs
at least i think
idk
I can't read that
WAIT
WTF
ARE THE BRACKETS BACKWARDS
oh my god I see it now
i recognized the union symbol
a: 1. [-infinity, -5] union [-1, 4]
2. [-5, -1] union [4, +infinity]
WHY ARE THE BRACKETS BACKWARDS ๐ญ
no idea
WHY ARE THEY BACKWARDS ๐ญ
used in some areas to indicate open ranges iirc
EUGH
I hate that they're backwards
we use parentheses to indicate open range
I remember something about that
[0,inf)
same
<0, inf)
whar
poland probably being weird
Math teachers get weird
I was taught to use the 3 types to just add clarity in nested brackets
there are three types???
Similar to the vscode bracket color plugin, but shapes
There are three types of interval notation?
Im just talking about how i was taught to use different brackets
([{([])}])
I was taught to do ( and [ when nesting
or do you mean x + 3{y^2 - x[1 - 4y^4]} + z?
never did it
I don't bother with those
Yop
I was taught to do that
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
{} for sets too methinks
something with solving integrals
???
are you thinking of integral 1/x dx = ln |x| + C?
No
yeah I'm confused
So am I
this is something I don't know
I have no idea how I got a 5 on ap calculus
AB or BC?
When I remember literally none of it
Ab
Im not a physco
but same score :3
uh no I have BC this year
I chose statistics instead
and APUSH, AP Lang, AP CSP, and AP Physics C Mech
EWWWWWWWWWWWWWWWWWWWWW
EUGH
SO BORING
STUPID CALCULATOR PUNCHING
I took stats as a college class
boooring!
Ap stats helped me understand concepts I needed for ds&a
Otherwise it was writing programs to solve all the formats seen on the ap test
wdym
Algorithms
Basically just a precursor to machine learning
what does stats have to do with th
Data science or structures?
Data structures and algorithms
how are hash maps and such related to ML
Anyways it was just the shit name my high school gave to machine learning
I learned hash maps in ap compsci the years before
buh
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
it feels cool when the entire screen is full of code
sadness
nyatop
nyatop
if there's a laptop is there a lapbottom
yeah its me
the chair yes
or whateveryou are sitting on
I don't see you anywhere near my lap
you can make it happen tho!
hop on poland
:3
here you go
im drawing with a mouse in pdn
I usually draw with a mouse in gimp
gimp ๐ญ
yeah
its a basic excersize in 5th year belgium high school
weirdo!
your high schools have five years???
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
buh
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?
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)
gnome moment
tbf always on top should indeed be implemented by the wm
gnome has it
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
Gtk4 is for gnome internal use only ๐
wait actually
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
im not using swift
I mean gtk is mostly targeted at linux ๐ญ
and yeah wayland changes how windowing works
apps lose a lot of control for better security
im making this in 100% safe rust
for example you only get keystrokes if your window is focused
Ouch, gtk in rust is unpleasant
...is there at least a way to request users permission for that
i used gtk in go and it was pretty nice
there is nothing else to use ๐ญ
wtf..
this is literally gtk with swift
DISCLAIMER IM NOT GOING TO USE WEBUI IM HEAVILY RELYING ON THE WIN32 API FOR THIS
ah
you will use webui and you will like it
tauri now
no.
wayland doesnt and unfortunately cant fix how apps shouldn't be able to set a specific size
it is ONLY questionably coded AAA video games that do this btw
why should apps not be allowed to set a specific size and position
position and fixed size should be something that requires permission
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
its only video games that bother me
not all apps are regular windows
yeah, that actually makes some sense if its an overlay of some kind
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
yes there should be a dedicated overlay api
because always on top doesnt work for fullscreen
what do you expect from a framework that is built by gnome
please get adwaita outta here
it looks horrendous
wanna be macos
ngl gnome is just wannabe macos
iced? xilem? egui?
there are so many options
because thats how the wayland protocol is, the protocol implementation (i.e the compositor + window manager) handles placing windows (this is also the reason why you see 50 tiling wayland compositors/wms)
there's a protocol for overlays
and you can set size + position for those
idk
A better way to read Wayland documentation
i dont believe in those i think
actually i did try iced but couldnt figure it out at all
oh... smh
this is what eww/ags and other widget libraries work on wayland
not for windows !!
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
i guess you can hack in overlays on windows by pin on top
๐ค
how do pip windows work on windows
yea
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
๐ญ
but oh well i hacked it in
why do they not have an official api for this
overlays arent a new thing for all i know
lol
hop off gtk, make your own framework
society if i could understand how to render a fucking curve on the gpu (we'd the the best rust gui crate)
i tried to learn volkano-rs but damn does it have a ton of boilerplate
lmao
i mean its true
true
raaaaaaah wgpu on top
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
if youre making a windows only app then why not directly use win api in rust (windows-rs?)
oh
so i dont want to write the entire thing with raw win32 api
these unsafes come from calling win32 api functions
i mean you could also spend 500 hours using the windows ui components from rust :^)
like this guy https://github.com/robmikh/minesweeper-rs
๐ญ
nty
average
literally you smh
you should relate to that โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
do you want to remember that one pr which hasnt been merged since 2022
what if
it suddenly
gets
closed
no one will ever know
I will know
LITERALLY
@calm ruin we should steal vees account login and merge every pr
soon
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
yeah
insane
what do u think of c# btw
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
what?
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
discord bot in c# 
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
why aren't you using linq
this can be a one liner
even php has map..
hmm okay ill try it but first i gotta fix the embed
thx
yeah ill test it
using winforms
that is an old native ui framework for windows yes
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
it was .net framework that was windows only
yeah
and thats why you just stop with microsoft java and move on to better languages like ts and rust
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
well it's subjective so it's up to you
but most people use vscode for js/ts
webstorm is kinda clunky
i use webstorm
even though it saps my entire memory
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
VSCode's great
idk i just use neovim for everything, including kotlin

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
dw I'm going to set up LSPs someday
yeah i see
i even made my own vscode extension btw
if u have a touchbar macbook pro download it :)
(littarly no one does except for me)
i hate node-gyp
lol
lol
ok let me try ts
btw @lavish frigate is it okay to just not have npm installed and use pnpm for everythign
npm comes with node
i disabled it
why
With what, untracked ones?
yea
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
oh okay
Pretty sure Chloe can give a better definition but I think it's pretty much it
intellisense errors this but when i run it it works
What does the error say?
Btw since you're using ts, you can pretty much use es6 imports
Cannot find name 'require'. Do you need to install type definitions for node? Try npm i --save-dev @types/node.
Ah yeah, use es6 imports instead
no idea what that is
Example: import { Stuff } from 'thingies';
With discord, you can do import { Client, Events, GatewayIntentBits } from 'discord.js'; and use those in your code
oh yeah thx
Same with your config.json file normally
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
TS is chill like that
It's pretty much just typed javascript
thats kind of crazy
it literally tells u how to fix it

no npm ๐คซ
???
i dont have npm installed
then install it bruh
perhaps
hmm yes let me just use nodejs without package manager
Pretty sure you can install @types/whatevershityouwant with everything anyway
pnpm
^
Nice job
i think its time to let go of the extension
True
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 
is it really time to switch to zig for native modules? i guess so!
I don't think my nan cares much about js runtimes
Native Abstractions for Node.js
this doesnt really help me either tho since i still need zlib sync xd
and im not rewriting that
actually it doesnt look that bad
Contains an any so no
was ironically lmao
mfw Arc<Mutex<Option<&(dyn Any + Send + Sync)>>>
man i keep forgetting important stuff
like irl :(
not in ts
cuz it isnt even working but ok
ill just find a boilerplate
My type
what are you making
dc bot
no shit
but like even just nothing but a basic project and it already throws errors
give me a moment i have to set up everything again on my macbook
btw do u guys use npm or pnpm
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
oh okay
"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
pnpm offers a lot more functionality + its just faster
bun is the future.
js development is so funny cuz they keep on making things lmao
basically
well i gtg, good luck with your bot
im having fun
wtf
it erros in vscode but if i run it it works
Inaccurate type definitions will do that
Yes, if your type definitions are inaccurate you might get type errors even though the code works
ts turns into js to run, js has no types
if you have ts type errors they can be ignored by the compiler and your code will still compile to js (js which then doesnt have the types will run normally)
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
:)
because Client has no property called commands
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
when it gets good
some people are paid for this
oh okay but i switched to js
cuz there wasnt rlly a reason to use ts
there always is
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
the s in ts stands for safety, thats why they call it typescript instead of typesafety
ts actually stands for technical slaughterhouse
is really there anything wrong in having spaces in plugin names in vencord?
It's against convention, but I don't think there's any technical problems with it
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);
}
thank you
web dev is still so insane to me cuz i have this much shit for exactly 3 pages
so true
NEW FOLDER: types
wtf
yea
skill issue
WHY IS IT ALL TOP LEVEL
please
src folder
I am begging
?!
nuxt does not work with src folder
i dont get why id even need an src folder!
nuxt sooo bad
so you don't have 2 billion folders
like... root > 2nd root? why not have another src folder inside the src folder..
root > src > src2
so much cleaner than having everything top level
imagine using folders
go users would hate you

astro love 
Astro + svelte = cutest couple ever
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?
It's definitely possible just not a feature at the moment
fun go package https://github.com/pion/webrtc
oh my god
simply don't make a fork
you don't need a fork
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
ive been enjoying webcomponents a lot
instead of bringing entire framework
scary
typescript support so bad
do u actually type them too
so that u can do <thing and intellisense suggests attrs
it would be
dont cry bestie
ultra small bundle size and good perf
i like
you know
what
FOURTEEN folders
my site currently looks like THIS i do not need FOURTEEN FOLDERS for this
see convo abou src
src doesnt solve this
because it just puts 14 folders into one folder
and then you have one more
OMG
too bad
lc.xkcd standards
situation: there are 14 folders
14? RIDICULOUS! We need to create one source folder that contains everything (yeah!)
soon: situation: there are 15 folders
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
it literally does but okay
YOU are also going on that island
you too
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
we should go back to the stone age
astro is basically that
yea
website should be as simple as index.html in the www folder
index.php
www folder in the var folder
im updating aliucord RoleColorEverywhere plugin @frosty obsidian
making the typing color better
good
it will be slightly more efficient
you love
average manti site
i used to have wildcard dns to my vps so manti made shitpoop without me even knowing
make vencord virus
venrus

How do I duplicate a file/folder in git while preserving its git history but without making the commit history ugly
painfully
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
used to?
@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
not encrypted
just compressed
you can enable gateway log in devtools
with experiment plugin
oh
it's probably inside user settings proto
you will love using that on Aliucord
you're lucky it isn't
no need to bundle huge protobuf lib
@royal nymph you will use
its not getting sent to aliucord gateway whar
capabilities moment maybe
The Gateway API allows clients to open secure WebSocket connections with Discord to receive events about actions that take place in resources they have access to, like when a channel is updated or a r...
doesn't list anything relevant tho
you probably shouldn't mess with capabilities
i don't actually know if you even can
why
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
you would need to verify if the capability breaks anything
did you find out which one
guh that changes an existing model
whats that mean
if aliu doesn't have that capability then it'll crash
entry in the ready event changes
would break deserialization
lot of work
ill try
kinda sucks that you have to copy all of this to your patch bc the flags are inlined
yes
thats why an aliucord api for it would be good
like GatewayAPI
minky is laying on me purring @frosty obsidian
kill
evilv
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
double husk 
whats that
those are the capabilities used
where
desktop
how did you get
i literally replied to the relevent message
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)'
cadence utility
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
whats this as number
zeet please
.
oh
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
yes
how did you get that from 351
.
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
can't
its based on reflection with the wrapper i wrote for capabilities
i dont understand but okay
its just code specific to cadence
how do i add bitmask together
or
351L or (1 shl 3) just returns 351 am i doing it wrong
bc aliu already has that capability
bc thats not the capability responsible for that event
which one is it
i don't know
so its one of these?
ConnectionTimeStats: "GatewayHello" ended without starting!
did aliu always log that on startup
strange
i modified the capabilities cadence uses to match desktop and i don't get that event
it could be me using older version code
ill try the desktop one and se if the event is logged at all
startup is extremely slow
thats weird
even with the 351L
oh
i think this is the ready payload
there
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
)
}
that messes with settings
enables protos
still need to find the specific capability
if i just remove USER_SETTINGS_PROTO it should be fine right
maybe we can take away all the known capability values
i think 1 << 15 is it
idk
im having a dumb
im removing capabilities one by one until i no longer see the event
guhh me too
are you able to figure out the field that contains favorites in the payload
i haven't looked
its probably a flag in the channel override
wtf u doing zt
making favorite channels sync to aliucord
yeah its a flag
i also just found this
probably
gl
thank
@frosty obsidian even though the capabilities patch wasn't needed here do you think I should make thing for aliucord core
nah
it breaks stuff
removes the settings update event that aliu uses
and the property from the ready event
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
Frecents.kt: Line 104
GatewayAPI.onEvent<GatewayResponse>("USER_SETTINGS_PROTO_UPDATE") {
oh i think it just removes the old stuff then
aliu doesn't have any of them actually
it doesn't have the field
guess you're parsing the event yourself
oh
you will also need to find it in the ready event
yeah its literally just missing the flags property
no i mean the model
the flags are just a bitmask right
the property was not there
yes
im probably looking at older source
im looking at the decomp repo juby has
i think the flags stuff was added very late into alius life
you probably got pretty lucky
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
idk
@frosty obsidian http toolkit has free dark mode now
weird
its not sending a network request
ill have to manually do it
it works

meowwww
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?
All of them simultaneously
hetzner
host it all on the same 64gb ram server
30euro/mo
probably that would be very overkill
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
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
you can't add the flag via code
guhhhh
has to be added via cli flag
sucks
and these are both obsolete app.commandLine.appendSwitch("enable-features", "UseOzonePlatform, WaylandWindowDecorations");
enabled by default in modern electron
because it has to decide at app launch whether to open in x11 or wayland
fair enough
oh
right okay
thank you for saving me from making a braindead bug report

you using electron builder?
you can use a simple wrapper shell script for linux
that will add the flag u want
wdym
"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
@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
what
its like esbuild but only builds for newer targets
you do in vesktop
@frosty obsidian this is weird
i got it syncing properly
but channels like offtopic and regulars only show up in aliucord if theyre unread
no we don't.
do you transpile it at build time?
because all your preload files seem to be in ESM
oh I see
all code is bundled with esbuild to commonjs
anyway you add type: module to your package.json
https://www.electronjs.org/docs/latest/tutorial/esm#esm-preload-scripts-must-have-the-mjs-extension
ESM preload scripts must have the .mjs extension
Preload scripts will ignore
"type": "module"fields, so you must use the.mjsfile extension in your ESM preload scripts.
The ES module (ESM) format is the standard way of loading JavaScript packages.
why not use ESM
since electron supports it now
balls
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
sorry if that was a cocky response someone else sent that to me mid conversation
I mean esbuild isn't gonna magically fix your issues, I'm sure sucrase is also good
but tbh i would just recommend against using esm it's kinda cursed

you don't really need it
I've always used ESM
and pretty sure u can't even use esm in renderer
I prefer it over CJS
in armcord we do
in source code yes but
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
indeed
well anyway if u like esm better sure do use it
I suppose it is just opionated in the end
btw side note: && isn't gonna work on all machines
I suggest using .mjs (or mts with tsx package) scripts for all npm scripts that aren't super simple
yeah im just making esbuild.js now
this is a lot less painful than config files actually
oh wait vesktop is using && too for a lot

pr
that's so weird tho are u sure
is this for a discord client btw?
yes
wonder if you could use vite as ur build tool
eh i tried
a lot of the documentation assumes you are creating the vite app
and not just running someone elses app
idk if this is good https://electron-vite.org/guide/
Next generation Electron build tooling based on Vite.
there were like 2, one that runs on electron forge, and another that was standalone
both had the same name
3.3k stars https://github.com/alex8088/electron-vite
different authors though
I couldn't help but notice both have a large chinese audience - i have no idea why
Next generation Electron build tooling based on Vite.
yeah i saw that
because every 8th person is chinese 
fair enough
sob
actually this has really good docs
if you are new to electron it might help to use their template
it has docs for all concepts
do you know how to append a switch
sob
perhaps try dev -- --ozone-platform-hint=auto
-- is generally used to indicate end of argument parsing
ty
i use this, its good ๐
how cursed is this
why
The windows registry is a curse by itself
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.
is that c#
dunno i didnt make it
The uppercase method names seem to indicate that yes
yes it's C#
blurry asf
How ironic, that the csharp is blurry
blame discord screenshare
tldr to use a specific custom font for her blackjack game she made it install said font and edit your registry in windows
That doesn't sound like the ideal way to use a custom font
Didn't development stop on that? I'll have to check
Did it?
I mean I know they have been stuck on the same version for ever but I didn't know they actually stopped development
I'm still on vendetta. It's not broken yet, so eh.
Though polls being invisible is a bit annoying
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
Yeah I am too, still on 206.16 ๐
205.15 here
Okay yeah you're right, I'm remembering now. There's enough basic features broken that I decided to start working from the Vendetta base instead.
Damn this blows
I don't think AHK filters on a specific keyboard device, does it?
discord's development stopped, aliucord's didn't
@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
asking because im considering dropping zlib-sync entirely because of node-gyp
u should ask Donovan that
they are the one who chose it
it might also be because eris had it as an option
maybe
i mean idek why im using this
ik discord uses pako because renderer proc
but i have nodeintegration in workers
no
/testcommand testimgarg:
nope but they still use the old ui so some features are missing or need a backport plugin
๐ #๐ง-off-topic-iceman-only
(Auto-response invoked by @thorny ingot)
typedef struct {
int a;
char* b;
/* ... */
} struct_t;
or
struct Struct {
int a;
char* b;
/* ... */
};
?
struct Struct {
a: i32,
b: String,
/* ... */
}
:3
i think it counts as 2
bonus points if you have a constructor that does the same thing as just constructing with fields set normally
struct Struct {
a: i32,
b: String,
/* ... */
}
impl Struct {
pub fn new(a: i32, b: String) -> Self {
Self {
a,
b
}
}
}




