#MINTIA (not vibecoded)

1 messages ¡ Page 27 of 1

twilit smelt
#

its wikipedia its not a billboard

twilit smelt
#

thats not that big

#

i could lift that

#

small computer really

#

(DEC Alpha mainframe from 1992)

shadow ridge
#

looks like a fridge

balmy zealot
#

I see, it turns out the boundaries are softer than I thought. Thanks.

twilit smelt
#

i need to make a logo for XRSI or XR/corp or whatever its called

#

ive wanted to do some aesthetic work for a while an d i think today may be the day

twilit smelt
#

i want the firmware to draw a cool sidebar containing various system info which OSes avoid drawing over until their DE is ready to come up

#

mock up

#

much more stuff will be in that sidebar like (complete list):

  • XRSI logo
  • representation of the system its running on (thats the only thing there in the mockup)
  • rectangles for each of the NUMA nodes which say "NODE 0: 4096KB" or however much memory
  • NUMA node rectangles also contain little icons for each of the CPUs which start out saying "IDLE" until kicked by the system software at which point itll say "ACTIVE"
balmy zealot
#

Does your hardware platform support NUMA?

twilit smelt
#

yeah

#

i dont simulate the latency yet though

balmy zealot
#

I'm curious to know whether you break the nodes down into subnodes or not

twilit smelt
#

i do not

#

its up to 4 nodes with up to 4 processors each

twilit smelt
#

on the software side itd probably be a good idea to stop conflating kernel nodes with hardware nodes

#

having a different number of virtual nodes than physical nodes could be desirable for scalability

twilit smelt
twilit smelt
#

hmm maybe the sidebar should be on the left

shadow ridge
#

make it float around like a dvd screensaver

twilit smelt
#

left is WAY better

#

if you have a portrait display it puts the sidebar at the bottom

#

ignore the text being weird thats just placeholder text until theres a bitmap to draw there

#

hmm itd be cooler at the top tho

#

top looks stupid too

#

so i just made it always be on the left

twilit smelt
#

drawing run length encoded xrstation image

#

the rom is only 128KB so this is actually quite difficult to fit

#

luckily it seems it would actually look better if that bitmap were a bit smaller

#

so thats an easy way to save space

warm mural
#

dunno if that might help but there are simple compressed image file formats

#

like qoi

#

dunno how much space that will save you though

twilit smelt
#

it says its usually worse than png and the png of that is already 25k

#

my RLE is 8k

#

sooo

#

thas not surpsoed to hapen

twilit smelt
#

@icy bridge when im done with this it would b sick if you modified your linux port so that the video terminal stays out of the way of the firmware's sidebar, the idea is that it stays visible until the OSes desktop environment comes up, so like a boot log or early terminal would ideally not obscure it

#

i think it would look really cool

#

when its done itll like display the name of the booted OS, the status of all the processors, etc

#

and a bitmap image of the computer its running on

twilit smelt
shadow ridge
# twilit smelt

cant you make a vectorized version of that and render that instead

icy bridge
#

i think the way you're supposed to do that kinda thing with linux is using a non-verbose boot (which makes it not touch the framebuffer at all)

warm mural
#

Looks cooler bitmapped

icy bridge
#

but I'll look into it

shadow ridge
twilit smelt
#

theres gonna be some new entries in the device db struct for the width and location of the sidebar so you know what to stay out of the way of

twilit smelt
#

i have a good rle

#

about to get better i just had a good idea

shadow ridge
twilit smelt
#

it was 8k now its 5k and with this next change i wonder if i can get it to 3k

#

also i realized the fonts encode a bunch of glyphs for ascii codes >=128 which i dont need and can trim off

icy bridge
dense vigil
#

also its like mostly a black rectangle so ofc rle wins here

twilit smelt
#

its fun actually

dense vigil
#

do u compress the color somehow?

#

u can probably use a 1 bit palette lol

twilit smelt
#

its more about reducing the metadata but im going to do that too

twilit smelt
#

that would look rly bad

shadow ridge
#

2 bits

twilit smelt
#

the antialiased pixels r important

#

theyre all grey

#

here

dense vigil
#

ah ok

twilit smelt
#

so like i could do a 16 bit palette of greys

#

or something

#

and in fact im going to look into making each rle image encode a palette beforehand and then use indices into the palette

shadow ridge
#

i see like at most 8 colors there

#

cant u do antialiasing afterwards

short owl
#

They're saying they might want more color for later

shadow ridge
short owl
#

I'd say 16 colors are more than enough to make this kind of thing

shadow ridge
#

hmm

#

what if u used like 4 colors and dithered it afterwards

twilit smelt
#

overcomplicated

shadow ridge
#

actually if you dont do RLE and use 2 bit colors you still get like 16 kib per 256x256 image

#

hmm

short owl
#

I got a crazy overcomplicated idea for compressing this kind of image

#

But i better shut up meme

twilit smelt
shadow ridge
#

dont you dare say it

twilit smelt
#

ignor him

shadow ridge
#

ignore this guy he doesnt know what he's talking about

#

he's happy with his RLE that can only do like 5 kib

#

let him live in blissful ignorance

short owl
#

Okay but hold up i'm doing something rn

twilit smelt
#

my current idea im doing is runs of runs

#

metaruns

delicate dome
short owl
#

So since this image is mostly just big areas of one single color you could fierst break it into a grid of square cells of k size on each side and start merging cells that don't have any sub-cell details (so they're just one solid block of some color) into rectangular or square cells and on cells that do have sub-cell details you could do normal rle

#

(you can do the merging in blth dimensions)

warm mural
#

lz4 it

#

Not that hard to implement and very good

short owl
#

This will probably save up a lot on images that aren't too noisy overall

short owl
twilit smelt
#

thats an interesting buge

twilit smelt
#

but ur right its overcomplicated lol

#

decodes into this

twilit smelt
#

kind of a cool looking bug

#

waoe

#

woohoo

#

down from >8k with the original rle

warm mural
twilit smelt
#

i got it down to 2k by encoding all the colors as 4 bit indices into a palette

#

and all of them are packed at the start

#

the run control bytes come after

#

format:

- offset to run control bytes from start (2 bytes)
- 4-bit palette (16 bytes)
- nibble pool (N bytes, packed 4-bit nibbles)
- run control bytes (M bytes)
mortal thunder
twilit smelt
#

thats only 500 bytes worse than DEFLATE gives me btw

