#🪅-progaming

1 messages · Page 22 of 1

cerulean plover
#

I think you're probably fine

#

i'm not quite so confident what the GPL has to say regarding brand assets included along with the code

#

you're best off asking vee

frosty obsidian
#

always assume the strictest possible license

#

unless it was released under cc or w/e the copyright for the logo technically belongs to nanoqoi (fka synqat)

#

with permission given to vee obviously

frosty obsidian
dawn ledge
valid jetty
winged mantle
#

i don't think it's a registered trademark

#

Vencord®

dawn ledge
#

(joke)

royal nymph
#

that's not how it works

#

anyway we don't care much as long as you don't do something malicious with it

fleet cedar
#

"You can do anything" is more like CC license isn't it

royal nymph
#

if you want to make art or alt icons or whatever, feel free

but don't use the icon to impersonate or for your own projects

dawn ledge
#

im gonna make torjan called vendor and put a cute icon on it which has VC and a cat in it

royal nymph
severe python
#

i didn't know much about licensing logos until now

#

heres the updated path btw

#

i forgot to optimize it

frosty obsidian
#

oneko nonexistent at small sizes

severe python
green gulch
#

Has anyone here worked with the spotify API before

#

im trying to figure out the best option for tracking a listening status without constantly polling the api

#

if thats possible

royal nymph
broken shore
#
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var es_exports = {};
__export(es_exports, {
  a: () => a
});
module.exports = __toCommonJS(es_exports);
class a {
}

Does anyone know how to stop esbuild from spitting all this junk

#

with this js

export class a {}

and esbuild --format=cjs it generates a shit ton of garbage

wicked stump
broken shore
#

figured

broken shore
jade stone
#

dont think thats how that works, but as long as you're not doing anything malicious, i dont think anyone will care

valid jetty
#

does anyone know how stack allocated variables in C like actually work lol

dawn ledge
#

i would like to know too

valid jetty
#

in elle when you define a variable in a while loop it eventually segfaults because it keeps stack allocating memory to store that variable on every iteration and stack overflows

#

the solution is to stack allocate once at the top of the function and just reuse that allocation every iteration

#

but idk if that's something that C does

fleet cedar
#

When compiling a function, the compiler basically makes a struct of all variables in the function, and pushes that struct to the stack when the function is called

#

Nothing else is pushed until you call another function

valid jetty
#

for example

fn main() {
    i32 a;

    while true {
        a = 5;
    }
}
``` would stack allocate `a` once and then put 5 into that allocation on every iteration
meanwhile
```rs
fn main() {
    while true {
        i32 a = 5;
    }
}
``` would stack allocate `a` every iteration causing a stack overflow
valid jetty
fleet cedar
#

Both of those would push a slot for a when first calling the function, and write into that slot each iteration

valid jetty
#

in llvm its alloca, in qbe its just alloc8 or alloc4 or alloc16 depending on your alignment

fleet cedar
#

Some IRs have alloca, yes, which causes great headaches whenever used

valid jetty
#

yes

valid jetty
#

the first example has the desired, and expected, output

type :ElleMeta = { l, l, w, l, l, w, w }
export function w $main() {
@start
    %i.addr.6 =l alloc8 4
    storew 0, %i.addr.6
@loop.7.cond
    jnz 1, @loop.7.body, @loop.7.end
@loop.7.step
    jmp @loop.7.cond
@loop.7.body
    storew 5, %i.addr.6
    %i.8 =w loadw %i.addr.6
    jmp @loop.7.step
@loop.7.end
    ret 0
}
#

the second stack allocates every time

type :ElleMeta = { l, l, w, l, l, w, w }
export function w $main() {
@start

@loop.5.cond
    jnz 1, @loop.5.body, @loop.5.end
@loop.5.step
    jmp @loop.5.cond
@loop.5.body
    %i.addr.7 =l alloc8 4
    storew 5, %i.addr.7
    jmp @loop.5.step
@loop.5.end
    ret 0
}
#

so yes the solution seems to be to create a slot

#

in the case of elle it would be to push a placeholder addr at the top level of functions whenever it encounters an assignment of a variable that doesnt exist yet

#

then using that slot every time instead of allocating new memory

#

thank you

#

ok

#

i only really discovered this was a thing because i was working with graphics and i was rendering every pixel on the screen so i was doing hundreds of thousands of stack allocations which means a stack overflow very fast lmao

fleet cedar
#

Yeah you don't push to the stack in the middle of a function

#

You push everything you need at the beginning of it

valid jetty
#

makes sense

crimson sparrow
#

What resolution/iterations is that?

fiery mortar
#

sorry to ask such a simple question but could someone please explain to me how selection-, insertion- and bubblesort work? I just started learning java and I am struggling a bit.

valid jetty
crimson sparrow
#

If you ever have time, could you check the frametime of a 1kx1k 1k iterations

#

Would be fun to compare with other languages

#

I’ve done a lot of mandelbrots :3

valid jetty
#

which is similar to in C with optimisations enabled so not really a surprise there

#

both using raylib and using the same iterative algorithm fyi*

crimson sparrow
#

:o that’s pretty good!

valid jetty
#

what’s the best you’ve seen :nyaboom:

spark tiger
potent cloud
#

the web playback sdk acts as a spotify player/client

#

so the user would need to constantly be on that site and listen "through" it

spark tiger
#

ah my bad! shoulda not expected it to be that easy though

serene elk
#

The Web Playback SDK requires a Spotify Premium subscription

#

also that

#

reverse engineering discord websocket connection seems a better option

#

(I'm not sure but maybe you can pretend ur discord and not require premium for that stuff)

spark tiger
#

unsure how the plugin works

serene elk
#

the plugin just makes discord think ur a Spotify premium user

#

all the api calls it does are independent on premium or not

spark tiger
serene elk
#

so by making discord think ur premium it just avoids discord aborting/blocking stuff since u arent premium

serene elk
spark tiger
#

yeah what I thought of too

serene elk
#

but then they gave discord a token to access their api which can do everything lol

#

regardless of premium

#

good for us I'm not complaining 😂

spark tiger
#

also speaking of the original question, not sure how that might help but when I was trying to mess with the spotify api stuff discord does, I've noticed every time you change the song it uh sends this content-inventory/users/@me/spotify request. Iirc content-inventory is these activity cards(?)

serene elk
#

yeah that's just tracking for their new activity stuff

#

so they have data to show

#

it does similar to every game you play

spark tiger
#

yeah like perhaps you can track how it gets the data from the request call stack

dawn ledge
#

it just connects to a websocket

#

spotify api

#

and gets song updates from there

deep mulch
#

Advent of Code, just a week away!

still jolt
#

unfortunately, no ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

woven mesa
#

@dawn ledge hiii

crimson sparrow
#

Also it’s hard to compare since just framing changes execution time a lot

valid jetty
#

yeah different parts of the fractal will be different

#

4fps will be approx 250ms per frame

crimson sparrow
#

Everything in the ”black” zone will always take max iterations

valid jetty
#

yep

#

there is definitely ways to take shortcuts

#

my impl is definitely the most raw way possible

#

technically this would use Vector2::dot for checking this

#

but thats the only vector operation that really is used here so i didnt bother with it

deep mulch
#

@valid jetty you might know this

#

why is my compiled shared library depending on 500 billion libraries

#

guh wait

#

i need to rebuild to show

#

is there some way to see whtas adding what

#

and its linking to x11 for some reason

valid jetty
#

wtf

jade stone
deep mulch
#

yop

jade stone
#

@valid jetty you should use comic sans

dawn ledge
deep mulch
#

@dawn ledge hiii

grim flare
#

comic sans is a banger font

valid jetty
royal nymph
#

make venbot module that auto bans anyone who mentions comic code

ionic lake
#

comic code

crimson sparrow
#

Not as pretty as comic code

#

But free

thorny prism
#

what language would yall use to make a package manager

nimble bone
nimble bone
royal nymph
nimble bone
#

or C++

thorny prism
#

hmm okay

void leaf
nimble bone
#

the vee programming language

deep mulch
signal oakBOT
# deep mulch you will die

@deep mulch's Message: you will die

7.01% Identity attack 
7.07% Reasoning (beta) 
29.21% Profanity 
34.95% Severe toxicity 
49.08% Inflammatory 
57.63% Affinity (beta) 
66.16% Threat 
71.89% Toxicity ```
Powered by <https://www.perspectiveapi.com/>
ornate quiver
#

