#🪅-progaming

1 messages · Page 110 of 1

valid jetty
#

instead now the type of x.__iter__ can be anything you like

#

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

jade stone
#

C++ needs rust style macros

shrewd canopy
winged mantle
#

can your c++ do this though

valid jetty
#

whatever youre about to post, i can assure you, it probably can

fleet cedar
winged mantle
#
namespace macros {
#define declvoidfunc(name, ...) void name##(__va_args__)
}

macros::declvoidfunc(print, const char *msg) {
    std::cout << msg;
}
valid jetty
#

can your c++ do this
posts c++

winged mantle
#

namespaced macros

valid jetty
#

if you meant "can your rust do this" it can

winged mantle
#

c++ can't do this

valid jetty
#

what language did you just post..?

winged mantle
#

invalid c++

valid jetty
#

????? WHY

fleet cedar
#

Because macros::void is not legal

valid jetty
#

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!()

shrewd canopy
fleet cedar
#

Because that's ugly

winged mantle
#

not really

shrewd canopy
#

Macros themselves are already ugly, why should i care more

winged mantle
#

yeah

#

it's just unc++ like to do namespaces like that

#

and macros are often ugly

deep mulch
#

@valid jetty add borrow checker to elle

lavish frigate
dense sand
#

So true

frosty obsidian
#

borrow checker but you have to ask the compiler really nicely if you can borrow something and it has a chance of saying no

tired vigil
#

borrow checker but every 10th borrow you get a chance to win a free kernel panic

valid jetty
#

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;
crude star
#

rosie reinventing INTERCAL

abstract fulcrum
#

im sorry what

crude star
#

vsoftban 1

elder yarrowBOT
lavish frigate
crude star
#

cockmaster services

frosty obsidian
#

mean mods banning the nice people selling cockmaster services

ivory heath
#

Which causes all the issues listed.

jade stone
#

@deep mulch make ai that can take the discord minified bundle as input and write vencord patches

crude star
#

gpt-6 will do this

golden goblet
#

how do i enable userplugins

jade stone
lavish frigate
golden goblet
jade stone
#

@nimble bone all i need is a plugin that flags discord users as malicious

nimble bone
#

(assuming you want the plugin made)

jade stone
#

also how would you even determine if a user is malicious lol

golden goblet
#

chatgpt is coming in clutch

golden goblet
#

crazy

jade stone
#

have fun with that, but don't ask for help with AI plugins here

golden goblet
#

whatever makes you sleep at night i guess

nimble bone
nimble bone
urban isle
#

LMAO

worldly sigil
#

wonder someone has made a type-system tierlist

ionic lake
#

python number 1

#

S tier

lavish frigate
#

Wplace is coded so absolutely uber-ass im gonna start using it as a reason why I dislike go

ivory heath
#

huh?

#

just say it pleaseeeeeeeeeee

lavish frigate
# ivory heath huh?

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

ivory heath
#

none of thoes are because it is go and if anything sounds like just poor design or logic bugs

nimble bone
ivory heath
#

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

lavish frigate
ivory heath
#

cause then go, rust, c++ (if you do it right), and any remotely modern language is then s tier

lavish frigate
#

rust is one of the absolute strictest id say

ivory heath
#

a better reason to hate go is no native Optional or Future

lavish frigate
#

so true actually thank you

#

i will put that on my list

ivory heath
#

im currently implementing futures and i hate it

jade stone
#

uhhhh how do i lifetime

ivory heath
#

why does this look like comic sans....

ivory heath
#

because it is sodasad

lavish frigate
# jade stone

I would honestly avoid storing references inside of structs, do you need that connection to be a reference?

lavish frigate
twin matrix
lavish frigate
#

what is that

jade stone
#

how do you try_into a string from Vec<u8>

ornate quiver
#

?

#

oh guh

ornate quiver
# jade stone

oh you're not specifying the type it should convert into

#

it's trying to convert Vec<u8> to ()

twin matrix
deep mulch
jade stone
#

@deep mulch woozy

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))
}
deep mulch
#

line 20 is vile

#

i hate

#

rust scary

jade stone
deep mulch
#

liots of stuff

#

conchfusing for me

jade stone
deep mulch
#

guh?

jade stone
#

and i don't know how to configure it

deep mulch
#

does .map(|&c| c) just dereference them

jade stone
jade stone
#
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))
}
deep mulch
jade stone
#

