#programming
1 messages · Page 167 of 1
no, i think its a combination of prefetching and the change of an indirect branch to a direct branch
both of these had about ~0.08% branch mispredictions
in the following commit i swapped the tail call for a continue; instead
but it was actually slower when i removed vm->pc = pc; from the code
branch prediction 
i have no clue how it works but its magic
i hate cpus
until i added __builtin_prefetch(&vm->pc, 0, 3);
which
they make no sense sometimes 
idfk
i say that but gpus are arguably worse
the vm pc shouldnt be used inside the hot loop
but for some reason removing that line pessmises it by about 12%
ive had to study more about gpu's than cpu's. so i know more baout them than cpu's and thus they're less strange to me

cpu's are smart and complex
eh, depends on what your standarts are
that just is doing a lot of heavy lifting there 
erm godbolt i dont think this is quite right
interesting
goto and loop produce the same asm
but recursive with a tail call is slightly better
ok let's add a slight complexity
i vaguely remember python getting a new tail calling interpreter a while back and it performing better too
don't think it's recursive though
by altering the code to closer resemble the vm hot loop, its now evident that tail-call recursion is slightly worse
and that's because the tail-recursive one has to do more work
i'll just take your word for it, i really don't feel like reading assemly right now 
its a shame that in c you cant do inline functions when there's anything to do with computed goto
how would that even work
static inline
just dont goto i guess 
true you should clearly use setjmp/longjmp 
hmmm
im not actually familiar with setjmp/longjmp
i dont know what their perf characteristics are
bad, wrong
you need to save a lot of registers
computed goto (direct threading) is the most efficient design of interpreter
so it'll be slow i'd imagine
when a cpu uses 100W of power, does that mean it will also output 100W of heat?
or does not all the power become heat?
unless you have some weird cpu that has other ways of dissipating the energy i think it should be close to 100% heat?

parts of it could be going to other stuff on the motherboard idk
i was thinking about how much of the electricity gets used for data to other parts of the pc, but its probably so litle that it doesn tmatter
yeah
i cant get clang to inline this
i think this is the strongest indication you can give the compiler
unless you make it a macro or constexpr or sth i guess
that defeats the point
yup

mojo has the ability to actually force the compiler to inline something so at least they changed their mind there thankfully
interesting
so apparently they switched away from computed goto to tail calls
but also computed goto wasnt even their fastest interpreter
this is nonsensical to me
the tail call interpreter is only in 3.14 isn't it
or am i tripping
or was it 3.13
okay 3.14 it was
just another day with cpus doing whatever they want 
aaaa
this is so confusing to me
void step_goto(char **pc_ref) {
static const void *tab[] = {
&&op1, &&op2,
};
char *pc = *pc_ref;
next:
goto *tab[*pc++];
op1:
printf("op1 (should terminate)");
*pc_ref = pc;
return;
op2:
printf("op2 (should continue)");
goto next;
}
here's a mockup of a simple computed goto interpreter
this is fairly easy to understand, and is quite efficient
#define MUSTTAIL [[clang::musttail]]
#define PRESERVE_NONE __attribute__((preserve_none))
typedef PRESERVE_NONE void (*OpFunc)(char **pc_ref);
PRESERVE_NONE void dispatch(char **pc_ref);
PRESERVE_NONE void op1_tail(char **pc_ref) {
printf("op1 (should terminate)");
return;
}
PRESERVE_NONE void op2_tail(char **pc_ref) {
printf("op2 (should continue)");
MUSTTAIL return dispatch(pc_ref);
}
static const OpFunc ops[] = { op1_tail, op2_tail };
PRESERVE_NONE void dispatch(char **pc_ref) {
MUSTTAIL return ops[*((*pc_ref)++)](pc_ref);
}
void step_tco(char **pc_ref) {
dispatch(pc_ref);
}
and here is what i have come up with for a tail call interpreter
its strictly just more complex
i dont see how it can ever be faster

step_tco:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbp, rdi
mov r12, qword ptr [rdi]
movsx rax, byte ptr [r12]
lea rcx, [rip + ops]
call qword ptr [rcx + 8*rax]
mov qword ptr [rbp], rax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
look at this stack usage 
what do you need all of that for
i finally got nvim set up
took forever since I had to make a theme identical to my vs code theme
erf

