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
<zid> nikolapdp: never watch it
<heat> or geopolitics in general
<nikolapdp> we just did though
<heat> i didn't link you the vid before
<heat> i did now
<nikolapdp> lol sure
<heat> btw england was actually france because they were ruled by french, and now they're germany
<heat> who knew heh
<nikolapdp> tell that to the english
<nikolapdp> zid get over here
<heat> you mean the germans, surely
<heat> the french-german kingdom
<nikolapdp> we'll see when zid gets back
<zid> oh hi
<nikolapdp> read back zid
<zid> yes that's consistent with heat's views on the hre
<heat> no it's not
<zid> russia is part of finland, england is part of france
<zid> hre is part of eome
<heat> this is consistent with nikolapdp's views
<nikolapdp> lol literally how
<zid> No, our viewis that england's monarchy is a branch of french monarchy
<heat> if byz was roman but the ottomans werent (although they held the same territory), then england was norman
<zid> from 1066
<heat> england was definitely not english
<zid> that doesn't mean paris gets to declare themselves england, today
<nikolapdp> ah yes the ottmans who conquered and enslaved all of the actual descendants of the romans are equally roman them
<nikolapdp> that's how that works
<heat> they conquered rome??
<heat> what the fuck why did no one tell me this?
<zid> nikolapdp: vikings were actually french, cus in 1066 the monarchy was norman.
<nikolapdp> clearly
<zid> (500 years later)
<nikolapdp> that's a given
<heat> romania actually somewhat descendends from romans, given, you know, history
<heat> greeks, bulgarians, palestianians descended from rome the same way i descend from danish (i don't)
<nikolapdp> i didn't call bulgarians (who weren't even there for the good part of ere) or palestinians roman
<zid> You're both wrong anyway
<zid> so who cares
<zid> I mean, heat is more wrong, by a lot
<zid> but still
<nikolapdp> i am just saying that if anyone is roman after wre it's ere
<nikolapdp> not germans and definitely not turks
<zid> yea ERE != WRE though
<zid> which you've sort of slipped into a little
<nikolapdp> fair enough
<zid> They're a branch family
<nikolapdp> yeah
<zid> neither are german, german gets to claim to be neither
<zid> ERE can't objectively claim to be *romans* but can claim to be the continuation of the *empire*
<nikolapdp> and the continuation of the roman culture and traditions
<zid> ottomans took the territory of the ERE, but never became that empire
<nikolapdp> if not exactly roman themselves
<heat> zid, why not?
<zid> why not which part
<heat> "ottos never became that empire"
<zid> They just never bothered to try?
<heat> can't you say the ottoman empire was the ERE with a turkish dynasty? just like england was england with a norman dynasty
<zid> You have to assimilate and be assimilated by
<zid> turkey does not act like rome
<heat> they were actually larger than the ERE's largest extent, had 90% of the core eastern roman territories
<zid> because they never tried to do that
<nikolapdp> ottomans were very turkish, they didn't take on basically anything roman other than superficial stuff to claim they are "roman"
<zid> they conquorered and usurped
<nikolapdp> and only some rulers did that
<heat> yes and byzantine in the 10th century+ was not "roman", it was largely medieval
<nikolapdp> what does that even mean lol
<zid> It makes about as much sense to claim a random turk is a roman
<heat> why would an ottoman emperor build an amphitheatre and do a triumph?
<zid> as it does to claim a random chinese guy is english, because china took HK back
<heat> would an italian prime minister do a triumph?
<zid> heat: prestige among the actual romans
<zid> of which he isn't
<zid> Same reason trump dog whistles to farmers
<nikolapdp> byzantine was way different than the rest of medieval world exactly because they are a direct continuation of rome
<heat> but there were no actual romans anymore, outside of the city of rome itself
<nikolapdp> italian prime minister doesn't say italy is rome
<zid> culturally there were plenty, even if it had been diluted/modified over time, that's all that was left
<nikolapdp> as in ancient rome
<zid> if you're claiming the people the turks attacked weren't romans
<zid> then your argument makes even LESS sense
<nikolapdp> lol
<heat> italy is way more roman than greece
<mcrod> i open my macbook and we're discussing the fucking romans?
<heat> yes
<nikolapdp> zid it's magic dirt don't you get it
<nikolapdp> that's waht makes you roman
<zid> magic 'spirit of romanity' more like
<heat> zid, oh, i never seriously claimed ottomans were roman, it's just funny to see the incongruence (and the outrage)
<zid> divine right of turks
<nikolapdp> lol
<zid> somehow the turks become roman if they take constan, but the people IN constant aren't roman
<zid> despite having gotten there first
<nikolapdp> basically
<zid> we can still somehow *take* the romanity from them, that they don't have
<nikolapdp> also did we bully gog because we didn't get a reply lol
<gog> no i got distracted
<zid> They were secretly very proud that we affirmed her
<heat> the people in constantinople were greek
<mcrod> gog I need a hug and some tea
* gog hugs mcrod and makes tea
<zid> heat you *admitted* you're talking bullshit
<heat> gog what do you think about the roman empire
* mcrod hug and drink
<zid> just leave it now
<gog> i don't think about the roman empire
<zid> gog thinks about socks
<gog> yes
<heat> zid, i didn't say i'm talking bullshit, everything I said has a very clear point behind it, you just don't want to acknowledge it
<zid> I think about honzuki
<zid> heat: if I find it, I will acknowledge it
<heat> nikolapdp can't acknowledge it because he thinks greeks are roman
<heat> which, again, see the vid
<zid> As far as I can tell, you genuinely think that the turks stole the romanity from the greeks, who didn't have any romanity to begin with
<zid> which isn't much of a point
<nikolapdp> also i didn't claim greeks are roman in the sense that they descended from romans but that their and roman culture fused
<nikolapdp> basically becoming almost indistinguishable
<zid> They are, if anybody can claim it, the inheritors of the empire's thread of fate
<zid> *if*
<nikolapdp> yeah
<zid> which is why I will allow them to claim to be the 'ERE' in the first place, if they want, they're *not* the WRE though
<kof673> > Discover the captivating contrast of strength and sensuality with GREENLION eau de parfum. Aromatic freshness intertwines with spicy cold notes for a truly that part is usually described as poison, it is not a medicine yet lol
<zid> if they were less culturally integrated to rome that'd be a lot more of a stretch, but roman and greek culture were already highly aligned before any of this kicked off
<nikolapdp> they were very aligned before they even conqured greece
<zid> and then 'the roman empire' consisted of both cultures (and some french and spanish etc) for a long ass time
<nikolapdp> after that it just accelereated
<heat> nikolapdp, the byzantine culture and the roman (from rome) culture were quite different. calling the roman culture graeco-roman is a large oversimplification of hundreds of years of historical LARPing and paranoia wrt eastern provinces
<heat> don't forget: to greeks, romans were *barbarians*
<zid> heat: Is wales part of the UK?
<heat> yes
<zid> Just checking.
vdamewood has joined #osdev
<heat> i believe so, did they referendum their way out?
<heat> that would be epic
<zid> They can't
<nikolapdp> yes alte byzantine cuture was very different than roman culture of the 1st century ad
<nikolapdp> who would've guessed
<nikolapdp> but one morphed into the other over centuries
<heat> one morphed into the other because the roman culture stopped existing
<zid> turns out the welsh are pretty english *by now* and all the useful bits of welsh culture are integrated to some degree into english culture
<heat> fun fact: the barbarians actually got to hold roman games in rome itself, after "rome fell"
<zid> that doesn't mean they're still celts, or that england has gone celtish
<nikolapdp> heat that's what we call larping
<zid> it means that now, after a few hundred years, they're *both* british
<heat> they were more than delighted to get baptized by the bishop of rome, wear roman togas and act roman
<nikolapdp> because they wanted to inherit roman prestige
<nikolapdp> doesn't make them romaan
<zid> If england sunk into the sea, wales would get to continue to be british, even with their silly welsh accents
<zid> the french would not become england
<zid> nor would the fish
<nikolapdp> also by your earlier logic, rome of 4th century ad isn't rome because it differs from rome of 8th century bc
<zid> "lol, let's swim to london and have a nandos, then we'll be england" --fish
<nikolapdp> lol
<zid> christian rome is not rome imo
<zid> so none of these places are rome
<nikolapdp> that's a whole different conversation
<zid> You're only roman if you worship jupiter
netbsduser has quit [Ping timeout: 264 seconds]
<zid> sorry I don't make the rules nikolapdp
<heat> nikolapdp, that's not my logic, my point is that all this naming is completely silly, also the ERE was objectively *a separate state*
<zid> Yes, it was.
<nikolapdp> no one is disputing that
<nikolapdp> lol
<heat> the WRE couldn't separate itself from rome
<heat> i think
<nikolapdp> and germans were separated into hundreds of states
<nikolapdp> they are still german
<heat> byz in 1453 calling themselves roman is like portugal in 2024 calling itself the kingdom of galicia
<nikolapdp> heat not to mention that capital of rome was constantinople for a good amount of time before the split
<zid> If england sinks into the sea, does wales become HRE leader
navi has quit [Quit: WeeChat 4.1.2]
<nikolapdp> good question zid
<zid> because england was part of the roman empire
<nikolapdp> is it the fish instead
<zid> and wales wasn't but is near it
<heat> god i love being galician
<zid> heat you're morrocan
<zid> don't lie
<heat> oh, right
<heat> good point
<zid> they're your rules
<mcrod> i've never thought sign extension could be so annoying
<heat> the city where i'm from was actually founded by the moors
<heat> with moorish naming
<heat> so yes, i'm a moor
<mcrod> i'm sitting here in disbelief over what the fuck I'm dealing with
<zid> At least you're consistent
<heat> let me LARP as a moor for 1000 years
<nikolapdp> zid he's consistently wrong
<zid> yes
<zid> but at least he's consistent
<nikolapdp> true
<heat> lmfao
<mcrod> let me ask all of you this
<nikolapdp> mcrod how is sign extension annoying
<mcrod> nikolapdp i'm about to tell you
<zid> sign extension works exactly how I'd want it to
<zid> so idk either
<mcrod> you are given a type, and it is 44 bits wide, right?
<heat> booooooo no one cares lets talk about the roman empire
<nikolapdp> eh sure
<heat> the real one
<mcrod> okay, so
<zid> heat: Ulm?
<nikolapdp> heat we've been talking about romans for a while let's let mcrod say something
<heat> zid, i wish :(
<mcrod> heat's heard this shit for weeks
<mcrod> for *weeks*
<zid> I have a type, yes
<zid> keep typing
<mcrod> because a) i don't have time to actually work on anything most of the time, and, b) flags are annoying
<mcrod> anyway
<nikolapdp> 44 bits is pretty weird btw
<heat> have you tried doing
<zid> (44 bits is weird yes)
<mcrod> it's not my call
<heat> struct IntType { long num : 45; }
<zid> But as long as you follow the semantics of C, nothing should change compared to 32
<zid> or 16
<heat> and have the top bit as the overflow
<mcrod> you have a 44bit type, signed, range -80000000000h ... + 7FFFFFFFFFFh
<mcrod> zid is smart, he knows where I'm going with this
<zid> no
<mcrod> he probably even knows the target system
<mcrod> then you're not smart
<zid> I'm expecting you to moan it doesn't work how you think it should
<zid> Then I explain that it works how it *actually* should
<mcrod> i'm trying to figure out how it works
<zid> because the way you think it should work is weird
<heat> mcrod was doing it in my DMs but i was too busy talking about history in #osdev
<nikolapdp> appropriate
<mcrod> no I don't think it should work any "particular way"
<nikolapdp> lol can you just explain what's going on then
<mcrod> you want to sign extend, (m << width) >> width
<zid> erm, no I don't
<zid> I let the compiler do the sign extension
<zid> you said I have a type
<zid> so I use the type
<mcrod> okay, it's not a real C type
<zid> Ohhh
<mcrod> i should say
<mcrod> it's a register that is 44 bits wide
<zid> *implementing* *fake* sign extension
<mcrod> yes
<zid> yea C doesn't have arithmetic vs logical shifts
<zid> so that might be a pain
<heat> i don't see how (m << width) >> width does sign extension
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<heat> you'll just wipe off the top bits
<nikolapdp> yeah
<zid> he's putting the top bit int he top bit
<zid> then hoping he has arithmetic right shift
<zid> but he doesn't, he has "undefined behavior" and logical shift
<mcrod> https://pastebin.com/raw/nwwzdZL9 zid will probably get this now
<kof673> eh...hacker's delight might have something for that, but don't quote me. something like that should have an "algorithm"
<zid> If E1 has a signed type and a negative value, the
<zid> resulting value is implementation-defined
<mcrod> but basically, I can't actually sign extend without getting a shitton of UB, and this means I'm incompetent at C, fine
<zid> IDB*
<mcrod> i don't care at this point
<mcrod> but I have no idea how to make this shit actually fucking *work*
<zid> mcrod: make the mask, or it on?
<mcrod> what do you mean
<mcrod> you mean (mac + addend) & mask?
<mcrod> oh you said OR
<zid> let's do 8 bit and 6 bit for simplicity cus I cbf to type out 32 and 44
<zid> mmnnnnnn
<zid> you need to set 'mm' to n>>6, either 00 or 11
<zid> you can just look at that bit, and OR on 0b11000000 or 0b00000000
<zid> if(n & 1<<6) n |= 0b11000000;
<zid> is the entire algo
<mcrod> hm, okaaaaaay
<zid> 1<<5*
<mcrod> 'n' is the 6 bits, 'mm' is the 'nn' portion extended to 8 bits?
<zid> yes
<zid> so 12 ms and 32 ns in your case I guess
<mcrod> god, okay
masoudd_ has quit [Remote host closed the connection]
<heat> can't you just sign extend by pretending the 44-bit value is unsigned? and doing -result (and adjusting that, somehow)
<heat> cuz you know, two's complement is sign extension
<mcrod> for the record
masoudd_ has joined #osdev
<mcrod> this is all in a s64
<zid> sbb
<zid> is what gcc generates
<zid> oh I needed MORE BRACKETS
<mcrod> well... couldn't I just do...
<nikolapdp> always zid
<mcrod> no, i can't just do
<bslsk05> ​godbolt.org: Compiler Explorer
<zid> heh codegen is funny
<zid> it does a movzx then cmovs it depending on the test
<mcrod> seems a bit odd that I'd need a branch, but..
<zid> you have a binary result, mcrod
<zid> either you fill the bits with 1s or you don't
<zid> you can make it branchless with MATH
<zid> n += 0b11000000 * (n >= 0x2000);
<mcrod> so, one moment first off
<mcrod> need to godbolt this
<heat> oh no, not math
<mcrod> for my example, anyway
<heat> please don't math
<mcrod> no, math is good
<nikolapdp> BRANCHLESS
<mcrod> math is neurologically good for you i
<heat> the romans didn't math
<bslsk05> ​godbolt.org: Compiler Explorer
<zid> There, I got the codegen I wanted
<heat> the arabians math'd out though
<zid> thanks gcc
<nikolapdp> lol
<heat> chad roman numerals vs soyjack arabic numerals
<mcrod> okay, so let me see how to adapt this
<mcrod> it seems brainless to just add it
<zid> I thought you would say that arabic numbers are actully indian heat
<heat> roman numerals were fucking crazy though
<zid> and roman numerals are actually italian numerals
<heat> they didn't really have a radix did they
<zid> yea romans were shit at counting
<mcrod> explain something to me though
<zid> they didn't even have the made up bigger numbers that we added later on
<mcrod> why do C++ wizards get the (m << width) >> width and I don't
<heat> what
<zid> Is >> defined in C++?
<zid> I wouldn't know
<mcrod> I have no idea
<mcrod> maybe it is
<heat> i'm fairly sure it's as defined in C as in C++
<mcrod> because I have to tell you, all of the major emulators are doing this with << 44 >> 44
<zid> It's IDB in C, heat.
<heat> exactly
<zid> Or did you mean in C++ as in C
<nikolapdp> they are allowed to do that mcrod
<nikolapdp> it's implementation defined as zid said
<zid> Assuming your compiler does generate the correct code
<zid> then it generates the correct code
<mcrod> wonderful
<mcrod> I hope to bury this very deep
<zid> but it will need PORTING
<mcrod> because I can't pass the stupid fucking test I need to pass otherwise
<zid> so you might as well just do the < 0 version
<zid> gcc clearly understands it, as shown by my godbolt
<mcrod> well that's great, but
<heat> oh, bitfields actually work
<mcrod> i'm not surprised
<zid> bitfields are IDB :P
<heat> struct { long val : 44; } a;
<heat> a.val = val_as_s64; val_as_s64 = a.val;
<heat> magic
<mcrod> zid I guess what I'm asking is, I don't know how to adapt that to my mac helper functions
<mcrod> well that's not a question
<mcrod> that's "idk"
<heat> dude just use bitfields
<mcrod> no
<nikolapdp> zid in what way are they idb
<heat> yes
<zid> if(n < 0) or_the_missing_bits_on;
<mcrod> I want to figure this out
<zid> nikolapdp: order and position within the parent is not defined
<mcrod> ok so, do (mac + addend), if sum < 0, or the missing bits on
<zid> so you might end up with aaaa0000 or 0000aaaa if you use a 4bit in a char or whatever
<nikolapdp> sure but he doesn't need to care about that
<zid> might need to might not
<zid> idk what he intends to do with his bitfield
<nikolapdp> fair enough
<heat> you can just use it to sign extend and discard it straight away
<nikolapdp> he doesn't need to care *for this*
<zid> https://godbolt.org/z/K5K6sdPzT gcc you are *dumb*
<bslsk05> ​godbolt.org: Compiler Explorer
<nikolapdp> gcc is sometimes genuis and sometimes just dumb
<zid> yea you have to fiddle, sometimes
<nikolapdp> yeah
<zid> That extends a 16bit to a 20bit type correctly though I think
<bslsk05> ​godbolt.org: Compiler Explorer
<mcrod> I... think that's right?
<bslsk05> ​godbolt.org: Compiler Explorer
<zid> I think you need (u64)sum on the return
<heat> i present you the chad clang vs the soyjack gcc
<zid> on 11
<zid> having tested it in gcc
<zid> but you're extending from 16 to 32
<zid> I thought you wanted to extend from 32 to 44
<heat> mcrod it doesn't compile your example doesn't compile what do we do
<heat> please fix pelase fix
<mcrod> ok
<mcrod> i'll humor you
<mcrod> for my own sanity
<mcrod> because I have given up
<zid> 3FFC0000000
<heat> you don't need to humor me i'm already hilarious
<zid> if my fingers are correct
<zid> I literally typed 1 x12, 0 x32 into calc.exe
<zid> It looks off by 2
<nikolapdp> lol
<zid> I did 12 and 30 I guess
<nikolapdp> genuis way to do that zi
<mcrod> one second
<zid> FFF00000000
<zid> that makes a lot more ense
<zid> cus one digit is 4 bits
<zid> mcrod ^
<nikolapdp> here's another way to do that: hex(int("0b" + "1" * 12 + "0" * 32, 2))
<nikolapdp> in python
<nikolapdp> you don't even need the "0b" actually
<zid> if the signed version is below 0, then add 0xFFF00000000 to the unsigned version
<heat> here's the way to do it, in POSIX sh: /sbin/poweroff
<zid> to get the unsigned 44bit version
<nikolapdp> heat: errors for me :(
<heat> lol artix moment
<heat> i use shutdown now
<nikolapdp> i am kidding it does exist
<heat> systemd fans use systemctl poweroff
<nikolapdp> true
<mcrod> almost done
<nikolapdp> what does onyx use heat
<nikolapdp> or do you just sync; sync; sync and a hard poweroff
<bslsk05> ​godbolt.org: Compiler Explorer
<heat> you close the qemu window and submit patches to fix shutdown
<nikolapdp> zid now there's a branch
<nikolapdp> great
<heat> my shutdown paths aren't really safe
<nikolapdp> heat: thought so
<bslsk05> ​godbolt.org: Compiler Explorer
<heat> and i haven't hooked up whatever toybox does
<mcrod> there you fucking go
<zid> nikolapdp: You need a branch if you're not doing register sizes
<zid> or you know your shifts are 'good'
<nikolapdp> yeah fair
<mcrod> full disclosure: this is supposed to be saturating arithmetic with a multiply accumulator
<zid> wait was it 44 to 64, or 32 to 44 you were doing
<heat> https://godbolt.org/z/jjvon5dKE look ma, no hands
<nikolapdp> just saying it's worse now
<bslsk05> ​godbolt.org: Compiler Explorer
<zid> Can clang spit out human, heat?
<zid> ah yea, so it can
<zid> I'm not a PDP-11 assembler
<heat> you mean VAX
<zid> or that
<nikolapdp> spit out human?
<heat> clang has great big brained optimizations
<zid> anyway, what do you actually want mcrod, 32 to 44, 44 to 64, 32 to 64?
<zid> 32 to 64 is pretty easy, it's the = operator
<nikolapdp> lol
<heat> i'll never forget the clang LTO transforming an unsigned long into a boolean with two 64-bit constant values cmov'd
<zid> and it assembles to movsx
<heat> it specifically branched what i didn't want to branch
<mcrod> zid, basically, indirectly answering your question, -0x80000000000 -0x80000000000 is an underflow and the result is zero
<zid> I don't know what that means
<zid> sorry
<mcrod> ok that was stupid let me back up
<zid> is your result
<zid> 64bit
<zid> or 44bit and the high bits must be always clear
<zid> like, does it matter what's in the topmost 20 bits
<mcrod> that's not well documented in martin korth's documents I'm afraid, but I'm going to guess that what's in the topmost 20 bits matters
<zid> Then you literally want =
<mcrod> yeah that doesn't work.
<heat> i can't wait for sony to sweep in and arrest you
<zid> It's what you want as described.
<mcrod> ok then that's probably not what I want
<mcrod> understand also that I'm operating on docs that aren't clear on any of this
<zid> If you want to do all your math, then save it down to a 44bit value inside a 64bit value with the top 20 bits clear
<zid> that's = and then &
<heat> nikolapdp, send patches to my operating system thanks
<nikolapdp> what are you writing mcrod anyway
<zid> I imagine your problem is actually the math though
<mcrod> nikolapdp playstation emulator
<zid> something to do with psx sound probably
<mcrod> i have all of the values correct
<heat> its a ps1 emulator
<mcrod> except the flags
<zid> just tell me which bit mcrod
<mcrod> what bit
<mcrod> the whole damn thing
<mcrod> it's supposed to be a learning exercise
<zid> ?
<zid> what
<mcrod> oh. i misunderstood you.
<zid> GTE saturation?
<mcrod> yes
<mcrod> "44bit MAC1-3 overflows can occur during calculations (positive+positive+negative can trigger positive overflow on 1st addition, and negative overflow on 2nd addition, in that case the final result is okay, but both overflow flags are set)."
<zid> I can guess better than you can explain :p
<mcrod> yeah but I've asked people and I'm probably getting on their nerves
<zid> Yea, so what you do in the top 20 bits is just up to you
<zid> the problem is your math
<mcrod> but the values end up correct every time
<mcrod> that's what I'm downright puzzled about
<mcrod> put this another way
<mcrod> the opcode that's failing, is expecting a MAC2 positive overflow. I have the right value, but the wrong sign (negative)
<zid> what did you compute
Matt|home has quit [Ping timeout: 260 seconds]
<zid> overflow is kind of tricky to calculate, you need to know carry in as well as carry out
<mcrod> yes this is excruciating
<zid> so you need to know the and of the top bit of the inputs
<zid> not just the output
<mcrod> [IR1,IR2,IR3] = [MAC1,MAC2,MAC3] = (BK*1000h + LCM*IR) SAR (sf*12) this calculation of NCDS
<zid> Found it
<zid> gte color calculation command
<mcrod> yes
<zid> and what are your input values
<mcrod> one moment
<mcrod> for the case that's FAILING: GBK=-0x80000000, LG1=0xDE69, IR1=0x7FFF, LG2=0x45E3, IR2=0x7FFF, LG3=0x5740, IR3=0
<mcrod> so, ((GBK << 12) + (LG1 * IR1) + (LG2 * IR2) + (LR3 * IR3)) on paper anyway
<mcrod> correct value (0x8001225dbb4), just wrong sign
<zid> what do you mean, wrong sign
<zid> but correct value
<zid> what's the wrong value, what's the right value
<mcrod> during mac calculations, it is expected that they all are in the positive, and mac ends up as 0x8001225dbb4, but instead, it ends up as -0x8001225dbb4
<mcrod> because of course, you can't get a positive MAC2 overflow if the first calculation (GBK << 12) gives you a negative result in the first place with the above values
<zid> isn't one of those outside of the range
<mcrod> no
<zid> did I miscount the zeros?
<zid> yea we start at 32bit negative number
<zid> This -0x shit is annoying
<zid> so we have FFF80000000 in BK?
<mcrod> i'll do you one better
<zid> FFF80000000 << 12 rounded to 44bits is 0
<zid> but we're saturating
<zid> right?
<mcrod> MAC123 doesn't get saturated
<bslsk05> ​imgur.com: Imgur: The magic of the Internet
<mcrod> the playstation notation is a bit stupid
<zid> this whole doc is stupid, ngl
<zid> it's immensely broken and in a frankly awful style, but it's what we have
<zid> and it's free
<mcrod> in the case of LG1, you'll have to look at "LR3LG1", and despite LG1 being at the bottom, that's actually the upper 16 bits
<mcrod> so in this case, 0xDE69
<mcrod> and yes the document is patently stupid and I've found a few bugs that I've managed to fix on my own
<zid> so BK is 32bit, and 32bit even when math is happening on it internally, or not?
<zid> or does it promote to 44 during the math
<zid> and only the writeback rounds back down to 32
<mcrod> it does promote to 44bit it looks like, then the writeback goes back to 32, yes
<zid> okay so the internal value we get should be 0x80000000000 with negative overflow set?
<zid> (that's a big negative 44bit value)
<zid> we did medium_negative * 0x1000 which made huge_negative and it saturated at bit 43
<mcrod> yes, MAC2 negative does get set
<zid> then we add some shit and it gets slightly less negative, is 'sf' set?
<mcrod> if you're looking at the GTE saturation chapter, the test expects 0xA5F8'0000, while I get 0x85F8'0000, which is "i'm missing MAC2 positive"
<mcrod> uh one sec
<mcrod> no
<zid> 80000000000 + 6F33A197 + 22F13A1D + 0
<mcrod> well the bottom 16 bits is right at least
<mcrod> so we have a difference of 0x7FFF0000
<zid> 8009224DBB4 is what you 'should' get
<zid> "and mac ends up as 0x8001225dbb4" note how we're off by like, 0x8000000 in the middle, we have 9 instead of 1
<zid> which suggests when it shifts is wrong
<mcrod> mmm
<mcrod> for what it's worth, this is how it looks in the code at least: https://pastebin.com/tfNn4MLf
<bslsk05> ​pastebin.com: mac = 0;mac = gte_mac2_add(ctx, mac, (s64)((u64)GBK << 12));mac = gte_mac - Pastebin.com
<mcrod> and that's... that's exactly what I was told to do in the docs
<mcrod> note that right now it's just a naive `return mac + addend;`, so nothing crazy is happening other than the shift
<zid> what are you talking about
<zid> what is mac + addend
<zid> how can I note it
<zid> I did the math according to how you told me the math works, and I got the 'wrong' answer, so far
<bslsk05> ​godbolt.org: Compiler Explorer
<zid> BK*0x1000 + (L1*R1)+(L2*R2)+(L3*R3)
<mcrod> that's a minimal example of how it works
<mcrod> as in, how i implemented it, not a holy relic
<zid> doesn't look like BK*0x1000 + (L1*R1)+(L2*R2)+(L3*R3)
<mcrod> hold on
<zid> I don't see what I am holding out for tbh
<mcrod> i don't either, but something is wrong and I'm going to fix it
<zid> we're trying to figure out how to get 0x8001225dbb4 when we're getting 0x8009224DBB4 given how you described the math works
<zid> which means either we followed the proceedure wrong, or the procedure is wrong
<mcrod> ...yes, something is funny here
<mcrod> because in godbolt I get the same answer you do
<zid> what is lm flag set to?
<bslsk05> ​godbolt.org: Compiler Explorer
<mcrod> 0
<mcrod> lm wouldn't affect this
<zid> I guess not
<zid> but I was reading
<mcrod> ok well
<mcrod> if you set 0xDE69 to int16_t, we start getting my answers
<mcrod> er cast*
<mcrod> and that's done because: "Each element is 16bit (1bit sign, 3bit integer, 12bit fraction). Reading the last elements (RT33,L33,LB3) returns the 16bit value sign-expanded to 32bit."
<zid> right DE69 should be negative
<zid> because it's 16bit
<zid> I thought they were all 32
<mcrod> no
<zid> -8599
<mcrod> LG123 and IR123 are s16
<zid> [01:57] <zid> because it's 16bit [01:58] <mcrod> no [01:58] <mcrod> LG123 and IR123 are s16
<zid> ???
<mcrod> probably bad timing
<zid> I have no idea what you were 'no'ing then
<mcrod> me neither
gog has quit [Quit: byee]
<zid> yea it adds up now
<zid> FFFFF8001225DBB4
<zid> and did a negative overflow on the BK*1000
<mcrod> so, in short, I have no fucking idea why on earth it wants MAC2 overflow, unless I'm looking at the wrong MAC2 calculation, but I don't think I am
<zid> I mean..it did overflow?
<zid> why wouldn't it want it?
<mcrod> positive overflow
<mcrod> it wants negative, which it gets
<zid> do the MAC+(FC-MAC)*IR0 or whatever other steps actually happen?
<zid> idk precisely what command is running
<mcrod> yes
<zid> just that your step was part of some of the normal color steps, etc
<mcrod> i can give you more info tomorrow
<zid> maybe one of those overflows then
<mcrod> but i'm totally baffled here
<zid> seems like you have a better handle on the math now at least
mavhq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<heat> mcrod, btw you're using a GUI debugger and i think that's amazingly cringe
<heat> using a debugger at all even
<mcrod> who cares
<zid> I use diff as my debugger the most when writing an emulator
mavhq has joined #osdev
<mcrod> we're not all geniuses who can go without debuggers
<mcrod> especially when it comes to some bullshit like this
<zid> what bullshit
<zid> we got half way through a single worked example
<zid> barring the 8 diversions you took to post weird snippets of code that weren't relevent
<zid> and rants about sign extension, that weren't relevent
<mcrod> the *only* reason I mentioned it
<mcrod> first, you're on the psx-dev server, yes?
<zid> maybe
<mcrod> you are
<zid> I have it archivednow
<heat> dont answer zid
<heat> keep being mysterious
<zid> it's almost exclusively three idiots screaming at this point
<heat> women love that
<zid> The fuck am I supposed to do with that
<kof673> was that the mysterious part or the 3 idiots screaming that they love?
<kof673> my friend needs to know
<heat> i think it's the "you're on the psx-dev yes? *disappears*"
<zid> heat: There's a great guy on the psxdev discord
<zid> he thinks UB is to specifically be aimed for
<zid> "it works for me so it's correct"
<heat> lmao
<kof673> there are rooms here and efnet but fairly quiet
<heat> is he a gambler?
<heat> pick the most uncertain option, we'll see later if it paid off
<heat> zid, oh i have a C UB question now
<heat> int *p; memset(&p, 0, sizeof(p)); *p;"
<heat> is this UB?
<zid> IDB
<zid> I think
<heat> do i need to do p = 0 for it to be a "NULL pointer", or can i just spray the NULL bitpattern
<zid> well yea actually, UB
<zid> if it's NULL, then it's UB because that's NULL
<zid> if it's *not* NULL, then it's UB because that isn't an object you got from & or malloc/family
<zid> it's some random address
<heat> aren't those IDB?
<zid> dereferencing null is ub isn't it??/
<zid> Among the invalid values for dereferencing a pointer by the unary * operator are a null pointer, an
<zid> address inappropriately aligned for the type of object pointed to, and the address of an object after the
<zid> end of its lifetime.
<zid> null pointer deref is INVALID
<heat> well, I meant the second option
<zid> hmm?
<heat> int *p = 0xdeadbeef; *p
<heat> isn't this IDB instead of UB?
<heat> (with the appropriate cast)
<zid> p[0] would be UB
<zid> for sure
<zid> because of the rules about pointer arith
gbowne1_ has quit [Remote host closed the connection]
<zid> straight *p should therefor be equivalent imo?
gbowne1_ has joined #osdev
<zid> It's just harder to find
<heat> well yeah
<zid> found it
<zid> If an
<zid> invalid value has been assigned to the pointer, the behavior of the unary * operator is
<zid> undefined.
<zid> and valid values are & and malloc
<heat> sad
<zid> but yea, it means all those struct memsets to 0
<zid> are UB
<zid> if they contain pointer members
<zid> I pointed this out to an nvidia engineer who's a massive C nerd and older than us added together
<zid> and he almost cried
<zid> I posted some code that did struct = {0};
<zid> and he asked me why not memset, I told him it's UB and his brain exploded
<zid> ({0} does the proper "as if by assignment by 0" thing to make the null pointer constant work, memset does not)
<kof673> i think doing that to structs is UB and/or IDB even with non-pointer members, because padding/trap stuff? or it could just explode later perhaps
<zid> heat: wanna see one of the UB guy's insane takes?
<kof673> you might be ok if you are zeroing the whole thing
<kof673> take that back ^
<kof673> also, what are the rules for floats :D
rustyy has quit [Quit: leaving]
netbsduser has joined #osdev
<heat> zid, lol
<zid> bonus
<heat> he kind of has a point though, the compiler should point out some of the UB if possible
<zid> That's what you get if you tell him that just because it works toda
<zid> doesn't mean it will work tomorrow
<zid> It does
<zid> A lot of UB is not possible to point out, it could do better though
<heat> did you know: volatile loads/stores in MSVC have acquire/release semantics (respectively) by default
<zid> no because I don't do enough threading shit to remember what acquire semantics means
<zid> or use msvc
<heat> 9/10 dentists recommend msvc
<heat> it turns out dentists don't program C
<heat> basically volatile loads and stores have atomic properties in msvc
<heat> which is funny and helps reinforce the concept that volatiles are totes good for when you need atomicity
<zid> https://www.youtube.com/watch?v=g_FxpczHmSg dentists should listen to inspirational music more and maybe they might learn how
<bslsk05> ​'"EM10A_alterne+bis" by Shiro SAGISU ―Evangelion:3.0+1.0 Thrice Upon a Time OST.【TH & English Lyrics】' by S2P [Thai Lyrics]: infinity (00:03:23)
lentement has joined #osdev
lentement has quit [Ping timeout: 260 seconds]
eddof13 has quit [Quit: eddof13]
netbsduser has quit [Ping timeout: 264 seconds]
solaare has quit [Ping timeout: 264 seconds]
solaare has joined #osdev
rustyy has joined #osdev
gorgonical has quit [Ping timeout: 264 seconds]
netbsduser has joined #osdev
vdamewood has joined #osdev
netbsduser has quit [Ping timeout: 264 seconds]
stolen has joined #osdev
smeso has quit [Quit: smeso]
netbsduser has joined #osdev
smeso has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
sprocket is now known as sprock
zxrom has quit [Quit: Leaving]
lentement has joined #osdev
netbsduser has quit [Ping timeout: 268 seconds]
lentement has quit [Ping timeout: 256 seconds]
sbalmos has quit [Ping timeout: 255 seconds]
sbalmos has joined #osdev
heat has quit [Ping timeout: 264 seconds]
Matt|home has joined #osdev
netbsduser has joined #osdev
reddit-bot has joined #osdev
lentement has joined #osdev
frkzoid has quit [Quit: Leaving]
lentement has quit [Ping timeout: 272 seconds]
justache has quit [Quit: ZNC 1.8.2 - https://znc.in]
reddit-bot has quit [Remote host closed the connection]
justache has joined #osdev
netbsduser has quit [Ping timeout: 264 seconds]
frkazoid333 has joined #osdev
justache has quit [Remote host closed the connection]
justache has joined #osdev
stolen has quit [Quit: Connection closed for inactivity]
jjuran has quit [Ping timeout: 268 seconds]
gorgonical has joined #osdev
<gorgonical> Here's a question of policy: if you have a module that is accessible from devfs but is waiting on some external event to be ready, do you put the entry in devfs before or after its ready to use?
jjuran has joined #osdev
netbsduser has joined #osdev
lentement has joined #osdev
<kof673> wikipedia says with devfs you decide :) > Defining when devices are ready to appear is not trivial. The devfs approach is for ...
<kof673> well, does it make sense to "queue" things for later if it is not currently "ready" ?
<gorgonical> I think in this case it doesn't, it's a streaming media device
<clever> that also reminds me of a problem i have on my own driver, udev never creates the char device in /dev/
<clever> i have to manually mknod it on every boot
<gorgonical> You basically are just moving ready detection across the kernel boundary. If I have to stat for the devfs file it's userspace. If the ioctl knows internally it's kernelspace
<gorgonical> Semantics of the underlying device aside
<kof673> ^ yeah...does the existence mean "ready" or not
lentement has quit [Ping timeout: 256 seconds]
<kof673> i don't know, i never liked freebsd IIRC MAKEDEV and other systems a bunch of not just non-ready, but non-existent "device files"
<kof673> *non-existent, not connected devices, that stilll have device files
<gorgonical> Non-existent?
<kof673> before devfs-type stuff, you made files manually
<kof673> probably just does mknod...a script for whatever you think you need lol
<gorgonical> But I don't know what you mean by non-existent? Why would you make a device file for a thing that will never be ready? or am I misunderstanding what you mean
<kof673> that is because you are young :D imagine you don't have a scsi bus, device files still might exist just in case lol
<clever> gorgonical: in the really old days, when you just auto-create hda, hdb, hdc, and hdd, even if nothing is on all 4 ports
<kof673> ^^^
<gorgonical> wtf lol
<clever> before udev :P
<kof673> even with no driver I believe, or compiled out of the kernel, no module loaded
<clever> there was no way to query that kind of things, and major/minor numbers where static
<gorgonical> Oh is it just to simplify the mknod scripts?
<gorgonical> oooh
<gorgonical> ooh
<clever> so you could just pre-mknod everything, before you even make the initrd
<kof673> ^ yeah, so the device files are ready should you ever get such hardware lol
<gorgonical> I knew this about the major/minor numbers thing but hadn't considered that you might just go around creating such devfs files lol
<gorgonical> I guess yes if all the numbers are static then it sort of makes no difference. Allow the kernel to tell you no driver is loaded if you read() or whatever
<clever> or just ENODEV when you try to open()
<clever> root@raspberrypi:~# mknod --mode=666 /dev/example c 510 0
<clever> root@raspberrypi:~# strace cat /dev/example
<clever> openat(AT_FDCWD, "/dev/example", O_RDONLY) = -1 ENXIO (No such device or address)
<clever> this is when my driver hasnt been loaded
<gorgonical> seems a reasonable choice to me
<clever> in this exact case, there is no driver mapped to that major/minor
<clever> but i see no reason you cant just `return -ENXIO;` within that character driver, if its not yet ready
<clever> in the open implementation
<gorgonical> I think I agree. I think it assigns the responsibility of mediating correctly to the kernel
netbsduser has quit [Ping timeout: 268 seconds]
<clever> UDEV [215.535057] add /bus/platform/drivers/rp1-example-driver (drivers)
<clever> UDEV [215.535231] bind /devices/platform/axi/1000120000.pcie/1f00178010.rp1_rx_example (platform)
<clever> UDEV [215.535341] add /module/rp1_kernel_test (module)
<clever> i can see these in `udevadm monitor` when i load my driver
<clever> but the char node is clearly missing
goliath has joined #osdev
wildo has joined #osdev
<clever> i think its device_create that i'm missing
Maja has quit [Ping timeout: 255 seconds]
<clever> yep, that fixes it
gbowne1_ has quit [Quit: Leaving]
netbsduser has joined #osdev
<geist> huh playing around with bootin on my old 386 with multiboot again bcause i haven't done it in a while, nostalgia!
<geist> but annoyingly grub oesn't have the new mmap format (expected), but for some reason it uses the legacy method and reports that memory starts at 0xa0000
<geist> i mean i can put a hack in that says no, it starts at 0,
<geist> oh way no no. duh. never mind
<geist> i was misreading that. yeah mem lower is the *top* of 0 .... a0000
<geist> and mem upper field is assumed to start at 1MB
netbsduser has quit [Ping timeout: 268 seconds]
masoudd_ has quit [Ping timeout: 268 seconds]
bauen1 has quit [Ping timeout: 264 seconds]
netbsduser has joined #osdev
gog has joined #osdev
netbsduser has quit [Ping timeout: 256 seconds]
netbsduser has joined #osdev
Matt|home has quit [Remote host closed the connection]
netbsduser has quit [Ping timeout: 255 seconds]
netbsduser has joined #osdev
ski has quit [Ping timeout: 256 seconds]
CutieMelo has quit [Ping timeout: 256 seconds]
bauen1 has joined #osdev
ski has joined #osdev
CutieMelo has joined #osdev
bauen1 has quit [Ping timeout: 272 seconds]
bauen1 has joined #osdev
lentement has joined #osdev
lentement has quit [Ping timeout: 268 seconds]
<Ermine> TIL clang++ can use libstdc++
Maja has joined #osdev
wildo has quit [Read error: Connection reset by peer]
wildo has joined #osdev
bauen1 has quit [Ping timeout: 252 seconds]
wildo has quit [Read error: Connection reset by peer]
Maja has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
lentement has joined #osdev
lentement has quit [Ping timeout: 256 seconds]
<nortti> < gorgonical> nortti: how hot is too hot to sauna. these are important questions ← personally I prefer around 70° to 80°, no higher than 90°. some go above 100° but I can't understand them
bauen1 has joined #osdev
<gog> jesus christ i can't do 50°
navi has joined #osdev
<mjg> i do 293° no problem
<mjg> kelvin tho
<gog> scale cheater
GeDaMo has joined #osdev
<mjg> i'm not the person who did not qualify
<mjg> u jelly
zxrom has joined #osdev
<gog> yes
<mcrod> hi
<gog> hi
heat has joined #osdev
<heat> Ermine, i'm fairly sure it even uses it by default for linux targets
<heat> same for libgcc
<heat> you need -stdlib=libc++ to force it (or you force it in the toolchain file, in the source code)
bauen1 has quit [Ping timeout: 260 seconds]
<nikolapdp> hello gog
<nikolapdp> hello mcrod
<zid> nikolapdp
<zid> suki'd any hon? GM yet?
<heat> chess is for nerds
<mjg> that's why i play GO
<heat> chess engines do alpha-beta pruning, i do alpha-alpha pruning because i'm no beta
<zid> agreed h eat
<zid> that's why we're not trying to GM at chess
<mjg> i do alpha-sigma pruning
<heat> there are only two GMs
<heat> in chess, and in racism
<mjg> Magnus and Carlsen?
<nikolapdp> chess is for nerds, that's why i play tetris
<heat> magnum carlos
<heat> oh wait its grand wizard, not grand master
<mjg> candy crush is for nerds
<heat> damn
<heat> ok, only one GM
<mjg> are you top 1% in farmville?
<mjg> do you even lift?
<heat> farmville is super 2010 mjg, you're showing your age
bauen1 has joined #osdev
<mjg> what's the rage today/
<mjg> i admit i have not been on facebook since around that time
<mjg> :)
<heat> my mom still plays candy crush i think
<gog> love and lattes or something
<zid> heat is already a Gm at racism isn't hje
<mjg> this reminded me of a little (literally and figuratively) shit, around 10 years old
<heat> no, that's gog
<mjg> claimed to have code running on the ISS(!)
<mjg> and other accomplishments
<Ermine> heat: I was fairly sure that clang uses libc++ by default
<gog> what
<mjg> had to be bullshit, so i googled around, turns out ISS is doing something nice:
<mjg> any kid can upload code which they are going to run there in an emulator
<mjg> basically literally anyone can get "code running on the ISS"
<mjg> it just does not mean what people think
<Ermine> ISS = ms webserver?
<mjg> i'm blanking on the name of that fuck
<mjg> international space station
<heat> gog did you know the g in gog means GNU racism
<Ermine> Ah, ms webserver is IIS
<mjg> Debian GOG/konyx
<heat> >debian
<mjg> it's basically debian with a fucked bootloader and a onyx kernel
<heat> puke emoji puke emoji puke emoji
<heat> wait what's the fucked bootloader
<Ermine> Alpine/konyx
<heat> everyone gangsta until the MINIMAL gang pops up and s6's your kernel
<heat> Ermine, https://godbolt.org/z/67qePchzr yeah checks out libstdc++ is the default on linux
<bslsk05> ​godbolt.org: Compiler Explorer
<heat> it's not on onyx because i explicitly disabled all that crap
<zid> heat: Americans aren't GM racists
<zid> They have their own 'world series' racism league that only they compete in
<zid> so their qualifications don't count
<Ermine> heat: so on onyx you use libc++?
<heat> yes, and compiler-rt
<Ermine> Now I wonder if g++ can use libc++
<heat> no
<zid> nikolapdp: 2:39
<gog> :<
<heat> i mean, it might, but you need to convince it
<nikolapdp> not bad zid
<nikolapdp> bit by bit
<heat> g++ would never be compatible with LLVM because muh freedom as in beer and muh freedom as in speech
<heat> even supporting LLD is fairly recent
<gog> gcc has its own IR and stuff so
<gog> how would you even
<nikolapdp> and llvm is never gping to be compatible with g++
<nikolapdp> what's your point heat
<heat> llvm is super compatible with GNU and gnu tooling
<Ermine> nikolapdp: llvm does a better job at being compatible than gcc
<heat> proven by the fact it literally implements GNU options, the GNU abi, the GNU __builtins, the GNU C and C++, is compatible with gold and ld.bfd, is compatible with libc++ and libgcc and libunwind and...
<Ermine> libstdc++*
<heat> yes
<heat> the GNU toolchain doesn't care, because the GNU toolchain is very proud of itself and considers the LLVM project "the devil's bogey"
<heat> they only support -fuse-ld=lld because they were almost forced to
<nikolapdp> i mean they don't really need to care to be fair
<nikolapdp> not now at least
FreeFull has joined #osdev
<heat> why?
<heat> they're dying
<nikolapdp> are they
<mcrod> no
<heat> yes
<Ermine> are they?
<heat> corps that contribute to gcc: suse, red hat, sometimes intel and amd
<heat> corps that contribute to llvm: nvidia, amd, intel, google, facebook, apple, red hat, etc
<Ermine> distros that use clang by default: chimera linux
<nikolapdp> yet gcc has wider hardware support and comparable performance
<heat> no one gives a shit about vax support
<heat> if they did, clang would support it
<heat> LLVM has more contributors, also doesn't require copyright assignment to the fucking FSF, has widely used tools (does gcc have gcc-format or gccd or gcc-tidy or... ?), more maintainable tooling
<Ermine> (and bsds and minix as if anyone cared)
<mcrod> good luck building it :)
<mcrod> i’m just being an ass
<heat> LLVM is also widely used as a backend for rust and zig and whatever, whereas gcc really isn't
<heat> AFAIK gcc is also constantly behind on new C++ features and C++ standard library stuff
<Ermine> that probably means that llvm is better at some aspects
<Ermine> But there are no symbols of gcc being driven away
netbsduser has quit [Ping timeout: 255 seconds]
<nikolapdp> symbols?
<nikolapdp> you mean signs?
<Ermine> signs, yeah
<Ermine> English is hard
<heat> there is, if you forget the distros
<heat> the distros are inconsequential to whatever toolchains businesses and projects use
<Ermine> You can prove any point if you forget some part of reality
<Ermine> businesses use distros as well
<nikolapdp> lol
<zid> You've been jinxed! You can't draw your sword!
<heat> Ermine, no, it's just that realistically you'll die and i'll die and gcc will still be installed in red hat enterprise linux version 564
<heat> because.
<heat> you actually can't assemble a desktop linux system without having LLVM installed at all
<zid> It's still weird to me that llvm seems like a much more genericisiedseid compiler
<nikolapdp> heat are you sure
<Ermine> That basically means gcc wouldn't die by that point
<zid> like, it has a formal IR and llvmpipe exists and stuff and people use it as a compiler for random things like mesa
<nikolapdp> i am pretty sure lfs doesn't require llvm
<zid> but that it doesn't support more than 4 cpus
<heat> i am, check the mesa deps
<nikolapdp> right shader stuff
<heat> zid, it supports like 8 or 10 archs
<zid> wow, progress
<heat> it's not great, but it turns out no one cares about the other 40 architectures in gcc
<heat> no one is doing the work to port LLVM to the VAX or ia64
<zid> llvm gameboy when
<zid> it'd be interesting to see a real C compiler for gameboy
<Ermine> Also, Qt doesn't ship clang builds for windows (and afaik doesn't support that)
<heat> there was a gcc toolchain port to some DSP (hexagon? or maybe another qualcomm thing?) that completely fell through because of licensing reasons
<zid> is it monday yet
<heat> so they said fuck it and rewrote shit to llvm, and submitted it upstream, boom, done
<nikolar> no zid, it's tuesday
<zid> fuck
<Ermine> I'll consider gcc dying if projects start recommending clang and treat gcc as legacy/deprecated/etc
<heat> github.com/v8/v8
<bslsk05> ​v8/v8 - The official mirror of the V8 Git repository (3880 forks/22432 stargazers/NOASSERTION)
<heat> and subsequently everything that depends on v8
<nikolapdp> v8 was a mistake anyway
<Ermine> and clang-compatible gcc shims start to appear
<heat> bpf (and bcc) is also llvm-only
<heat> last i checked, at least
<nikolapdp> there is bpf gcc
<zid> if you start to get worried about llvm vs gcc, pep yourself up with some music
<bslsk05> ​'"Paranoia" (1117) by Shiro SAGISU ― Evangelion:3.0+1.0 Thrice Upon a Time OST.【TH & English Lyrics】' by S2P [Thai Lyrics]: infinity (00:04:44)
<heat> also, sorry, i was wrong: llvm supports: arm64, arm, avr, bpf, hexagon, lanai, loongarch, mips, msp430, nvptx, ppc, ppc64, mips64, loongarch64, r600, riscv32, riscv64, sparc, sparcv9, systemz, thumb, ve, wasm, x86, x86-64, xcore
<Ermine> What worries me there is existence of armclang
<heat> so it's a lot better than i was remembering
<zid> thumb is arm, x86-86 is x86
<zid> ppc is ppc64, mips64 is mips, same for sparcs and riscs
<zid> wasm is a bytecode
<zid> etc
<heat> wasm is a backend
<zid> a what
<heat> backend
<zid> what
<heat> BACKEND
<zid> no I heard you
<zid> I asked you a what
<zid> "I like durangles" "what are those?" "DURANGLES" "And what are those?" "DUR-AN-GLES"
<nikolapdp> wasm is a mistake
<heat> there's no difference between wasm and x86, they're just bytes that do stuff if interpreted in a certain way
<heat> it's not quite an architecture, but it has the complexity of one for the most part
<zid> so it's a bytecode
* Ermine bytecodes x86
<heat> arm/riscv EFI firmware uses x86 as bytecode
<zid> an ISA is just a bytecode there exists a hw accelerator for
M_D_K has joined #osdev
<Ermine> which proves heat's point
<zid> ?
<zid> his point that IT IS A BACKEND
<zid> I asked him what that meant
<zid> what point is he trying to prove
<heat> i'm not proving any point, i'm just telling you it's as worthy as any other architecture in there
<Ermine> You tried to set wasm apart and you're wrong
<zid> ?
<zid> wrong about what?
<zid> wasm is not a bytecode?
<heat> oh i didn't say amdgcn
<zid> amd made their own gamecube!?
<Ermine> Wasm being a bytecode has nothing to do with the current discussion
<nikolapdp> lol
<zid> Ermine: So why keep bringing it up?
<Ermine> from llvm pov it's a mere backend
<zid> I'm sure it is
<Ermine> You brought it up, not me
<zid> no?
<heat> bpf is not an architecture and it's way harder to codegen for than a real arch
<zid> I was cagetorizing all the things heat said
<Ermine> /ignore
<zid> [14:40] <heat> zid, it supports like 8 or 10 archs
<zid> then he gave a full list
<zid> I counted up the things that were cpus, the things that were bytecodes, etc
<zid> then everybody got REALLY mad
<heat> i'm not mad
<heat> i love you zid
<zid> IT'S A BACKEND
<zid> heat: btw you know your ass?
<zid> I'm sorry, but I've been seeing it behind your back
<heat> WHAT
<Ermine> Anyway
<zid> anyway, I think your 8-10 cpus was right, but it supports more than just cpus
<zid> it also supports some bytecodes and some virtual cpus and stuff
<Ermine> armclang people decided to reinvent linker scripts as scatter files
<zid> It's more useful to me as the bytecodey stuff than actual cpu support, I have gcc for cpus
<zid> but gcc is crap to use at runtime
<zid> so you need *something* like llvmpipe
<heat> i count 20 different archs (collapsing the very similar 32 and 64 variants for all architectures except arm and arm64)
<heat> (and forgetting the bytecodes)
<heat> 21 with amdgcn
<zid> that's getting there!
<Ermine> It doesn't support every arch linux supports btw
<zid> Shame it's all weird dsps other than the BIG TWO
<zid> arm and x86
<zid> nothing older than 2020
<heat> amdgcn and nvptx are older than 2020 i'm relatively sure
* Ermine microblazes
<gog> 420-bit cpu
<zid> wikipedia says it's their latest
<heat> riscv and loongarch are too (but they're not particularly important yet), systemz is old I think, sparc is SUN ENGINEERING!!, mips is old too
<heat> oh you mean when they were introduced? yeah i don't know about that
<zid> yea sparc systemz and mips are defo old
<zid> vega 20 uses amdgcn anyway
<Ermine> xtensa xtensa xtensa
<heat> anyway i'm surprised that llvm supports this much stuff
<zid> yea seems like they're defo expanding the list
<zid> hopefully they won't do a gcc
<heat> they won't support crap like m68k or VAX because *no one cares*
<zid> and change the codebase so much every week that old arches get unmaintainable
<zid> rip m68k
m3a has quit [Ping timeout: 264 seconds]
<zid> gcc 4 for life for megadrive then
<Ermine> Will they accept patchen if I start caring?
<heat> i dont know
<heat> probably? maybe?
<heat> as long as you maintain it i'd guess
<Ermine> well that's ok
<zid> heat why are the backends so hard to add and maintain, why is it not just a text file
<zid> with some psuedocode in it
<zid> like, for MODERN ARCHITECTURES that might not be enough sure, cus you want to care about instruction scheduling a bit more than a dumb cycle count
<zid> but I don't see what'd be so difficult about literally just writing a "this is what all the instructions do and a rough cost of how long they take integer" to go with them, and flawlessly supporting that arch forever
<heat> i dont know i write kernal i dont write compilar
<Ermine> but you've added your target triplet
<heat> adding a target triplet requires some knowledge of internals but i never dived into the LLVM or GCC arch backends
<zid> copy paste
<zid> edit a couple of small things
<zid> gg
<heat> i know llvm has a nice internals guide somewhere that might help out
<bslsk05> ​llvm.org: Writing an LLVM Backend — LLVM 19.0.0git documentation
<Ermine> fk are they going to release 19
<Ermine> Time goes too fast
<heat> one of my biggest pet peeves with clang is that the x86 inline asm "rm" constraint always picks memory
<zid> they're doing a firefox
<zid> one release every couple of whiles, full major version bump
<heat> gcc is doing that too
<heat> yearly release i think
<zid> gcc's release cadence is much slower though
<nikolapdp> yeah
<heat> not really
<Ermine> systemd is the fastest still
<zid> llvm is on *19*, gcc is on 13
<zid> gcc is older by like 15 years
<zid> how could gcc's release cadence be *faster*
<Ermine> 253 or something else
<heat> because gcc started doing this after gcc 5
<heat> they were on gcc 4 for like 10 years
<heat> clang releases twice every year, march-september, gcc is roughly annual, every may or april
<zid> so
<zid> exactly what I said
<nikolapdp> lol
<heat> its not *that* much slower, but sure
<zid> I wasn't claiming it was drastically slower, just that ofc llvm's number's bigger, they release more often
<heat> fwiw i don't understand why everyone is always so eager to increment major version numbers
<zid> 2.6 for life
<nikolapdp> we almost got that zid
<heat> GNOME switched from 3 to 40 (increments it by one every release), gcc too, llvm too, chrome too (I think?), firefox too
<zid> It's just the new meme
<nikolapdp> like why is gnome 40 better than gnome 4.0
<zid> people are convinced that bigger number is better, and they don't want to argue about what 'counts' as a major version bump
<zid> so they just got rid of major versions
<zid> and everything is just the minor now
<nikolapdp> that's silly
<zid> Just consider it llvm 0.19 :p
<nikolapdp> lol
<nikolapdp> good luck figuring out when to expect a breaking change
<zid> for C++ just expect it every release, then you're never disappointed
<nikolapdp> i meant more generally
<heat> for gcc and llvm it's virtually "never", except when it isn't
<nikolapdp> with the new meme as you call it
<heat> chrome and firefox is always
<heat> fyi one of linux's really long term LTS branches had to overflow the 8-bit minor version
<heat> which in itself is a breaking change :p
<nikolapdp> i thought version numbers were strings
<nikolapdp> internally
<zid> sucks to suck if you were scanfing the version into a char
<heat> nope, they're also numbers, and even if they were strings, you parse them to numbers
<nikolapdp> wouldn't you just use int for that
<heat> and WE DONT BREAK USERSPACEEEEEEEEEEEEE
<heat> ok so what happens is that you go something like
<heat> int version_number = 0x0409ff; <-- 4.9.255
<gog> break userspace constantly
<nikolapdp> i mean that's a silly thing to do heat
<nikolapdp> if you ask me
<nikolapdp> though someone's definitely done it
<mcrod> zid do you want to be invited to my birthday party
<mcrod> i invited heat
<heat> nikolapdp, it's a classic
<zid> is there cake
<mcrod> yes
<heat> the cake is a lie
<heat> allentown is also not real
<zid> midget strippers?
<mcrod> no
<zid> no then
<mcrod> wtf
<nikolapdp> just get him midget strippers mcrod
<heat> gog break everyone
* zid gogs
<heat> break their arm too
<zid> no we're having a gog break
<gog> we are on a break
gog has left #osdev [Konversation terminated!]
<nikolapdp> gog how's webdev
gog has joined #osdev
<zid> good timing nik
<nikolapdp> dang
<heat> nikola clegg
<zid> nikolapdp: is your name nikola or nikolah
<zid> avec anglais
<nikolapdp> i am not sure what that's supposed to mean
<zid> dans l'angleterre
<nikolapdp> nikola or nikolah?
<zid> yes
<zid> 'ah' or 'ar'
<zid> rhotacism my friend
<nikolapdp> ah
<nikolapdp> my name is nikola
<nikolapdp> r is there because just nikola was taken
<nikolapdp> no rhotacism
<zid> so yu're a girl?
<nikolapdp> no i am not
<zid> heat is a girl you'd get on well
<zid> why do you have a girl name then
<zid> -a is girl, ask anybody
<nikolapdp> it's only a girl name because you've made it a girl name
<nikolapdp> it's originally a guy name
<zid> nikolo would be man name
<nikolapdp> lol that sounds italian
<zid> yes that's how romance langs work
<zid> -a is girl -o is boy
<nikolapdp> guess what
<nikolapdp> serbian isn't romance
<zid> no, serbian is sex pest
<nikolapdp> lol what
<zid> opposite of romantic
<zid> is pervert
<nikolapdp> ah
eddof13 has joined #osdev
goliath has quit [Quit: SIGSEGV]
CryptoDavid has joined #osdev
netbsduser has joined #osdev
zetef has joined #osdev
<Ermine> In gnome case, they just removed 3. part
<nikolapdp> they didn't
<nikolapdp> they combined it
<nikolapdp> so instead of gnome 4.0 we got gnome 40
<Ermine> 3.38, next 40
<Ermine> 4.0 would make no sense
<zid> we're in base 3.4
<zid> or something
<nikolapdp> stupid
<zid> nik I wanna ply le tet
<Ermine> they didn't really start convering stuff to gtk 4
<nikolapdp> well play then
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zid> but you're a grey circle
<zid> It doesn't boot if you're a grey circle
<nikolapdp> it's not loading for some reason
<zid> likely story
<zid> There's a desktop client, web client, phone app, phone web etc and none of them work all of a sudden eh?
<nikolapdp> trying just the web cliet
<zid> maybe .rs got banned from discord
<nikolapdp> it's just spinnig
<nikolapdp> chromium doesn't work either
pog has joined #osdev
<gog> worksforme
<pog> hi gog
* gog pet pog
pog has quit [Client Quit]
<nikolapdp> hello gog
<nikolapdp> hello pog
<gog> hello nikolapdp
<mcrod> gog
<gog> mcrod:
<mcrod> i want a hug
<Ermine> so, linuks had .256 minor version?
* gog hug mcrod
<Ermine> heat: dumb question, do you break userspace?
<Mondenkind> shut the FUCK up mauro
stolen has joined #osdev
eddof13 has quit [Quit: eddof13]
* mcrod hug gog
joe9 has joined #osdev
eddof13 has joined #osdev
joe9 has quit [Quit: leaving]
masoudd_ has joined #osdev
<sham1> ZSH ZSH ZSH ZSH
<sham1> hi
<gog> hi
gog has quit [Quit: Konversation terminated!]
<mjg> zsh is the shell's shell
<nikolapdp> SH SH SH
zetef has quit [Remote host closed the connection]
Nixkernal_ has joined #osdev
bauen1 has quit [Ping timeout: 272 seconds]
xenos1984 has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
gog has joined #osdev
masoudd_ has quit [Ping timeout: 255 seconds]
elastic_dog has quit [Ping timeout: 256 seconds]
elastic_dog has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
gorgonical has quit [Ping timeout: 256 seconds]
xenos1984 has quit [Ping timeout: 256 seconds]
bauen1 has joined #osdev
<mjg> heat: check out the wordsmith
<mjg>
<mjg> hanging off super_block's arse.
<mjg> Avoids fun races in RCU pathwalk... Same goes for freeing LSM shite
<mjg> fs/super.c: don't drop ->s_user_ns until we free struct super_block itself
<mjg> care to guess who?
<mjg> also Reviewed-by: Christian Brauner <brauner@kernel.org>
<mjg> how is he ok with such a commit message? i would not be arsed to review something like this
xenos1984 has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
Maja has joined #osdev
eddof13 has quit [Quit: eddof13]
lentement has joined #osdev
<mcrod> this is incredible
lentement has quit [Ping timeout: 246 seconds]
CryptoDavid has quit [Quit: Connection closed for inactivity]
heat has quit [Remote host closed the connection]
heat has joined #osdev
gorgonical has joined #osdev
<gorgonical> I feel like read() has a gap in usage that is making me grumpy
<nikolapdp> what would that be
<gorgonical> I want zero-copy read from device. User calls read() with outbuf. I should be able to point my device DMA to outbuf to have zero-copy reads
<gorgonical> But what if DMA is bigger than max bytes in read() syscall? UB?
<gorgonical> Should read reject that with some kind of error? EIO?
<nikolapdp> huh interesting
<gorgonical> I think the semantics of read require buffering somehow
<gorgonical> Which I don't like. That means the only solution is to negotiate mmaped buffers with ioctls or something like that
<nikolapdp> you could have something like that with mmap and epoll in theory i guess
<gorgonical> But that's just read with one extra bit of info, why should there be a whole extra pathway for this?
<nikolapdp> yeah i get you
stolen has quit [Quit: Connection closed for inactivity]
<gorgonical> If I were to extend read semantics, what should be done? If you accept UB then there has to be some advisory thing, like maybe when you stat it will report minimum read size. Or read has to reject with an errcode that isn't currently in use by the manpages
<gorgonical> Block devices avoid this exact problem by buffering
<gorgonical> netbsd has ENOBUFS
gorgonical has quit [Ping timeout: 264 seconds]
<netbsduser> if someone wants to zero-copy read and they can't use mmap then it's perfectly fair to make strict and severe demands of them
eddof13 has joined #osdev
<netbsduser> reading only block-multiple counts of bytes is a comparatively minor restriction
<heat> gorgie left :(
<heat> mjg, the xfs dave guy?
<nikolapdp> :)
<heat> Ermine, i've broken it a bunch, there's no point in me keeping crap, most of the system (or the relevant bits) are in the same repo
<mjg> heat: you srs mon
<heat> yes
<mjg> heat: i would give you a hint, cunt, but that would make it too easy
<heat> dave guy, al viro, linus
<heat> there we go
<heat> the al guy
<heat> i thought it could be al, but that would be too easy, could be linus but he's usually not that crass and doesn't really dive that deep into the VFS, dave would be perfect
skipwich has quit [Ping timeout: 255 seconds]
<mjg> i would not think of dave for this one
<heat> kent would insult 3 or 4 more people in the commit msg, with some snark
<mjg> do you have an example
<heat> every email thread he's on
<mjg> of a commit message of that sort
<heat> i get insulted just from read them, and i'm not even the target
<mjg> mofo
<heat> no clue, was just joking around, it may be that his commit messages are good
<mjg> look mate, normally that would be obvious, but given what i pasted above it was totally believable
<mjg> .. that he commits with shit talking people
<mjg> any concerns for maturity or whatnot one might have aside, these messages are just not pragmatic
<mjg> anyone wanting to maintain an LTS kernel has to sift through tons of commits and bullshit in them literally wastes time
<mjg> good news is that the one liner summary is often good enough
<heat> the poor red hat slaves :(
<nikolapdp> :(
<mjg> you are not a nice person
<heat> why
<heat> i try to
<mjg> probably a mixture of genetics and upbringing
<mjg> including .pt itself
<mjg> i know you are doing your best
<heat> one thing is banter
<heat> the other thing is whatever is truly inside my heart
<mjg> banter? i hardly knew her
<heat> they don't mix
<mjg> so funny story, there was a time i would sit in a certain meeting at rh
<mjg> in the corner and visibly pissed about having to be there
<mjg> it was always a teleconf, as in the entire room was streamed to other participants in other geos
<mjg> one dude told me later they were joking i'm a spy
<heat> also "red hat slaves" is a diss towards the company and not the actual people, which i hope is understandable
<mjg> i'll make sure to add this remark to what i relay to the CEO
<heat> good
<heat> treat people better you mofos
<mjg> one of the awards for being a corporate climber of the quarter was lunch with one of the VPs
<mjg> i meant associate of the quarter, apologies!
<heat> also if you're in the vicinity you might tell the canonical HR department to come up with a sane interview scheme
<mjg> anyway it was insulting af and even they could not be arsed to uphold the farce
<mjg> so it got scrapped
<mjg> lol canonical interviews are a meme MON
<nikolapdp> heat what are their interview schemes like
<mjg> you have to prove you are a descendant of turing to even get a shot
<mjg> the problem was he was childless
<mjg> so....
<nikolapdp> lol
<heat> here's 25 questions, including "how were you in high school" and "how do you think CANONICAL SHOULD FUCKING GROW IN THE NEXT 5 YEARS", answer them in a google doc and send them back
<nikolapdp> why should i as a programmer give a crap about GROWTH
<heat> i guess canonical is a distributed company where if the CEO dies off any random engineer should be able to take his place
<nikolapdp> lol
<nikolapdp> do they use raft for that
<heat> who
<nikolapdp> i am kidding
<nikolapdp> deciding who's the new ceo
<netbsduser> xfs
<netbsduser> the 3rd-to-last word in filesystems
<nikolapdp> yfs
<nikolapdp> second to last
<nikolapdp> maybe i should call mine yfs lol
<nikolapdp> Would you describe yourself as a strong coder? Why?
<nikolapdp> lol
<heat> oh wow your irc client is busted
<heat> you FUCKING IDIOT
<nikolapdp> i am not sharing
<nikolapdp> just a silly question
<heat> brother it's full of silly questions
<nikolapdp> fair
<geist> hello
<nikolapdp> hello geist
<geist> is everyone being nice to each other? good
<heat> i tell nikolapdp not to share and he immediately shares
<heat> epic stuff
<bslsk05> ​linuxiac.com: Linux Crosses 4% Market Share Worldwide
<nikolar> woohooo
lentement has joined #osdev
<geist> heat: oh my, such drama
<geist> when will nikolapdp ever learn
<geist> heat: you should arrange for a severed horse head to appear in his bed
<nikolapdp> that's a tad dramatic
<geist> heat is the ender wiggin of osdev
<geist> he will defeat you such that you will never rise again
<nikolapdp> lol
lentement has quit [Ping timeout: 264 seconds]
gbowne1 has joined #osdev
<heat> hi geist
gorgonical has joined #osdev
<gorgonical> heat: I always read logs and I don't have a bouncer
<geist> gasp, gorgonical is watching heat
<heat> hi gorgonical
<heat> what device were you talking about there
<gorgonical> a camera
<heat> that sounds ringbuffery
<gorgonical> Hmm, I don't actually know how the isp wants to do the DMA
<gorgonical> The prototype was built by an undergrad so I haven't gotten into the gory details yet
<geist> ruh roh
<geist> in other words it may be trash?
<gorgonical> I know that at least we can hand it buffers and it'll put frames there
<geist> well, hopefully it has some way for you to either double buffer frames and get some notification one is ready
<geist> or if it's just overwriting the last one, some way for you to get notifications that it is at particular thresholds so you can race the DMA
<gorgonical> Double buffer?
<geist> s/notifications/interrupts
<geist> well, like if it has enough space to store the complete last frame while it works on the next one
<geist> and then says 'buffer A is full of a picture, you have one frames worth of time to read it out while i work on B'
<geist> and so on
<gorgonical> Yeah it does seem to know how to do this
<geist> more hard core stuff (i think this is more in audio) would set up a single buffer where the DMA just goes through it, circling around constantly
<geist> and it's softwares problem to keep up with the DMA engine
<geist> either put data just in front of it or read it just as it sweeps past
<geist> you can get really low latency from that, but need very precise timing
<geist> but i honestly dont know what the defacto solution is for cameras at that level. i'm guessing it's frame at a time, no real need to be that precise and follow the scanout
<gorgonical> A suggestion from my advisor was to mmap+ioctl and the ioctl just turns on the DMA flow until we've captured X frames, and then turn off the DMA streaming. Doesn't provide fully continuous throughput but that miiight be okay for our application
<geist> sure if you're willing to trade memory (need enough buffer to hold X frames) and you dont care about it being particularly real time
<geist> seems like a fine solution
<gorgonical> re the camera: that's exactly the problem. v4l2 is the linux infra for it and it's enormously and massively complex, so this is all research to see just how minimal we can get this
<geist> yah
<geist> i tend to be bottom up so i immediately thik about how the dma engine works, etc :)
<geist> but yeah in a real application you'd probably start at some boring v4l2 or directx or whatnot
<gorgonical> I think that's how we're worried about it, too. Our target is to just inject frames into a CV model
<gorgonical> We don't expect human eyes to ever see these frames, so all the v4l2 stuff is pretty superfluous
<gorgonical> Is the thesis
<geist> of course coming off the camera it'll almost certainly be in some 4:2:2 or 4:2:0 format, so you'll probably want to deal with that
<geist> well, i say that, depends. i guess
<gorgonical> Yeah fortunately the on-board isp chews up the mosaic camera data pretty well
<geist> maybe modern HD cameras can give you a RGB stream
<gorgonical> The design question at hand is actually about how to model the processed images coming out of the isp block itself. We have the plumbing from camera to isp figured out
<gorgonical> Actually on the board it's really hard to directly get the raw camera data lol
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<gorgonical> Strange to me about Linux providing an autoconfiguration for pinctrl stuff, but seemingly not any of the other platform resources
Matt|home has joined #osdev
zetef has joined #osdev
zetef has quit [Ping timeout: 246 seconds]
zetef_ has joined #osdev
M_D_K has quit [Ping timeout: 255 seconds]
netbsduser has quit [Ping timeout: 240 seconds]
neo has joined #osdev
Left_Turn has joined #osdev
<kof673> > like maybe when you stat it will report minimum read size i am not anywhere near that, but that sort of thing, i just have a function that returns minimum size/maximum/increment seems "good enough" to allow general flexibility
<Ermine> heat: you tried to apply at canonical?
<kof673> and returns 0 or max or whatever for each of those, to indicate "any"
<kof673> > why should i as a programmer give a crap about GROWTH eh, that sounds like you could borrow some agent smith lines and thrown in some cancer references and see if they notice lol
<kof673> this was a joke about growth, but could add ballmer quotes too lol
<mjg> the question was about understanding bigger picture, not replacing the CEO
<mjg> ultimately the real question below all of this is whether you are customer oriented, which is rare
<gorgonical> kof673: what's different from that function vs stat? just making those read properties a different function?
<kof673> yes, i have no intention of posix except bolted on later
<gorgonical> i see
<kof673> just as a general thing...if the "increment" is constant that saves having to return an array or something more complicated, should handle general cases
<kof673> i overengineer a bit but ...thought some things might want that so....my motto is always expose to the caller as much as possible, let them decide
<gorgonical> fwiw I've just checked stat and in man 2 stat it already says stat returns "preferred I/O block size" but that's just a hint, not a hard min/max
zetef_ has quit [Read error: Connection reset by peer]
<kof673> i was also thinking just a general stream...fixed-size messages are arguably easier, don't have to "assemble" stuff, e.g. make the caller read or write a whole "message" at a time
<kof673> like "records" <runs>
<heat> Ermine, yes
<heat> mjg, it was a kernel position, why tf does that matter
<heat> worst case it's just HR bullcrap questions
<heat> let me program, i don't care about the company's direction
rustyy has quit [Ping timeout: 252 seconds]
masoudd_ has joined #osdev
goliath has joined #osdev
<nikolapdp> literally
<mjg> do you even know the canonical's mission?
<mjg> s/the//
<nikolapdp> comde
<mjg> while ballmer liked to chant 'developers', what he should have chanted is CUSTOMERS
<sham1> CUSTOMERS CUSTOMERS CUSTOMERS CUSTOMERS CUSTOMERS CUSTOMERS CUSTOMERS
<mjg> damn straight
<mjg> customers PAY money
<mjg> developers TAKE money
<mjg> who do you want more of?
<sham1> DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS
<heat> "DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS" the C++ committee desperately trying to keep people from moving to rust
<zid> "henlo yes? I would like do the program in exchange for the money unit"
<sham1> > rust
<sham1> ew
<sortie> hi need proglang?
<sortie> psst
<heat> hi sort
<sortie> got liek big g proglang 4 u
<sortie> all lccorp
<heat> carbon
<heat> go
<nikolapdp> why did you remind me of carbon
<sortie> release sekuritiz all perfect unbeatable very trust
<sortie> even got crazy corp tld
<sham1> Wait, carbon still exists?
xenos1984 has quit [Read error: Connection reset by peer]
<heat> carbon still exists yeah
<sortie> psst mobile apps everywhere
<mjg> fucking rust
<heat> google and microsoft are still upset that the committee doesn't want the ABI break
<mjg> or rather, the infra around it
<sortie> think of the sheer shareholder value
<heat> so google has carbon, microsoft has cpp2
<mjg> who has cccp?
<nikolapdp> cpp2?
<bslsk05> ​hsutter/cppfront - A personal experimental C++ Syntax 2 -> Syntax 1 compiler (210 forks/4986 stargazers/NOASSERTION)
<heat> the syntax literally makes me die, but the r/cpp hivemind thinks it's fucking amazing
<nikolapdp> wait are they actually using that
<heat> no
<nikolapdp> it's reddit what did you expect
<heat> it's used exactly as much as carbon
<nikolapdp> lol
<heat> google is actually USING RUST
<heat> and go
<sham1> Nim?
<nikolapdp> no
<sham1> It's a shame that they abandoned the use of Common Lisp even though they bought that one flight tracking software company that did the tracking software in CL
<nikolapdp> who are we talking about sham1
<sham1> Google
<sham1> Although interestingly Google still has their CL style guide available
<heat> i don't know but i'm sure all the 70 year olds would love to work on lisp
<nikolapdp> i'd rather work with lisp than js
<sham1> I wish I could work in lisp and I'm as zoomer as can get
<heat> (defun you're literally insane)
<nikolapdp> sham1 my man
<nikolapdp> heat when have i said i wasn't
<sham1> You know it's good when it says .xml
<nikolapdp> lol
<heat> Documentation
<heat> Document everything
<heat> thanks google
<sortie> g3doc yo
<sham1> It's fun and games with XSLT
<heat> sortie, btw why does the google corp sso look taken straight out of 2004
<heat> can you raise that internally
<heat> i walk into some google corp link by accident and time travel back to pre-invasion-of-iraq google
<sortie> “Google sign-in has a new look We've improved the sign-in page with a more modern design“
<sortie> heat, wait you're not supposed to get that far
<heat> depends
<heat> the go// links don't resolve, of course
<heat> but there are plenty of other internal links thrown around in e.g fuchsia
<sortie> Curiously I can't even find my way to that page from my private desktop
<sortie> I only get that new sso page telling me to log in with my corp account
<sortie> Even though I'm signed in with my private account
<sortie> heat, anyway I kinda like that 2004 style, it's like the real G that we all forgot, a reminder of the true power
<sortie> Plus it got pretty random pictures
<sortie> heat, as for why it's not updated? idk. I fear it might be load bearing
<nikolapdp> while their motto was still "don't be evil"
<sortie> nikolapdp, no no, I'm sure that's still somewhere on the pages for our shareholders somewhere
<nikolapdp> lol
<heat> sortie, do you think it's possible any of the quantum computers blows up if you change the HTML
<nikolapdp> entanglement
<sortie> darling i don't give a qubit
<mjg> can chatgpt generate a quantum computer
<sortie> heat, rather I bet it's written in this one framework that's otherwise deleted and it's forked by some defunded team for this particular purpose and no one wants to staff a rewrite
<nikolapdp> can chatgpt emulate a quantum computer
<sortie> Complete joking speculation there by the way
<heat> can chatgpt
<nikolapdp> no
<sortie> But it does happen a bunch that somebody writes a really nice internal tool and it's just a 20% project despite the many, many, many internal users and it takes many years before it becomes staffed as an official project
<sortie> I imagine (without any knowledge) that the corp login screen is definitely a well protected and thought out system as a primary line of defense
<sortie> It's probably why it's so completely unlike the normal g account signin, since it could be a completely different system with well defined security properties that are very serious, which is why it's also a bit stuck in time since it's doing its job very well and it's hard to replace
<sortie> Again, and I stress, I literally do not know anything here so it's just speculation without any information.
xenos1984 has joined #osdev
<sortie> Just how I imagine something like that could come to exist
<bslsk05> ​fuchsia-review.git.corp.google.com: fuchsia-review.git.corp.google.com - Google Single Sign On: Sign into corp
<sortie> heat, hey that G logo is actually the current one
<nikolapdp> that's beautiful
<sortie> The small 3D balls with shadows at the right bottom corner is quite the old ones though, love it
<sortie> I like the little [+] button that makes it show a hidden Role field with a useful What's this? field that links to internal documentation one cannot read
<sortie> The random pictures arte quite nice though
navi has quit [Quit: WeeChat 4.1.2]
<sortie> heat: fuchsia-review.git.corp.google.com
<sham1> Looks nice
<sham1> And actually accessible, unlike so much of the modern Web
<heat> the funny part of that particular link is that i bet it's corp-only for absolutely no reason
<sortie> That thing was so annoying. Due to ████ they redirected internal people to a different internal domain even though there's a perfectly public domain for it. This was rolled out to all the open source projects without much warning. Then internal devs just copy and paste as part of their normal open source work and bam INTERNAL LINKS EVERYWHERE **TO PUBLIC INFO** (BUT YOU CAN'T VIEW IT)
<heat> if you rewrite git.corp.google to googlesource it's publically accesible
<heat> hah
<sortie> Anyway I complained and got them to turn it off for dart-review.googlesource.com
<sortie> Chrome did too
<sortie> Now there's a little internal gerrit feature that pops up a warning if you link to an internal site in a public comment
<zid> His name is clippy
<Griwes> google being bad at elementary things like this? well I'd never
<heat> oh hai Griwes
<heat> in your professional opinion is GCC dying, compared to LLVM?
<Griwes> I don't think so
<heat> WELL I'LL BE DAMNED
<nikolapdp> lol
<heat> if the toolchain man says it's not dying, it's not dying
<nikolapdp> in your face heat
<Griwes> lol
<zid> nikolar is serbia dying
<heat> yes
<heat> next question
<Griwes> did I miss a flame wa^W^W^Wan interesting discussion?
<nikolapdp> zid: not dying any more than uk
<zid> so up to 'shit loads'
<nikolapdp> i said no more
<nikolapdp> it's significantly less
<heat> Griwes, i was basically saying gcc is dying because everyone is using LLVM for new stuff, GCC is a mess internally and legally, most corps contribute to LLVM, GCC also always looks behind on C++ stuff
<zid> gcc has its niches for now at least
<zid> compatibility, familiarity, interoptability etc
<Griwes> I mean, of course new stuff uses LLVM, because GCC can't be a library because then it'll be "stolen" by proprietary software :V
<zid> and its codegen is.. better some of the time!
<Griwes> with both codegen and C++ features there's been a strong back and forth between it and clang
<nikolapdp> yeah codegen is really comparable between the two
<nikolapdp> they are basically on par
<nikolapdp> have been for a long while
<Griwes> like, up to some point clang was very much ahead in terms of features, but that has switched around a couple of times at least
<Griwes> a part of that is google attempting to ragequit C++ for Carbon
<heat> llvm also has a lot of really useful great tooling, and got ASAN, UBSAN, TSAN, DFSAN, libfuzzer, scudo, xray before gcc could even smell it
<heat> where gcc has old men yelling at clouds
<heat> the fanalyzer is cool i guess but it's spiritually the same as clang-tidy (but slightly more advanced I think?)
<nikolapdp> i think it's still experimental
<zid> Ideally I awnt 10 compilers
<zid> so I can get ALL of the true positives
<nikolapdp> so not exactly ready for comparison yet
<nikolapdp> zid i am with you
<nikolapdp> all of the compilers
<Griwes> some google folks reappeared on the committee recently, so maybe there's some internal pushback on just abandoning C++ progress, idk, haven't asked those folks
<heat> you and i both know carbon is going bumfuck nowhere
<Griwes> and yet
<heat> silly committee politics
<zid> RUST
<Griwes> like, the exodus of google from wg21 was incredibly obvious
<heat> jut give them the ABI break
<heat> we'll fix std::unique_ptr in the process
<Griwes> and lined up exactly with the big "can we break abi" discussion and the beginnings of carbon
<nikolapdp> why are they insisting on breaking abi anyway
<Griwes> unique_ptr not being trivial_abi is just sad, but also not the committee's fault :P
<Griwes> nikolapdp, because there's a whole bunch of fundamentally broken things in the standard library
<Griwes> like, unordered_map is mandated to suck, because of some of the bucket iterator stability requirement or some shit
<Griwes> requirements*
<nikolapdp> ah right
<Griwes> hmmmmmm does gcc have a trivial_abi attribute?
masoudd_ has quit [Ping timeout: 260 seconds]
<nikolapdp> i am more on the c side of things than cpp
<heat> i don't know but now that I know of clang::trivial_abi i'll start abusing it
<heat> thanks
<nikolapdp> lol
<Griwes> lol
<bslsk05> ​gcc.gnu.org: 107187 – [feature request] Add `trivial_abi` attribute
<heat> A B I B R E A K
<Griwes> huh, seems that I forgot about trivial_abi when doing my stdlib's unique_ptr
rustyy has joined #osdev
[itchyjunk] has joined #osdev
<heat> do you use modules yet?
<nikolapdp> do you?
<heat> no
<heat> the most complete c++ modules impl is msvc's AFAIK
Left_Turn has quit [Read error: Connection reset by peer]
<heat> zid, btw re: 10 compilers, i feel like it's always great to compile with both clang and gcc and see what warnings both of them spit out
<nikolapdp> huh, msvc actually pulling ahead for once
<heat> except gcc's Wshadow which i find annoying even if it's sometimes nice
<zid> yes that's what true positives refers to
<Griwes> Haven't had time to move personal stuff to try to use modules yet, and at work I doubt it will ever happen, because nvcc is a cursed compiler
<heat> at this point i'm positively sure modules were never intended to be implemented
<nikolapdp> nvcc?
<heat> cuda cc
<nikolapdp> ah
<kof673> nikolapdp, if thou wouldst kek properly, you must verify the frog language against multiple compilers: "in the evening, however, as soon as the princess was in bed, the frog crept out of his corner and said to her: "I am so tired; lift me up and let me sleep in your bed, or I will tell your father." " see Atalanta fugiens emblem 5, story checks out :D
<kof673> same rule :D you must mercilessly cross-reference :D