yeah

severe python
frosty obsidian
#

does not scale well

#

it should be a filled icon

deep mulch
#

yop

severe python
#

idk

frosty obsidian
#

oneko unfortunately should be dropped

severe python
#

i dont wanna drop oneko

frosty obsidian
#

hes just not gonna be legible

zinc smelt
#

does anyone know if vencord plugin can add proxy (socks5) functionality?

still jolt
#

honestly, just use something like proxychains (desktop) or your browser proxy settings

zinc smelt
#

i know about proxychains

#

i want to know if the plugin API can add this functionality

royal nymph
#

why the hell would you do that via a plugin

#

just use a proxy on ur system

spring idol
#

for example, discord has now been blocked in Russia

royal nymph
#

you don't need a plugin

spring idol
#

my friends can log in via vesktop, but they also won’t let me into voice channels

royal nymph
#

launch discord with this flag

spring idol
#

hmm

#

where can i found addresses for this?)

#

maybe stupid question

royal nymph
#

your proxy server

spring idol
#

thanks

#

how to launch with discord with flag?

#

here?

ionic lake
#

just use DPI bypass

brave flame
#

please never let me cook on web design i will burn the place down

lost creek
#

Any plugin that shows media in channel like on mobile?

deep mulch
#

wrong channel

#

vns

elder yarrowBOT
lost creek
#

like a media gallery

lost creek
#

but i want to know if already exists

deep mulch
#

there isnt

lost creek
thorny prism
#

yall how do you even explain to someone that you should follow the regulations of mac os icons

frosty obsidian
#

they're guidelines and you don't have to follow them

deep mulch
#

I need advice
libmpv has a trillion optional features that are automatically enabled based on whether they're available in the system
should I disable them all and manually specify
I'm worried about having to cross compile like 500 additional libraries

ornate quiver
#

all inshallah

lost creek
#

where do i find docs about functions in vencord plugin dev

#

i mean, vencord plugins descriptions e.g

nimble bone
lost creek
#

i just wanna open a modal/dialog, then do a request at /channels/{channelId}/messages but i dunno how to get user's token, maybe in localStorage?

nimble bone
#

don’t manually do fetch

#

use RestAPI in @webpack/common

#

endpoints are in Constants

#

look at some plugins using them

lost creek
#

i dunno nothing about webpack

mellow phoenix
jade stone
fading prairie
#

hi chat

dawn ledge
#

plugin dev isnt for you if you arent willing the read the source

severe python
#

keep it like that

balmy lintel
#

the cat is hard to see on smaller scales

#

looks good though

valid jetty
#

this is such cursed switch case syntax lmfao

fleet cedar
#

Wtf is defer break;

valid jetty
#

its to make sure you dont forget to break at the end and get yourself into an infinite loop

#

ideally in a real switch case you wouldnt be able to do that at all

#

this while loop is just a way to create this structure```ts
if true {} else {}

cond:
jnz 1 @body @else
body:
// do stuff
jmp @end
else:
// do stuff
jmp @end
end:
// out of if statement

```ts
while true {}
cond:
    jnz 1 @body @end
body:
    // do stuff
    jmp @cond
end:
    // out of while loop