you know, code size can be decieving
im tempted to try out the recursive approach for giggles
https://github.com/mofiqul/vscode.nvim exists (allegedly)
awawawa
its not a builtin theme
if anyone can think of a better way of doing this i will pay you with 1 (one) enub
it was a custom theme i found on the marketplace
which turned out to be a textmate theme
ofmg why do so many plugins keep disabling my fold column
nvm
vscode.nvim has configurable colors
its a little late for that anyways
mhm
i got the theme to be almost identical
i did actually find a middleground
i stripped back the interpreter a bit so instead of char **pc_ref its char *pc
which one do you think is more efficient
char *step_goto_3(char *pc) {
static const void *tab[] = {
&&op1, &&op2,
};
next:
goto *tab[*pc++];
op1:
printf("op1 (should terminate)");
return pc;
op2:
printf("op2 (should continue)");
goto next;
}
#define MUSTTAIL [[clang::musttail]]
#define PRESERVE_NONE __attribute__((preserve_none))
PRESERVE_NONE char *step_goto_2(char *pc) {
static const void *tab[] = {
&&op1, &&op2,
};
goto *tab[*pc++];
op1:
printf("op1 (should terminate)");
return pc;
op2:
printf("op2 (should continue)");
MUSTTAIL return step_goto_2(pc);
}
did #2 actually get inlined
neither of these can be inlined
since computed goto
but #2 does correctly inline the tail call yes
thats not inlining im silly 
awawa
i'd hope these are the same performance but its very possible they arent (especially with preserve_none machinery)
well, it turns out they are the same
but
its actually preserve_none doing the work
with preserve_none on either of them, they are better
(still the same)
this is a good thing for me since it means i dont have to rely on the tail call version
for some free performance
the tail call version is elegant though...
the tail call version only really works with char *pc and not char **pc_ref
which is the more common one
apparently its faster to use functions with preserve_most in preserve_none
but you cant modify glibc 
fake
this roughly aligns with what i've seen though
wait its faster in python apparently
; gcc
"step_goto_3":
sub rsp, 8
mov rbx, r12
mov r12, QWORD PTR [r12]
.L2:
movsx rax, BYTE PTR [r12]
add r12, 1
jmp [QWORD PTR "tab.0"[0+rax*8]]
.L4:
mov edi, OFFSET FLAT:.LC1
xor eax, eax
call [QWORD PTR "printf"@GOTPCREL[rip]]
jmp .L2
.L3:
mov edi, OFFSET FLAT:.LC0
xor eax, eax
call [QWORD PTR "printf"@GOTPCREL[rip]]
mov QWORD PTR [rbx], r12
add rsp, 8
ret
yes this is what i couldnt believe
there's no way the tco garbage can be faster than this

; clang
step_goto_3:
push rax
mov rbx, qword ptr [r12]
inc rbx
movsx rax, byte ptr [rbx - 1]
lea r14, [rip + step_goto_3.tab]
jmp qword ptr [r14 + 8*rax]
.Ltmp5:
lea rdi, [rip + .L.str.1]
xor eax, eax
call qword ptr [rip + printf@GOTPCREL]
inc rbx
movsx rax, byte ptr [rbx - 1]
jmp qword ptr [r14 + 8*rax]
.Ltmp9:
lea rdi, [rip + .L.str]
xor eax, eax
call qword ptr [rip + printf@GOTPCREL]
mov qword ptr [r12], rbx
pop rax
ret
interesting difference
i think gcc's is better
also here's the tail call dispatch version
op1_tail:
push rax
lea rdi, [rip + .L.str]
xor eax, eax
call qword ptr [rip + printf@GOTPCREL]
xor eax, eax
pop rcx
ret
op2_tail:
push rax
lea rdi, [rip + .L.str.1]
xor eax, eax
call qword ptr [rip + printf@GOTPCREL]
movsx rax, byte ptr [r12]
lea rcx, [rip + ops]
pop rdx
jmp qword ptr [rcx + 8*rax]
step_tco:
push rbp
mov rbp, r12
mov r12, qword ptr [r12]
movsx rax, byte ptr [r12]
lea rcx, [rip + ops]
call qword ptr [rcx + 8*rax]
mov qword ptr [rbp], rax
pop rbp
ret
this is the same on clang and gcc, roughly
its somehow normal for deepseek r1:8b to spend 20 minutes thinking before I cut it off since it munched too much battery power (using ollama)
keeps happening to me
that sounds very typical for deepseek to do. expecially if its the qwen distill
qwen likes to think a ton and deepseek too. so combining them will result in insane token amounts
im in despair
i made some changes with my findings and it got slower
i hate computers