mortal thunder
#

like framebuffer->start += x * sizeof_pixel; framebuffer->width -= x;

mortal thunder
#

bytes of the format xy where x is between 1 and 15 (pixels) of palette index y

#

and 0y xx where x is the length + 15 and y is the palette index

twilit smelt
#

my runs look like this

--   7   6   5                             0
-- +----------------------------------------+
-- | L | G |             LENGTH             |
-- +----------------------------------------+
-- |                LENGTH                  |
-- +----------------------------------------+

where the first byte contains the low 6 bits of the length biased by -1 (so a zero means length of 1), G=1 means the run is a run of one nibble from the pool, G=0 means the run is a run of consecutive literal nibbles from the pool (this is used when theres a failure to compress due to a long series of un-alike pixels), and L=1 means the length is greater than 64 and therefore the second byte is needed

#

if L=0 then the second byte doesnt appear and the run is encoded in a single byte

#

the lua script i wrote for encoding this is 200 lines

#

and is extremely ugly

#

ive heard of using a bitwise RLE for encoding bitmap fonts and in fact this is how fonts were encoded in the original macintosh's rom for example

#

im not gonna bother with that lol

#

bitwise RLE is really easy though actually

#

@warm mural @mortal thunder do either of you know what the easy way to do bitwise RLE is

#

without googling

#

if you google youre lame

mortal thunder
#

which is that you specify the length of the next run, start at 0 and switch between 0 and 1

#

so like 00 05 06 07 decodes into 111110000001111111

#

(i swear i havent googled it, i just kinda remembered something associated with how the original GB pokemon games store their character sprites)

twilit smelt
#

yeah inversion points

mortal thunder
#

like if your fonts are 5x8 for example there's little need at all

#

you can get the same storage capacity in 5 bytes

rare epoch
mortal thunder
#

without even needing to compress them

mortal thunder
#

i wasnt gonna type 240 ones and 255 zeroes to demonstrate it better

rare epoch
#

are those cases even common though? I’d have thought normal data wouldn’t have such regularity, at least color data
what would it be used for?

twilit smelt
#

i think apple's encoding was more like this

  7  6        4  3  2        0
+---+----------+---+----------+
| S |  Length  | S |  Length  |
+---+----------+---+----------+

where it was packed so that the run lengths were 3 bits (1-8) and the S bit decides whether you actually invert or not

mortal thunder
#

this might work better for smaller fonts

#

than what i thought

twilit smelt
#

so your example would be encoded as

1 100 1 101 1 110

which is 12 bits to encode 18 bits, a win

short owl
warm mural
#

iprogramincpp's way seems better

twilit smelt
twilit smelt
#

visual console continuity into mintia2

#

dont be fooled the firmware is DEAD! by then and gone

#

none of it is left

#

this is a visual trick to be pretty

#

fireworks

#

made it so the crash screen 'shutter' effect doesnt shutter the firmware side box

#

the fonts dont need to match up for the console continuity to work because the cursor is reported as pixel coordinates rather than character coordinates, so it is font agnostic

#

theres mintia2 using sun gallant demi while the firmware console was using haiku console font

rare epoch
#

it looks really cool

#

idk what else to say

#

I like how much larping you do (in a literal sense, not in a derogatory way), it gives the project a lot of character

ocean valley
#

quite cool indeed :3

warm mural
twilit smelt
warm mural
#

Like having the picture of the machine

twilit smelt
#

i made that up

warm mural
#

In the firmware

twilit smelt
#

i made the image with google sketchup

#

plus a bunch of scripts to RLE encode it

warm mural
#

Yeah but the concept didn't already exist right

twilit smelt
#

it didnt

#

ive never seen it at least

warm mural
#

yeah ok

twilit smelt
#

its the same image used on the cover of the handbook

warm mural
#

It looks cool

twilit smelt
warm mural
#

Gives me next vibes

#

The firmware

rare epoch
#

My only criticism is that what’s the point of it? Like it takes away usable space just to be able to display a cool image

twilit smelt
rare epoch
#

oh I see

twilit smelt
#

and also it will go away when the DE is up

#

itll only be there during boot logs and like text mode use of the OS

warm mural
#

Are you gonna bring back the mintia console eventually

twilit smelt
#

yeah its only gone bc i dont have an IO system yet lol

#

itll also position itself in the middle of the rectangular area to the side of the sidebar to avoid obscuring it

rare epoch
#

when is my kernel gonna be cool like that death

#

i feel like there is like several months before I can start running DOS apps on top of it

warm mural
#

Too much clutter maybe

twilit smelt
#

it will look good

#

its not necesarily gonna look exactly like the old mintia console did

cursive charm
rare epoch
#

it is a DOS based OS

#

maybe i should’ve made an OS/2 clone instead

#

given how it was meant to be a “better Windows than Windows”

#

I don’t know anything about OS/2 design or internals though

cursive charm
#

i haven't looked into OS/2 or win9x much

rare epoch
#

like one of the design requirements of my OS that everything uses DOS

#

drivers, IO etc all done through DOS and BIOS

#

which I know is bad design

#

because even Windows 3.1 realized this was a bad idea and shipped 32-bit disk drivers

#

but I want to rely on DOS as much as possible

cursive charm
#

i thought that was a windows for workgroups 3.11 thing

rare epoch
#

I don’t think so

#

I honestly think my idea is so cool

#

I hope the execution ends up being well

warm pine
#

it is quite unixlike in architecture

twilit smelt
#

dont think thats normal

mortal thunder
#

theyre like boxed in

mortal thunder
twilit smelt
#

long time ago

#

wanted to be able to see logs and stuff while theyre going

#

there are no fewer particles the view port is just smaller

warm mural
#

poor fireworks

#

they're trapped...

rare epoch
#

and with memory protection it’s not that bad

#

like the biggest issue is that a lot of IO operations are going to be slow

cursive charm
#

i think i've once heard of someone who really loves win9x and doesn't like NT, lol

#

yes, apparently, a "poorly written driver" can easily bring down NT, but not win9x somehow, according to this framing

cursive charm
#

i could link the whole video, but even in context, this just felt really odd to hear the first time i watched it

#

i guess they were sick of people claiming NT4/2000 was infinitely more reliable than contemporary versions of 9x?

rare epoch
#

honestly the more I learn about how 9x the more I appreciate it

#

