Teukka has quit [Quit: Not to know is bad; not to wish to know is worse. -- African Proverb]
Teukka has joined #osdev
criswell has joined #osdev
jcea has joined #osdev
TkTech8 has joined #osdev
TkTech has quit [Ping timeout: 255 seconds]
TkTech8 is now known as TkTech
agent314 has joined #osdev
agent314 has quit [Ping timeout: 260 seconds]
Turn_Left has quit [Ping timeout: 252 seconds]
f1sty has joined #osdev
zenomat has quit [Server closed connection]
zenomat has joined #osdev
edr has joined #osdev
criswell has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Etabeta1 has joined #osdev
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
criswell has joined #osdev
j`ey has quit [Server closed connection]
j`ey has joined #osdev
Left_Turn has joined #osdev
stazthebox has quit [Server closed connection]
stazthebox has joined #osdev
priime has joined #osdev
pebble has quit [Read error: Connection reset by peer]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 272 seconds]
Left_Turn has joined #osdev
criswell has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Turn_Left has quit [Ping timeout: 248 seconds]
frkazoid333 has joined #osdev
criswell has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 248 seconds]
goliath has quit [Quit: SIGSEGV]
f1sty has quit [Ping timeout: 252 seconds]
tronexte has quit [Ping timeout: 276 seconds]
tronexte has joined #osdev
jcea has quit [Ping timeout: 252 seconds]
criswell has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
f1sty has joined #osdev
criswell has joined #osdev
EmanueleDavalli has joined #osdev
deglebe has quit [Server closed connection]
deglebe has joined #osdev
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
<ZetItUp>
i now im not in a place where i should worry about optimizations, but im writing a little ls program for my os, should i worry about what sorting algorithms i use or does it not really matter?
<nikolar>
i mean it matters, it just depends on if you care
<nikolar>
though quick sort is probably fine
<heat>
as-is you're probably quadratic anyway
<heat>
on the readdir() itself
<ZetItUp>
yeah thats the one im using, just thought i'd ask if it would end up being an issue, but im in no space near 10s of files in each directory anyway :D
<heat>
probably not
<heat>
again, your filesystem is quadratic anyway
<heat>
well, probably is, since you designed it yourself
<nikolar>
what do you mean by quadratic
<heat>
ls(1) normally does a readdir() + stat() on that entry
<heat>
readdir is obviously O(n), stat() in naive filesystems is O(n) on the lookup
<heat>
so O(n^2)
<nikolar>
i assume you'd have *something cached*
<heat>
nah
<heat>
with modern(er) filesystems, you get O(log n) lookups
<heat>
e.g ext3 and ext4 and btrfs and zfs and xfs and literally any usable fs out there
<heat>
NOT ext2 though
<nikolar>
realistically, you should only need O(n) (or log n)
<heat>
you're wrong
<nikolar>
since you should cache at least the last accessed inode or whatever lol
<heat>
what's the last accessed inode?
<nikolar>
*last few*
<nikolar>
i didn't mean literally just one
<heat>
readdir() = reading a directory, independently, in one fd
<heat>
stat() = lookup a file, independently
<heat>
the two operations don't know about each other
<ZetItUp>
yeah im not doing any caching etc, just going from the files ID, and looks at it's parent all the way down to the root
<heat>
and on a case like: for patch in patches/*.patch; do cat $patch; done
gildasio has quit [Ping timeout: 240 seconds]
<heat>
they will most _definitely_ not know about each other
gildasio has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
humm has quit [Server closed connection]
humm has joined #osdev
goliath has joined #osdev
criswell has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kof673>
sadly, ls must be written in inline assembly without any function calls, otherwise we would not have to hardcode the sorting algorithm
<kof673>
the tragedy of ls
criswell has joined #osdev
<pog>
function calls are stupid anyway
<EmanueleDavalli>
function calls are not real, they are just fancy jumps
<EmanueleDavalli>
wake up sheeple
<pog>
how can you say something so controversial and so brave
* Ermine
gives pog a piece of cheese
* pog
is fascinated
Turn_Left has joined #osdev
tommybomb has quit [Server closed connection]
tommybomb has joined #osdev
Left_Turn has quit [Ping timeout: 260 seconds]
pog has quit [Server closed connection]
pog has joined #osdev
<zid>
pog: You can lead a horse to Evanescence but you can't make it wake up inside
<pog>
can't wake up
<nikolar>
wise words zid
gog has joined #osdev
gog has quit [Client Quit]
da5id has joined #osdev
netbsduser` has joined #osdev
<mcrod>
hi
<pog>
hi
sm2n has quit [Server closed connection]
sm2n has joined #osdev
uint64_t has quit [Server closed connection]
uint64_t has joined #osdev
monkeyPlus has joined #osdev
netbsduser` has quit [Ping timeout: 248 seconds]
monkeyPlus has quit [Remote host closed the connection]
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
vdamewood has quit [Quit: Life beckons]
vismie has quit [Server closed connection]
vismie has joined #osdev
EmanueleDavalli has quit [Quit: Leaving]
Turn_Left has quit [Remote host closed the connection]
Turn_Left has joined #osdev
<ZetItUp>
"Can i make this better?", cobbled the register orders with the syscalls and did too much damage to the code i had to go back, aka No i could not make it better :D
<ZetItUp>
git is underestimated sometimes
ursa-major has quit [Server closed connection]
ursa-major has joined #osdev
<pog>
git reflog has rescued me from my own glaring idiocy on a few occasions
<pog>
i stopped using any gui with git since the last time i midnlessly clicked to drop a stash instead of apply it unstaged
<nikolar>
we love git
PapaFrog has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
PapaFrog has joined #osdev
gjn has quit [Server closed connection]
gjn has joined #osdev
<zid>
no, we all love lain
<nikolar>
you can love multiple things
EmanueleDavalli has joined #osdev
<kof673>
love not the buildworld, or any part of the buildworld bsd joke for he at :D
f1sty has quit [Read error: Connection reset by peer]
<pog>
h e a t
f1sty has joined #osdev
<pie_>
do operating systems have to do anything special for implementing signals?
<pie_>
i guess you dont even necessarily to anything to the scheduler
monkeyPlus has joined #osdev
<pie_>
and i guess its just instead of just context switching to the earlier execution point, youre now context switching to the signal handler instead?
<pie_>
so if someone doesnt a longjmp in the signal handler there isnt really anything special about that either, youre just continuing to use your scheduler interval?
<nikolar>
what do you mean, signals are sort of very annoying to implement kind of thing
<nikolar>
there was a great video on youtube of someone going through the whole path
<pie_>
id be interested to take a look if you can find it
<pie_>
i imagine the details are terribly annoying and involved, but froma high level?
<nikolar>
what do you mean from a high level
<pie_>
what more do you need than what i said?
<pie_>
well, whatever - if you know how to find the youtube video i'll just watch that
<heat>
it turns out "context switching to the signal handler" is a very complex thing
<zid>
nesting and locking and stuff sounds like a paain
<zid>
and not forgetting you're inside a signal if you get scheduled out during one etc
<bslsk05>
github.com: Onyx/kernel/arch/x86_64/signal.c at master · heatd/Onyx · GitHub
<heat>
you can follow the code paths to get an idea
<pie_>
the more i read about signals the less i want to touch them with a 10 foot pole
<pie_>
if you are not a 200 iq programmer, what is the correct way to do things without introducing a shitton of bugs?
<heat>
test them?
<geist>
it's not *too* bad. the big signals get you most of the way there
<geist>
there's kinda a logic to them, it's just not super regular
<geist>
at least the kernel part of it
<pie_>
sorry i mixed up my channels, im raging to some of my other friends too but i can ask here as well :P
<geist>
i also remember learning process and session groups and scratching my head until it kinda made a sense
<pie_>
*what is the correct way without introducing a shitton of bugs when writing application code?
<heat>
what
<geist>
correct way of what?
<geist>
writing code without shitton of bugs?
<pie_>
What is the correct way to write signals code without introducing a shitton of bugs when writing application code? - or alternatively, how can you avoid writing signals code in the first place? The latter is presumably not an option for several features that you have to use signals for.
<heat>
you can very easily avoid writing signals code
Left_Turn has joined #osdev
<heat>
this is not 1980
<pie_>
Im not prepared to become a carpenter
<heat>
i can't think of a place where you _need_ to write signals code, or at least where you need to write signals code like it's 1980
<heat>
done, there you go, the EVENT LOOP will handle it
<geist>
the key is you need to not do a lot inside the signal handler
Turn_Left has quit [Ping timeout: 244 seconds]
<geist>
there are severe limits to what you can do inside it, but if you avoid calling things you cant then it's as heat says lots of setting of atomics or whatnot to trigger something else
<geist>
like shutdown your event loop, etc
<geist>
but honestly i've written signal code like i can count on one hand
<geist>
generally to do something like put TTY state back or whatnot
<geist>
which is more or less copy/paste boilerplate
<mcrod>
man
<mcrod>
i know i'm not here anymore but i'm basically moving to a philly suburb
<mcrod>
someone throw a party for me
<geist>
you can be here!
<geist>
is moving to a philly suburb good or bad?
<mcrod>
yes
<mcrod>
i have train access to philadelphia for $12
<mcrod>
and wilmington delaware 25 minutes by car
<mcrod>
and infinite food options
<mcrod>
most important: 1.2 hour commute reduced to 15 minutes
<pog>
i don't understand this in the least, but for some reason the args are fucked
<pog>
and i bet it has to do with the way the decltype and this->* ish works
<pog>
i expect the params to be this, string
<nikolar>
decltype is just typeof iirc
<pog>
but instead i get this, ???, string in rcx, rdx r8 respectively
<pog>
in ms_abi
<pog>
but ia _also_ have -fno-ms-extensions
<nikolar>
i don't know why you need declype though instead of just putting the tpye there, but that's a separate issue
<pog>
not sure if that changes how register parms are passed or not
<pog>
this is in the code i cribbed
<pog>
a shortcut so you don't have to actualyl declare the full function pointer
<pog>
which is probably key to the problem here
<pog>
but i have no clue
<pog>
does anybody have a clue that i can borrow lol
<pog>
i even checked this by writing the contents of r8 into rdx in a debugger and then it works
<nikolar>
ask chatgpt :P
<pog>
fuck no
<pog>
i'd rather never find out than do that
<nikolar>
lol
<nikolar>
i can tell when the code was written by an "ai" at work
<nikolar>
by how much i have to fix it
<nikolar>
i already complained to zid
<zid>
<pog> i'd rather never find out than do that
<zid>
A+
* kof673
gives pog clew for labyrinth...all roads lead to cow tools
<zid>
I had a question in my head earlier for if a word with certain synonyms existed and thought, dang, an LLM would be great this. Then said 'Shame those aren't something I'd ever use'.
<nikolar>
lol
<nikolar>
i only ever use things i don't like to be able to more accurately shit on them
<kof673>
there is an old moby thesaurus file...public domain should be...is perhaps too wide of scope sometimes, but that can be useful
<zid>
gog did you draw a fleet of undertale characters in wplace yet
<zid>
That is apparently, the entirety of the trans agenda
<nikolar>
eh?
<zid>
eh what
<nikolar>
the entirety of the trans agenda is undertale characters in wplace?
<zid>
dang, found TWO golshis so far in iceland
<zid>
yes
<nikolar>
kek they love their golshis
Lucretia has quit [Remote host closed the connection]
<pog>
well i hope when an archaeologist finds my bones they're like "whoa sans undertale"
<zid>
The crocs will give it away
<heat>
pog: what does m_output_string point to?
<zid>
I found 20 undertale characters then got distracted by a giant ADO
<pog>
heat: second function pointer in EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
<pog>
and it actually does, this works if i move the register value remember
<zid>
nice! giant balatro tarot card
<pog>
heh there's a long bisexual flag over vesturbær and miðbær
<pog>
nice
<zid>
do you want to see what I am draw
<nikolar>
we love a giant ado
<zid>
rip just died for me
<pog>
oh and somebody's drawing a long trans flag across kópavogur from kársnes to ulfarsárdal
Turn_Left has quit [Read error: Connection reset by peer]
jcea has joined #osdev
<nikolar>
ok i think i undestand what ->* does
<nikolar>
if you have two pointers, one to the object, another to the arbitrary member of the said object (usually a function) ->* let's you call it correctly
<nikolar>
by doing (obj->*func)(), it passes the obj as the hidden argument or whatever so that you get a proper method call
<nikolar>
what a stupid language
<nikolar>
also ungooglable
<pog>
nothing is googlable anyway
<nikolar>
some things are even less googlable
<pog>
also the author of the code i'm cribbing doesn't provide any proof of concept that this actually executes and with what compiler
<nikolar>
lol the compiler *shouldn't* matter
<pog>
shouldn't
<nikolar>
yes
<nikolar>
the c++ standard might though
<pog>
but it very well may because i don't even know enough to know if this is well-defined behavior and clearly not becauswe of this mysterious extra parameter
<pog>
unless there's another implicit parameter in msabi?
<nikolar>
oh also, ->* might be relevant for non function members if you've overloaded assignment?
<nikolar>
if that's a thing
<nikolar>
i don't know, c++ sucks
<pog>
the actual member function itself appears to have three params
<nikolar>
i imagine the object itself is the 4th hidden param in that case
<zid>
For the uninitiated: The skin bandits are a faction in kenshi, who are robots. Robots who want to be people. They achieve this by flaying humans and wearing their skin.
<nikolar>
like normal humans do, duh
<zid>
'achieve'
<pog>
cool
<zid>
gcc-sbc pls
<zid>
(skin bandit C)
<nikolar>
lol
<pog>
fuck i just found it
<pog>
maybe?
<pog>
seems to think that the return type isn't scalar so it shifts all the params right
<zid>
Oh someone is adding a bridget to my town
<nikolar>
a what
<zid>
trans guilty gear character
<zid>
a nun who fights with a yoyo lol
<pog>
yes we love bridget
<nikolar>
kek
<pog>
anyhow i answered my own question thanks y'all for listening to me
<nikolar>
you're welcome
<zid>
nikolar refuses to help me love lain
<pog>
this also confirms that it'll never work the way i want it to and give me that sweet syntactic sugar
<pog>
and encapsulation and strongly-typed doohickies
<nikolar>
lol
<nikolar>
that's just c++ by definition
<zid>
-Wconversion boom
<zid>
strong types
<nikolar>
it never works how you want it to so you have to hack around
<pog>
i think i'd be better off rewriting the efi spec with modern C concepts
<zid>
like.. not typedefing all pointers to HANDLE?
<pog>
yes
<nikolar>
who knew
mahk has quit [Ping timeout: 252 seconds]
<pog>
i need to go find bjarne and ask him why
<nikolar>
i don't think he knows
<zid>
That'd require a level of self-reflection
<nikolar>
i think c++ does have reflection P
<nikolar>
:P
TkTech5 has joined #osdev
<heat>
c++26 does, yeah
<nikolar>
oh heat finally managed to evade the cannonballs