#πͺ -progaming
1 messages Β· Page 43 of 1
oh husk
old women voted for this in 2013
cause women need voting rights
even when sending men to mandatory military service
lol
ripp
Twitch https://twitch.tv/ThePrimeagen
Discord https://discord.gg/ThePrimeagen
Become Backend Dev: https://boot.dev/prime
(plus i make courses for them)
This is also the best way to support me is to support yourself becoming a better backend engineer.
LINKS
-- Ryan Dahl | https://x.com/rough__sea
-- https://deno.com/blog/deno-v-oracle...
doesnt really matter since github blocks a lot of major api keys
they should hop on a boxing match, larry elison vs ryan dahl
@hoary sluice do it

i have a css challenge
and fuck i'm 99% sure its not possible
wikkid
Zed team doesn't work on windows support, only community works on it
that's why they don't provide windows builds
i had 10 words
yea I know
@placid cape @hoary sluice @spark tiger do this
tape on letter with 10% margin and smooth scroll
@woven mesa @woven mesa you said this was possible how
@broken shore do you know..
I wanna render macos button as image
because bored
which
idk
i need to learn to type without mistakes
just render
like u would normally
How did you change it so it goes in line
scroll up
@valid jetty is this
or 
#[macro_export]
macro_rules! builtin {
($name:ident, $location:ident, $($arg_name:ident),* => $body:block) => {
pub fn $name(args: Vec<Value>, $location: Rc<Location>) -> Result<Value> {
let mut iter = args.into_iter();
$(
let $arg_name = iter.next().ok_or_else(|| Error::new(ErrorKind::InvalidArguments, Rc::clone(&$location)))?;
)*
$body
}
};
}
#[macro_export]
macro_rules! add_builtins {
($($name:ident),*) => {
pub fn add_builtins() -> HashMap<String, fn(Vec<Value>, Rc<Location>) -> Result<Value>> {
let mut builtins = HashMap::new();
$(
builtins.insert(stringify!($name).to_string(), $name as fn(Vec<Value>, Rc<Location>) -> Result<Value>);
)*
builtins
}
};
}
builtin!(print, location, value => {
println!("{}", value);
Ok(Value::None)
});
builtin!(add, location, a, b => {
match (a, b) {
(Value::Integer(a), Value::Integer(b)) => Ok(Value::Integer(a + b)),
(Value::Float(a), Value::Float(b)) => Ok(Value::Float(a + b)),
_ => Err(Error::new(ErrorKind::InvalidArguments, Rc::clone(&location))),
}
});
builtin!(sub, location, a, b => {
match (a, b) {
(Value::Integer(a), Value::Integer(b)) => Ok(Value::Integer(a - b)),
(Value::Float(a), Value::Float(b)) => Ok(Value::Float(a - b)),
_ => Err(Error::new(ErrorKind::InvalidArguments, Rc::clone(&location))),
}
});
add_builtins!(print, add, sub);
Shouldn't you do some check that there aren't too many args?
i dont have any type checking yet anywhere
thats next
after currying
You are checking that there's not too few arguments though
i added auto print here cause you cant chain functions yet
yes
im not checking that theres too many compared to the type definition
fn : a b c
fn a b = a + b
fn 7 7
is valid
it just ignores the part behind the :
Is my mixed usage of C and C++ a Sin or not ?
π
Here it is as a gist
https://gist.github.com/Julienraptor01/29c3d0ab2edb430712bacc919b3a2ec9
I use C-way if it's better/I already know it (like printf) and C++-way if it's more convenient (like std::string)
probably also a sin
It's exactly what i did
I used getline and ifstream because streaming the config lines just feel perfect
But otherwise my code is pretty much C because it kinda just works nicely enough
I don't understand how anyone could be masochistic enough to use strcpy and its ilk when std::string is available
I had a good reason
I kinda forgot why
But i'm pretty sure i had to use C style strings
Also it's like fine
.c_str() exists for when you need that
You can't mutate it
I think that was the reason
Also i'm not annoyed by pointers, null, malloc, etc
why am i so slow
(this isn't my first attempt)
although my first attempt last night somehow i got like 120 wpm i think
but forgot to get a good ss
ur not slow
100+ is good
70-90 is avg
140+ is like ε€εΊγη³»
or like θ触γγͺγη³»
but look how bad i am at brainfuck :(
progamin
I never learnt how to type with all ten fingers
yeah that seems accurate
i just introduced my mom to monkeytype lmao
55wpm english 70wpm russian
My friend tried monkeytype in school
36wpm English
I'm 100% sure that my mom will be even slower
My gf was around 45 if I'm not mistaken
lol i thjink i just convinced my mom to try a mechanical kb
nooo someone sniped my name on monkeytype
https://monkeytype.com/profile/Rushii
does that help?
I typed on my school laptop
did for me at least
i type faster than when I used a membrane ages ago
ur russian__
she should get a split ergonomic low profile mechanical keyboard
my pb is on membrane
why does firefox pack js files into a jar
π why did discord pick an emoji from another server
it has meta-inf and all
Webjars ig
pretty sure firefox has no java code so it's weird
Idk why webjars exist
same
probably some infrastructure in the code runs on the js runtime
jar is for java though...
java archives can contain resource files and assets, aka files that are not .class
relative to classpath those files can be read from the jar through a file pointer in a jar (zip) file system
yea but how would any java program use these js files?
perhaps tomcat somhow?
again mentioning
Just like .class files can be fed into java.exe .js files are fed into a js runtime like v8
In firefox case probably whatever runtime they use
Wow no shit
I mean jarfiles are just a zipfiles
But I honestly think its webjars, like theres no other use for this
Try downloading any webjar and see if the content is similiar
Then dont ask
I already said that here
Ok
.
That doesn't answer my question though
The jar file doesn't contain any classes
Only resource related files
Why isnt it in a different format then? Why specifically jar
The java process would spawn a subprocess of the js runtime that executes the js files
(or use internal apis if the runtime is in java)
Thats extremely unlikely
Its 100% either of those
Why would they do that
What?
Like i said
.
Fun fact, even YouTube on Android does that
Even more fun fact, react native does that
Aka discord for android
"webview" is a broad term
React native renders on an android view
Can be considered a "webview"
Well react native uses native components
A system runs off multiple platforms, you mean the runtime platform or the host platform
Uhh, i don't think it supports AOT compilation. RN saves a bundle.js or cjs aka js bytecode and the RN runtime implemented natively to android runs it
Aka
That means, that react native will e.g. for text use androids native text component
Yea iirc
How'd that work
Never worked with it
Flutter compiles dart AOT to host platform code (iirc)
I suppose they have wrapper library for each platform
Aka native, not dalvik/art
Which is what android textview is
And i dont think RN does dalvik/art either
I mean the flutters approach would sound most suitable
Both is suited, RN is a runtime, the same way dalvik is
Or art (android runtime)
RN runs .js files, art runs .dex files
Both are implemented native to the host (android)
You can have a fully native android apk, zero dalvik/vm
So you can launch a RN runtime without any dalvik runtime
It is true
I dont think so
Hold on
RN uses dalvik cuz skissue
(its easier)
But android NDK provides all android apis natively
RN technically can be developed entirely without needing dalvik apis
Just dont use react native at all and you're good
Flutter DX is absolute dog shit
Kmp looks good too
Shitass dev env, shitass language dart
No
You do
KMP is a build system framework. It just applies the android plugin to the module
And the kotlin plugin to register kotlin/ as a src and compile via kotlinc
So what gives you the apk is simply the android gradle plugin
Kmp is just orchestrating it for you in the build system cleanly
Cool
Kotlin compiles to .class the same way java does. Then d8 from android transpiles .class to .dex
The android plugin and kotlin plugin in gradle work together to pull that off
Yup, i love kmp
Not an android dev here tho
Kotlin is goated
Yea
Agreed
I did aoc last year in it
I like it more and more
Definitely better for gradle than groovy
And it hasn't reached it's plateu yet. Kotlin has incredible DX unlike any other language, especially how seamless kt DSL and the libraries are
Groovy dsl is horrible
Hell yeah, fuck groovy lol
Good thing gradle switched to declarative kotlin
Yup
Developing gradle plugins in kotlin was actually enjoyable
Altough gradle api itself is still ass
Gradle is cool too, since its driven by plugins. Theres a java, kotlin but also even a node js or cpp plugin etc
It's complex, not ass per se
But it needs to be complex to be flexible
Well docs is difficult especially for a rapid changing api at such a scale
I had to ask multiple times on forums cuz I couldn't find some stuff
I have weeks long of discussions on the forum lol
Yea it looks like they deprecate half of the shit every version
But other than that it's quite enjoyable to use
Well thats not too bad, you can migrate to new api quite easily, since the inline docs explain how, this issue hasn't even hit me for numerous gradle versions even at all
Well its been quite a while since i made plugins too lol, so perhaps things changed
It's not a predictive at first sight api, not the greatest ux, kotlin is like on the opposite spectrum in that regard
thats really interesting
SO TRUE
.so exports a function which you specify in the manifest and Android calls it
yeah
a house made of cards is more stable than gradle + kgp + agp + IntelliJ/AS put together
The analogy is wrong
https://www.youtube.com/shorts/lJyLoZI6K0c @hoary sluice

literally me??
also my backup codes are written on paper so just burn the paper cause its insecure
thanks for letting me know
i don't save backup codes
I'm going to destroy all of your 2fa sources

thats only bitwarden so steal my raspi, computer and iPhone and im basically done for
~/Desktop/codes/*
do yall know if this is good way of seperation or not
should i be making a seperate crate for cli?
@valid jetty do you have opinions
i have no opinions but i can tell that it is Blazingly Fast and Memory Safe
the only thing i can say is that rust seems really good for refactors, i basically copy pasted and resolved the imports the compiler had issues with and now it works perfectly
this used to just be the cli+lib combined into files
(i.e. without the cli folder)
i think i do have opinions every once in a while yeah
is the code in the file with same name completely different to the other one but linked in some way
because if yes then thatβs fine
the one in cli::*?
both
is apticket.rs completely different to cli/apticket.rs but theyβre linked in some way
then yeah thatβs fine
no need to separate out the cli from the lib into another crate?
hm
also @valid jetty which idea is better: having a bunch of const [u8; 4] or an enum solely for consts which implements To<[u8; 4]>
you mean Into<[u8; 4]>? enum all the way tho
right yeah Into not In sorry
ok cool i shall transform it into enums
now i need to implement Default, impl From<&MyType> for MyReprType, impl From<MyType> for MyReprType, and impl From<MyReprType> for MyType for every enum that i have to make it work nicely with binrw

is there any way to make this better
impl Copy which gives you MyType from &MyType and then you shoot 2 birds with 1 stone
dont u still need to provide a boilerplate impl for impl From<MyType> for MyReprType tho
that's just (&value).into()
yeah i meant you no longer need to make it for both owned and roref
i mean it makes the implementation for owned shorter but doesn't completely eliminate it
so
no you dont
disgusting
this caused me to physically recoil in pain
i did this to your computer because i love you so much πππ
hope it helps
thanks bestie
anonymous hackers once again terror the os internals
kotlin
π₯°
what exit code is cold blood
1
-9
what exit code is Exception: code turned into hatsune miku
39
true
Ok, is it flutter thats eating half a gig of ram or my horrible optimization skills.
Both
Is flutter just not well optimized?
guys i'm becoming a crab
5 billion tabs
you don't even imagine
i have around 700 tabs rn
my browser is my mind
and my mind is a stack
and someone forgot to pop
I think you might have lost the return address then
i'm calling function inside of functions inside on functions and that never ends
good luck finding your way back
@hoary sluice how much your hardware for voice assistant cost?
its a raspberry pi 4, a 3d printed case and a 2β¬ pcb from jlcpcb, the raspi is 60β¬ but the voice assistant works on any unix system
nice
mine is like 300β¬ because I don't pay for it
so it has rpi 5 8gb ram etc.... xdddd
yeah mine will also work anywhere
<div class="tabs">
<div class="tab">
Home
<button class="close-btn" style="">x</button>
</div>
<button class="addTab" aria-selected="true">+</button>
</div>
.close-btn {
color: white;
background: transparent;
border: none;
height: 100%;
margin-top: 0px;
font-size: 100%;
}
.tabs {
height: 5vh;
width: 99vw;
overflow-x: auto;
white-space: nowrap;
scrollbar-width: none;
-ms-overflow-style: none;
margin: 0;
margin-top: 0px;
margin-left: 0px;
}
.tabs:first-child {
margin-left: 0.3vw;
}
.tabs::-webkit-scrollbar {
display: none; /* For Chrome, Safari, and Opera */
}
.tab {
display: inline-block;
padding: 1vh;
border-radius: 10px;
border: 0;
background-color: #25252a;
color: #ffffff;
font-size: 2vh;
height: 2vh;
line-height: 1.3vh;
vertical-align: middle;
box-shadow: 0px 0px 7px 1px #9902b9;
margin-top: 0.6vh;
margin-left: 0.1vw;
}
.addTab {
display: inline-block;
padding: 1vh;
border-radius: 10px;
border: 0;
background-color: #25252a;
color: #ffffff;
font-size: 2vh;
height: 4vh;
line-height: 1.3vh;
vertical-align: middle;
box-shadow: 0px 0px 7px 1px #9902b9;
margin-top: 0.6vh;
margin-left: 0.1vw;
}
.tab:hover {
background-color: #333333;
}
i cannot for the life of me get the text vertically centered π
@nimble bone
@valid jetty is it a better idea to create a struct that borrows from the data it's read from (&'a [u8]) or make the struct own the data (Vec<u8>)
is cloning critical to the performance of your program
maximum would be about 200 MBs
idk if that's considered large enough for perf issues
cloning is bad unless cheap
yeah
potentially
husk
but like modified entirely not just one slice
for context this would be like img3 ramdisks
well then you can have an Rc<Vec<u8>>
no lifetime
and you can change out the underlying data by just setting the field to a new rc
but so is it a good idea to have a reference then?
yes
hm
cloning an array with 200mb of data isn't a very good idea
so either have an rc (which is very cheap to clone because it just clones the pointer and increments the ref count) or have a &'a
but depending on how you're using the array &'a might be more painful
what about a std::borrow::Cow
hmmm
i think that might be better but you said you don't wanna mutate specific parts of the vec only swap out the whole thing
so Cow may not be necessary
oh hm, but then Rc would imply moving the value anyways
why would it move the value
so then i wonder if there's any perf benefit over straight up moving from the initial data buf to the struct
Rc::new's function signature is pub fn new(value: T) -> Rc<T>
value being T would imply a move
i would imagine this is also one of the reasons why it doesn't have a lifetime
to create the rc yea, but the benefit is that the value is not tied to a lifetime unlike &'a [u8]
lifetimes are good until you get stuck in 'a does not live long enough hell
but then is there any perf benefit of doing that over moving the data to the struct directly as a Vec<u8>
as that would entail no cloning
yes because Rc<Vec<u8>> is a lot cheaper to clone than Vec<u8>
as vec<u8> would clone its whole buffer too
rc would just clone the reference
i mean, that's also assuming you're gonna be passing the vec anywhere else or cloning the entailing struct
if the only thing you're doing is
- put the data in the struct
- loop through the data 10 lines later
- drop the struct
there's not really a difference
yeah just wondering if that ever happens
i would imagine this struct is mostly pass-by-(mutable)-reference
i believe it is safe to say that the struct itself or it's data won't be cloned unless it's an operation which changes the Vec<u8> anyways (?)
then it's probably just easiest to use whatever is easiest out of the data you have that you're going to put into it
like if you have a &'a [u8] just use that
hm
pretty sure i have never pushed a commit that contained lifetimes
idk what the advantage is of lifetimes vs owned type & rc
owned + rc requires data to be moved into it, is heap allocated, and no mutability unless you have Rc<RefCell<T>>
however refs require explicit lifetime management even though they're stack allocated
technically a 'static is possible if you wanna leak everything lmao
probably fastest for compilers
dropping can be an overhead if you do it very often
makes sense
since when have windows devs ever cared about performance lmao
stack vs heap is so confusing i dont think theres a lot of things i can allocate on the stack in a compiler
and most macos devs make ios apps so again, not really using rust
i use rust cause its ergonomic and not annoying to use
wdym
think of the stack like a cache
like everything related to the code, ie tokens, ast have to be heap allocated cause their size is not known at compile time right ?
you don't have a lot but it's very fast to access
no lol
ok im watching a video on stack vs heag tomorrow
you have a Box<AstNode> because it's impossible to calculate the size of a recursive struct
you need to add indirection
it's like having a struct with itself inside in C
vs having a struct with a pointer to itself in C
yes and that goes on the heap cause idk its size at compile time??
no, that goes on the heap because it's a very ergonomic abstraction, and because refs can't be null
if refs could be null then you could have a &Self
is it actually in another location that's not RAM? i had always assumed it's allocated in a similar way the heap is
it is in ram it's just faster to access than the heap
it's allocated in exactly the same way
or well
on the IR level it is
hm why exactly would this be actually
alloca/alloc8 vs malloc
there should be no reason except for the fact that most of it is in cache
the heap isn't contiguous, it has fragmentation, so you need to keep track of allocations
stack allocation is just subtracting a number lol
nono not the allocating part, the accessing part
like an access on the heap should be the same perf as access on the stack no?
(not counting cache)
allocation is defo fast bc of what you mentioned
i think cache locality is the only reason it's faster
yeah
both are pointers in C there's no reason 1 pointer should be slower to access than another pointer
so you could also allocate a static array using malloc in your program and just use that for similar perf
i mean yeah that's actually what most VLAs in C do lol
the buffer is just a malloced static array
huh isnt that alloca'd
which is the realloc'ed when you wanna change its size
thus being on the stack
nop, dynamic arrays are heap allocated
interesting
you can't exactly "free" memory on the stack
i always assumed they were alloca'd
unless you do bookkeeping and then like make free chunks and make an allocation wrapper
but at that point just use the heap
yeah you can, you just subtract the ptr back
!
lmao
how would it grow and shrink if it was alloca'd?
array.le: Lines 78-101
fn Array::with_capacity<T>(i32 initialCapacity) -> T[] {
T[] array = #alloc(Array<T>);
array.elements = #alloc(T, initialCapacity);
array.size = 0;
array.capacity = initialCapacity;
return array;
}
fn Array::new<T>(ElleMeta meta, ...args) -> T[] {
T[] array = Array::with_capacity(2);
for i32 i = 0; i < meta.arity; i += 1 {
array.push(args.yield(T));
}
return array;
}
fn Array::resize<T>(T[] self, i32 newCapacity) {
self.elements = #realloc(self.elements, T, newCapacity);
self.capacity = newCapacity;
}
"variable-length array"
well yeah it's variable length because the length to allocate is unknown at compile time
once it's known in runtime i think atleast C's VLAs stay at the same size
usually vla's are known to be arrays that you can push and pop from
i bet there's no resize function for VLAs in C
what
what do you mean by vlas in C
i have never heard this
char x[]?
yes
that's not what i'm talking about lol
vla's are used in most scenarios to refer to like, the resizable dynamic arrays
hang on
oh you're using the wrong terminology i think
"Growable arrays (also called dynamic arrays) are generally more useful than VLAs because dynamic arrays can do everything VLAs can do, and also support growing the array at run-time. For this reason, many programming languages (JavaScript, Java, Python, R, etc.) only support growable arrays. Even in languages that support variable-length arrays, it's often recommended to avoid using (stack-based) variable-length arrays, and instead use (heap-based) dynamic arrays.[4]"
whaaaaa
VLAs are strictly runtime allocated static arrays
ive always called them vlas
well now you know
and yeah ofc those growable arrays need to be on the heap
that's basically just a Vec<T> atp
i wrote an example thing but its too late lmao
oh well
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int len;
int cap;
int *buf;
} IntArray;
IntArray *IntArray_new(int cap) {
IntArray *self = malloc(sizeof(IntArray));
self->len = 0;
self->cap = cap;
self->buf = malloc(sizeof(int) * cap);
return self;
}
void IntArray_push(IntArray *self, int value) {
if (self->len + 1 >= self->cap) {
self->cap *= 2;
self->buf = realloc(self->buf, self->cap);
}
self->buf[self->len++] = value;
}
void IntArray_free(IntArray *self) {
free(self->buf);
free(self);
}
int main() {
IntArray *x = IntArray_new(8);
IntArray_push(x, 1);
IntArray_push(x, 13);
IntArray_push(x, 39);
for (int i = 0; i < x->len; ++i) {
printf("x[%d] = %d\n", i, x->buf[i]);
}
IntArray_free(x);
}
Pp
this actually makes so much sense
macos devs write ios apps
windows devs write c# apps
what do linux devs write? C and rust
good luck getting swift or c# working well on linux
it makes sense
Apparently i cant run my jvm implementation on avr because it has only 4kib ram
Poo ur not checking for allocation failure
i know next to nothing about css but is anyone able to make this work again? or like, an emojis get bigger ONLY when hovering type of thing, not constantly?? smthin for the blind fucks with tiny emojis π
seems pretty trivial to me
i only changed the --custom-emoji-size-jumbo-emoji css variable from 3 rem but idk if thats the intended way
oh your saying not constantly
idk lol
yeah i dont want all emojis huge constantly just like, basically the ability to click n make 'em big or hover them so theyre easier to see for a moment :x
but that snipit is the only thing i found, and it doesnt seem to work anymore
.popoutContainer__0f481 img.emoji {
width: 96px;
height: 96px;
min-height: 96px;
min-width: 96px;
}
works with this quickcss when you click emoji it becomes 96px
again ive never done this before
it might be the wrong approach
π i love u
maybe play with the css a bit so it looks centered or sum
@hoary sluice what do you use for nlp?
anybody wanna make a discord bot in react? https://x.com/alistaiir/status/1890902458257293549
That looks like jsx, sure, but I don't see where react comes in
jsx is very often connected with react so people just mess it together
Foolish
yea
i wake up and see this
They're adding functions to CSS. Yes really, functions. This is quite an interesting read, hyped to go over it with y'all.
Thank you Sevalla for sponsoring! Check them out at: https://soydev.link/sevalla
SOURCE
https://www.bram.us/2025/02/09/css-custom-functions-teaser/
Check out my Twitch, Twitter, Discord more at https://t3.gg
S/O Ph4se0n3...
Css is becoming turing complete
i also have a parser thats just a match statement
man i miss the good old days where our :has were input checkboxes with labels nested down
i still do that
or storing UI state in # and querying it with *=
i remember still the old expandable FAQ i made
and it expanded with hash
if malloc fails i think you have bigger issues on your hands than the array causing a segfault
malloc failing implies you completely ran out of memory (including virtual memory)
if that happens then uhm you have some larger problems
@solid gazelle do
tbh that feels a lot like ddbkit
thats true lol, but still it should be checked
(i dont null check it either in half of my codebase)
i feel like i grew a brain tumor by reading this
streams ARE ASYNC ITERABLE
they have built in async iterators!!!!!
you dont need any conversion
REEEEEEEEE
why are JS devs everywhere so incompetent!
it is such a bad example
just add multithreading to javascript at this point
they are overcomplicating shit too much
we have that
workers
they are just cancer to work with
probably more cancer than java threads tbf
which is why i wrote this.
Because they're horrible
to set up, yes
oh really huh
why th is building next apps so slow
like i swear to god every docker build i do takes like 2 mins
altough most of it takes the actual bun install lol)
your issue is next and bun...
π
i think the issue is react + webpack
well with node it takes around the same
so deps installation takes aroudn the same as the actual next build
im a real fan of nextjs but the build performance is horrible
trust me it can always be worse
takes over a minute for my build so far
not even halfway done
5805 modules transformed
yeah currently my builds take 5-6 minutes on 3 os's at once via actions
but its gonna get a lot worse
electron!
electron app via webpack
but its gonna change to electron app via webpack via esbuild
ofc i skip the electron building part since thats once every few weeks
but it takes a few hours
whats the simplest yet pretty secure way i can do auth in my js app
i dont want to mess with stuff like betterauth or authjs or supabase
thats too heavyweight
use oauth lmao
google, facebook, etc login

