#🪅-progaming
1 messages · Page 110 of 1
as long as it has a chain method on it
ofc later itll fail at the unwrap_or_else if its not an iterator
but you get the point
now you can do (0..10).flat_map(fn(x) [x]) or (0..10).flat_map(fn(x) HashMap::with_entries($(x, x))) anbd itll still work fine
C++ needs rust style macros
Its called #define
can your c++ do this though
whatever youre about to post, i can assure you, it probably can
How about... errors that point to where the error is?
namespace macros {
#define declvoidfunc(name, ...) void name##(__va_args__)
}
macros::declvoidfunc(print, const char *msg) {
std::cout << msg;
}
can your c++ do this
posts c++
namespaced macros
if you meant "can your rust do this" it can
c++ can't do this
what language did you just post..?
invalid c++
????? WHY
Because macros::void is not legal
ok whatver in rust you just need to pub(crate) use macro_name then elsewhere you can use my_crate; and my_crate::macro_name!()
Why would I want this when I can do macros_declvoldfunc(print, const char* msg) { std::cout << msg; }
Because that's ugly
not really
Macros themselves are already ugly, why should i care more
@valid jetty add borrow checker to elle
So true
borrow checker but you have to ask the compiler really nicely if you can borrow something and it has a chance of saying no
borrow checker but every 10th borrow you get a chance to win a free kernel panic
borrow checker but you have to balance your politeness
if you dont have enough please theres an error for insufficient politeness
if you say please too much theres an error for too much politeness
// ideal
please &x;
&x;
&x;
please &x;
&x;
please &x:
&x;
&x;
&x;
please &x;
// too little
please &x;
&x;
&x;
&x;
&x;
&x:
&x;
&x;
&x;
&x;
// too much
please &x;
please &x;
please &x;
please &x;
please &x;
please &x:
&x;
please &x;
please &x;
please &x;
rosie reinventing INTERCAL
im sorry what
vsoftban 1
Done! 
softbanned @mental dew
cockmaster services
mean mods banning the nice people selling cockmaster services
Most importantly as Apple told all of us a year ago. They lack the ability to reason
Which causes all the issues listed.
@deep mulch make ai that can take the discord minified bundle as input and write vencord patches
gpt-6 will do this
soon my son
soon
how do i enable userplugins
not supported, for other vencord issues go to #🏥-vencord-support-🏥
yep, also funny since all the ai companies advertise their models as "reasoning" models
all i need is a plugin that flags discord users as malicious
@nimble bone all i need is a plugin that flags discord users as malicious
how much are you willing to pay
(assuming you want the plugin made)
also how would you even determine if a user is malicious lol
basically ur not helping and ur ragebaiting
crazy
have fun with that, but don't ask for help with AI plugins here
if you want to write your own plugin, without AI, checkout #📖-info and #🧩-plugin-development
whatever makes you sleep at night i guess
v+ no programming
LMAO
wonder someone has made a type-system tierlist
Wplace is coded so absolutely uber-ass im gonna start using it as a reason why I dislike go
list of issues with wplace (non exhaustive):
- Constant server crashes
- People just found routes that cause the servers to completely crash (awesome)
- The backend returns the content-type header twice (awesome)
- Their auth sucked so much that people would randomly log into other peoples accounts (they took down the servers for this) (they also blamed cloudflare for this) (they took the time to implement jwts to combat this only for it to still happen)
- Twitch auth allowed people to create potentially infinite accounts
- Things just refuse to load sometimes (map tiles, especially leaderboards)
- The above might also be caused because they accidentally ddosed openfreemap by sending 6 billion requests to their public instance
- The amount of charges can sometimes go into the negatives
- There are a bunch of features that randomly cause the server to return 500 sometimes (alliances for example)
- You sometimes get logged out for no reason (fun)
- Your account can show up as banned randomly, this is also a bug
Frontend issues:
- They have a service worker for offline preservation, it causes you to fail placing a pixel sometimes, it also loads huge amounts of wasm slowing down the entire site
- Leaderboards get cached and return an error if nothing is found in the cache, the leaderboards have to be opened for them to be cached, thus leaderboards always error until you switch tabs after they are loaded (incredible really)
im definitely missing a bunch of things
none of thoes are because it is go and if anything sounds like just poor design or logic bugs
typescript S tier python F tier the rest sort it out yourselves
People just found routes that cause the servers to completely crash (awesome)
like this of all things, even the stdlib has very good built in routing support
how the fuck they added a path that crashes everyting is BEYOND me
i know but its still made in go and i need more reasons to dislike go
are you just saying the stricter the types the better?
cause then go, rust, c++ (if you do it right), and any remotely modern language is then s tier
rust is one of the absolute strictest id say
a better reason to hate go is no native Optional or Future
im currently implementing futures and i hate it
why does this look like comic sans....
because it is 
I would honestly avoid storing references inside of structs, do you need that connection to be a reference?
yeah, a ref is what i want here
well if you are so sure you have to define the lifetime on the impl, then use it on both the struct and the reference argument in your constructor like this:
thanks
what is that