I don’t think it’s as much of a hack as people claim / think, it’s a proper 32-bit multithreaded operating system that rarely uses DOS for anything and nicely extends it

#

it has some really major protection issues like exposing IDT but those are due to silly backwards compatibility reasons

cursive charm
#

i'm curious to see how its dynamic linker works

#

supposedly, its implementation of ExitProcess() didn't terminate all but the calling thread prior to performing process shutdown as opposed to NT

#

that, or raymond just said it worked different from NT somehow

rare epoch
#

It’s literally a full 32-bit preemptive multithreading kernel with memory management and stuff

#

(in enhanced mode)

warm pine
#

by any measure windows 9x is a wonderful design given the extreme path-dependence it had to contend with

rare epoch
#

I love 9x

cursive charm
rare epoch
#

yeah, but it’s way less true for something like 3.1 enhanced mode

rare epoch
#

instead of shipping its own drivers

#

but other than that I’m trying to be similar to 9x design

warm pine
rare epoch
#

currently there is nothing you can see - no interface and no apps for it, I’m focusing on the basics of the kernel before those
there isn’t even a crash screen or kernel debug output

it isn’t anywhere near being ready

#

but I had posted an old source code dump here:

#

#lounge-0 message

#

I tested it from kernel space (and user space) and I could use DOS/BIOS for IO and drivers, so the basic idea works

#

I’m now rewriting major parts of it to be more robust and support running DOS apps on my OS

#

if you want to compile it you need to use OpenWatcom in DOS, run “windy” to enter the kernel (just like how you run win to enter Windows 3.1)

#

Anyway I shouldn’t be talking about this here, if you want to continue you can comment on my thread - it’s also here, search for the name Windy

#

I feel like I hijacked @twilit smelt’s thread which is not nice

#

to hyenasky - I’m sorry for hijacking your thread to talk about my project, won’t do that again

rare epoch
#

yes

mortal thunder
#

Like, destructors get called even while other threads are still running and stuff

cursive charm
#

i was talking about win9x, not POSIX

#

win32 isn't POSIX, so i don't get how that's relevant

mortal thunder
#

I'm just saying that the "other" design also doesn't handle the case where you have other threads running and you call exit

cursive charm
#

well, i only brought it up because NT doing it was a point of criticism from a project on github that i was researching

mortal thunder
# cursive charm that, or raymond just said it worked different from NT somehow

https://devblogs.microsoft.com/oldnewthing/20070503-00/?p=27003 i think this is the article you're taking about

Exiting is one of the scariest moments in the lifetime of a process. (Sort of how landing is one of the scariest moments of air travel.) Many of the details of how processes exit are left unspecified in Win32, so different Win32 implementations can follow different mechanisms. For example, Win32s, Windows 95, and Windows NT all shut […]

cursive charm
#

yeah

rare epoch
#

I love Raymond Chen articles

cursive charm
#

apparently, this was the only part of the document i could find regarding how the "other" design handles process shutdown:

The GNU loader doesn't implement any such startup performance hack to forgo locking on process startup. The absence of any such mechanism by the GNU loader enables threads to start and exit at process startup or within a module initializer. The same is true for process exit. Therefore, the GNU loader is more flexible in this respect.

#

simply put, there's too much from the document alone i could try to pick apart without starting a whole new thread

twilit smelt
#

displaying the name and boot badge of the booted OS on the sidebar

#

yea or nay

mortal barn
#

looks pretty cool actually

cursive charm
#

yea

twilit smelt
#

need to make little bitmaps to represent CPUs now

icy bridge
#

oo thanks

twilit smelt
#

This Could Be You! (jerry rigged to display tux bitmap and say linux)

dense vigil
keen stone
#

why does it look so sexy

twilit smelt
#

so thatd be hard

#

itd have to be in there

dense vigil
#

hm

#

i guess it can only be pre-baked then

twilit smelt
#

i have to make a 40x64 CPU icon now

twilit smelt
#

40x64 cpu icon got hands

rare epoch
#

out of curiosity is this project really NT inspired?

twilit smelt
rare epoch
#

hating NT should be a bannable offense trl

cursive charm
#

i love NT when i don't have to think about win32

twilit smelt
#

this is the little cpu icon i settled on

#

pointing out that its a risc cpu is part of the 1989 larp

#

they couldnt stop saying risc back then

#

they stay grayed out except processor 0, to indicate they r idle

#

until they are IPI'd for the first time and then they color themselves in

#

to indicate active

#

the code for this sidebar stuff is some of the gnarliest ive ever written

#

only two things left

#
  1. new boot picker
  2. XRSI logo needs to be designed and put somewhere
#

but rn i need to take a break to get a bit of homework done

#

well ill do the boot picker first so that it reaches functional parity with the old gui and i can merge it

twilit smelt
rare epoch
#

firstly that UI is so nice

#

secondly this feels like NT

dense vigil
twilit smelt
dense vigil
#

Did they actually have numa nodes back then and were they really that tiny

twilit smelt
dense vigil
#

Also why risc cpu and not the actual xr cpu name

twilit smelt
#

this is not a sane config lol

dense vigil
#

Oh ok

twilit smelt
#

its just a result of me putting -cpus 16 at the command line without putting a proportional amount of ram

#

they did have numa nodes

#

one of the AViiON systems was a 16 processor m88k machine with two numa nodes each with 8 processors i believe

dense vigil
#

And how much ram

twilit smelt
#

that was 1992

twilit smelt
#

probably like up to 1gb

#

(a lot for the time)

dense vigil
#

Yeah

dense vigil
twilit smelt
#

bc XR already appears too many places on that screen

twilit smelt
dense vigil
#

Oh ok

shadow ridge
#

risc of rain 2

dense vigil
#

Because u did have a prettier pic on the readme

shadow ridge
twilit smelt
shadow ridge
#

like you use the same firmware

#

to boot both

#

in the emulator

twilit smelt
#

this firmware has to chain load the old firmware to boot mintia1

dense vigil
shadow ridge
#

isnt that like

#

too hacky

dense vigil
#

Backport mintia1 to new firmware

shadow ridge
#

^

twilit smelt
#

no its way simpler lol

shadow ridge
#

yeah but they wouldnt do shit like this in the 80s

#

or would they

twilit smelt
#

yes they would

rare epoch
twilit smelt
#

that literally is how NT would boot on some systems

rare epoch
#

it reminds me of third party CSM modules

shadow ridge
rare epoch
#

yes autocorrect

