#πͺ -progaming
1 messages Β· Page 135 of 1
since I did call runtime.enter on the main thread (as a random forum post suggested)
ok yea i just tried it, it does move to another thread, and runtime.enter() actually just tricks the current thread into thinking a runtime is active, it does NOT provide background workers or the I/O reactor you need
wait what
it had another error but just using the tokio::main macro seemed to make it go away
but the await never finishes
so I guess the same issue?
In order to use task and IO operations from Tokio while not using Tokio for the main structure of your application, you must: Create a Tokio Runtime once at startup using the Builder, and make sure you don't drop it (e.g. let it be a variable in main). Get a Handle to that Runtime using Runtime::handle(). Just before calling any any Tokio func...
weird, I feel like this suggests it's fine
it is fine to poll Tokio futures from a different executor such as the one that evidently is built into gpui. The requirement is that the runtime has been entered before calling Tokio functions that create futures. Once the futures exist, they remember their runtime
GUH i can't send anything i keep getting timed out
ok i'll send it over multiple messaged
if you use cx.spawn i don't think you'll need runtime.enter at all
idk it just panics on the main thread without #[tokio::main] or runtime.enter
THERE
finally
whever i try to send it i get timed out
also #[tokio::main] blocks the main thread to run it's own loop
thus your await never finishes
hmm
I feel like I don't understand this stuff well enough but I feel like the only way to understand this stuff is by using it regardless
how else do you learn other than doing stuff, initially very badly
what if I want to use reqwest instead of gpui_http_client
well you kinda just keep fighting with the compiler until you "understand" how it thinks (helps if you adopt the mindset of never letting anything "just work" but dive into it and try to understand why it "just works"), but after that it then gets REALLY fun and makes you feel so freaking awesome, way more that other programming languages do.
I find it funny when people say you need to learn java to make a minecraft mod because I learnt java by making minecraft mods
why is automod blocking this π
i wonder what http impl is used by default, I couldn't find any actual implementations of HttpClient lol
it just uses NullHttpClient by default
that's such a billion dollar mistake...
i mean.. i think they did that to so they can avoid forcing specific networking librarys like curl onto every project that uses them.. then again it does make it way harder for someone trying to make a simple api call
leaves you to choose whatever you wanna use
which in most cases means putting in work into actually implementing that thing you want to use
how about... reqwest :)
in which case... what value does this abstraction provide
anyway wasn't expecting it but thanks for the help
you could use it but that would mean implementing it like you were before (using arc since it's the simplest and works)
I don't usually ask for help however [xkcd 386]
people do tend to help when they see me doing something dumb
you're welcome!! :>
I wonder how one normally creates a gpui app with networking
I think I should look at real apps
I think I asked one question on stackoverflow nearly 10 years ago
oh I deleted that
and asked two questions in the modern era
idk I guess I have good reason to be scared of stackoverflow
just look at how zed does it, their code is REALLY good and they almost never use arcs
well I couldn't find the actual http impl zed uses π
I just found the nullhttpclient, fakehttpclient, etc.
i don't think i've ever asked on stackoverflow.. i am slightly scared of asking something dumb on accident so i just lurk and if i don't find anything i give up..
i should probably stop doing that..
I am also scared of posting on reddit
I delete if downvoted because I am scared of being roasted
sameee
I did keep that one that's cool
was literally debating answering your question cuz i feared i'd spread misinformation
I should have suggested vencord experiment plugin
i think zed actually defaults to CurlHttpClient and uses libcurl, libcurl is injected into the program at the very start i think
but am not actually too sure.. their code is confusing
it's funny i found myself reading the agents.md of zed as it documents some things
I don't think I want to heavily depend on gpui's httpclient as that ties things to the library too much
just found out that zed's networking actually uses a wasm target for the agents using ModelContext::spawn so that the task it creates is dropped if the model is also dropped.
could this be the impl they use
there's a field which stores a tokio handle
very interesting
I guess you just copy and paste this crate into your project? that's what I saw one project do
π
still wouldn't it be cool if non-UI crates in my project didn't have to depend on gpui at all??
hm, i guess you could do it like that, i assume they did it like that so the library can have a place to run it's own I/O operations without taking trying to take over the main thread what GPUI is already using
yea, they seem to be wrapping the reqwest future in a gpui::Task
kills the reqwest automatically when the task is no longer needer
cargo supports adding git repos and specific packages from workspaces
zed is quite a big clone
it is..
this project clones zed anyway for some reason
the copy and pasting probably wasn't necessary for them
@installate fix
buh
I wonder where to find a good explanation of how tokio actually works
in the CMakeLists.txt remove line 41 and 42
ah.. cmake.. .take me back to C++ and CMake
(actually I specifically avoided C++ here because I didn't want to use asio π)
Idk what commit ref I was at when I made the patch
should've really aded a commit reference to it
how does the plist look?
on the binary that was built?
it should use https://github.com/Instellate/sharity/blob/main/client/bundle/Info.plist and also the icon in the same folder but I don't think it does
yeah hold on im rebuilding
forgor to say
when building the project on macos you need to add -DCONFIGURE_BUNDLE=ON
line 186 in CMakeLists.txt you should remove the extra PROPERTIES
does that solve it??
also set the minimum deployment target for macos to like 10.13 or something, using set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13")
does that use my own provided plist when doing that?
I need the special plist for the reason that I have custom URL registration
seems fine
does it have this?
yeah
gimme a sec
can you install the app on your system temporarily so your computer recognises the URL?
also does the binary have the icon?
nvm use 10.15
okay
xcode using my certificate by default is evil
sam distributed sharity 
no its never bundled within the app
buh this internet is so slow
does this url work sharity://sharity.is-dominating.me/?path=%2Fws&key=5C3P9rDCodyVLelY3lY4%2FpY54Byau6z2YOaRdO8uF2w?
what url do u want me to open
malware
will this install various
virus
M WALRE
@modest wren the url does nothing but it does open the app
this is such a cursed app
it works well on windows, linux and android
it'll indeed be cursed on MacOS as I can't test it there
xD
and idk MacOS stuff, like all the plist stuff required and so
I thought the way macos would open the url would be like
plist stuff is really simple
run the binary and pass the URL as the argument
plist is just info about an app really
then it will register stuff if needed based on that
well and other things bundled within the app and so on
what does this mean
the way I do URL stuff
is I just pass it as an argument when the binary is ran
like ./sharity-client url
but that's not how it is done on MacOS
I mean
that works I guess
people bundle entire clis and guis in the same binary sometimes
heh
that is MacOS API stuff
and I can't develop Objective-C++ code and try it out
well, if you can get the icon to automatically bundle on build that would be great
send me your version ot the CMakeLists as well afterwards (if you can or cannot get the icon to work)
"${CMAKE_CURRENT_SOURCE_DIR}/bundle/sharity.icns"
appresourcedir/sharity.icns)
try this
that did not do anything
Buh
Well that's fine for now
Thank you so much!!
Is there any command for creating dmg files?
build.yml: Lines 202-226
- name: Codesign
run: |
mkdir -p dist/dmg
mv dist/${{ env.BUNDLE_NAME }}.app dist/dmg/
codesign --deep --force --options runtime \
--sign "${{ secrets.DEV_ID_IDENTITY_NAME }}" dist/dmg/${{ env.BUNDLE_NAME }}.app
- name: Create DMG
run: |
mkdir -p dist/out
create-dmg \
--volname ${{ env.BUNDLE_NAME }} \
--background "package/macos/background.png" \
--window-pos 200 120 \
--window-size 510 350 \
--icon-size 100 \
--icon ${{ env.BUNDLE_NAME }}.app 160 155 \
--hide-extension "${{ env.BUNDLE_NAME }}.app" \
--app-drop-link 350 155 \
dist/${{ env.BUNDLE_NAME }}-macos-universal.dmg dist/dmg
- name: Notarize DMG
run: |
xcrun notarytool submit dist/${{ env.BUNDLE_NAME }}-macos-universal.dmg --apple-id "${{ secrets.APPLE_ID_EMAIL }}" --password "${{ secrets.APPLE_ID_PASSWORD }}" --team-id "${{ secrets.APPLE_ID_TEAM }}" --wait
xcrun stapler staple dist/${{ env.BUNDLE_NAME }}-macos-universal.dmg
ty
create-dmg is on brew, so in the runner you can just do that
ic
it just makes it really simple to create fancy dmgs
dmg is what is used for shipping and distributing apps right?
okay nice
not required, but it tells the user to drag the application into the correct directory
ah
its strange because its not an installer
and you can run apps while its still inside the mounted disc
itll just give u a big fat warning if u do
well just want something to make it more convenient for the user 
buh
I usually do more bigger PRs
so usually I never single commit onto main
time to wait
thanks for helping 
the bloat
did it install a lot?
it does run though
I usually just create PKGBUILD
yea, but I want full support before I do automated builds
time to wait for GH actions to build OpenSSL
I pray the android build still works
I cannot be arsed patching the QR scanning project again
nop it doesn't work
I built openssl like 10 times today
on gh actions?
locally
Last time I had a depend on OpenSSL on gh actions it was horrible and it was in a rust project
I had to quickly find an alternative so I never had to use it
my app has like 10 crypto libraries in it itβs so awful
I sentence you to compiling aws crypto, ring, and openssl
@solemn ravine yay
Use schannel instead on Windows
It's built in and updated with the OS
what's schannel?
TLS library by ms
is it OpenSSL compat?
did something
typescript <3 <3 <3 <3
C++ <3
it feels hard to to use async rust without Arc or unsafe 
Arc feels like a slipppery slope...
in what gregramming language?
elle
six seven
dear elle girl how do i write a tokenizer
skip all whitespace until non-whitespace, read a char, determine what kind of token it will be depending on what the char is, then consume the appropriate token, and repeat
for example if it starts with a digit parse a number, if it starts with a letter parse it as an identifier (and then turn it into a keyword if necessary), etc.
unfortunately the tokenizer is the easiest part
what but tokenizer is already very hard....
so i should kill myself?
no you should just keep trying
thank you
@valid jetty hiii
Go Go Go Go Go Go <3 <3 <3 <3
i am never writing my own language gang
also, what font is that?
managed to make my own discord desktop client that uses 300-400MB ram by
"removing" "unnessessary" stuff
/run ```ts
setImmediate('console.log("hello")'
Here is your ts(5.0.3) output @placid igloo
file0.code.ts(1,36): error TS1005: ')' expected.
Here is your ts(5.0.3) output @placid igloo
file0.code.ts(1,1): error TS2304: Cannot find name 'setImmediate'.
/run ```ts
setTimeout('console.log("hello")', 1)
@placid igloo I only received ts(5.0.3) error output
node:internal/validators:421
throw new ERR_INVALID_ARG_TYPE(name, 'Function', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "callback" argument must be of type function. Received type string ('console.log("hello")')
at setTimeout (node:timers:141:3)
at Object.<anonymous> (/box/submission/file0.code.js:1:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'ERR_INVALID_ARG_TYPE'
}
Node.js v18.15.0
@placid igloo
@solid gazelle
nodejs setTimeout doesn't implement this slop
ve ```js
setTimeout(console.log, 1, "hi", "nexxxxxx")
sleep(100)
undefined```
```ansi
'hi' 'nexxxxxx'```
ve g
npm name squatting is so hard nowadays π
pov: you resized a react project
react devs banned from life
rustii
FINALLLY
the other way was
[dependencies.serde]
version = "1.0"
features= ["derive"]
msrv nightly 
lol it forgot the message end token
how could I add debouncing to this? ```js
export const ImageFetchStore = proxyLazy(() => {
class ImageFetchStore extends Flux.Store {
public resultsForQueries: any[] = [];
getImages(query: string) {
Native.getImages(query).then(result => {
if (this.resultsForQueries.length > 3) {
this.resultsForQueries.shift();
this.resultsForQueries.push({ query, result });
this.emitChange();
}
});
}
getResultForQuery(query: string) {
return this.resultsForQueries.find(e => e.query === query)?.result;
}
}
let self = new ImageFetchStore(FluxDispatcher, {});
return self;
});
so that getImages doesnt spam the native function

okay i figured it out π
did u
btw @jade stone
you can legit fully do virtual lists with letting the browser handle the visibility of elements
with this you can even disable listeners for shit, or unmount components
Do someone got a plugin for seeing the last time someone log in?
Yes, its called sessions
π
omfg this is so good
@royal nymph obligatory ping
this api fucks, jesus christ, its so good
its like a better intersectionobserver
π #π₯-vencord-support-π₯
(Auto-response invoked by @patent vortex)
(there is none)
also this idea for a plugin seems a bit... creepy? imo?
less creepy than seeing all the devices they are logged in on? including mobile phones?
or less creepy that seeing people in channels that arent meant to be visible?
or less creepy than seeing the last activity of a private/invisible channel?
be more specific ^^
i meant it in a way that why would you for example need to know when some random person went online on discord
see above.
then you're hopefully competent enough to answer ur own question based on that
i already said it is creepy
so what is your exact problem to my message at this point
so are all the other stalking features in vencord
its no different than what it already offers
and most other chat clients also have this kind of feature
ex: steam, matrix
ok i'll maybe rephrase it. it is creepy IF used in a creepy way like stalking (which is my main reason of pointing out at the question from above)
omg it's the hayase person
it's fine if used in a normal way. but considering how people are, especially on discord, a lot of them don't do that
nah its creepier
nah its creepier
nah its creepier
https://youtu.be/nuxSFTjXrhI madcss
We brought 16 of the worlds best CSS developers to compete head to head. π₯ Be the ~18,300th person to join our super tasty newsletter https://bit.ly/syntax_snackpack
Follow / subscribe to all of our featured competitors:
Shaundai Person
@shaundai
https://x.com/shaundai
https://www.tsforjs.com/
Scott Tolinski
@Scot...
the lack of distinction between types and variable names in go naming conventions feels really bad
this would look like a function pointer call to a c developer
it's actually a cast π
also I had some code which did PluginData[foo]() and that looks like a call of a function inside an array/map when it's actually using generics
and thats why C++ invented static_cast
and reinterpret_cast
oh i guess C++ also often has snake_case class names which look like variable names π
but at least it would be (type*) instead of (*type)
and it uses angled brackets for templates plugin_data<foo>()
IMO you should start your types with capital letters and functions and variables with lower case letters
I guess it's neat to be able to tell internal functions from the name too but types vs other stuff feels like a more important distinction
just copy JS and use # to prefix internal functions
the kode tode
ITS NOT
INSANE
INSANE
o
@versed cape #π§©-plugin-development message its all done in RPCServer singleton (specifically in handleRequest), for all commands just search by \w\.T)\(\w+\.e$_\.\w+,{ (regex)
for events search by \.ZE4\.\w+\]:{, but that shows functions that check if you can subscribe to event and return another function with state, for actual event dispatches search for \.dispatchToSubscriptions\(\w+\.ZE4\.\w+
the RPCServer#dispatchToSubscription method has three arguments (dispatchToSubscriptions<T extends keyof RPCEvents>(event: T, args: RPCEventArgs<T>, data: RPCEventData<T>): void which will dispatch it to all clients that subscribed to event with same args, this assumes that RPCEventArgs<T> gives argument's structure by event name, same for RPCEventData)
can't type in #π§©-plugin-development so have to ping here
i was writing some go code earlier today and it immediately triggered an ick deep within me
You mean /caption?
Uhhh dont hardcode mangled names in regexes
Use \i if you have to
I know , thats for finding stuff in devtools
o
"biggest" web devs struggling with css, yep
dont insult my goat scott tolinski
What do we think the best regex standard is (and why) just outta interest?
i'd do <T extends {} | undefined>(a: T | null): asserts a is T
why ?
what does that change ?
i dont think it changes anything
it's just how i'd write it
mmmmm
@valid jetty hiii
how many entities is that
More than thirty seven I think
@woven mesa rate
arenβt u refesigning the website
@young flicker make it fancy yk
@young flicker https://impactor.khcrysalis.dev take some inspiration idk
I lowkey cooked with the design on ts
pixelmator
Uploading video rn
proud of how it turned out
the text has a gradient and a transparent border
ooo
now make it voxel simulation or something with marching cubes and make planets get ripped apart by the black hole @valid jetty
make it so galaxies and planets are procedurally generated with dynamic weather systems and atmosphere and add a first person mode that lets you land on planets that also has reentry drag and escape velocity you have to worry about
also add a base building system and health system
add a way to build custom ships as well
@deep mulch
so true
does anyone have any ideas why opening devtools in discord is so inconsistent with Ctrl+Shift+I, and yea i have the fully goofy ahh flag in my config file
wdym
Like, I managed to get it open once but it doesn't want to open anymore, im scratching my head trying to figure out why it doesn't open consistently for me
only way I've been able to open it consistently is on macOS because there is a menubar
weird, that shortcut always works for me
do you use like a custom keybinds plugin or something
that could be intercepting shortcuts and stuff
I don't believe so, that was my first thought, but nothing that would explictly do that, I've also tried removing the modifications from discord altogether and still didn't work
seems to work when i spam all the ctrl + shift keys and the i key, and even then takes like 5 presses before it does anything, i have never understood this issue
are you sure its not your keyboard or maybe some other app intercepting the key presses? try ctrl shift I in here https://keyboard-test.space/
Check your keyboard in your browser
or is it only discord
how to troll your coworkers in a nutshell (fun guaranteed)
stealing
same
this doesnt work with python because thats a straight people language
show it some elysiajs code and it will act normally
i mean we can try, send me one of their repos
idk nobody uses elysia except x, abacatepay, bank of agriculture thailand, csmoney
,remind
ga
?remind 15h check if tidal's x-tidal-token is static ("vNVdglQOjFJJGG2U")
Alright @placid igloo, in 15 hours: check if tidal's x-tidal-token is static ("vNVdglQOjFJJGG2U")
THANKS
download.py: Line 10
TOKEN = 'vNVdglQOjFJJGG2U'
publish on ports when π
13855 β β β@deep mulch
10626 β β β@solid gazelle
10604 β β β@nimble bone
9571 β β β@young flicker
8331 β β β@vital plume
7860 β β β@cinder egret
5927 β β β@royal nymph
4665 β β β@granite geyser
4359 β β β@ornate quiver
3661 β β β@jade stone
3033 β β β@dark peak
2929 β β β@balmy lintel
2906 β β β@thorny ingot
2117 β β β@cerulean plover
2078 β β β@pseudo sierra
1987 β β β@nimble minnow
1789 β β β@clear thunder
1682 β β β@torn seal
1580 β β β@sonic oak
1464 β β β@native spruce
66 β β βYou
nop
vencord just very huskworthy server
vee husked
i must follow in the steps of my father
zt vees little minion
nicee what AI did you use
I know that plugin requests are closed but is there a way to commission one?
@jade stone
@pearl parrot
I do them, dm for more information
it's not letting me DM you, can you accept my friend req?
That's an issue with your settings, I have my messages open
that's weird, I didnt change any settings
Make sure your privacy settings allow direct messages from server members
ah sorry, yeah I just sent the DM
neat
i couldve done this with one perl script and a cron job
true
oh yay
do people really hate js this much
dont use go to js use go to haxe to js
is there easier way to do this?
function addSeparator<A, S>(arr: Array<A>, sep: S): Array<A | S> {
let res: Array<A | S> = [...arr]; // copy
for (let i = arr.length - 1; i > 0; --i) {
res.splice(i, 0, sep);
}
return res;
}
const result = addSeparator([1, 2, 3, 4], 'hi');
console.log(result);
this?
yay
@placid igloo, <t:1773184726:R>: check if tidal's x-tidal-token is static ("vNVdglQOjFJJGG2U")
function addSeparator<T, S>(array: T[], separator: S): (T | S)[] {
return array.flatMap((x, i) => i ? [separator, x] : x);
}
or

god
doesn't work for objects
for strings it's best to use Array#join(String) anyway
src/utils/array.ts: Lines 20-32
export function joinWith<T, I>(array: T[], separator: I): (T | I)[] {
if (array.length <= 1) {
return array;
}
const ret: (T | I)[] = array;
for (let i = array.length - 1; i >= 1; i--) {
ret.splice(i, 0, separator);
}
return ret;
}
wtf are ya'll people
function join (arr, sep) {
const joined = []
for (const el of arr) joined.push(el, sep)
joined.length = joined.length - 1
return joined
}

added types cuz i was bored
also I love the O(n^2) complexity for something so simple
why would you do it that way π
Also guys this operation is called intersperse
I'm surprised none of u know its name
unknowns solution is the most sane
or use a generator so you get it as iterator
Mine best
i intentionally used .length overriding, just so it doesnt work on some bun versions
does bun seriously break that
i remember seeing an issue for that yes
why are they not following spec π
isn't there literally an extensive ES test case they can use to test bun
how did they not catch it
sir, date is still not correct on bun XD
same for a bunch of textencoder cases
btw @royal nymph do you know anything about discord's game sdk?
the C++ shit thats somewhat new?
cuz im trying to find people that used it or know anything about it
but XD
TLDR i want it to use for "self-botting" and possibly for custom call implementations
cuz i want to interface with discord without discord's app, for a matrix client
i take that crying emoji as you have no clue abt it
boo
i dont yeah
I do
yeah but knowing you you'll be an ass about it XD
something something "ew its for a JS project, we should go to 8086 assembly, web was a mistake" etc XDDD
anyways, if u have any experience using it feel free to share what it was like, and what it was useful for or could/couldnt do
i know it doesnt have message history, but only live chat, but thats about it, idk about shit like members, assets, calling etc
The fact that it's matrix*
It's just not made for that
Matrix voice and discord voice are fundamentally strictly incompatible
You also will suffer from latency issues
thats what bridges are for
they are kinda like IRC bouncers
running 24/7 on a server
so the lack of message history etc isnt a problem
but idk what other limits/capabilities it has
which is why im asking about them, so i can make the decision myself
again, i can determine its capabilities myself
which is asked about its limitations
not an opinion on how you view what im trying to do
which is roughly inline with what i expected u to do kekw
imageHosts.ts: Lines 22-27
const list = domains
.flat()
.filter(Boolean)
.map(d => d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"));
imageHostRegex = new RegExp(`https?://(\\w+\\.)?(${list.join("|")})`, "i");
RegExp.escape
RegExplode
this code was written before node24...
matrix was written in ten days using a perl script and a cron job
Is there a plugin that automatically completes quests on Discord?
π #π₯-vencord-support-π₯
(Auto-response invoked by @fierce pendant)
guys its so over, they're cancelling free claude models with github student pack!!!
Makes sense. Anthropic is labelled as " Supply chain risk " by the american gouvernements, therefore, american companies can't make deal with them anymore.
no it applies to GPT models too
AH !
me when i lie
What do you mean ?
American companies absolutely can make deals with them
@royal nymph vencord will partner with anthropic
yop
i already use buns bundler as a replacement for the bundler that vencord uses
its 3x faster!
i also use the runtime for running all the scripts
Indeed, I just checked again, I guess my brain extracted a bit too much :
Even for Department of War contractors, the supply chain risk designation doesnβt (and canβt) limit uses of Claude or business relationships with Anthropic if those are unrelated to their specific Department of War contracts.
I got this from anthropic.con website.
death penalty
public execution via firing squad for your severe offense of running vencord code with bun
tomorrow at 2:30 afternoon CET
be there or be square
that was a joke
i used pnpm with node
please
please
please leave me alive
please
bitte v
bitte
ich bitte dich an
okay
bitte
you live this time
W
when will i killed
isnt bun good
i will watch
i will enjoy it too
Deno is
yea ask @pearl parrot
damn
fuck vite
but vite 8 looks unironically good
they FINALLY got forwardConsole and a good devtools plugin
wepback has had that for years now, but now that vite has it too....
yes it is smh
You need a dev tools plugin ?
for debugging bundle sizes, yeah
What do you mean debugging bundle size
Wtf even is a bundle
wow so many purple names
Wait Im actually so happy for the devtools
So good
@jade stone
it's prod only
doesn't work for dev
so we're back to dev prod discrepancy in vite
for dev you still have the inspect plugin
oh, esbuild had this view and it was really good to work with
you can't click on anything, it is only a shallow view

holy
thats a big bundle
oh, i bundle monaco-editor(which has an inline build of typescript) and typescript
that's like >1/2 of it
nice
how does that work
is this paigefiles
what is this
how does the expand button work
are the title bars manually done
Idk what that means
how
no vagueposting @young flicker
write in appkit @young flicker
why does the window look like that
You removed like every window decoration
@young flicker Hello
unhusk
@young flicker I Would Die 4 U
im trying to figure out how yall find the patches, many people say use react dev tools
and for a beginner i really dont know where to find the react dev tools
checked the console, theres tabs that opened?
real
likely spammer btw
click on the arrow next to the tab bar at the top of devtools and you will see react devtools
make sure that theyre enabled
Settings -> Vencord
nvm it works thank u
satan
snowy satan
idk what a node is
fucking dom node
fuck man i remember seeing this virtual scroll lib which only did like a single element of updates when scrolling but i cant find it now
it was so good i need it
pro gaming
contrast-color() is landing in Chrome 147, making it Baseline Newly Available in all modern browsers.
οΈοΈ
οΈοΈThis feature takes any color value and returns either black or whiteβwhichever provides the highest contrast against the input color.
οΈοΈ
οΈοΈi.e. color: contrast-color(purple) returns white β¬οΈ
lmao the mdn docs have no feature support test so it just doesnt work
I've written code for this in compose
This is so ass why dont they make it return either one of a set of two prefered colors
yeah this is just a few lines of css
but still nice util ig
i could do this with one perl script
@deep mulch would appreciate if you left a comment or something thanking me for impl :)
where does IElementType come from
kotlin-compiler-embeddable
import org.jetbrains.kotlin.com.intellij.psi.tree.IElementType
import org.jetbrains.kotlin.lexer.KotlinLexer
import org.jetbrains.kotlin.lexer.KtTokens
``` relevant imports
I'd recommend picking custom colors though
its the time of the month where i wanna remake adobe flash from schratch
hmm
pretty simple
it's kinda ass but the basics are there
π
i wonder if it would be practical to make a library using this, but it would require shipping the compiler with it
already working on one tbh
how
it better be kmp
actually can kotlin compiller embeddable even be used on non jvm
@lavish cloud theres a KotlinParser, wouldnt that be better to use
I think that might turn it into an AST which makes it more difficult to parse, no?
Also idk how that treats unresolved references
too many colors imo, smth closer to this would be better
i no like
wanted to show what it would look but i no kotlin configured
@deep mulch https://maven.martmists.com/#/releases/com/martmists/codeviewer/compose-code-viewer/1.0.3
And ofc all colors are customizable
looking at python it seems insane how much exceptions are used
I see some code trying to access a key in a dictionary than catching KeyError
why not just use the in operator
or dict.get
I do remember reading somewhere that the pythonic way is often just to catch exceptions

pythoneers are so insane
not enterprise enough, needs more OOP multiple levels of inheritance and 400 try-catch blocks for maximum instability
fake
we dont use @ operator at all in python
and if we do then its mostly mathematics stuff
Why does python have a separate matrix multiplication operator
What other ways are there to multiply two matrices π
Because numpy users don't understand types
So they can't distinguish between arrays and matrices
And thus instead need to distinguish between matrix multiplication and elementwise multiplication
Insane
oh wow
@jade stone
@jade stone idk you're a monkey bro
idk why you said the anchor and positoning api is bad
it works perfect
idk you're a monkey bro
tgats true too
We're all monkeys
TRUEΒΉ
Do it. No balls
public <T extends Packet> T receive(State state, Class<T> clazz) {
Packet packet = receive(state);
if (packet == null) {
return null;
}
if (!clazz.isInstance(packet)) {
LOGGER.error("Received packet is of type {}, expected {}", packet.getClass().getSimpleName(), clazz.getSimpleName());
return null;
}
return clazz.cast(packet);
}
private Packet receive(State state) {
Integer packetSize = new VarInt(this.dataInputStream).value;
if (packetSize == null) {
LOGGER.error("Failed to read packet size from client");
return null;
}
byte[] packetBytes = new byte[packetSize];
try {
this.dataInputStream.readFully(packetBytes);
} catch (IOException e) {
LOGGER.error("Failed to receive packet from client", e);
return null;
}
ByteBuffer buffer = ByteBuffer.wrap(packetBytes);
return switch (state) {
case HANDSHAKE -> HandshakeC2SPacket.fromBuffer(buffer);
case STATUS -> null;
case LOGIN -> LoginC2SPacket.fromBuffer(buffer);
};
}
am i crazy ? yes probably
yes this is manual vtable by hand kinda
@keen zealot
god bits-ui is shit
it performs so horrific
my route took 800ms to load
it was their fucking avatar component
i loaded 50 avatars on route navigate and that took almost fucking a second
wrote my own with blackjack and hookers, 10ms
@royal nymph so turns out native popver is kinda goated ngl
https://github.com/ThaUnknown/bracket/tree/main/src/lib/components/ui/nativepopover
idk why ya'll were struggling with it
but its cinema
you see, when using bun, you dont even need to use some specific UI library, the HMR takes 12 seconds with --bun flag for no apparent reason
, of course it happens only with nextjs
oh i run a CSR only app
hash routed
good for you
so SSR doesnt apply
damn i hate ssr so much
this is a client navigation
its purely fucking eval of an image src
its nuts
next was fucking bitsUI popover
its also so horrificly expensive mounting 80 of them also took almost a second
so i used native, and cant even measure their impact anymore
but yeah u deserve this
for using bun
and react
shitΒ²
im currently trying tanstack start/router and the flow makes so much more sense
and im using sveltekit's own filesystem based router and i dont need to do fuckall
auto type inference and safety, no config, no fuckery
just works, does all for u
Guys, if I published my plugin on GitHub, can I somehow promote it through this community?
i get that with tanstack router too 
tanstack can do that better than sveltekit actually
actually not
i use tanstack start with solidjs on my site
i hate react too gang
i would never use react
solid is just slightly less shit to use, and much faster react
its still not an enjoyable experience for me
i understand
@deep mulch @solid gazelle json parser
theres operator overloading for JsonValue, if you do x[0] it will interpret it as an array
if you do x["a"] it will interpret it as an object
if it isnt of that type, you get an error
also syntax error
@valid jetty make json writer
thats easy
yay
i wrote that in like 20 lines before
fres did i show you my black hole
@valid jetty elle try catch?
you have result
@valid jetty does elle have uuuuuuuuuuughhhhhhhhhhhh
import std.stdio (Stdout, Stdin)
trait pub BaseHandler {
fn test() {}
}
type MyHandler {}
impl BaseHandler for MyHandler {
fn test() {
Stdout.new.print("it works")
}
}
fn test_handler(handler: BaseHandler) {
handler.test()
}
type async Main {
fn async main {
test_handler(MyHandler() as BaseHandler)
}
}
``` can u do that in Elle
sry nvm
you sent me this before lol
but is this cool
ill do that after i clean up the parser
its a hot mess rn
verey aweosme
im just doing shit
look at this beautiful object parser
if self[*i] == '{' {
*i += 1;
map := HashMap::new<string, JsonValue>();
for ;; {
while self[*i].is_whitespace() { *i += 1; }
if self[*i] == '}' { *i += 1; break; }
if self[*i] != '"' { return None(); }
start := *i += 1;
while self[*i] != '"' { *i += 1; }
key := self.slice(start, *i);
*i += 1;
while self[*i].is_whitespace() { *i += 1; }
if self[*i] != ':' { return None(); }
*i += 1;
while self[*i].is_whitespace() { *i += 1; }
if _, value := self.parse_json_at(i) {
map[key] = value;
} else {
return None();
}
while self[*i].is_whitespace() { *i += 1; }
if self[*i] == ',' { *i += 1; continue; }
if self[*i] == '}' { *i += 1; break; }
return None();
}
return Some(JsonValue {
tag = JsonValueKind::Object,
object = map
});
}
this doesn't seem to be clean
this is much cleaner than my impl before parsing from index 0 every time
have you considered merging key and strings parsing logic into one fn instead and do a state machine?
i think i could write a parser but i dont know how i would actually run it
uhh
help
thats a good point
the string part is just
if self[*i] == '"' {
start := *i += 1;
while self[*i] != '"' { *i += 1; }
value := self.slice(start, *i);
*i += 1;
return Some(JsonValue {
tag = JsonValueKind::String,
string = value
});
}
i could probably do that
can i show you all the spec and i wanna see what you think
sure
its a bit short
this is interesting
you may want to get inspired by https://github.com/vtereshkov/umka-lang a bit, this is the only other statically typed scripting language i know
this is better than anything i could ever make and makes me lose all my motivation
W
this has also been in development for almost 6 years be realistic please
typescript is a statically typed scripting language
typescript's type system is more advanced than anything you will ever create /saturn
i mean
sure?
but typescript is not a statically typed scripting language
its a superset of the dynamically typed scripting language js
its like saying python with statically typechecked inlay hints is now a statically typed scripting language
okay maybe typescript isnt a statically typed scripting language but the typing system can run doom!!!!!
i know lol
My Advent of Code 2025 solutions in Elle. Contribute to acquitelol/aoc2025 development by creating an account on GitHub.
at this point just dont write it in typescript π₯
i wrote that as a joke lol
yop
im making 100% type-safe i18n in ts rn
oh cool
i tried that before (gave up)
(gave up after 2 seconds)
(god i hate myself)
prelude
@valid jetty
ro ieeee
Ro IEEE
she ro on my internet till i explore 'er
my browser really hates the filename v.gif for some reason
ven.gif is fine but not v.gif
π
@valid jetty doing matrix factorization in my linear alg class
scary stuff
rosie be like: thats easy i love matrix factorization
shrimply an issue of skill tbh git gud
how
do you even need to do this
cant you just do this
if self[*i] == '{' {
*i += 1;
object := HashMap::new<string, JsonValue>();
for ;; {
skip_whitespace(self, i);
if self[*i] == '}' { *i += 1; break; }
key := self.parse_json_at(i);
if key.is_none_or(fn(value) value.tag != JsonValueKind::String) {
return None();
}
key := key.unwrap().as_string();
skip_whitespace(self, i);
if self[*i] != ':' { return None(); }
*i += 1;
skip_whitespace(self, i);
if _, value := self.parse_json_at(i) {
object[key] = value;
} else {
return None();
}
skip_whitespace(self, i);
if self[*i] == ',' { *i += 1; continue; }
if self[*i] == '}' { *i += 1; break; }
return None();
}
return Some(JsonValue { tag = JsonValueKind::Object, object });
}
That wouldnt make sense then
There is no reason to accept {[]:"Hi"} as valid and unnecessarily checking if you can parse something else is bad for perf
is this nextjs slop
Yes
well no, you parse "any expr" and if it isnt a string you fail
its not really any slower than having a specific string parse state because an invalid state (you have a non-string key) is unlikely
that statement i sent is part of parse_json_at its a recursive call

doing new Map(initidata).values().toArray().map(a=>somemap(a)).sort((a,b) => b-a) will mutate the underlying values iterator
shit
sorry even further
?? Js is insane
IKR
dude i just spent like 20 minutes debugging why all my fucking channels in a list were progressively being replaced
as notifications flowed in
and i needed [...rooms].sort()
;-;
cuz the fucking sort for some reason fucked up the iterator from the map object
quite nuts
you can also do rooms.toSorted() but i think yours might be cleaner i dont know if theres any difference
$: roomtypes = data.client.roomtypes
$: ({ dms } = $roomtypes)
$: sorted = derived(dms.values().toArray().map(r => lastactive(r)), rooms => {
return [...rooms].sort((a, b) => b.ts - a.ts)
})
i need shit to be reactive
dms is a map
and i need to convert the map into a reactive list, via lastactive, which returns a subscription store
cuz then i can do:
<div class='flex size-full flex-nowrap'>
<div class='h-full overflow-y-auto overflow-x-clip w-70 border-r border-black/10 dark:border-white/10 shrink-0 text-muted-foreground p-2'>
<div class='text-muted-foreground text-[10.5px] my-2 px-1.25'>Direct Messages</div>
<div class='gap-0.5 flex flex-col'>
{#each $sorted as { room } (room.roomId)}
<Button variant='ghost' class='w-full rounded-[6px] px-1.5 py-1 h-auto justify-start gap-2.5' href='/#/app/dm/{room.roomId}' active={$page.params.roomId === room.roomId}>
<RoomImage {room} class='size-6 rounded-full bg-muted' />
<div class='text-nowrap text-ellipsis overflow-hidden font-medium text-xs'>
{room.name}
</div>
<div>
1
</div>
</Button>
{/each}
</div>
</div>
<slot />
</div>
and simply that each will re-order without re-mounting the components
automatically
as notifications flow in
what vs is smoking
svelte 4?
nah wtf
for newcomers 5 is better because its explicit
but once u know how 4 works, its soooooooo much better because you write so much less boilerplate
but yeah sv4 is funky if you dont know how their compiler and rectivity works
i spent many hours looking at [and contributing to] their compiler
that said, only visibilityState and fullscreenElement bindings ended up merged
they didnt add my pictureInPicture bindings because firefox doesnt support it
its always fucking firefox
shit, this was 3 years ago at this point
look how they massacred my boy D:
i understand what you mean i am a newcomer
@deep mulch i added a little section for things made in elle
i started with svelte 5 and going to svelte 4 would be weird
there are 2 more but i cant talk about them yet because theyre in escrow
theyre school projects which means i cant publish the source code publically or they might be flagged for plagiarism
as soon as theyre cleared (i get my final grade) i will clean the commit history and add them
theyre the rhythm game and the japanese programming language
insane
insane
why is it all holes
i love women
casn u help me do this btw i cant code
what do i change
ahh ok
nvm im dumb i got it
yayyy
alright hi so this is the correct code
use std/prelude;
external fn pthread_create(u64 *thread, void *attr, fn(void *) -> void *start, void *arg) -> i32;
external fn pthread_join(u64 thread, void **retval) -> i32;
struct Domain<T> {
u64 thread
}
fn Domain::spawn<T>(fn() -> T f) -> Domain<T> {
u64 thread = 0;
pthread_create(&thread, nil, fn(arg) {
f := #cast(fn() -> T, arg);
return Box::new(f()).to_ptr();
}, f);
return Domain { thread };
}
fn Domain::join<T>(Domain<T> self) {
ret := nil;
pthread_join(self.thread, &ret);
return *#cast(T *, ret);
}
struct Wawa {
string name,
i32 width,
i32 height
}
fn hey() {
io::println("i run in a different thread!");
h := Box::new(Wawa { name = "hi", width = 20, height = 10 });
io::println(h);
return h;
}
fn main() {
dom := Domain::spawn(hey);
result := dom.join();
io::println("result:\n", result);
}
hold on ill explain
std/iois part ofstd/prelude, thats redundantvoidon its own is not really a valid type, im honestly surprised the code even compiled like that. the signature ofpthread_createacceptsvoid*- all thread memory will be freed after the thread joins. to mitigate this, i put the return value into a Box, which essentially means:
- allocate new heap memory of size T
- store the value T inside via shallow copy
&his not allowed and is UB, all stack memory is invalidated after the function returns. essentially, whenheyreturns,&hbecomes an invalid pointer-> Wawa *andDomain::spawn<Wawa*>are unnecessary because elle can infer all of that, you can just haveDomain::spawn(hey)
Ok I donβt even understand any of it π
I tried to get into programming so many times
this is relatively complicated i dont expect a non-programmer to understand
i was pretty sure about what you said of 3 and 4 but just sneding the whole Wawa didnt work and pointer did the trick i knew it wasnt right but the behaviour matched what i expected so i didnt fix 
i guess undefined behaviour yeaahh
as a rule of thumb, think of Box::new(value).to_ptr() as:
T *ptr = mem::malloc(#size(T));
*ptr = value;
return ptr;
its not exactly this because it allocates using the current allocator bla bla bla
but basically a box is just putting the value into heap memory
in fact you can read the source code of it
elle has a merit that it is easy to look into its src code (at least the stdlib)
actually wait
you dont even need to Box the Wawa here
itll be copied later
are you susure
yes
i rtried just sending Wawa and name worked but widht and hegiht were wrong
its a struct it will be copied abiding by the c abi
oh ok
hm
are you boxing it
when i wasnt boxing it
like at the spawn time
wasnt
yayy
*#cast
fix elle syntax NOW
π₯ yes you can
does vscode even have tree sitter
though there's probably an extension that lets you point it to a ts grammar
no, vscode uses textmate grammars
@jade stone saladdd π
@solid gazelle
yayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
ro ieeee
@valid jetty what if you made pointers annoying like C++ so you had to use -> to access
i specifically made it so you dont have to do that
add decorators @valid jetty