someone out there has to have arcane wisdom about how to make my interpreter faster
surely
please
someone
riia
ask chatgpt 
ask a markov chain
chatgpt is too useless to ever think of this
stupid machine
hardware acceleration 
gpus dont do well with branching
not specifically gpu's
i think im gonna do it
make an actual pcie device thats fast at interpreting
im gonna implement python's stupid interpreter format
and see what happens
but im already 8x faster
ahhhh
conflict of interest
i could just play osu
ermplode
no thanksk
uhh
im not hungry
what?

i mean i couldnt be bothered to do so anyways, but is there a specific reason i shouldnt?
not in particular, it's just funny
implementing python's interpreter is actually a very bad idea because it
has a different execution model to my interpreter
my interpreter likes to exit after 1 instruction whereas python's interpreter likes to continue until the program is finished
really the latter one is more efficient but its also less flexible
but wouldnt always continuing (but with fuel) be better
yes
well, except
that there's a branch at the beginning if i do fuel
dunno if it will play nice
its fine with tail call
wait what
it just nearly doubled
even when fuel is 1?
oh
i never subtracted from the fuel

this is awkward

wahoo its nearly doubled (for real)
there seems to be diminishing returns after 10 fuel
branch prediction doing its job
cpu
cpu prompt injection
its faster 
i dont know what to believe
true 
i removed the difference between op_next and op_exit entirely and changed it to be entirely fuel based
so she doesnt have to write a jit
this hs made the branch predictor happy
i am not writing a jit nosir
this needs to run on arm, x86_64, and riscv
its running for significantly less cycles than its supposed to
this is concerning to me
either that or im really good
is compiling not an option or am i missing the point here?
compiling is almost never an option unless the language was made with compilation in mind
jit compilation is possible, but complicated and annoying compared to interpreters
you dont compile js or python
and in fact you essentially cant compile it
ahead of execution, that is
ive never written js. ive done pythona nd c++ so far
and scratch and ti basic but those are baby shit
i see we somehow managed to get to a random bad opcode
erm
jump issue
probably
oh that's really stupid
im really stupid
nevermind it didnt work
i have no clue how interpreting works,b ut i always assumed it jsut reads a line of code and pastes some instructions into the cpu's register or something

never from lines of code
always from bytecode or AST
so it interprets into bytecode, which then puts instructions into the cpu?
its just C code
0% branch misses
that executes code depending on what it sees in the bytecode or ast
no
generally you "compile" the program to bytecode
then the bytecode is interpreted
ooooh
or you use the AST and interpret that directly
bytecode interpreters are more efficient
you can think of a bytecode interpreter as a little virtual machine
it emulates a cpu
since cpu's take instructions sequentiely anyways why is interpreting slower?
a cpu that runs the bytecode as its machine code
because of the interpreting overhead
you cant just tell the cpu to do it, otherwise that's no longer interpreting
remember, the cpu has a set instruction set
yes 
because the cpu has to do more even if effects on the world are the same
more layers of indirection = more slow
this might sound stupid, but surely they could make special hardware thats really good at interpreting making the cpu free to execute?
yes that's called a cpu

if it runs the bytecode, its a cpu
it would just be a cpu that is designed with the bytecode as its instruction set
huh
there is a language where interpreters can run as quickly as possible, and it's called lambda calculus
cpus are already practically optimal for interpreters
this is because lambda calculus can be partially evaluated, and optimal evaluators also replace common subexpressions in one go
but lambda calculus is far from machine code
polar opposite even
honeslty i have not figured out how lambds work in both python and c++. i really dont get it so no thanks
awawa
awawa
python lambdas are not lambda calculus
python lambdas are named that way because they are anonymous functions
which is like lambda calculus somewhat

