#🪅-progaming
1 messages · Page 121 of 1
and i mean maybe it’s not worth reinventing the wheel if it’s not some insanely small numbers (60 fps in my case)
ignore
oh wow theres a followup https://blog.bearcats.nl/perfect-sleep-function/
Programming and game development blog.
@spark tiger
❓
oh hey
hii ;)
OK here's another funny solid thing
this doesn't work, when you click the button it throws <A> and 'use' router primitives can be only used inside a Route.
// used in router
function PersonPage() {
// grabs person name from URL
const person = () => useParams().person;
return <PersonCard person={person()} />;
}
function PersonCard(props) {
return <button onClick={() => alert(props.person)}>Show Person Name</button>;
}
turns out you need to use runWithOwner which i don't think is documented anywhere in the router docs
thank goodness for "answeroverflow"
which at first i thought was just a reupload of stackoverflow posts but i think it might be a discord indexing thing
what's it called where you have a number that is just a bunch of booleans but as powers of 2 &'ed
like
thing = {
guh: (Math.random() * 4) | 0,
};
let foo = 1 << 0;
let bar = 1 << 1;
if (thing.guh & foo && thing.guh & bar) {
// foo and bar
}
if (thing.guh & foo) {
// foo
if (thing.guh & bar) {
// bar
}
if (thing.guh & (foo | bar) {
// foo or bar
}
and like foo and bar are enum members
thanks

last one is actually foo and bar
./run
guh = 1;
foo = 1;
bar = 2;
fooAndBar = foo & bar;
console.log(guh & fooAndBar);
Here is your js(18.15.0) output @jade stone
0
No, flags & (flag1 | flag2) returns nonzero if either of the flags is set
if (thing.guh & (foo | bar) {
// foo or bar
}
its the same as (guh & foo) && (guh & bar)
You're confusing it with (thing.guh & (foo | bar)) == (foo | bar)
oh right there's no == foo | bar
my bad
./run
guh = 1;
foo = 1;
bar = 2;
fooOrBar = foo | bar;
console.log(guh & fooAndBar);
@jade stone I only received js(18.15.0) error output
/piston/jobs/9336226c-acd6-4980-a0a2-017f8fdd5c1e/file0.code:5
console.log(guh & fooAndBar);
^
ReferenceError: fooAndBar is not defined
at Object.<anonymous> (/piston/jobs/9336226c-acd6-4980-a0a2-017f8fdd5c1e/file0.code:5:19)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
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
./run
guh = 1;
foo = 1;
bar = 2;
fooOrBar = foo | bar;
console.log(guh & fooOrBar);
Here is your js(18.15.0) output @jade stone
1
I'm tryna use the flutter_eval package for a plugin system on my app, is there any way I can expose certain imports (rust dart bindings) to it?
@jade stone satannn 😭
@deep mulch how cursed is this
VERY
evil
the typealias is insane but other than that it doesn't look bad to me
why isn't iterator map lazy by default
I think iterators in java are also non lazy
it would be weird to change it up for people coming from java
No of course they're lazy
.next() produces the next value on demand
(Usually by reading from a container)
And not as lazy as they should be, given that hasNext needs to be able to peek
oh
@orangy said: Using iterators other than for iteration has been proven to be error-prone. It is a mutable object, and if you try to use it like a lazy collection it will inevitably break things if you are not really careful. That’s why we dropped extension functions on iterators Today Kotlin has Sequences. But they are basically a wrapp...
https://slack-chats.kotlinlang.org/t/453597/sequence-is-lazy#324fe2d1-e858-4e58-8dd9-7fcb23431ee9
An iterator can be anything, in Rust all iterators are by default lazy. That was not possible in Kotlin because they are backed by Java and Java iterators are mostly eager. It's an implementation detail.
so I was right kinda
or no
guh this is confusing
Java iterators are pretty awful to do combinators on, that much is true
Try implementing lazy filter
I think Iterable is the one sadan should be using if I'm reading right
iterators don't have any functions like map/filter/...
it already has a map function which should do exactly this
that's what i'm doing rn
no it doesn't
iterable does
you will make IteratorExt that implements all list methods for iterators
pretty much just doing that as i need them
@jade stone https://stackoverflow.com/a/6863258
@ornate quiver Satan is being insane
holy yap
thanks intellij
should vencord settings have an edit settings.json button
people will fuck up their settings 
vsb 1 scam
Done! 
softbanned @halcyon drift
turn to stream
very cool
or just use for loops like a normal person

in my experience many settings just require you to use json to change them
and the edit in settings.json button doesn't help much
it doesn't add the key to settings.json
for Theme Mode it's not clear where you put it
i don’t get why they couldn’t just make a selector for this enum
or well an input
lol had to implement folding myself for codemirror
why does nobody care about toml
there's a library that implements toml for codemirror's parsing library but you still need a load of boilerplate
and by the time i have added auto completion and linting

lol
how does a surname of null supposedly break most airlines
you have to write the most stupid code imaginable to be affected by that
Precisely
that's why it affects proprietary airline software and not popular open source projects which are usually made by far more competent people

Update 1 April 2016: Since publication, a few readers have expressed scepticism about some of the claims of the people interviewed for this article. We would like to clarify that Jennifer Null has not experienced issues entering her name on airline websites for a couple of years now, although it had been a recurring problem in the past.
Good for her
smol-toml?
lol i meant in editors
@deep mulch @hoary sluice my notes grow ever larger
ive watched about 9 hours straight of QM lectures in the past 2 days
this is soo interesting
thankfully i already knew about complex numbers, probability densities, operators, and partial differential equations
otherwise i would have no idea what was going on
i have about 18 lectures left to watch
~21.6 hours
gwaaaa
I'm gonna write a Wikipedia page on you before you make you get a nobel peace prize after unifying quantum mechanics and classical
rosie is a genius
that would be a nobel prize in physics idiot
none of these words are in bible
@pseudo skiff to answer, the message object has an interactionData object, but by default it is not fetched

when you click on the interaction, it sends an API request to fetch the data, and then updates the original message with the interactiondata
then you can read it
you'd have to go hunting for whatever triggers that fetch
and then trigger it yourself
just be careful how much you do it though
the route you can search for, funnily enough, is interaction-data
/api/:version/channels/:channel/messages/:message/interaction-data
which returns the interactionData object i showed here
that's marked as the MESSAGE_INTERACTION_DATA route in the routebuilder object, so you can search for that and find where the client itself calls it and set up the parameters
if you just want to listen for when that data comes into existence and dont need it on demand, listen to the LOAD_MESSAGE_INTERACTION_DATA_SUCCESS event
params are channelId, messageId, and interactionData
@pseudo skiff ^ hopefully that helps
hm
i dont see LOAD_MESSAGE_INTERACTION_DATA_SUCCESS at all
it gets fired after you click on the interact and it loads it
its how the client resolves it itself
so if im trying to get the target of someone elses slash command
(as soon as humanely possible, like before the command finishes)
i basically just gotta send the request for every slash command someone sends
if its what i want i guess
i guess thats fine
Afaik interactionMetadata has that info too
Well interactionData has more stuff like slash command options, and full application command object
or well what i meant was
in the message object theres
"interaction"
and "interaction_metadata"
and from what i can tell theyre the exact same
only containing id and stuff
interaction doesn't have the options
123
why are you doing quantum stuff now
rosie you do realize that you theoretically could pass all math bachelor exams today?
why not
probably not
there are still many things i don't know
TIL injecting your dylib into a macos executable is as simple as using DYLD_INSERT_LIBRARIES env variable
insane
yeah lol it's awesome
Is that the same as LD_PRELOAD?
is there anyone who mastered the art of typescript types 
no
uhhh ive written some pretty cursed types before
what do you need
soooo uhhhh...
i have this function:
renderQuestion: React.FC<{
question: QuestionWithOption;
answer?: AnswerByType<T>;
setAnswer: (answer: Omit<AnswerByType<T>, "type">) => void;
}>;
then i have this type infered from zod:
// basically structure is: { answers: [{ questionId: number; answer: { type: "..." | "..." } }] } where answer is a discriminated union
export type ApplicationProgress = z.infer<typeof applicationProgressSchema>;
export type Answer = z.infer<
typeof applicationProgressSchema.shape.answers.element.shape.answer
>;
export type AnswerExtractor<T extends QuestionType> = Answer & { type: T };
export type AnswersByType = { [key in QuestionType]: AnswerExtractor<key> };
export type AnswerByType<T extends QuestionType> = AnswersByType[T];
now i try to call this: (renderer is a record)
return pages[value.pageIndex].questions.map((questionWithOpt) =>
renderer[questionWithOpt.type].renderQuestion({
question: questionWithOpt,
answer: ap.answers.find((answer) => answer.questionId === questionWithOpt.id)
?.answer as AnswerByType<typeof questionWithOpt.type>,
setAnswer: (answer) => {},
}),
);
the thing is that im getting this horrendous error on the renderQuestion call at setting the answer:, i totally dont know if this gives you enough info tho
optional chaining
x?.y automatically turns the result type from T (from x.y) into T | undefined
since, if at any point the value is undefined in the optional chain, the whole expression evalutes to undefined
but doesnt fix it
now it just says is not assignable to type never
though i feel like typescript should allow T to be subtyped as T | undefined
what did you change
i think i get it
typeof questionWithOpt.type is not narrowed by typescript
so when you do AnswerByType<...> thats the same as just AnswerByType<QuestionType>
atp i would like just as any tbh
because you know more about the type than the type system does
gotta love react prod code
@hoary sluice https://fixupx.com/Ekically/status/1979313933065555996
actually spent 4 hours coding this into a mod
Quoting TheGreenBit (@TheTweetBit)
︀
can this be a mod in the game, it just freezes your game randomly and plays phonk
i know the lyrics to every song in this video
the issue is export type AnswerExtractor<T extends QuestionType> = Answer & { type: T };
you dont want to use & { type: T } that almost always causes a problem (dont ask me how i know) use extract or something similar
@woven mesa i'm writing something but i'm not sure whether this is correct:
This is made significantly easier given that Android does not have strict code signing, allowing code already loaded into memory to be
modified on the fly. On iOS, this isn't possible to the same extent due to the PPL (Page Protection Layer), which prevents
code pages from being modified after their authenticity has been verified.
uhhh
not sure about exact terminology but that is correct
arm64e also means theres pointer authentication too
oh right
i’d ask hhls for more info
ive read plenty of articles docs etc about it but i dont have first hand experience with ios internals
oki thanks

trying to make a diagram
@deep mulch what do you think
this is based on LSPosed + an old Riru implementation
done to the best of my knowledge
idek how Zygisk works
bigger font NOW
i forgot what riru is
oh maybe explain what the red color means
idk what red lines mean vs black lines
okay
Ok but is any of these written rust
this is linked on official c language website https://www.youtube.com/watch?v=tas0O586t80
Someone in Discord linked to this tweet and I figured I'd take a stab at singing it in my totally not awful fake accent: https://twitter.com/bhilburn/status/971019559095427075/photo/1
Download:
WAV: https://kaslai.com/files/program_in_c.wav
MP3: https://kaslai.com/files/program_in_c.mp3
it's firee
well it's relatively new and there hasn't really been any big projects that use it
literal gui pipe dream
does it have a gtk backend though
i mean it's great that it supports qt, stuff like wxwidgets will use gtk even though i'm on plasma :isob:
can someone tell me how these people make discord mods client?
through some reverse engineering and some electron stuff
the adventure begins here
Ummm idk go
Lang
Also I want to make something like vesktop where it a whole different app
And add stuff into it 
It seem really good project to have fun with
does someone know if it's possible to do type inference based off of the keys of an object
I believe so
idk how to though
i found out how 
tbh didn't know you could use mapped types like that
love
http://brilliant.org/2swap/ - Click here for a 30 day Brilliant free trial and 20% discount on an annual premium subscription!
ERRATUM: At the end of the video, I said: "there is no closed-form solution for non-trivial starting positions." The trivial cases I was referring to are those in which the two arms are collinear, and those in which bot...
this is something @valid jetty would make
i couldn't find any working javascript refactoring extensions on vscode so i'm making my own 
MUSIC BY 6884! Check him out here: https://6884.bandcamp.com/
The soundtrack from this video will be available on his bandcamp soon, so go follow him to make sure you don’t miss it!
I know I promised you a lambda calculus video- In fact, the video is done, but 6884 is having a field day on the sound effects as we speak, and they are coming out...
idk what's even going on in this one
@deep mulch
math horror video
im doing this programming olympiad and for some reason whatever tf theyre running python code on doesnt have lcm() in math but has gcd() 
how
theyre running python 3.8.10
maybe thats why
duh
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...
this is so insane
@deep mulch
i understand nothing
this is pretty much the best explanation there is
and plus times plus is something like a^(4b^(c^(5d)))
i dont remember exactly
def lcm(a, b):
return abs(a * b) // math.gcd(a, b)
yeah that’s what i ended up doing
why tf does the python syntax highlighter interpret // as a comment
but idk how u have gcd but not lcm
just python things
why is math.gcd whte
math.gcd(a, b)
oh its white either way
ok
import math
math.gcd(a, b)
nope
i just think it doesn’t recognize it as a function call thus not highlighting it. afaik if it was a commend it would be grey not white
ye
def lcm(a, b):
return abs(a * b) // math.gcd(a, b)
lcm(7, 4)
def lcm(a, b):
return abs(a * b) // math.gcd(a, b)
lcm(x, z)
insane
@jade stone satan
ok ty for your answer
i think im going insane
visiting the page via ip:3001/ works but when visiting it via the subdomain.domain it doesnt work
it just serves the main website at the root
did anyone experience that before
dns records issue me thinks
guh
i assume sane people don't do this to specify a parameter that must implement Read?
but surely &mut dyn Read allows for less optimisation?
Wdym sane people don't do the obvious thing
isn't it kind of annoying to write + ?Sized everywhere to both allow &mut dyn Read to be passed and passing an actual struct to generate a function with direct calls
i have a whole load of functions which accept this
Yeah I think the implicit Sized should be a bit smarter
i love how rust has iN::from_be_bytes
saves so much boilerplate
well, the implementation does just seem to be a safe wrapper of something else
Quite a lot of functions are, yes
in c++ for example i wasn't comfortable just reinterpreting the bytes because i don't know how safe that is
pub const fn from_be_bytes(bytes: [u8; size_of::<Self>()]) -> Self {
Self::from_be(Self::from_ne_bytes(bytes))
}
pub const fn from_ne_bytes(bytes: [u8; size_of::<Self>()]) -> Self {
// SAFETY: integers are plain old datatypes so we can always transmute to them
unsafe { mem::transmute(bytes) }
}
pub const fn from_be(x: Self) -> Self {
#[cfg(target_endian = "big")]
{
x
}
#[cfg(not(target_endian = "big"))]
{
x.swap_bytes()
}
}
That seems to be how it's implemented
the fact theres a function in the rust stdlib that's not marked as unsafe should mean that it's not going to break on different platforms
now i think about it it's probably safe to memcpy in c++ or bit_cast in c++20
but does c++ have a built in way to detect endianness
io.cpp: Lines 328-335
void write_int(QIODevice *file, int32_t value) {
QByteArray result(4, Qt::Uninitialized);
result[0] = static_cast<char>(value >> 24);
result[1] = static_cast<char>(value >> 16);
result[2] = static_cast<char>(value >> 8);
result[3] = static_cast<char>(value);
file->write(result);
}
io.cpp: Lines 163-169
static int32_t read_int(QIODevice *file) {
uint8_t bytes[4];
if (file->read(reinterpret_cast<char *>(bytes), sizeof(bytes)) != sizeof(bytes))
throw IOError("EOF");
return static_cast<int32_t>((bytes[0] << 24) + (bytes[1] << 16) + (bytes[2] << 8) + (bytes[3] << 0));
}
oh god
this is horrid
what the hell
yeah.. this code was quite something
i guess i thought reinterpret_cast was a good idea in some places...
sometimes my old code makes me hate myself
you know that feeling...
well... i'm doing the same thing in rust and so far it's a lot nicer for this lol
kode tode
back in the day if i saw a typo in an article i would think what an idiot he made a typo
now if i see a typo im like wow awesome this article isnt ai slop
typo shows it's made by a somebody sentient
nobody does that
rust is actually kinda cool just not when jumping straight into stuff you don't understand

well starting from no knowledge on lambda calculus I got lost very quickly
he moves very fast
maybe watching it 10 more times will make me understand
sooooooo trueee
honestly yes I rewatched it a few times and it did click after that
looks like i need to write my own utf-8 parser
for surrogate pairs
because java
(java uses modified utf-8)
now teach me
minky will teach
bwa
still no library for this
Convert Java’s modified UTF-8 data to a Rust string, re-encoding only if necessary. Returns an error if the data cannot be represented as valid UTF-8.
the fact it was last updated in 2016 gives me hope
🙁
what the hell is labubu
minecraft client
@echo off
:begin
start notepad
start wordpad
start cmd
start explorer
start control
start calc
goto begin
other servers dw
insane
riel
sry if my bio looks stupid but its for other stuff not vencord 😔
at least you're not hiding that you're a skid
ubuntu maybe (labubu was the early name of ubuntu)
no way 😭
booting into my labubu 👀
miss information
Labubu ( lah-BOO-boo; Chinese: 拉布布; pinyin: Lābùbù) is a line of collectible plush toys created by Hong Kong illustrator Kasing Lung. The series features zoomorphic elves with exaggerated facial expressions, of which the central figure is Labubu, a monster with sharp teeth, large ears and a scruffy appearance.
The toys are produced and ...
neuer EinbettungsBauer()
.MitTitel("Episches Einbettungsversagen")
.MitBildUrl("https://64.media.tumblr.com/b509aaaccd089e9dc9704941b773cf7e/6e04868da17fd39e-c9/s250x400/cc50de93705957dca01ef60ad85a916a8dad487f.gif")
.MitFarbe(Farbe.Rot)
.Bauen();
do people really prefer rust error handling to go, or do they prefer rust error handling with the use of a library
like anyhow
i like rust error handling over go
even without anyhow
how though... there isn't an equivilent of error wrapping is there? and there aren't stack traces either
in go at least you can do fmt.Errorf('something went wrong in MyMethod: %w", err)
you can use eprintln!("{}", err); i think
does that allow the error to be unwrapped
i do actually have a custom error type but i use it from several functions
so it doesn't pinpoint the function
Errors contain exactly what you put in them, just like any other type
Want a backtrace? Put one in
I prefer the shortcuts rust has (especially call()?)
you could do this but its not that nice lol
pub struct MyError {
pub context: String,
pub error: MyErrorValue,
}
besides that it's whatever
or this but that's basically creating your own library
pub struct WrappedError {
pub context: String,
pub error: Box<dyn std::error::Error>
}
impl std::error::Error for WrappedError {}
impl std::fmt::Display for WrappedError {
pub fn fmt(&self, f: std::fmt::Formatter<'_>) -> std::fmt::Result {
writeln!("{}: {}", self.context, self.error)
}
}
関数 フォオ(整数 x)『
返す x*5。
』
関数 バル(整数 x)『
返す x*2。
』
関数 メイン()『
整数 x=2。
もし フォオ(x):10 『
もし 整数 y = バル(x)『
プリント(「%d\n」、y)。
』
プリント(「%d\n」、x)。
』
』
wdym by unwrapping
typically you define your own errors and automate that with thiserror no?
say for example in a library
Or snafu, if you want your errors to be actually useful
i was specifically talking about the experience without third party crates lol
So not the rust experience then
do people really prefer rust error handling to go, or do they prefer rust error handling with the use of a library
¯_(ツ)_/¯
mm
i think i made it clear what i was saying
go allows you to create another error that adds extra context and embeds other errors
you can retrieve the inner errors using errors.Unwrap
you mentioned anyhow specifically what is what I assumed
I think you meant to ask "do people prefer deliberately handicapping themselves, or do they prefer writing code normally"
Hey guys
i was trying to clarify whether people really prefer it without libraries
and rushii did say they did iirc
actually nah they said even without anyhow
Nobody writes serious programs without libraries in any language
the original question was about without libraries though
Linux:
just the native language behavior
its fair if rust doesn't want bloat in the standard library... i think maybe the core error handling should be better lol
if it's so barebones talking about people not using a lib for it is basically a strawman (i.e. everyone sane uses libraries)
and if so I dunno
thiserror is pretty important to reduce bloat
I feel like that aspect is pretty missing from rust core
it's kinda on par with go
but if we're including libraries then it crushes go
depends how you define serious (you could have a really simple program that's somewhat serious)
and depends on how much the language has built in
eh well sure
i think i have my answer
xd
i could genuinely imagine that some people really hate go erorr handling enough to find it worse than rust without libs to be honest
I think most of the hate comes from the lack of the ? operator on errors
yeah maybe it was a dumb question
Yeah even if you're in a weird handicapped build situation it's not hard to write a simple anyhow clone
Probably a static mut errno
based
this is a very serious program
#include <stdio.h>
int main(int argc, char **argv) {
if (argc < 2) {
fputs("usage: echo <msg>\n", stderr);
return EXIT_FAILURE;
}
puts(arv[1]);
return EXIT_SUCCESS;
}
i mean actually the real version of echo does seem to be a bout as simple as this
i think it's a shell builtin though
maybe
/bin/echo does have some flags
actually wait
more correct
#include <stdio.h>
int main(int argc, char **argv) {
for (int i = 1; i < argc; ++i) {
if (i != 0)
fputs(" ", stdout);
fputs(argv[i], stdout);
}
puts("");
}
wait wait
best to just use int i instead of size_t i
because idk maybe it breaks if argc is negative
negative iq move, passing negative arguments to application
i just typed it with english spelling lol
i think error handling should be something that can be easily handled without a library
I've never had to do that in any language before
yeah lol
GUHHHHH I AM GOING TO GO INSANE
i've been debugging an animation for like 15 minutes only to find out that the problem was that the types for react-spring are wrong
me when i lie about my types
give up hopng for a fix
@ornate quiver @jade stone @valid jetty 
wyd
making an os
good
Love
YES
i wasnt planning on doing aoc this year but i think i might try again
only 12??? 😭
@valid jetty does this mean youll do aoc
did theo make a video about yaak or something
i love when i have an error and the only result is the source code that produces the error
i think topaz should have hired volunteesr
to make the 25 days
he already has (pretty sure theyre volunteers) beta testers
so whats the issue getting people to create puzzles
does this mean my global leaderboard scores for 2024 are gonna get removed
no
genuinely considering it
ill make sure
they do
@valid jetty@valid jetty@valid jetty make an os
i will at some point
thats on my list of complicated things to achieve
along with a raytracer and some other things
actually that reminds me
let me try to write a basic raytracer
OS written in elle
not really possible yet
elle still doesnt have unions or static arrays in the type system
someone tried to use elle for an x11 window and it went badly because the x11 api uses those extensively
One day 
does anyone know how to make chrome ignore all debugger statements?
There's a button in the sources panel that says disable break points. It's next to the pause button and looks like a breakpoint
write a database!!
ok ty
rosie stop working on these random ass projects
make something actually useful
you will regret having wasted all this time
i am learning a lot
you already know enough
skill wise youre a senior engineer and not by little
resume wise youre not even a junior
you need to either make some good projects now and lie about having done them as professional experience or just lie about everything but then you wont have projects to back it up
rosie do not ever use a truthful resume
start out with one that matches your skills
add 5 years of experience
dont disclose your age
ive reverse engineered react in 2 entirely different projects, i have projects in react, among with my plugins which work together with the react reverse engineering work i did
and i made some things in react the normal™ way tho thats not a lot i will say
along with elle that makes a decent resume maybe :3
I love your random projects, keep doing them
yayyyyy
@valid jetty rewrite React in React
do they not check for stuff like that
it depends on the person
youre like smartest person in the world
youve reached the limit
theres nothing left to learn
i don’t believe this can ever be true
rosie is max intelligence
rosie knows the answer to everything
rosie has proven string theory
quick question @valid jetty is P=NP or not
soon
https://arxiv.org/pdf/2510.17829 new paper just dropped actually
haven’t read it, not that i think i could understand it rn
yup yup it is, i know trust me
proof by rosie
:3
@valid jetty hii
now do glass and caustics
@valid jetty make a website when
this horse is almsot as smart as you
who would win in a math competition rosie or this horse
rosinga
impressive
You fail to see the obvious truth
Rosie is the horse
WHAT
INSANE
the what
am i accidentially not thinking of anticheat that has driver name called like that
that's valorants driver
i added multiple bounces and fixed the reflections on other spheres https://cdn.discordapp.com/attachments/542264318465671170/1430769164343050291/Screen_Recording_2025-10-23_at_5.03.04.mov?ex=68fafb1f&is=68f9a99f&hm=eb514e505226a2569e56144c1acfbfdd81c016ecc6b795569cd325495cf7e687&
success? maybe???
i mean it traces rays
its kinda funny because the more i realize things are wrong the worse my older attempts start looking in comparison
i wanna be able to see the reflections NOW
such a tiny window to preview
id go insane
the window is 800x800
ok thats enough
good night
actually
really quickly
ok yes brighter colors do look prettier
yay
ok final final
i added a second light source
final final final
Me when I need a version system for my projects
Me when I really, really don't want anyone to modify my variable
erm actually final just prevents overriding not mutating
shes a good enough programmer to be a capable senior
probably missing some devops knowledge but that's a week of learning max
just need to use any of these
- your friend is "the manager"
- the company went bankrupt
- you sounded confident enough in the interview that they wont bother checking
- "i would prefer for my current employer to not be contacted as that could jeopardize our relationship"
- they just dont care enough to check
maybe you could use "i dont keep in touch with my previous manager"
Yes i know
Where are they rays
If this was a real ray tracer
It would be noisy

Don't try to lie your way out of this one
THIS IS A RAY MARCHER
On classes and methods yes
On fields and variables it prevents reassigning
(But indeed not mutation)
error handling i guess
because i shoot a single ray for each pixel
vec4 trace_ray(Ray ray) {
vec4 color = vec4(0.0);
Ray current = ray;
float factor = 1;
int depth = 10;
for (int bounce = 0; bounce < depth; ++bounce) {
float closest_hit = 1e14;
int closest_sphere = -1;
for (int i = 0; i < spheres_size; ++i) {
float hit = intersect_sphere(ray, spheres[i]);
if (hit > 0 && hit < closest_hit) {
closest_hit = hit;
closest_sphere = i;
}
}
if (closest_sphere == -1) {
color = vec4(102.0 / 255.0, 191.0 / 255.0, 255.0 / 255.0, 1.0); // SKYBLUE
break;
}
vec3 point = current.position + current.direction * closest_hit;
vec3 normal = normalize(point - spheres[closest_sphere].center);
vec3 view_dir = normalize(-current.direction);
for (int i = 0; i < lights_size; ++i) {
color += calculate_light(lights[i], spheres[closest_sphere], point, normal, view_dir) * factor;
}
vec3 reflect_dir = reflect(current.direction, normal);
current.position = point;
current.direction = reflect_dir;
factor /= 1.8;
}
return color;
}
but it is not ray marching
ray marching is when you step through with a small distance until youre too close to an object or too far from an object
just because i only shoot one ray does not mean its not ray tracing, the ray is still being traced and its bounces are contributing to the light on the spheres
Probably silly to ask, but I don't suppose anyone here knows how to make a kotlin compiler plugin that can rewrite or filter imports?
here is your noise
i thought "i wanna add a plane" so i did, then the reflections looked weird because my spheres were perfect mirrors, so i added specular reflection, that turned the spheres noisy, so i added multiple rays
i also added some form of basic scattering for the shadows
but yeah performance kinda sucks ass now
who knew running that many light calculations takes a long time
well actually that screenshot is running this configuration
MAKE REFLECTIONS
no idea
they are reflective
make it fully reflective
I wanna see the entire scene in the reflection
https://resources.jetbrains.com/storage/products/kotlinconf2018/slides/5_Writing Your First Kotlin Compiler Plugin.pdf @fleet cedar
a
Yes I know how to write compiler plugins
But I haven't found any way to alter imports
guh?
well then i just turn down the roughness
Set roughness to negative
make a mirror NOW
theyre mirrors, i just dont have a good scene to show that
Make the floor plane do perlin noise or something instead
i will try to optimize it
add a teapot model
The Utah teapot, or the Newell teapot, is one of the standard reference test models in 3D modeling and an in-joke within the computer graphics community. It is a mathematical model of an ordinary Melitta-brand teapot designed by Lieselotte Kantner that appears solid with a nearly rotationally symmetrical body. Using a teapot model is considered ...
DOOO
Add every teapot
@valid jetty how do i write a memory allocator for my os
for a very simple os just write a bump allocator
otherwise implement some heap allocator i guess
idk how to get the stack location help
Stack location for what?
stack
you need to allocate one
The stack for the main thread is allocated by the OS, you shouldn't need to interact with that much
but he's making the os
if ur in long mode u should use RSP
check out https://wiki.osdev.org/Memory_management for more details though
but x32 abi 🥺
death
im in protected mode
Ugly, but PreprocessedVirtualFileFactoryExtension plus some regex seems to do the trick
Would prefer to do it on an ast but gotta take what I can get
I don't use typescript like at all, does anyone have any idea if theres a better way to initialize this value
static readonly feels kind of silly to use so maybe just do this ```ts
class Test {
static bwa: RegExp | null = null;
static {
try {
this.bwa = new RegExp("");
} catch {}
}
}
yeah I don't want it being written to
and static blocks arent supported in the target browser :c
i did this originally
im the type of person who likes very explicit typing and like access modifiers
thats weird
its why i switched to typescript for this anyways lol
I was gonna use JSDocs like I normally do (i dont like TS that much) but its missing stuff I wanted to use
both private and readonly do absolutely nothing after compiled to JS
i know lol
you shouldnt really rely on it
i dont
its just nice to have it there
in the typing
so its painfully obvious that its like
dont write to this pls :3
I think you're looking for a language called C#
I would actually just make it so the code can never throw
if _colour_count is just number you can do (this._colour_count | 0) * 3 and it'd avoid fractional numbers and NaN
actually considering its a static property
why would you think it'd error anyway
ok im back
wdym
oh
because some browsers dont support that regex
lol
oh
yeah
_colour_count is just an integer for encoding the colours
it just makes the wrapper functions faster
there is internal functions that can encode many other colours besides just that limit i set
javascript classes kind of suck you're probably better off using globals in a separate module
i dont mind if they suck
and you def should be using a bundler
why
im just
way faster than tsc
using the typescript playground rn
erm
i didnt wanna setup a whole projet
for a silly thing i wanted to do
its just meant to be a better form of that 3y3 profile theme thing
i cut the byte count down from 25 to 12 so
i'd say its a win on my end
you can expect it to be running on a modern browser then.........................................................
meh
it doesnt matter much to me
i want this to be usable on more than just smth like vencord
its a cool tool to be able to encode hidden colours
i just store the data as bgr in the unicode
lol
obv it has a character converter cuz otherwise they wouldnt be invisible
2016 is like an ancient feature
i thought it was newer though ngl
idk
maybe im just dumb lmfao
because regexr
doesnt support my regex
and it says its usin js's engine
/[\u{0E0100}-\u{0E01EF}\u{0E0020}-\u{0E0030}]{6}/gu
if you thought that was weird then look at this lol
i need to comment my code more
😔
ima make a ts project locally now
uhhhhh
is it a bad practice to write my own .d.ts files
im like messing around with a raytracer thingie lol
less shiny
its running raylib through elle which loads a glsl fragment shader
elle is my toy compiler project lol
it scares me, I can't seem to figure it out lmao
oh???
does it do like, a preexisting language?
or something that you made
nop its my own compiler from scratch
no like like, whats it compiling
good
uhbbb it compiles into qbe ir
now make elle run in a shader running in elle
its an alternative to llvm
Elle for risc v when
yeah
awesome
me
everyone
uh
not true
a lot of hospitals use 32-bit
I myself have 2 32-bit computers that I still use
yes
amd meets up with intel at a bar. "why the long mode?", says intel
(itanium is found dead the following day)
i do
im to lazy to make the output any smaller
so for now the encoded colours are at 12 chars compared to the 3y3 of 24 (removing all the nasty padding vencord adds inside it)
okay yeah
I don't think going any further has much benefit because I can only cut off like
can you possibly make this smaller than that?? because like each 2 bytes represent a single color channel
2 - 4 characters in very specific cases
how do you possibly encode that information into less bytes
#aabbcc can be turned into #abc which can be encoded in 4 characters instead of 6
oh i guess so
if you wanna go even further you can apply deduping and just put a special character to duplicate the prev
would save 4 chars
im assuming you dont encode the hashtag right so then it would be 3 chars instead of 4 no?
oh i
lmao
oh i guess that makes sense actually that it has to be an even amount
and yes i remove the hashtag
it uses an encoding map to convert 0-255 to an invisible character
only 16 of them are the tag characters
the rest come from the group after it (which goes to EF)
vencord currently just uses 3y3 encoding so best case scenario is 24 characters
2 hex colours, 6 letters per colour, 2 bytes per letter
2 * 6 * 2 is 24
currently the way vencord does it is with like [#hexcode1,#hexcode2] which adds 10 characters
bc of the [#,#] chars
that makes sense
mine just encodes the RGB data into the unicode values themselves
its 100% possible to get it smaller but only for specific cases like the #aabbcc one
other than making a more advanced map that maps possible 000-FFF values
which could get the result down 2 characters for a single hex code
and then down 4 for the #aabbcc case
meaning itd go from currently 38 characters to 4 if that was to be applied
peak bio space saving
the only issue with this is finding another F00 amount of invisible characters with 0 width that I can use
at that point they would be so spaced out I'd probably have to manually write half of the map
currently the map is made up of 2 long sections of invisible characters
that are very easy to generate in a for loop for the map
i chose 0x0E_01_00 over the latin tags because it goes to EF (missing 16 chars instead of 128) instead of 7F
then the latin tags provide the other 16 missing characters
I honestly don't know of any possible way besides what ive listed to go any further on this lmao
pushing the limits of the unicode characters here
im gonna look through the list of invisible characters to see if i can find more regions to grab from
but a lot of these are used in legitimate stuff like arabic characters and alike
yeah currently need around 3776 more characters
and I don't think theres that many
yeah
unless theres more I don't know about (over half of these are reserved language override stuffs)
there isnt any way I can think of to get a map with 0xFFF support
sorry for the yap fest btw, I just like explaining shit im doing when someone asks about it
i had a slight inaccuracy in some code i was writing because i was using a hex literal slightly larger than MAX_SAFE_INTEGER
also i just love how javascript has no sized types
like they have pretty decent bitwise stuff but no sized types
you can use the byte arrays
if you really want sizing
other than that it doesnt really need sized types and its not meant to have them
i just did a big old crc &= ~(BigInt(1)<<BigInt(64))
oh this is so beautiful
have you seen Sebastian Lague's videos? they're great
yes! the bvh video is actually what made me just open a file and start trying to write one lol
i looooove sebastian lague
right? his presentation and voice is so calming
and like really good explanations too
people came up with "bob ross of programming" and thats actually so true
yeah his cat appearances are a plus
good
nowww add refraction
zeet just learned these words last week give him time
i added roughness and gave the spheres different ior
7 fps
its rendering at a very high sample rate
@valid jetty make it faster
i can lower it but then it looks a little noisy
@valid jetty read how blender does their EEVEE rendering
that is far more complicated than i can make
you could make it in like a day youre the worlds smartest person
@valid jetty recreate the universe entirely in code
thats my next goal
ive wanted to combine all of sebastian lague videos into one thing
simulate individual protons moving through space
rosie has a pocket universe
i have one of those
how
I think my goofy ahh invisible colour thing is done
It has support for decoding my little format, a very optimized 2 hex code format (for vencord), and the unoptimized 3y3 format
You should add a smiley face to one of them
textures 
remade the oneko plugin in roblox the cat sprite is from the github link and I just used that but erm ye
this cat plugin
gpu-accelerated realtime software raytracing 🥺
I got bored and ended up making the same little colour encoding thing but for this
-# obv it includes the font and effect
this uses the same advanced colour encoder I made for the 2 hex code specific one (for vencord)
so it has the same savings with the deduping and shrinking
oooooooo
very stupid idea
bio blah blah
https://discordbios.example.com/userid
^^ plugin would fetch and replace inline
lmfao
Yaay loading arbitrary domains
it wouldnt be arbitrary
usrbg exists and they have an "arbitrary" domain
https://usrbg.is-hardly.online/usrbg/v2/userid
just put it on the parent and overflow hidden or smth
no i am doing something much more cursed than you could ever imagine
i think i will end up generating svg path at runtime
smth smth not part of the DOM
it's why some events don't fire on svgs
have u tried putting css inside your svg
maybe that'll work
i love onMouseLeave firing when you hover over an svg in the same element 
no, svg does not support the border-radius css property
you cant use an html element as a clip path and even if you could, i still dont think it would work for what i am doing
Have u tried
foreign object element
with html and css inside
wont work for what im doing
😭
html elements dont support stroke
does this folder have the greatest thing i ever made which i completely forgot about
or is it a crappy app with awful code
idgi
guhhh
the friendly rx, ry, width, height attributes on rect
wouldnt call them friendly
again, i need to copy the border radius from an html element to an svg element
guh
what even are you doing
satanic stuff
ill send when im done 
yeah u need to use <mask> and <foreignObject>
see what discord does for the status icon
inspect element it
wrong channel sorry
is it in elle
uhhh yes but the actual rendering is done on the gpu
add volumetric fog now
my laptop will EXPLODE
aren't there aren't that
what
that's what you said
implement marching cubes
I will continue your legacy
@valid jetty @valid jetty @valid jetty @valid jetty so much elle and no website
@valid jetty teach me how to implement VGA graphics
@ornate quiver you too
I need to implement double buffering as well
:blobcatcozy: 
look at this improvement in the past 2 days
i hate writing frontend code
so do i
I keep procrastinating my website rewrite guh
DO
hop on astro + tailwindcss
Still don't think that would work for what im doing but I'll try it later
it might work
(i assumed you couldn't mask foreignObject becase you can't use them as clips either)
turn this into a game engine!!!
I rewrote for him but he won't use
werent you saying im wasting my time a few days ago
@valid jetty hiii
hiii
ended up needing to use foreignObject, but not mask
(mask wouldnt work when i tried it
)
yay
Add antialiasing