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
heat_ is now known as heat
<papaya> \quit
papaya has quit [Quit: leaving]
gog has quit [Ping timeout: 260 seconds]
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
Burgundy has quit [Ping timeout: 240 seconds]
FreeFull has quit []
goliath has quit [Quit: SIGSEGV]
[itchyjunk] has quit [Ping timeout: 250 seconds]
[itchyjunk] has joined #osdev
pmaz has joined #osdev
terminalpusher has quit [Ping timeout: 245 seconds]
<mjg> heat: eey heat you should totaly investigate what's up with https://github.com/openzfs/zfs/issues/13991
<bslsk05> ​github.com: Creating + writing to a file + stat() in quick succession returns bad st_blocks · Issue #13991 · openzfs/zfs · GitHub
<moon-child> stop trying to get other people to do your dirty work for you :)
<heat> mjg, why?
<heat> they don't give a shit about their fs, i don't give a shit about their fs
xenos1984 has quit [Read error: Connection reset by peer]
<mjg> why do you think they don't
<mjg> moon-child: it's not my work!
<heat> because they never looked into it?
<mjg> they did fix numeorus other bugs in the meantime mate
<mjg> but you do you
<heat> i just noticed a problem and reported it, if they didn't take a look, it's their problem
<mjg> aight aight
<mjg> fair enough
<heat> i'm not a zfs user, i'm not a zfs dev
<heat> if zfs stopped existing i would be a happier person
<mjg> lol
* mjg throws his onyx t-shirt into the trash
<mjg> you have done it
<heat> are you a zfs stan
<mjg> stan?
<mjg> where is your reverence for SUN LEGACY
<heat> SLAB
<mjg> THAT'S RIGHT MOTHERFUCKER
<mjg> go back to your buddy allocator
<mjg> if yer so klever
<mjg> devel/rubygem-aws-sdk-migrationhubstrategyrecommendations
<mjg> lol
<mjg> actual name
<mjg> fucking windows devs writing ruby gems i suppose
<heat> oh yeah linux removed slob for the next release
<heat> :(
<mjg> i would love to talk more shit but a nap is not going to take itself
<mjg> cheers
xenos1984 has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
vdamewood has joined #osdev
heat has quit [Ping timeout: 260 seconds]
pharonix71 has quit [Remote host closed the connection]
pharonix71 has joined #osdev
vin1 has quit [Quit: WeeChat 2.8]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elastic_dog has quit [Ping timeout: 246 seconds]
elastic_dog has joined #osdev
pmaz has quit [Ping timeout: 265 seconds]
pmaz has joined #osdev
slidercrank has joined #osdev
wlemuel has quit [Quit: Ping timeout (120 seconds)]
wlemuel has joined #osdev
<Ermine> heat: why do you care for FreeBSD
gog has joined #osdev
pmaz has quit [Ping timeout: 240 seconds]
biblio has joined #osdev
GeDaMo has joined #osdev
tomaw has quit [Quit: Quitting]
tomaw_ has joined #osdev
tomaw_ is now known as tomaw
Left_Turn has joined #osdev
wlemuel has quit [Ping timeout: 250 seconds]
wlemuel has joined #osdev
ddevault has left #osdev [detach #osdev]
Burgundy has joined #osdev
gog has quit [Ping timeout: 248 seconds]
dennis95 has joined #osdev
gog has joined #osdev
goliath has joined #osdev
innegatives has joined #osdev
<innegatives> Hey, can you please critique my 8086 emulator code? It's 2k lines now: https://github.com/jafarlihi/core86/blob/master/src/main.rs
<bslsk05> ​github.com: core86/main.rs at master · jafarlihi/core86 · GitHub
dayimproper has joined #osdev
zxrom has joined #osdev
<Mutabah> innegatives: Rust tip - Don't duplicate the enum name in the variant, e.g. use `RegisterEncoding::Bit8` instead
<Mutabah> Or, `::Byte` and `::Word`
<Mutabah> You can also use two levels of `match` to make `mutate_register` and `read_register` cleaner
<innegatives> ok thanks
<Mutabah> (or hey, just call `read_register16` within `read_register`)
<Mutabah> Also... you seem to be using borrows a little too often, your enums are small and Copy, so just pass by value
<innegatives> If original 8086 was 50MHz, and say my Rust code takes 50x more cycles per instruction, does that mean I need roughly 2.5GHz CPU to get the same performance?
<innegatives> Mutabah: is there performance hit when borrowing something that is small enough to copy?
<Mutabah> Assuming the same mapping of cycles to instruction :)
<Mutabah> There can be
<Mutabah> And probably is
<GeDaMo> The 8086 was originally limited to about 5MHz
<mrvn> A mul probably emulates way faster than a nop
<Mutabah> in `fn execute` - I'd use a dispatch table instead of that sequence of matches
<Mutabah> Those if/match statements are going to be error prone, a table (while maybe a little more verbose) would be much easier to check
<Mutabah> and 256 lines isn't that big
frkazoid333 has quit [Ping timeout: 248 seconds]
<GeDaMo> Does Rust have any kind of template / compile-time code generation?
<innegatives> Macros?
<Mutabah> yeah, macros - pretty powerful
<Mutabah> both more powerful and less than C's pre-processor
<GeDaMo> Just a random question, I wondered if that could be used to reduce duplication
<Mutabah> (more, as it can match and expand arbitary syntax. Less because it has to expand to a single syntax item)
<innegatives> Mutabah: the issue with dispatch table is that opcodes are not only in the first byte but can be half in middle of the modr/m byte
<Mutabah> https://github.com/thepowersgang/rme2/blob/master/src/opcode_table.h This is my dispatch tables for a similar emulator
<bslsk05> ​github.com: rme2/opcode_table.h at master · thepowersgang/rme2 · GitHub
<Mutabah> innegatives: Multiple levels :)
<Mutabah> GeDaMo: it could be. It can't quite be done the same way as I linked above... but "tt munchers" can do amazing things
<mrvn> Also beware that an opcode must not exceed 15 bytes. Not sure if the 8086 didn't have an even smaller limit.
<innegatives> most i have seen so far is 4 bytes
<innegatives> or 5
<innegatives> with segment override
dayimproper has quit [Ping timeout: 252 seconds]
<mrvn> innegatives: what if I repeat a segment override 10 times?
<Mutabah> rep rep rep rep rep rep rep
<innegatives> hmm yeah, but am i likely to hit such a case emulating ms/dos?
<innegatives> as in, 15 byte limit being an issue
<mrvn> I believe the 15 bytes also include any immediate following the opcode. So any 16/32bit data adds 2/4 bytes as well.
<innegatives> theres no 32 bit immediate in 8086 afaik
<mrvn> innegatives: you might and then you have to throw an exception and not silently run the bad opcode.
dayimproper has joined #osdev
<innegatives> How does LALRPOP use LR(1) by default and not use gigabytes of RAM? Isn't LR1 tables huge?
<mrvn> depends on your grammar and not really
<innegatives> My parser generator uses 4GB of ram for full C grammar in LR(1) mode: https://github.com/jafarlihi/cparse
<bslsk05> ​jafarlihi/cparse - cparse is an LR(1) and LALR(1) parser generator (1 forks/43 stargazers/MIT)
<innegatives> What did I do wrong?
<mrvn> Is C even LR(1)?
<bslsk05> ​stackoverflow.com: parsing - LR(1) parser state size still an issue? - Stack Overflow
<innegatives> mrvn: you can express it in LR(1) i think
<mrvn> Look at the answer from stackoverflow: "Minimal LR(1) parsers solve this problem. Dr Pager was the first one to write a paper on how to do this in 1977. Minimal LR(1) parser have all the power of canonical LR(1) parsers, recognizing the same language defined by an LR(1) grammar. However, minimal LR(1) parsers have parser tables almost as small as LALR(1) parser tables" I'm guessing your cparse isn't building
<mrvn> a minimal LR(1) parser.
<mrvn> That paper is as old as I am.
dayimproper has quit [Ping timeout: 268 seconds]
biblio has quit [Quit: Leaving]
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
<heat> Ermine, as i've said previously, i'm a closeted BSD user
<heat> I know I say I look forward to the linux storage, fs and mm summit, but deep down I prefer BSDcan
<zid> heat stands a chance of getting some at a BSD con, linux con is too high end
<zid> like getting a girl in the lobby of the marriot vs the motel
<heat> i can get some at both cons simply by not having a neckbeard
<mrvn> if you are going to BSDcon for the girls then you are doing something wrong
wlemuel has quit [Quit: Ping timeout (120 seconds)]
wlemuel has joined #osdev
<Ermine> how Freudish
<zid> no that's when heat sleeps with his mother
<heat> why are you so mean zid
<Ermine> there are other things than oedipus complex
<zid> sorry was that a secret :(
<zid> I'm a bad friend
<heat> BSD? more like bull shit distribution
<heat> checkmate
<innegatives> what has freebsd going for it over linux other than different license?
<Mutabah> different design
<heat> a superior mjg
<heat> Mutabah, the design is super similar
<innegatives> what is mjg?
<nortti> the person using that nick here
<nortti> there's also a linux dev who goes by same tree-letter acronym
<zid> BSD motto: "Can we do the things linux already does, but without copy pasting it somehow?"
<zid> ML response: "Here's something I copy pasted from linux, don't tell anybody"
<heat> mjg is love, mjg is life
<heat> just like shrek, really
bauen1 has quit [Ping timeout: 252 seconds]
biblio has joined #osdev
bauen1 has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
bauen1 has quit [Ping timeout: 246 seconds]
bauen1 has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
bauen1 has quit [Ping timeout: 240 seconds]
bauen1 has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat_ is now known as heat
bauen1 has quit [Ping timeout: 248 seconds]
bauen1 has joined #osdev
innegatives has quit [Quit: WeeChat 3.8]
awita has joined #osdev
biblio has quit [Quit: Leaving]
lanodan has quit [Ping timeout: 260 seconds]
<mjg> heat: yo check this out https://github.com/dicksites/KUtrace
<bslsk05> ​dicksites/KUtrace - Low-overhead tracing of all Linux kernel-user transitions, for serious performance analysis. Includes kernel patches, loadable module, and post-processing software. Output is HTML/SVG per-CPU-core timeline that you can pan/zoom down to the nanosecond. (31 forks/251 stargazers/NOASSERTION)
<mjg> heat: dude was somehow arsed to write a freebsd port
<mjg> heat: and it is not *that* invasive
<mjg> heat: you can probably snatch this for onyx
<mjg> in case anyone is wondering
<mjg> > 14:54 < innegatives> what has freebsd going for it over linux other than different license?
<mjg> nothin'
<mjg> or more specifically, for over a decade, that would be nothing
FreeFull has joined #osdev
lanodan has joined #osdev
<ThinkT510> heat: they are running out of names: https://www.phoronix.com/news/Fedora-Onyx-Proposal
<bslsk05> ​www.phoronix.com: Fedora Onyx Aims To Be A New Fedora Linux Immutable Variant - Phoronix
<mjg> lmao
<mjg> what's next
<mjg> Fedora Sortix
<zid> fefora gortex? nice
<zid> Buy it in the market for €1 off a shady looking man
awita has quit [Ping timeout: 248 seconds]
elastic_dog has quit [Ping timeout: 256 seconds]
elastic_dog has joined #osdev
gog has quit [Quit: Konversation terminated!]
dude12312414 has joined #osdev
awita has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
frkzoid has joined #osdev
<mrvn> mjg: What has xyz over zyx other than the one big defining difference?
[itchyjunk] has joined #osdev
sortiecat has quit [Quit: Leaving]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
sortie has joined #osdev
pharonix71 has quit [Remote host closed the connection]
pharonix71 has joined #osdev
xenos1984 has quit [Ping timeout: 265 seconds]
sortie has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
voidah has quit [Ping timeout: 276 seconds]
xenos1984 has quit [Ping timeout: 260 seconds]
Burgundy has left #osdev [#osdev]
xvmt has quit [Remote host closed the connection]
xvmt has joined #osdev
xenos1984 has joined #osdev
sortie has joined #osdev
linear_cannon has joined #osdev
awita has quit [Ping timeout: 268 seconds]
sortie has quit [Remote host closed the connection]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<heat_> mjg, wait, what's the idea there?
<heat_> just transition tracing? isn't that kind of boring anyway?
<heat_> ThinkT510, fedora is now my least favourite distro
nyah has joined #osdev
heat_ is now known as heat
Halofreak1990 has joined #osdev
<Halofreak1990> does anyone know why I would be getting a GPF when setting SS to 0x10, like with the other data segments, in long mode after (re)loading the GDT?
aejsmith has quit [Remote host closed the connection]
<mjg> heat: it is crucial
<mjg> heat: for example to even find lol scheduling issues
<mjg> heat: see talks by the guy
aejsmith has joined #osdev
<zid> Halofreak1990: pages of reasons
<zid> post the gpf from qemu's log somewhere
<heat> mjg, sorry I can't even tell what the fuck is going on
<heat> the description seems wrong? fuck do I know
<mjg> just look up "dick sites google" or similar vidoes
<mjg> the guy has CLUE
Turn_Left has quit [Read error: Connection reset by peer]
<mjg> despite being old
<mjg> fucking rarity
* mjg glares at the usual pean^Wgeezer gallery
<heat> dick sites google
<mjg> it's not porn
<zid> Mr. Penis Locations
<bslsk05> ​'Dick Sites - "Data Center Computers: Modern Challenges in CPU Design"' by UNC Computer Science (01:12:55)
<bslsk05> ​sites.google.com: dicksites
<heat> no fucking way he goes by dick sites hahaha
<zid> weird but true
<zid> I'd be Rich Sites, but he can do him
<zid> A gold mine rather than a porn website
<heat> GET RICH QUICK
<zid> 2 hours until honzuki, what should I do heat
<heat> i don't know
<mjg> GET DICK QUICK
<zid> crosswords? rubik's cube? vidyo game?
<heat> write an operating system
<zid> oh god no
<mjg> contribute to Illumos
<heat> thou shalt not be on-topic!
<mjg> idk learn a new SPOKEN language
<mjg> do you perform any espanol habling
<heat> learn russian
<mjg> > cyka
<heat> i've been meaning to do so
<mjg> > blyat
<mjg> there
<heat> blin
<heat> pizdec
<mjg> now you can do small talk no problem
dennis95 has quit [Quit: Leaving]
<heat> mjg, whats ur favourite consonant
<mjg> pass
<heat> u love them all, equally
<mjg> do you have siblings heat
<heat> yes
<mjg> your parents have a favourite child
<mjg> and if you don't know it's you, it is someone else
<heat> probably
<mjg> they also don't love you all equally
<mjg> pro tip
<heat> loving everyone equally is PESSIMAL
sortie has joined #osdev
wootehfoot has joined #osdev
wootehfoot has quit [Read error: Connection reset by peer]
<Halofreak1990> zid: your request for a log made me look at it again and I just noticed I was trying to set SS to a code segment for some reason. Turns out I got caught out by the size difference between system- and normal segments, which I'd tried to contain in a single struct
dude12312414 has joined #osdev
<zid> hehe
<heat> wait,w hat?
<heat> what difference?
<zid> 4 vs 8
<zid> oh he said system
<zid> I assumed he said 32bit and didn't actually read it
<zid> tss is two slots
<Halofreak1990> yeah, and the normal segments are just the normal single slot
<heat> ah okay
<Halofreak1990> why couldn't they have made all GDT descriptors the same length? As if anyone writing a 64-bit system cares about a few extra bytes
<heat> because that's silly?
<zid> because it literally doesn't matter except for that one mistake you happened to make
<zid> once
<zid> you could have probably made it a constexpr type thing to give you the right answer
<zid> I actually index my gdt with [0], [1], [2] etc, you could enum those and have a macro that offsetofs it etc
<heat> c plus plus moment
<bslsk05> ​'ITTF Racket Control' by testingaccount2011 (00:10:35)
<mjg> watch the entire thing
<heat> how many times have you watched this?
gog has joined #osdev
Ellenor has quit [Quit: Bye Open Projects!]
<mjg> i think 2
<mjg> guy was born few decades too late
<mjg> would be A+ gestapo
<zid> mjg's favourite movie is The Lives of Others
<zid> It's a big fantasy of his to be a stasi agent
<sakasama> What happened to the good old days of text documentation with shoddily aligned images? :(
<geist> Oooh the smell of mimeographs
<heat> mjg
<heat> This particular magic number was chosen to work best on a Sun 4/260. */
<heat> #define MAX_THRESH 4
<heat> :))
<mjg> were.dat
<heat> glibc qsort
<mjg> ? :DD
<mjg> to be fair the comment may be stale
<mjg> ... and it is not
<mjg> comes with
<mjg> commit 28f540f45bbacd939bfd07f213bcad2bf730b1bf
<mjg> Author: Roland McGrath <roland@gnu.org>
<mjg> initial import
<mjg> Date: Sat Feb 18 01:27:10 1995 +0000
<mjg> lmao
<mjg> gg
<mjg> i'll submit a PR to add: /* XXX what about vax? */
Burgundy has joined #osdev
<zid> send a bugrep that it's a bad value for your casio watch
dayimproper has joined #osdev
<zid> and that it's a much faster machine
teroshan9 has quit [Quit: The Lounge - https://thelounge.chat]
teroshan9 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!]
Ellenor has joined #osdev
alpha2023 has joined #osdev
teroshan9 has quit [Quit: The Lounge - https://thelounge.chat]
teroshan9 has joined #osdev
teroshan9 has quit [Client Quit]
teroshan9 has joined #osdev
teroshan9 has quit [Client Quit]
teroshan9 has joined #osdev
teroshan9 has quit [Client Quit]
teroshan9 has joined #osdev
teroshan9 has quit [Quit: The Lounge - https://thelounge.chat]
teroshan9 has joined #osdev
teroshan9 has quit [Client Quit]
teroshan9 has joined #osdev
teroshan9 has quit [Client Quit]
biblio has joined #osdev
teroshan9 has joined #osdev
teroshan9 has quit [Quit: The Lounge - https://thelounge.chat]
teroshan9 has joined #osdev
dayimproper has quit [Ping timeout: 250 seconds]
<heat> mjg, ok time to actually shoot the shit
<heat> linus himself just merged a bunch of changes on x86 memcpy
<heat> :v
<mjg> end of an era
<mjg> lemme see
<bslsk05> ​git.kernel.org: kernel/git/torvalds/linux.git - Linux kernel source tree
<heat> this is wack?
<bslsk05> ​git.kernel.org: kernel/git/torvalds/linux.git - Linux kernel source tree
<mjg> e
<mjg> ye it's whack
<mjg> wack
<mjg> i'm confused where htey got the idea that 64 is the cutoff
<mjg> they are pretty consistent about it
<heat> cutoff for what?
<mjg> mov vs rep
<heat> isn't that the case for fsrm?
<heat> whereas for non-fsrm it's more like 256 or 384
<mjg> for fsrm it may happen to be, but they roll with 64 for everything
<heat> i can't find any lkml thread on this
<heat> was this done in fucking secret??
<mjg> afair he wanted to make it so that all memset uses compile to a spot which can be hotpatched to either rep or do a func call
<mjg> which is mostly pessimal, regardless whether you do fsr* or not
<heat> no, that's ok
<mjg> for example sorting out 16 bytes will be faster to just do 2 movs and be done with it than spinning up rep
<heat> because the hotpatching thing can be used for proper function alternatives
<mjg> i am saying the call site will be faster with 2 movs than 1 rep mov
<mjg> for an example like the above
<heat> whether they fuck with rep or do if (ERMS) erms(); else normal();
<heat> yes, obviously
<mjg> and to my understanding he forces rep or a func call
<mjg> => pessimal
<heat> yes, that's wrong
<mjg> going to sleep mate
<heat> so early?
<heat> oldie
goliath has quit [Quit: SIGSEGV]
zxrom_ has joined #osdev
zxrom has quit [Ping timeout: 264 seconds]
innegatives has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
elastic_dog is now known as Guest6438
Guest6438 has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
<mrvn> can't we just make rep faster?
[itchyjunk] has quit [Remote host closed the connection]
[itchyjunk] has joined #osdev
Piraty has quit [Quit: -]
innegatives has quit [Quit: WeeChat 3.8]
<immibis> no because you do not work at intel
<immibis> mjg: guess they are anti-vax
Halofreak1990 has quit [Quit: Konversation terminated!]
dayimproper has joined #osdev
dayimproper has quit [Ping timeout: 268 seconds]
nyah has quit [Quit: leaving]
dutch has quit [Quit: WeeChat 3.8]
wlemuel has quit [Ping timeout: 268 seconds]
wlemuel has joined #osdev
Matt|home has quit [Quit: Leaving]
Piraty has joined #osdev
dutch has joined #osdev
slidercrank has quit [Ping timeout: 260 seconds]
warlock has joined #osdev
biblio has quit [Remote host closed the connection]