<gog>
maybe i'll do some osdev during this week off
<mcrod>
what
<gorgonical>
that's why I bought a steam controller
<heat>
out of the box, and even after installing custom drivers it does not work
<mcrod>
redshift is a night light thing
<mcrod>
for DEs/WMs that don't have night light natively (e.g., i3)
<zxrom>
OS development was easier 40-50 years ago. An OS for a ZX Spectrum or an Atari 8-bit could be written alone in a few months.
<mcrod>
also I'm highlighting some poor bastard
<gog>
i plugged my wife's xbox controller into my computer with a usb-c cable and it worked immediately
<mcrod>
which OS
<gog>
manjaro
<gorgonical>
i use slackware and have had no problems
<heat>
40 years ago is more or less right in the original berkeley CSRG BSD stuff
<heat>
and that most definitely cannot be written in a few months
<mcrod>
also, it is exceedingly difficult to customize i3 to the level the r/unixporn people do
<gog>
is that practical tho
<heat>
gog, mine is too new to work
<heat>
with bluetooth, with usbc, nothin works well
<mcrod>
gog: sure
<gog>
i used to do these fancy desktop things but i found them to be cumbersome
<gog>
probably just me tho
<gog>
i'm very set in my ways i think
<gorgonical>
the peak of desktop ui was windows 98 and I stand by that
<mcrod>
i love you.
<kof123>
cray had a quote ...you could do whatever you wanted in the 50s/60s or so, because noone "knew" what an OS was
<mcrod>
I've said that for 10 years
<mcrod>
how do people trick out nvim to do all of this fancy shit too
<heat>
i like windows 11
<mcrod>
really, I swear it must take WEEKS
thinkpol has joined #osdev
<gorgonical>
eeeeeeeeeeeemacs
<mcrod>
i've always been a bit fascinated at how sleek some of the r/unixporn (sorry) stuff looks
<mcrod>
except no one documents anything
<gorgonical>
i think of that stuff like the actors in weight loss infomercials. they've posed this sleek shot which is not really representative of how it feels when using it for real
<heat>
yeah exactly like po-yes yes weight loss infomercials exactly
<bslsk05>
jdhao/nvim-config - A modern Neovim configuration with full battery for Python, Lua, C++, Markdown, LaTeX, and more... (420 forks/2462 stargazers/MIT)
<heat>
i use vscode, and it works
<mcrod>
yeah yeah I get it
<heat>
i'm happy that my thing works
<mcrod>
i won't lie to you though, I'm almost hopeless without an IDE
<mcrod>
I actually haven't needed to type anything in gdb other than bt full in.. an embarrassingly long time
<mcrod>
and why would you *want* to type something in gdb anyway?
<heat>
i do
<heat>
its faster
<mcrod>
the fuck you mean it's faster
<heat>
debugger GUIs suck ass
<mcrod>
so do you set breakpoints with commands?
<heat>
and it's not like I need more than bt and print anyway
<heat>
yeah, in the rare occasion i need one
<heat>
usually for my kernel needs it works like a post-mortem tool
<mcrod>
i see
<heat>
there's no way it's useful for a highly concurrent environment where things like memory may not even be concurrent due to bugs
<heat>
err, coherent in that second concurrent
<heat>
gdb does not tell you if your TLB is fucked
nyah has quit [Quit: leaving]
mavhq has quit [Ping timeout: 250 seconds]
<gog>
mcrod: i love you too
<mcrod>
<3
leon has quit [Ping timeout: 240 seconds]
<gog>
LESS THAN THREEEEEEEE
<heat>
all im getting is garbage ideas on radix tree iteration
energizer has quit [Remote host closed the connection]
energizer has joined #osdev
mavhq has joined #osdev
<gorgonical>
since it's thursday and for many people that's basically friday I want to ask a casual question
<gorgonical>
if you could instantly and effortlessly learn another human language what would your pick be
<zid>
english
<gorgonical>
interesting choice
<zid>
I'm not legally allowed to speak a second language
<zid>
but maybe I'd be better at scrabble
<gorgonical>
zid's like robert tappan morris and has been forbidden from speaking english for fear of wreaking too much havoc
leon has joined #osdev
dutch has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat_ has joined #osdev
heat_ is now known as heat
<heat>
probably russian
<heat>
i'll learn it one day i'm sure
<heat>
through sheer interest and/or invasion
<gorgonical>
heat I thought you were in Britain
<gorgonical>
unless you think Russia has got some big plans
<heat>
i'm not quite in britain
<heat>
slowly getting colonized by the english though
<gorgonical>
I would probably pick Finnish. I had a go of learning it but without a reason it becomes a sort of slog after a while
<heat>
romanian would also be fun
<gorgonical>
some very fascinating linguistic changes in romanian. Like lingua -> limba, that's a pretty big change
<zid>
imagine learning romanian though
zxrom has quit [Read error: Connection reset by peer]
<zid>
tens of thousands of hours of effort, so that you could be mauled by street dogs and get robbed
<gorgonical>
yeah but you could tell a lot of people about vlad the impaler from all the source text you can now read
zxrom has joined #osdev
zaquest has quit [Remote host closed the connection]
<zid>
I figured it'd be really shit, but it's actually only marginally shit
<gog>
me too
pounce has joined #osdev
Brain__ has joined #osdev
DynamiteDan has quit [Excess Flood]
DynamiteDan has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Brnocrist has quit [Ping timeout: 246 seconds]
slidercrank has quit [Ping timeout: 240 seconds]
slidercrank has joined #osdev
xvmt has quit [Remote host closed the connection]
xvmt has joined #osdev
DanDan_ is now known as DanDan
bauen1_ has joined #osdev
bauen1 has quit [Ping timeout: 250 seconds]
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
frkazoid333 has quit [Ping timeout: 250 seconds]
awita has quit [Ping timeout: 250 seconds]
tiggster has joined #osdev
gmacd has joined #osdev
xenos1984 has quit [Ping timeout: 256 seconds]
dude12312414 has joined #osdev
xenos1984 has joined #osdev
<mcrod>
hi
Matt|home has quit [Quit: Leaving]
frkzoid has joined #osdev
torresjrjr has quit [Remote host closed the connection]
torresjrjr has joined #osdev
Arthuria has joined #osdev
Brnocrist has joined #osdev
Matt|home has joined #osdev
* geist
yawns
<geist>
good morning everyone
<geist>
it's friday!
<sham1>
Yeah!
<geist>
unless you're in au or nz in which case it's probably saturday, but saturday is caturday which is just as good
gmacd has quit [Ping timeout: 240 seconds]
gmacd has joined #osdev
crankslider has joined #osdev
<mcrod>
or your time zone is EST :p
bgs has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
gorgonical has quit [Remote host closed the connection]
slidercrank has quit [Killed (NickServ (GHOST command used by crankslider))]
crankslider is now known as slidercrank
crankslider has joined #osdev
gorgonical has joined #osdev
<gorgonical>
I overslept this Friday. It was an accident, I swear!
gmacd has joined #osdev
bgs has quit [Remote host closed the connection]
<heat>
hi
hmmmm has joined #osdev
<mcrod>
heat: may I pet you
<heat>
sure
* mcrod
pets heat
* heat
pull requestsssssssss
* mcrod
dies
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gmacd has quit [Ping timeout: 268 seconds]
gmacd has joined #osdev
<geist>
more like pet requests
innegatives has joined #osdev
gmacd has quit [Ping timeout: 250 seconds]
<heat>
geist you never told me how you get your symbols in zircon
<heat>
i assume thru the bootloader?
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<geist>
what do you mean get the symbols?
<heat>
i'm assuming zircon can do addr -> symbol matching?
<heat>
at runtime that is
<geist>
no, not at all
<heat>
oh
<geist>
we have some external scripts to symbolify a kernel dump
<foudfou>
hi all, stuck at making my 32-bit x86 xv6-like toy OS a higher half kernel. OS includes a bootloader (i.e. no GRUB) and kernel is a flat binary (i.e. no symbols). Switching page dir after mapping memory fails because EIP=00100a32 which is not mapped yet, I think. What am I missing?
<geist>
you can basically paste it into a script that does it automatically
<geist>
there's a structured output of the way kernel dumps backtraces that it groks
* heat
nods
<geist>
foudfou: did you when setting up the initial page table also make sure the code where the cpu is currently running is identity mapped (ie, 1:1 mapping?)
<geist>
thats a common trick yo uhave to do, then onc eyou 'bounce' to the higher part of memory you can unmap it
<heat>
i think i'm stuck committing linking warcrimes until one of the linkers grows a "please put symbols here" option
<heat>
also: vbar trick but in IDT? :v
<geist>
eyah but not worth confusing a new person over
<heat>
it's probably too limited and won't work when switching modes
<heat>
still a fun option tho
<geist>
on x86 i dont think it's worth it, honestly, the complexity of doing that particular trick is more trouble than it's worth
<geist>
for arm and riscv it may be better, since there are less exception vectors, and it's easier to point it somewhere arbitrary
<geist>
so yeah, genera stratey is to leave the 'bottom' part of memory identity mapped in the first page table you set up, so that as soon as you turn it on the cpu can keep running at the low address
<geist>
then a few instructions later, jmp to the higher address and then you can unmap the bottom
<heat>
ok its just a bunch of weird hacks for weird systems
<mrvn>
mcrod: because binaries will be linked against it
gxt__ has quit [Ping timeout: 240 seconds]
gxt__ has joined #osdev
<mcrod>
heat: writing pure posix sh is pain
<heat>
that's because you su-
<mcrod>
unfortunately, cmake -S . -B build -G Ninja "${CMAKE_BUILD_FLAGS}" is causing a ' to be prepended and appended to the cmake command, causing it to generate shit ninja files which ninja then complains about
<heat>
you are good and valid
<mcrod>
thanks.
<mcrod>
mrvn: wait, you're not suggesting statically linking glibc are you?
<heat>
and then thinks CMAKE_BUILD_TYPE="Release -DCMAKE_INSTALL_PREFIX....."
<heat>
do not blindly quote things
<heat>
word splitting is definitely what you want here
<heat>
yeah, removed the quoting and it works
danilogondolfo has quit [Remote host closed the connection]
<kof123>
for shell i always like to put: options/variables functions then there is an implied main() after the functions
<kof123>
and alphabetize functions, to keep things orderly
gmacd has joined #osdev
<heat>
alphabetize functions?? haha that's going too far
<heat>
i wouldn't even alphabetize includes if clang-format didn't do it for me
<geist>
yeah same. i used to try to collect them by some sort of logic
<geist>
but kinda just bleh about it and alphabetize
<geist>
though i still do like to do the trick where if a foo.c has a corresponding foo.h, include it first by itself
<geist>
as a test to make sure the foo.h has the appropriate subincludes
<kof123>
heat: i said shell :D my c89 is one function per file lol
<kof123>
but you can just make an all.c and include them all. im not sure i see the purpose of "one-header-full-of-code libraries"
<heat>
you're either a libc person exclusively or you're NUTS
gmacd has quit [Ping timeout: 240 seconds]
<geist>
yeah one function per file is pretty extreme
<geist>
only real reason to do that is if you're making a .a file and you are using old tooling
<kof123>
i dont get heat's comment. what about libc?
<heat>
libcs are usually laid out like that
<kof123>
:/
<heat>
because of the libc.a
<kof123>
double :/
<heat>
in theory you want to bring in as little .a members as possible
<kof123>
oh, ok, that makes sense
Turn_Left has quit [Read error: Connection reset by peer]
<heat>
this is important particularly in libc.a because people usually don't pass --gc-sections or whatever
<geist>
right exactly
<geist>
otherwise there's not as much reason to do that, and with more functions in a single .c or .cc or whatnot you can use local static functions that get inlined better, etc
<geist>
or anon namespace in C++, etc
<heat>
yeah, and it's logically easier to go through as a hooman
<kof123>
thats an editor issue
<geist>
i mean if i saw a project that hard core made a separate .c file for every function for no obvious reason i'd definitely think that was exceptionally weird. not sure i've ever seen that
<geist>
i've seen the opposite where everything is one mega .c file for no apparent reason either, but there's maybe some minorly decent reason for that, maybe
<heat>
ultra mega large .hpp 4lyfe
<heat>
i have a modern C++ single-header json parser in my tree. all files that include it blow up the compile time
<geist>
usually the mega .c projects are old, like from the late 80s or early 90s
<geist>
and just never got broken up, probably because they have tons of globals and whatnot and splitting it all up would be a pain
<mcrod>
god fuck
<mcrod>
I fucking followed shellcheck and it fucked me
<heat>
god fuck indeed.
<heat>
you can't blindly follow shellcheck without understanding what they're saying
<mcrod>
yeah yteah I know
<mcrod>
*yeah
<mcrod>
i'm quoting "the string", what's "the string" here; the actual string declaration or when I pass it to the cmake call
<geist>
huh didn't know about shellcheck
<mcrod>
never mind, got it
<mcrod>
yeah shellcheck is kinda cool
<heat>
mcrod, when you pass it yeah
<heat>
word splitting is what you want here, because each word gets its own arg
<mcrod>
yeah, I getcha
gmacd has joined #osdev
<heat>
geist, is a pmap style vm thing objectively good?
<heat>
i'm starting to think otherwise, most pmap.c-style-things are just almost straight up copied from other architectures, but ever-so-slightly different
gmacd has quit [Ping timeout: 240 seconds]
<gog>
hi
<Ermine>
heat: how does it feel to watch El Risitas memes while understanding what he is talking about
<Ermine>
hi gog
<gog>
hi Ermine
<heat>
i don't understand what he's talking about mate
<Ermine>
Ah, so Portugese != Spanish ?
<heat>
gog: help
<gog>
portuguese is very not spanish
<gog>
i can actually understand my portugese co-worker when she speaks spanish
<gog>
when my boss speaks spanish, not a fucking word
<heat>
portuguese btw
<gog>
pourtutgueuse
<geist>
heat: hmm what do you mean copied?
<geist>
i think pmap things are a good abstraction, yes
<Ermine>
heat: sorry, my bad
<heat>
geist, well, if you have an x86 mmu.cpp, and want an arm64 mmu.cpp, you'll just copy it, change some things slightly, and it's done
<geist>
well, i think that's an oversimplification
<heat>
with arm64 less so, but a great example is riscv64
<geist>
answer is not really. because they have similar page tables doees not mean the code is really that similar
<geist>
well, that's also because architectures have tended to implement a similar design
<geist>
but you're just dealing with those style architectures
<heat>
right
<heat>
which makes me think if abstracting that stuff in $CURRENT_YEAR is counterproductive
<geist>
but once you get into the more advanced parts of the mmu they diverge
<geist>
ie, ASIDs, PCIDs, batching of TLB flushes, etc
<heat>
since everything has x86-style pts, you can at least share all that, even "open-code" it like linux does
<geist>
also things like virtualuzation and maybe reusing the code for stage 2 translations
<geist>
because things look similar does not make them the same
<geist>
i've seen that sort of fallacy fallen into many times at work: 'these two things are similar, lets reabstract it to ghave a single implmentation' and then you end up with a worse single thing that has to handle everything, poorly
<heat>
oh, i'm not saying they're the same, but they're so similar that they're effectively shareable as seen in linux mm
<heat>
have some defines per arch, some helper functions, and it Just Works-ish
<geist>
sure
<geist>
i dont agree but i see the appeal
<heat>
pre-processor-defining yourself into success is appealing to me, even if you need dark magic to glue things together
<heat>
success? no idea what I meant there
<heat>
s/success/sharing/
<heat>
at least being able to assume page tables exist is nice. i don't know how zircon mmu works there
<heat>
particularly because of the anon memory problem i've been thinking about the past few weeks
elastic_dog has quit [Ping timeout: 265 seconds]
<geist>
zircon does not. it's a pmap style interface
gmacd has joined #osdev
<geist>
there's some unit tests that kinda do, but they're basically trying to trigger edge cases
gmacd has quit [Ping timeout: 250 seconds]
puck has quit [Excess Flood]
puck has joined #osdev
elastic_dog has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]