<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
<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]
<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
<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]
<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