https://www.youtube.com/watch?v=RcVA8Nj6HEo
i recommend watching this
ERRATA:
• The "Church-Turing Thesis" is different from the "Church-Turing Theorem". The "theorem" is the claim which I discussed in the video- namely, that the Turing machine and lambda calculus are equally powerful. The "thesis" is the informal claim that the two of these systems are a sufficient formalization which capture the idea of "arbit...
okay
dont worry about not understanding the intro
ah okay, i was thinking "what in the fuck is happening? i shoudl check the comments"
its not directly comparable
its more abstract rather than slower
the higher level of abstraction can allow you to make faster programs than you would normally think of
yes
(which is why PLs exist
)
lambda calculus is slow on traditional computers though
again it depends, there are many ways of evaluating it because of the abstractions
fair, evaluating lambdas with beta reduction is slow on traditional computers
"pure"
i mean beta reduction is normal but even then you have so many options, like do you use whnf like haskell or do you use beta-optimal reduction, do you do it in parallel or on a single thread, etc
awa
single thread is probably optimal for smaller ones, but large ones will benefit more form the extra compute than the overhead of multithreading limits them
a cool thing about lambdas is that they are resolvable in parallel
also computation in lambda calculus is lambda calculus

wdym? id hope everythin is resolvable, thats how math works?
reading skill
yes with a single char, c is at 1.62 GiB/s
and my vm is uh
228 MiB/s
14% c throughput on a more fair test

not a real fair test though
if my vm 8x slower than c, and my vm 8x faster than python, then python is 64x slower than c
surely
tbh so far in this lambda video it just looks like an overly complicated way to do standart algebra
mhm
it represents numbers in it to show computation
but structures other than numbers exist
numbers are just one of the simplest structures so they're a good example
natural numbers at least
ehehe irrational number in lambda calculus

well, for ones that have converging functions its easy to represent them
not for arbitrary ones though
worst part is its possible because lambda calculus is lazy so you can just compute the digits as you go 
yeah 
standart algebra does that too no?
i may be stupid but im also missing the point probably
read the title of the video
standard algebra isnt a programming language
i.e. e could be represented via a summation
awa
well, it still requires arbitrary precision rational operations to compute
so maybe its not simpler 
if you find any way to do it and give it to an optimal reducer it will probably find a way to evaluate it efficiently
probably doing a lot of work
ye i dont get it, ill stick to graphics
lambda calculus is C macros but where the macros you're currently using dont temporarily disappear

huh
i didnt know C macros could have functions inside them
cant be bothered to rewrite my code tho so ill simply ignore this
are they bad?
im getting mixed signals here
use macros when you need to copy paste and cant avoid it
the simpler the language the harder it is to avoid it
its an absolute necessity in C but in C++ its not as important because templates exist
its preferred because its easier for the compiler to understand what you're trying to do
hey tsurai how does this compare to your lisp https://github.com/chayleaf/2-day-scheme/blob/master/main.c
It uses a million allocations because of rust lifetimes. Also I wrote mine while also learning lisp itself
mine uses a million allocations too
each cons is an allocation
it just uses an arena instead of malloc
honestly I faked cons pairs. Internally it will use a vector and abstract cdr over it
i did not because it allows sharing 
and Im considering getting rid of it alltogether
when you call a function in my lisp it extends parent environment with one entry
without linked lists that would be super expensive
well, mine does the same but the env is not part of the language itself so it has nothing to do with cons cells for me
git.ablecorp.eu mirror?
awawa it will go to akern-c
the env uses a hashmap for the lookup and I cant have a hashmap without having an env first, hen egg and all that
Also, I agre with konii, reading is great. Thanks for coming to my TED talk
lmao
i like reading when i am actually interesting in the story, and when i can actually focus on it, and when im doing it not because i have to
which happens very infrequently
nya
lucky you there are tons of intresting stories out there 
hot take, the last couple dune books are kinda mid but eh
i watched the first movie 8 hours ago and i didnt really get it
sand init
it felt like aldi brand the force from starwars

i only read the first trilogy? i think
awa
and dune came before star wars so if anything lucas took inspiration from it
i made a circle
my hdr is still fucked up goddamnit
i did it really inneficiently cuz i cuuldnt be bothered to automate it
!nothing
Nothing ever happens, all-in
!bwaa

Well i am trying to do my best to pass my python exam so i can learn java
i just need to pass my python exam for now and i can handle my grades with js ts and Java
is the person shiro replied an ai
nahhhhhhh It is still a floating environment on the android app