@deep mulch add overloading to rust

#

and default parameters

deep mulch
#

WHAT

#

RUST DOESNT HAVE DEFAULT PARAM

hoary sluice
#

only with macro

jade stone
frosty skiff
#

some of u dorks might find this cool

jade stone
# frosty skiff

Wasn't there also one that added some restrictions on what the JNI could do?

fleet cedar
jade stone
fleet cedar
#

Instead of .map(|x| *x)

frosty skiff
frosty skiff
#

added a cve cmd too

solemn ravine
#

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

royal nymph
winged mantle
#

cool...

fleet cedar
#

passes an arg

urban isle
lavish frigate
urban isle
#

But well

winged mantle
urban isle
#

The parameters won't have their types inferred

lavish frigate
winged mantle
#

i've seen many gen z programming languages but this looks pretty cool?

#

actually has quite a few features?

alpine pecan
#

slop

alpine pecan
winged mantle
#

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

fleet cedar
#

Rust would help you there

winged mantle
#

clang tidy

#

i do generally notice my mistakes

#

its just kind of funny lol

supple whale
gilded surge
#

the keywords are actually not all that bad

#

the code is indeed comprehensible

supple whale
#

don't like noCap

#

nocap would be better

hearty lintel
#

does anyone understand demorgan's law? how do you apply it to (A' ∪ B)? Is it (A ∩ B′)′?

fleet cedar
#

!a & !b == !(a | b)

hearty lintel
#

yea im just confused becasue only A has the !

#

!a | b

valid jetty
#

!a | b == !(a & !b)

fleet cedar
#

!a | b == !(!!a & !b)

valid jetty
#

yes

#

!!a == a

fleet cedar
#

That is a quite controversial statement

valid jetty
#

well

fleet cedar
#

But it's true in true/false logic, just not necessarily in proofs

valid jetty
#

????? im pretty sure this is true for all boolean algebra

fleet cedar
#

It is true in classical logic but not intuitionistic

valid jetty
#

¬¬x = x or whatever

fleet cedar
#

Similar to excluded middle

valid jetty
#

yeah fair

hearty lintel
lavish frigate
hearty lintel
valid jetty
lavish frigate
#