twilit smelt
#

also mintia1 is not the only OS that relies on the old firmware

#

theres also aisix

#

it chain loads it to boot both of those

shadow ridge
rare epoch
#

idk
maybe it thought it was a name

warm mural
#

aisix revival when

rare epoch
#

AIsix

#

AI OS

twilit smelt
shadow ridge
#

so theres the XRfirmware

#

that chainloads LIMNfirmware

#

that boots aisix

warm mural
#

Way better than mintia2 even

shadow ridge
#

is my understanding correct

twilit smelt
twilit smelt
#

i ahvent tested that in forever though

#

every time i test it i have to update the extremely ancient lua emulator with whatever platform changes occurred

rare epoch
shadow ridge
rare epoch
#

Isn’t computercraft like a Minecraft mod that lets you run Lua

shadow ridge
#

yes it is

twilit smelt
#

yeah

rare epoch
#

how can it run an OS

shadow ridge
#

you make it run the emulator

#

thats how hyena got into this shit iirc

rare epoch
#

😭

twilit smelt
#

this project started when i was a preteen on the computercraft forums ppl kept saying "its impossible to write a real OS for computercraft. you can only write a replacement shell." and i decided to prove them wrong by writing an emulator for a custom ISA, in lua ofc, and then writing a "real OS" for that

#

and it just kept growing until it outgrew computercraft

#

so i ported the lua emulator to use love2d

#

and then that got too slow eventually

#

so i rewrote the lua emulator as the C emulator

#

and thats where we are now

#

11 odd years later

shadow ridge
twilit smelt
#

the one-to-one rewrite of mintia1 in jackal that i was working on was going to boot under a4x directly

#

but it started to dawn on me how vast mintia1 was and that that was going to take me months so i gave up

#

directly rewriting 120k lines isnt a cake walk

shadow ridge
#

The MINTIA operating system provides an environment suitable for use in a range of systems, from single-user desktop workstations to minicomputers supporting dozens of concurrent users. It does this while retaining performance and reliability.

#

shouldnt it be the other way around

twilit smelt
#

?

warm mural
#

minicomputers are big despite the name

#

the pdp11 was a minicomputer

twilit smelt
#

yeah minicomputers are the size of fridges

shadow ridge
#

oh

twilit smelt
#

hence the term microcomputer

#

smaller than a minicomputer

#

your pc is a microcomputer

shadow ridge
#

is my phone a femtocomputer then

#

or nanocomputer maybe

#

lol

twilit smelt
#

80s terminology:
computer = size of a room
minicomputer = size of a fridge
microcomputer = fits on a desk

shadow ridge
#

so what would a single user desktop workstation be

#

a minicomputer

#

or like a computer

twilit smelt
#

a microcomputer

shadow ridge
#

okay right

#

wait aisix is a unix

twilit smelt
#

only if you stretch the definition of unix

#

it was my first semi-viable preemptive multitasking os project ever

#

2020

shadow ridge
#

it takes forever to compute fibonacci sequences

twilit smelt
#

non memoized

#

so yeah

shadow ridge
#

where is the page file on aisix

#

i cant find it

twilit smelt
#

it did not swap

#

includes the earliest comment documentation of my attitude toward swapping

#

17 yr old me wrote that

#

godspeed to him

warm mural
#

Did you take this comment syntax from OCaml

#

I've never seen it anywhere else

twilit smelt
delicate dome
twilit smelt
#

1990*

delicate dome
#

oh

#

i see

#

How far is MINTIA2 progressed, anyway?

#

I know old MINTIA had a whole userspace running right?

twilit smelt
#

this is what a crash look like now btw

twilit smelt
delicate dome
#

What was RAM limit again?

twilit smelt
#

@icy bridge this is all pushed so if you wanna try to get linux looking good its stable now

delicate dome
#

16 MB or smth?

twilit smelt
#

256MB

#

thats for a fully loaded "xr/frame"

delicate dome
#

That number's definitely higher than last time I asked meme

twilit smelt
#

xr/station is up to 32mb for 1 node

#

its not

#

its been 256mb since 2018

#

so thats unlikely

#

its 4mb by default

#

4mb 1 processor would be a typical config youd come across

rare epoch
#

are the CPUs 32-bit or 64-bit

twilit smelt
#

32 bit

delicate dome
#

What kind of virtual memory does this do? Radix tree paging?

twilit smelt
delicate dome
#

Oh interesting

#

So like MIPS where software decides what page maps are

#

That makes the CPU a lot easier

short owl
#

I still don't get how these things work lol

delicate dome
short owl
#

Ah

#

So the software is the one that determines the page tables

delicate dome
#

yes

short owl
#

Well that definitely is easier than making a hardware page table walker

delicate dome
#

yes

#

but less efficient

short owl
#

I mean that's why we have the TLB

delicate dome
#

No I mean

#

Both have the TLB

#

But the mere fact software is bothered to fill it, makes it way slower than a hardware page table walker would be

twilit smelt
#

The software refill on many risc chips was famously faster than the hardware refill on x86 for some time

#

Partly because x86's walker couldn't take advantage of software optimizations

delicate dome
#

i.e. describing mappings in a more compact manner in the TLBs?

#

causing fewer faults?

short owl
#

Hmmm, and what happens when you try to access a page that isn't on the TLB at the time, does the cpu raise a fault so the software fills some entry?

twilit smelt
delicate dome
#

Well what I can confidently say is that on modern CPUs hardware walkers are everywhere for a reason

delicate dome
twilit smelt
twilit smelt
# delicate dome google has become literally useless... what is that?

It's where when you take a tlb miss exception, you try to grab the PTE directly from a recursive mapping of the page tables. If the containing page table is in the TLB already, then you get the PTE right away and don't need to walk the rest of the levels. Otherwise you take another TLB miss on it and that time you end up looking at the PDE, and so forth until you get to the top level table which is anchored in place with a "wired" TLB entry that is never replaced

#

This works bc of how recursive mapping works which I won't explain

#

if u don't know alrdy

#

but basically this saves you from having to look up the upper levels of the page tables

#

most of the time

delicate dome
#

I know recursive mapping

rare epoch
#

Software TLB feels ugly

#

I think caches like this should be mostly transparent to user

mortal thunder
#

User mode never sees such caches

rare epoch
rare epoch
#

out of curiosity does software TLB mean the OS can implement its page tables in any format it desires?

rare epoch
#

