#Astral
1 messages · Page 24 of 1
flamegraphs are cool
unrelated at all to my recent work but I should port an irc client
I got the first hex dump out of the profiler :D and its absolute garbage, gotta figure out what is going on
garbage as in, not even in the right format
much less having any useful data
bro wtf the nmi never actually writes to the ringbuffer 💀 where is it getting its data from
what was it cooking
wait fuuuck I forgot to disable the limine serial
@grand shadow I have question, do you use serial or framebuffer to log? Both now and when you've just started. Thanks in advance, please answer TvT
When I started I did e9 logger until I had a pmm and then I added flanterm
I do support serial but I dont log to it
konversation is decent
hexchat too, but unmaintained, deprecated and gtk2 only
assuming you want GUI ones
@grand shadow have you built an iso bexause i am not building astral's gcc
i desperately wanna contribute to this
that's gonna be hard considering you need gcc to build anything for astral
but refer to this, i guess: <#1061407633745125397 message>
i don't know how out-of-date this is btw
should be mostly up to date
the one in astral-os.org is a symlink to that lol
But yeah, youll need the astral gcc
currently having exams to study for so things will keep being very slow for a bit
but after like the 8th (and after I finish one project... its a stupid one to write some software for dos using x86 assembly and masm) we ball
summer break will be upon me
took me a moment to remember you guys are in summer when we are in winter
no its actually just him
his hair grew backwards in the womb so he experiences the seasons in reverse
bro's heating his house at 35c during winter
fuuuck
guess like ill have to compile then
its not that bad
unless you are like on a cpu thats 20 years old
which then good luck and I am sorry for your soul
#error "Here's a nickel kid. Go buy yourself a real computer."
of course it's Linux lmao
Lmao, wtf lol
it's a reference to a dilbert strip from the 90s which btw the author Scott Adams went down an insane conservative pipeline triggered by an extreme love for Trump and got his comic strip cancelled by saying a bunch of racist and sexist stuff
He's like stonetoss for boomers
linus torvalds is gen x so kinda sorta checks out
I knew that particular strip because it was on the inside of the back cover of a big book about Unix that my dad had that I found when I was little lol
I will do a mlibc update either today or tomorrow
this will be a bit funky since I'll need to:
- fix any abi breakages in kernel
- rebuild the world
- solve build issues that arise from the ongoing mlibc namespace pollution changes
Do it yesterday, jk
do it before astral itself existed
before the gdt was created
before the 8086
well into the stone age
make the flintstones know of the mlibc update
i have an intel core i7 10700K
10th hen
gen*
so not that old ig
from 2020 since its a 10th gen
me too, but mine are i5
we flamin
I might clean up the work I already have and push it so I can work on updating mlibc
no amd pmc but whatevs thats just hooking it up to the infrastructure
theres still some things to fix (like that syscall entry thing being separate
though there I can already see it spends a LOT of time on a munmap while running glxgears
(and thats with one core!)
fun thing is you might even be able to run the fucking flamegraph script inside astral
since astral has perl
and python
very nice
the flamegraph is very cool
I should extend Managarm's profiler to do that as well
Now that Astral has stolen Managarm's PMC code, I can steal Astral's flamegraph gen 
so true
its a python script that just reads the binary file that is in a
number of pointers (1 byte)
pointers (8 bytes each)
...
format
and shoves all of them into addr2line, puts that into the format flamegraph likes and shoves it into flamegraph
later I can get a longer flamegraph of glxgears and see if I can see anything (as well as fix some of the weird symbol naming) but for now I gotta get the ball rolling on the mlibc update
do it then 
#RunTheFlamegraphScriptOnAstral
bet
holy crap xml or something
damn links doesnt support svg 💔
awh
i feel like running this on a real computer for some reason (i did it with some other os already)
depends on the system requirements i dont want to sacrifice my actual pc for this
beware the spooky ps/2 driver that does not work
ohno
what driver does work
abandon all hope ye who enter here
none 😔
like everything else BUT ps/2 ☠️
why cant yall fix PS/2 then 
well wanna know a fun thing
interrupts or smth???
on my machines it works
its just on LITERALLY EVERYONE ELSE'S THAT IT DOES NOT
so I cant debug this shit
yeah
idk what machines you have but i hope i get lucky bcs im gonna do this on a laptop and i assume its gonna emulate ps/2
1.8 gb root image 😔
that wont work for booting on real hw
yeah ik
you'll need the initrd iso
the root is just the filesystem for it to mount into
I need to start shipping unified images ☠️
yeah i read the qemu command thing its the hard drive crap
possibly 
emulation time™
UPDATE YOUR LIMINE
just copy paste it 
it mightve killed itself a little
the next line didnt screenshot it says timeout
is command in the github evil
of course its minimal its minimal
im not running the initrd thing tho im running the top one i assume its what im supposed to boot
talking about the boot screen
did i not mount smth
oh right, I forgot that now I literally only ship the minimal distro
you'll have to install stuff
xbps-install xorg-server etc etc etc
explains it
xbps-install -S xorg-server fvwm3 xterm etcetcetcetc
run netd vionet0 btw
to start the networking
ohok
sudo doesnt seem to work by default do i have to install it
it seems to be there its just not owned by "uid 0" (root?)
wait who is it owned by
i forgot to say it "doesnt have the setuid bit set"
also i ran stat on it it says uid0
eror™
well that was supposed to be ran by the init hook
RIP
yes

get a new image
or if u dont want just set it to suid but you might get spooky filesystem errors
bugstral
since ext2 is very corruption prone on dirty shutdowns

fair
i redownloaded image and it still dies
i may be blind but no
ykw im running it from root MUAHAHAHAHAHAAHAHA
logout sharted itself
acpi shutdown time
you sure you not running the same image? it is literally supposed to do that on the first boot
yeah I dont start login in a loop
I'm downloading the github image to see if that happens on my end
im running the one from november 3rd
idk its on yo github
november 3rd is quite a while ago
I think I fucked up and have a bad image uploaded (I think I opened up it for testing and forgot to copy a new one)
oh
lemme see if theres a good one in astral-os.org
broski
tfw developer no test thing 😔
(and or dementia)
I think I just opened it and closed without syncing
which is funny becaues thats stupid
i was going to say "did you dirty shutdown your own os" 😭
yeah
UPDATE!!!(128612789io487128941278918972487129487421142
how did u implement it?
use pmc to get an nmi every set amount of tsc cycles -> record backtrace onto a ringbuffer that is shared between a per-cpu kernel thread and the nmi -> these threads funnel it into a single global ringbuffer which is exposed to userspace in /dev/prof -> the astral-prof program opens it, discards what was there and starts copying data from it into a specified location (be it a file or /dev/com0 or whatever) -> you can now use a python script to generate the flamegraph from that profiler data
daamn
very inspired by the mangarm profiler
evil
ok now it says 1.99
safari crash out
it blackscreens
no booting lololol
works on my end
I'll add e9 logging to the bootdisk hold on
k
Certified
moment

yes 😩
version up
its debugcon
i forgot thats the qemu one
ok so pure silence
literally nothing
ok im gonna go get my linux pc out
the mac gods dont like me rn
not even limine?
nothing on e9 is crazy tho
stuff gets printed on e9 like first thing that happens almost
shrug
maybe the version of limine I was on didnt play well with it or something
EVIL limine
That would be good to do performance shit
anyway, mlibc bump and world rebuild ongoing
hopefully not too much shit I have to fix considering the infinity abi breaks and pollution fixes
super close to hitting 30k loc
oh fuck I gotta update gcc so I can update mlibc
thats fun
Btw how architecture (and notably bootloader)-agnostic is Astral
I'll be getting some time soon and I might do some work on that PPC port that you hinted at wanting to do sometime Soon™
But if it's still heavily tied to x86_64+Limine then I'll probably hold off until it would be less painful
isnt ppc the one with like inverse page tables or some shsit like that
as much as I have tried to be arch agnostic astral really likes running with an hhdm and there are probably many x86isms that need to be ironed out
and theres no bootloader abstraction
yeah maybe until I already have it ported to another arch like riscv64 or aarch64
Oh yeah that'll likely entail DT parsing which would be a huge help if it already existed
oh god thsi is gonna fucking suuuck
gcc 15 using std23 by default is already causing build issues and I am not even 2% done
🥀
if I keep getting packages broken becauaze of this I am dropping to gcc 14
yeah no I am dropping to gcc 14 I cba
its either adding -std=gnu17 to almost every package or updating almost every package
ok, have gotten a minimal distro to build with gcc 14 and latest mlibc
time for the rest of the owl
xorg is down
codeberg and freedesktop websites when it comes to downtime
How long does it take to compiler
depends on your computer
on a high end machine it'll probably take a couple hours
of course if we're talking about building a full distro
building astral
wish me luck
i kinda want to make an astral distro
like a lightweight one that doesnt take a bazillion years to compile
just gcc, kernel and userland
and probably pacman for package management
damn it only took a few minutes for me what
anyways what do i do now>
oh yeah
oop nvm
still needs to compile perl
what?
do i have to shell hop again
Oh yeah edit the perl recipe to remove that bash call
I forgot it there 💀
I recommend waiting a bit to do a full world rebuild
I am working on updating mlibc
And so when I do youll have to rebuild everything
@grand shadow btw did profiling reveal any bottlenecks
Havent taken a look yet, Im gonna do that once I finish updating mlibc
But from that first flamegraph u can see that munmap takes a ridiculous amount of time
oki
probably unlikely minecraft spams those
iirc its the glxgears itself spamming it
oh bruh
do u profile across multiple cpus or how does it work btw
like is it a kernel wide profile or process wide
kernel-wide all cpus
I could maybe get away with telling it to profile only a process
but for now this works
this is the glxgears loop code
plus some time accounting and the X event handling
immediate mode opengl is interesting, its kinda impossible to tell what that sequence of calls is going to result in
what does glCallList do? Looks like it references some predefined list
anyway i hope whatever minecraft is doing doesnt result in a mmap/munmap per frame
like even linux cant do more than ~50k unmaps a second
you define a list of vertices/texcoords/etc once and then you can draw it in a single call with glcalllist
ah so kinda like vbos etc
yea
well apart from the latest few major versions mc mostly uses immediate mode sooo
wait really?
yeah
damn
even with the "use vbos" option enabled, it makes a new vbo each frame, draws it once, then destroys it immediately
how do they manage to use custom shaders and stuff if they use immediate mode?

☠️
iirc with custom shaders they force the "use vbo" behavior i described
but it's been a while since i looked at that part of the old mc codebase so i could be wrong
thats crazy inefficient
to be clear i'm talking about 1.8 and the like
in proper modern versions they use actual decent rendering techniques
i guess notch wasnt that great at graphics programming 
another Managarm win 
ci-boot.py[63]: stdout: memory mapping, size = 1 MiB
ci-boot.py[63]: stdout: 134676 iterations per second
ci-boot.py[63]: stdout: 134743 iterations per second
ci-boot.py[63]: stdout: 134529 iterations per second
ci-boot.py[63]: stdout: 135607 iterations per second
ci-boot.py[63]: stdout: 135869 iterations per second
ci-boot.py[63]: stdout: avg: 135084, std: 544

Damn
whats managarm
Pragmatic microkernel-based OS with fully asynchronous I/O - managarm/managarm
tysm
flamegraph of running minecraft on astral
why the fuck is the page fault handler taking that much even tho vmm_pagefault is a tiny spec
a better question would be
why is it running after interrupt_set?
ah wait
the stack contains the thing AFTER the call
but still
I should fix that and have it point to the call
ohhh I dont add the rip into the log
me when I am me when me
well shit
I think its time for me to stop being lazy and give astral an actual non shit vmm datastructure
me when linked list vmm
guess sooner rather than later I gotta implement rbtrees
wait why is vmm_getrange under pfisr
think I'm missing a call somewhere
still, that is a looong ass time in getrange
I need a real data structure for this
I could have an avl tree which is piss easy to implement but thats boring and rbtrees are cooler
(plus its what everyone uses so its probably better)
cc @analog berry since u wanted to know what was bottlenecking mc so much
oh yeah I forgot to + 1 the backtrace size
So basically bad vmm?
pretty much
it spends most of the time in getrange()
which just iterates over the linked list
Yeah thats pretty bad
since I'm gonna be on a big break soon I can probably get a rbtree implementation working before the year ends
that should at least double performance maybe triple
I'm guessing this is for finding free ranges?
getting the range of an address
ah
oh it gets inlined that explains it
So you're saying it might not actually be getrange?
no it is getrange
the stack trace just shows pfisr because its still with the vmm_pagefault rbp
Ah, the second graph would be inlining disabled.
like if you look here, getrange should be above vmm_pagefault
but its not because it gets inlined
I'm gonna try astral at some point, lmk if you want to see it running off a USB on my framework laptop ;)
bet, maybe at one point when I get ps/2 fixed for real
I guess that's a good way to check your trackpad support
IIRC framework has a USB trackpad
lol
I can do you one of my old PCs then, will take me a bit to find PS2 mouse and keeb though
I'd try running it on my main if I didn't have the principle of never running a hobby OS on something I don't want filesystems corrupted on :P
I'm off now. Keep up the good work.
AVL is faster in practice for lookup-intensive workloads iirc
But rbtrees are better in general
yeah
I need to impelemt inline unwinding in the addr2line call in the flamegraph script
you should try caching the result of getrange
or… try using a data structure better suited for frequent lookups
better than caching linked list lookup results
AVL vs rb is not that important
anything but a linked list tho
left-leaning rb trees are much simpler than avl
well yea do that too ofc
but caching should still help
since its quite common to lookup the same range over and over
What do you use for that rn?
linked list, which is not really good for this
I plan on writing a red-black tree implementation
Ahh, well yeah that's not good
🆗👍
how did you get this flamegraph?
use PMC to generate a nmi every X tsc cycles
that nmi takes a backtrace and stores it in a per cpu ringbuffer
a per cpu thread copies the data from that per cpu ringbuffer into a global ringbuffer
that global ringbuffer is exposed to userspace in /dev/prof
there is a userspace utility that is used to copy the data, discard old data etc etc and copy it into a file (could be a file or say /dev/com0)
then there is a python script that takes that file, puts it in a format flamegraph wants and generates a flamegraph out of it
why did you decide on a linkedlist
That was like 3 years ago and I was lazy
yes
Its surprisingly common to use a linked list for map entries
Mach vmm did so and it was inherited by its descendents
With at least a last map entry faulted on cache however
So for the typical case just test if that's the one you faulted on. This approach worked well for a long time
interesting
"worked" implies it doesn't anymore?
I assume address spaces were smaller + less fragmented back then
I use a rbtree for vmm
@grand shadow how does astrals init route work? I'm thinking about making one as im kind of tired of having 10k init calls in my main func
Macro soup that takes a name, flags, function and a list of dependencies
It loops over a special section that has pointers to init routines, and goes calling them and their dependencies
currently trying out os-test stuff on astral
it git cloned from gitlab and is compiling now
compiled, getting it to run
so far only one crash (syscall_accept() code did not check for an implemented socket op and thus call to zero)
and a hang on "udp/bind-socket-shutdown-r-sendto-first-poll"
ohhh woa I like it
I might wanna adapt it to support modules depending on modules, although I don't need that yet because modules can't link to other modules currently
i have that
but i don't use extra code to encode those dependencies
i just have the dependencies in the dynamic section of the modules
the compiler/linker creates them for me
where do you call them?
wdym where
i do
i specify the modules i want to link against in the build system, and the dependencies get saved like regular shared objects in userspace
the kernel doesn't do automatic dependency resolving though, it's up to the user to load the modules in the correct order
the kernel will simply refuse to load a module if a dependency is not loaded
omg sorry I confused you with mathew 😭😭
I'm sleepy I see
💀
It would be hard for the kernel to resolve the dependencies anyway
yeah
since it doesn't know where they are
I want to give the user the choice to make e.g. a driver modular or not, similar to how Linux does it
in fact I am using Kconfig :3
i did that before
but rust is kinda annoying in this regard
i can't use a build system of my choice
oh yeah, rust really does want you to use their stuff
I had to deal with it with my Makefile mess, as I have support for rust
i want to use meson but i'm being held up by stupid issues
I actually quite like my makefile mess, it's a mini kbuild
I had done an oopsie when compiling the os-test and now after recompiling it I run into more issues, so I will do more debugging of it later
I don't really see the point of that as long as you have a way for the user to pass boot modules
same

it really depends on the platform, you may just simply not want the overhead of loading the extra modules instead of linking them right into the kernel
or there's simply no option for the bootloader to pass any modules that way
sometime my ESP8266 port will get somewhere..
okay so schedule is:
finish uni project
do some os-test work
then write out an rbtree implementation
negative refcount 
happened because I forgot to check if the fifo vnode was already bound to a pipe before unbinding it
woo that seems to be the only remaining hard issue on os-test
time to shove those results into linux and see how astral did
astral better than macos real 
(this is missing the locale stuff by leo)
cc @timid jetty
wrong leo ☠️
cc @formal patio
hm most of the udp tests fail because connect return ENOTSUP on udp
that sounds like a easy way of bumping up the score
0% on pty is crazy tho
all ENOSYS
tf am I missing
oh wait
wasnt openpty turned into a sysdep or something
well thats another place that probably can get more % on
seems like a lot of the sys_socket code did not work because ENETUNREACH
huh it does seem like I have most of the infrastructure needed in udp to support udp connect() its just that I dont have udp_connect() proper
UDP connect is kinda an oxymoron if you think about it
What with a protocol that doesn't handshake at all
might be because of unlockpt
well it serves the "set the address to send datagrams to" purpose ig
Sure
#define TIOCSPTLCK 0x13376167
actually hm, I'm seeing that unlockpt() is a noop on like bsds
ah whtaver I can make it a no-op ioctl kernel side
or just check that its the master pty
<---- forgot to add POLLHUP to his ptys
How do you get those?
os test
I feel like if I try os-test on maestro it would be a disaster
maybe
how to do os-test
I guess you need to download it from https://gitlab.com/sortix/os-test but gitlab is dead apparently
don't you need sshd
idk. If that's the case then I cannot run it 
not necessarily
ssh is only preferred if you want sortie to update os-test results on the website
you can run it without ssh locally
or you can do the managarm/redox strategy of allowing sortie to download os-test result tarballs from CI
well i'd just use os-test for my own purposes
is it hard to run locally?
i remember you talking about some memes with html or something
why?
You have to do that on the host
On astral with 12gbs of ram it still SIGBUS'd the html process
wth?
html generation is fine on managarm tho
there's just no point to doing it on managarm when I can do it on my host, where I also have other results available, and where I can view the results, too
how does one do that? does it like print intermediate results to a file?
imagine acpi microwave turn on support
oh skull
I have a leak somewhere then
or it does some allocation on loop because it never seems to print anything
os-test writes the results to files, and I can just shut down managarm, mount the image and copy that out
‼️
considering doing a switch over to xbstrap at some point
since newer jinx does NOT work on my environment for some reason
theres a bug on jinx that has been happening for the past 3 months
one thing i'd miss from jinx would be functions
just being able to do meson_configure is pretty neat
I dont use that so I'd not miss out on much
it saves about 10-20 lines per recipe
gonna use ebuilds
I do wonder how difficult it would be to use ebuilds
it would be very fucking funny if I did that
switch out xbps for portage
port openrc
and become gentoo 2.0
and in like 5 years when astral is actually fast I can mog on the haters by using portage without binary packages
but for now, I'm gonna finish the linux-mlibc-os-test project using xbstrap to get a feel for it and later I can see if I can do an ebuild mlibc linux thing to also get a feel for that
Using ebuilds would probably not be that difficult
Using nix may also be an interesting option
iirc @tribal dust was doing that basically
have you considered trying to figure out the bug instead?
i do not have the time to effectively juggle all the projects i work on, sorry
all you did was ping me with an error message that i have never seen, without instructions for me to be able to reproduce it
idk wtf you wanted me to do about it lol
not even so much as to tell me basics about your environment like what your distro is, etc.
i know you're way smarter than this Mathew, so if this is just about looking for an excuse to fully bite into the managarm ecosystem, for whatever reason, do so
you don't really need to give me an excuse, unless you're trying to give yourself an excuse
use rpm spec files 
I think he should be banned immediately.
it literally is just running ../jinx rebuild * on wsl ubuntu 24, it doesnt even get to actually building any packages (but it is after the debian container is set up)
I remember adding a mkdir or something got jinx further #1061407633745125397 message but it still died somewhere else
I'll try actually debugging it then
I still prefer jinx to xbstrap because yesterday I realized writing yaml sucks 💀
lmaooooooo
it has the same issues with python wrt identation and like shell scripts are just more convenient
build: |
which is why I was gonna start looking into ebuilds but thats probably another kanker into itself
the last known good commit is 0.6.7 
I dont see any big changes other than how debootstrap is called so hm
dawg I read my own message wrong
jinx 6.7 is not the good commit its the first bad commit
running on 3 hours of sleep 🔥
I can build astral using jinx 6.8 just fine (after changing build-if-needed + the needed jinx version + setting debian snapshot version)
or well apparently I can't because of some m4 meme (might need a bit older snapshot idk) but like at least it started building 
also what would be nice would be having some kind of minimal desktop package set
yeah I need to do that
probably just figure out some minimal set that can boot into fvwm with xterm
or maybe that has all the xorg shit + fonts + some other packages
yeah debootstrap is not creating /usr/local
lowkenuinely a great idea
bro FUCK ME I'm trying to open the debian wiki about deboostrap but wiki.debian.org is down
🥀
skill issue
time and place
unless you're running wsl1, wsl is just a normal linux vm with some fancy stuff to make the user experience better
so i highly doubt it's anything to do with that, especially considering it works for me™
but i never used the weird ass ubuntu distro
are u running it on a mounted ntfs
no
cuz for me those have been fucky asf
I'm not that insane
you can see the path is ~/...
good
ok I have a clue
somehow the second stage bootstrap is not being run
theres no errors logged which sucks
you can try using set -x
to see all the commands being ran
but it might be a little verbose
can just set -x before the run_in_container1 "$JINX_CACHE_DIR/sets/.image" /debootstrap/debootstrap --second-stage and set +x after
that's not gonna do much considering it unshares and executes a new shell instance
can you probably try doing sh -c 'set -x; /debootstrap/debootstrap --second-stage'
set -e
set -x
ld_preload=/nochown.so home=/root lang=en_us.utf-8 lc_collate=c path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin ld_library_path=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib debian_frontend=noninteractive "/debootstrap/debootstrap" \
"--second-stage" \
# keep this whitespace
' > dbstraplog &> dbstraperr```
this runs but dbstraplog and dbstraperr are empty
env -i path= chroot
chroot not found
fym
that path= does not look like it should be empty
tho nothing in jinx sets ${path}
hope you do, its fun
wait why is everything inside this string lowercase
what the fuck is this some curl bullshit
@sage locust sorry for bothering you again but I think found what was the issue: I forgot to pass --raw to curl I am actually stupid ☠️
TIL that curl does http shit if you dont disable that
wait wtf that was not it??? what
nothing ever works
y4 macro’s?
nice green role bro
why would jinx care about what flags you pass to curl?
It’s an upgrade over white for sure
i think mathewnd meant that when you download jinx using curl it might have screwed with the actual script
for some reason downloading jinx using curl made everything inside the strings do lowercase because it does some http processing bullshit
dont diss green bro 💔 I read that wrong
lol
http does not do any processing btw
then idfk why curl made everything lowercase but it did
Maybe it's doing processing based on the mime type
iirc jinx distros now switched to git cloning the jinx repo and copying out the script
Skill issue bro
I'm running on 3 hours of sleep and a few peanuts
smh
sounds wasteful
just thought about this
port system using lua when 
you either do that or ship a copy of the jinx script in your repo
Bro I’ve been working since 6am (now 13:47)
i think that's what gloire does
nah bash is pretty much ideal for this but whatever lua is cooler
or python
Just gotta write a yaml generator in lua, then you can use xbstrap with it 
my biggest gripe with xbstrap is yaml
i hate it
i think ebuilds may be a good alternative though
and I will try them in the future
- I get free gentoo recipes
xrbuildtool
Since xbstrap now supports preprocessing you can in principle use any language that can emit json as a recipe lang for xbstrap :^)
wait until you realize the amount of patching you'll have to do to have them build for non-linux non-glibc platforms
wait until you realize most gentoo packages run on freebsd too
gentoo freebsd is a thing
thank god.
but that shows its portable
yeah, i guess, overlays are a thing
i think arsen made an mlibc overlay or something lol
overlays are repos
no it's literally just a name for a repo
yeah i know, but for the people who dont know it sounds like it does more than just provide packages
but anyway if the portage repos were ported to freebsd I'm pretty sure its doable to do it for your own OS
cant u remove the gentoo main overlay and use your own instead or something
yes
you literally do that with managarm tho
yea I know its not
but like this isnt really true
Whether the recipes actually work is a different story:^)
- xbstrap and steal from managarm
- jinx and steal from gloire
- ebuild and steal from gentoo
- pkgbuild and steal from arch