#

breaking early always makes it work essentially like a switch case

lavish frigate
#

so its an infinite loop.... that only runs once?

#

why not just add a code block syntax i.e. rust

severe python
fleet cedar
valid jetty
#

you have only else

valid jetty
fleet cedar
#

Why

#

If you have if/else, elseif should be trivial to add

valid jetty
#

it is it just requires continuous parsing

#

it is not as simple as it may seem

#

i’ll do it soon i just haven’t gotten to it yet because usually you don’t need to

#

else-if by design is not very clean code

#

if you ever need to write an else-if you can write cleaner code by making it an array or something like that

#

usually if you need to check a condition you just need to check if it is true and do something else if it isn’t

#

i’ve written around 2k lines of pure elle code and i have not ever needed to use else-if except that one example above

#

that example above would be rewritten like

if a is infant …
else if a is student or a is senior …
else …

lavish frigate
#

99.9% of the time switch cases are used as a long else-if chain

#

You rarely need to fall through

valid jetty
#

thats because this syntax isnt for switch cases its while loop syntax

#

ideally elle wouldnt have switch cases it would have pattern matching

valid jetty
#
const thing = "i will END vencord once and for all, be prepared because this event will be truly cataclysmic... :3";

function shuffle<T>(array: Array<T>): Array<T> {
    for (let i = array.length - 1; i > 0; i--) {
        const j = Math.floor(Math.random() * (i + 1));
        [array[i], array[j]] = [array[j], array[i]];
    }
    return array;
}

function misspell(payload: string) {
    return payload
        .split(" ")
        .map(word => {
            let shift = 0; while ([',', '.'].includes(word[word.length - (1 + shift)])) shift++;
            if (word.length - shift <= 2) return word;

            const middle = word.slice(1, -(1 + shift)).split("");
            const shuffledMiddle = shuffle(middle).join("");
            const end = word.slice(-shift - 1)
            return `${word[0]}${shuffledMiddle}${end}`;
        })
        .join(" ");
}

console.log(misspell(thing)); // "i wlil END vecnrod ocne and for all, be paprreed baesuce tihs eenvt will be tlruy cmlaiatsycc... :3" 
``` spell checkers will love this
dawn ledge
#

misspell the cat word now

green gulch
#

just found a vuln in my states DPS system

#

they just added the ability for people to be able to upgrade their license online

#

and now im able to give myself any type of license without review

#

also a way to bypass DD # verification and mark myself as a veteran on my license

#

💀

ornate quiver
#

LMAOOOO

green gulch
#

it’s actually insane

#

literally just modifying responses using burp

#

then it updates the database with the response

#

might actually be able to change my name too

#

it’s bad

ornate quiver
#

wait

#

what about dob husk

royal nymph
#

see if you can somehow get a bug bounty (probably not posttroll)

green gulch
green gulch
#

i was even able to change the replacement card cost because for some reason it’s different for everyone so it’s stored along with the users other data

#

for my buddy he’d have to pay 1$ for a replacement but for me it was 10$ by default

#

just made me curious what they base it on

ornate quiver
#

sell it on some forum

#

then report to the gov

valid jetty
green gulch
last pasture
#

Hi, I'm currently trying to build my own plugin, and I was wondering how patches are being created.
I understand the idea to search for a certain string/RegExp that is inside only one file, then replace it also using string/RegExp. But how can I actually know what files and lines do what I need to modify?

serene elk
#

reverse engineering the discord app

#

JavaScript/devtools/debugger

dusty moth
#

good or bad

magic shale
#

how strict is it

#

like does any syntax error on a line make it a comment

dusty moth
solid gazelle
#

like why doesnt .read return a new uint8array instead of making you allocate one first and then doing the .read which writes to it

magic shale
#

“doing .read which writes to it”
i love javascript

ornate quiver
#

it's funny but it's pretty much the same way in every language
except you explicitly indicate a mutable reference

royal nymph
#

it's very normal to make you pass your own buffer

#

majority of languages do the same

rugged berryBOT
#

Here is your swift(5.3.3) output @formal belfry

😖
royal nymph
#

/run

def 🥺()
    print("😖")
end

🥺
rugged berryBOT
#

Here is your cr(0.36.1) output @royal nymph

😖```
royal nymph
deep mulch
#

crystal

mellow phoenix
#

/run

def 🥺()
    print("😖")


🥺()
rugged berryBOT
#

@mellow phoenix I only received py(3.10.0) error output

  File "/piston/jobs/fe0165ce-5bad-43fb-9f5b-25dd4dc41115/file0.code", line 1
    def 🥺()
        ^
SyntaxError: invalid character '🥺' (U+1F97A)
dawn ledge
#

python L

viscid grove
#

/run

++++++++++++++++++
>[+++++++<->]
>[+++++++++++++<->]
>[+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<->]
>.
rugged berryBOT
#

Here is your brainfuck(2.7.3) output @viscid grove

viscid grove
#