ok, I hope undervolting my pc won't kill my setup with Intellij + docker on win. So far so good - minus 20c for cpu
Good start
How many mV is that?
I personally have my CPU overclocked to 5.1GHz and sustaining it by having a -50mV undervoltage
had good run with -20, now -30
insane how it can lower your cpu temp by so much(yea yea I know it's logical, but still)
Which voltage parameter are you changing? For me reducing the voltage barely seemed to change temps, it went from like 105 C unstable 5.1GHz to 90-95 C stable 5.1GHz
With the full -50mV undervolt
I think I'm in love with GO
better handwritting than mine

That proposed use case image is a truly dreadful idea
Like jesus Google
I know you're proud of your IP68 rating but lets not push it
Wouldn't an infra-red camera be a better way to implement it
What is that
it has no garbage collector but protects against memory leaks
it ennsures your code is safe
Sweet
it has type-safety
unsafe behavior is clearly separated from safe behavior
amazing package ecosystem
what is this horrible pitch 
💀 It was a pitch?
are you telling me its a bad pitch
it wasnt meant to be a pitch but
Ty btw I may use this later lol Mrrrrrow (Don't question this)
i can teach you if you want
Yoooo maybe later though
ye ye all good
thats for people who havent really coded
rust by example is another great guide
rustlings is a good material for testing
??? rust book is way too hard for people new to programming since it introduces smart pointers and stuff
smart pointers?!?
wtf
you mean arc?
arc is one kind of smart pointers
have you ever met a person new to programming
rc just counts references and kills itself when its 0
they struggle with ifs
they aren't going to comprehend smart pointers
and the concept of data living in a particular place isnt that intuitive either
how much do you bet
if you programmed in js or java you wouldnt think of it
yes but the concept itself is easy
so
i need to explain smart pointers to you
would you be okay with telling me if you understand?
everything in programming is easy once you understand it
you only did html and css yet so
but for that you need practice
with a good explanation its easy
no... you wont understand something without actually doing it
Ye I just turned off my Deco 27 so I would be able to understand lol
Well base level Python as well but it is a bit rusty
the concept you can understand
i understand the concept of cooking
even tho im not a great chef
so, something that isn't very clear in languages like python is that memory isnt fully safe
in other languages like c++ and c, memory must be manually allocated (tell the computer to put it somewhere)
python doesn't have static typing but it doesn't have use after free or double free
Bro I just autopilot and stuff works for me 💀
thats why i said its not clear in python that memory is fully safe
?
yes, because python is a memory-safe language
it takes care of that for you
i cant vc

Yeah gathered lol (I expect people here to not have mics lol)
i have but its broken
in rust, theres this neat thing called the concept of ownership and borrowing
i wont get into it
same thing although continue instead of hearing me rant
Coffee pasta
but it prevents you from creating memory-unsafe code (unless you forcefully do so)
okay i need to get into how it works to explain it
so
for each variable right
there's an owner
Define memory-unsafe first
you manually allocate and free memory
Ah
it's not safe because it's not programatically regulated
So memory safe is automatic?
somewhat
memory safe just means that you don't need to manually assure you freed and allocated everything properly
which can be moved
if you move a variable the owner changes
that part you got, right?
If you move a variable the owner changes... god damn I need to understand this better
okay wait
ill try another explanation
ignore everything except the memory safety part
so, in python
everything lives in what's called the heap
which is a big pool of memory
but its expensive to allocate/deallocate
you can mutate/modify the value freely, you can reference shared objects and stuff is deallocated by a "garbage collector"
do you understand that?
So it picks up garbage (🙏) You can modify a value?
yes
basically what this means is
you can modify the value at any time, even if it's currently being read by another part of code
You can modify values using shared stuff and the collector cleans it?
and it automatically gets freed from memory when it's not used
no
like
theres the variable xyz right
one part of the code is reading it
but at the exact same time
another part of it is modifying it
thats allowed
and yes the collector automatically frees the value as to not take up much ram
Multitasking...? (Please say what you mean by reading like is it the code being read (mb if I am triggering you by being bad at understanding
))
yes
dw
i only picked this battle cuz for me it was easy since i naturally learn quickly
now i see what was meant
imagine you have a book in your room
you and your brother (idk if u have one) are doing your own thing
and one of you wants to read the book while the other wants to modify it's contents
2 different things can happen
either your brother is slightly first and reads the old version of the book
or your brother is slightly last and reads the modified one
So at once you wait for your brother to read it then you modify and clean it as he goes?
no
ignore the cleaning part for now
Mb
what python lets you do is create these kinds of scenarios
where 2 different things can happen
by sheer chance
Gambling with codes seems fun...
LOL it seems fun until you're starbucks
and a race condition (something like this) allows people to get infinite gift card money
but in rust, there's a system called the ownership and borrowing
and here's where the garbage collector comes into play
the garbage collector ensures that, when you no longer use a value, it goes out of ram
and it does this by periodically checking
So if it is inactive when the check occurs it gets trashed
and when it's guaranteed to not be used in the future
to free up ram... does this let you focus more on coding instead of fixing your own mistakes?
yes
but now here's where rust is brilliant (imo)
for each variable, there's only ONE owner
Now what is an owner
basically a piece of code that owns it
either a function
a class (in rust it's structs)
etc.
yes
when that owner goes out of scope (is guaranteed to never be used again), the variable is freed
its the dumped memory
and this can occour in compile time, making code faster than using a gc
okay ty
well idk it depends but python sucks at it and since its memory slow
Hi Ekness
java based
hi
no java not based
kotlin based
i wrote minecraft cheats way back in the day
i have ptsd
true
anyway
python worst
Oh so that is how you all got cheats without using premade ones
i know you mean no harm and im not mad but so that i can keep the scope of this conversation could we discuss this later?
lol ye
anyway
another thing with rust is that you can move a variable
which means change its owner
but then, you might ask
alright
"how would 2 places get the contents of the variable while one is already being used"
i appreciate it so much
thank you for your maners
i know it could be interpreted as rude so i tried to be as friendly as i can be
because i know i sometimes cause misunderstandings
Yeah at least you know and don't decide to just roll with it anyways
i dont mean anything but python...have quite problems IN some places
Without it though Neuro wouldn't be Neuro so 
yes python sucks
that the solution to that is references
look you dont have to agree i understand sorry its just my opinion
you can have infinite immutable (read-only) references to a place in memory
no i agree
i whole-heartedly agree
which is why i love c#, kotlin and rust
please continue what where you doing please
but you can only have 1 mutable reference to a place in memory
those referrences have lifetimes
which is when they are valid until
but what if you wanna have an immutable reference for a semi-infinite lifetime?
or other problems
this is what smart pointers solve.
So far I have picked up that code is alive, can have different owners, get trashed when considered a liability (or waste)... anything else I should have picked up?
yes thats good
summary:
python lets you access any variable at any time with no rules on mutability, concurrency, etc.
rust has the ownership & borrowing rules, making code safer and memory-safe without a garbage collector
So you can change the code WHILE using the code
damn it
you were close!
So I was semi-right but it is variables not the overall code
mhm!
Aight that works for me
you see python doesn't have tha highly strict memory rules
So how does Rust and Python work together? (Do they?)
theres a python engine in rust
which allows you to write python
also
Oh sweet
this is where the actual explanation i wanted to do comes in
it doesnt have the benefits of rust tho
its like cython
smart pointers
yes but you can embed it in your code
isnt rust made in c?
c++?
first the compiler was in ocaml
now its in rust
now that you know what the ownership & borrowing system doesnt let you do
theres still some very popular patterns you might wanna do
there own compiler?
yes but the backend is llvm
i want them to switch to mlir instead of their own representation
like, for example
reference-counting, which is what python does
since it's needed selectively to variables after their lifetime
so rust provides smart pointers for that
there's 4
4 types of pointers?
of smart pointers
I said base level Python is base level what this? Or did I misword myself
So what are smart pointers in your own summary
Rc: owns the variable and counts every reference it gives - when there's no more reference, it drops itself
Arc: same as Rc but uses atomics (variables that can be mutated concurrently while still being memory-safe)
Box: just makes the variable go into the heap (bigger space of memory in which allocations are more expensive but less limited) instead of the stack (smaller space of memory with limits)
Cell: allows for interior mutability (allows you to mutate the inner value even when cell in immutable)
they allow you to, while using rust's ownership and borrowing rules for the most part, write safe code with many more possibilities that rust's ownership and borrowing rules don't plainly allow
Kk so I will read up on the ownership and borrowing rules then get back here
@uneven pulsar if raro has no more questions we're free to discuss whatever you want now
okie!
i hope there's better explanations than mine out there
lol
you see
python had a blank syntax
and it makes me think forward
wdym think forward
like
i feel rash to make the code
def black_gamma_radius(radius: int) -> float:
radius = random.randint(1, radius)
area = 3.14 * (radius ** random.randint(1,96)) % 100
while True:
try:
if radius <= 0:
return 3.14 * (radius ** random.randint(1, 96)) % 100
elif lambda: radius > 0:
print(f"Area of the circle with radius {radius} is {area}.")
break
except ValueError as e:
print(f"An error occurred: {e}. Please enter a valid radius.")
sys.exit()
fym feel rash
write nonsense
So a calculator
?
no
Nvm I'll return to reading 
sameeee
its feels so dead
i like statically-typed languages better not even gonna lie
me too
java is way better
like
idk
i find myself better at java
isnt that like json but functions
no
nix?
wait
i know nix is like json but functions
smt
also
isnt nix like compiled on linux
i know it uses something about the kernel shell IDK
i dont even know much about it
i feel lost and fucked up
Okay I am back and I THINK I understand Rust better... (Apologies if I still don't)
Rust allows things to be faster because it uses up less memory by being efficient in the codes. It does this by borrowing code around and having owners for variables*?
(I am having fun being semi-
) (Srry for interrupting this convo)
it dose things c++ cant
automatic memory hardware management
So it is really good for lower end devices
no
whats make it good
you dont have to work out managing the memory of the hardware your manipulating
c++ is for hardware manipulation and memory
like mouses computers OS
almost

Kinda have a feeling i'll be hearing no a lot tonight 
So it helps you manage it and frees up time for ya'll to focus on more important stuff
If only 
it can do stuff c++ cant
as i said
I'll let you guys continue I needa shower... have fun with what you were doing 
most of them where c++ devs
I was recommended C++
I see where programmers/devs (don't smite me) find problems they make solution after solution and so on
its syntax is a propaganda but its secretly C from the behind
dont fall for it
python decive you its easy
but most of its shit are in c/c++
Kinda reminds me of how the Liverpool FC branched off from Everton because there were problems in the club and Liverpool ended up being considered better... Ngl but I think this conversation has proven useful for when I actually decide to get more into programming (as a hobby)
Ty chat
I think Python great as a glue language for calling libraries written in faster languages, it's like the swiss army knife of languages
it's also just a nice scripting language
Aw hell nah why is Gemini texting me
poor gemini just wants a fren 
they are spending billions on AIs, everyone must use it
I hate my PM I hate my PM I hate my PM I hate my PM I hate my PM I hate my PM I hate my PM I hate my PM
I really need Neuro stream today to relax
Puppy Monkey
Photo Monster
Plushy Mango
....
Product Manager?
last one ofc
Well you never know
Feel your pain, get lost in the chaotic flow of Neuro samaaaa
Was laughing at the Dog Website video haha
it was epic. Me and a junior vibes
The utmost patience the man has was incredible lol
Vedal is double guilty - she is his daughter AND his code
She can't be wrong or bad - he is
Morning 
yep, divide task into smaller tasks and solve them one by one
there is library(including std) in c++ that can do auto memory management

i put my pc in sleep mode because i wanted to save my progress, and now the entire things isnt in hdr and is washed out gray
bwaa
not only the screenshots
Probably blame Nvidia drivers x Wayland
well.. but not on the level of rust no?
I've been learning and writing rust for about a month now and compared to my month learning c++. rust is a breeze to use. when there is a runtime error you know exactly why and where it happened.
no weird memory dumps or stack traces to go through.
assuming you even manage to get a runtime error where the compiler doesn't yell at you before hand to do things right and handle the error
i thought windows hdr was bad, but hyprland hdr is suuch a piece of shit
and its all due to nvidia and their stupid compositor
Blame GNOME for making Wayland suck
GNOME singlehandedly stops the devs from implementing most useful things
They're basically dictating Wayland development
And GNOME is famously like Apple in that they like things locked down
what? where are all the gnome's coming from and why are they software devs?
GNOME is the worst Linux desktop environment
nowhere in this case, hdr is a protocol that has nothing to do with gnome
It is funded by Microsoft, BTW
om
so is the linux kernel
the fucking linux conspiracy theorists 
I never said it was a bad thingy

:3
do you mean funded or supported?
i feel like there is a conceptial difference in the two words.
is it even worth it to turn on hdr if my screenshots will look ike shit?
i dont even notice a difference besides my eyes getting burned out at full white hdr
its all redhat!!!! ibm!!! microsoft sabotaging the linux desktop!!!!!! linux would've been perfect if not for them
the gnome's are escaping!!!!
nope!
the only compositors that do colour well on wayland are gnome's and kde's
i installed gnome on my mom's pc and she loved it
please understand that not everyone has the same workflow
those will probably also not work well on nvidia gpu

thats fair
i tried a fix i found on reddit. wtf is this???
how did this even happen?
ye im giving up
Just don't HDR until maybe 10 years in the future Wayland devs get their garbage together, and actually implement HDR properly
i don't think this is something you can fix without touching hyprland itself
this isn't a wayland problem this is hyprland, my hdr screenshots behave like they should (blown out cause no tone mapping)
i need a toggle
could i remap the proile button on my keyboard im not using cuz i hate icue, to a togle for turning of hdr???
lemme vibe code that
if the system detects the keypress then i don't see why you wouldn't be able to
unless corsair does some cursed stuff with their keyboard fw which wouldn't surprise me 
just use a debugger 
you cannot escape cpp even if you use rust
yea ofc rust does more validations and stuff than c++
it's a successor anyways
none of these seemt o be responsible for the profile button on my keyboard
maybe i need drivers for it?
Is it possible to make a mp3 file that is 4KB or smaller or is the header and other metadata too big for storing any meaningful audio data?
the header is 32 bits apparently
I think they are bytes, not KB
headers I mean
I have a very old school keypad phone similar to Nokia has only 4KB of free space which is why I'm curius if it's even possible
yea, ID3v2 is the biggest coz it can contain like name of the song, name of the album and etc
rest is smol
wtf is key finance supposed to do?? 
like it opens up your bank app?
Seems like it's possible then but I couldn't get a mp3 file smaller than 10-18KB when I tried to make it really short and used the worst bitrate/sample rate I could find so idk how
probably some stocks tracker website
why wou.ld they make that part of this keyboard???
like yahoo finance or something
money
corsair smh
its not even mapped to anything, its jsut there in either some driver or in the keyboard itself
4kb? obviously yes, just make it 0.25kbps without caring bit loss
it's for those late 00s-early 10s keyboards with a myriad of useless buttons at the top probably
and get the bandwidth down
much more
how did you created it? With some soft or with encoding bytes in your code? Coz I think any modern soft really doesn't care about limiting size and can don't care much about it

yeah it's for launching a finance app it seems because why not i guess 
when the scammer take over your pc and presses the finance button 
bro it's sooo old school. Crypto mining is the thing nowadays
nah with cryptominin you'd maybe a get a single euro if i ran my pc for days
my bank account on the other hand is magnitudes larger
sure, but imagine 10000 of your pcs
ok but imagine 10000 bank accounts
tell me more about your bank account
it has money inside it
3 euro
huge
3000 in debt
not to flex, but i had a lot of money inside it, until i spent half of it 2 days ago

you are arguing between crypto miners and bank account stealers, but like
something like this but with a $ button
went to buy some food? 
they can just do both 
and even more
i bought an AVR
no way, doing DOUBLE crime at the same time?!
me when the malware does all possible malicious things
it's illegal
the mal in malware stands for uhhh
i mean if you do 1 illegal thing without getting caught, they might as well do a lot of them
they will eventually fight for controls over each other
shiro cube information stealer
surely
if its for shiro id gladly pay the malware tax
malnutrition
ok, today was an interesting day - like 5-6 hours of meetings, zero coding. Sometimes corpo coding is really something
oh no now it's stucked in my head once I knew it exist
infohazard
depends, how much tax you asking?

ok now tab out and see shiro square
all
oh no

im supposed to be buying a car with that eventually
I'm not a TV how do I tab out
they named a square after shiro
send coordinates
im not a fan
i am
squidwart is not supposed to be 15m long