cool tbh

icy bridge
#

yeah but there's usually no reason to use anything other than the CPU's tlb entry format

shadow ridge
#

(well by page table i mean radix tree)

twilit smelt
#

it feels imbalanced to have the console text and the sidebar stuff all putting so much visual weight on the left

twilit smelt
#

who is using the chip

warm pine
#

i have to admit the idea is quite a nice one

#

and since all monitors are widescreens today i might or might not copy the sidebar idea for the keyronex console

#

but i'd add an analogue clock, that would add a classy touch, like a lexus dashboard

twilit smelt
shadow ridge
#

what if the TLB refill routine used a random number generator to decide the entries' page frame addresses

short owl
# twilit smelt

Btw is it the firmware or the kernel itself the one that starts the other cores?

shadow ridge
#

why would the firmware start the other cores

twilit smelt
#

the kernel IPIs them (using a firmware interface) to get them to start executing kernel code

shadow ridge
#

how do you decide the start PC then for each core

twilit smelt
#

they all start at 0xFFFE1000

#

which is part of the boot rom

shadow ridge
#

so the code there does a check like if(WHAMI != 0) while(true) hlt();

twilit smelt
#
FwxReset:
.global FwxReset
    // Zero out RS.

    mtcr rs, zero

    // Invalidate the caches.

    li   t0, 3
    mtcr icachectrl, t0
    mtcr dcachectrl, t0

    // Set our exception block.

    lui  t0, zero, 0xFFFE0000
    mtcr eb, t0

    // If we aren't processor zero, go to the MP corrall and wait for an IPI.

    mfcr t0, whami
    bne  t0, .mp_corrall

    // Reset EBUS to quiescent state.

    la   t0, 0xAABBCCDD
    mov  long [0xF8800000], t0, tmp=t1

    // Set the initial stack pointer to 1024 bytes.

    li   sp, 0x400

    j    FwReset

.mp_corrall:
    // Set the stack pointer to 0x400 + (320 * id).

    li   sp, 0x400
    add  sp, sp, t0 LSH 8 //  + 256 * id
    add  sp, sp, t0 LSH 6 //  + 64 * id

    mov  a0, t0
    j    FwProcessorStartup
short owl
twilit smelt
#

thats the reset code

twilit smelt
twilit smelt
#

actually it has the processors update the icon before they jump to the OS-specified entrypoint

#

so it only gets updated if the processor itself woke up correctly

shadow ridge
#

what is EBUS btw

twilit smelt
#

the system bus

shadow ridge
#

and what does it do

short owl
#

Busing around

twilit smelt
#

from the fantasy hardware perspective i suppose it would be a complex protocol of electrical signals over copper traces and a slot form factor and so on

#

(bus)

shadow ridge
#

for a second i thought it was like the equivalent of PCI

#

for your thing

twilit smelt
#

i mean it is

#

its less fancy but thats basically what it is

shadow ridge
#

oh

#

if they make a C compiler for limnstation ill port my kernel to it

twilit smelt
#

there is one

#

monkuous ported linux to it using that

shadow ridge
#

holy shit

#

it boots?

twilit smelt
#

did you not know that

shadow ridge
#

no

#

or i forgot maybe

twilit smelt
#

boots and runs bash and glibc

shadow ridge
#

shouldve ported neofetch

#

thats incredibly cool ngl

#

why does it say This architecture does not have kernel memory protection

twilit smelt
#

idk

#

i think it means monkuous compiled it with kpti disabled

#

or something

#

the coolest thing about it for me is that it is the ultimate vindication that my fake computer is a real computer

#

real enough to boot linux

#

and also its gratifying to see linux running atop my tlb refill scheme

shadow ridge
#

this also means your emulator doesnt have like

#

any major bugs that linux could trigger

twilit smelt
#

i mean last time monkuous worked on it linux did crash randomly but he thought that was more likely his fault than mine

shadow ridge
#

oh

twilit smelt
#

its probaly not my fault because mintia1 should have exercised the probably related emulator components like cache and mmu enough to weed out any bugs linux could be triggering

warm mural
#

and the borders are much nicer than before

mortal thunder
# twilit smelt

i cant wait until you start working on a window system for mintia

#

i know its like

#

a couple years away probably

#

(pessimistically speaking)

#

but i can't imagine it looking anything less than great

twilit smelt
#

Someone enlighten me on the state of the art in slabs and magazines

rare epoch
#

the two words I don’t want to hear again

twilit smelt
#

That's not the state of the art

#

That's the like origin of the art

short owl
twilit smelt
#

I've been checked out somewhat while @warm pine and @warm mural have been studying it and have missed out on most of their cool findings

#

Ik abbix has a cool bitmap thing

dense vigil
warm pine
#

They implemented them ages ago in what they called their "SLAB" allocator, then someone said "SLAB has too many queues and too much per CPU, let's replace it with SLUB which won't have either", then SLAB disappeared, and now magazines have been reimplemented exactly per Bonwick and Adams

dense vigil
#

there's also SLOB for embedded systems

warm pine
#

In a cryptic move they've called their "magazines" and "depots" as "sheaves" and "barns" respectively

warm mural
#

Like freebsd

#

It has kegs and buckets

warm pine
#

The analogies are always so interesting

raven drift
#

i don't get this desire to rename existing concepts

#

In my experience, this is usually a sign that the author of the code does not know the state of the art very well

warm mural
#

I renamed caches to zones (as per freebsd naming) because it makes more sense imo

coarse current
rare epoch
coarse current
#

yeah

warm pine
rare epoch
#

maybe they rediscovered it somehow?

warm pine
#

He only later when quizzed about the name revealed he had implemented them as per bonwick and Adams' 2001 paper

rare epoch
#

oh

#

tbh I don’t like the names in the original paper

#

too fancy

warm pine
#

I forgot why or if he said why he changed the name. But I think he said somewhere that magazine mighy be evocative of rifles, which is culturally insensitive to the people of the USA, where they have numerous school shootings as well as many other kinds of shootings

#

In USA they have strong feelings about whether these shootings should contikue and - you guessed it - if you have a difference of opinion with your interlocutor, it could end in tears and a bullet (just ask Charlie Kirk) But it still feels extreme to purge any word that can be associated with firearms from the kernel

twilit smelt
#

Crazy Charlie Kirk came within 10 miles of me and that happened to him right after

dense vigil
#

wdym by came

shadow ridge
#

