#Nullium

1 messages Ā· Page 4 of 1

wild glen
#

one page table is 4 mb

#

yis

#

so to take 27 mb i need 6.75 tables

#

im gonna take 7 because i have a singular braincell that told me to

#

7 page tables for the kernel damn

#

at LEAST 7 actually

#

because its growing

#

im gonna make my pmm have permission values actually

#

or should it

#

idk

#

i want to put the permission values there so the vmm can actually read it and do something

#

it shouldnt be architecture specific because any modern architecture has permission thingies

#

damn

#

wait

#

the vmm is gonna be a clusterfuck

wild glen
#

these are the most necessary ones

wild glen
#

programs are gonna think they start from 6 mb or smth

#

which is fine

#

but thats all programs

#

i have to constantly remap them to 6 mb

#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

wild glen
#

multitasking idea probably:
(load program before this)

map program at top of memory
only allow access to the memory that it owns (no access to other programs trl)
program do thing
go back to kernel
do for next program

#

i cant just not use the "owner" field in my pmm

#

would be quite a disappointment

lethal summit
#

oh 32 bit

wild glen
#

32 bit

#

what is it on 64 bit

gloomy musk
wild glen
#

oh

#

wait

#

misread

wild glen
wild glen
#

64 bit page table has 1024 uint64_t's instead of 32

#

also includes whatever the fuck that is

#

more page tables bcs more memory šŸ‘

#

im staying with 32 bit this looks like foreign bullshit to me

#

or using limine i think limine does all that automatically

#

all hail funny obscure boot protocol

sour pollen
wild glen
#

stroke

#

dont quote me on anything i say abt 64bit

sour pollen
#

4096 / 64 vs 4096 / 32

#

512 and 1024

wild glen
#

ok true

#

i thought it was larger

wild glen
#

Due to the complexity of some of the Nullium functions, we will increase the stack size to 3 GB.

#

Previously it was 27 MB, but my code is too superior for such a small, limiting size.

#

So, due to my superior status over this entire server, backed by my 50 years at Blizzard Entertainment, the stack size is increased to a forgivable 3GB.

lean relic
#

how is 16384 * 8 bytes

#

a 27mb stack

wild glen
#

idfk

lean relic
#

its 128kib

wild glen
#

oh

#

damn

#

its all my code thats 27 mb tho

lean relic
#

how

wild glen
#

no i.mean

#

the binary

lean relic
#

do you have like all your paging structures defined

wild glen
#

kernel binary

lean relic
#

in the code

#

and what else did you put in there

wild glen
#

brb

#

back

wild glen
#

it counts everything

#

ld_end

lean relic
#

yeah

#

what large data do you have in your binary

#

do you page

#

if so did you make all the paging structures be inside the binary

#

did you leave a large bitmap or something

#

im just guessing but yeah

#

i had a 511mb bitmap in my code this morning KEKW

fluid moon
#

you'll only need max 2mb of stack for a kernel

#

how recursive can your code be to require 3gb of stack?

wild glen
#

hjdk

#

Do t3 tjbe cose

fluid moon
#

hjkl

wild glen
#

anyways that was a shitpost

#

its actually being increased to 90

#

90 GB

fluid moon
#

yeah, reasonable

#

don't forget to add support for x2apic so you can use up to 4mln CPUs

wild glen
#

Ok

#

im gonna finish paging when i get home

#

hopefully

lethal summit
#

sounds like skill issue

wild glen
hushed briar
fluid moon
#

a 16 bytes stack will do the trick

fluid moon
#

and does a lot of heap allocation

nova otter
#

šŸ‘€

#

I've never seen this thread

#

I assume the title is outdated considering the github saying

An A/UX inspired OS.
?

#

also, may I ask, what makes A/UX and/or Nullium different from other UNICES/UNIX-likes?

lethal summit
#

seven mutual servers is crazy

nova otter
#

lmao

#

I've got 7 with utcq also, a few different ones tho

fluid moon
#

LMAO

nova otter
#

every time I go to this server I feel guilty for sitll being unable to code KEKW

#

I should learn, I really want to learn, I just can't get myself to keep going KEKW

I don't even struggle with indecisiveness anymore just lack of motivation

lethal summit
#

if we have cloc (count lines of code) then when will we get ccoc (count columns of code)

fluid moon
#