i cant use use that, because the thing im making is made to be selfhosted
wow ass software
bun jumpscare
yea well it seems like i will end up with sqlite3 dependency π
i wanted to use atleast some bun features
to make my webapp blazingly fast π β¨
apparently i cant run bun on middleware π
cult
write ur own
node your beloved
my glorious creation
@dense sand i should really refactor this project
i have a 1000+ loc file with all backend routes
and 430 loc of frontend
wake word
use hono π₯ π
you can still do oauth
it would just be another thing to config
app id and secret
I want it to work ootb tho
i don't think that ideal can last but gl
implementing auth yourself is still a possibility
its not as hard as you think
Hmm probably
I want to use sqlite for some simple data storing, should sqlite3 package be optimal given bun doesnt work properly?
I want it inside a file tho
postgres does store it in a file
Huh? I dont want to have postgres server running
ig you can always move over if your project outgrows it
The simple data storing is mostly user credentials and some basic metadata
oh then yeah it might be fine
say you have a system of placheolders where you have a string like "Hello {{name}}!" and name is replaced with params
in node, i wonder if there would there actually be any benefit to "compiling" this string to
{ strings: ["Hello ", "!"], expressions: ["name"] }
?
but if there is i bet it would be negligible
maybe i should try on that js benchmark site but in chromium
(because node is basically v8 right?)
node is v8
i suck at coding so fucking bad
all this code just to make
a nestable menu
π
there's probably so much better of a way of doing it
idk i feel like i've deteriorated mentally
the air feels better here rn
whats good vencord
@woven mesa 
WRONG CHANNEL π
I THOUGHT I WAS IN REGULARS
Wtf is the second code
user creation
very long part of checking if you have a permission to be able to grant it
You can still integrate oauth
I'm sure it can be done way better
yop
Yes but once again, the dashboard should be limited to only authorized users, there's no point in integrating oauth
@placid cape
Well you don't understand czech, but essentially i wrote minutes and it autocompleted as maxnutes
Because teachers
im polish
so close enough
stopky??
Would any of you programers know a way for me to still receive notifications on my phone while being active on the desktop discord on my pc?
I needed the exact same thing when I was idling a game so feel free to use this (it's very basic but it works) https://github.com/wraithy/electron-session-idler
til vscode has been using ripgrep since 2017 
if only i knew why it's so fast 
i mean there's a writeup by the author but it's too complicated to me
(or i'm just lazy to read allat)
i should probably implement word wrap at some point
its hard to do in qt idk why
faster_whisper is faster than whispercpp
btw did you use rasa client for parsing or your match service
@valid jetty @deep mulch WTF https://blog.jetbrains.com/kotlin/2025/02/advent-of-code-2024-in-kotlin-winners/
congrats man
what do you use for tts? @hoary sluice
nothing yet
ok so basically: you normally don't
because that would require infinite precision on the numerical side
which you don't have
so either you get an approximation
WHY IS THIS VALID JS SYNTAX (i know why its valid, but this should really be a syntax error)
or you get a analytical solution from the start
['<img src="https://cdn.discordapp.com/emojis/1026533070955872337.webp?size=128" alt=":blobcatcozy:" class="emoji"></img>', 40]
['<img src="/assets/creature.png" alt="creature" class="emoji"></img>', 40]
ah yes, i love indexing the 40th element on an array
because why would i ever forget a comma
@austere anchor guess what lol
@nimble bone love?
so i was coding someone's exercice
and it turned to be HE WAS WRONG
and i was like wth
why is my python giving wrong answers
turned out
the person in the picture i was coding
was wrong
person?
he got Ο/3 but instead it should've get Ο/4
lol
so i thought the problem was from me because i didn't add sqrt
wthhhh

but yeah ig half of my code is useless
or maybe i want to find a way to convert decimal number to sqrt
i'll look on yt ig
noo surely just use sympy's solve function
idk how it works
(first argument is automatically assumed to equal to 0 btw)
so that it satisfies x^2 - 1 = 0
ok so type python3 in your terminal to start up a python console first
then afterwards type each line of this excluding the >>>
then this
i think i'll leave my code like what it is
the solution is all i need

@austere anchor ty for help btw 
im not exactly sure you have managed to solve the issue of square roots
but cool ok
i didn't

calculating the square root and then putting it is the best option for me mow

wtfff nice lol
??
whats so bad about this
nice
whatβs sympy, why not just math
this huge, gratz!!
finds solutions analytically and not just a numerical approximation
i.e. a computer algebra system (CAS)
not really sure what exactly that means, but aight π
in easier terms it just means it keeps the sqrt() parts for you instead of turning that into a number
like if you do sqrt(2) it will give you sqrt(2) and not 1.414...
hopefully that makes sense
You can't have methods on the number 2 either
That's usually not considered a noteworthy limitation
Impls are on types, not values
think the difference between something like mathway/wolfram and your scientific calculator
mathway and wolfram have ways to represent unknown values (and represent expressions as a result, like polynomials and indefinite integrals)
a scientific calculator doesnβt have a way to represent generic expressions with unknowns, it just computes the result based on calculations you define
the βunknownsβ you can set arenβt really unknown because they must have a value for the calculator to use them
even if you want to do something like a derivative with the scientific calculator you need to define the value of x for which youβre differentiating
a CAS system can just represent the βexpressionβ of the derivative instead of evaluating at a definite value
does anyone how i can prevent the text from going off the screen with css
ive tried max-width, but that hasnt worked
word-wrap
some form of wrapping
assuming you already have max width set to 100%
in your case it wasn't wrapping because it was technically all one word
love
its a feature
Alright @dense sand, in 7 hours, 53 minutes and 44 seconds: pos test
What's the rooster
no idea lmao
the Coq proof assistant
Coq is an interactive theorem prover first released in 1989. It allows for expressing mathematical assertions, mechanically checks proofs of these assertions, helps find formal proofs, and extracts a certified program from the constructive proof of its formal specification. Coq works within the theory of the calculus of inductive constructions, ...
i love coq !
incorrect.
calling ur language coq is crazy
have you heard of the https://en.wikipedia.org/wiki/CoxβZucker_machine
In arithmetic geometry, the CoxβZucker machine is an algorithm created by David A. Cox and Steven Zucker. This algorithm determines whether a given set of sections provides a basis (up to torsion) for the MordellβWeil group of an elliptic surface E β S, where S is isomorphic to the projective line.
The algorithm was first published in the 1979 a...
xddddd
If all variants have that field, refactor it to a struct Img3Tag { tag: [u8; 4], ty: Img3TagType }
the problem is, if i try to refactor it then i would also have problems with (de)serialization
surely theres a macro for this
how 2 make
how to make vencord plugin
Learn javascript and webpack shit
π
@dense sand, <t:1739880376:R>: pos test
Thank
#π₯-vencord-support-π₯ is closed so asking here ig
i synced my branch, but it won't build

oh wait yeah i think lockfile is out of date oops
sorry
oh also is it normal that discord always crashes on startup then recovers since the class roll a few weeks ago?
I did try removing userplugins a while ago and i think it still happened
why is Coq a "soylang" π
it uses uppercase keywords and its not a real programming language
its lobotomized haskell
what's a soylang
anything considered a corny or bad programming language is a soy language
but you use what you like, don't let others influence what you should use
/run
+[------->++<]>+.----.-[++>---<]>+.--[->++++<]>-.+[->+++<]>+.+++..[++>---<]>--.+[->+++<]>+.+++++++++++.
Here is your brainfuck(2.7.3) output @viscid grove
ok will do```
Since when does discord have bf syntax highlighting
Yeah it's not like they made the highlight themselves, it's just hljs isn't it
every programming language is inherently a soylang
excluding Swift
it even has brainfuck but not zig 
iirc
including
excluding
how
Sounds like a scam
Naurp
That's barely even a word
Narup
I am all in, where do I send the money to invest?
Probably referencing a recent geopolitical moron
search up the gulf of mexico situation
yeah i saw
who are you @steel scroll
hi
tole tole
yes
but it useful
how to learn TS for make vencord plugins
step 1: learn TS
step 2: make vencord plugin
step 3: profit?
anyone doing the ccc
there are a lot of things named ccc
cloudflight coding contest?
Canadian computing competition from UW (today)
that was the only other option π
does someone know why my width transition is not working?
what is this for
because you're not transitioning
you're replacing
there's no "from" value
you change width from 64 to initial to 0
you need to do isOpen && "!w-64" and have w-0 on the top class list
@dense sand
anyways, transitioning width is a human sin and you should be whipped for it
lmao
what to use otherwise though
read this article, it gives very good BASICS for making animations and transitions https://web.dev/articles/animations-guide
you should only ever transition css properties that dont cause layout shifts, recalculations and repaints
bro im making a sidebar and i want it to open fluently -_-
aka stuff like transform, opacity, and filters
transform: translateX(-100%) to transform: translateX(0%), and ofc overflow hidden or clip depending on ur scroll support
it should actually be translate3d because that is even faster, but it requires brain capacity to create
a sidebar with a width transition will repaint your ENTIRE dom structure, all elements EVERY SINGLE FRAME
or at least all sibling and sub dom elements
i suppose you would beat me up for this too(but the transition worked here for some reason)
because as i said
you have a base value defined
ohh
and just hard override it
hmm

you're essentially causing this:
which is painful
almost everyone i see has this exact problem
which is painful to watch
which is also why noone does sidebars, because no matter what u do you will tank ur performance
welp i hope that atleast the ui libraries like radix solve these things
v nice, been 4 years since last edition
yep
when will they stabilize if let ... = ... && cond... tho π
my default is nightly
I hate having pyramids in my code
apart from the rust analyzer whining, working on nightly is good
via overlay sidebars yeah
you can fix that a tiny bit
Why would they do that
most likely newer glibc issues
Someone hasn't found the releases section
the entitlement in open source is insane
the art of not caring is a wonderful phenomenon

Makes me happy every time i see it
@calm ruin are u a girl
MALE
π
why did u sob react bro
i wanted a 56 year old turkish girl
i WISH
so many things could be compacted if i had that
i currently have pyramids in my code from this not being stabilized
@valid jetty have you done AES encryption
could you hypothetically set up a mirror of a repo for the contents of a file and not the actual file itself
like the contents of the file, I want mirrored to a different one, but I wanna name the file something else
im the new rosie
rosie has become an ai
so the fucking Google WebView bug which crashes when any WASM is loaded, not is preventing me from releasing my app, and I can't do ANYTHING about it
yeah thanks google....
Rewrite it fully in js 
it is full JS
i have compiled WASM into JS
issue is
CHECKING if the device supports WASM ALSO insta crashes all active webviews
!!!!
Huh
Why do you need wasm then
Or I'm stupid
because the JS compiled version is an order of magnitude slower
so if i want any form of performant rendering, i need WASM
the JS fallback is for dogshit devices which dont support WASM at all
but the try-catch will do fuckall in this case, as it insa crashes the webview
well
it is not wasm
!!!!
WTFFF
its this:
its:
const subarray = new Uint8ClampedArray([255, 0, 255, 0, 255]).subarray(1, 5)
await createImageBitmap(new ImageData(subarray, 1))
this is enoguh to crash webviews
isnt a Uint8ClampedArray just an array
an array that holds u8s and clamps them π₯
so a u8 array??
does it only crash with invalid image data?
or is it every subarray
thats valid imagedata sir
its just subarray specifically
no
slice doesnt crash
subarray aka a view reference does
but only on arm32bit devices that are running androidtv
its something fucky with hardware acceleration
they are VERY different
uint8clamped is nice for rendering
since u dont need to validate ur data if it goes crazy
it clamps it for you

so specific
does it actually matter π
yes lol
you use that?
almost every android tv is 32 bit
there are like 3 models in the entire world out of like 9k
which arent 32 bit
this bug impacts like 40% of my androidTV userbase
android automatically defaults to 32 bit when it has <4GB of RAM
which tells u a lot about the hardware capabilities of androidTVs
anyways, doesnt stop me from running my electron app on them
next goal: electron on android auto
thats the last champion to conquer
idk tell them to not use a tv? 
sir
my app is about watching video
tvs are made to display video
idk what u expect
thats giving up userbase for no reason
android tv users pay a lot of apps
so they'll buy anything
also being able to say "hey my singular codebase runs on phones, tvs, pcs both windows and linux, macs, laptops and vr headsets" is quite a flex
nodejs is trully what java promised to be and then failed to deliver
lol the point is that it holds exactly u8s
numbers in js are 64 bit floats so itβs a breath of fresh air to have precision
no, the point is that it doesnt mod by 255 like normal uint8
oh well yea that too
because uint8 also holds exactly u8s
yaya but i thought eagely asked if that is just a normal array
but yeah, it is not an array, its a typed array, and they are VERY different interfaces
they have some simmilarities, like indexes and iteration
but their mutability and underlying data is a LOT different
since in typed arrays underlying data is direct memory, it lets u work with memory exactly like in C/C++
you can create a memory view, write u32 data to it, then read parts as u8 etc
and W3C APIs provide a lot of interfaces with said memory views, for example you can simply convert any data into an image, so you can take webassembly program memory, and render it as an image:
because why not, javascript will let you!
vwb 1053445009824821308
bro is not banne
god i hate how bukkit plugin system works
if a plugin depends on another plugin, youre basically forced to use singleton pattern π
i mean there are serviceloaders but no one uses that
well yea bukkit plugin system is based on singleton pattern