he was in utah

dense vigil
#

oh

shadow ridge
#

they got that shooter for attempted murder right

#

okay nvm this joke is getting old

twilit smelt
#

Got an evacuation order bc they found a gigantic cache of explosives

shadow ridge
#

what the fuck

#

only in utah 😭

dense vigil
twilit smelt
rare epoch
#

oh AT&T

#

so USA

#

where?

dense vigil
twilit smelt
raven drift
mortal thunder
#

also what does 2000 feet of 1100 W 1400 N mean

#

are people expected to know their precise geolocation in degrees on the meridians/parallels?

craggy spire
#

I'd guess those are street names

mortal thunder
#

lol

#

all i know is that the 45th parallel cuts through my country

#

middle, slightly south

warm pine
shadow ridge
#

south lake city. more like south 12.32 east 12.75

#

or something idk

warm pine
#

glasgow is one of the poster boys of this movement

#

the americans were very influenced by our ideas so they built their cities on grids

mortal thunder
#

i thought the americans were the ones who started that trend

#

lmfao

warm pine
#

so you can just locate yourself by a coordinate relative to some centre point

shadow ridge
#

i wonder what the most efficient road layout would be for a given amount of buildings and the average traffic for each one in a city

warm pine
#

aberdeen has a more ignoble claim to fame, they filmed some scenes here which were intended to be set in the late soviet union!

mortal thunder
#

i feel like if let loose our former communist regime would've done something similar

twilit ingot
warm pine
#

there is an apple film about tetris and you'll find the headquarters of the firm is in fact the zoology building of the university of aberdeen

mortal thunder
#

but ceaushima wasn't so bad as to warrant redrawing streets

shadow ridge
twilit ingot
#

it's not

shadow ridge
#

but it's just a feeling idk how to prove it

twilit ingot
#

some guy on yt did a vid about it

shadow ridge
warm pine
shadow ridge
warm pine
#

milton keynes is grids within grids but it's really the separation of pedestrian from motor traffic that works for both of them

warm pine
shadow ridge
#

if you stopped whatever you're doing and just stared at a wall for 1 minute each day, that would feel worse than the same thing but done for a single second at a time, 60 times a day

warm mural
warm pine
#

in any case living in cumbernauld probably feels a bit like doing that 24 hours a day

shadow ridge
#

i know this place

#

it's from silent hill 2

#

you cant fool me

warm mural
#

Looks like Harry potter

#

His house

#

A bit

shadow ridge
#

the houses there actually look good tho

warm mural
#

Yeah true

shadow ridge
#

this looks like brutalist crap

warm pine
#

some other districts of the town

shadow ridge
#

i get why they would want to film soviet movies in places like these

twilit ingot
#

all the houses are equal and grey

#

bruhh

#

it's hell

shadow ridge
#

these were probably built many decades ago

#

when brutalism was a thing

#

because people were like "wow what if we built like this, it would be so cool!" until they actually built it and realized it sucks ass

warm pine
#

it was the fashion until the 70s or so

#

milton keynes was built after that so it's much nicer

#

despite also being a town built practically out of nothing

shadow ridge
warm pine
#

it certainly seems like it would be difficult to model

#

and you have so many things to take into consideration

#

for example do you care how congested it gets if there's a football match? are you prepared to figure out how you ought to account for traffic from fans both home and away? what about other events?

shadow ridge
#

isnt it like any other algorithm

#

like even if the worst case is O(N^3) or whatever

#

you can still have an average O(N) ig

#

idk what that would mean for a road though

#

maybe you could always design for the worst case or design the roads differently for both the average and the worst

#

like making longer routes around the city for big events that have more capacity

#

idk im not a civil engineer

warm mural
#

it's just cheaper to build with concrete

shadow ridge
#

it's still cheaper, no?

#

you're still better off using basic geometric shapes and not doing any sort of outside facade work

#

money wise

#

and it's not like they were in the great depression either

warm mural
#

you were talking about brutalism as if people chose to do it because it looked good

twilit smelt
#

brutolesm

warm mural
#

lol remember brutal

twilit smelt
#

yeah they kept bragging about how they were 50k loc

#

remember when that was a lot

#

the osdev power scaling sure has gotten out of hand

delicate dome
#

50kloc isn't that huge, is it?

warm mural
#

idk if its even 50kloc

delicate dome
#

I know Managarm is way more

warm mural
#

having worked on it I highly doubt brutal is 50kloc

delicate dome
#

BadgerOS is about 50kloc ignoring headers

warm mural
#

nvm wtf

#

how

#

ah a lot of lines are from the math library

delicate dome
#

Oh that's funny

#

BadgerOS has gotton smaller in terms of loc

warm mural
#

and 50kloc is quite a lot

#

imo

#

at least for a solo project

rare epoch
#

it is yeah

#

my current kernel is still like 5k loc

delicate dome
#

damn

#

Guess I'm a certified masochist after all meme

warm mural
#

mine is ~11kloc right now and it doesnt do much

night needle
delicate dome
#

I was curious and Boa32, my RISC-V CPU, is 20kloc

shadow ridge
shadow ridge
#

which makes me realize i should work on it more

delicate dome
#

But same project

#

I wonder where all that asm comes from because I did not write that much

#

CPU itself is 4kloc

#

peripherals another 4.4k

delicate dome
#

It was counting the submodule riscv-tests (official RISC-V unit tests) as part of my project even though it isn't

mortal thunder
# night needle <:thinkong:815589724424241152>

if i count absolutely everything i can get pretty close ```/mnt/c/boron$ cloc --vcs=git .
552 text files.
529 unique files.
62 files ignored.

github.com/AlDanial/cloc v 1.90 T=13.76 s (36.7 files/s, 5232.0 lines/s)

Language files blank comment code

C 256 9366 6974 32605
C/C++ Header 176 3171 4143 10784
Assembly 16 321 500 1539
make 33 197 210 554
Markdown 4 169 0 483
C++ 6 70 45 317
Pascal 2 8 0 160
DOS Batch 3 26 5 116
Python 2 46 24 111
Bourne Shell 7 6 4 37

SUM: 505 13380 11905 46706
-------------------------------------------------------------------------------```

#

but theres a lot of external code and things

#