:(

#

I don't think brainfuck works very well with emojiss

#

wait i did the wrong emoji
i was trying to print out out 🥺

#

/run

function 🥺() {
    console.log("😖");
}
🥺()
rugged berryBOT
#

@viscid grove I only received javascript(18.15.0) error output

/piston/jobs/91ea77eb-f228-4792-a238-ee2e17bf57ec/file0.code:1
function 🥺() {
         ^

SyntaxError: Invalid or unexpected token
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
crimson sparrow
#

Julia will do it

#

Even has predefined Unicode characters

#

And Unicode operators

granite geyser
serene elk
#

wdym

fleet cedar
granite geyser
echo elm
#

k

mellow phoenix
#

if you have any questions, ask.

echo elm
#

no qns, thx

#

!

#

/run print("hr")

rugged berryBOT
echo elm
#

/run ```python
print("ss")

rugged berryBOT
echo elm
#

/run python

print("sss")
rugged berryBOT
#

Here is your python(3.10.0) output @echo elm

sss
viscid grove
#

/run

++++++>[+++<->]>...
rugged berryBOT
#

Here is your brainfuck(2.7.3) output @viscid grove

viscid grove
#

im skill issued

#

/run

++++++>[+++<->]...
rugged berryBOT
#

Here is your brainfuck(2.7.3) output @viscid grove

viscid grove
#

im double skill issued

#

/run

++++++++++++++++[>+++++++<-]>+++...
rugged berryBOT
#

Here is your brainfuck(2.7.3) output @viscid grove

sss```
viscid grove
#

wow yeah i was so skill issued

valid jetty
#

/run

--<-<<+[+[<+>--->->->-<<<]>]<<--.<++++++.<<-..<<.<+.>>.>>.<<<.+++.>>.>>-.<<<+.
rugged berryBOT
#

@valid jetty I only received bf(2.7.3) error output

error: tape memory out of bounds (underrun)
undershot the tape size of 30000 cells
valid jetty
#

.

#

love

#

elle can do it,,,,

viscid grove
valid jetty
#

@nimble bone

viscid grove
#

/run

+++++++++++++++
[>+++++++++++<-]>
[>+++++++++++++++++++<-]>
[>+++++++++++++++++++++++++++++++++++++++++<-]>
-.
rugged berryBOT
#

Here is your brainfuck(2.7.3) output @viscid grove

```
viscid grove
#

so good

jade stone
fleet cedar
#

What's the difference between a multibyte string and a wide char string? Utf8 vs utf16?

still jolt
#

why node ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

dawn ledge
#

whats the difference between spawning a process and forking it

#

dont both have the process that spawns/forks as their parent process

serene elk
#

forks inherits the state of the process being forked

fleet cedar
#

Isn't the userspace spawn function a combination of fork + exec

serene elk
#

I'm pretty sure yes

dawn ledge
#

i see

serene elk
#

exec basically overwrites the inherited state from the fork

fleet cedar
#

Fork spawns a new process, by cloning all state of the current process (or only current thread maybe? Not sure tbh)
Exec replaces the current process by a new one

#

This kinda weird setup the parent process to customize things like changing the stdio fds, current directory, and various other parameters before actually starting the child process

dense sand
#

How would one define a custom react component type?

dawn ledge
fleet cedar
#

A react component is simply a function that takes a props object and returns a react node

dense sand
#

right, so what if i want to have component that is like div?

#

it might sound stupid

#

i dont want to use any dom elements though

fleet cedar
#

All react components boil down to dom elements in the end

dense sand
#

i guess doing smth like:

function Test({x}: {x: number}) {
  return React.createElement('Test', { x: x })
}

would be good enough

royal nymph
dense sand
#

... i know how to use react, my point is that im making a library which i want to use jsx, but dont know how to create the elements correctly, as they dont use dom in any way

royal nymph
#

your question makes no sense

#

create elements correctly?
don't use dom?

fleet cedar
#

What do your elements render to if not dom

dense sand
royal nymph
#

why the hell are you using jsx

dense sand
#

trynna use bun ffi to port winui3 to js lol

royal nymph
#

why not write it in c#

dense sand
#

because xaml sucks ass

royal nymph
#

then use electron

#

this is essentially what you want

winged mantle
#

use C++ and Qt blobcatcozy

dense sand
#

i want fancy windows 11 component design

royal nymph
#

React Native for Windows + macOS brings React Native support for the Windows SDK as well as the macOS 10.14 SDK. With this, you can use JavaScript to build native Windows apps for all devices supported by Windows 10 and higher including PCs, tablets, 2-in-1s, Xbox, Mixed reality devices, etc., as well as the macOS desktop and laptop ecosystems.

dense sand
#

yes but that doesnt give me the fancy components winui3 provides

#

i want the native components ported:

royal nymph
#

you want to write a custom jsx runtime

use a build tool like typescript, esbuild, webpack, etc that allows you to define JsxFactory and JsxFragment

#

then you need to define those two, e.g.

function MyJsx(element, props, ...children) {
  // do something
}
dawn ledge
#

what you want is to write your own jsx compiler/transpiler

#

that will compile down to the appropriate winui calls

#

wdym vee, you do need a custom jsx compiler to convert <Foo /> -> whateverWinUIFactory.createWidget("Foo", ...)

royal nymph
#

literally all js transpilers allow you to bring your own jsxFactory and jsxFragment

#

you just need to define those two

#

and done

dense sand
#

well i thought it would be as easy as traversing the tree with a loop and adding children with corresponding native calls xD

dawn ledge
#

okay compiler was a bad choice of word

royal nymph
#

that's very different from "writing your own compiled"

dawn ledge
#

i get it

#

but i meant what you said

pearl stagBOT
dawn ledge
#

esbuild my beloved

royal nymph
#

this is with esbuild but all js buildtools allow you to define your own jsxFactory

dawn ledge
#

even tsc superyes

#

although you wouldnt be sane if you use tsc

dense sand
dawn ledge
#

bun 💀

dense sand
dawn ledge
dawn ledge
#

i used bun pre 1.0 and gave up

#

it might be better now

#

back then the docs were there but the implementations werent

royal nymph
dawn ledge
#

and somethings were contradictory

royal nymph
#

so now it's just your responsibility to implement the jsxML function (and obviously rename it to something better) to do what you want

dawn ledge
dense sand
#

i see, thanks for the directions guys, greatly appreciated :)

dawn ledge
#

write jsx only for it to be built down to json

valid jetty
ornate quiver
#

chat my gender is ANY_COUNTRY

ionic lake
dawn ledge
#

when in doubt, just napi it

#

would say wasm but that wont help with system calls

dense sand
#

Using bun ffi was pretty smooth so far

valid jetty
#

where is regulars

nimble bone
ornate quiver
#

nom

deep mulch
#

nom

still jolt
#

nom ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

dense sand
#

right guys, im skill issuing once again, it might be typescript tweaking. found some guide onto how to make custom jsx runtime(with help of what vee yesterday linked) & define custom default elements. i have declared JSX namespace:

declare namespace JSX {
  export interface IntrinsicElements {
    div: { customProp: string; anotherProp?: boolean };
    span: { anotherCustomProp: number };
    myCustomElement: { propA: string; propB?: number };
  }
}

however, when i try to use it i get:
tsconfig option: "jsxImportSource": "./src/jsx"
any idea where could be problem?

#

nvm i fixed it lol

clever lily
#

Who can help me to achieve something like this?

dusty moth
solid gazelle
ionic lake
#

css gaming

versed phoenix
serene elk
dense sand
versed phoenix
#

gipity doesnt know shit lol

serene elk
#

hmmm

dense sand
#

I mean its a better google search

versed phoenix
#

it just sounds convincing

serene elk
#

that seems VERY weird

versed phoenix
#

it really isnt

dense sand
#

But like 1/2 times its pretty clueless

versed phoenix
dense sand
#

Im not even kidding

versed phoenix
#

thats super cringe

dense sand
#

Yes

#

I was arguing with him for like half an hour

#

He also told me that if students use gipity for writing their thesis, he will use it to grade the thesis too

versed phoenix
#

lmao

#

make it long enough to not fit into the model limit

dense sand
dawn ledge
#

using llms just stagnates your growth imo

#

i've used chatgpt for a grand total of like 5 times to do something (it didnt work)

dense sand
#

I mean it was able to help me with parsing out ia32 instructions

#

So i didnt really had to look into the giant manual

ornate quiver
#

it's good for well documented boilerplate
and like nothing else lmao

#

I tried using it a few times
didn't work I just wasted my time

runic sundial
valid jetty
#

hear me out:

#

any editor where you can write text

#

and run shell commands

#

is a good IDE

#

you don’t need fancy intellisense just read the compiler errors

#

you could literally write code in nano and it would be a good editor

cerulean plover
#

you can turn an editor that does the job into a good editor btw

elder scaffold
#

stock vim and vim with plugins are pretty much different things

dawn ledge
#

idk about stock vim

#

but i've used stock nvim

#

and its great

#

what you need in (n)vim is the motions

#

and stock has it

#

:Ntree + motions
peak experience

nimble bone
#

something so simple is so bad experience

dawn ledge
#

no its not

#

ides have a ton of features which you dont even need

nimble bone
#

nopp

#

intellisense, copilot, debugger, git integration are all useful features

fleet cedar
#

Seeing what lines have changed is very useful

#

But I always do the actual committing with the cli

ionic lake
#

there are people who are very much content with the bare minimum

valid jetty
#

literally me

#

i work by literally just editing text and then sudo make

#

no fancy features

#

i even use git CLI

dawn ledge
#

same

#

i dont even have lsp atp

dusty moth
#

you choose not to use lsp

#

i can't get it working

dawn ledge
#

part because im too lazy to install them manually since nix shits itself if i install them from mason since nix isnt fsh compatible

dusty moth
#

we are not the same

dawn ledge
#

no we are

dusty moth
fleet cedar
#

Nix is one of those ideas that sound really nice until you try to use it in the real world

dusty moth
valid jetty
#

yeah lmfao

fleet cedar
valid jetty
valid jetty
dusty moth
valid jetty
#

its ran as sudo because it puts an executable in /usr/bin/local

dusty moth
#

the first shebang runs nix-shell

#

the second runs the script with stack present

fleet cedar
#

make && sudo make install would be more sensible

valid jetty
dusty moth
#

the third shebang jit-compiles and executes it

dawn ledge
#

how is the zed experience

#

are you on linux

dusty moth
dawn ledge
#

(was asking rosie)

#

i too do use nvim tho

#

peak editor

#

i recently started using nvim for notes too

#

motions are peak

#

nvim + typst is awesome

valid jetty
#

very minimal

#

very terminal-like

#

it has vim motions too so i use that

#

and blazingly fast 🔥

#

(rust-based)

dawn ledge
#

real

#

last time i tried it it had many issues

valid jetty
#

idk i use it on macos

dawn ledge
#

yeah i used it on linux

#

and before the started distributing builds

#

so i had to build myself too 😭

valid jetty
#

idk you should try it again :3

dawn ledge
#

i am enjoying nvim

#

and the terminal based workflow

valid jetty
#

i prefer this over nvim

#

because i cant find a very nice looking terminal emulator

dawn ledge
#

that is a pain yes

#

i am just coping with alacritty

#

NO IMAGE SUPPORT

fleet cedar
#

mate-terminal is decent, but kinda low-feature

dawn ledge
#

is it blazing fast

fleet cedar
#

It scrolls by pixels rather than lines, which is a surprisingly rare feature

#

That single thing is a major reason why I use it honestly

dawn ledge
#

i prefer by line

fleet cedar
#

Oh yeah and another problem with my transparency is that it makes it not draw the default background on unstyled pages, which makes them unreadable. Is that fixed?

dusty moth
#

yes this is actually an important condition on whether I can use it

dawn ledge
#

zed is a gui app

dusty moth
#

unless it has some other way to share state between 3 devices at once and runs in a browser

potent cloud
#

rewrite zed in elle
||/joke||

dawn ledge
#

the riir treatment but elle

dusty moth
#

haskell joined

dense sand
#

Half life reference

potent cloud
#

lambda

deep mulch
#

lambda

valid jetty
#

i finally solved some huge struct issues

#

well

#

one was just me being bad

#

raylib has a struct called Color which has r, g, b, a fields

#

when i first made this struct to test raylib functionality, i made it with i32 because thats the smallest type that existed in elle at the time

#

however that didnt work properly because it was offsetting each field by 4 (bytes) when it should really have offset it by 1 (byte)

#

so literally just changing this struct to use u8 works now

#

because even though in elle the compiler knows how far to offset to get the right color, raylib is a library

#

the offset into the struct is baked into the file

#

that offset being +1 not +4

#

the other struct issue was that i literally made structs wrong

#

structs inside of structs are contiguous memory so they should directly be offset again without dereferencing unlike any other value

#

this was causing some issues when working with things like RenderTextures in raylib because that holds a Texture struct inside of it

#

so by literally just not dereferencing structs inside of structs and directly calculating a new offset from that pointer it works now

#

and the best part is; i didnt even need to change anything else

#

the test to ensure accessing structs in structs still works with no changes

#

because i was already storing nested structs in contiguous memory

#

i was just doing bad stuff when accessing them

#

because research is for losers and reverse engineering it is more fun

#

the worst part is that to solve the nested struct thing i was literally just brute forcing it

#

relatively cursed code

#

(yes elle lets you cast a struct into a pointer)

fleet cedar
#

Does (i32*) a cast the struct itself, i.e. 4 bytes in case of Color, into a pointer, or does it implicitly take a pointer to the struct and cast that?

valid jetty
#

the struct is technically just syntactic sugar for a pointer of contiguous memory of different types

#

so *(i32 *)struct is like doing struct_start[0] technically

#

its not a transmute

#

it takes the pointer of memory allocated and interprets it as an i32*

#

to make a struct, its made like this

%struct_start = alloc 4
store 255 into %struct_start + 0
store 0 into %struct_start + 1
store 0 into %struct_start + 2
store 255 into %struct_start + 3
#

where in this case %struct_start is a pointer to the allocated region

#

to access any fields you just offset that pointer by the size of the fields until the field you want and then dereference it

fleet cedar
#

So *(i32 *)struct is only valid if the first field of the struct is a pointer?

valid jetty
#

so basically a cast to a pointer just takes that pointer to the start of the struct and thinks it is some arbitrary pointer

valid jetty
#

in the case of the RenderTexture and Texture structs, it is

#

(u32 is still 4 bytes so its fine)

#

this is really complicated for me to explain but i can use strings as an example

#

a null terminated string is just an allocation of bytes for the length of the string + 1

%string_start = alloc 10
#

it then offsets that pointer that is returned and stores something at that new address

#

when you wanna access that again you shift the string by that offset again and derefence and you have your value

#

and this is how like, "arrays" in C work

#

structs work a similar way except its not one single type so you cant just do index * sizeof type to calculate your offset

#

instead you must add each previous field's type to an offset until you get the field you want

fleet cedar
#

I know how structs work

valid jetty
#

oh ok

fleet cedar
#

But I think it sounds weird that casting a struct implicitly takes a pointer to it

valid jetty
#

it does not take a pointer to it

#

structs themselves are a pointer

#

its just abstracted away

fleet cedar
#

Oh

valid jetty
#

that pointer being the thingie i said earlier

#

the %struct_start

#

that is the pointer

#

casting to i32 * just takes that thing and thinks its an i32*

dense sand
#

Does anyone know which of the windows processes causes the desktop to render? Is it dwm or explorer? Whats the difference?

ionic lake
#

dwm

red canopy
#

wait a lambda is literally just

#

nvm i confused myself.

ionic lake
#

👌

dusty moth
somber scroll
#

yo what is this called

dusty moth
fleet cedar
#

Fearmongering

dusty moth
#

and the first two fields of a user token can be derived from your user id

magic shale
valid jetty
#

the ip is randomly generated

#

as is the rest of the token

#

and the other stuff is trivial information that anyone has access to

valid jetty
#

as are monads

#

(the way i see it monads are just abstractions over some value and action)

#

like the maybe monad which abstracts possible missing values

#

:3

pure shore
#

hello vendor discord server how do i apply code to every message element the moment discord renders it (for a plugin)
kthxbye

#

:3

stark spire
dense sand
#

the demon is taking his time

#

goddamit why is kotlin so bloated

dusty moth
winged mantle
#

i want a refund for that memory i allocated

#

malloc and refund

valid jetty
#

“”””buy”””” memory and lose it because you don’t own media in this society anymore

#

pirate_memory() and free()

dusty moth
dusty moth
valid jetty
#

idk why people make such a big deal out of it as if its some complicated thing

still jolt
# dusty moth haskell

oh god ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

dusty moth
fleet cedar
dusty moth
#

semigroups are just associative operators

dusty moth
fleet cedar
valid jetty
#

aka abstractions

#

.

#

Promises in js are a monad

#

Options in rust are a monad

#

.

fleet cedar
#

Turns out lots of things are monads

valid jetty
#

yeah

#

lol

#

oh yeah i thought this might be cool to post here

#

i wrote this a while ago

#

Option<T> but for typescript

#

with (mostly) the same semantics

#

theres no .map and stuff but the main concept is there

calm ruin
#

is there anyone who loves rust option

#

yeah lets use unwrap everywhere excellent choice

valid jetty
#

i love rust option

calm ruin
#

@royal nymph rosie needs help

#

provide her help

calm ruin
#

WHY

#

YOU COULD JUST CHECK IF KEY EXISTS

valid jetty
#

true but i wanted an excuse to write this abomination of typescript code

calm ruin
#

you are deranged

dusty moth
#

and why do you bind immediately before apply

crimson mango
#

Is there any way to get the admin password with a script?

fleet cedar
#

No

deep mulch
#

that's just the ecosystem and java

nimble bone
deep mulch
nimble bone
deep mulch
#

nop

deep mulch
# nimble bone

I make text replace plug-in that checks good person plugin replace list and inserts a random invisible character

autumn sigil
dusty moth
#

opinions on interpreted rust?

deep mulch
#

interpreted

dusty moth
#

i believe you enjoy

cerulean plover
ionic lake
fleet cedar
viscid grove
#

I think i figured out why
I think it was in an iframe

ornate quiver
calm ruin
#

kotlin so bad

somber scroll
#

i think he got scared and i got mad

dawn ledge
dawn ledge
#

and two, you dont unwrap in library code, you propogate

#

so unwrap is mostly used in binaries

dense sand
calm ruin
#

if let Some(option) blabla

#

still very ugly

dawn ledge
#

dont do that then

#

let thing = option? umuCool

#

or better use match

calm ruin
#

bad

#

badbadbad

dawn ledge
#

hater

calm ruin
#

yes

dawn ledge
#

haters be hating

calm ruin
#

I hate options

#

just know if object is null

dawn ledge
#

i love options

valid jetty
fleet cedar
#

Certain operations treat them the same, you mean

calm ruin
#

🤢

dusty moth
calm ruin
#

options are just nullables with wrappers

dusty moth
fleet cedar
#

Nullability implies pointers

dusty moth
#

@NotNull Optional<~>?

fleet cedar
#

Option<u32> contains zero pointers

valid jetty
#

technically

#

very technically

#

the Option enum is a compile time construct actually

#

so yes zero pointers

#

hm

valid jetty
#

options are safe nullables

#

and monads

#

and an enum

#

and have the name "option"

#

hopte this helps!

dawn ledge
#

i leave when someone pulls up functional programming lingo

valid jetty
dusty moth
valid jetty
#

but being real Options being monads are a real disctinction from nullable things

dawn ledge
#

what is a monoid
what is an endofunctor

#

what is anything

#

i do wanna try fp some time tho

valid jetty
#

well i mean

#

you dont really need to know what that stuff is

#

ive said this like 5 times in the past 2 days but

dawn ledge
#

i get fomo

valid jetty
#

a monad is just a way to abstract some complex system away from you

dawn ledge
valid jetty
#

option abstracts away the lack of a value, promise/future abstracts away async/await, mutex abstracts away threading and deadlocks, etc etc etc

dusty moth
#

there has to be a better way to write this

valid jetty
#

???????????

#

have you ever heard of the question mark operator

dusty moth
#

yes

valid jetty
#

okay so make a function that returns Result<T, U>

#

and use that there

#

oh well technically

#

i guess specifically for this function that might be the best way to do it

#

but i dont want to believe that

#

lc.ocr

visual shellBOT
# valid jetty lc.ocr
let SocketAddr::V4(ip, _) = addr else {
};
self.protocol_error(ProtocolError:: Ipv4Expected);
None?
let Some(user) = User: by ip(ip) else {
};
self.protocol_error(ProtocolError:: NoAssociated User);
None?
let Some (packet) = self.recv() else {
};
self.protocol_error(ProtocolError:: ReadFailure);
None?
let C2SPacket :: Open (secret) = packet else {
self.protocol_error(ProtocolError:: SecretExpected);
None?
};
todo! ()
dusty moth
#

hold on it broke

valid jetty
#

could you like

#

use and_or_else

#
let user = User::by_ip(ip).ok_or_else(|| {
    self.protocol_error(ProtocolError::NoAssociatedUser)
})?;
fleet cedar
dusty moth
#

protocol_error moves self (and drops the field)

valid jetty
dusty moth
fleet cedar
#

The monadic thing is that you can flatten the difference

dusty moth
dusty moth
valid jetty
#

i see

dusty moth
#

you can do similar things with Result (Ok, and_then)

fleet cedar
#

A monad is a functor (map) that also has monadic operators (join/flatten and pure)

valid jetty
#

<*> and <* stuff

#

i forgot which one is for fmap

dusty moth
dusty moth
fleet cedar
dusty moth
#

<*> is for applicative functors

#

>>= is monadic bind in haskell

valid jetty
valid jetty
fleet cedar
#

Applicatives allow lowering tuples, (f a, f b) into f (a, b)

valid jetty
#

yep

dusty moth
#

isn't that just \a b -> (,) <$> a <*> b?

fleet cedar
#

(<*>) = fmap (uncurry ($)) . lower

#

Though haskell defines applicatives in terms of <*> for some reason

valid jetty
#

haskell is so,,,,

#

easy to read

fleet cedar
#

Wait no I'm getting the curries wrong let's just write it out a <*> b = fmap (\(a, b) -> a b)) (lower (a, b))

dawn ledge
#

i love haskell

dusty moth
valid jetty
dusty moth
#

(by hand; the translator produces unreadable code)

fleet cedar
dusty moth
#

it can be made pointful by hand

#

also is there a way to hint to rustc that a match branch is very, very unlikely to be called?

#

specifically, the case that a map didn't have a certain key, but did after upgrading to a write lock

#

nvm

#

certified shitcode

fleet cedar
#

I think there's a #[cold] attribute, but I think it can only be used on functions

dusty moth
#

it'd be cool if this were acceptable tho

valid jetty
#

the comments are getting to me

#

lmfao

dusty moth
fleet cedar
#

Ooh, hardcoded timestamp

#

Juicy

dusty moth
dusty moth
#

$Id: ... $ is a RCS tag that is updated automatically on checkout

#

which is why I immediately slice it

#

(yes, RCS is single-file. this file is 351 lines)

pine reef
#

yeag

dusty moth
#

(and this isn't originally my repo)

fleet cedar
#

Just include_str!() it

dusty moth
fleet cedar
#

That sort of stuff has no place in source code

dusty moth
#

RCS does a textual replacement when the file is checked out

#

(and removes the contents when checked in)

#

i don't have anything to include_str

fleet cedar
#

If you can insert that string into source code, you can insert it somewhere else

dusty moth
#

only one file to work with

#

otherwise I would've split it a long time ago

ornate quiver
dense sand
#

i love c# so much 🥰 so readable code

#

although O(n^4) sounds more like a skill issue

valid jetty
#

@nimble bone ```cpp
int main() {
for (int i = 10; i --> 0;)
printf("%d\n", 2 * i+-+-+-+-1);
return 0;
}

#

when is this beauty of a code gonna be added to nin0chat

signal oakBOT
fleet cedar
#

But there are four -s, so isn't it +1

valid jetty
#

i love the approaching operator (-->)

#

no

deep mulch
#

why

valid jetty
deep mulch
#

@valid jetty

fleet cedar
#

Yes, that's 2n+1 for n = (0..10).rev()

valid jetty
#

no because its going down

#

19 is the first output

#

1 is the last

deep mulch
#

guh

fleet cedar
#

Fine

valid jetty
#

is there any way i can clean this up more

#

i basically just tried to clean up the quake 3 fast 1/sqrt(x)

fleet cedar
#

Why are you interpreting the f32 as a i64

deep mulch
#

I don't like the missing return type on the first function

valid jetty
#

you interpret a float as an integer

fleet cedar
#

No, it uses i32

deep mulch
#

inferred return type should only be reserved for short expression functions

valid jetty
valid jetty
#

which has the minimum size of i32 but can be wider

#

tbf i think i could have used i32 yeah

#

yeah that still works

fleet cedar
#

You're reading 4 bytes of garbage

valid jetty
#

when you put it like that

#

that makes sense

#

however it doesnt really matter because those bytes will never be used for anything

#

any operations done are done within that i32 bitspace

fleet cedar
#

The bitshift might shift in one bit of garbage into the mix

valid jetty
#

maybies

#

i love ```
git reset --soft HEAD~
change the code
git commit -m "aaaa"
git push --force

#

on small scale projects like this where commits dont happen often its great

fleet cedar
#

git commit --amend

valid jetty
#

that works too

valid jetty
#

inferred return type is literally just stolen from the type of the return statements

#

the compiler will warn you when you use it with another type

deep mulch
#

no one's gonna wanna read through a 200 line function to see what it returns, if at all

#

js does it too

#

just make it required to specify return type for functions

valid jetty
#

but i think its fine because youll get errors if it isnt what youre expecting it to be

#

and you can explicitly define it if you like

deep mulch
#

idk I personally hate it

valid jetty
#

fyi doing this also declares what kind of type constant literals are

#

or well

#

returned constant literals*

deep mulch
#

do

valid jetty
#

if you set the return type to f32 and you return 5, it will interpret that 5 as 5.0

valid jetty
deep mulch
#

require specifiying return type

valid jetty
#

i think i would rather leave it to the implementation developer

#

if they feel the function is big enough to warrant an explicit return type then theyll do it themselves

#

but making it explicit feels a bit boilerplateish when the functions are very small (which they very often are)

deep mulch
#

guh

dusty moth
#

you have a stack of patches on top of the latest commit for e.g. features

#

and in that stack you can reorder, edit, or commit at will

solid gazelle
#

similar cause vscode isnt an ide i think but it has that

#

i think for js it work

deep mulch
#

Elle ide when @valid jetty

solid gazelle
#

pj

#

i was so confused

#

this is programming channel

#

i thought it was regulars but i tabbed to offtopic then to regulars and thought the whole convo just banished

deep mulch
#

insane

valid jetty
dawn ledge
#

nice generics

#

please seek help

naive bane
#

anyone knows how chrome os version scheme is

#

is it like

#

normal chrome

cerulean plover
#

something like it as far as i'm aware

dense sand
#

help me i fell in love with c#

#

even though im mostly java dev 😭

cerulean plover
dense sand
#

doesnt feel that bad when you realize that the shit thing about c# is visual studio

valid jetty
#

garbage collected

#

string operations clone instead of viewing

#

inheritance

#

no variadic methods

#

pascal case

dense sand
valid jetty
dense sand
#

i know about:

void Test(params string[] args);
#

or smth like that

valid jetty
#

yeah that's variadics of 1 type

dense sand
#

java doesnt have that either afaik?

#

oh well you werent comparing it to java right?

valid jetty
#

wait how does c# do writeline

valid jetty
dense sand
#

Console.WriteLine(object)

valid jetty
#

i literally put inheritance as one of the downsides

valid jetty
#

or with string interpolation i guess

#

but that's variadic with multiple args

#

i wonder how

dense sand
#

lol

valid jetty
#

oh my god

#

😭

dense sand
#

its capped lmao xD

valid jetty
#

masndjahfjaehfjwehfjwebguwehfuwebfiwefjjewhgwekghwejhfwefihsdfbfuiregfoyiesfgofwyueregfr0uyfgqer

dense sand
#

even java has printf

#

c# gotta use their shitty interpolation

#

(on the other hand, java doesnt have one - ||well it did(added in 21 as preview), but was removed in 23||)

#

who tf would interpolate with backslash

valid jetty
#

string interpolation imo is a gimmick

valid jetty
#

\ means you don't need to escape it ever

dense sand
#

"\{variable}"

valid jetty
#

yes

dense sand
#

wth is that

valid jetty
#

it's a very nice way to do it

dense sand
#

imagine combining this into regex

valid jetty
#

that's the one thing i like about swift

dense sand
#

very beatiful

#

altough $ wouldnt make it better

#

still more standardized though

valid jetty
#

but again string interpolation is a gimmick imo

#

this is still perfectly fine to read

dense sand
#

im okay with printf or concat lol

valid jetty
#

even concat yeah

dense sand
valid jetty
#

no lol

dense sand
#

rust?

valid jetty
#

swift has \(thing)

valid jetty
dense sand
#

ah i see

#

i still dont know how to make a parser xD