unless you wanna run linux specific software
nix
xbps and steal from void
I wanna see if nix is feasible for a hobby OS lol
xbps-src is dogshit
am i only who steals some stuff from arch pkgbuild
afaik ebuilds are pretty much the best
for that kinda stuff
another option would be to use netbsd's port tree
ebuilds still have the disadvantage that they are shell scripts
how is that a disadvantage?
how is that a disadvantage
nix is side effect free 
just run it in a container bro
xbstrap is also side effect free
then it's side effect free*
nix is an overengineered way to do shell + container
how? it still runs shell commands in the end
It's still not deterministic though
It knows what it will run in advance though
I don't understand the issue
like, jinx is pretty much deterministic
and it's a glorified shell script in a container
That's why it's really easy to support distributed builds, for example
which is what xbbs does
phd level script
I still don't get why shell scripts dont work
is it because you have finer control over when commands get executed?
brother
unshare --user --map-root-user --mount --pid --fork -- sh -c "
set -e
mount --rbind --make-rslave /dev '${run_in_cont1_root}/dev'
mount -t proc proc '${run_in_cont1_root}/proc'
mount --rbind --make-rslave /sys '${run_in_cont1_root}/sys'
mount -t tmpfs run '${run_in_cont1_root}/run'
mount -t tmpfs tmpfs '${run_in_cont1_root}/tmp'
mount -t tmpfs tmpfs '${run_in_cont1_root}/var/tmp'
mount --bind '${apt_cache}' '${run_in_cont1_root}/var/cache/apt/archives'
env -i PATH="${PATH}" chroot '${run_in_cont1_root}' /bin/sh -c '
set -e
LD_PRELOAD=/nochown.so \
HOME=/root \
LANG=en_US.UTF-8 \
LC_COLLATE=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin \
LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib \
DEBIAN_FRONTEND=noninteractive \
$(for arg in "$@"; do echo '"'"$(echo "${arg}" | sed 's/"/\\"/g')"'" \'; done)
# keep this whitespace
'
"
see that "${PATH}" there?
Shell scripts work in principle if you have the discipline that everything is 100% deterministic
see those double quotes?
${PATH} is being expanded outside that string
thats fucking everything up
if thats the issue its gonna be so funny
do you have spaces in PATH or in cwd?
yes wsl does

lol
mfw "Program Files"
oh, mine also does that
/mnt/c/Program Files/NVIDIA Corporation/NVIDIA App/NvDLISR
crazy
hm then that shouldn't be an issue i guess?
running jinx for real now lets see
DEBOOTSTRAP SECOND STAGE RAN
guess I gotta create a codeberg account now
i like to look at this channel at random at times and just be surprised at how random it is
true random
pixel art genuinely impressive
you can just send me a git format-patch formatted patch
thanks for looking into it <3
np lol
I already made an account so I'm gonna open the pr when I'm done testing it
ya ok its working
yeah it's a wsl2 issu
I'm surprised that this doesn't cause even more issues
i've worked around it a while back by disabling the feature
because i've had other issues with it in the past
i think with pip or dune
I'd expect many of the make based build systems to break
Real men steal and rewrite in yaml 
No I look at them too if needed
is there any way to disable it redownloading the whole tarball on a jinx rebuild? I am spamming the gnu mirrors downloading gcc over and over again ☠️
it doesn't do that after it succeeds installation once
i make it succeed once by stubbing everything
aka comment out all steps
then it should not do that anymore
I see, thanks
np
cooking up an rbtree insert implementation while running on 3 hours of sleep at 11 pm, what could go wrong
wdym cooking up
you guys arent translating the "introduction to algorithms" pseudocode to C
?
Tfw you actually want to understand the code you wrote 🥀
My dsa class did not give any pseudocode for rbtrees
At most we got the trees
And even then the slides arent complete and fail to mention some stuff ☠️
Plus it makes me feel smarter knowing I was able to actually implement that
well the pseudocode is far from complete
In my class my professor always gave out implementations for shit like linked lists in the labs 💀
Like if u cannot write a linked list u not built for this
stuff like rbtrees aren't conceptually complicated
So they're not hard to understand
Yeah
Once u understand them doing it without any pseudocode is also easy
yeah that's how I did AVL
rbtree in particular I implemented a while back and didn't bother
Do u use both in your os or did you swing towards one over the other
both
The funniest data structure I have is HAMT
That's conceptually very simple but the implementation is a bit tricky to get right
I think I remember you mentioning that before
Inb4 30k line hello world like infy
nah it's around like 8k total atm and it has a scheduler
yeah it's a fixed version of my fancy scheduler
Seems to work pretty well
now I haven't worked on stuff for like two weeks because of finals but I'll get back to it soon (I was in the middle of implementing turnstiles)
still working on that rbtree
had a busy weekend but now I'll have a bunch of free time
wonder how big of a speedup will rbtree + caching the last accessed range per thread would be
especially on mc where like 70% of the time is spent on range search 
When you say caching the last accessed range, do you mean that you just store it as a pointer in your vmm context? I assume that you could just check that first during a pagefaukt before iterating through all ranges?
Because that’s hella smart + simple
probably storing it in a per thread variable
since each thread will be faulting different addresses
Oh true
But same idea
Can I yoink that idea for my vmm
I still use a linked list for my ranges and I don’t feel like switching to something better rn so I kind of need the free speed where I can get it
Bet
Also I’ve said this before I think but your project is so sick
2030 year of the Astral desktop?
seems like I will have to add a container_of macro to astral finally 
first test run of the rbtree (with 100 nodes):
I triple checked the insert function to make sure everything is ok so maybe I made an error in the check function where I did not triple check it
thats an issue for tomorrow me
its 3 am
looking at it its only after 2 inserts which is not enough for a black height violation
so my check is broken
ok, that was a check bug
now I think I actually hit a bug in the insert
I think its a bug with the left rotation
something is causing a right pointer to become null
when it should not
update: rbtree insertion works
can insert 100 values and look them up and they all pass the check
the 101st value is what gets you
Yeah id add test cases for every rebalance case at least
If you insert a few few 1000 random elements, you'll hit each case anyway
also removal is easy to fuck up
Don't remove stuff. Reboot machine when out of memory
replace removed element with tombstone :^)
the discord way ™
Reboot the human using it, the design is very human
release mustard gas (resurrect the body afterwards)
@grand shadowI am currently taking "inspiration" from your VFS code to maybe possibly finally come up with something somewhat sane for my kernel and I wonder if you can break the devfs
unfortunately I'm at school and the wifi is too slow to download the astral image, so I can't test it rn
what happens if you
- mount a devfs on at
/dev - mount devfs again (which is the points to the same files as the first one right?) at e.g.
/mnt - mount a tmpfs on
/mnt(on top of the devfs)
Now if you look at /dev you should see the tmpfs instead I think???? until you unmount /mnt again
Just guessing, I may also just be completely wrong as all this is from me just studying the code
Yeah that is kind of expected, as it mounts the same vnode
I dont really support bind mounts and traditionally you cant mount the same filesystem twice
So this is more so a hacky way of supporting mounting devfs to multiple places
I thought so, okay
hehe
silly :3
2025 is almost over and so I need a proper 2026 goals list for astral
hmmmm
- compiling a distro inside itself without crashing, even if a minimal distro
- procfs, maybe
- audio stack
- finish the installation guide or write a install program
maybe throw in a webkitgtk there, but I feel like thats way too ambitious
Debian GNU/Astral when 
it works on Hurd and the BSDs....
(or at least, did, at various points in the past)
honestly not completely far fetched
wtf is that
numa
O-Zone - Dragostea Din Tei [Official Video]
iTunes: https://itunes.apple.com/it/album/dragostea-din-tei/1295665938
Spotify: https://open.spotify.com/album/5KJRYCxiahHmBjZkzY4HzL
"Dragostea Din Tei" è una della tante hit della dance band moldava O-Zone. La loro storia è cominciata nella Repubblica Moldava, dove Dan, Arsenie e Radu hanno conosc...
each vertex on those hypercubes is 2 numa nodes
4 processors
in an SGI Origin 2000 from 1998
thats the network topology between them for cache coherency messages and so on
1 computer
i always remember this song whenever i hear talk about NUMA
its so funny
WOW 
NUMA?! Pretty Nice reading SRAT and SLIT
How lol, I don't get the reference
One of the lyrics of the song go "Nu mă, nu mă iei", which sounds like "Numa Numa Yay!" in English
thus, the "Numa Numa" song
LOL
and thus the connection I keep drawing unintentionally with NUMA (non-uniform memory access)
honestly i wanna make an astral distro called Tidal Axis with its own package management system called axpkg
and make wayland support for the astral kernel
If u want I can make the kernel build standalone from the rest
i can't do that yet :(
Software Framebuffer or GPU (even virtio)
btw what is this wm
fvwm
istg u can take any random 1-3 letters and postfix wm and it probably exists
67wm
or de
wmde 
dewm 
except it would be like a desktop environment instead of a window manager
rbtree update: inserting 1000 nodes and removing them does not break the rbtree properties (tested after each operation)
I will do more specific tests like checking if succession is ok and then maybe do a test with 10000 or 100'000 nodes
ok predecessor and successor checks seem to be working
iterative rbtree is almost done :D just gotta tidy up the code
50k worked, 100k didnt work because rand is not random enough to not repeat stuff :P
even if it were perfectly random it wouldnt be that shocking to get a duplicate in 100k
if its a 32 bit rng
its not LIKELY but if you saw it every once in a long while it shouldnt be surprising
time to begin converting the vmm to using the new rbtree
one last function remaining, changemap
ya :3
sure let me finish integrating the rbtree into the vmm and I'll do it
(and rewriting the worst function there while at it)
oh thats a bug I never noticed
when splitting a mapping and in the remap case I dont set the middle file offset properly
astral is unix-like iirc, no?
the thing about xbps is that it is super convenient to use with jinx, as jinx already creates xbps packages for you
it is
im not gonna use jinx
in tidal axis development
ah then you can just use whichever package manager you would want
or at least for axpkg
@sharp carbon when you added the arch_extracontext_detect() function, did you try it on tcg as well? it seems like tcg really does not like the mov to cr4
I don't think I did, and looking at the code again now, the xsave presence check is indeed incorrect: it should check if CPUID[1].ECX[26] is set, not if CPUID[0].EAX >= 0x0D
I'll check if that fixes it in a bit
currently working on the rbtree stuff
got to a bash prompt using it
went thru all the whole init and first boot process too
so it seems to at least be working for most cases
fvwm boots
time for the trvth nvke
oops, didnt work but thats because of a lazy assert I added for a very specific case (unmap on an empty space)
damn java doesnt work
🥀
spooky backtrace
meinkraft got into the main menu, creating a world to see if it works
too many debugging logs to get an idea of improvement tho
ran into the font meme I dont have the patch for
actually I forgot if thats a patch I need or just an unclean shutdown after handling fonts which causes a failure on the next shutdown
new minecraft flamegraph
the lookup funkyness has been eliminated
didnt notice a lot of perf improvement in mc though
I also need to figure out that isr_14
because it only happens in the brief time the very start of the page fault isr is being executed
but its taking up so much time that idk if its the cpu taking too many cycles to handle a page fault because kvm in wsl or what
I still gotta do the range caching thing
oh wait my laptop also isnt connected to power
💀
building astral rn, i wanna see if i can write an xhci driver
Yooooooo
i don't promise anything but if it works out it'd be pretty sick :^)
i hope you have msi(-x) support, otherwise i'll be very sad
I do
I dont have any support for the acpi pci interrupt pin thing
But I do have uacpi :P
that's fine, i'll use msi(-x) since that's what xhci spec requires iirc
or i might be wrong, who knows, not me since i haven't looked at the spec in god knows how long
but even then, having a shared interrupt handler is probably fine

bashline.c:65:10: fatal error: builtins/builtext.h: No such file or directory
65 | #include "builtins/builtext.h" /* for read_builtin */
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.```

lol what i just reran make and bash built just fine, wild
yeah i'm not sure what that was about lol
but it's all good now
i wrote a qucik gen_compile_db.py script to create a compile_commands.json, should help writing any code considering i don't know the codebase at all
i'll start working as soon as everything is built, i think i'm building a full distro so that might take a second
wait astral doesn't use meson/cmake?
I don't know enough about jinx to figure out how astral gets built 
Just a plaon makefile
And yeah by default it builds a full distro, you can change it in the makefile using the DISTROTYPE variable (set it to minimal)
bruh
how would you like a PR that changes that to meson 
if it aint broke...
handwritten Makefiles are always broken
at best, it's just (yet) undiscovered brokenness 
meson has it's own set of issues
not a problem, i can wait, a wm will be useful to test usb mouse anyway :)


