#OBOS (not vibecoded)
1 messages Β· Page 43 of 1
mine
i got only 39
done that
im doing retransmission
welp
ok we ball
retransmission is implemented
and it works over "a network"
(my home wifi)
it seems like SACK processing is kind of broken
and also it seems like packet loss is not dealt with kindly
and that kinda just continues on forever
each time sending more data
holy crap lois
they wanted squashed and rebased commits
ah
FFUCK WAIT I ONOW WHT THIS HAPPENS
ILL EXPLAIN IN A SECOND
indeed it is a bug with retransmission
iirc
I forgot to set hdr.seq to the right value
while retransmitting segments
i fixed the tcp retransmission bug
the bug was two things:
- hdr.seq was being set to snd.nxt, which is not what a retransmission should do (it should set the sequence to the sequence of the retransmitted segment, duh)
- and snd.nxt was being updated, which it should not do (because the connection state should not change except for the congestion window, possibly)
no way
i can download a file on obos from obos
just there is a "tiny" bug
the kernel will kinda just start sending these weird keep alives
after the FINs are exchanged
which i think is a bug with retransmission
why did you decide to put your TCP stack in the kernel instead of userspace
isnt that the norm? also because sockets
and by that last thing, I mean because it makes it easier to implement networking sockets (i.e., AF_INET sockets)
(but perhaps this is debatable)
i dont know of a single non-microkernel kernel that puts the network stack in userspace
although that would be cool
anyway, if anyone wants to test my obos webserver, that is up
try downloading http://obos-dev.ddns.net:8080/largefile
the sha256sum of that file is: 6b2a6a0b2cf8bd1f8d2a1ef4daea91623a14b3b10752b5a083c2fc9b14bbf332
on a good (internet) connection, i get around 1mbps speeds
can u retry now
just timed out
now works
actually
I tried again again lol
still stops at 105.9k
[ LOG ] (thread 15, process 2) syscall Sys_RecvFrom returned 0x20 (OBOS_STATUS_TIMED_OUT)
same here 
how weird it stops for me too
it worked like
right before i committed the code
:aaaaa:
okok now it should work (i changed absolutely no code at all)
nope
oiajdeolkjasjdas\
105.9k instantly, then nothing
seems like ur network is the problem ngl 
π
currently downloading at a limited rate of 1k to see where it stops now
20k so far, going strong
16
i see the problem, it only takes me 14 
stopped at 64002
who crashed
you
it's not quite a crash, interestingly
the http server kind of a bit hangs sometimes
no clue why
if u want just do sudo ss -K dst 71.19.148.125 to kill off that connection
as it's probably in FIN-WAIT-2 if u ctrl+c'ed
well ig i have to fix my shit a bit more 
yeah no it's you still
i stopped the server
ah
so it makes quite a bit of sense if it isn't responding 
ive seen that having this printf:
printf("ACK_LEFT %d ACK_RIGHT %d SND.NXT %d SND.UNA %d\n", ack_left - con->state.snd.iss, ack_right - con->state.snd.iss, con->state.snd.nxt - con->state.snd.iss, con->state.snd.una - con->state.snd.iss);
increased reliability
for some reason
all it is is a debug log i had when rewriting the transmission code
ah wait
i think it's my selective ACK code
which doesn't really seem to work right
i disabled selective ACK could u try now (should work now?)
selective ACKs seem to mess up my retransmission code
stopped at 97656
bryufhsdfhsdihds
can u physically move closer to my vps
after doing that ss command, it's 105.9k again
it's in oklahoma
first let me see how far i get locally
wait
no
im stupid
I copied the wrong link and it was trying https instead
okay I tried again and... nothing.
the vps is openbsd and idk what the equivalent to ss is there
ss just kills active sockets
you dont technically have to do it but i do that just to not leave any open connections on my host
told u it was ur network 
what the actual fuck
that's so weird, usually my vps is the one that has issues connecting to things
I can only get about 100k/s though
how many hops from your vps to mine out of curiosity
9
interesting
anyway my problem seems to be that:
- my congestion control code is bad
- and my my retransmission code is unreliable
did it fully download?
but the sum doesnt really matter
i want to see if it partially downloaded everything properly
bde1c55f4e890cb359d6bae674313b43ddfb442af6ddfbc94e91ec24590cf170
7110656 bytes
I think
yay the file integrity is good:
bde1c55f4e890cb359d6bae674313b43ddfb442af6ddfbc94e91ec24590cf170 largefile.part
my tcp code still has a lot of work to be done on it
but it:
a) works on my machine
b) works on other machines (sometimes)
now, @dense vigil was able to do a full download of the file
hm
also is the favorite part of the tcp stack for a trans person a retransmission timer?
(get it cuz like retransmission timer, like it's a joke hahaha)
((ill stop))
anyway, the webserver running on obos may or may not work depending on where u are
(maybe my tcp stack is racist?)
the fastest i can get download speeds are 3 megabytes a second
and that is on the vps itself
what is the localhost speeds?
^
no I mean on obos
let me try
you have a loopback interface right?
yes
it downloads 32k then stalls 
(im not kidding)
((my LO interface is terrible))
π
ik it's a problem with my LO interface because
an OBOS can communicate with another OBOS just fine
with tcp
but
when an OBOS tries to talk to itself
it gets shy or smth
and kind of just fails
i think that is because i dont know how queues were supposed to work or something idefk
i have added initialization of the utmpx entries to obos
for now, the BOOT_TIME entry is initialized
so uptime works
well thats something at least
in case anyone was wondering this is how the kernel currently looks like:
DOOM1.WAD looks like this:
this is what libstdc++-v3.so looks like:
i personally think it looks the coolest, although i do not like c++
its like that atari game which used its own source code as a forcefield effect
Why does your kernel have so many 0s
heck c++ but this is the coolest screen nonsense for sure
inb4 messed up bss
π
@flint idol send me your kernel binary
the gray part before the void looks like dynamic stuff
and after it looks like symtab
5mb π
oh wait yeah
that's debug info lol
wait no
@flint idol broi
the zeroes are all .data
ye
π
this is driver info for in-kernel drivers
can you give me a link to where this is handled?
because my vnodes have references to drivers, if i want sockets, for example, i need to make a mock driver header
i think you messed up a size or alignment
here's an example
https://github.com/OBOS-dev/obos/blob/master/src/oboskrnl/vfs/pipe.c
it's a 912 byte structure
with like 256 bytes reserved
also 64 bytes for the driver name field
given this is the fifo driver, there are also a bunch of undefined ftable entries
there are also 256 bytes worth of ACPI PnP IDs
that are unused
(aka zero)
and an unused pciId field
this is mainly because all these fields are zero
ffffffff800f53e0 g O .data 0000000000080000 OBOS_ArchSyscallTable
hehe
why is your syscall table 512 KiB

well you have almost a full megabyte of zeroes with OBOS_SyscallTable and OBOS_ArchSyscallTable combined
oops
lmfao
i shrunk the table to 512 entries
why isn't this in the bss tho
#define SYSCALL_BEGIN (0)
#define SYSCALL_END (0x200)```
(from)
```c
#define SYSCALL_BEGIN (0)
#define SYSCALL_END (0x10000)```
this isn't even used you can just make the whole table a constant and only have space for the entries you actually need
because the syscalls that do exist are statically registered in the table
...
so there's some non-zero entries at the beginning in both tables
yeah
ask me from 1.325 years ago
huge waste of memory
obos will NOT fit on a floppy disk
i recommend a hex editor btw
very nice to analyze binaries
ghidra/IDA as well
010editor is paid but it has this templating thing
i just did readelf -WS to see what section was consuming all that memory, then objdump -t | sort to see what symbols were there and looked for large ones
stripped oboskrnl binary minus very large syscall table
mfw -4MB
imhex has this as well and is free
lmfao

*1M
lol your data section is only 18kb now
obos does NOT have a lot of data
this is how the kernel looks like now (the zeros at the bottom are not from the binary)
anyway i gtg now
i might make an optimization to my tlb shootdowns
to set and reset cr3 to clear the tlb for very large TLB shootdowns
cant invplg be enough ?
idk
for like really large shootdowns maybe not
ive read that somewhere on this server I think
is tlb shootdowns used for syncing unmap and etc. in smp
yes
[uACPI][INFO]: successfully loaded 1 AML blob, 1705 ops in 0ms (avg 4635948/s)```
w/ lazy irql
i was able to get 4.6M ops/s
except for the fact that lazy irql is completely broken this is pretty cool
and this would put me behind menix in that metric
on the leaderboard
I wonder if you could get on the leaderboards with a kernel thatβs only goal is to run uACPI fast
True
hold on might snatch this
first boot of obos with upstream mlibc!!
-# (absolutely nothing has changed)
oh wait
i forgot to actually
install the updated package
oh fuck
i didnt think that would happen
i need to fix my xbps package generation
so like
ig someone who used to own my vps' ip
had a domain
cuz I searched obos-dev out of boredom
and found m.shh.sh which is a domain that has my vps ip
I need to fix a bug
on line 393 of mixer.c
in obos-aud
and i also want to fix smth to do with audio quality
I want to change the master volume to be applied on the final buffer
not on anything intermediate
I have an idea for my allocator
a majority of the allocations in my kernel are calloc
so what if I have two freelists
one for zeroed blocks (so basically newly mapped blocks)
and another for dirty blocks
The normal allocation functions will try to take dirty blocks first then fallback to zeroed blocks then fallback to mapping a new block of memory
and the calloc function will do the same but steps one and two reversed
and will also only memset memory if it was from the dirty blocks list
@dense vigil what's ur opinion on this
Why not keep track of dirty and clean pages
And then have a background thread to clean pages etc
And then you can just get fresh pages etc
And do that
this isnt a page allocator
this is the heap
I mean Iβm also talking for the page allocator
the page allocator doesn't need to keep track of dirty and clean pages
But this is a good idea I approve
my idea behind this is so that calloc wont always have to do a memset
so basically just to remove a redundant memset
also ive heard that this is terrible for cache
the background zeroing thread
Huh neat
idk maybe im wrong
Youβre correct
the idea is that newly mapped memory then that is guaranteed to be zero
with mmap
idk exactly what a slab allocator looks like but from my understanding my allocator is pretty similar to one
except the block sizes go by powers of two
i do this too almost exactly
interesting
a slab is powers of two, but its for objects smaller than a page rather than groups of pages
though i dont actually use this much because i dont have a tree-based paged pool yet, only my buddy allocator nonpaged pool where pages always stay resident
do you have a zeroing thread? thats part of my plan, to have a low priority thread that takes nonzero free pages and zeros them out
no
also like this
so how do pages get added to the zero list?
this is contested
this is contested
also id def be interested in hearing more about if a zeroing thread is bad for cache and what the arguments would be
on both sides
the windows kernel still uses a zeroing thread and they just use nontemporal writes to avoid polluting cache
no such thing in my kernel
the fact that the windows kernel uses free and zero lists and a zeroing thread is actually where i got the idea to do that
oh it was an idea, not something you do yet, got it
the windows kernel team did their own benchmarks in response to the movement against zeroing threads in BSDland and received results that encouraged them to keep their own
but they use fancy non cache polluting writes
which the BSD people may not have bothered experimenting with
or didnt exist back then
to the same degree of usefulness they do now
yeah
how does obos's heap work btw? ive got a buddy allocator for nonpaged pool rn but looking into examples of how to actually do it for the paged stuff and just other ideas in general
the common wisdom against a zero page thread comes from i think dfbsd who benchmarked it and decided it was actually now a pessimization on modern hardware as it was implemented (which hadnt changed much since the 90s) and they removed it
without further experimentation
(i also use zig and zig allocators prefer not doing calloc and instead defaults to filling stuff with an undefined poison value on debug modes and letting people initialize their own stuff with case-specific defaults so calloc is way less common)
it has one cache for each possible power of two allocation size from 16 bytes to 4GiB. each cache contains a freelist and a spinlock. the allocation function finds the appropriate cache for the size requested, locks the cache takes a node from the freelist and if it doesnt exist it allocates a new page and tries again, then it unlocks the cache and returns the allocated memory
the free function just adds the node to the freelist of the appropriate cache
ok so if your max was 2048 instead of 4gib youd have described a slab allocator directly btw, its just you keep going up to bigger sizes lol
the new page is then divided into size chunks
and added to the cache
yeah thats what a slab allocator is, each page worth of items in the cache is called a slab in the allocator
ic
if the kernel requests a page or more then it generally always falls back to mapping a new region
(and then in 06 some linux dev nerds looked at it and decided to go overboard and optimize it by cramming all the metadata for the free list into struct page with extra nested union hell, creating slub)
actually this is the case all the time i believe
(and then some nerd made slub again but readable and put it in proxima and it get 10x better perf than my version of the same allocator for some reason)
ok yeah that makes sense. how does obos handle mappings? do you have an hhdm or are you using some tree structure or something?
the vma does some cursed shit with my rb tree to find avaliable space in between regions
ah, rb tree nonsense, got it
That's interesting. Are there any benchmarks from Windows?
im going by what a windows kernel guy said when we brought it up to him
he didnt show us the benchmarks but he said "we saw this and did our own benchmarks and couldnt replicate the bad results with our own page zeroer" or something like that
Can their data be trusted as relevant for non-Windows systems?
It seems that they experimented with this subsystem, and not always successfully: https://randomascii.wordpress.com/2022/07/11/slower-memory-zeroing-through-parallelism/ Seeing this, I believe that this is battle-hardened information.
PS: By the way, when I click on the X to remove the image coming from the link, does it disappear only for me or for everyone?
for everyone
yeah ive read this
unfortunate
i think their decision to keep the page zeroing thread predates the introduction of that bug though
and i think the bug has been fixed
Phew, thank you.
That's right.
They fixed it, and after that they probably squeezed the maximum out of parallel zeroing
And I don't know if it will work that well without such a system
Yeah, it's a whole subsystem in the memory manager with separate calibration during initialization, measurements and dynamic adaptations
[uACPI][INFO]: successfully loaded 1 AML blob, 1702 ops in 0ms (avg 3507181/s)```
i made the allocator optimizations i said yesterday
and i also made it allocate more pages at once
and got this much ops/s
so i think it's a worthwhile optimization
[uACPI][INFO]: successfully loaded 1 AML blob, 1702 ops in 0ms (avg 3823035/s)```
and this already puts me ahead of Orange
but i would need more effort to get ahead of keyronex
Orange is at 4 million+
its a duplicate score
oh

i guess i need some more optimizations
clang is better at optimizing right 
[uACPI][INFO]: successfully loaded 1 AML blob, 1702 ops in 0ms (avg 5157075/s)```
its old

p2w
Btw if you need me to benchmark on a 5700x LMK
So you can beat OBOS more
if i like redo my VMA i could get really high scores
but that is a whole lot of work icl
Bump allocate it all 
ngl not even a bad idea
to only check in between regions after the bump allocator fails
hm bump allocation in vma doesn't help it
[uACPI][INFO]: successfully loaded 1 AML blob, 1702 ops in 0ms (avg 5438429/s)```
I love it when the TSC calibration code glitches
[uACPI][INFO]: successfully loaded 1 AML blob, 1702 ops in 0ms (avg 3906779/s)```
was able to get this, seems legit enough
try to do pvclock
timer for kvm
yes i searched it
[uACPI][INFO]: successfully loaded 1 AML blob, 1702 ops in 0ms (avg 5378603/s)```
im not sure if it's a timing glitch this time
i mean every other time ive gotten 3M+
but never >4M
so prob
π
rn im optimizing hot paths in the kernel
like the irql interfaces
Why not use performance counters or pebs in this case
Could implement a simple performance monitoring api this way
I am confused what this has to do with optimizing hot paths in the kernel
I mean, if youβre optimising hot paths in the kernel, youβd want to see where your bottlenecks are and whatβs causing them
Hence why strategies like TMAM exist
I have some benchmark thing that monkuous made with the gcc option
that i use for that
Fairs
and i know this is a hot path
because it is the irql manipulation functions
every irq
every spinlcok
every normal lock
every event object
uses it
if u r calling into any code there is a 99% chance that the irql is changed in some way im pretty sure
Nuttx have some pretty nice benchmarking utilities, osperf and cyclictest are really good (these arenβt nuttx specific)
oki
Makes it a lot easier to see where too much time is being spent
Performance counters /pebs can narrow down the reasons quite a lot
bump
this morning I worked on file truncation
in the VFS
as I did not have that
and it was messing up programs like nano
and it almost kinda works
except for some reason somewhere i forgot to unlock a mutex which makes no sense
oh wait i see it now
I also need to fix a bug that happens when compiling with clang on windows
or well
the m$ provided clang in vs2022
because im tryna boot obos
but when i built it
that build crashes in the driver elf loader (?)
which is weird
i would've worked on it after school
but i had to finish a safety assignment
for tech
or smth
(who even needed safety to begin with?)
wtf
it was because
it expect Sys_GetCWD to zero out the buffer
or ig
it was just because i forgot to null-terminate the buffer
anyway nano now works properly
i just pushed all my commits
im gonna have to PR in my O_TRUNC thing
to managarm/mlibc
(soon)
I think I found a typo: https://github.com/OBOS-dev/obos/blob/master/dependencies/limine.cmake#L25. I think you forgot to put "Linux" after "on".
if you're turned off you cant compile obos though, this is correct 
oh right
noticed this the other day while tryna compile on windows
why didnt you fix it

dementia
ig I forgot i noticed the mistake
cheap is talk. patches you send
I want to optimize obos' memory overhead tbh
it uses a shitton of memory to boot (20M of physical!!)
and thats a lot and I have no idea why
Because your using 20m of physical memory? Try not using it

Nah but seriously
Canβt you like have your PMM log every allocated page
And then look at it through serial
And see whatβs calling it and shit
no?
its 20 fucking megabytes lmfao
It would be slow but i mean?
it would be untrackable
You could have it tossed into a program to parse it and analyze it
Isnβt there a way to know what called a function for debugging?
that lets you do thag
but this is untraceable because of the sheer number of allocations
and because the majority of allocations through the pmm go through the vmm
the vmm reports 13M of memory used at boot
the rest is overhead that only God knows where it comes from
Record every allocation using a macro and line/file intrinsics and put them in a hash table
Linux can do that in new versions btw
i actually just added counters to my allocator myself, its really useful to have
why a hash table
why not just output them then filter them using a script or something
actually have done that before
it's a pretty cool script imo
(it's written in c++)
although
it serves the purpose of checking for leaks and memory bugs
rather than just tracking memory usage
To be able to access the stats at runtime after boot, especially on real hw
the key would be file:line?
Yep
does obos do preemption of threads?
idk man I feel like that is kind of necessary for the whole "userspace" thing
elaborate a bit cuz i feel like there is more to this question than I can see
specifically preempting a thread by enqueuing a thread of higher priority
oh no not yet
thats the one im not sure how to do in my kernel rn lol
I tried that when I say hyenasky's message in #schedulers
today
but alas, something hung
rip
I could try to get a working solution tomorrow
or you could read hyenasky's code (?)
no pressure, just obos is an os i know works so while im ruminating on this i figured id check on if obos does the thing lol
tbh my main concern is the idea of doing thread context switching in an interrupt handler since there is no instant where im in between contexts
where do you signal eoi on the timer interrupt? i think thatll actually help answer my question indirectly now that im thinking more about what im actually trying to figure out lol
found it
thanks for all the inspiration mate
EOIs are signaled at the beginning of each interrupt
after irql is raised
np
and i can keep using my batshit compiler abuse of a context switch mechanism lmao
id recommend it for obos but unfortunately c compilers dont like it
could u send some code im kinda curious
it relies on a compiler always adhering exactly to a register constraint on inline asm
quite interesting
its normal looking context switch code. load the new rbp, rsp, rip from memory into gprs, save the old rbp, rsp, rip to memory, and then actually load the rbp, rsp, and rip. except instead of saving registers using instructions i just tell the compiler yeah im clobbering everything please take care of it for me
by re-returning my arg pointer through the inline asm constraints i can transfer a pointer to the new thread
from the old thread
which i can then containerof (zig calls it fieldparentptr instead) to get a pointer to a struct on the old thread's stack
and then use that to get the old thread pointer and call schedule
if you have questions feel free to come over to my thread and i can try to answer, dont want to clog up obos chat too much
someone in my thread said that this wont work on c because c compilers are allowed to just say fuck you and ignore the register constraint completely if they want
idk how true that is tho
when a thread is appended to the runqueue, if it's higher priority than the current thread, then force preemption
thats it
cool (I understood nothing)
oh the burning urge
to do linux syscall compat
oh the stale branches for tcp congestion control
and xhci
yearning to be worked on
yet
i do nothing
what a sad reality, for these abandoned features
F
anyway time to fix the ext driver
do it
send
dont listen to haters
lmao
it's 2:5 votes rn lmao
do listen to the haters (disclaimer: is one of the haters)
be unique
i already have a syscall api
im bored
dont wanna do xhci
dont wanna deal with tcp
mhm one day ill have a working ext2 driver that doesn't corrupt the filesystem
until then
enjoy your non-persistent ramfs
like i want to do something
but all there is to do is booooooooooooooooooring
can some1 send patches?
say
where would someone start for linux compat

ig i need some file descriptor syscall won't i
then i would need to
rewrite every preexisting syscall to translate from obos_status to errno
and then rewrite every syscall to actually be linux compatible
that's a whole lot of work icl
you should have carefully designed the semantics of your native syscalls to not directly conflict with those of Linux and then do your Linux subsystem as a distinct set of wrappers around the native calls
(well it's not a rewrite technically, but i would have to write a lot of syscall wrappers)
ah fuck it
why not
nvm
im just gonna do smth else
i could probably fix scheduler bugs
but the scheduler has no "bugs" (that i know of)
but it isnt the best
hm
acpi trolling me
welp lmao
big trollage
cc @real pecan how come S3 returned?
hm it mightve just failed
I dont check for errors
idk? print out the return value lol
idk if its reproducible π
maybe u had suspend disabled in qemu
lucky
bump
bump
OBOS π π
I agree
Linux β¬οΈ
Managerms 
even better: someone fix a bug and send patches
how about the bash not building bug?
that's probably an annoying one though
build system bug, I could probably fix it by making builds reproducible with a container
deleting discord for fluxxer soon
age verification as we all know
I am on the osdev server on fluxxer as oberrow ofc
and I will be making an obos server for progress report until they get threads
im not on the osdev server, the website refuses to feed me the mac os installer
π
the web client doesnt work either 
they have issues rn
obviously
OBOS fluxer server: https://fluxer.gg/vW82XQJ1
@knotty totem i remember you were having problems with downloading files from a webserver running on obos from your home network? if I were to start a webserver would you be able to drop me a packet capture so I can examine why it breaks?
curl -O http://obos-dev.ddns.net:8080/largefile
and ping me when you can test it (if you want to of course)
Not right now but yes
ok thanks
alright I'm ready
just tried and didn't get any response at all, in ~5sec
yeah because the server is down
if you want to retry try in 5 seconds
and dont forget the pcap
alright pcap is goin
:/ firefox isn't letting me upload files
wtf
give me a minute π
ok
dm'd with link to it since I still can't fucking figure out file uploads

is it on localhost or in a different vm
even more based
nice
very impressive, good work
now connect to obos from obos via a router running obos 
U can also do it without nat for internetworking if u aint a coward 
Make sure to send me ur ip if u do
127.0.0.1
10.66.66.2
whoops
death
this seems to be the initrd driver promising it found a file that doesn't actually exist
bruhb
i did this by making fake_root_hehe then doing ln -s ../usr usr in fake_root_hehe
then chroot'ing into it
psychotic
nice
i was able to chroot into an ext2 disk
which is cool ig
havent done anything on this for a while
yesh so can somebody send patches for NAT
ill work on the xhci driver if someone send patches
i might implement a mountable devfs
i just made it so the permission namespace thing i did
works in chroots as well
so you can limit chroot permissions
(this is in a chroot)
of course, one can just chmod that file to reenable whatever was disabled
so as long as no one thinks of that you keep the /sys/perm namespace outside of the chroot you are fine
Why not do kernel level enforcement of this
Like some Linux security things they do does similar?
the point is that the user can change the capability's permissions
for a chroot, I am going to add another syscall, Sys_ChangePermRoot, which allows the permission root to be outside of the chroot
Ahhh
when openrc port
in 7 weeks and 3 days
what is ispeed and what is ospeed in termios
ok
found it out
What are they
ispeed is input baud rate
ospeed is output baud rate
I β€οΈ x86 UART
one of these days I'm going to find a teletypewriter and start using it for osdev/with hobby oses
I need to make my driver a bit better by not hard coding things but itβs really nice
Would that work with any old plan serial interface
Or parallel
serial but they're usually 5 bit characters iirc so would need conversion
depends on the era of teletypewriter though
No ascii?

5 bit baudot code lol, named after the same guy as the baud rate
do u know what happens if divisor is set to zero in x86 uart
teletypes (btw that's where tty comes from, TeleTYpe) predate 7 bit ascii by like 80 years at least
nvm
Do not be tempted to use a divisor of 0 to try to get an infinite baud rate, it won't work. Most serial controllers will generate a unspecified and unpredictable baud rate (and anyway infinite baud would mean infinite transmission errors as they are proportional.)
lol
also generally baud rate is one of those things that needs to be synced up between all the things on the line afaik
so itd need to be configurable for sure
Undefined
:O
from like 1870ish through 1930 there was one 5-bit code, then from 1930ish until ascii was invented there was a different incompatible standard 5 bit code, and then teletypes got like half a decade of running on ascii before electronic terminals completely replaced them
it definitely is, through termios
and through my weird ioctl
Isnβt termios through ioctl?
and then after a few decades remote terminals got replaced by just putting the terminal into the damn computer, and then people started making software terminals because we missed remote terminals so much lmao
I wonder why 5 bits? I know ascii is 7 bits (but it takes up the full byte) to make it easier for electronics to interface with it
I guess computers then were much different in terms of that?
teletypes predate computers, originally itd be just two of them connected over the wire and anythign typed on one would appear on the other
Huh neat
yes
but i also have a weird /dev/COM* ioctl that isnt defined anywhere else
I should implement them so I have source compatability with OBOS
they are not used anywhere.
yeah its cool. they even invented cryptography machines for them in the 30s that operate by passing 5 bits in and getting a different 5 bits out
Like the enigma machine but automatic?
yep
now i want to figure out a way to get some sort of login running on it
getty?
wassat again
nah im just gonna use my own login thing
then what is it for
You use it to configure it and everything etc
And it spawns login on that interface
And handles the FD stuff iirc
oh also the 5 bit code is fully stateful, if you send 0x1B you swap to figures mode and if you send 0x1F you swap to letters mode, and theres no upper or lower case letters
meh
Is that even worth the saved bits
Itβs 3 bits
why do you think ascii was invented lol, its because this 5 bit shit was both annoying and not good enough
also with teletypes being physical typewriters you get shit like the state of the art being 75 baud
which is not a lot of baud
True XD
But what were they smoking when they made the 5 bits shit
idk originally for baudot, the newer 5 bit code in the 30s was to try and keep compat with physical equipment and youd just need to swap around what character meant what signal - by then they had tape punchers and readers that all expected 5 bits
hell yeah
Thatβs also what getty handles iirc
no but the login should not stop working
it should just start a new login prompt
what it does not do is: start a new login prompt
it hangs or something
Yeah thatβs what getty does :p it would spawn a new login prompt? Wouldnβt login replace its self with bash
as in: it is programmed to do this
[ DEBUG ] (thread 21, process 9) syscall Sys_WaitProcess returned 0x0 (OBOS_STATUS_SUCCESS)
[ DEBUG ] (thread 21, process 9) syscall Sys_HandleClose/SysS_GDBStubBindDevice(0x4000051, 0x0, 0x0, 0x0, 0x0)
[ DEBUG ] (thread 21, process 9) syscall Sys_HandleClose/SysS_GDBStubBindDevice returned 0x0 (OBOS_STATUS_SUCCESS)
[ DEBUG ] (thread 21, process 9) syscall Sys_FdIoctl(0x0, 0x2, 0x803da0, 0x3c, 0x0)
[ DEBUG ] (thread 21, process 9) syscall Sys_FdIoctl returned 0x0 (OBOS_STATUS_SUCCESS)
[ DEBUG ] (thread 21, process 9) syscall Sys_FdIoctl(0x0, 0x1, 0x803da0, 0x3c, 0x0)
[ DEBUG ] (thread 21, process 9) syscall Sys_FdIoctl returned 0x0 (OBOS_STATUS_SUCCESS)
[ DEBUG ] (thread 21, process 9) syscall Sys_FdWrite(0x2, 0x4023c0, 0x4, 0x802a40, 0x0)
[ DEBUG ] (thread 21, process 9) syscall Sys_FdWrite returned 0x0 (OBOS_STATUS_SUCCESS)
[ DEBUG ] (thread 21, process 9) syscall Sys_FdWrite(0x2, 0x401af4, 0x8, 0x802e10, 0x0)
[ DEBUG ] (thread 21, process 9) syscall Sys_FdWrite returned 0x0 (OBOS_STATUS_SUCCESS)
this is the syscall log of login
it writes and hangs
oh yeah
a few weeks ago
I made a change to my allocator that I documented here
about how I changed it to have the two freelists
one for zero blocks and one for regular free blocks
I forgot to mention a reason of why this is theoretically quicker
memzero pages in every single page that it zeroes
which is undesirable for already zero blocks
so not doing that can technically make it faster in the short term
so hows the weather

yeah that one is unblocked lol
you could use your desktop and then inject the cookies into OBOS 
can files download 
yes
oooo
In obos-strap when building bash what's the difference between these two?
[ "make", "install", "DESTDIR=${destdir}" ],
[ "make", "DESTDIR=${bin_package_prefix}", "install" ],
one puts it into the sysroot the other puts it into a different sysroot for the binary package
aka the xbps package
wdym by "different sysroot for the binary package"?
the binary package's files are collected in a different directory
so that they can be archived into the xbps file
check build bin pkg.c of obos strap if you want to see what I mean
Imma look
Okay where specifically?
Like
Does it just archive the package on the host for later use/sharing the pkg?
I have always wondered how easy it would be to get ebuilds to work for packaging and building the distro
idk
Anyway today I plan on testing obos on a school computer
in a vm today
then bug fixes then on real hw
rn I might review the tcp congestion control branch
I got it to boot on the vm but the perf is dogwater
looking for motivation to work on this
i need to take my mind off stuff
ill just
cherry pick a commit into master
and call it a day
lol
- Sparc64 cpu

Yo can I explain what u mean?
sure
"find out what type of cpu it has"
????
x86?
what is that question π
no
are you in like 9th grade or something
im 15 yeah
you're only 15???????
yes
damn
lol
i thought you are older than me
makes sense then
no
same
Idk I was 15 and I wasn't doing stuff nearly that advanced
nah technically im turning 15 this year so im 14
why does everyone thing oberrow is like 20 or something
I thought you were like 18
WHAT?
YOU'RE YOUNGER THEN ME?
In fact after I turned 16 I started writing my first OS which was nanoshell
wtf
Before I had some shittier OSes
because u dont see 15 year olds at this level
even binder thought that oberrow is older than binder
idk about that one
Thanks!
every time i see OBOS i almost misread it as oboe
I should learn to play the oboe
Connect the oboe to your computer as a keyboard and mouse so you can program obos using an oboe
make midi driver for obos and hook an oboe to it
And program a music synthesizer that makes oboe noises
truly spoken by people who have no idea how musical instruments work 