and the kernel is only about this many```
/mnt/c/boron/boron$ cloc --vcs=git .
279 text files.
278 unique files.
11 files ignored.

github.com/AlDanial/cloc v 1.90 T=1.83 s (146.1 files/s, 23908.4 lines/s)

Language files blank comment code

C 149 6130 4987 20402
C/C++ Header 101 2009 2707 4811
Assembly 12 286 463 1368
make 1 55 47 175
Pascal 2 8 0 160
Python 2 46 24 111
Markdown 1 12 0 44

SUM: 268 8546 8228 27071
-------------------------------------------------------------------------------```

#

also your directory structure is kinda fucked, why the hell are you using single character directory names

#

r/z/s/zinnia

#

just put them in like ~/src or ~/work or ~/projects

night needle
#

that's fish doing it

#

it's repos/zinnia/sources/zinnia

mortal thunder
#

what is fish and why does it do that

night needle
#

it does it so the path in your prompt isn't too long

mortal thunder
#

aha, so a path compression of sorts

#

imo if the path is so long that you need a shell to compress it you have bigger problems

night needle
#

not really

#

it always does it

#

it's just 4 components here

acoustic sparrow
night needle
acoustic sparrow
night needle
#

it's essentially projects/distro/sources/kernel

acoustic sparrow
#

the whole "(wayland)" part is just noise tho

night needle
#

that's the branch

#

it's useful info

acoustic sparrow
#

is that really that important lol

night needle
#

it helped me more than it has caused issues

acoustic sparrow
#

i see

#

the only thing like that in my prompt i actually have is the active direnv tbh

night needle
#

direnv?

acoustic sparrow
night needle
#

ah

acoustic sparrow
#

its useful if you are doing nix because it means you dont have to use their shitty bash setup

#

you just echo use nix > .envrc, direnv allow, and its all in path now

night needle
#

i like fish because it has really good completions most of the time

acoustic sparrow
#

fair

#

zsh has some weird bugs/issues (probably caused by my bad prompt) with completions

warm mural
night needle
#

yeah tbh that's its biggest downside

warm mural
#

I think zsh with oh my zsh gets pretty close to its functionality while still being POSIX

acoustic sparrow
#

i dont think zsh is posix?

cursive charm
#

it's POSIX-compatible, i'm pretty sure

acoustic sparrow
#

no its not

warm mural
shadow ridge
#

i just use bash

twilit smelt
#

im like gon freeccs if he were into hobby osev

twilit smelt
#

His head is remarkably flat

#

Especially with the ears going to the side

#

Enhances the flat appearance

#

Possibly a 99th percentile flat cat or more

shadow ridge
#

does he have a flat brain as well

blissful smelt
#

it's very fast and automatically recognizies .gitignore

#

it takes 4 seconds to count the linux kernel's loc compared to 4 minutes for cloc

warm mural
#

scc is pretty good too

#

i think tokei is pretty much just scc but rust

mortal thunder
twilit smelt
#

I came extremely close to failing my algorithms final just now

#

There were 4 questions and 2 hours

#

After an hour I'd answered two and was completely stumped on the others

#

I stared blankly at them with my panic increasing for like 45 minutes

#

Then for one of them I was suddenly like oh the solution is just a fucking knapsack problem with an extra loop at the end

#

Quickly scribbled it down

#

Looked at the other one

#

Stared at it and suddenly had a brain blast from a homework problem from two months ago and scribbled it down

#

Finished with seconds remaining

#

From what I overheard from other students they did NOT fare as well mostly

shadow ridge
#

shouldve just asked claude

twilit smelt
twilit smelt
#

i'm going to design a kind of hierarchical bitmap where the lowest level is a bitmap and the higher levels are bloom filters

#

and put it in Rtl as a general utility

#

itll be designed for each level to be virtually sparse so that they can be extended

twilit smelt
#

also sometimes i wish i kept the mintia source code private

#

not for any good reason

#

just to like make people constantly question whether its real

shadow ridge
#

like if i encrypted my code and put it on github

#

would you say it's public

twilit smelt
#

monkuous could read it

#

w/o any help from me at all

dense vigil
#

Monkuous can read encrypted stuff as well KEKW

shadow ridge
#

he can probably break RSA in his head

#

pure neural power

twilit smelt
#

fadanoid could also read it

mortal thunder
#

people would doubt your thing is even real and exists

twilit smelt
#

also mintia2 is essentially encrypted too because its reached such a high level of esotericism

#

if i was a beginner and i was like "ooh this seems like an interesting hobby project to learn from" and it was mintia2 and i looked at that id probably just quit

twilit smelt
#

found it in a mixtape made by boards of canada

#

called societas x tape

#

best song in a p good mixtape

hybrid condor
#

@twilit smelt I think you're the right person to ask

#

do you know of any reliable resources on the internal workings of the ExAllocatePool3 allocator in modern windows?

twilit smelt
#

but i can direct you to @hollow musk or @craggy spire who might

#

also kelowerirql in my discord

hybrid condor
dense vigil
#

wdym have to

twilit smelt
dense vigil
#

whats it supposed to tell me

twilit smelt
#

that im fat

dense vigil
#

is that like a slang for something

twilit smelt
#

no thats just my filler reply when i dont have anything else to say

dense vigil
#

nah i was replying to your bio message

twilit smelt
#

i said look at THEIR bio

#

not my bio

dense vigil
#

I DID 😭

digital pivot
#

will there be ExAllocatePool4 one day ?

raven drift
mortal thunder
#

It just says "high paid plumber" so probably not

digital pivot
acoustic sparrow
acoustic sparrow
#

afaict exallocatepool3 can give you memory from a normal pool or from the secure pool

#

my guess is that its something like:

  • on first use (or some initialization i cant find in the docs), the pool state associated with the tag is allocated and stored in a hashtable
  • then allocations proceed as normal with the given {pool, size} pair
  • secure allocations work by doing everything in the secure kernel through a proxy
#

but i havent read the code

acoustic sparrow
acoustic sparrow
#

the internal RtlpHpAllocateHeap function is basically just void* RtlpHpAllocateHeap(heap: *SegmentHeap, size: usize, flags: usize, unknown: u16) according to this pdf from ibm security

mortal thunder
twilit smelt
#

i like how nobody thought that the weird unrendered character in their bio, might have anything to do with the apparently confusing statement i wrote about their bio, and so they didnt google it

#

so they were really loudly confused and my attempt to be discreet backfired catastrophically

acoustic sparrow
#

sorry

#

but yeah lol

craggy spire
#

A key feature of ExAllocatePool3 is the ability to specify additional flags such as the aforementioned Secure Pool

