klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
<kingoffrance> well if he might disappear then it is my only chance
* kingoffrance pets basilisk
<gog> klange doesn't own bslsk05
kaichiuchu has joined #osdev
<gog> i don't want to ping the person that does but i did a grep on my logs because i recognized the host
* moon-child 's dish soap seems to have completely congealed
<gog> :o
* gog pets moon-child
<heat> i'm porting stress-ng
<heat> lets try to blow this up
gog has quit []
gog has joined #osdev
bgs has quit [Remote host closed the connection]
bgs has joined #osdev
vdamewood has joined #osdev
<geist> question: if i were to roll a new ssh public/private key, what cipher/bitsize would you use?
<geist> fairly certain rsa and dsa are basically out nowadays and should go for ed25519 or whatnot, right?
<junon> ed2348293842 (whatever that one is)
<junon> RSA isn't 'out' per say
<geist> just wouldn't use anything less than 4k iirc
<junon> at least, not that I've heard. You just want a large bit size.
<geist> yah
<junon> Yeah 4k at least, I usually opt for 8k but most people would say that's overkioll.
<kazinsal> yeah
<geist> i was just noticing one of my workstation is using an old 1k from 2011
<kazinsal> ed25519 only has one key size iirc
<junon> Ohhh yeah replace that asap
<clever> i need to investigate ssh again, ive got 2 hosts that are refusing to talk to modern ssh clients
<geist> there is that problem, but its becoming less and less of a concern
<geist> if i'm using a truly old machine for nostalgia purposes i just run telnetd
<moon-child> geist: tbf 1k keys haven't been factored ... yet
<clever> geist: more just neglected updates
<geist> moon-child: oh sure. just probably should be rotating keys *anyway*, at least more than once every 10 years
<zid> but anyone logging it who factors it in future can read it though right?
<moon-child> i mean, that's kinda a general problem
<moon-child> you can't do anything about
<clever> my general understanding is that a DH exchange is used to create a shared secret, and the pub/priv pairs are used to authenticate
<junon> yeah, you have to use another scheme to battle that issue
<junon> e.g. chain of trust and root CA verification, etc.
<junon> but that's usually overkill for personal use.
* junon thinks he has covid :(
<junon> up at 3am, can't sleep (usually only happens when I'm sick), sore throat, slight headache, a tad bit of a cough.
<junon> Going to get a PCR tomorrow.
<geist> ugh
<geist> yah the lack of sleep is the worst, since it just compounds everything
<zid> junon: can you smell?
<junon> zid: for now, yes
<junon> geist: yeah :(
<zid> good good
<geist> i think it's been pretty debunked but there was some stuff going around the other day that you can tell covid flare ups by looking at amazon reviews of candles and people saying they can't smell them
<zid> overspec your keys so that your secrets are irrelevent by the time someone can steal them
<geist> it's pretty debunked, but a cute theory nonetheless
<junon> I was looking at that the other day, was super funny to think about. Yankee Candle reviews and whatnot.
<zid> "oh no, my secret password from 2001 for my neopets account was orangeorange69"
<junon> I would love it if they leaked plaintext passwords for circa 2001 neopets. I'd get like 20 accounts back.
<junon> And have a day or two of intense nostalgia
<heat> should a non-readable/writeable/executable page count towards the resident set size?
<junon> a non-readable page is just one that isn't present, right? there is no way to indicate a page isn't readable without it also just being ignored entirely, unless I'm mistaken.
<heat> depends on the architecture
<junon> oh okay, then I cede
<junon> :D
<heat> or the feature set you're working with, iirc x86 pkeys can have unreadable pages which are accessible
<zid> junon: I've had a support ticket open for 2 years to get my account back
mahmutov has joined #osdev
<zid> It's just.. not getting processed, they switched bugtrackers twice I'm fairly sure cus I got emails about the bug being reassigned or whatever
<heat> on one hand, x86 has no readable bit, so if ---, it's not present; otoh, if I just mprotect(PROT_NONE) a page and mprotect it back it should be there
<heat> just because it's not accessible it doesn't mean it's not mapped
<zid> Just comes down to whether you've made a tracking structure for your memory mappings, or just do memory mappings directly
<zid> there is a 'readable' bit like you said by co-opting present, but you need to rely on metadata for figuring out if that's because it's a hole or not
<junon> dang, feels like only a few people ever really worked there haha
<junon> I'm playing portal at the moment. Always kills me with "speedy thing goes in, speedy thing goes out"
<zid> I like.. basically all of that game :p
<junon> I still remain it's one of the best games of all time.
<zid> dang, I apparently did it all in.. 2011
<zid> Aperture Science
<zid> Earn gold medals on all Portal challenges.
<zid> Unlocked 5 May, 2011 @ 2:08pm
<zid> I'm oooold
<moon-child> imo best game of all time
<heat> actually I got a decent solution: the PTE is only empty is it's 0
<heat> does this fit with swap? no, the non-accessible pages will conflict with swap entries if I do it like that
<zid> swap is generally why you'd need that metatracking
<kingoffrance> "should a non-readable/writeable/executable page count towards the resident set size?" if something is swapped to disk, is that resident or not? i dont see how permissions should matter. "resident" where? :)
<kingoffrance> remember, in ye olde tongue, disk is just secondary storage
<zid> so you can check if your pf is real, or needs to do some work.. cus all you can tell from the page tables is that nothing was present
<heat> I have all sorts of metatracking
<heat> but it's just not efficient to look up all the other tracking when I'm just looking at page tables
<zid> just.. don't look at the pagetables at all
<heat> I do need to look at the page tables to know if something is mapped or not
heat has quit [Remote host closed the connection]
heat has joined #osdev
<heat> it's literally impossible to look at anything else and making my own ghetto page table just to know if something is mapped or not is not useful
<heat> my best bet will probably to use my vm objects' struct page * to hold some metadata in the lower bits
<heat> bit 1 = present (else swap information will be the rest of the value), bit 0 = dirty (for writeback)
<heat> maybe a bit for huge pages too
Oli has quit [Quit: leaving]
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
jjuran has quit [Ping timeout: 240 seconds]
pretty_dumm_guy has quit [Quit: WeeChat 3.4]
* junon finished portal, forgetting how quick the game is
<junon> still a bit of dopamine released, that's good
<junon> I don't know that I've had any water in.... weeks. Perhaps that might help with this headache.
<junon> geist what's the weather like in SV right now?
<geist> silicon valley? beats me. i dont live there
<geist> probably nice
scoobydoo has quit [Read error: Connection timed out]
<geist> actually looks kinda rainy and a little cool
<heat> google says bad
<junon> oh I thought you were there
<geist> yah but i moved to seattle 6 years ago
<junon> ah well
<geist> same west coast but the weather is a bit different
<junon> used to live there too, don't need to ask how the weather is.
scoobydoo has joined #osdev
<junon> it's either cloudy, or rarely snowy and cloudy, except for like two weeks in the summer if memory serves
jjuran has joined #osdev
<junon> at which point, it's blisteringly hot
<geist> kinda correct.it's also historically cold right now
<geist> just measured the thermometer: 22F outside right now
<geist> will get into the teens tonight
<junon> geist: idk if you're familiar with cap hill much but I used to DJ at Neighbors :)
<geist> yah
<junon> it was where I turned 21 actually. First (legal) shot was bought there
<junon> (I bought it myself, womp womp)
<junon> There was a radioshack at 3rd, pike and pine that I used to work at. Sketchy area, to say the least. Going home at night required mental preparation.
<heat> https://godbolt.org/z/q5s5zhqK7 <-- why does the compiler generate a rip relative mov for the pointer and not for the array here?
<bslsk05> ​godbolt.org: Compiler Explorer
<moon-child> not sure. But if you say -fPIC it does rip-relative for both
<bslsk05> ​github.com: Replace char *str = "text" with char str[] = "text" · ColinIanKing/stress-ng@539fd60 · GitHub
<heat> says it saves one level of indirection
<heat> dunno why though
<clever> i suspect that maybe the runtime variable with the pointer just doesnt exist
<clever> when you reference the string, the compiler will treat that pointer as a constant, and embed it into the asm as an immediate
<clever> so only the raw string bytes exist
heat_ has joined #osdev
<geist> yeah htat's right
heat has quit [Ping timeout: 268 seconds]
<geist> the first one is a variable that is a pointer to the string
<geist> the second one is an array with a string in it, and the variable is the array
<heat_> ah, const char * const p_app_name generates the same code
<geist> yah p2 is deferencing it once
<geist> in the original example
<geist> https://godbolt.org/z/de6bYKhrM is a bit more clear to me, because using a risc machine you can see much more clearly when an extra dereference happens
<bslsk05> ​godbolt.org: Compiler Explorer
<heat_> -flto also seems to get rid of the deref
<geist> yah probably decides that the var can't be modified and then basically flattens it to an array due to global visability
<geist> or at least no additional .c files have visibility into the char *ptr
<geist> i bet if you declare them static you get the same thing
<geist> yep, confirmed
<geist> another great reason you should mark stuff static very aggressively
<heat_> wasn't static deprecated in C++ < 11?
<junon> heck no
<geist> cant actually *remove* it
<junon> was it really deprecated?!
<heat_> yes
<geist> and no. static means a whole lot of other things, but static variables are still a thing
<geist> but.... the equivalent of 'local scope to this file' you're supposed to do in C++ is an anonymous namespace
<geist> i find it annoying, but it is basically superior for a variety of reasons
<geist> `namespace { int foo; int bar; }`
<heat_> it doesn't work in this case
<geist> well, no it's c++
<heat_> wrapping the pointer in an anonymous namespace generates the same code
heat_ is now known as heat
<geist> yeah
* geist shrugs
<heat> oh wait oops I was compiling with optimisations off
<geist> oh haha yeah i did the same thing
<heat> with the same -O2 it generates the static code for anonymous namespaces
mahmutov has quit [Ping timeout: 256 seconds]
<geist> anon namespaces also let you do things like locally declare classes or structs with methods on them, etc
<geist> which is one of the ways they're more useful in C++
<heat> how is a static class useful?
<geist> same reason static variables are useful: used only in this file, so the scope is reduced
<geist> and the compiler is much more free to optimize the wazoo out of methods
<heat> well you can't extern a class definition
<geist> compiler doesn't know that
<geist> dumb language
<geist> namespace { class foo { bunch of methods on it; } }
<geist> lets all those methods be local too, because otherwise the `static` keyword means something else on a method
<heat> the compiler is stupid
<heat> reject compiler, become monke
<heat> except with LTO, then the compiler goes super saiyan
dude12312414 has joined #osdev
dude12312414 has quit [Client Quit]
heat has quit [Remote host closed the connection]
heat has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat_ is now known as heat
<heat> I wrote something remotely useful that takes C/C++ and a syscall.h and puts it together to output a syscall table in json: https://gist.github.com/heatd/7f71edfef749f07bc22b7336940e544e
<bslsk05> ​gist.github.com: scan_syscall.py · GitHub
<geist> cool!
<heat> yup
<geist> just tossed my PCI code at a real machine with actually complex busses and with a minor tweak with multifunction devices it seemed to work:
<bslsk05> ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/jShCHG3n
<heat> learning libclang is fun
<geist> you can see how the chipset hangs off the bridge on bus 2 and then a bunch of pcie devices each behind their own bridge
<heat> wooohoooo
<geist> the e1000 driver detected the i210, will see if it actually works
<heat> with configuration too?
<geist> seems to think it's working
<geist> a bit surprised though, i assumed i'd have to screw around with the PHY and whatnot
<robyn> following https://wiki.osdev.org/GCC_Cross-Compiler, how long should compiling gcc take?
<bslsk05> ​wiki.osdev.org: GCC Cross-Compiler - OSDev Wiki
<geist> robyn: what are the specs of your machine?
<robyn> uhm, it's a laptop
<robyn> don't know the specs, it was a present last year
<geist> oh probably an hour or so
<heat> wht
<heat> what*
<robyn> joy.
<geist> maybe tween 20 minutes to an hour, depending on how fast it is
<heat> gcc compiles super fast on my laptop
<heat> like 10 minutes
<geist> given no information, and it being a gift, i'm *assuming* it's not a supercomputer laptop
<robyn> lucky you
<geist> but okay, 10 minutes to 1 hour
<robyn> it's not, only 8 gig of onboard ram
<heat> mine is not a supercomputer laptop as well, cheap 700 euro laptop from 2018
<geist> fine.
<geist> anyway, so yes. not 2 minutes
<heat> compiling gcc is blazing fast when you've compiled llvm
<geist> that i will not disagree on
<robyn> I'm following the tutorial
<geist> 8GB ram, probably a quad core (8 threads) machine. if it's dual core it'l take approximately twice as long
<robyn> quad core, yes
<geist> so yeah probably 10-20 minutes then
<heat> good old 1 hour nap iteration cycle
<geist> on a big workstation it's more like 3 or 4 minutes, but it doesn't scale as linearly, since there are stretches of the compile that are not fully parallel
<robyn> I'd still be asleep if it weren't for neighbors TV, something has been said to nursing home staff
<heat> geist, have you tried compiling gcc with LTO?
<heat> I wonder if it's as slow as clang
<geist> dunno!
<geist> i have not
<geist> i think a lot of the clang slowness is simply that it's fairly beefy C++
<heat> python + LTO is already decently slow when linking /bin/python3
<geist> the usual lots more little methods and inlining and template explosion that just gives it an order of magnitude more work to do for roughly equivalent complexity
<heat> yeah but LTO doesn't impact compile time right?
<heat> you'll just feel it when linking
<geist> sure, but the link time is just as useful
<geist> as in the time tends to move towards the link phase but can many times take a lot longer in agregate
<geist> plus it isn't parallel
<heat> it is
<geist> so you end up with a large single threaded code generation phase which without LTO had a better shot of being more parallel since it was distributed across the compile phases
<heat> -flto=N
<geist> is that llvm or gcc?
<geist> (doing the linking there)
<heat> i've seen this with gcc
<geist> ah never seen it used, but okay. dunno exactly how that works
<geist> rustc i know for example has some parallelism in its LTO, but dunno precisely where it cuts and breaks it into parts
<zid> -flto is same as -j basically
<zid> flto=n same as -jn
<geist> well, it's a bit more complicated than that. depends on how the compiler/linker phase inside the LTO engine can divide the program
<geist> i know, for exmaple, clang has LTO and thinlto which are two different models. i think thinlto has a better shot of divide and conquer
<zid> (same as -j)
<heat> clang has -flto-jobs=N where it controls thinlto only
<heat> and has a default of 0 = derived from CPUs
<geist> yeah its my understanding that thinlto is parallelizable, but clang LTO is not
<geist> was unaware that gcc has a parallelizable LTO engine. neat.
<heat> i wonder if gcc also derives the threads from the CPUs
<heat> probably?
<geist> there's some commentary about how it partitions things using -flto-partition= and whatnot
<heat> I know that clang people really like thin lto, I just don't know why
<geist> `-flto=jobserver` looks neat
<geist> yah we use it on fuchsia. i think it's my understanding that it's far faster to compile than LTO and gets almost all of the same benefits
<geist> so it's almost a win/win
<heat> noice
nyah has quit [Ping timeout: 256 seconds]
<heat> jobserver doesn't work with ninja though
<heat> just GNU Make
<geist> to answer your earlier question `Use -flto=auto to use GNU make’s job server, if available, or otherwise fall back to autodetection of the number of CPU threads present in your system.`
<heat> ah
<heat> nice
<geist> but it does seem that -flto with no args does not parallel compile
<heat> its a sensible option
<geist> `-flto-partition` looks interesting, since i'm guessing it a) affects how parallel it can build things and b) the scope of where it can do cross module optimizations and whatnot
<geist> that would be interesting with reasonably large programs to see how that affects things
<geist> affects codegen that is
<heat> I imagine that doing auto parallel compilation would ruin all sorts of build systems since they mostly assume 1 job = 1 thread
<geist> for fuchsia for example the build system puts LTO linkers in a separate bucket and has a max number of them
<geist> ninja has this feature, but the build system that genreates ninja has to understand it
<geist> otherwise you end up with a ruined thing, absolutely
<geist> rustc compiles for example weigh more than a clang compile since they can start a bunch of threads, so we let less of them run
<geist> https://gcc.gnu.org/onlinedocs/gccint/LTO-Overview.html seems to describe how gcc does it in a pretty good overview
<bslsk05> ​gcc.gnu.org: LTO Overview (GNU Compiler Collection (GCC) Internals)
<heat> fun, I should unify all my build system into gn lol
<geist> looks a lot like LTO mode vs WHOPR mode are pretty similar to LTO and ThinLTO on clang
<geist> and from looking at that you only get multithreaded compiles with WHOPR mode
<geist> which makes sense, since it partitions things up front into N units
<heat> did they really name their LTO stuff after a burger?
<geist> though looks like LGEN could be run in parallel even without partitioning
<geist> perhaps, or maybe Joshua the AI
<geist> though that was WOPR
<heat> re: linking, have you seen https://github.com/rui314/mold?
<bslsk05> ​rui314/mold - mold: A Modern Linker (141 forks/4967 stargazers/NOASSERTION)
<geist> nice
<heat> super funny how much slower GNU gold is over LLD
heat has quit [Ping timeout: 252 seconds]
ElectronApps has joined #osdev
sonny has joined #osdev
sdfgsdfg has quit [Quit: ZzzZ]
<robyn> sorry to bother you all again, but for -flto=auto to work, what do I need to install?
<geist> i think it works out the gate
<geist> should be compiled with lto support by default
<robyn> nope
<junon> also you don't need to apologize haha
sdfgsdfg has joined #osdev
sonny74 has joined #osdev
sonny has quit [Ping timeout: 256 seconds]
sdfgsdfg has quit [Quit: ZzzZ]
sdfgsdfg has joined #osdev
ravan has joined #osdev
mctpyt has quit [Ping timeout: 260 seconds]
biblio has joined #osdev
Belxjander has joined #osdev
sonny74 has quit [Quit: Client closed]
Teukka has quit [Read error: Connection reset by peer]
Teukka has joined #osdev
<gog> mew
* gog stretches
* kazinsal pets
<zid> 4x4 is hard, my PB is now 6:45, the WR is 17
<zid> seconds
<j`ey> 16s now :P
<zid> 16 rounded up
<zid> I'm going to blame it on the fact that in 16s I think I could do about 20 turns
gog has quit [Quit: byee]
gog has joined #osdev
<FireFly> I don't remember where I put my 4³ and 5³ cubes..
* gog turns into a cube
<zid> I need a 5 still
* moon-child pets satan
<zid> It doesn't really add anything to the experience though from what I can see
<zid> but it's the last one that adds anything at all at least
<zid> 6,7 etc are just bigger versions of 4 and 5
<zid> 4 adds center building and parity to 3x3, 5 adds extra centers
<FireFly> I figured out solving the first 3 layers of the 4³ without looking it up, extrapolating from having learned a systematic approach to 3³ + trial and error
<zid> I needed to look up the alg to do final two edges
<zid> and solve the parity case on final layer
<FireFly> yeah
<zid> but other than that I just solved it straight through no problems
<zid> but I was vaguely aware to reduce it to 3x3
<zid> without that insight I might have struggled
<FireFly> I didn't really reduce it to a 3x3 :p
<FireFly> I solve the 4x4 weirdly
<FireFly> well
<FireFly> I just solve the white layer, then the edges of the middle two layers, then the centers of the middle two layers
<FireFly> rather than like, first reducing it to a 3x3 then solving it as a 3x3
<zid> That is infact, weird as hell
<FireFly> :D
GeDaMo has joined #osdev
* FireFly also pets gog cat
<gog> everybody loves gog cat
<FireFly> true
* moon-child wants a cat, but cannot have one
<gog> same
<kazinsal> gog cat is the new official unofficial official osdev mascot
* kazinsal . o O ( anime gog as osdev-tan )
<gog> i already have anime girl hair
<kazinsal> perfect
<kazinsal> shame I can't draw worth a hot shit
<kazinsal> at best I am a mediocre guitarist and a D-tier 3D modeller of spaceships
* moon-child has hair ~1/3 the length of a typical anime heroine. I.E. damn long
<FireFly> I don't trust myself to take care of other beings, so I stick to occasionally petting other cats
<kazinsal> I used to have long hair but then A) I realized that I wasn't established enough in my career to be able to go full greybeard and B) I realized I was starting to go bald
<FireFly> hm
<GeDaMo> Since Covid, I cut my hair with clippers; I used the 1 inch guide until I broke it, now I'm down to the 3/4 inch guide :P
<zid> moon-child and I are sailor moon
<FireFly> I'm not sure how to best measure hair length...
<FireFly> but maybe about half a meter?
<zid> I'm just getting my money's worth at the barber's, okay?
<kazinsal> one day I'll get to the point where I'll just go for the clippers every week or so but while I still don't have a visible blank spot in the back I've got short-ish hair with enough extra on the front to comb back with some pomade for a bit of a quasi-slick
<gog> the longest part of mine is about 60cm scalp to end
<zid> Just buff it all out
<zid> stick your head in one of those machines that plucks chickens
<zid> then floor polish
<gog> my wife cut her friend's hair and did a really good job and i'm considering letting her do mine
<gog> lose about 10cm
<FireFly> I really should (or should already have) cut my ends
<kazinsal> heck, might as well
<kazinsal> it's only hair, it grows back
<gog> the ends are really ragged and bleach damaged and have been since a few years lol
<kazinsal> and if you've got a thick headfull then go nuts
<FireFly> yeah I think I last had my hair cut 2016ish
<FireFly> 2017 maybe? I don't remember exactly
<zid> I look like I've been through several hedges backwards
<gog> i had a side shave and a trim late 2017 early 2018 i think
<gog> then another trim early 2020
<kingoffrance> i shaved my whole head, just to do it once. the problem is, you also have to cut your beard/stache, else you look like a prison inmate, malkovich in con air
<gog> then i did my own fringe a few weeks ago
<gog> turned out cute
<kingoffrance> evil bald guy with goatee
<moon-child> damn! I cap out at 68.5cm apparently
<moon-child> just 0.5 more...
<gog> wow
<kazinsal> should definitely take care of your ends though, don't want to let those be frayed forever
<gog> yeah they get tangled really easily
<kazinsal> having nostalgia for my long hair days now lol
<zid> I'm really good at growing hair, but it falls out too much to get super long
<kingoffrance> also kane in command and conquer
<zid> I shed
<kazinsal> back in those days if I shaved clean I was androgynous as hell and could pull it off
<gog> i was 14 the first time i grew my hair out
<moon-child> I shed a ton too...it's a wonder there's any hair on my head at all
<zid> same I think
<zid> but for different reasons I guess
<zid> I'd make a terrible girl
<zid> unless I was like, trying to be a hippie girl
<zid> that doesn't wash and has accidental dreadlocks
<moon-child> what's wrong with being a hippie girl?
<zid> Nothing but that's just my only option
<gog> be a terrible girl then
<FireFly> I don't really have any measuring tape to measure...
<zid> but I have an *enourmous* penis though gog
<zid> it gives the game away immediately
<gog> that's never been a problem for me
<zid> huehue
<zid> I'd make a great trans porn star
<kazinsal> doesn't disqualify you tbh
<moon-child> zid: prove it
<zid> £50 for pics
<kazinsal> it ain't what's south of the border it's what's in your heart
<zid> (I have said this and actually had a taker before btw)
<gog> i had a gallery get leaked a few months ago and i'm wondering how far it's gotten :|
<kazinsal> oh no :(
<zid> just start an onlyfans
<zid> then at least you're getting paid
<gog> 18 people had access to it but it had 200 views by the time i noticed
<FireFly> welp..
<zid> or someone refreshed a lot
<kazinsal> could have just been non-unique view count yeah
<gog> maybe but that seems unlikely
<kazinsal> someone really wanting to go back over and over
<gog> it was a unique view count i tested it
<zid> was it noodles or just pics?
<kazinsal> now I'm curious as to the mechanics of the imgur (I'm assuming) view counter
<gog> zid: total ramen
<zid> oopsie :D
<gog> kazinsal: cookie-based
<kazinsal> whoopsy
<kazinsal> sorry that happened to you, that sucks
<gog> i'm more annoyed that it was shared in violation of the group's rules than i am embarassed :p
<zid> put some black bars on it and show me I'm like.. morbidly interested
* kazinsal bonks zid with the horny bat
<zid> kazinsal thinks I am sextually attracted to black bars
<kazinsal> (see, in a discord, I would be going for the nearest :bonk: or similar
* moon-child slaps around the bat a bit with a very large trout
<kazinsal> hmm, I should tweet more about my osdev adventures. maybe it would encourage me to do more actual osdev instead of just shitposting here
<FireFly> https://up.firefly.nu/tmp/20211227_122315.jpg idk how long this hair is but I'm happy with it
<zid> same length as mine, but way nicer
<zid> mine gets like.. poofier as it gets towards the bottom
<zid> looks silly
<FireFly> well my ends are very damaged as mentioned, I really ought to cut off the last decimeter or something :p
* moon-child haz wavy hair, slightly longer but I usually keep it in a high ponytail
<asymptotically> sorry to interrupt the rubiks cube hair cutting discussion but has anyone tried testing their os in qemu with ctest? my plan is to use a test fixture to start qemu, then each individual test sends a message to the serial port (run test #123, reply with PASS/FAIL). it sounds like a good idea to me, but whenever i do anything non-trivial in cmake it never ends well...
<zid> haha
<zid> never heard of ctest sorry :P
<zid> oh cmake that's why
<zid> gog: If you share that noodle I want comission
<kingoffrance> eh, doug had something like that, or wanted it. pretty sure it wasnt cmake though
<kingoffrance> his many qemu-targetted makefile
<gog> zid: wtf have you done to earn any
<kingoffrance> *many-qemu-targetted
<zid> It's my noodle!
<gog> ohhh that one
<kazinsal> https://i.imgur.com/8Ltt5hl.jpg -- last known photo of me with long hair
<zid> yea that's more similar to mine
<zid> the ends are all voluminous like that
<kazinsal> https://i.imgur.com/LO3ToWs.jpg -- ~4 months ago
<kingoffrance> i dont know what all the tests were, but he wanted to run through many qemu options at least, different configurations, etc.
<gog> https://i.imgur.com/upRC2m2.jpg like a month ago
<kazinsal> (note: no, my guitar hangars are not that far off the ground, I am just short as all hell)
<zid> oh no, ginger
<zid> I mean, nice pic
<kazinsal> gog: super cute!
<gog> :D
<zid> (I didn't know gingers could take pictures in mirrors tbh)
<asymptotically> kingoffrance: hm yeah that'd be nice. i end up breaking something in the configuration i'm not currently using (smp with 1 core or many, kvm on/off) and end up having to bisect weeks of commits to find out what horrible thing i've done :D
<kingoffrance> yeah, he disappeared. it was for stuff like that IIRC
<kingoffrance> and all the different ways to boot IIRC
<zid> gog: Are you deaf in one ear? A lot of ginger cats are
<gog> no but i have permanent hearing damage from not wearing ear protection while target shooting
<gog> in my left ear
<zid> gj
<gog> ty
<kazinsal> heck yeah messed up left ear buddy
<gog> ^6
<gog> 5*
<gog> and recurrent ear infections as a child. there's something wrong with it. it doesn't drain properly
<zid> I have really bad tinitus but idk why
<zid> doesn't bother me though
<kazinsal> for me it was too many indie punk concerts from roughly age 18-21 without hearing protection
<kazinsal> my local bar at the time was an punk hangout so every night was different local indie bands
<kazinsal> (RIP Logan's Pub, killed by covid)
pretty_dumm_guy has joined #osdev
<kazinsal> oh, thinking about it, does anyone know if /accept lists on libera are persistent? would suck to have to re-input my whole /accept list if irccloud falls over for 20 seconds
<zid> oh no, play-hookey.com is gone
<zid> should work on wayback though
<zid> except modern content policy security crap stops it working, yay
<gog> o damn i didn't know about this feature
<gog> looks like it might be persistent
<kazinsal> yeah, I have irccloud set up to make sure I'm mode +g on login
<kazinsal> mostly set it up for when we had that one person busting in here to harass people
<kazinsal> and it's been quiet lately so I might -g myself
<kazinsal> *maybe*
<kazinsal> I have most of the regulars on my list anyways just in case
warlock has joined #osdev
<kazinsal> the only issue I've noticed with the caller-id mode is that if you get the "user1234 is messaging you" notification and then you /accept user1234, it doesn't actually show you what their message was
<kazinsal> so I've missed messages from people because I rarely get IRC PMs from people and forgot to pre-configure an /accept list
<GeDaMo> Is that optimal? Seems like a lot of gates
<zid> probably not
<zid> I just did it all by hand
<zid> The 4s cases, the 2s cases and the 1s cases
<zid> 1s cases is just xor stack for parity, 4s cases is stacked AND gates, 2s cases was just an 'and' pair between every input combination, with an xor between the 4s case to stop it being 6
Oli has joined #osdev
terminalpusher has joined #osdev
gog` has joined #osdev
jstoker has quit [Remote host closed the connection]
jstoker has joined #osdev
gog` has quit [Read error: Connection reset by peer]
sdfgsdfg has quit [Quit: ZzzZ]
bxh7 has joined #osdev
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
terminalpusher has quit [Remote host closed the connection]
ravan has quit [Read error: Connection reset by peer]
ravan has joined #osdev
tenshi has joined #osdev
Brnocrist has quit [Ping timeout: 240 seconds]
Brnocrist has joined #osdev
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
<zid> I forgot, 4x4 cubes come with free 2x2 cubes inside them, 9.5 seconds woo :p
<junon> did a git clean -dffx in my llvm checkout
<junon> 150gigs freed up
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
nyah has joined #osdev
<gog> wow
<gog> that's a lot of gigglebytes
ElectronApps has quit [Remote host closed the connection]
terminalpusher has joined #osdev
biblio has quit [Quit: Leaving]
biblio has joined #osdev
heat has joined #osdev
ajoberstar has joined #osdev
gioyik has joined #osdev
mahmutov has joined #osdev
heat has quit [Remote host closed the connection]
wikan has joined #osdev
dude12312414 has joined #osdev
rustyy has quit [Quit: leaving]
dormito has quit [Read error: Connection reset by peer]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
sonny has joined #osdev
Matt|home has quit [Quit: Leaving]
<sortie> Hello osdev
<sortie> Will my quest succeed these holidays to finish up some of my 2017 code?
wikan has quit [Quit: Client closed]
<terminalpusher> sortie: hopefully. I personally sometimes find it hard to come back to codebases that old because I can barely identify myself with my own code anymore
scoobydoo has quit [Read error: Connection timed out]
<sortie> Hahaha yeah totally know it
<sortie> This is, uh, checks notes, a 2011 codebase
<sortie> Fortunately that effect wears off over time, I find myself cursing my 2016 code much less than 2016-me cursed 2012 code
<terminalpusher> yeah
<sortie> The good news is that some intense efford paid off and I managed to dust off my Unix socket file description passing code and actually get it working and handle all the corner cases
scoobydoo has joined #osdev
<sortie> Honestly although they're not thaaaaat complicated in principle, doing it right, with all the corner cases, error handling, overflow checking, proper semantics, atomic behaviors, etc. damn this became a nightmare project of a mess
<sortie> Now I am in the homestretch, just need the polish and then it can be merged :)
<terminalpusher> Oh I can imagine
<terminalpusher> nice
<sortie> You know it's a whole thing when there's a function called Unenqueue
<terminalpusher> what does it do?
<sortie> Well the Enqueue function enqueues data into the ring buffer and Unenqueue undoes that action
heat has joined #osdev
<sortie> It's part of some elaborate error handling when file descriptor passing fails, it might have succeeded in sending N file descriptors, and then the N+1'th fails for some reason, and the whole operation needs to be undone, such that there's an atomic all-or-nothing property
<heat> is there any decent speed advantage to arm64? just got my rpi zero 2 w and I installed the basic raspi OS, which is armhf
<heat> this thing doesn't have a lot of memory
<terminalpusher> ahh
rustyy has joined #osdev
<terminalpusher> My SimplePointerProtocol doesn't work in the UEFI. I'm trying to read the mouse X and Y but it's always zero for some reason. I do get access to the protocol through LocateProtocol but when I WaitForEvent, it never stops and it's basically an infinite loop no matter if I move the mouse or press a mouse button.
<terminalpusher> Does anyone have an idea why that could be? Is it my QEMU settings? I start it like this: `qemu-system-x86_64 -bios /usr/share/OVMF/OVMF_CODE.fd -hdd fat:rw:. -serial stdio -nic none`
<terminalpusher> (forget about the "but it's always zero for some reason." part, that doesn't make sense in my question)
gioyik has quit [Ping timeout: 276 seconds]
<heat> stupid question but are you letting the VM grab your mouse?
Stary has quit [Quit: ZNC - http://znc.in]
samis has quit [Quit: ZNC - http://znc.in]
gioyik has joined #osdev
pretty_dumm_guy has quit [Quit: WeeChat 3.4]
sonny has quit [Ping timeout: 256 seconds]
gioyik has quit [Ping timeout: 276 seconds]
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
gioyik has joined #osdev
gioyik has quit [Ping timeout: 276 seconds]
<terminalpusher> heat: yes, I'm clicking on the window
<terminalpusher> then it says "press Ctrl alt G to release" in the title
<terminalpusher> heat: does it work for you?
<heat> terminalpusher, i've never used it
<terminalpusher> Could it be related to the "Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted." warning? How can I lift those restrictions in case of my command above?
<terminalpusher> ah
<heat> no
<heat> code?
<terminalpusher> well it's a bit long... but btw do you know how I could lift those write restrictions anyway?
<heat> you need to use -drive ...
<terminalpusher> I know I have to do `format=raw` but I don't even specify `-drive`
<terminalpusher> so what file am I supposed to use?
<heat> you're doing the fat stuff so I'm not 100% sure if it's possible to use -drive
<terminalpusher> yeah I don't think it is because I don't really have any file to specify... not sure how to lift those restrictions then
<heat> no need
<heat> just forget it for now
<terminalpusher> yeah
gioyik has joined #osdev
dormito has joined #osdev
Stary has joined #osdev
scoobydoo has quit [Read error: Connection timed out]
CompanionCube has joined #osdev
scoobydoo has joined #osdev
not_not has joined #osdev
<not_not> hoi
gioyik has quit [Ping timeout: 276 seconds]
<not_not> i want to write a time traveling operating system
<GeDaMo> Time travelling in what sense?
<ThinkT510> don't all operating systems travel forward in time at the same rate?
<not_not> in the sense that it alters the past in the present
<sham1> I think that breaks causalitgy
<not_not> in the sense that, i was dressed up as a bear yesterday, now im not
<not_not> i.e making me not have been a bear in the past
<not_not> altering the past
<ThinkT510> sounds more like just wiping your history
<not_not> no history needs to be there for undo redo to work
<heat> <ThinkT510> don't all operating systems travel forward in time at the same rate?
<heat> no, time is complicated
<ThinkT510> the past is imutable. deal with it
gioyik has joined #osdev
<not_not> why is the past immutable?
<ThinkT510> the only thing you can really change is the record of the past. that obviously doesn't change the past itself
<heat> not_not, because we're not high
<not_not> only proof we have of nobody altering the past is that nobody has tried
<not_not> heat: sorry got some candy for my 30 yo bday and trying to go back to the past
terminalpusher has quit [Remote host closed the connection]
sonny has joined #osdev
<not_not> in brains, the unit of time is a chana, gap between one thought and the other thought
<sortie> git rebase is the one true time machine
<heat> my rpi zero is reaching 70C
<heat> this is not good lol
<not_not> learned so many alternate units to measure time
<sham1> sortie: I raise you reflog
<sortie> Nah reflog just shows time as it one, git rebase let's you edit it
<sortie> Of course the real god mode is git-filter-branch
<kingoffrance> im pretty sure the past is always decaying and getting rewritten, you dont have to lift a finger :D
<sham1> As far as we are concerned, the past only exists in relation to the present
<sham1> Same for the future
<not_not> the future is programs running outside of our definitions of past and present
<sham1> what
<heat> mans baked
<sortie> I usually run my programs on Tuesday, July, and occasionally...the time moment where nothing never occurs.
<not_not> cognition tho
<heat> fyi its impossible to build binutils with this tiny thing
<heat> 512 MB of RAM and 100MB of swap
<heat> gold kills it
<heat> praise be C++
<not_not> praise be C++
<not_not> was my fav programming language in the past
<heat> I'm betting clang would take a month
<heat> actually a month is probably really generous
<not_not> idk, i love and i hate c as much as i love and i hate myself
<not_not> C++ is actually tidy and u feel like ur making something cuz its object oriented
<kingoffrance> https://web.archive.org/web/20110226034423/http://www.manicai.net/comp/wmfuzzy/ there's fuzzy clocks. "early 21st century"
<bslsk05> ​web.archive.org: wmFuzzy
<kingoffrance> i mean, with the power of lack of granularity, and it all just kind of converges
<not_not> i tried to write a program that tries to compute consciousness, the sense of self, so i decided to eliminate variables, and the program computed that consciousness is not not
<not_not> not not not
<not_not> not
<not_not> not is not binary, but not is not not binary, not is not not binary and binary it is binary or and and not
<jimbzy> bang bang
<sonny> what was the popular object oriented OS before windows NT?
<sham1> Xerox Parc Alto
<sonny> oh, so that sounds like it's smalltalk related
<sham1> Yes
<sham1> Of course, popularity in this case doesn't mean commercial success because the Alto was of course very very expensive indeed
* geist wakes up, yawns
<sonny> I was thinking about making an OS, the major paradigms that work seem to be (stream) file oriented or object oriented. As far as I can tell any novelty will be in concurrency or security, so I'd rather focus on making a clone. Unix is popular but I wondered about doing something non traditional
<geist> good afternoon fronds
<sonny> morn'
<not_not> mornin
<jimbzy> yo
<not_not> imma try write a virtual cpu
<geist> i guess nextstep had some interesting ideas too
<jimbzy> Did you get any snow there, geist?
<geist> oh hell yeah
<geist> and it's cold as heck (for here)
<jimbzy> Subaru weather.
<geist> haha actually i was just talking on discord to a friend that i might go drive in a bit, but i have to yell GO TEAM SUBARU, and slide across the hood first
<not_not> where the 0 or 1 represents the number of the concept "not", so 0 means not not, and 1 means not
<geist> speed racer style
<geist> but it'd be warmer there. my house is literally 57F *inside*
<geist> the heat pump is simply not powerful enough to heat this house to this temp
<heat> hello it is me
<jimbzy> No auxiliary heater? I have a heat pump, but if I dial in a temp 3 degrees higher it kicks on a heater.
<sonny> not_not: good idea, virtual cpu might make implementation easier
<not_not> wait we have a quantum programming language design channel?
<geist> jimbzy: that's actually the problem. the compressor is in thermal lockout, so it's running the AUX heater at full tilt.
<geist> and i think the aux heater is simply undersized for the house
<not_not> sonny: ye, not not should work wonders on quantum bits
<not_not> if a qbit is in a superposition of 0 and 1 it is not not 0 and not not 1
<jimbzy> Sounds like you have a defective capacitor, but I'm not an expert.
<geist> jimbzy: for the aux heat or he compressor? possibly both. either way i'm burning power like crazy right now
<jimbzy> The compressor
<geist> oh no, it's locked out because it's too cold outside (24F)
<geist> this one is only rated down to 30F or so
<jimbzy> Oh, wow.
<jimbzy> I thought you meant it was due to heat
<not_not> sonny: getting to work on it now, wondering if i should write in python or c++
<sonny> I wouldn't use either myself
<not_not> i know
<geist> nah, it's because this particular compressor is old (from 2004) and it's just not efficient below 28 or 30, so it's locked out below a particular temp because it would do negative work at some point.
<not_not> i wanna reinvent the wheel
heat is now known as notheat
<jimbzy> I gotcha. Yeah, that's a strange problem, and probably not that common.
<jimbzy> For your climate, I mean.
<geist> right, it's extremely rare to get into the low 20s, much less the 10s here. like once every few decades
<not_not> so, not not could be like a programming language right
<not_not> not not 1
<not_not> not not is is
<not_not> is is not not
<not_not> is is is
<not_not> not is not
<jimbzy> Yeah, mine runs at lower temps, but it's not efficient so the aux heater helps out.
<not_not> and i've drawn syntax trees that sorta makes this syntax be able to reason about the operators in a computer
<jimbzy> It's not too bad, tho, because there's some serious insulation in the attic, and the basement stays relatively warm all winter long.
<geist> jimbzy: newer models (higher SEER ratings) are much better about it. primarily because they're microcontroller controlled and have much more options
<jimbzy> Yep.
<geist> this is from the era when it has basically ON and OFF and REVERSE
<jimbzy> Crap they don't tell you when you buy, eh? :p
<geist> but not a problem. the computer room stays nice and warm. because computers
<jimbzy> I hate the winter.
<sonny> If the OS is implemened in userspace, how can it get drivers?
<geist> drivers just run in user space
<geist> not that fundamentally different, except things like an interrupt handler tend to be thread based
<sonny> I'm trying to picture how it can get priority over the hardware
<geist> can you elaborate what you mean by 'get priority over'?
<sonny> well imagine you have a keyboard driver in your userspace OS, I'm not sure how that will interact with the existing keyboard driver
<zid> reverse? fancy
<zid> devices are controlled by writing to memory addresses that they are 'listening to'
<sham1> A userland driver process tells the system "hey, I'm a driver for such and such devices, please notify me on interrupts FOO and BAR. Also, map me memory regions 0xDEADCA00 onwards for 4 pages"
<zid> the only reason you can't do drivers in userspace /normally/ is because the kernel doesn't map those addresses into your process
<geist> exactly. hardware itself doesn't care if the cpu accesses its register from supervisor or user mode (at least on x86 and most architectures)
<sham1> Perhaps the driver also interact with some ACPI layer which itself is either in the kernel or another userland process
<geist> so you just arrange the driver to run in user space, in one or more threads in a process somewere
<sonny> amazing
<geist> the main whacky part is as sham1 was saying is you can proxy interrupts to user space
<geist> so ernel takes the IRQ then notifies a thread in a process somewhere that had registered for it
<geist> then the thread takes it over
<zid> I mean, interrupts are *mainly* already vectored to userspace
<zid> they just arrive as signals
<sham1> Or if you have a microkenel, let's say, you could also get a message
<geist> but otherwise it's not a big deal. on x86 IO ports can also be mapped into user space via a convoluted mechanism
<sham1> The manner of implementation isn't *that* imporant
<sham1> important&
<geist> right. in zircon, for example, we have an Interrupt object that a driver can get a handle to and have signals delivered to it
<zid> posix turns pf, gpf etc into SIGSEGV, SIGFPE etc userspace actions already
<zid> adding 'some driver irq' isn't any different really
<sham1> SIGIRQ
<geist> which can be arranged to either be a wait_on_object() or send_me_a_message_if_this_signal_is_set_on_object()
<geist> either way, a thread is woken
<geist> so given that drivers can be implemented in user space, for the most part you can build a OS with only a handful of kernel drivers. probably timers and the interrupt controller itself
<geist> and then for the most part everything else can be moved out to user space
pretty_dumm_guy has joined #osdev
<notheat> you can build drivers in userspace for linux already
<zid> only userspace driver I've ever actually used is fuse
<sham1> And of course, the reverse is also a possible idea. That is, userland in kernel space. Of course, that kind of a system will be a bit peculiar although things like syscalls would be blazingly fast
<geist> sure. that's functionally what a lot of embedded systems without mmu do
sdfgsdfg has joined #osdev
<geist> you can build a fully functional programming model in supervisor mode and just run 'user' code next to the kernel in the same address space
<geist> that's basically how folks use my LK project
<sonny> So, when such an OS is to be ported to hardware, it is just a matter of letting the kernel map the drivers, and possible rerouting signals unless you have an Interrupt object that can catch signals
<geist> re: user space drivers i should also make a distinction that there generally are drivers that dont talk to hardware that have generally been easy to implement in user space for years. printer drivers, or something like fuse, have no actual hardware to back so you dont really need any special support for those
<geist> sonny: basically. so you build up a model usually where some user space service figures out what hardware is present (say a PCI bus driver, also in user space) and then have it spawn the proper driver processes
<geist> you might end up with 20-30 processes, each with a diver. or one large process with all the drivers, or some combination thereof
<sham1> A large process with all the drivers would be very close to being a monolithic kernel but in userspace
<sonny> sham1 If the userland is in kernel space, that sounds like having all code run at a privelleged level
<gog> mew
<sham1> sonny: indeed
<geist> sonny: indeed. it gets interesting if your user space is written in some sort of safe language
<geist> say something interpreted, or something where it can be forced to not use priviledged instructions, and no raw pointers, etc
<sonny> I see, using software to provide security
<zid> Threads/processes are cheating, monolithic entire system pls.
<sonny> interesting
<geist> or all user space runs in a full virtual machine, a-la java or whatnot
<zid> monolithic kernels are old hat, I want monolithic windows install + sekiro
<geist> you can argue in that case that it's fairly secure
<sonny> I suspect that argument against this is the vm overhead?
<sonny> Security does seem like a worthwhile tradeoff
<sonny> And, if you can get hardware in tune with this idea, it will be simpler I think
<geist> for general purpose i dont think it makes much sense, but for a more secure embedded model than 'everyting crammed together in one binary in supervisor mode' its an improvement
<geist> short of having more of a user/kernel split, but lots of embedded cpus dont really have that feature set
<sonny> yes, that does mean you also get a better embedded language for free
<sonny> scripting an embedded system does sound appealing :-)
<notheat> you could totally do it using wasm
notheat is now known as heat
<sonny> I prefer not having the browser leak into everything ;)
<heat> wasm != browser
<heat> it's just a language + bytecode
not_not has quit [Quit: Lost terminal]
<sonny> I thought it was bytecode
<sham1> It's just a bytecode yeah
<sonny> does it have stack rotating instructions?
<sham1> Doesn't seem like it
GeDaMo has quit [Remote host closed the connection]
<sonny> ok well, that's gonna be another project then
<sonny> is little kernel related to the little filesystem made by embed?
<sonny> mbed*
<sham1> FWIW I don't think WASM needs stack rotation. For example the JVM doesn't have it either
<sonny> JVM also has registers, it is a hyrbid vm iirc
<heat> wasm also has a language that describes it
<heat> it's not just binary
<sham1> Oh, you mean wat
<sham1> That's more just for debugging
<geist> sonny: no not at all
<geist> little kernel is just my project i've been working on forever
<heat> thicc kernel when??
ajoberstar has quit [Ping timeout: 260 seconds]
<sonny> oh alright
<sonny> one more thing, as I understand it any programming language will do for creating of an OS, if you are willing to put the infrastructure in place. The common languages that seem to do this are rust, c and c++?
<geist> generally yeah. with a sprinkle of assembly, usually
<geist> nowadays mostly in the form of inline assembly assists
<gog> rust has a bit of a following yeah, and i did investigate it but it seems more complicated than C
<gog> like C with its unsafe types and unsafe memory and freedom to shoot myself in the foot
<gog> it's fun!
<sonny> lol
<geist> yah i've been writing more and more newer stuff in lightweight C++, but same thing
<gog> i'll probably be trying that too sooner or later
<heat> C++ is fine
<geist> not that i didn't already hae a handle on it, but i generally forbid it in embedded or bare metal, but now i'm a bit more open to it
<gog> without rtti and exceptions it seems fine
<geist> but i do worry about what other people do with it
<heat> what can you do in C++ that you couldn't in C?
mkf has joined #osdev
<sonny> exceptions
<heat> -fno-exceptions
<gog> exceptions in kernel mode are tricky
<heat> also -fno-rtti
<gog> i think doug16k has them in his tho
<geist> well, theres a lot, but yes of course you can do everything you can do in any language in assembly if you try hard enough
<gog> for me c++ has a lot of syntactic sugar i want
<geist> it's mostly about using the additional features of the language to build a more convenient and safe solution, without additional overhead, or acceptable overhead
<geist> that's the fun part
<heat> there are no zero cost abstractions :)
<geist> negative. that is absolutely untrue
<bslsk05> ​'CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”' by CppCon (00:59:52)
<geist> because someone said it doesn't make it untrue
<geist> or make what i said untrue
<heat> sure, it's a good talk though
<geist> there are plenty of zero cost, very useful abstractions that you can get with lightweight c++
<geist> he's talking about much higher level stuff iirc
<heat> std::unique_ptr is fairly lightweight but you're still paying for it
<heat> even if only in compile time
<geist> but yes. what he's talking about are the general things that makes c++ code bigger and many times less efficient
<geist> and that's precisely what i've experienced. unique_ptr and shared_ptr are great examples
<geist> or even simply RAII lock wrappers. which is fantastic, but they do have a cost *sometimes* based on the codegen
<geist> but honetlsy RAII lock wrappers are worth it. never again should you write a goddamn goto tree to roll back stuff in a function
<sham1> shared_ptr especially would have quite the cost since refcounting is weird like that
<geist> yah there' the ref counting but then there's the hidden cost that now *all* code that interacts with a shared_ptr has to assume it might be the one that drops the last ref
<geist> and thus emit at least a path in the code to clean it up, call the dstructor, etc
<geist> and that starts to immediately blow up code size
<geist> even if it's mostly dead branches
<heat> noinline the destructor?
<geist> but, then the tradeoff is they're very useful. so probably worth it
<geist> sure, but noinline the destructor means it still has to actually marshall the args, call it, etc. that adds up
<geist> does it matter? depends on the situation. probably not
<geist> but if you're trying to build very tight embedded code or whatnot, maybe
<heat> yes but that would be the case for any object_unref()
<geist> right of course. we're violently agreeing
<geist> what i have seen is exactly this sort of codegen explosion happen in front of my eyes as we converted LK stuff from C to C++ and then more deeply C++ified it in zircon
<geist> and it's not all bad at all, but definitely a thing that was interesting to observe
<geist> we avoided some of the destructor problem by having a whole class of objects (via its base class) when the last ref goes away instead of destructing itself it adds itself to a thread-local list of future destruction
<geist> and then when the kernel hits a particular sync point it does a clean of the thread local objects, and that may cause additional objects to go to the list as their last ref goes away, etc
<geist> it works darn well, was happy with that
<sham1> Could have done object pools
<geist> or i think in some point it can be moved over to another worker thread
<geist> indeed
<geist> a slab allocator it would go back to eventually yes
<heat> is it faster?
<geist> but these are still 'live' C++ objects that are holding refs to other objects and whatnot potentially, so as they destruct they may cause additional garbage, etc
<geist> heat: probably not, but it means we dont end up freeing things deep inside locks they didn't intend to
<geist> to avoid too many recursion issues or generally doing extra work in locks that aren't strictly related to the purpose of that lock itself
<geist> like i grab a lock on object A for purpose A while holding a ref pointer to B, and then while doing the lock i drop the ref to B and now B wants to destruct which holds ref to C and D, etc
<geist> nicer to just delay all of that
<geist> a lot of this happens more often if you aggressively use move semantics on ref pointers, which really help a lot with extraneous ref pointer bumping
ajoberstar has joined #osdev
Oli has quit [Quit: leaving]
<heat> can qemu emulate any wireless chip?
xenos1984 has quit [Read error: Connection reset by peer]
<heat> hmm I wonder if I can write a mostly self contained bluetooth driver to pump log messages out
mahmutov has quit [Ping timeout: 260 seconds]
Belxjander has quit [Quit: AmigaOS PPC 4.1 +E +U1 // AmIRC 68K]
xenos1984 has joined #osdev
sdfgsdfg has quit [Quit: ZzzZ]
dude12312414 has joined #osdev
<geist> good question
scoobydoo has quit [Ping timeout: 240 seconds]
warlock has quit [Quit: Lost terminal]
Brnocrist has quit [Ping timeout: 245 seconds]
scoobydoo has joined #osdev
netbsduser has joined #osdev
<heat> i know the bluetooth stack is large in general but...
Brnocrist has joined #osdev
<heat> it'd be a fun way to bypass the need for a serial-to-usb adapter
<heat> actually if I got tianocore running on this rpi I could probably dump stuff to EFI variables
<heat> i can't remember how it does efi variables though
<heat> maybe it doesn't?
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
sonny has quit [Quit: Ping timeout (120 seconds)]
rustyy has quit [Quit: leaving]
sonny has joined #osdev
ajoberstar has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
rustyy has joined #osdev
sonny has quit [Ping timeout: 256 seconds]
biblio has quit [Quit: Leaving]
<gog> imean it could in theory if there's an nvram device with space
<gog> but in practice idk what it would take to configure it to do that. probably not that much
<heat> gog, the rpi has no nvram
<heat> docs say that EFI variables/nvram is emulated when inside the firmware, but changes done to variables in the OS are always temporary, no persistance
<gog> hm
Belxjander has joined #osdev
ping- has joined #osdev
<heat> soo I'm looking at my pi zero 2w and the thing has no GPIO header
<heat> i'm guessing I need one if I want to use the GPIO pins?
<clever> heat: the pi4 has an spi flash chip, and there is code in the works to store efi vars in that
sdfgsdfg has joined #osdev
sonny has joined #osdev
sonny has left #osdev [#osdev]