cock
count occurrence of kernel

wild glen
nova otter
#

oh, neat

#

I knew about the first bit, I was moreso reffering to the underlying unix šŸ˜…

#

are you gonna aim for compatibility with classic macos programs?

wild glen
wild glen
nova otter
#

fair KEKW

#

source compatibility maybe?

wild glen
#

idk

#

classic mac os didnt have stuff like gcc

hushed briar
wild glen
#

idk maybe ig

hushed briar
#

Just learn

#

Even if it’s slow

#

:)

wild glen
hushed briar
#

Yeah fr

wild glen
#

userspace stuff

hushed briar
#

Data structures are extremely important too

#

Like

#

You need to know what a linked list and shit is

#

All of that

fluid moon
#

(void*)(u64)(*(u32*)((u8*)madt + offset + 4))

wild glen
#

i just remembered the fact that i want to write an insanely expansive manual for nullium programming later

nova otter
# hushed briar :)

my big problem is that

I can't figure out what to write to learn more, every time I try to find a project it's either so trivial I finish it in like 20 minutes or it's too difficult so I spend an hour staring at a blank text file KEKW

fluid moon
hushed briar
#

What is wrong with c++

wild glen
#

c++ is somewhat cancer

hushed briar
#

I literally have a certificate of proficiency in C++

nova otter
hushed briar
#

And I still hate it

wild glen
#

i havent found any of the features on it useful

fluid moon
nova otter
hushed briar
#

Yes it’s fucking amazing

nova otter
#

it seems nice imo

#

ah

#

noice

hushed briar
#

I love dlang

nova otter
#

for C/C++ replacements the one that most catches my eye is Zig

hushed briar
#

It’s one of the best systems programming languages out there

nova otter
hushed briar
#

Jkjk

wild glen
#

afk once i come back i can do paging šŸ”„

hushed briar
#

Okay bet

#

We can call if you need help

fluid moon
nova otter
# hushed briar Rust :)

rust is nice on the simple level until you get to async and await then it's the worst thing ever (imo)

hushed briar
#

It’s also shit for kernels

fluid moon
hushed briar
#

Sorry to my rust kernel devs

hushed briar
nova otter
#