#

However, one of the latest kernel updates this year removed Secure Pool, and its allocations now return a not supported status

#

26H2 and later switch to a new pool instead of Secure Pool, which isn't even a proper pool in the usual sense for NT

balmy zealot
#

What sort of algorithm is a pool allocator?

digital pivot
#

iirc it uses lock free linked lists

twilit smelt
shadow ridge
warm mural
dense vigil
#

and

#

ah wait thats 8

#

so tldr they're an apple employee

dense vigil
balmy zealot
twilit smelt
#

that is an optimization that the windows kernel's heap/pool allocator just happens to perform

#

theres no special thing called a pool

balmy zealot
#

For some reason, out of unfamiliarity, I assumed it was the name of some clever 'pool' algorithm.

#

What algorithm actually underpins a pool allocator?

twilit smelt
#

there are many

#

everyone does it differently

#

there are many ways to divvy up memory into blocks to hand out and then making it more scalable adds a whole other dimension of diversity on top of that

craggy spire
#

The segmented heap is the primary general purpose allocator in both user mode and kernel mode with some modifications

#

So the allocator stack is:
ExAllocatePool
-> ...
-> pool manager, node and heap selection
-> dynamic lookaside, when eligible
-> LFH sub allocator
-> VS sub allocator
-> Segment sub allocator
-> Large block sub allocator

#

And each sub allocator has its own way of doing things

craggy spire
dense vigil
#

In ida?

craggy spire
#

WinDbg, IDA, a collection of various scripts

dense vigil
#

Do you have your own kernel or do you just re stuff

craggy spire
#

No, I don't

dense vigil
#

Sad

digital pivot
#

now i remembered it

cursive charm
craggy spire
cursive charm
craggy spire
#

I know it exists, but I don't know any more than what's in the official docs

craggy spire
#

It's gone with windows 11 25H2

acoustic sparrow
#

huh

#

i mean it doesnt feel like a terribly robust mitigation

craggy spire
#

They've changed their approach and the replacement will be more like Static KDP

cursive charm
twilit smelt
#

right wing griftrland

cursive charm
#

here's the OG tweet in question if you're curious

#

the selected text was what had it catch my attention at first, lol

#

that is, apparently, "very lenient" is supposed to refer to the fault-tolerant heap

twilit smelt
#

is it

#

that just sounds like him saying shit

cursive charm
#

that's what i assumed since someone else would bring up fault-tolerant heaps in the replies

acoustic sparrow
#

lol

cursive charm
#

otherwise, idk wtf he was referring to

twilit smelt
#

we with our tiny audiences of experts reading our little messages are held ~100x more accountable for intellectual honesty than tech influencers are

#

and that gets to them a lot

acoustic sparrow
#

i thought vaxry isnt an influencer?

cursive charm
#

NT is not any "more lenient" with mm than linux, so either he means fault-tolerant heaps or he doesn't understand what he's talking about

acoustic sparrow
#

hes the developer of hyprland

twilit smelt
#

influencer and developer arent mutually exclusive

acoustic sparrow
#

true

twilit smelt
#

influencer is just someone with a big audience, and they can also happen to have real substantial projects, but inevitably with a big audience of less-than-experts youre going to start saying silly shit about other things, it seems like a rule of nature

hybrid condor
acoustic sparrow
warm pine
#

some sort of library that people use to write wayland compositors or something like that

acoustic sparrow
#

no its just a compositor

#

which is very nih because he got banned from xdg iirc

craggy spire
#

LFH is opportunistic, so if the bucket isn't active yet or if it can't provide a block allocation falls back to VS sub allocator

cursive charm
twilit smelt
#

you guys were only supposed to do 97 online hate units not 120

#

not cool

acoustic sparrow
#

lol

cursive charm
#

vaxry isn't very smart, i guess. that much i know.

craggy spire
# hybrid condor what is meant by activation?

LFH uses lazy promotion of a small size class, so when a bucket is not enabled its bucket array entry records usage. When the same size is allocated often enough, the bucket becomes active and allocations of that size can go through LFH.

#

If I'm not mistaken, often enough means 17-18 times

cursive charm
#

i still don't know how he managed to say "windows is very lenient with memory management" when:

  1. official docs for fault tolerant heaps would imply civ4 was crashing on NT before:

The Fault Tolerant Heap (FTH) is a subsystem of Windows 7 responsible for monitoring application crashes and autonomously applying mitigations to prevent future crashes on a per application basis.

  1. heap corruption would almost certainly lead to a crash in most situations anyway
warm pine
cursive charm
#

people like vaxry?

#

i just assumed he was tolerated somehow

warm pine
cursive charm
#

btw, if anyone here is in the hyprland server, let me know if he posts what i just said on his twitter, lol

#

apparently, he posts whatever people say about him online

cursive charm
short owl
#

(not a joke btw)

twilit smelt
#

thats normal zoomer behavior

short owl
#

Do you also do that then ig meme

cursive charm
short owl
#

The Amazing Digital Footprint

#

At least use an AD account

#

Yeah sure i love seeing anime tits as well as updates on the software i use

cursive charm
short owl
#

Kinda but he also posts stuff on his main acc

twilit smelt
#

online zoomers are weird especially the right wing ones

cursive charm
#

vaxry is apparently a Self-Proclaimed Centrist™, so i'd say he's even more weird than most right-wing zoomers

twilit smelt
cursive charm
#

i wish i still had a screenshot of one of vaxry's most infamous quotes, lol

#

it was one of the most baffling things i've ever read

cursive charm
#

do people generally think NTFS was derived from HPFS? a friend of mine just said somewhere that "NTFS was a natural development from OS/2's HPFS," but my understanding of NT's development was that there was apparently a lot of debate as to whether NTFS should be made.

twilit smelt
#

the ppl who designed it didnt care about or like HPFS

cursive charm
#

those would be gary kimura and tom miller, correct?

twilit smelt
#

yeah

#

i think ODS was a little more primitive than NTFS like i dont know that it was using btrees

#

but NTFS didnt get that from HPFS it just got it from the filesystem research that was current

#

same common source that HPFS and HFS got it from

cursive charm
#

yeah, i assumed the presumed relation to HPFS had to do with them using B-trees and that, according to wikipedia anyway, they share the same MBR partition ID (0x07)

#

i guess it makes sense if you forget most of NT was designed by people from DEC, lol