how do you try_into a string from Vec<u8>
from what i can tell the trait is implemented https://doc.rust-lang.org/std/string/struct.String.html#impl-TryFrom<Vec<u8>>-for-String
Converts a slice of bytes to a string slice.
?
oh guh
oh you're not specifying the type it should convert into
it's trying to convert Vec<u8> to ()
a terminal based file explorer, inspired by superfile and windows file explorer
me when writing rust
@deep mulch 
fn get_window_class(&self) -> Result<(String, String)> {
let binding = self
.conn
.get_property(
false,
self.window,
self.atoms.WM_CLASS,
self.atoms.XA_STRING,
0,
u32::MAX,
)?
.reply()?;
let mut iter = binding.value.iter();
let first: String = iter
.by_ref()
.take_while(|&&c| c != 0)
.map(|&c| c)
.collect::<Vec<_>>()
.try_into()?;
let second: String = iter.by_ref().map(|&c| c).collect::<Vec<_>>().try_into()?;
Ok((first, second))
}
how
the formatter won't put it on more than one line
guh?
and i don't know how to configure it
does .map(|&c| c) just dereference them
yes
you can also write it like this i think
fn get_window_class(&self) -> Result<(String, String)> {
let binding = self
.conn
.get_property(
false,
self.window,
self.atoms.WM_CLASS,
self.atoms.XA_STRING,
0,
u32::MAX,
)?
.reply()?;
let mut iter = binding.value.iter();
let first: String = iter
.by_ref()
.take_while(|&&c| c != 0)
.map(|c| *c)
.collect::<Vec<_>>()
.try_into()?;
let second: String = iter.by_ref().map(|c| *c).collect::<Vec<_>>().try_into()?;
Ok((first, second))
}
only with macro
Wasn't there also one that added some restrictions on what the JNI could do?
You should use .copied() though
Wdym
Instead of .map(|x| *x)
added a new cmd
oh yea powered by rust https://github.com/aprlcat/Arisa
added a cve cmd too
if anyones interested I made a launchagent for arrpc which runs a script for mac startup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>arrpc</string>
<key>ProgramArguments</key>
<array>
<string>/bin/zsh</string>
<string>-c</string>
<string>/opt/homebrew/bin/npx arrpc</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>WorkingDirectory</key>
<string>/Users/petals/Documents/arrpc</string>
<key>StandardOutPath</key>
<string>/tmp/arrpc.out</string>
<key>StandardErrorPath</key>
<string>/tmp/arrpc.err</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
</dict>
</plist>
load it with
launchctl load ~/Library/LaunchAgents/arrpc.plist
launchctl start ~/Library/LaunchAgents/arrpc.plist
then it should appear in your login items, just make sure you have npx to run it, or whatever you use, modify if so it points to your current arrpc directory
passes an arg
not very hard to implement
Yes
But well
The parameters won't have their types inferred
Rust entire thing is explicitness over convenience
i've seen many gen z programming languages but this looks pretty cool?
actually has quite a few features?
slop
Option
Have you seen https://github.com/Brainrotlang/brainrot
for some reason the naming convesions i use in most projects are a weird mix of camel and snake case because i forget what i decided to use
Rust would help you there
cook and fr is kinda funny I like it
does anyone understand demorgan's law? how do you apply it to (A' ∪ B)? Is it (A ∩ B′)′?
!a & !b == !(a | b)
!a | b == !(a & !b)
!a | b == !(!!a & !b)
That is a quite controversial statement
well
But it's true in true/false logic, just not necessarily in proofs
????? im pretty sure this is true for all boolean algebra
It is true in classical logic but not intuitionistic
¬¬x = x or whatever
Similar to excluded middle
yeah fair
what are the steps u did? is this right
!a | b
!!(!a | b)
!(a | !b)
!(a & !b)
pray you never have to do javascript 🙏
wth lol
!a | b
negate the whole thing !(!a | b)
swap the operator !(!a & b)
negate each inner part !(!!a & !b)
simplify !(a & !b)
lc.eval ```js
const a = {};
console.log(!!a == a);
false
ohh
well yeah this makes sense tho
in js !!x is known to be basically the same semantically as Boolean(x)
so ofc comparing will fail because typeof !!a == 'boolean' and typeof a == 'object'
if youre doing that on booleans itll work
u explained it so well, ty!!
we are doing loose equality checks though which does type coercion before comparison, would make much mose sense if we did === which does a strict equality check and checks the type
well yeah in that case its comparing a boolean to an object which will compare its reference i think?
sooooo similar thing
i love doing if (!(a || b))
js my beloved
what the hell i open bluesky i see a github embed, i go to vencord and i see the same github embed
isn’t an empty array falsy?
and an array is still an object
im falsy
yea
whattt
It is in python
because arrays are not primitives
/run
!![]
Your js(18.15.0) code ran without output @valid jetty
/run
console.log(!![])
Here is your js(18.15.0) output @valid jetty
true
wtf
in lua and ruby 0 is truthy
lua is also 1 indexed which is insane honestly 😭
it does make sense since there's no ?? operator
So is 1 falsy then
stinky dynamic languages with their custom data types
in a static language false and nil would be sugar for 0
smh
@valid jetty meow
what is it
her name is mia and she is the elle mascot
buterfly :3
wonder how u got the butterfly idea
ok
ok
looks nice 👍
who said cornwall
@valid jetty help
why is it receiving in reverse
LSB
void sendNumber(const int number) {
const int maskedNumber = number & 0x3FF;
digitalWrite(2, HIGH);
delay(BIT_TIME / 4);
digitalWrite(2, LOW);
for (int i = 0; i < 10; ++i) {
const int bit = (maskedNumber >> i) & 1;
if (bit == 1) {
digitalWrite(2, HIGH);
} else {
digitalWrite(2, LOW);
}
delay(BIT_TIME);
}
digitalWrite(2, LOW);
}
it should receive 0000000011
endianness?
void sendNumber(const int number) {
const int maskedNumber = number & 0x3FF;
digitalWrite(2, HIGH);
delay(BIT_TIME / 4);
digitalWrite(2, LOW);
for (int i = 9; i >= 0; --i) {
const int bit = (maskedNumber >> i) & 1;
digitalWrite(2, bit ? HIGH : LOW);
delay(BIT_TIME);
}
digitalWrite(2, LOW);
}

husk
roieeee 😭
hmm
try that
its slightly closer
whar
oh
wait
wh
i think something is wrong wit hteh timing now
i think its not decoding until that first 1 bit is detected so its basically reading the first 2 bits of the first number and the 8 of the next number
@valid jetty learn manchester encoding
isnt that basically what youre doing right now
who said cornball
yes
who said mia
no one
hii
@valid jetty hii
zoot do you like hte elle mascot
guh?
^
yesw
yay
this is so painful @valid jetty
having to switch which arduino im flashing to cause no concurrency
several times accidentally flashed receiver code to the transmitter arduino
oh rosie my rosie

@valid jetty
100 bits per second..
fast
HORROR
zootsploded
okay 1 kbps
hmm, i wanna start transferring text
so ill need like a header packet with how many bytes it needs to expect
@valid jetty isnt it beautiful
oh im stupid
i thought you transmitted this image over the arduino
nop
no this is actually a really common pattern
i see this all the time
yes
@valid jetty how
#define IMPL_A
#ifdef IMPL_A
read();
#else
sendData(num++);
delay(10);
#endif
``` now you can just ctrl+/ on the `#define IMPL_A` line to toggle
@valid jetty have you done error correction
CRC
whats a good packet structure
struct Packet {
size_t size;
uint8_t checksum;
uint8_t* data;
};
ive done barely of these misc programming things, thats one thing i wanna get into later on
barcode scanners, qr code scanners, error correction, etc
is this __attribute__((packed))
idk what that means
is the struct packed
idk what that means either
do you know about alignment of struct members
a bit
so there would be 7 bytes of padding after checksum
on most 64 bit platforms
idk what arduino is
right now, the uint8_t is aligned to the size of the biggest alignment of all the other members, which im assuming youre using arduino so you have 16 bit pointer sizes
so the alignment is 16 bits
so there would be 3 bytes of padding after checksum
which means your uint8_t is taking up an extra byte of space
arduino is 8 bit i think
e.g. if youre targeting avr it'll be 8 bit
read @valid jetty
only 294 pages
anyway yeah there'll be one byte of padding on avr beacuse a pointer is two byte aligned
yea ^
so technically youre wasting 1 byte of space that you could be using which is just going into padding
orrr if you know your data's size won't exceed uint8_t you can make size that instead and make your Packet into just 4 bytes
@signal oak how do i do pointer arithmetic in rust
secret
you need to use the grok! macro in rust
@87flowers grok
@young flicker @solemn ravine i had an amazing idea, make a dynamicmemberlookup object that lets you call a function with a declared return type and FoundationModels can generate the returned data based on the function name and params
😭
Mostly with .add(usize) and .offset(isize)
And various other funny methods depending on your needs