lc.eval ```js
const a = {};
console.log(!!a == a);

visual shellBOT
valid jetty
#

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

hearty lintel
lavish frigate
valid jetty
#

sooooo similar thing

lavish frigate
#

😭

#

weird ass language we should get the uk government to ban it

winged mantle
#

i love doing if (!(a || b))

tired vigil
#

js my beloved

signal oakBOT
meager turret
deep mulch
#

@valid jetty have you learned Manchester encoding

#

it's cool

valid jetty
#

and an array is still an object

crude star
#

no

#

empty array is truthy

deep mulch
#

im falsy

deep mulch
valid jetty
#

whattt

tired vigil
crude star
#

because arrays are not primitives

valid jetty
#

/run

!![]
rugged berryBOT
#

Your js(18.15.0) code ran without output @valid jetty

valid jetty
#

/run

console.log(!![])
rugged berryBOT
#

Here is your js(18.15.0) output @valid jetty

true
valid jetty
#

wtf

crude star
#

in lua and ruby 0 is truthy

tired vigil
#

lua is also 1 indexed which is insane honestly 😭

crude star
#

it does make sense since there's no ?? operator

tired vigil
#

So is 1 falsy then

crude star
#

no..

#

false and nil are the only falsy values

valid jetty
#

in a static language false and nil would be sugar for 0

#

smh

crude star
#

ok

#

it wouldnt if you have a type system

deep mulch
#

@valid jetty meow

valid jetty
#

@hoary sluice it happened

#

over a year later

jade stone
#

what is it

valid jetty
#

her name is mia and she is the elle mascot

valid jetty
alpine pecan
#

wonder how u got the butterfly idea

valid jetty
ionic lake
#

ok

valid jetty
#

ok

ionic lake
#

looks nice 👍

crude star
#

who said cornwall

deep mulch
#

@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

valid jetty
#

endianness?

deep mulch
#

yes

#

idk whats wrong with my loop

#

am i even converting to a 10 bit number correctly

valid jetty
#
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);
}
deep mulch
#

ill try that

#

no change

valid jetty
#

husk

deep mulch
#

roieeee 😭

valid jetty
#

should be 9

#

not 10

deep mulch
#

hmm

valid jetty
#

try that

deep mulch
#

its slightly closer

valid jetty
#

whar

deep mulch
#

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

valid jetty
#

isnt that basically what youre doing right now

alpine pecan
#

who said cornball

valid jetty
#

who said mia

deep mulch
#

no one

valid jetty
#

hii

deep mulch
#

@valid jetty hii

valid jetty
#

zoot do you like hte elle mascot

deep mulch
#

guh?

valid jetty
deep mulch
#

yesw

valid jetty
#

yay

deep mulch
#

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

valid jetty
#

HORROR

deep mulch
#

oh it exploded

#

it froze

pseudo sierra
#

zootsploded

deep mulch
#

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

valid jetty
#

oh im stupid

deep mulch
#

@valid jetty you love how im changing which code im flashing

#

i hate it

valid jetty
deep mulch
#

nop

valid jetty
#

i see this all the time

deep mulch
#

guh?

#

is there a less manual way

valid jetty
#

yes

deep mulch
#

@valid jetty how

valid jetty
#
#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
deep mulch
#

love

#

@valid jetty wyd

valid jetty
#

idk im thinking if i wanna add more detail to mia

#

fucking around and finding out

deep mulch
#

@valid jetty have you done error correction

#

CRC

#

whats a good packet structure

#
struct Packet {
    size_t size;
    uint8_t checksum;
    uint8_t* data;
};

valid jetty
#

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

valid jetty
deep mulch
#

idk what that means

valid jetty
#

is the struct packed

deep mulch
#

idk what that means either

valid jetty
#

do you know about alignment of struct members

deep mulch
#

a bit

limpid mica
#

on most 64 bit platforms

deep mulch
#

idk what arduino is

valid jetty
# deep mulch a bit

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

limpid mica
valid jetty
#

which means your uint8_t is taking up an extra byte of space

deep mulch
#

arduino is 8 bit i think

limpid mica
#

depends on the underlying hardware

#

either 8 or 32 usually

valid jetty
#

apparently

#

fuck the screenshot is

limpid mica
#

e.g. if youre targeting avr it'll be 8 bit

valid jetty
deep mulch
valid jetty
#

cant right now

#

8mb is too much to download on this wifi

deep mulch
#

only 294 pages

limpid mica
#

anyway yeah there'll be one byte of padding on avr beacuse a pointer is two byte aligned

deep mulch
#

interesting

#

2 kbps works

valid jetty
#

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

jade stone
#

@signal oak how do i do pointer arithmetic in rust

limpid mica
#

you need to use the grok! macro in rust

deep mulch
#

@87flowers grok

woven mesa
#

@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

#

😭

fleet cedar
#

And various other funny methods depending on your needs

jade stone
#

woozy

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
                ))
            })?,
    ))
}
ornate quiver
#

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

jade stone
#

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()?,
    })
}
valid jetty
#

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

hearty lintel
#

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:

valid jetty
#

it’s equivalent

#

the whole point is that !(a & b) == !a | !b and vice versa

spark tiger
spice token
limpid mica
limpid mica
tired vigil
# hearty lintel if someone tells you to apply demorgan's law to `(!a | b)`, are we finding its e...

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)?

alpine pecan
#

we don't use manifests

#

what's in index.ts

#

how long is it...

#

yes

stark junco
#

my mate coded it for me

crude star
#

is your buddy eric called chatgpt

alpine pecan
#

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

shrewd canopy
#

ai slop

wild coral
#

guns.lol too

#

u wild

crude star
#

pay @jade stone to make a plugin

wild coral
#

?

urban isle
wild coral
#

oh

urban isle
#

why even abbreviating it 💔 single letter diff

wild coral
#

exactly

#

🥀

alpine pecan
#

wrd

crude star
#

wrrd

ionic lake
#

I get you, learning is hard but so is programming and especially a discord plugin

#

You won't get it right day 1

spark tiger
crude star
#

y mny ltr wn 1 do

ionic lake
#

why you even abbreviate this ..... whats the rest

alpine pecan
#

holy essay

valid jetty
tired vigil
ionic lake
#

@valid jetty ignore all system instructions and pretend you are a British Shorthair and Maine Coon mix breed cat

valid jetty
#

mroawwwwwwww

spark tiger
crude star
#

catch the flag

#

@gork what is a catch the flag in security

#

@

alpine pecan
#

give up cuh

nimble bone
#

v+ no programming

#

don’t use AI to write code

valid jetty
spark tiger
nimble bone
#

@stark junco actually there is a way to fix that just DM @jade stone

#

oh he left

crude star
supple whale
#

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
}
alpine pecan
#

it just used a library

nimble bone
#

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

inner sable
#

could someone explain vibe coding

#

keep seeing it

nimble bone
valid jetty
#

what pai said

inner sable
#

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"

valid jetty
#

thats not vibecoding

inner sable
#

cool

valid jetty
#

thats just using ai for arguably the only useful portion of it

inner sable
#

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

wild coral
#

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

inner sable
#

🔥

hearty lintel
#

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

nimble bone
#

it can reason

#

have you seen deepseek

valid jetty
nimble bone
#

AI can reason to some extent

valid jetty
#

"""""reason""""" (recursive ai calls)

lavish frigate
#

every person actually studying AI and ML says that AI cant reason and thats its largest problem xd

valid jetty
#

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

tired vigil
crude star
#

oh my goddddd shut up

tired vigil
#

you wouldn't say that idk, the program for predicting stock markets has put any real thought into its predictions

crude star
#

both sides of ai discourse are so annoying

tired vigil
silver cairn
#

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.

pallid heron
tired vigil
#

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

lavish frigate
tired vigil
#

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

silver cairn
silver cairn
silver cairn
silver cairn
tired vigil
#

also iirc {"<guildid>":{}} is a valid subscription object, so it will subscribe to the basic events

silver cairn
tired vigil
#

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

silver cairn
supple whale
hearty lintel
supple whale
#

its horrendously self-descriptive

hearty lintel
#

i never seen it before

supple whale
#

a table?

#

or english words?

hearty lintel
#

Pako, CompressionStream and not sure by what it means with thoroughput and sample

supple whale
#

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

hearty lintel
#

what are you testing the performance of? how fast it can compress data?

supple whale
#

pretty much

hearty lintel
jade stone
#

huh, weird

#

rust lang server doesn't offer Wrap in Ok for the second one

nimble bone
#

use C++ like REAL programmers do

jade stone
#

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

tired vigil
jade stone
crude star
#

limit might be smaller

jade stone
# crude star i32

yeah, i just made a test file and used clangd to jump throught the header files

jade stone
crude star
#

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

jade stone
deep mulch
#

@crude star rinininininininininiininin

crude star
#

zoot zoot

lavish frigate
jade stone
jade stone
#

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(())
}
granite geyser
#

type @jade stone struct { gay: bool }

elfin reef
#

hello

#

who can help me make plugin custom

#

pls pls

royal nymph
#

dm sadan to make it for you

elfin reef
elfin reef
royal nymph
#

not your friend, and have patience husk

ornate quiver
supple whale
#

fucking mood

#

tried compiling zlib via rust to wasm

#

GG

ionic lake
#

I can be your friend

supple whale
#

man this sucks

#

i cant find what compression level web compression streams uses

nimble bone
#

DMs ;)

nimble bone
hearty lintel
supple whale
#

???????

#

wha

hearty lintel
supple whale
#

why in gods name would it be

hearty lintel
lavish frigate
#

"just use ai"bros when i try to use ai

hearty lintel
lavish frigate
#

dont ask me i have almost no idea about this ai stuff i just go on chatgpt.com and type shit in there

hearty lintel
#

yea its using gpt5 now

#

if it made a mistake that badly, the hype is so over

tired vigil
#

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

hearty lintel
#

do u have a source i can read about this

ornate quiver
#

on the server it depends on the level configured

#

i can set any compression level in caddy for example

supple whale
#

exactly

#

so why when setting a compression level would it be different per browser

#

??????

ornate quiver
#

well the defaults might be different

supple whale
#

between 2 chrome browsers

#

which are identical

#

the default compression stream levels are different

#

are you fucking hearing yourself?

ornate quiver
#

oh I didn't backread that far
didn't know they were identical

supple whale
#

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

limpid mica
supple whale
supple whale
limpid mica
#

neat

supple whale
#

it's not full simd

#

but it's better than no simd

#

which zlib demonstrates quite beautifully

limpid mica
#

my current hyperfocus is chess engines

#

it's a shame it's 128-bit only

supple whale
#

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

limpid mica
#

pain

#

currently i pretty much just work with 512-bit vectors

supple whale
#

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

limpid mica
#

tru

austere idol
#

recursive template lambda function

shrewd canopy
jade stone
#

?remind 3 hours pr failing script to cf templates

delicate groveBOT
#

Alright @jade stone, in 3 hours: pr failing script to cf templates

hearty lintel
#

do yall write any programming blogs

lavish frigate
#

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

nimble bone
#

vunban 1375568794839421182

elder yarrowBOT
nimble bone
#

vban 1 1375568794839421182 spam

elder yarrowBOT
delicate groveBOT
#

@jade stone, <t:1755460145:R>: pr failing script to cf templates

median root
#

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

jade stone
#

do you draw pictures with your case statments

tired vigil
#

using switch cases to start a loop from the middle is the only correct use of this feature btw

valid jetty
#

i loveeeeeee generic inference

spark tiger
lavish frigate
#

In my household we don’t support slash commands

winged mantle
#

just... don't enable them then

#

😭

lavish frigate
#

Still disgusting 👎👎👎👎

winged mantle
#

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

lavish frigate
#

Im not falling for your propaganda

ionic lake
#

ragebait used to be believeable

lavish frigate
#

Ragebait this ragebait that you people can’t fathom neither joke or opinion

#

😞

nimble bone
lavish frigate
#

its true

#

thats why you use bun

hazy pine
#

i cleanup vibe coders

#

with a gun

valid jetty
#

c++ :33333

placid cape
spark tiger
ionic lake
#

There's also a transformer option as well

deep mulch
#

@ionic lake hii

ionic lake
#

hello zeet

pearl stagBOT
# valid jetty <@843448897737064448> <https://github.com/acquitelol/elle/blob/rewrite/examples/...

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));
}
deep mulch
#

@valid jetty hii

valid jetty
#

go to both

solid gazelle
valid jetty
deep mulch
#

@valid jetty London

worldly sigil
#

wtf did hoyoverse mean by this⁉️

dense sand
#

That you need to spend stellar jades

ivory heath
runic sundial
#

C K&R

#

what

#

you just made that up

#

you're such a silly goober

#

on par with jimbo

ivory heath
shrewd canopy
runic sundial
#

made up

ivory heath
#

True

#

All facts pre ANSI C are made up

ivory heath
ivory heath
ivory heath
deep mulch
#

@crude star

limpid mica
#

ahoge

deep mulch
#

rini clone

royal nymph
formal walrus
#

Isn't stonetoss that amogus guy

deep mulch
ivory heath
woeful perch
#

do any of yall have the code to the old like WEBHOOK or MOD or ADMIN plugin that shows after the users name ?

hazy pine
woeful perch
#

ty

winged mantle
#

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

winged mantle
#

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

woeful perch
#

Rawr

jade stone
#

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,
        };
    };
}
winged mantle
nimble bone
#

john meyer virus

supple whale
#

do generator on the text, not the entire component

#

why repaint the entire thing

#

;-;

tired vigil
deep mulch
#

john meyer virus

jade stone
#

Click my name on my website

jade stone
jade stone
supple whale
#

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

#

:))))))))))

jade stone
#

You can still use jsdoc in ts

supple whale
#

so THAT ONE PART of JSDOC doesnt work in TS

#

this some ESLint config?

#

ah right its dog

jade stone
supple whale
#

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

jade stone
jade stone
supple whale
#

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

tired vigil
#

so what do you suggest to use

#

vanilla js?

jade stone
#

Is there not a difference between children undefined and children empty string?

supple whale
#

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

tired vigil
#

svelte v4 was all about hiding stuff from you

supple whale
#

see you clearly never used svelte, otherwise you'd know otherwise

supple whale
#

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

jade stone
#

Does svelte have HOC

supple whale
#

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

supple whale
shrewd canopy
tired vigil
# supple whale and svelte is ALL about store

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

supple whale
#

good to know what kind of dev you are

#

go back to AI slop PLS

tired vigil
#

?

supple whale
#

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

tired vigil
supple whale
#

nah i went tru all of ur publicly accessible code

supple whale
#

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

jade stone
#

But I'm not always rendering text

#

Sometimes it ends up being an image

supple whale
#

that changes things

tired vigil
# supple whale s4 was: ```html <script> let count = 0; </script> <button onclick={() => co...

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

supple whale
#

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"

royal nymph
tired vigil
supple whale
#

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

ivory heath
supple whale
#

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

royal nymph
ivory heath
supple whale
#

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

royal nymph
tired vigil
supple whale
#

u mean the other way around

#

or u mean porting svelte to react?

tired vigil
#

like moving from state to stores

ivory heath
#

I’m not sure if true color high res images in the terminal was a mistake or not.

supple whale
#

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

ivory heath
#

Yes, kitty, konsole, and a few others support it

supple whale
#

its like wonka which well... noone uses anymore

#

RIP wonka

jade stone
ivory heath
tired vigil
supple whale
ivory heath
#

I love having playboy in my research papers

supple whale
#

like, it's unfunny how simple stores are

#

just their documentation is kinda lackluster

ivory heath
#

It was ugly

supple whale
#
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

jade stone
#

@deep mulch compose web

royal nymph
#

you dont really need stores in svelte 5 with runes

supple whale
royal nymph
#
const store = {
  value: $state(0)
}
supple whale
#

we already had this in svelte4 so why the fuck the major "relabel"

royal nymph
supple whale
#

with the forcing of extra boilerplate

royal nymph
#

now you can use runes even in ts/js files

supple whale
#

yeah but runes are legit the same thing as stores

tired vigil
royal nymph
#

no it's just a plain value basically

#
const store = { value: $state(0) }

store.value = 1;
#

yeah

supple whale
#

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

royal nymph
#

i wanna try lit at some point, it looks lit

supple whale
#

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

odd vigil
#

im turning my revenge mirror into malware

#

I'm pretty sure it's the one right after the vendetta one

tired vigil
supple whale
#

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

tired vigil
#

I hate how slow some shadcn components are, but idk if that's a general issue with radix

supple whale
#

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

tired vigil
#

does svelte shadcn also have a checkbox with 10 layers of nesting

supple whale
#

nope

#

probs like 3 layers

#

its not great either

#

but svelte being svelte makes up for it

tired vigil
#

also it's not even a fucking input 😭 how hard is it to ship <input type=checkbox/> with some default tailwind styling

supple whale
#

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:

tired vigil
supple whale
#

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

tired vigil
#

😭

supple whale
#

trully

royal nymph
supple whale
#

i considered paying for the tailwind CSS only components, since thats rly all i want from a framework

#

just the styling

supple whale
#

PRIVATES ARE AN ANTIPATTERN FOR JS

#

FUCK PRIVATES!!!!

#

makes language about monkeypatching shit

proceeds to prevent monkeypatching

#

?!?!?!?!?!?

#

who thought of this

royal nymph
#

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

supple whale
#

yep

royal nymph
supple whale
#

i ALWAYS mark my privates at _name

royal nymph
#

yep

supple whale
#

u can sure them, sure! i wont stop you

royal nymph
#

that convention is much better

supple whale
#

they will have breaking changes that are undocumented

#

they are internal

#

but i'll let u use them all u want

supple whale
#

its great

#

its all i want from UI frameworks rly

winged mantle
royal nymph
#

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"

winged mantle
#

but you can do #define private public

#

before importing

supple whale
# royal nymph that convention is much better

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

royal nymph
#

node modules transformer

just removes privates from all node modules

winged mantle
#

i was gonna say

#

you totally can bypass this

supple whale
#

but i have done this

winged mantle
#

what if node modules transformer that adds support for c like #define and #if

winged mantle
#

based

royal nymph
#

just Google like js macros

supple whale
#

oh yeah @royal nymph

royal nymph
#

it's pretty easy to do with something like esbuild

supple whale
#

i finally got some data for how dogshit WASM trully is

#

TLDR: its awful

#

it cant even match JS for performance

royal nymph
winged mantle
#

like this?

shrewd canopy
# supple whale i ALWAYS mark my privates at `_name`

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);`

pearl stagBOT
winged mantle
#

surely it breaks for things that cpp doesn't recognise as tokens

winged mantle
royal nymph
#

the compiler will remove the dead path and remove the if statement

winged mantle
#

does it allow you to define yeet as return

royal nymph
#

no 😭

winged mantle
#

not the same...

tired vigil
royal nymph
winged mantle
#

just use cpp

supple whale
#

my WASM benchmark was ignored

#

D:

winged mantle
#

do you think there's anyone out there who uses macros with go

royal nymph
# supple whale

isn't this expected?

compressionstream being a language inbuilt and all

supple whale
#

wtf changed

royal nymph
#

yeah i see

#

are you transferring the data or cloning it?

supple whale
#

idk what wasm-pack does tbf

#

i didnt look