(im not a coder obviously so it's not like my input matters but yk)

hushed briar
#

HOLY HELL

#

Imma rewrite my pmm boys

fluid moon
#

no more buddy?

hushed briar
#

No imma use buddy

#

It’s just

#

Extremely shit

#

Like the code base for it

nova otter
hushed briar
#

Like I’ll keep the alg

#

But

#

I need to make the code more modular and easy to read

#

Because pmm_alloc_pages is extremely hard to read

#

Like

fluid moon
hushed briar
#

Really bad

nova otter
#

I wish there was a good equivalent to C/C++, I tried cabin previously but it's kinda janky at least when I tried it

That may be a good project to try and write my own maybe

fluid moon
#

lisp sucks, ocaml doesn't

nova otter
#

I'm too lazy to learn cmake or makefile so I just write my "build scripts" in sh

nova otter
hushed briar
#

build.sh is actually a real thing

#

Wtf

nova otter
hushed briar
#

Lisp is goated

nova otter
fluid moon
hushed briar
#

No one uses it to build software

nova otter
hushed briar
#

Literally everyone uses make or something

#

Like

#

Makefile isn’t that hard

#

It’s really really not hard at all

fluid moon
#

I love makefile

#

cmake sucks for freestanding

hushed briar
#

You can learn it in 1 hour

nova otter
fluid moon
#

I feel free when using Make

nova otter
hushed briar
#

Make is goated

#

Meson is cool too

#

But make is better for freestanding

#

Make is extremely customizable

fluid moon
hushed briar
#

And easy to read

#

Yeah

fluid moon
hushed briar
#

It’s not good for free standing

hushed briar
#

Extremely customizable

#

It’s why Linux uses it

#

It doesn’t help you at all

#

Which is good for a kernel

fluid moon
#

I don't like autoconf, automake and all that though

#

I set variable config flags in my makefile

nova otter
#

alright y'all convinced me, time to learn Makefile ig

fluid moon
#

gnu make is goated fr

#

I could and do use it for everyday userspace projects

nova otter
#

what's the diff between gnu make and bsd make

#

I'll learn the latter just because I don't like gnu trolland

fluid moon
#

bsd make is more minimal

nova otter
#

ah

hushed briar
hushed briar
nova otter
#

thanks for putting up with my dumb questions btw šŸ˜…

fluid moon
hushed briar
#

I do this

#

This is why I like make

#

Super super customizable

fluid moon
hushed briar
#

Lol

#

Everyone

#

Shirt

#

I should get rid of

#

Interrupt flags

#

I used to handle interrupts with gnu interrupt attribute

fluid moon
hushed briar
#

Which requires general regs only

fluid moon
hushed briar
#

Yes I do that now

#

My isr calls a c function

nova otter
fluid moon
hushed briar
fluid moon
# fluid moon

I'm gonna ditch uACPI as I'm not using it, I'm parsing ACPI by myself (cowboysunglasses ). I'll probably use LAI though

hushed briar
#

I’m gonna parse acpi myself

#

At some point

hushed briar
#

You’re Albanian

#

Kosovo is Serbia trl trl trl

pale marsh
#

also offtopic

fluid moon
#

pakistan

pale marsh
#

anyways what is nullium even about

fluid moon
#

I don't have to deal with kernel APIs implementations

hushed briar
hushed briar
#

Check out my os

fluid moon
wild glen
#

no

pale marsh
hushed briar
#

sorry for shameless plug

wild glen
#

i said when i come back ill work on it

hushed briar
#

Pls star too I’m almost at 20

#

Bet

wild glen
hushed briar
wild glen
pale marsh
hushed briar
#

Show me

wild glen
#

man ykw

check out MY shitty os

#

its the shittiest of them all

hushed briar
#

I scroll through your source code quite a bit

pale marsh
# hushed briar Show me

#1404638046175105215 im currently working on uh acpi and scheduler stuff... still havent committed tho im waiting until update finis

wild glen
#

brb my windows laptop shat itself again

#

(bluetooth headphone no work)

hushed briar
#

Sad

fluid moon
#

I'll always remember that centered debian logo

pale marsh
hushed briar
#

Funny ass nene

#

Meme

wild glen
#

RESB 16384 go brrr

#

this appalling piece of shit dies first though im sorry

#

i have to update discord on linux machine

#

:<

#

why cant i just start doing shit

hushed briar
#

what the hell is that shit

wild glen
#

pirate software

#

50 years blizzard entertainment

pale marsh
#

lifetime blizzard

wild glen
#

69 years blizzard entertainment

#

programmed microsoft windows

#

ceo of mann co

#

he did it all

#

it grew to 32 mb

#

what

#

what the fuck

#

whuh happened

#

what specifically is shitting itself this badly

fluid moon
#

what are you statically declaring?

#

bitmaps? stacks?

wild glen
#

the data segment ends at like 1 mb

wild glen
#

a sec

#

ok so the bss is giant

#

its fucking huge

fluid moon
#

static allocations

wild glen
#

bitmaps (fonts, etc), code(no shit), some arrays (pmm and paging and shit)

#

maybe theyre making everything big as shit but idk

fluid moon
#

code is not bss, what does your pmm look like

#

please tell me it’s not statically allocated

wild glen
#

uhhhhhh

#

it is not statically allocated ||(lie)||

#

ok fuck

#

time to slightly rewrite it

#

ok so um it was a big part of the problem apparently

fluid moon
wild glen
#

unfuc aray

lethal summit
#

wowzers that's a big binary how large is your codebase

#

a few million loc?

#

holy smokes that's a huge binary

fluid moon
#

new windows is in town

wild glen
#

absolute poo ass sized codebase

#

im gonna do two page tables for the init as a temporary solution

#

its just short of being less than 4 mb

#

;-;

fluid moon
#

two page tables

#

wha

hushed briar
#

Yeah what

#

That doesn’t make sense

#

What were you doing before…

#

Were you creating every page table on init

fluid moon
#

you would have to switch it on page fault otherwise

hushed briar
#

Yeah

#

I only create one

wild glen
#

i have to reserve a page table for 4 and something mb

#

one page table only covers 4

#

to cover all the space i might need to map a second one

#

identity maps and all that bullshit

lethal summit
#

this is so cooked

wild glen
#

absolute clusterfuck

#

i am NOT getting out alive 😭

#

time to do random shit to my pmm and hope it works

lethal summit
#

christmas time is here... happiness and cheer...

wild glen
#

reminder

i dont live in pakistan

hushed briar
wild glen
#

it was the culprit behind the 27 mb stack space

#

im gonna reform it so it will not take as much damn space

#

im making my pmm more like paging

#

no more details provided until i actually finish it

fluid moon
#

WHA

wild glen
#

(spoiler: tables in tables in tables trl)

lethal summit
#

this is so cursed

#

what is even happening

wild glen
#

im going insane

#

i want medical help

#

paging is gonna be my #1 reason for the destruction of the universe

#

i swear to god

#

ok so uh here's some type of plan here

  • pmm (fucking shit)
  • paging (even more of a fucking shit)
#

i hate memory

#

why cant we just revert to monkey atp

#

ok anyway

wild glen
#

my pmm is basically the entire problem

#
  • clogs up a shit ton of memory
  • fucks up paging
#

so anyways pmm will now use memory addresses instead of page numbers

#

also im gonna try to make a buddy allocator

#

splits shit in half until something happens

#

anyways nothing is permanent until its done because i wasted all my braincells on unrelated things

#

dont quote me if i say something and then it turns out to be something else please

#

this project is basically fucked until i fix the pmm

#

ok thanks

#

ok so i figured out how to implement it

#

without absolutely fucking over the size of the kernel

#

ignore the crashout above

so geniune plan

  • make a buddy allocator
  • make it work WELL
  • put paging (might be the simplest task after all this crap)
#

im like fully sure its definetely gonna be a buddy allocator

#

also to anyone who's gonna think im gonna do something really dumb again

  • its gonna return actual memory addresses
  • its not gonna be 26 mb 😭
lethal summit
#

coz it needs to work WELL

wild glen
lethal summit
#

no this is a joke don't do that just get it working first

wild glen
wild glen
#

i deadass need that pmm to be the best code i ever wrote

lethal summit
#

famous last words

wild glen
#

somewhat ok code i ever wrote

#

so far

vocal root
wild glen
#

Le budy(tm)

#

idk if its how its supposed to work

#

i shouldve finished it more so i can actually fucking explain this piece of code

#

a sec

#

help

#

my scroll wheel

#

this is what i assume it looks like

#

if its not then idc funny directory tree go brrr

lethal summit
#

🤪

wild glen
lethal summit
#

whar

#

why not say free

wild glen
#

uhhhhhhhhh

lethal summit
wild glen
#

because if its not free then it is either a parent or a page

#

ok ykw free makes more sense

#

free time

lethal summit
#

why are there two addrs

wild glen
#

ah yes

#

directory tree splits into one address

lethal summit
#

directory tree?

#

whar

wild glen
#

it splits into two repeatedly

lethal summit
#

why not call them left and right then

wild glen
#

oh

lethal summit
#

and point to other buddy page structs

wild glen
#

true

#

thats what i wanted them to do

lethal summit
#

we have trees at home

wild glen
#

this is a tree of all time

#

this is now somewhat readable

lethal summit
#

why do you initialize pointers to 0

#

that funny

wild glen
lethal summit
#

it's not a huge issue just funny

wild glen
#

truly

lethal summit
#

typically you say NULL šŸ’„

lethal summit
#

coputer

wild glen
#
    buddy_InitSlice.free = false;
    buddy_InitSlice.left = NULL;
    buddy_InitSlice.right = NULL;
    buddy_InitSlice.tier = 0;
lethal summit
#

fantastic

wild glen
#

now it is somewhat peak

wild glen
#

because if its 1 its not free

#
void buddy_mkBranch(buddySlice_t* slice, bool direction){
    // direction: left is 0, right is 1
    
    buddySlice_t new_slice;

    new_slice.tier  = slice->tier + 1;
    new_slice.used  = false;
    new_slice.left  = NULL;
    new_slice.right = NULL;

    if (direction){
        slice->right = &new_slice;
    } else {
        slice->left  = &new_slice;
    }
    
}
#

le code

#

i forgot to add the statement if its like the max tier it can be

#

whatever

#

this is basically the code for multiplying that

#

the declaration for the new slice itself is gonna be changed

wild glen
#

this is gonna be absolute diarrhea in memory

#

lemme check if im doing all this right

lethal summit
wild glen
lethal summit
#

Use After Return

lethal summit
#

new_slice only exists on the stack during the duration of that function, after it returns, it is gone

wild glen
#

it erases and shits itself

lethal summit
#

šŸ’„

wild glen
#

this is basically my plan for memory thing described in shitty mspaint

#

anwyays

#

uhhhhhh

lethal summit
#

sanity

wild glen
#

sanity

#

oh no this is becoming a clusterfuck

#

šŸ’„

#

how tf do i allocate buddy tier things

lethal summit
#

huh

wild glen
#

actually no that would suck ass

#

in multiple ways

lethal summit
#

4GB RAM (3GB usable)

wild glen
#

can i put a struct in a struct for some ungodly reason

lethal summit
#

wdym

wild glen
#

for left and right put structs in it because idk how do i allocate it without the kernel growing to ungodly sizes

lethal summit
#
struct a {
   int boom;
};

struct b {
   struct a a;
};``` is valid
#

you cannot do

struct b {
   struct b b;
};```
wild glen
#

i have an idea

#

nevermind

#

nevermind hold up it might work

#

cant really describe it yet

#

tldr reserve some pages for block info

wild glen
hushed briar
#

Just reserve some pages for a page info struct

#

Very simple

lean relic
#

its like the simplest oop ever

fluid moon
#

as I have to be mindful when to either set a lifetime or allocate on heap

#

and whenever you set a lifetime you encounter borrowing problems

lean relic
#

lifetime is so ez

#

it might complicate things but it nukes some ub

#

(at least some šŸ„€)

wild glen
#

yesterday i couldnt figure out how i wanted it to be

wild glen
#

increasing the stack to 4 tb šŸ”„

rocky elbow
#

legendary

hushed briar
wild glen
#

guys

#

geniune tip

#

if you have a choicer

#

and you can pick only ONE thing on it

#

please use fucking radio buttons

#

i can not deal with this shit

#

also as an attempt to save the kernel binary size im gonna consider compressing all the bitmaps except the font

#

bcs theres too much symbols already im lazy

#

not home yet though

wild glen
#

i wanna store all bitmaps on a file on your hd

#

except i cant currently

lethal summit
#

how large is your codebase bro that is a massive kernel image

#

i've made smaller linux images

#

crazy

wild glen
#

its being rewritten

lethal summit
#

what does small mean, small is relative

#

my codebase is 32,000 lines and I consider it quite small wheras others find that large

wild glen
#

uhhh

lethal summit
#

(my binary is like 450kb)

wild glen
#

idfk i didnt count

lethal summit
#

ok i will count it

wild glen
wild glen
lethal summit
#

only 3000?

#

how is the binary that big

#

ah wait and 1,500 of those lines are for bitmaps

wild glen
lethal summit
#

no but like this is actually fascinating

#

how did you get the binary that big

#

am curious

pale marsh
#

StuPMM trl

wild glen
#

it statically allocated a million structs 😭

lethal summit
#

smart

pale marsh
#

My kernel is like 150-200kb

lethal summit
wild glen
lethal summit
#

how large is the source codebase

#

size matters trl

pale marsh
#

it's smol

wild glen
lethal summit
#

oh nvm

lethal summit
wild glen
#

oh ok

pale marsh
#

You can also use wc

wild glen
#

once i get home ima send the results of the new binary

pale marsh
#

word count

wild glen
#

ok no i def can

#

im pretty sure you can make a struct that manipulates individual bits

#

nvm these are called bit fields

#

ok so im gonna compress the fonts so they wont be disappointingly big

#

they probably take the 2 mb out of 3

#

(1st one is linker start)

#

oh wait so kernel bin is 2 mb then

#

i can reduce it to 1 or less tldr

lethal summit
#

how many phyiscal memory allocatros do you have

pale marsh
#

never use gimbap pmm

#

freelist onop

wild glen
wild glen
#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

#

i wanna cry man

#

ok this shouldnt be in progress report

lean relic
#

paging?

wild glen
#

unrelated

wild glen
#

anyways im gonna try to compress fonts

#

by compress i mean make them not take a byte instead make the pixels take 1 bit

#

le efiecentyc

lean relic
#

did they not before…

wild glen
#

nobody told me to so i just went with the easiest option

lean relic
#

thats ultra fucked

wild glen
lean relic
#

how big are you characters

wild glen
#

wait no

#

byte for each pixel 😭

lean relic
#

i mean like 8x8 8x16

wild glen
#

oh uh

#

7 * 11

#

77 pixels total

lean relic
#

i would make it 8 * 11

wild glen
#

might be a shit ton of bytes for a single character :/

#

why

lean relic
#

so you can

#

byte 1 - row 1

#

since 8 bits

pale marsh
#

Oh wrong place

wild glen
#

😭

lean relic
#

like

wild glen
#

i have a few letters that may not work with 8x11

#

(also ngl i want a second terminal font that is 8x8)

lean relic
#

like just add a extra bit of spacing

#

no big deal

wild glen
#

maybe idk

lean relic
#

and dont render the spacing in the terminal

#

if you do

#

then it would make more sene for 8x12 tho

#

and just leave a empty row and column

wild glen
#

m

lean relic
#

and have spacing built into the font tm

wild glen
#

ok fair im gonna have empty space

lean relic
#

and then its veri simple

wild glen
#

because 7x11 is a lie its usually indeed 8x12

#

empty space

lean relic
#

byte 1 - row 1
byte 2 - row 2
…
byte 12 - row 12

wild glen
lean relic
#

since each pixel = bit and 8 pixels = 8 bits and each byte has 8 bits

wild glen
#

mk

#

also mouse cursors might require 2 bits

#

they are 11x15

lean relic
#

shrink them

wild glen
#

i can just remake them theres only 2 really

wild glen
#

i thought theyre already somewhat small

lean relic
#

theyre too bit vro

#

bug

#

fucking hell

#

big

wild glen
#

O k

#

text first

lean relic
#

well jokes aside i would make them 16x16

#

so

wild glen
#

ph

#

oh

#

yeah makes sense

#

some cursors are wide for no particular reason

lean relic
#

byte 1 - row 1 column 1-8
byte 2 - row 1 column 9-16

#

and shit

wild glen
#

i remembered that 0b[insert number] exists

#

not 0x but 0b

#

binary

lean relic
wild glen
#

im just gonna use that idrc about the size of the c files

lean relic
wild glen
#

oh

lean relic
wild glen
#

ykw im taking this for the terminal font i dont particularly want to write a terminal font

#

the 8x8 idea

lean relic
#

Theres a ton of nice fonts there

#

if ya want to you can make your own but just saying

wild glen
#

im keeping the gui one

wild glen
#

nice

#

afk brb

hushed briar
wild glen
#

deadass the reason

hushed briar
#

Mmm

#

I see

lean relic
#

what the fuck the more i look at spleen the more i fall in love with it

hushed briar
#

Disagree tho

hushed briar
#

I’m using default Flanterm font

#

The x looks fine

wild glen
#

Yis

#

where is the x used

hushed briar
#

Addresses

#

In the buddy init

wild glen
#

oh

#

true

#

the x looks fine

#

im keeping the funny uneven ass nullium font though

hushed briar
#

Bet

#

I like the font you made

#

But if you ever change it

wild glen
#

thx

hushed briar
#

There’s plenty of decent fonts

#

Right now I’m adding font changing

#

Well

#

After I get to userspace I will

wild glen
#

i think since i have a kernel shell i think i might want to add everything switching

#

i cant just dump everything in the kernel

#

i already had the problem of it being 27 mb big

lethal summit
#

are we cookig

wild glen
#

ok im turning all the font arrays into bits trl

12 bytes per letter

#

instead of um

#

165

#

i thought 12 was shit but then i remembered the old number

#

also my kernel binary itself is 91 KB

#

or maybe thats because i already shrinked it to death

#

anyways it takes way more in memory than it does on the hard drive

#

both are too big i dont have shit in them

lethal summit
#

very important

wild glen
#

91 kb still seems too big

pale marsh
wild glen
#

what does that do

pale marsh
wild glen
#

oh ok

#

huge update

#

91 kb down to 76!!!!!!!!!!!!!!!!!!!!!!!!!

#

lets goooooooooo

pale marsh
wild glen
#

no i just compressed the fonts

#

by making them 1 byte

#

per row

#

everything else in nullium works ok

#

printing works

#

nvm its 84 mb

#

KILOBYTES

#

NOT MB

#

FUCK

#

kernel still 4 mb

#

in memory

fluid moon
#

864kb are way too many

#

I shall optimize

wild glen
#

optimizations šŸ”„

#

i have a better idea for my buffer

#

its gonna be faster than the current one

#

way faster

#

it might be the second worst problem with the size of the kernel

#

also framebuffer btw

#

its really only used for mouse cursor

#

ITS 1 MB NOW

#

IT WAS THE PROBLEM

#

LETS GOOOOOOOOOOOO

fluid moon
#

that's basically 96% of the whole binary size

wild glen
wild glen
#

anyways my kernel is now truly small

#

i won humanity

#

it went from 27 mb to 3 to now 1

wild glen
#

are all of yall using flanterm

#

lame /hugeJ

fluid moon
#

I'll make my own VT someday

#

I don't want to deal with geometry rn though

wild glen
#

idk im gonna write my own VT probablt

#

basically vga text mode

fluid moon
#

I hate the expression "godspeed"

wild glen
#

i dont even get it

#

what is it even supposed to mean

#

bruh did nullium forget how to load stage 3 (the one with mouse cursor and stuff)

#

i think i did something goofy

#

holy shit the framebuffer is fast as shit now

fluid moon
#

but everytime I read it I think about something going at the speed of god

wild glen
#

lmao

hushed briar
wild glen
#

paging should work theoretically because entire kernel fits into 1 mb

#

or 1.5

#

at least not 4

#

do i add on page tables only when i need them?

lethal summit
#

and you can even take this one step further by only adding on page tables when you actually touch the pages

In computer operating systems, demand paging (as opposed to anticipatory paging) is a method of virtual memory management. In a system that uses demand paging, the operating system copies a disk page into physical memory only when an attempt is made to access it and that page is not already in memory (i.e., if a page fault occurs). It follows th...

wild glen
#

my mouse buffer is still absolute dookie farts

#

i want to repair it

#

:|

#

so the mouse buffer is a 16x16 square that should keep up with everything behind it, so when the mouse moves it can safely remove the mouse cursor from the screen

#

without doing any funny shit to anything that was behind it

#

the off brand finland was an attempt to check if pixels were drawn over that square

#

AAAAAAAAAAAAA

#

my sanity

#

vs

#

two 15 second unskippable youtube ads

#

fucking kill me already

#

unrelated but i feel like my bones are gonna collapse

#

ykw it will slightly be laggy for now

#

not as bad as that fucking double buffer that took up 3 mb of memory before

#

my buffer is so good i triple faulted my os :D

wild glen
#

i have a mouse cursor again

#

let me just give it an icon and then im gonna stop for today my eyes hurt

#

or a drawing

#

what is it even called

#

(easiest questions ever cant be answered when you have a fucking stroke)

#

im so done for that i somehow put the x variable and the y variable in the wrong places

#

why the fuck is the dependency for a graphics driver the mouse driver

#

this pssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssr bv

#

me cursor work

#

i wish open source projects had paychecks

#

matrix

#

(tm)

wild glen
#

my fucking eyes are falling out

#

should i make the nullium theme dark mode by default

lethal summit
#

😢

wild glen
#

no

#

i had my mouse cursor before and i want it back now

#

i dont think im getting it back because im deadass in physical pain

#

I WILL FUCKING KILL SOMEONE IF I WITNESS A YOUTUBE AD ON MY SCREEN AGAIN

#

enabling an adblock is just gonna make it say "lol disable ts we see you"

gloomy musk
wild glen
#

honestly im just gonna use a regular bitmap for sprites

#

i meant mouse cursor

#

s

#

they only take a single kilobyte anyway

#

or 2

#

nvm

lean relic
fluid moon
# wild glen i have a mouse cursor again

personally I don't like working on external devices before having working internals, you'll get in a mess and you'll have to rewrite the whole driver at some point

wild glen
wild glen
fluid moon
#

I touched userspace!

wild glen
fluid moon
wild glen
#

maybe

fluid moon
#

automatically generated by rust bindgen

lean relic
#

yeah wrong thread

wild glen
#

rust of all time

wild glen
#

switching to the x31 architecture

wild glen
#

how do i add images to starting thread thing i dont think i even can :^(

#

also im gonna make every text mode window in nullium have a 90x60 thing

#

i want 3 window types

  • raster - useful for games, deadass the entire window is a bitmap
  • vector - placeText(10,10,"Hello World");
  • text mode - fucking vga bruh
#

tldr

#

idk if i should permit changing sizes for 90x60 text mode windows

#

maybe that would be maximum size

#

only if the program wants the size changed

wild glen
#

its not on 0xb80000 though no shit

lean relic
#

why

#

make it be on 0xb8000

hushed briar
wild glen
#

a windowing system is required for program operation anyways

sour pollen
hushed briar
#

You realize WHY we don’t put these things in kernel space right?

#

Any exception will crash your shit

#

Operating systems are MEANT to run userspace programs

#

It’s just meant to allow the programs to get services from the kernel

#

Like

#

Syscalls exist for a reason

#

Because a syscall won’t nuke your system

#

But a bare file operation in kernel mode might

#

Lots of people end up doing their entire file systems in userspace

#

Microkernels

#

For this exact reason

#

You should read up on some theory more brotha

gloomy musk
#

oops

#

I was gonna say I thought Windows' WM was in kernel space

#

or am I remembering wrong?

wild glen
#

it is sorta i think

#

idk

#

win9x def had a kernel space wm

hushed briar
gloomy musk
hushed briar
#

Historically it was

#

After windows 7

#

They made it in userspace

wild glen
gloomy musk
#

yeesh XD

hushed briar
#

Yeah

#

Well

wild glen
#

if you end explorer.exe then you can still make windows

#

idk maybe the wm is some other executable

#

wtf am i supposed to do just resort to a framebuffer terminal???

gloomy musk
#

anyhow, uh yeah, kernel shell (emulating a user space shell) is generally bad

wild glen
#

death

hushed briar
#

Before they put it in userspace, the window manager did run in kernel space but the win32 api accessed it through userspace it’s kinda stupid

#

Like win32k.sys was in kernel mode but

#

user32.dll and gdi32.dll were user mode components to access it

#

The dll’s provided an api to forward calls to the kernel

hushed briar
gloomy musk
#

how silly lol

hushed briar
#

I mean it’s kinda just

#

A really cursed system call

gloomy musk
#

🤣

wild glen
#

uhhhh

#

so what do i do

hushed briar
#

Create a scheduler …

#

Wait is your pmm functional

wild glen
#

T h e n

hushed briar
#

And your paging

hushed briar
#

If you can make a good scheduler

#

You’re good

wild glen
#

(paging) currently not

we alr started talking about this so i just want to know what a sane person does

hushed briar
#

For a kernel?

#

Wanna know what I did

#

Like the steps

#

Maybe that’ll help you

wild glen
#

whar

hushed briar
#

gdt->idt->pmm->paging->vmm->vfs->tmpfs->sched

#

I would recommend making a vmm

#

Probably

#

That would help

#

And if you don’t have a kernel heap allocator

#

You should get onto that

#

Look up ā€œthe slab allocatorā€

wild glen
#

O k

#

what do i do with that gui thing i have

#

mouse cursor and the other funny

hushed briar
#

Back burner

#

Switch to to userspace at some point

#

It should be trivial

wild glen
#

maybe

#

wait if its in userspace i can add other gui support

hushed briar
#

Yes

wild glen
#

Yes

#

neuron activation

hushed briar
#

You can port the X Window System even at some point

#

Imagine that

wild glen
#

isnt wayland better nowadays

hushed briar
#

You just need syscalls

hushed briar
#

Depends who you ask

wild glen
#

fair

hushed briar
#

Most people would say Wayland

wild glen
#

gnome is dropping x support soon (sad)

hushed briar
#

I disagree

#

Yeah and gnome as a desktop environment has been shit for 15 years so

wild glen
#

idk i still use it

#

ok ykw it is kinda shit

hushed briar
#

Dude it’s horrible lmao

wild glen
#

where on god's green earth is the minimize button

gloomy musk
#

Never used it lol

hushed briar
#

Just use xfce or mate or kde…

#

Or cinnamon

#

Or just any sane DE

wild glen
#

mk

#

i used kde

hushed briar
#

Yeah it’s nice imo

wild glen
#

cinnamon is literally michael windows

gloomy musk
#

I like KDE :3

hushed briar
#

I like cinnamon

#

It’s the one I use

#

Because it’s similar to windows

#

Lmao