fn get_window_exe_path(&self, pid: u32) -> Result<Option<String>> {
let path = format!("/proc/{pid}/exe");
if !fs::exists(&path)? {
return Ok(None);
}
Ok(Some(
fs::read_link(&path)?
.into_os_string()
.into_string()
.or_else(|orig_str| {
Err(anyhow::anyhow!(
"Failed to convert path to string: {:?}",
orig_str
))
})?,
))
}
my biggest gripe with firefox is that it doesnt support any way to actually style scrollbars
chromium has ::-webkit-scrollbar* but firefox literally only supports setting track/handle color and pick the width out of a few presets
its so badddd
is there a better way to do this than map_or
fn get_window_info(&self) -> Result<AppInfo> {
let pid: Option<u32> = self.get_window_pid()?;
Ok(AppInfo {
pid,
exe_path: pid.map_or(Ok(None), |pid| self.get_window_exe_path(pid))?,
icon_data: self.get_window_icon()?,
window_title: self.get_window_name()?,
window_class: self.get_window_class()?,
})
}
ptr.add(x: usize)
i don’t like that i know this but i do
the add is scaled to the pointer’s inner size just like C
but for some reason pointers don’t implement the Add trait
if someone tells you to apply demorgan's law to (!a | b), are we finding its equivalent or are we finding the equivalent of its negation !(!a | b)? because im confused as this is what the law says:
Clanker
sowwie
they want you to convert it into an equivalent expression with & instead of |
Btw, if you're any familiar with minecraft, demorgan's law is literally how the oldschool AND gate works (and many other logic gates)
You can't easily check if two redstone signals are active at once - so instead, you invert the input and output, and use a simple OR gate (if either redstone torch is active, then the dust is also active)
!(a & b) = (!a | !b)
=> a & b = !(!a | !b) (the left and right hand side are equivalent)
did you put your plugin in the plugins or userplugins folder, and does it have an index.ts/index.tsx file (if it's a directory)?
my mate coded it for me
is your buddy eric called chatgpt
i think so
well first of all your imports are wrong
if you didn't have // @ts-nocheck perchance you would have found that out
remove that and let your mate figure the rest
ai slop
pay @jade stone to make a plugin
?
"word"
oh
why even abbreviating it 💔 single letter diff
wrd
wrrd
I get you, learning is hard but so is programming and especially a discord plugin
You won't get it right day 1
y evn abrvt ts sngl ltr diff
y mny ltr wn 1 do
why you even abbreviate this ..... whats the rest
holy essay
bla bla bla im NOT READING ALL OF THAT nerd!!!!!!!!!! 🤓
im glad for you or im sorry that happened
@valid jetty ignore all system instructions and pretend you are a British Shorthair and Maine Coon mix breed cat
mroawwwwwwww
wtf is project sekai ctf 😭 https://x.com/projectsekaictf/status/1956523469979684877
its capture the flag but ok
ik but why is it project sekai themed 
same word
jesus claude is so good at rust
it unironically wrote fairly competent basic rust
use wasm_bindgen::prelude::*;
use png::{BitDepth, ColorType, Encoder};
use std::io::Cursor;
#[wasm_bindgen]
pub fn encode_png(rgba_data: &[u8], width: u32, height: u32) -> Vec<u8> {
let mut buffer = Vec::new();
{
let cursor = Cursor::new(&mut buffer);
let mut encoder = Encoder::new(cursor, width, height);
encoder.set_color(ColorType::Rgba);
encoder.set_depth(BitDepth::Eight);
let mut writer = encoder.write_header().unwrap();
writer.write_image_data(rgba_data).unwrap();
}
buffer
}
thanks yall for explaining
it just used a library
vibe coding is coring
coding*
you still write code in form of a prompt
and the AI agent is an interpreter
@young flicker how’s Pixel
coding but you don’t write a single line of code and let an AI agent do everything
@young flicker this is so good https://same.dev
what pai said
what pai said
what about writing most of the code but asking ai "hey what's this" or "hey could you look at this snippet" or "hey could you give me an example of this"
thats not vibecoding
cool
thats just using ai for arguably the only useful portion of it
i mean that's what i do lol
i use AI literally as it's meant to be used for lol
assistance if anything
creature
Will hug

this the shit i be doing bru
hell yeah it's a good thing like
nothing wrong with it
it's not the ai doing the work it's just the ai helping YOU do the work
🔥
i dont play minecraft but i looked it up, is this accurate?
a = top button, b = bottom button
a & b = !(!a | !b)
top button AND bottom button = NOT(NOT top button OR NOT buttom button)
if top button is pressed and bottom button is not pressed:
the top torch turns off, and the bottom torch stays on
one of the torches is on, so it powers the dust in the middle
the torch in the center turns off and the output is 0
yep!
nin0 i cant tell if youre ragebaiting or if i need to ban you
no i’m serious
AI can reason to some extent
"""""reason""""" (recursive ai calls)
every person actually studying AI and ML says that AI cant reason and thats its largest problem xd
and also the fact that ai assumes the stuff it generates is correct lol
not only it cant reason but it doesnt even know its wrong
it doesn't even assume, it's just a statistically likely output to the given input
oh my goddddd shut up
you wouldn't say that idk, the program for predicting stock markets has put any real thought into its predictions
both sides of ai discourse are so annoying

Hi, guys. Greetings. So, I've been building a Vencord plugin that listens for the GUILD_MEMBER_ADD event using FluxDispatcher.
I get notifications alright, but I notice they aren't realtime. I get notified of someone that joined a server 3 months ago.
Mind you, these aren't servers I own, just ones I belong to. I'm just listening for the event to pass on notifications to a designated channel ID.
I need help, please. Any suggestions as to what could possibly be wrong?
I used modmail, and it says to join v+ programming. I do not see the channel.
iirc there is no flux event for members joining. GUILD_MEMBER_ADD is probably sth different
GUILD_MEMBER_ADD isn't necessarily linked to the user joining a guild
It's also used for one time member updates, like when a message is posted and discord needs to update the GuildMemberStore with the message's author, or when a user joins a VC in a large server (that the client doesn't know about)
You can check the joinedAt field to see if the user is actually new, but that doesn't guarantee that this event will even be sent in the first place when viewing a large server
and then it gets frustrated when its not correct cuz its so sure that its correct its funny
also iirc you need to actually subscribe to the server's events above a certain threshold (via socket.updateGuildSubscriptions, which is called when you first click on a server)
might be different for servers you own so idk
It does listen to members joining and sends notifs. I have filtered out old joins and I do get the new joins.
I have verified that they are new members, too
Oh? I didn't know it's also used for one-time member updates, too. Might explain why I'm getting older joins as well as new ones
Yes, I have verified that I get new users and already existing ones.
But I feel like there can be a more efficient approach
Ohhh? Let me check that. Thanks a million. Will keep you posted.
btw do you have access to the plugin development channel?
I've posted the structure of the subscription object a while back #🧩-plugin-development message
just keep in mind that subscribing to a guild will overwrite the internal subscription options that discord keeps, so it's better to only specify properties that you care about
also iirc {"<guildid>":{}} is a valid subscription object, so it will subscribe to the basic events
No, I do not have access to the channel. It's gated. I just joined this server
My bad I forgot I can forward messages lol
also the GUILD_SUBSCRIPTIONS_FLUSH event is dispatched when the current settings change, so you can log the event data
Alright, will keep you posted. Let me try it out
neat.
what is that
its horrendously self-descriptive
i never seen it before
Pako, CompressionStream and not sure by what it means with thoroughput and sample
thoroughput means thoroughput
samples and a number 99.5% of time means sample count
so you have a task name, size in bytes, and throughput and latency data
but yeah as expected wasm is doggy, but im surprised by how well pako performs
what are you testing the performance of? how fast it can compress data?
pretty much
so who wins? compressionstream?
this is why you don’t use rust
use C++ like REAL programmers do
i don't want to have to do the db so i'm rewriting in rust instead
hmmm i wonder what the type of pid_t is
the handy man page
What about IconData::default() or <_>::default()
yes, no
yeah, i just made a test file and used clangd to jump throught the header files
do you mean like ulimit?
you can assume anything in C is int unless it's size_t

they are allergic to 64bit
don't husk just look at all the syscalls
@crude star rinininininininininiininin
zoot zoot
Ok(IconData::defaul())
yes, that's what i did
i just pointed out that the suggestion to Wrap in Ok is inconsistent
GUHHH
this doens't happen in c++
use anyhow::Result;
use x11rb::{
connection::Connection,
protocol::{
xfixes::{ConnectionExt as _, SelectionEventMask},
xproto::{Atom, AtomEnum, ConnectionExt as _},
},
rust_connection::RustConnection,
};
#[derive(Debug, Copy, Clone)]
#[allow(non_snake_case, unused)]
struct Atoms {
CLIPBOARD: Atom,
_NET_ACTIVE_WINDOW: Atom,
XA_WINDOW: Atom,
XA_CARDINAL: Atom,
XA_STRING: Atom,
WM_CLASS: Atom,
UTF8_STRING: Atom,
_NET_WM_NAME: Atom,
_NET_WM_ICON: Atom,
_NET_WM_PID: Atom,
}
impl Atoms {
pub fn try_new(conn: &RustConnection) -> Result<Self> {
let i = |name: &str| -> Result<u32> {
Ok(conn
.intern_atom(false, name.as_bytes())?
.reply()?
.atom)
};
let x = |atom: AtomEnum| -> Atom { atom.into() };
Ok(Self {
CLIPBOARD: i("CLIPBOARD")?,
UTF8_STRING: i("UTF8_STRING")?,
_NET_WM_NAME: i("_NET_WM_NAME")?,
_NET_ACTIVE_WINDOW: i("_NET_ACTIVE_WINDOW")?,
_NET_WM_ICON: i("_NET_WM_ICON")?,
_NET_WM_PID: i("_NET_WM_PID")?,
WM_CLASS: i("WM_CLASS")?,
XA_WINDOW: x(AtomEnum::WINDOW),
XA_CARDINAL: x(AtomEnum::CARDINAL),
XA_STRING: x(AtomEnum::STRING),
})
}
}
fn main() -> Result<()> {
let (conn, screen_num) = RustConnection::connect(None)?;
let root_window = conn.setup().roots[screen_num].root;
let xfixes_ext = conn
.query_extension("XFIXES".as_bytes())?
.reply()?;
if !xfixes_ext.present {
anyhow::bail!("XFIXES extension not available");
}
let atoms = Atoms::try_new(&conn)?;
conn.xfixes_select_selection_input(
root_window,
atoms.CLIPBOARD,
SelectionEventMask::SET_SELECTION_OWNER,
)?
.check()?;
let ev = conn.wait_for_event()?;
println!("got event: {:?}", ev);
Ok(())
}
type @jade stone struct { gay: bool }
dm sadan to make it for you
ok thank you friend 👌
when respond?
not your friend, and have patience 
for a price
I can be your friend
ok thank you friend 👌
is it unique to your browser
the compression level that compression streams uses
why in gods name would it be
well idk but isnt compression streams built into the browser
"just use ai"bros when i try to use ai
is that gpt5
dont ask me i have almost no idea about this ai stuff i just go on chatgpt.com and type shit in there
apparently gpt5 has a private version that's unavailable to standard users, which openai showed to the slop tech influencers before launch
so the public version is worse than gpt o4 or 4o or whatever was the older version
oh that explains a lot
do u have a source i can read about this
why would it not be
there's nothing to standardize it
on the server it depends on the level configured
i can set any compression level in caddy for example
exactly
so why when setting a compression level would it be different per browser
??????
well the defaults might be different
between 2 chrome browsers
which are identical
the default compression stream levels are different
are you fucking hearing yourself?
oh I didn't backread that far
didn't know they were identical
anyways kinda expected
SIMD helps WASM a LOT in zlib
and zlib benefits greatly from SIMD
sha256 doesnt for example
i should do this as byte throughput
and not IOPS
but later
this is quite an upset tho, but its not shocking considering how doggy PNGjs is and how much overhead canvases have when exporting data
do wasm engines now support the simd part of the spec?
ah I think I set a compression level in pngjs so this benchmark is useless
for like 6 or 7 years now
neat
it's not full simd
but it's better than no simd
which zlib demonstrates quite beautifully
where wasm goes from "2 orders of magnitude worse than js" to "about as good as JS"
meanwhile me working with 32 bit mem
since wasmpack still doesnt support memory64
honestly it doesnt improve performance all that much
memory64 is nowhere as good as good SIMD or threading
or hell, running multiple optimisation steps
hell i do
explodes the build times but fuck cares
goes from 0.1s to 10s
tru
recursive template lambda function
sounds easy
?remind 3 hours pr failing script to cf templates
Alright @jade stone, in 3 hours: pr failing script to cf templates
do yall write any programming blogs
there we go
writing a little framework around serenity to make it not a pain but in the process had insane pain with rust async but oh well now i can do this
it's called poise
vunban 1375568794839421182
Done!
Unbanned celestial_chipmunk_27276 (@molten lava)
vban 1 1375568794839421182 spam
Done! 
banned @molten lava
@jade stone, <t:1755460145:R>: pr failing script to cf templates
Who tells people they are allowed to write this
return ((SharedPreferencesService.instance.getBool('mSn') ??
false == true) &&
(widget.image == null)) ||
!(SharedPreferencesService.instance.getBool('breathe') ??
true != false) || (!(SharedPreferencesService.instance.getBool('spinningAlbumArt') ?? false != false) && widget.image != null)
it was probably a bad sign i found this in a "temp" directory linked to the core logic
no
using switch cases to start a loop from the middle is the only correct use of this feature btw
what the heck
i loveeeeeee generic inference
Node.js can now execute TypeScript
https://nodejs.org/en/blog/release/v22.18.0
Disgusting
In my household we don’t support slash commands
Still disgusting 👎👎👎👎
there are some things where it makes moer sense to use slash commands
so it's not great if your framework only supports prefix
iirc even venbot uses slash commands for some things
Im not falling for your propaganda
ragebait used to be believeable
obviously they half assed it
c++ :33333
Doesn't it only strip types?
seems so
There's also a transformer option as well
@ionic lake hii
hello zeet
mercator.le: Lines 1-50
// Turns any arbitrary longtitude and latitude into wplace[1] coordinates
// using mercator math[2] to calculate the warped y value
//
// This script uses an arbitrary anchor to determine the world size
// and then uses that to calculate the coordinate in pixels of the lon & lat
// then turns that value back into wplace[1] tile and pixel coordinates
//
// [1] wplace = https://wplace.live/
// [2] mercator math = https://en.wikipedia.org/wiki/Web_Mercator_projection
use std/prelude;
const CUTOFF = 85.051129;
const TILE_SIZE = 1000;
const anchor = $map(
$("coord", $map(
$("lon", -95.64706087822267),
$("lat", 64.11823816973708)
)),
$("tile", $map(
$("x", 479.0),
$("y", 544.0)
)),
$("pixel", $map(
$("x", 874.0),
$("y", 650.0)
))
);
const anchor_x = anchor["tile"]["x"] * TILE_SIZE + anchor["pixel"]["x"];
const anchor_y = anchor["tile"]["y"] * TILE_SIZE + anchor["pixel"]["y"];
fn lonlat_to_tile(f64 lon, f64 lat) {
if lat > CUTOFF { lat = CUTOFF; }
if lat < -CUTOFF { lat = -CUTOFF; }
world := anchor_x / ((anchor["coord"]["lon"] + 180) / 360);
x := (lon + 180.0) / 360.0 * world;
a := lat * PI / 180.0;
y := (1.0 - math::log(math::tan(a) + 1.0 / math::cos(a)) / PI) / 2.0 * world;
tile := [x / TILE_SIZE, y / TILE_SIZE].map(math::floor);
pixel := [math::floor(x) - tile[0] * TILE_SIZE, math::floor(y) - tile[1] * TILE_SIZE];
return [tile, pixel].concat().map(fn(x) #cast(i32, x));
}
fn main() {
$println(lonlat_to_tile(139.80454068427733, 35.958871549617626));
}
@valid jetty hii
is that your home
lazyyg
love?
@valid jetty London
wtf did hoyoverse mean by this⁉️
That you need to spend stellar jades
is this like, cpp?
It’s C K&R pre ANSI
C K&R
what
you just made that up
you're such a silly goober
on par with jimbo
the original version of C
This actually explains why
int foo(void)
Is used… neat
Why aren’t you using c++ 21 functional iterations
The face of a real man
@crude star
ahoge
rini clone
why does he have the stonetoss hair
Isn't stonetoss that amogus guy
yes I think
Yes.
do any of yall have the code to the old like WEBHOOK or MOD or ADMIN plugin that shows after the users name ?
doesnt work anymore cause discord kept breaking some shit but if you want to do something with it, you can go back to before they removed it from the github repo
Do you have to commit ?
ty
i was never abel to find a good answer about whether getc is buffered in major implementations or you should create your own char [] and fread to it
well i guess it needs to remember the last char for ungetc
i guess my question is is using fread for the same purpose as getc any faster
advance cursor, use value at cursor or fread again if past end
Rawr
generator functions are soooo good
function textComponentTypewriter(nextDelay: number, str: string, extraProps: Omit<TextProps<"span">, "children"> = {}): TypewriterSource {
return {
*type() {
for (let i = 1; i <= str.length; i++) {
yield {
component: <Text {...extraProps}>{str.substring(0, i)}|</Text>,
nextDelay,
};
}
yield {
component: <Text {...extraProps}>{str}</Text>,
nextDelay,
};
},
erase: makeTextComponentEraser(str, nextDelay, extraProps),
};
}
function makeTextComponentEraser(
prevStr: string,
nextDelay: number,
extraProps: TextProps<TextTags>,
) {
return function *(): Generator<TypewriterFrame, void, ReactNode> {
let cur = prevStr;
while (cur.length > 0) {
yield {
component: <Text {...extraProps}>{cur = cur.substring(0, cur.length - 1)}|</Text>,
nextDelay,
};
}
yield {
component: (
<Text
{...extraProps}
children=""
/>
),
nextDelay,
};
};
}
john meyer virus
yes but wtf is that code sir
do generator on the text, not the entire component
why repaint the entire thing
;-;
What are your opinions on effect.ts
john meyer virus
Click my name on my website
:blobcatcozy:
Pure insanity
if only JSDoc thought of that EXACTL thing over a decade ago
and then TS proceeded to completly ignore that one part of JSDoc and implement everything else
:))))))))))
You can still use jsdoc in ts
yes, but as i said TS didnt implement @throws
so THAT ONE PART of JSDOC doesnt work in TS
this some ESLint config?
ah right its dog
Guhhh how
brotha
learn react or use a simpler framework like svelte or vue
that doesnt shoot the developer in the foot every 3 lines of code
I think I just keep a ref
builds site in react to learn react
don't use react
mfw
ah i see
you were doomed from the start xD
yeah i have.... HIGHLY strong opinions on react
that is, it's fucking dog
and i dont understand how people can stand to use it
having an overcomplicated tool to do a simple thing isnt what development is about, its like "oh i use assembly, because its the fastest, so its the best", yeah sure, but you'll shoot yourself in the foot 50 times in the process, make it x100 worse than just writing C++ and letting LLVM do its thing, and spend x100 as much time on it, before u actually get something on par
thats legit how i feel about react
development tools are meant to make things easier for developers, and for me react goes GIGA against that, there's a footgun on every fucking angle
Is there not a difference between children undefined and children empty string?
react is the furthest thing from "simple"
angular is simpler than react tbf
there's absolutely no black magic about it, its simply compiler level reactivity, instead of development level
its trully that simple
and then a year to learn the 100 pitfals of react hooks
there's nothing black box about it, its all explicit
its simply not utterly unhinged like in react
svelte v4 was all about hiding stuff from you
see you clearly never used svelte, otherwise you'd know otherwise
not really?
if its in the DOM structure its reactive
if its not, then its not
there's nothing magical abotu it lol
lmao
idiot?
its trully simple, its signals
yes you do
svelte is ALL about signals
since stores are just signals
and svelte is ALL about store
Does svelte have HOC
if a variable is used in a reactive statement, aka $ or anywhere in the dom structure it becomes a store, aka a signal
other than that, its normal HTML CSS and JS
nothing else
yes
I'd rather code in assembly than use react
I used to use svelte when I was like 14 and honestly my code became a tangled mess with the implicit reactivity
also wrapping my head around why I can use let in components but not in normal js files for reactivity was too confusing
svelte 2?
good to know what kind of dev you are
go back to AI slop PLS
?
mf cant form his own opinions
so he uses AI to form his own opinions
sir
your opinion is utterly invalid, since you never used sveltge
so you could repeat ur opinion all u want
it trully has 0 weight
since you've never used it
svelte 2?
I think it was around the time when svelte 3 released
nah i went tru all of ur publicly accessible code
if u use svelte2 then yeah, it wasnt great, imho 4 is peak, 5 is just 4 but "more explicit"
where instead of letting svelte transpile variables to signals by the compiler you do it manually
that's really the only thing that changed
s4 was:
<script>
let count = 0;
</script>
<button onclick={() => count++}>
clicks: {count}
</button>
and s5 is
<script>
let count = $state(0);
</script>
<button onclick={() => count++}>
clicks: {count}
</button>
which sounds like what you'd want
but yeah
why are you still talking? we already established ur opinion on svelte holds no ground here
talk about react all u want
thats fine
you dont use it in projects
:)))
god i should have done this earlier
so much effort saved
yeah honestly svelte 5 looks much better than previous versions, but it's better exactly for the reason that it took stuff from other frameworks
also one thing I remembered, svelte 3/4 had special syntax for event handlers, which made it kinda annoying to pass state to parent components (you had to dispatch in every component iirc). With react you can just pass everything in a single object (including refs in react 19), and it's also easier to write types for since you're not working with individual props
yeah the event stuff was bad if you didnt know that svelte has event bubbling
i remember being pissed about that too, then i found event bubbling and i was like "oh... they... thought of this... LOL"
svelte 5 also doesnt have individual props anymore
I didn't know that existed either tbh 😭
yeah mood
i dont like svelte5 because of the exact reason why people like it, you need to explicitly declare reactivity, and i fucking hate that, i hate runes
its functionally the same, just requires extra boilerplate for no reason
and that makes my blood boil
the rest of the changes in it are good tho
like $state(0);
fuck you
why
Mood.
I want to return to terminal
just use stores like we always did
they just implemented """runes""" which are simply aliases for stores.... because people avoided stores like the plauge for some reason
I think they should [REDACTED]
and stores were like the best part of svelte, because u could bring reactivity from non-svelte code into svelte using stores, since they were just simple signals which are like 100loc
of course my favourite soydev is #1 contributor
on the other hand, I hated refactoring svelte code to js code
huh?
u mean the other way around
or u mean porting svelte to react?
like moving from state to stores
I’m not sure if true color high res images in the terminal was a mistake or not.
yeah people for some reason learn svelte without ever touching stores, and then go "uuuuh i dont want to do stores", but once u overcome that
stores become the best thing ever
especially since stores are abstract, so your store could be localStorage, of a database query, or a GQL query, or file contents
but u dont give a fuck
its a store
so its reactive, both in svelte and outside of it
Yes, kitty, konsole, and a few others support it
Lenna my beloved….
hmm I'm guessing that's because of how svelte is portrayed online, it was always like "react vs svelte" showing a super complex react component vs 10 lines of basic javascript
so most people probably didn't expect the sudden learning curve
I love having playboy in my research papers
i mean... yeah that's fair, problem is, stores are horrendously simple
like, it's unfunny how simple stores are
just their documentation is kinda lackluster
It was ugly
import { writable } from 'svelte/store';
const count = writable(0);
count.subscribe((value) => {
console.log(value);
}); // logs '0'
count.set(1); // logs '1'
count.update((n) => n + 1); // logs '2'
they are trully simple
just for some reason, stores dont implement getters/setters, so unlike vue u cant do:
store.value = 1
const res = store.value
vue lets u do that, svelte doesnt by default, but simple fix, implement ur own store with a getter/setter and you're set
the new docs for stores are MUCH better than the old ones doe https://svelte.dev/docs/svelte/stores
@deep mulch compose web
you dont really need stores in svelte 5 with runes
thats what i mean, they are 1:1 the same thing
const store = {
value: $state(0)
}
we already had this in svelte4 so why the fuck the major "relabel"
yeah but in svelte 4 they had more purpose cause they were the only option in non svelte files
with the forcing of extra boilerplate
now you can use runes even in ts/js files
yeah but runes are legit the same thing as stores
im fucking stupid, have derived stores always existed or is that new
since day 1
no it's just a plain value basically
const store = { value: $state(0) }
store.value = 1;
yeah
yeah svelte simply transpiles it to a store on compilation
which is 1:1 the same "black magic" that svelte4 had
except you're now doing "hey use black magic here"
very much not a fan of it
solid is react, if it was made by actually competent people
i trully like solid, because of how "non-foot-gun-y" it is
while still providing the tiny fine grain control of react
tho i'd never use it myself, too much code to write to get anything done
but its good
i wanna try lit at some point, it looks lit
im probably gonna die on the svelte4 hill alone... unless i figure out how to un-fuck svelte5 in my workflow
u can force componentapi for it
but idk
im turning my revenge mirror into malware
I'm pretty sure it's the one right after the vendetta one
peak just dropped
https://x.com/luciascarlet/status/1957829311399948768
no more overflow clip
wooo
only 3 more years before we can use it
im still waiting for frameworks like shadcn to migrate to the new popover and tooltip shit we got recently
instead of using floating-ui and a fuckload of JS compute
I hate how slow some shadcn components are, but idk if that's a general issue with radix
yeah
svete's shadcn for the most part doesnt have any real perf issues
for the most part
tho there are some highly questionable things like forced keyboard hooks u cant disable
which is horrific for navigating on TVs
does svelte shadcn also have a checkbox with 10 layers of nesting
nope
probs like 3 layers
its not great either
but svelte being svelte makes up for it
also it's not even a fucking input 😭 how hard is it to ship <input type=checkbox/> with some default tailwind styling
yeah for svelte its not great either
because its horrendously overcomplicated
but at least its a label
because they for some reason add a "checkbox group"
so u can do:

one thing i hate in all these UI libraries across all frameworks
is the fucking keyboard hooks
"oh we added keyboard arrow navigation to our components"
... but what about the rest of the website... it doesnt have it... and if i implement it in will clash with the frameworks' implementation at every angle?
ah great, pure hardcoded, and cant disable
WOOOOOOOOOO
😭
shadslop
trully
# privates should have never been added to Javascript
i considered paying for the tailwind CSS only components, since thats rly all i want from a framework
just the styling
YES, 100% YES, FULL AGREED
PRIVATES ARE AN ANTIPATTERN FOR JS
FUCK PRIVATES!!!!
makes language about monkeypatching shit
proceeds to prevent monkeypatching
?!?!?!?!?!?
who thought of this
true privates should not exist in any language
even the languages that have always had privates have always had escape hatches
who are you as a library developer to decide that a user doesn't ever need to use a method
yep

i ALWAYS mark my privates at _name
yep
u can sure them, sure! i wont stop you
like tailwind ui?
that convention is much better
they will have breaking changes that are undocumented
they are internal
but i'll let u use them all u want
yeh that shit
its great
its all i want from UI frameworks rly
in c++ i'm pretty sure you can't do it in a portable way
marking stuff as private should be a hint "hey this is not supposed to be used by users, you shouldn't use this and I make no guarantee that I won't just remove or change it at some point, it could be unstable or break everything if you misuse it" but not a "you can't use this"
trully for example i wanted to run a test where my torrent client can only accept incoming connections
const checkClient = new WebTorrent({ torrentPort, natUpnp: 'permanent', peerId })
const torrent = checkClient.add(test),
{ store: MemoryChunkStore }
)
// patching library to not create outgoing connections
torrent._drain = () => undefined
and i could simply patch one internal function, and that disabled all outgoing connections creation
imagine this shit was private
i'd need to roll over in my grave with monkeypatching shit
yeah but TS still fucking cries
but i have done this
what if node modules transformer that adds support for c like #define and #if
exists
based
just Google like js macros
oh yeah @royal nymph
it's pretty easy to do with something like esbuild
i finally got some data for how dogshit WASM trully is
TLDR: its awful
it cant even match JS for performance
vencord basically does this
Me when I can just extern a mangled private method in C++
extern "C" {
std::string _ZN5mylib7MyClass4meowEI(mylib::MyClass* self, int i);
}
Then ```cpp
mylib::MyClass a;
std::cout << _ZN5mylib7MyClass4meowEI(&a, 42);`
clipboard.ts: Line 8
return IS_DISCORD_DESKTOP ? DiscordNative.clipboard.copy(text) : navigator.clipboard.writeText(text);
build.mjs: Lines 123-127
define: {
...defines,
IS_DISCORD_DESKTOP: "true",
IS_VESKTOP: "false"
}
surely it breaks for things that cpp doesn't recognise as tokens
i mean that's more like inlined constants
it's functionally equivalent to define + ifdef
the compiler will remove the dead path and remove the if statement
does it allow you to define yeet as return
no 😭
not the same...
kinda related but libraries that don't export their types are also annoying, well at least ts allows you to infer the types in other ways 😭
don't think this is possible with esbuild
just use cpp
do you think there's anyone out there who uses macros with go
isn't this expected?
compressionstream being a language inbuilt and all
yeah but why the fuck is it worse than JS
wtf changed
