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
zetef has quit [Remote host closed the connection]
pandry has joined #osdev
heat has quit [Remote host closed the connection]
gog has quit [Ping timeout: 255 seconds]
pandry has quit [Ping timeout: 264 seconds]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wand has quit [Ping timeout: 240 seconds]
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
blockhead has quit []
blockhead has joined #osdev
srjek has joined #osdev
goliath has quit [Quit: SIGSEGV]
Gooberpatrol66 has joined #osdev
<Matt|home> there we go. drugs are good. drugs make bad pain go bye bye
<Matt|home> kof123 - ? im still working on the project, and no we just had a different style approach.. and i felt a little inferior
edr has quit [Quit: Leaving]
agent314 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
srjek has quit [Ping timeout: 255 seconds]
gbowne1 has quit [Remote host closed the connection]
gbowne1 has joined #osdev
q3lont has joined #osdev
gildasio has quit [Ping timeout: 240 seconds]
gildasio has joined #osdev
q3lont has quit [Ping timeout: 255 seconds]
netbsduser has joined #osdev
q3lont has joined #osdev
netbsduser has quit [Ping timeout: 240 seconds]
fkrauthan has quit [Quit: ZNC - https://znc.in]
fkrauthan has joined #osdev
q3lont has quit [Read error: Connection reset by peer]
q3lont has joined #osdev
q3lont has quit [Read error: Connection reset by peer]
q3lont has joined #osdev
mkwrz has quit [Ping timeout: 256 seconds]
ThinkT510 has quit [Quit: WeeChat 4.1.1]
mkwrz has joined #osdev
ThinkT510 has joined #osdev
q3lont has quit [Ping timeout: 260 seconds]
q3lont has joined #osdev
TkTech2 has joined #osdev
TkTech has quit [Ping timeout: 268 seconds]
TkTech2 is now known as TkTech
[itchyjunk] has quit [Remote host closed the connection]
gbowne1 has quit [Read error: Connection reset by peer]
<vai> hi
GeDaMo has joined #osdev
q3lont has quit [Ping timeout: 255 seconds]
q3lont has joined #osdev
gog has joined #osdev
pretty_dumm_guy has joined #osdev
flom84 has joined #osdev
rustyy has quit [Ping timeout: 255 seconds]
flom84 has quit [Remote host closed the connection]
flom84 has joined #osdev
flom84 has quit [Quit: Leaving]
zetef has joined #osdev
q3lont has quit [Quit: Leaving]
srjek has joined #osdev
pretty_dumm_guy has quit [Ping timeout: 255 seconds]
clever has quit [Ping timeout: 256 seconds]
SGautam has joined #osdev
Nixkernal has joined #osdev
stdin has joined #osdev
goliath has joined #osdev
heat has joined #osdev
zetef has quit [Ping timeout: 256 seconds]
<bslsk05> ​lore.kernel.org: [RFC PATCH 2/6] mm/gmem: add arch-independent abstraction to track address mapping status - Weixi Zhu
<heat> this motherfucker just stole freebsd's idea and randomly tacked it onto linux lmao
<bslsk05> ​lore.kernel.org: RE: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices - zhuweixi
<mjg> lol
<mjg> how to reduce performance:
xenos1984 has quit [Read error: Connection reset by peer]
<mjg> 1. take something used by freebsd
<blockhead> 3. profit!
<zid> 4. advent of shit
zetef has joined #osdev
xenos1984 has joined #osdev
freakazoid332 has quit [Ping timeout: 256 seconds]
elastic_dog has quit [Quit: elastic_dog]
<mjg> language on something people
* mjg shakes head
Left_Turn has joined #osdev
elastic_dog has joined #osdev
<heat> mjg, send patchen to replace linux mm with freebsd mm
<heat> freebsd generic, abstraction layer, very good
<heat> linux mm bad, developer useless incompetent, page tables
<bslsk05> ​www.illumos.org: Bug #16087: lseek(SEEK_DATA) on ZFS races with writes and can briefly miss data before it is flushed in a txg - illumos gate - illumos
<heat> ok, i've said this before but
<heat> zfs codes are crappen, zfs is a crapper idea
<heat> use ext4
<mjg> check perf you twat
<heat> i don't understand what any of that means, you twat
<mjg> 20% system time
<mjg> to build the os
<mjg> at -j 24
<heat> coolen
<heat> is that bad? i don't know
<mjg> it's total dogshit
<mjg> about 10% is tolerable
<heat> illumos is PESSIMAL because it stopped being written by SUN ENGINEERS
Left_Turn has quit [Ping timeout: 256 seconds]
stdin has quit [Quit: 0xC0370008 STATUS_VID_PARTITION_ALREADY_EXISTS]
<mcrod> hi
<heat> mcrod
<mcrod> yes
<heat> they're trying to freebsd all over linux
<mcrod> i saw
<mcrod> i saw long before you did
* mcrod point and laugh
<mcrod> i thought it was funny
<heat> how
<heat> do you follow the lkml?
<mcrod> yes
<heat> nice
<heat> anyway i replied to some freebsd vm shitting with some freebsd vm shitting
<heat> as is tradition
stdin has joined #osdev
<mcrod> yeah, you're on the front page
<mcrod> i admire your bravery to post or respond to anything on the LKML though
<heat> don't be a dumbass
<heat> reply to me and shit on freebsd vm some more
stdin has quit [Quit: 0xC0000240 STATUS_REQUEST_ABORTED]
<heat> like, shitting on OpenBSD? overdone. shitting on Solaris? was overdone in 2005.
<heat> the freebsd people don't get enough hate
<mjg> lol
<mjg> i just checked the reply
<mjg> dave miller vibes
<mjg> heat: have you ever kissed a girl?
<heat> yes
Left_Turn has joined #osdev
<heat> have you?
<mjg> yea
<heat> a girl that doesn't use freebsd?
<mjg> i guess in both caes it was your mother
<heat> what
<heat> anyway mofo don't you ever "have you ever kissed a girl" me
<mcrod> i've kissed girls many times.
<heat> you can't say that and go on long tirades on pessimal
<mjg> :(
<mjg> can i go on about SUN ENGINEERING ETHOS
<heat> yes
<heat> go right ahead
<mjg> sun == great
<mjg> if sun did something it was cause good
<mjg> i know, i read the oslaris internals book
<mjg> nothing but good
<mcrod> i've looked into jobs at IBM
<mcrod> unfortunately they're on the other side of the country
<mcrod> so, no
<mjg> lol
<mcrod> why lol
<mcrod> IBM seems cool
<mjg> ?
<mjg> wtf
<mjg> this channel sometimes
stdin has joined #osdev
<mcrod> :(
<heat> mcrod
<heat> what do you think about AIX and OpenVMS
<mcrod> hilariously
<mjg> do you intend to work aix mcrod
<mcrod> i used an AIX terminal when I worked at a hospital
<mcrod> mjg I would have to work in india to work on AIX
<kof123> and then you can call IBM for support :D
<heat> mcrod
<heat> rank these operating systems: windows, linux, freebsd, openvms, aix, hpux
<heat> and tru64
<mcrod> wtf is tru64
<mjg> :X
<mcrod> ok
<mcrod> i will rank
<mjg> we need an intro material for the channel
<mjg> with usual rants
<mcrod> windows, linux, freebsd, aix, openvms, hpux, tru64
<mcrod> i say windows first only for one reason
<mcrod> and one reason only
<mjg> which way is that
<heat> this is not the troll
<heat> dang
<mcrod> mjg you be the judge
<mjg> it was a trick question to begin with
<mjg> onyx being the only system you need
<mjg> innit right heat
<heat> absolutely
<heat> as long as you don't blow too hard in its general direction, it does the job juuuuuuuuust fine
<mjg> ya man the image i have downloaded is perfectly stable
<mjg> by that i mean the file has not changed one bit
<mjg> i'm not running that lol
<heat> skrew you
<mjg> aight real talk for a minute
<kof123> this is what i meant > IBM announces Global Initiative to train 30 Million People by 2030 innovation-village.com › Education Oct 14, 2021 · IBM today announced a global landmark
<kof123> which is right in the name
<kof123> which is just to say...there is no "india IBM" "usa IBM" etc. it is just one international business machines lol
<mcrod> yes
<bslsk05> ​www.theregister.com: IBM 'shifts' US AIX development jobs to India • The Register
<mjg> heat: i recently ran into more geezer talk about programming and at this point i don't know what, if anything, can be considered safe
<mjg> kof123: there are 2 ibms mate: profit center and cost center
<kof123> so marketing and everything else :D
<mjg> kof123: well 3, the last one being low cost center
<kof123> well i wasn't criticizing so-called "internationalism" just i keep hearing "skills shortage" and then lets say 20 years later: > New IBM survey reveals the greatest perceived barrier to ... newsroom.ibm.com › 2023-02-14-New-IBM-Survey-Reveals-the-Greatest-... Feb 14, 2023 · New IBM Survey Reveals the Greatest Perceived Barrier to Professional or Technical Skill Development is that Programs are Too Expensive
<kof123> oh, you have to pay people more if you want them .....wonder how much that cost to find out lol
<mjg> ibm is a dying empire
<mcrod> indeed
<mjg> it's all grift for decades now only afloat thanks to legacy contracts
<kof123> yes, i mean ...own worst enemy kind of
<heat> mcrod, if you want to work for IBM why not red hat
<mcrod> i'll never get into red hat
gog has quit [Ping timeout: 246 seconds]
<heat> so you can be a FEDORA PROJECT MEMBER and PACKAGE SOFTWARE like you love
<mcrod> you have to have both the C and C++ standards memorized
<mcrod> along with a beard that goes down to your feet
<mcrod> plus I don't like their interview process
<mjg> ??????
gog has joined #osdev
<mcrod> resume review -> phone screen -> interview -> presentation -> panel interview -> you may or may not get in
<kof123> > greatest perceived barrier i'm not trying to get off-topic...its not cuz education and inflation and everything else went up for decades and wages didn't keep up, no this is just a perception issue you see :D "managing expectations" :D
<mcrod> i'm not going through all of that
<heat> you do realize that's like
<heat> a normal interview process
<mcrod> no it isn't
[itchyjunk] has joined #osdev
<zid> for bullshit tech jobs it is
<zid> for jobs it isn't
<mcrod> that is as far removed from a normal interview process
<mjg> people working at red hat are mostly incredibly incompetent
<mcrod> i had one interview and that was it
<mjg> and most does not even know there is a standard
<mcrod> at my old job, one interview and that was it
<heat> you also wanted to hire a guy that did a = (1 << 0) to set a bit
<zid> google be like "How many electrical sockets are in this building? You must challenge the owner of each room and win, to add it to your tally. Go."
<mcrod> heat: I thought he was teachable
<mcrod> but I ultimately voted no when it came down to it
<zid> 1<<0 isn't bad
<zid> It documents the code without a comment
<heat> oh yeah
<zid> and 0b1 isn't standard
<heat> zid note the =, not |=
<heat> guess how he unset the bit
<zid> pls no 0 << 0
<heat> yep
<zid> That's a flag, not a bit
<zid> #define FLAG1 1
<zid> thing = FLAG1; thing = ~FLAG1;
<zid> 1U for luck
<heat> mcrod, point being that your interview process is LUL material
<mcrod> don't worry
<mcrod> the business decided to change up our process
<mcrod> now it's no longer in our control
<heat> while i don't advocate for fuckin leetcode interview invert 3 binary trees while entertaining my baby daughter
<heat> 1 interview with LUL questions is not it chief
<mcrod> reality is, interviews are hard
<mcrod> resume review -> phone screen -> interview -> presentation -> panel interview -> you may or may not get in
<mcrod> is much worse.
<heat> nah that's fine
<mcrod> google is known to reject you even if you passed the interview, so you can reapply and they can be EXTRA sure
<mcrod> sorry, I have to eat and have a roof over my head
<heat> i haven't heard of that
<mcrod> that's a shame.
<mcrod> maybe you're just shielded from this knowledge
<mcrod> that would be a blessing
<heat> and it's also known that google's interview process is LUL material too, in the opposite end
<kof123> that's supposedly something gates did "this is the dumbest idea i ever heard" <watches if you give up or not>
<heat> rh's interview process sounds very average to me
<mcrod> it's... very far removed from average
<mjg> rh is a joke cmpany
<zid> heat: Best interview question -> show some musl code and get them to spend 30 minutes on a patch
<zid> with git commit
<heat> lmao
<heat> "explain dns_parse.c"
<zid> Actually sounds pretty solid to me
<bslsk05> ​github.com: musl/src/aio/aio.c at master · heatd/musl · GitHub
* zid makes his browser wider
<zid> github y u so ugly now
<heat> i dont understand why someone would write code like this
<heat> it's like a kneejerk reaction to GNU code
<zid> I'd write it erm.. sequentially
<zid> I don't see why they've like, batched it
<zid> they've done if(!a || !b || !c) { if(!a) a = ; if(!b) b = ; if(!c) c = ; }
<zid> for some.. reason..
<heat> it makes some sense, they need to drop the rdlock and grab it in write mode
<zid> and why is there random locking in the middle
<zid> I see
<zid> I'd still linearize it
<zid> if(!need) return; if(map && map[a] ..) return;
<heat> but everything's written like they're code golfing
<zid> code should go down the page not across it, were possible, this is a prime candidate for going down the page
<zid> the amount of shit I've refactored from void f(...){ if(thing){ ... ... .. ... } } to void f(...) { if(!thing) return; ... } and unindented 800 lines is shockingly many
<heat> (-1U/2+1)>>24
<zid> it wasn't even a style thing for 'single return' because, goto exists anyway, they just wrote it in a silly way
<zid> Yea I have no idea what that means
<zid> is that.. 0x00800000? math is hard
<heat> yeah i had to try it out in python now
<heat> hex(int(0xffffffff/2+1) >> 24)
<heat> '0x80'
<zid> oh >>24 not >>8 right
<zid> Like, you can understand l + (l+r)/2
<zid> because it avoids an overflow, but that is just.. fuckin weird
<heat> they need a radix tree that covers all the fd range
<zid> That's a natural thing to want
<heat> but instead of harcoding the top level's size as 128
<heat> they decided to do... that?
<zid> have they discovered 'deletion is swapping' yet?
<heat> btw re: if (thing) {...
<heat> that irks me so much, and i'm starting to become an 8-width tab stan because of it
<heat> 8-width tab just finds shit code so much easier
<zid> Yea, it's a very good sign imo, when you're coding for yourself
<zid> that when you get to the second intendation level, that you should just be calling a function
<zid> so rather than for(a) { for(b) { } }
<zid> for(a) { allofb(); }
<heat> i still like two, three usually sucks but sometimes it's fine
<zid> I still often *do* two blocks
<zid> but when I start the second one, I consider if there's little enough local scope required
<zid> whether I could just maek it a 1 or 2 arg helper function or not
<zid> if yes? I often do
<zid> I now get a free comment, and a nice and testable function that won't accidentally use the wrong variables, the code gets reduced scope and no chance to accidentally shadow, etc etc
<zid> (free comment == name of the function)
<zid> if nested functions were proper C I'd probably use those, not 100% sure though
<zid> make all my one-off helpers limited in linkage to 'inside this function'
<heat> i think nested functions would easily just clutter up the parent function
<heat> in that case, might as well just flatten it out
<zid> yea that's why I am torn
<zid> it hides the decs for the params way over *there*
<gog> hi
<zid> can I have 3D source editors?
<zid> so I can like, overlay it on top
<zid> or below
<zid> 2D is too limiting for the hyperediting I need to do sometimes
<heat> i like c++ lambdas because they're mostly terse (terser than nested functions, at least)
<zid> heat: What about an editor that had two code columns, so my helper functions were 'along side' the main func?
<heat> but i still find them too annoying compared to shit like "(a, b) -> a + b"
<zid> they'd be inside the parent func lexically
<zid> but graphically they'd be next to it
<heat> hrm, i'm not sure that would work for me
<heat> i would probably find the second code column distracting
<zid> I think it'd work really well once it was "normal"
<zid> you can style it however you want, collapsed inside the parent and you have to click +, or whatever, but it's just *not* normal atm, to have.. source files be non-linear
<heat> yah
<zid> a call graph view thing would be another option
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
<zid> Then we could be all like "This code is shit, it makes the xref lines cross each other, smh"
* kof123 gives gog cheshire cheese cake
<heat> you know, i keep looking at my efi code and it's really bugging me
<gog> :o
<gog> cheescake
<gog> heat
<zid> It's EFI code, tht's the correct response heat
<heat> and i can't tell if its the NT style or if the code is kinda ass
<gog> efi code is always bad
<zid> If it ever looks normal to you, submit yourself for a brain scan
<gog> sniped nby zid
<zid> you sniped me last night
<heat> yes but it's pissing me the fuck off because I wrote it
<gog> true
<zid> [19:44] <gog> i'm a solaris liker and a girl kisser
<gog> pretend you didn't
<zid> now we're even
<gog> pretend i wrote it
<gog> curse my name
<heat> you know what's against EFI style?
<gog> what
<heat> if (!Ptr)
<zid> nice
<gog> i don't like that style anyway
<zid> if(ptr == EFI_ERROR_EMPTY_SET)
<heat> downvote gog, downvote zid
<gog> null pointer comparisons sould be explicit
<gog> i will not move from this
<zid> that is explicit
zxrom has quit [Quit: Leaving]
<zid> MULTIPLICATION SHOULD BE EXPLICIT! t = a; while(t--) b += a;
<gog> !whatever makes you think (whatever) is an expression
<gog> a pointer is not an expression
<zid> it is
<zid> it is
<gog> no it's not
<zid> Yes, it is
<gog> ok
<zid> b = -a;
<zid> that an expression?
<zid> (the rvalue)
<gog> fine, an expression with a boolean result
<gog> not a result coercecd to a boolean
<zid> so you don't like that == 0 and ! are equivalent?
<zid> (share the same number of electrons)
<gog> fine
<zid> I like the unionized meanings personally (have the right number of electrons)
<gog> maybe i have c# brainworms
<gog> but i've developed a distaste for it just like in javascript when a value is "falsy" or "truthy"
<zid> Why is C programming all about electrons though
<gog> or "nullish"
<heat> i like falsy and truthy as long as it makes sense
<heat> null as falsy makes sense, 0 as falsy makes sense
<gog> null isn't false, it's null
<zid> "is this null" is true or false, though
<heat> null is falsy because it's an invalid pointer
<zid> which is what the expression means
<gog> you're an invaid pointer
<zid> I'm regarded
<heat> >invaid
<heat> lmao typo get rekt
<zid> heat are you regarded too
<gog> :<
<heat> yes
<heat> highly regarded
<zid> I wish I were fully retired
<zid> rather than partially retired
<gog> we got more of our house set up
<zid> does it transform into a cool robot now
<gog> yes
<gog> also we hung fairy lights
<bslsk05> ​github.com: edk2-platforms/Features/Ext4Pkg/Ext4Dxe/Directory.c at master · tianocore/edk2-platforms · GitHub
<heat> is this routine ass?
<heat> i just feel like it does too much
<zid> all functions can be improved by more helper functions
<zid> and that amount of locals makes me think.. maybe it needs more
<heat> more locals? got it zid, thanks
<zid> the fuck is 'inode' for, heat
<heat> lol, it seems like i don't use it
<zid> It goes right into the macro ont he line below
<zid> so yea, just fold those two
<zid> why is off = 0 up there? why not the line before the while? or making the while a for?
<zid> for( UIN64 off = 0; Off < DirInoSize; Off += Partition->BlockSize) would get rid of 2 more lines
<zid> three more
<zid> could rename it to 'block' as well tbh, given it appears to be walking blocks
<heat> good point
<zid> Length is fishy too
<zid> It's assigned to, then used as an out param for Ext4Read, but then never checked
<zid> If it doesn't need checking, remove it, make it NULL, edit Ext4Read to do if(out) *out =
<zid> if it doesn't already
<heat> yeah, doesn't need checking, although i have some local changes which have axed that bit
<zid> I'd change your style so that labels are all lowercase, personally, given the vars are like This and I'm more than happy without enclosing {} on one line if checks, re the if(!Ext4ValidDirent){ goto Out; }
<heat> yeah, can't do that
<zid> which one?
<zid> both?
<heat> both
<zid> Shame, it'd make it better
<heat> do you think i'm calling StrLen by choice
<heat> or those for loops i have where I can't call the variable i, so I need to call it fucking Index
<heat> for (Index = 0; Index < Length; Index++) { Array[Index] = 0; }
<heat> do you realize how stupid this looks? yes, yes you do
<zid> Off isn't even used, hrmph, it's just bounding the loop
<zid> I'd hoist the for loop into a helper, to disambiguate that
<heat> i need a bunch of helpers in a bunch of places, I think
<zid> Like, Off looks like it shouldbe doing Buf + Off + BlockOffset
<zid> it looks like you're walking the same block over and over
<zid> having forgotten to add Off in
<zid> (Which is actually Block but with the wrong name)
<zid> But hey, you're not crazy, this code IS ugly
<heat> i touched some of the code like 2 days ago, and i constantly felt confused and shit just felt off
<heat> the style fucks with me but the code also needs some care
<heat> even if it is correct
<heat> (and it is, it's tested and fuzzed)
<zid> The style and names make it LOOK incorrect
<zid> the hoist stops that
zetef has quit [Ping timeout: 256 seconds]
<mjg> heat: s/Index/ArrayIndex/g
rustyy has joined #osdev
troseman has quit [Quit: troseman]
<bslsk05> ​github.com: Ext4Pkg: Refactor Ext4RetrieveDirent · heatd/edk2-platforms@cc76254 · GitHub
stdin has quit [Ping timeout: 268 seconds]
troseman has joined #osdev
troseman has quit [Client Quit]
frkazoid333 has joined #osdev
troseman has joined #osdev
<zid> !Ext4StrCmpInsensitive (DirentUcs2Name, (CHAR16 *)Name)
<zid> the one case where I definitely do == 0
<zid> That's a trinary comparison, converting it to bool is weird
<zid> balanced ternary ! operator when
mkwrz has quit [Ping timeout: 246 seconds]
mkwrz has joined #osdev
zetef has joined #osdev
FreeFull has joined #osdev
mkwrz has quit [Ping timeout: 240 seconds]
mkwrz has joined #osdev
hirigaray has joined #osdev
xenos1984 has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
joe9 has quit [Quit: leaving]
stdin has joined #osdev
<om3ga> Hello all! I try to dig in, but I'm not experienced at all in arm & amd64 & x86 assembly, but I got already working "kernel" by reading manuals on the website. Could you please suggest libc to choose for full Posix support? Except glibc ofc
<om3ga> my idea is to make very primitive and basic os, which will execute processes, text mode vga colour terminal, ipv4 network & disk
<om3ga> maybe if it will work, smp support in the future
[itchyjunk] is now known as [itchTheBroken]
netbsduser has joined #osdev
<zid> full posix and 'primitive' are mainly at odds with each other btw
<om3ga> zid, maybe in future I will add more features, who knows :)
<zid> well you better add them real fast, posix needs those 100+ syscalls that it needs
xenos1984 has quit [Ping timeout: 256 seconds]
<om3ga> ah, so that means this libc will not work with partially implemented kernel?
gabi-250_ has quit [Remote host closed the connection]
gildasio has quit [Remote host closed the connection]
gabi-250_ has joined #osdev
gildasio has joined #osdev
<zid> libc basically only needs a way to implement malloc (brk or mmap), fopen, fwrite, fread, fclose
<zid> from the kernel
<zid> posix needs all sorts of stuff
<zid> signals, file locking, all sorts of file permissions, etc
<zid> Not to say you have to be *compliant* immediately, you could technically just stub a whole bunch of stuff
<zid> and pray the applications you wanna port don't need those bits to function
<om3ga> yeah, I understand. but if I will not use these functions, as I understand, it should be possible to use only parts from this libc
<om3ga> all userland will be my own
<om3ga> at least in the beginning
<om3ga> I mean it's very complicated task for one person to create own libc :) So I want to choose right one, to not deal later with other C libraries
gabi-250_ has quit [Remote host closed the connection]
gabi-250_ has joined #osdev
<zid> The OS side is significantly more complex
<om3ga> sure I understand this too
<zid> and you will effectively need everything a libc would provide, inside your kernel, anyway
<om3ga> to have that particular libc in os? or to have posix compliant os?
<netbsduser> posix doesn't impose too much
<netbsduser> look at how they define mmap
<zid> except for like 40 pages of random file functions :P
<netbsduser> it's clearly written to allow for no-MMU systems to be able to implement a so-called "mmap"
<om3ga> hmm, mmap is a must in my opinion. From performance perspective
xenos1984 has joined #osdev
<om3ga> but there's not a big choice as I see. so only 2 options really, musl (which I really like) and mlibc
<zid> heat loves musl
DanielNechtan is now known as bombuzal
<om3ga> there is llvm-libc, incomplete yet, but anyway
<netbsduser> i like the mlibc
pretty_dumm_guy has joined #osdev
<zid> you also like netbsd though
<zid> so you know, taste
<netbsduser> try it some day, you'll fall in love
<MrBonkers> Mlibc is very portable. You can also decide to not build certain parts, for example you can build it in ansi only mode and then there would be no posix at all
<MrBonkers> you can also decide to build with posix support but just implement sysdeps as you need them
<om3ga> that's what I'm looking for really
<om3ga> to have "modular" build, if I may say like that
<MrBonkers> Mlibc can do that. You want posix but not the Linux and glibc extensions? Just turn those off then. Don’t need posix either? No problem, we can build ansi only too
<om3ga> great, thanks! That's what I'm looking for
<MrBonkers> happy to help. Feel free to reach out to the developers of mlibc, they’re always happy to help too. They’re on discord and on irc (#managarm-mlibc on libera)
<om3ga> thanks a lot, MrBonkers !
<zid> Did we invoke a summoning spell
<om3ga> :)
<MrBonkers> I do get a notification from my bouncer on the word mlibc:^)
<zid> see
<MrBonkers> not that weird if you’re part of the developers of mlibc
<zid> sorry I gagged a little
<MrBonkers> I didn’t come up with that line I stole it from a blog post we wrote
<MrBonkers> but its a microkernel
<zid> You're like, the anti-me
<netbsduser> mike rowe kernel
<MrBonkers> and it runs a bunch of ported shit. Like WebKitGTK, weston, hexchat
<qookie> netbsduser: careful or ms is gonna sue again
<Ermine> Cite from one scientific paper: "Work done while visiting the OPTIMAL Lab at Boston University"
<Ermine> heat: good job!
<Ermine> One day I'll be bying computer with your code built in?
Arthuria has joined #osdev
dude12312414 has joined #osdev
dude12312414 has quit [Client Quit]
SGautam has quit [Quit: Connection closed for inactivity]
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
<Arsen> what's up with the visit in #managarm-something zid
SGautam has joined #osdev
<zid> I was invited, here
<Arsen> neat
<Arsen> you're welcome to join :)
<zid> I already did
<zid> turns out it's the antichrist
<zid> so I left
<Arsen> what
<zid> wholesome monolithic C vs satan worshipping microkernel C++
<netbsduser> managarm is called "the world's greatest profoundly-asynchronous pragmatic microkernel written in modern C++ with Coroutines"
<zid> Like I said, the antichrist
<zid> It's much shorter to type, and means the same
<Arsen> your lack of aspiration is uninspiring :)
<zid> I don't aspire to make things worse, I'm evil like that
<netbsduser> but bjarne stroupstroup was a scion of AT&T and Unix
* Arsen should go port glibc
<Arsen> stuck with really dumb uni work instead
<Arsen> very fun
<gog> hi
Arthuria has quit [Ping timeout: 256 seconds]
<mcrod> hi
<kof123> i'll just take the heracles opinion on c and c++: > Heracles fed Diomedes to his own horses
stdin has quit [Ping timeout: 245 seconds]
<kof123> meaning, use them to bootstrap :D
stdin has joined #osdev
Arthuria has joined #osdev
gxt has quit [Ping timeout: 240 seconds]
<Matt|home> jesus i've gone over this code a hundred fucking times, it's three lines and i still don't understand it. i have four goddamn pages of notes explaining it to myself
gxt has joined #osdev
<Matt|home> i guess im just bad at everything :\ fine
Arthuria has quit [Ping timeout: 256 seconds]
clever has joined #osdev
gbowne1 has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
netbsduser has quit [Ping timeout: 246 seconds]
stdin has quit [Read error: Connection reset by peer]
flom84 has joined #osdev
flom84 has quit [Remote host closed the connection]
stdin has joined #osdev
heat_ has joined #osdev
heat has quit [Ping timeout: 256 seconds]
flom84 has joined #osdev
flom84 has quit [Client Quit]
flom84 has joined #osdev
stdin has quit [Read error: Connection reset by peer]
flom84 has quit [Quit: Leaving]
zetef has quit [Read error: Connection reset by peer]
stdin has joined #osdev
vdamewood has joined #osdev
<heat_> Ermine, what?
<heat_> am confused
<heat_> mlibc mlibc mlibc
<heat_> is this how i spawn the devil
<heat_> i would never use mlibc for the simple fact that it's written in C+-fucking-+
<mcrod> hi
<heat_> does not sit right with me
<mcrod> you don't sit right with me
<heat_> fuck you
<mcrod> fuck you too
<heat_> no
<MrBonkers> You summoned?
<vdamewood> So, who's fucking here?
<mcrod> you and I, I guess
<heat_> MrBonkers, why written in sea plus plus
<heat_> it boggles my mind how anyone would write a libc in sea plus plus
<heat_> it's like writting the sea plus plus stdlib in rust
<MrBonkers> Probably because the person that started it, quite a while before I joined in 2020, felt like that was the way he wanted to do so. You’d have to ask korona, also known as avdgrinten. I could relay the question for you if you’re not able to join the managarm irc or discord
<heat_> im afraid the answer is probably
<heat_> just cuz
<MrBonkers> I must admit, I found it an interesting choice too when I first saw it
<MrBonkers> ill ask him, now I’m curious too
<heat_> probably because the rest of the system is/was in C++
<heat_> but damn, korona, i forgot that name
<mcrod> a good name for 2020
<MrBonkers> Yep
<qookie> i fail to see why it being written in c++ is bad though
<MrBonkers> heat_, probably not wrong. It’s still in C++
<heat_> qookie, just feels fuckin backwards
<nortti> you know, having namespaces and name mangling means you don't need to worry about your utility functions colliding with names used by user programs
<heat_> and you need to be exquisitely careful of what you're using because you're the libc, and worst case you oopsie'd yourself into a C <-> C++ dependency loop and crash
<heat_> like, marking all of my functions extern "C"? Yeah, couldn't be me
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
<qookie> you already need to mark them extern "C" for the people who include your c headers in c++ code
heat_ is now known as heat
<qookie> and you only need to mark it at the decl, not the def
<heat> huh, good point
<qookie> (if i didn't mix those terms up)
<heat> nortti, C library namespacing rules are far more complex than "haha use C++ namespaces"
<qookie> also mlibc is compiled with -ffreestanding, so no libstdc++ -> libc -> libstdc++ -> ... loops here
<nortti> heat: oh?
Arthuria has joined #osdev
<qookie> and you already run into those with libgcc anyway :^) (which means to bootstrap from nothing you first need a libgcc that does not depend on libc)
<heat> i.e you can't have the C standard library portion bring up any POSIX symbols
<heat> and in case of C++ namespaces you're also solely relying on the fact that their symbols' identifiers start with _Z and are thus reserved names
<heat> on the itanium ABI only
* vdamewood licks Itanium
<nortti> are there any non-itanium c++ APIs in wide use still? (genuinely no idea what non-linux does here)
<nortti> *ABI
<qookie> msvc
<qookie> still funny how ms fucked up some time ago and mangled struct and class differently, meaning you couldn't use them interchangably everywhere without it breaking
<qookie> and gcc warns about it to this day with -Wall or -Wextra :^)
<heat> yep
<heat> actually, hold the fuck up
<heat> how is using a standard namespace not horrendous UB?
<heat> s/standard//
<heat> i.e printf.cpp: "namespace printf {" and then in a random user program "namespace printf {"
<nortti> I was thinking of a namespace with a reserved name
<nortti> or hm, do the __rules not apply to namespaces?
<heat> hmm, they might
cow321 has quit [Remote host closed the connection]
_whitelogger has joined #osdev
<Arsen> there's no reason not to use C++
<Arsen> just learn how to compile code
<Arsen> i'm putting <vector> in freestanding c++ next year
<qookie> heat: put [[gnu::visibility("hidden")]] on the namespace?
Arthuria has quit [Ping timeout: 276 seconds]
Arthuria has joined #osdev
<nortti> don't those annotations turn into no-ops if the compiler doesn't understand them?
<Arsen> yes
<heat> hidden is not a thing for static libraries
<Arsen> and static libraries are not a thing for any significant application
<heat> yikes
<Arsen> ~$ echo '[[arsen::mm_yummi_tea]] int x;' | gcc -x c++ -o /dev/null -c -O3 -
<Arsen> <stdin>:1:29: warning: ‘arsen::mm_yummi_tea’ scoped attribute directive ignored [-Wattributes]
<heat> have you considered joining glibc?
<Arsen> might as well
Left_Turn has quit [Read error: Connection reset by peer]
<nortti> is static linking supported on windows or macos? aiui both have unstable syscall APIs, so I'd presume you must use a dynlib
<heat> even glibc realized their static library policy is stupid and are now trying to unfuck themselves in that regard
<Arsen> [cit. needed]
<Arsen> unless you mean the policy of building a static library..
SGautam has quit [Quit: Connection closed for inactivity]
<heat> i mean the policy if now being usable under static linking
<qookie> ig one could also wrap all private namespaces in an anonymous namespace first (`namespace { namespace mlibc { ... }}`) since that's equivalent to marking everything static
<Arsen> are you sure your definition of usable isn't wrong
<heat> i have a quote from carlos o'donnell in that they're trying to restore feature parity
<heat> you cannot use fucking DNS
<heat> qookie, or just use __mlibc
<qookie> works as well ig yeah
<qookie> #define mlibc __MLIBC_DONT_TOUCH
<heat> namespace mlibc { is accidentally C standard compliant while not being C++ standard compliant
Arthuria has quit [Ping timeout: 268 seconds]
<Arsen> why not? struct addrinfo* res; getaddrinfo("gnu.org", "https", NULL, &res); printf("%08x\n", ((struct sockaddr_in*)res->ai_addr)->sin_addr.s_addr);
<Arsen> ~$ ./a.out
<Arsen> ~$ gcc -static -O3 test.c
<Arsen> 74bc33d1
<Arsen> surprisingly it's even correct
<heat> res.c:(.text+0x38): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
<Arsen> yes, i can indeed read
<heat> great, can you interpret that for me?
<Arsen> I did, and deemed the interpretation not relevant as it does not affect the 'usable' property
<Arsen> given that it clearly can be used
<heat> lol
<Arsen> re: standard namespace not being UB, quite simple, it's only UB because it'd collide with implementations. for reasons obvious that doesn't apply to implementations
tomith has quit [Quit: tomith]