<geist>
this is what i was fiddling with last weekend. greaseweasel
<geist>
has floppy
<the_oz>
what kinda boiard is that
<kof673>
floppy on alpha was actually useful for firmware update, i mean they probably have cd-roms many times too, but will it read an arbitrary cd-r?
<geist>
the_oz: greaseweasel is a neat little board that lets you directly drive a floppy
<geist>
and take low level flux readings of a floppy and/or write it
<geist>
didn't look super deep in exactly what it means
<geist>
like does it set the minimum emulated level?
<kazinsal>
I didn't see anything about that in the changelog so idk
<kazinsal>
oh, it's a configure flag.
<geist>
oh i guess it's probably just generally setting the -march when compiling
<kazinsal>
yeah that's it
<geist>
i generally pass something like CFLAGS="-march=native" anyway
<kazinsal>
When built for the x86 architecture (either 32-bit or 64-bit) QEMU now can specify the desired architecture baseline. For example, configuring with --x86-version=2 will build a version of QEMU that requires x86-64-v2 processors (Intel Nehalem, or Sandy Bridge for the Pentium and Celeron lines, Intel Atom Silvermont, and AMD Bulldozer processors).
koon has quit [Quit: koon]
<kazinsal>
I tried passing it to qemu-system-i386 and it told me to go f myself so I just kinda went back to the other stuff I was doing
koon has joined #osdev
<geist>
oh kicad 8 is out too
<mjg>
why is there no downvote button on linkedin :thinkingface:
koon has quit [Quit: koon]
koon has joined #osdev
koon has quit [Client Quit]
koon has joined #osdev
<kazinsal>
because linkedin is a nightmare circus designed to promote the worst trends in the industry
<kazinsal>
it's hackernews for people with self-respect
<geist>
man i got a little tiny splinter in my finger that's entirely below the surface
<geist>
looked at it with my scope and i can't get it out without really digging a hole through my skin
<geist>
hate those kinda things
<kazinsal>
ugh yeah
<kazinsal>
I've got one like that in the side of my hand that I look at in the shower every morning and it's like, great, what do I do about that
<kazinsal>
tiny little black spec that I'd need to basically do autosurgery on
<geist>
yeah i started to pick at it a bit and then was like, nah i'll wait until tomorrow
<geist>
sometimes your body does a pretty good job of rejecting stuff like this pretty quickly
GeDaMo has joined #osdev
<mjg>
you were doing wood work
<mjg>
or rgot into a random-ass accident
<kazinsal>
man I wish I had space to do woodwork
<kazinsal>
I live in a 500 sqft apartment
<kazinsal>
I have to do soldering out on the balcony
<kazinsal>
which gets dicey in the PNW winters
m3a has quit [Ping timeout: 246 seconds]
aethlas has quit [Ping timeout: 246 seconds]
<the_oz>
everyone gets a participation trophy for using the internet
<the_oz>
criticism verboten
<kazinsal>
sure buddy
xvmt has quit [Remote host closed the connection]
xvmt has joined #osdev
rom4ik15 has joined #osdev
m5zs7k_ has joined #osdev
kitaleth_ has joined #osdev
pounce_ has joined #osdev
Benjojo_ has joined #osdev
antranigv_ has joined #osdev
[[R]] has joined #osdev
dequbed has joined #osdev
leon_ has joined #osdev
dostoyev1ky2 has joined #osdev
auronandace has joined #osdev
cross_ has joined #osdev
Ellenor has joined #osdev
hwpplayer1 has joined #osdev
ThinkT510 has quit [*.net *.split]
antranigv has quit [*.net *.split]
rom4ik1 has quit [*.net *.split]
Starfoxxes has quit [*.net *.split]
m5zs7k has quit [*.net *.split]
CapEnt has quit [*.net *.split]
MelanieUrsidino has quit [*.net *.split]
Benjojo has quit [*.net *.split]
rbox has quit [*.net *.split]
nadja has quit [*.net *.split]
kitaleth has quit [*.net *.split]
pounce has quit [*.net *.split]
cross has quit [*.net *.split]
dostoyevsky2 has quit [*.net *.split]
leon has quit [*.net *.split]
kitaleth_ is now known as kitaleth
Benjojo_ is now known as Benjojo
rom4ik15 is now known as rom4ik1
[[R]] is now known as rbox
m5zs7k_ is now known as m5zs7k
kfv has joined #osdev
pounce_ is now known as pounce
kfv has quit [Client Quit]
heat has joined #osdev
Starfoxxes has joined #osdev
CapEnt has joined #osdev
xvmt has quit [Read error: Connection reset by peer]
xvmt has joined #osdev
<heat>
good morning
<heat>
void
<heat>
initialize(HANDLE fd)
netbsduser has joined #osdev
<mjg>
OH
<kazinsal>
good morning. I'm about to make you feel old
<mjg>
/kickban heat fuck off
<kazinsal>
about five years ago a convention happened where one indie dev had a booth showing off an indie RPG
<kazinsal>
there were two control schemes available -- mouse and keyboard, and controller
<kazinsal>
among people under the age of 15, zero managed to grasp the M+K controls, and 50% grasped the controller controls
<kazinsal>
the rest were trying to grasp at the screen hoping for touchscreen controls.
kfv has joined #osdev
<mjg>
ooofff
<kazinsal>
this is a real life tale related from someone who was involved in not only this indie game's development but had previously been a certified security badass working in development for Blizzard's anticheat
<kazinsal>
we are now at the point where user interface among the average person is now grasping at touchscreens
<kazinsal>
as someone who has also done anticheat development and game UI clusterfucks, yeah. yeah it's that bad
<heat>
mjg, this is SGI code btw
<heat>
UNIX VENDOR
<kazinsal>
unix is dead. pray for a time machine back to 1982
<kazinsal>
mouse and keyboard is old people shit
<heat>
it's hilarious how old some of these tests are
<heat>
ltp has tests dating back to 1992
<heat>
i didn't find older than that, yet
<heat>
this SGI one is merely 24 years old
<mjg>
heat: bro fuck old unix
<kazinsal>
old unix rocks
<kazinsal>
imagine being the team to come up with that shit in like, 1971
<heat>
the duality of man.
<kazinsal>
you just cranked out a massive word processing and typesetting suite on a bespoke OS on a cheap minicomputer
youcai has quit [Read error: Connection reset by peer]
youcai has joined #osdev
antranigv_ is now known as antranigv
X-Scale has joined #osdev
pog has joined #osdev
<netbsduser>
what's the deal with folios anyway
<netbsduser>
at the moment it just looks like making new structs that alias the page struct
<netbsduser>
but a googler told me the long-term goal is to break the haughty power of the page struct to consume 1.5% of memory at all times, which is equal to seveteen jiggerbytes across all google servers, doncha know
spareproject has joined #osdev
<mjg>
netbsduser: the linux mm is a total clusterfuck
<mjg>
netbsduser: one of the problems was mass type confusion with orders of pages
<mjg>
netbsduser: the primary folio selling point is massive clean up
<mjg>
which then indeed is supposed to facilitate shrinking a bunch of stuff
<nikolar>
mass type confusion with orders of pages?
<mjg>
you dealing with a page
<mjg>
a compound page
<mjg>
or maybe several pages
<mjg>
it was all 'struct page' or something which you had to special case on
<zid`>
Human sacrifice, dogs and cats living together, you know, mass hysteria
<mjg>
now it is handled for you
<nikolar>
ah so you could be working with a single page, or a bunch of them, and it was the same type
<nikolar>
that's certainly an approach
<mjg>
introduction of folios is going from javascript to typescript
<nikolar>
lel
<the_oz>
seems rather stupid
<the_oz>
just change your social policy to prefer larger sized page.
<zid`>
My favourite social issue
<zid`>
page size
<the_oz>
start with an entrypoint where you can stop emulating "the default"
<the_oz>
because holy fuck dudes, you still don't have that?
<the_oz>
it is a social issue because among devs for some stupid reason you've all decided to be crazy together, and the attempted fix is to be crazy^crazy
<the_oz>
there's no need to decouple concept
<the_oz>
just change the fucking default
<nikolar>
zid`: kek
<nikolar>
so you think it's reasonable to represent a single page and a collection of pages with the same struct page
<nikolar>
and then you have to special case everywhere
<the_oz>
on architectures that make it natural, yeah, because I don't forsee needing to tell WHICH PART of the paging hierarchy is in use outside the mm
<the_oz>
life is hard for the MM devs, sucks to suck
<the_oz>
but also, you can just not need to look at it ever again, so just put up with idiosyncracies
<the_oz>
not >here's a second API and now we're crazycrazy
<nikolar>
i don't think the long term plan is to have two apis
<the_oz>
that's what everyone who STARTED the journey says
<the_oz>
*kerwink*
heat has quit [Read error: Connection reset by peer]
hwpplayer1 has quit [Quit: I'll be back later]
heat has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
<zid`>
I think struct page should just get more stuff in it, presents maybe. Like a kinder surprise.
<heat>
javascript -> typescript is unironically a great analogy
<heat>
though yes the long term goal is to shrink struct page down to a single pointer, that's dynamically allocated at runtime
<bslsk05>
yorickpeterse.com: Asynchronous IO: the next billion-dollar mistake?
<netbsduser>
"imagine a parallel universe where instead of focusing on making asynchronous IO work, we focused on improving the performance of OS threads such that one can easily use hundreds of thousands of OS threads without negatively impacting performance [...] You need to handle 100 000 requests that perform a mixture of IO and CPU bound work? Just use 100 000 threads and let the OS handle it.
<heat>
lol what
<netbsduser>
it is a nonstarter
<netbsduser>
hundreds of thousands of threads = gigabytes of kernel stack overhead alone
<zid`>
Good news for him is that we already did
<zid`>
the reason people avoid thread switches is because of the hardware level costs, so we have exactly as many threads as we want already
<zid`>
solved!
<netbsduser>
unless by "os threads" he accepts also m:n threading models, but those suck
<heat>
instead of this rcu garbage, have you focused on making the cpu go so fast the locks aren't an issue
<netbsduser>
actually the m:n model is not so bad, but only if you implement it in your programming language, like google golang does with its google goroutines
xenos1984 has quit [Read error: Connection reset by peer]
<zid`>
He even fucking *measured* it
<zid`>
*just* the switch, he argues costs 2usec, so he himself should realize that he requires like, 8 orders of magnitude of speedup
<heat>
>Libraries such as epoll and kqueue wouldn't need to exist, as one would just start a new OS thread for their blocking/polling needs
dostoyev1ky2 has quit [Quit: leaving]
<heat>
is crack cocaine cheaper now or something?
dostoyevsky2 has joined #osdev
<netbsduser>
epoll and kqueue, known libraries
<netbsduser>
what i don't understand is why he does not consider the possibility of letting you spawn language-level green threads and let the runtime make it so that you appear to be doing blocking i/o when in truth you are not
<childlikempress>
doesn't he literally talk about that though
<childlikempress>
i really dont understand what his problem is,,
<zid`>
He says some languages have non-blocking io, then describes blocking io!
<netbsduser>
he does talk about a thread pool to simulate async io
<netbsduser>
i don't see the problem
<zid`>
if he wants more threads, he can just add them, and he can measure the performance he gets for himself
<childlikempress>
like yeah go/erlang is fine and io_uring is the primitive to underlie that do that done done yay
<netbsduser>
just do that and implement your goroutines
<heat>
thread pool to simulate async io? hmmmmmm
<heat>
have you heard about posix aio
<zid`>
I don't know what the point of the article is, other than his shower thought of "computers would be different if they were different"
* childlikempress
hands heat glibc
<childlikempress>
didn't freebsd do it properly though
<zid`>
yes, if they worked like gpus, they would be like gpus. AMAZING ARTICLE.
<netbsduser>
childlikempress: thread pool in kernel
<heat>
GENIUS
<heat>
mind = blown
<childlikempress>
netbsduser: wahh
<heat>
(to be fair i think thread pools are unavoidable for certain AIO stuff, like io_uring also has them)
<netbsduser>
making file i/o truly asynchronous would be genuinely very tough and there's really no avoiding a thread pool there, at least not without restarting from scratch
<netbsduser>
i can expose async i/o directly from my kernel for e.g. read/write to disks because they are already basically asynchronous
<heat>
you can't really do true async in the page cache for instance
<heat>
for direct IO it's trivial-ish but only sometimes
<childlikempress>
in what sense is it 'not true async' if you just copy right away out of memory because you don't have to wait for anything
<netbsduser>
childlikempress: this is where mmap-based io in languages with green threads falls apart
<heat>
you do the OP synchronously, and it can also be costly (taking locks, copying large amounts of memory)
hwpplayer1 has joined #osdev
<childlikempress>
mmap🙀🙀❌❌🤮
<nikolar>
i go for 5 minutes and we're already shitting on someone
<nikolar>
nice
<dostoyevsky2>
aren't mmap'ed data structures underutilized?
<netbsduser>
i don't want to shit but i just don't think the article adds anything
<heat>
childlikempress, what's the problem with mmap, do you want to fight bruv
<netbsduser>
it's not a case of throwing billions of dollars at kernel threads to make them have "less overhead"
<nikolar>
lol i agree
<nikolar>
just funny
<netbsduser>
they are already quite lite on gnu/linux as it is
<zid`>
"computers would be different if they were different"
<zid`>
important article netbsduser
<nikolar>
zid`: absolutely
<nikolar>
what would we do without it
<heat>
have a wank?
<heat>
it would be a more productive use of everyone's time
<heat>
instead of, uhh, what if slow thing is fast
<dostoyevsky2>
heat: from my experience: mmap doesn't have good error messages when ram gets tight, and out of memory can be hard to predict... but that's why you should always have lots of ram, so you can have the convenience of mmap
<the_oz>
netbsduser: "imagine a parallel universe where" etc. Oh so green threads and CPS style that has existed already?
<nikolar>
dostoyevsky2: oom is hard to predict on linux in general
<nikolar>
because something something overcimmit
<netbsduser>
the_oz: if he were in favour of that then fair play to him
<the_oz>
atm machine. sigh.
<heat>
thats true
<netbsduser>
as a programming language creator he can make green threads and make it so that all IO appears to be blocking when really it is asynchronous
<nikolar>
what is heat
<heat>
what you said and what dostoyevsky2 said
<nikolar>
netbsduser: doesn't go do that
<netbsduser>
he'll need a thread pool to dispatch the file read/write stuff unless he wants to use aio_read/aio_write
<heat>
although note OOMs should be rare
<nikolar>
can allocation actually fail on bsds
<nikolar>
because it can't really on linux
<dostoyevsky2>
nikolar: well, at least when malloc fails you can print out a an error message like `out of memory' with mmap you just get a CPU exception which is mapped by e.g. linux to SIGBUS or SIGSEGV .... and that doesn't inspire a lot of confidence in your code
<nikolar>
dostoyevsky2: just buy more ram :P
<dostoyevsky2>
nikolar: Yeah, I am a huge fan of mmap, so I always have lots of ram... Just feels great to e.g. start python programs and simply attach like a 40G data set in like 10
<dostoyevsky2>
10ms
<zid`>
I think we should all give up on osdev and just talk about uma musume
<dostoyevsky2>
I guess it still needs to map all the tables, so maybe attaching is like 100ms, but still super fast, compared to loading a python pickle of that size
<heat>
>at least when malloc fails
<heat>
mmap does not fail
<heat>
and as such malloc does not fail
<dostoyevsky2>
heat: malloc returns 0 and then you print out an error
<heat>
malloc returns 0?
<nikolar>
you program just gets killed by the oom killer or the whole kernel panics :P
<nikolar>
allocation literally never fails on linux
<heat>
here's a trivia: have you ever seen malloc return NULL in linux?
<dostoyevsky2>
heat: I don't have it seen in practice actually... as I always have a lot of ram
<kof673>
well, the thing is, he can work on it if it is an issue. you either pay someone else, or do it yourself, or try to convince people. so he has 2 more options.
<heat>
it's _technically_ possible, but you need to explicitly disable overcommit OR you exhausted your whole address space (feasible on 32-bit, not 64)
<heat>
i love overcommit i love overcommit i love overcommit
<dostoyevsky2>
just scream as loud as you can "COME HERE MR WIZARD!!" 3 times, the wizard will then appear, or maybe it's just one of your neighbors doing a well-fare check
<heat>
the global financial system is on a permanent state of overcommit, kernels are just catching up
<the_oz>
I formally request a parlay with the resident wizard
<dostoyevsky2>
heat: money is like ram, isn't it?
<the_oz>
disks, ssds, nvme, ll of these re just slow persistent rm
<the_oz>
my key is broken
<the_oz>
aaaaaa
<dostoyevsky2>
the_oz: especially with nvme you are only like 10 times as slow as RAM
<the_oz>
unless you get one of those slowass intel 16/32 gig ones
<the_oz>
becuse "so cheap!" then you find out why it's so cheap
hwpplayer1 has quit [Read error: Connection reset by peer]
<kof673>
> PAGING i see what you did there
Left_Turn has joined #osdev
<sortie>
Paging is called that because you must use paper and pen to draw it all out in order to understand it
<dostoyevsky2>
I like those OSes where instead of syscall you write an email
<dostoyevsky2>
> NonStop OS is a message-based operating system designed for fault tolerance. It works with process pairs and ensures that backup processes on redundant CPUs take over in case of a process or CPU failure. Data integrity is maintained during those takeovers; no transactions or data are lost or corrupted.
<nikolar>
interesting
<dostoyevsky2>
You can have a 4 eyes check on a `syscall' on nonstop os... the syscall then gets added to the users' queue and will be executed after each OKs it
<dostoyevsky2>
They are also interesting in terms of hardware, they use infiniband or RoCE for the shared nothing architecture... so like a fat as ethernet card between different cpus
<nikolar>
that can't possibly be performant
<dostoyevsky2>
nikolar: it isn't.. but it's secure
<nikolar>
lel
<dostoyevsky2>
I did write some code for NonStop OS, it's like 10 times as slow as OpenBSD on a cheap vps...
<nikolar>
nice
xenos1984 has joined #osdev
<heat>
wow 10x slower than openbsd is very bad
<dostoyevsky2>
heat: And the NonStop hw it usually 100k, like the best infiband system intel can offer... or the biggest switch and eithernet cards for RoCE (shared memory over ethernet) you can get.... so on normal hw it could easily be like 100-1000 times slower
Maja has quit [Quit: No Ping reply in 180 seconds.]
<the_oz>
Oh it's a real thing? wtf. Not surprised but I didn't know that]
netbsduser has joined #osdev
<dostoyevsky>
I am rewriting some parts of vim for my TUI library and today is the first time I can do `1G' to go to be beginning of a file and `G' to go to the end... Just reading the keystrokes from stdin is a challenge because it might contain multiple keystrokes. The good news is that I haven't seen something like `^[[B' being broken up into multiple reads, only something like `^[[B^[[B^[[B' in one read
<nikolar>
dostoyevsky: what do you mean reweriting parts of vim
<nikolar>
like implementing vim-like line editing or something?
<dostoyevsky>
nikolar: Like for my TextEdit class in my TUI lib I am implementing it to behave like vim... and also reuse it for Input, so an input field is just a file with one line from this editor's perspective
<nikolar>
ah right, it sounded like you took vim code and rewrote some parts of it lol
auronandace is now known as ThinkT510
<zid`>
I hate having to deal with particles appearing in a subread problem, generally
<nikolar>
subread problem?
<zid`>
> reading the keystrokes from stdin is a challenge because it might contain multiple keystrokes. The good news is that I haven't seen something like `^[[B'
<zid`>
read() returns ^[, now what?
<zid`>
I have to keep that data around somewhere
<zid`>
and if I actually got "hello^[" then.. I have to use a rinbuffer? memmove it to the start?
<nikolar>
yeah not sure
<zid`>
it's annoying
<nikolar>
now i wonder what vim actually does
<zid`>
and it crops up a lot if you're protocols without end lengths
<zid`>
like say, you read from a socket and you're doing telnet
<zid`>
and you get IAC SHOULD TERMINAL-TITLE hello world the terminal title for this win
<dostoyevsky>
well, for supporting something like <n> command I already need to have a buffer... so if I run `500G' it will be four reads 5 0 0 G ... and I need to have a state machine just for the fact that `0' alone means `go to the beginning of the current line'
<zid`>
now each client needs a massive buffer, just because their telnet protocol might get split? bleh
<zid`>
and I have to be able to figure out where the message ends so that I can actually parse it
<zid`>
in a protocol non-agnostic way
<zid`>
so like telnet_is_this_msg_done_yet_idk
<zid`>
(buf, len_so_far)
<zid`>
inside my actual socket code? lame
<zid`>
or do I just thoughtlessly hand it off to telnet_* and it has its OWN internal buffer just for terminal names, and it state machines to "waiting for rest of name"?
<zid`>
so now I have another giant buffer yay
m3a has joined #osdev
<dostoyevsky>
something like ^[[B being broken up can happen if you read with a maxbuffer size that's not divisible by 3.... but to be able to read unicode characters in utf8 in one go you need to be divisible by 8.... That being said, multi-unicode emojis probably even need a bigger size... atm I am using a maximum buffer of 36 characters, which can be divided by 3 and 4
<zid`>
feed it some zalgotext
<dostoyevsky>
s/8/4/
<bslsk05>
<dostoyevsky*> something like ^[[B being broken up can happen if you read with a maxbuffer size that's not divisible by 3.... but to be able to read unicode characters in utf4 in one go you need to be divisible by 4.... That being said, multi-unicode emojis probably even need a bigger size... atm I am using a maximum buffer of 36 characters, which can be divided by 3 and 4
<nikolar>
lol
<nikolar>
utf4
<\Test_User>
regarding memmove vs ring buffer: how about just a realloc that goes in the other direction? as in, uses the *end* of the buffer as the fixed point to base the length rather than the start
<dostoyevsky>
seems like 🤦🏻♂️is one of the longest utf8 characters, (17 bytes) but I guess you can't type that fast enough to have it appear more than two times in a read from stdin with maxsize 36bytes
<the_oz>
also, I thought utf-8 doesn't have emojis because >mistake
<the_oz>
wrt 🤦
<zid`>
the flag emoji stuff is funny btw
<zid`>
it's just.. the country code
<nikolar>
zid`: scotland it GBSCT
<GeDaMo>
Ah, but the country code using special letters :P
<zid`>
that's the encoding for the flag, you put the funky big letters in the right order
<zid`>
and it magically turns into FLAG
<zid`>
I found that one out accidentally
<zid`>
do you remember when everybody was doing the big B emoji?
<zid`>
We were writing words out and someone managed to get a flag
<dostoyevsky2>
GeDaMo: hmmmm... Support for Tufte's spark lines would be great... but usually the unicode org is just adding characters for marketing purposes, not for an increase in practicability... so no \sum^{uppper}_{lower} or something like Tufte's sparklines
marcopolo2 has joined #osdev
<zid`>
thought it was a bug at first so we looked it up
<bslsk05>
go.dev: Go Playground - The Go Programming Language
<GeDaMo>
Length in bytes, codepoints or glyphs? :P
<nikolar>
there are several ways to look at the "length"
<nikolar>
:)
Left_Turn has quit [Ping timeout: 276 seconds]
<dostoyevsky2>
GeDaMo: It's the size of the utf8 representation in bytes; Go calls codepoints runes, for some reason: https://go.dev/play/p/bfjrd3lrG-O
<bslsk05>
go.dev: Go Playground - The Go Programming Language
<dostoyevsky2>
> “Code point” is a bit of a mouthful, so Go introduces a shorter term for the concept: rune.
<dostoyevsky2>
> In 1992, Thompson developed the UTF-8 encoding scheme together with Rob Pike. <- well, I guess they are entitled to refactor the unicode terminology a bit
<nikolar>
If ascii wasn't a 7 bit encoding, would have we been stuck on utf16 or something
<zid`>
yea kind of handy in retrospect
<the_oz>
dostoyevsky2, the holy napkin
<the_oz>
rob pike: "UTF-8 was designed, in front of my eyes, on a
<the_oz>
placemat in a New Jersey diner one night in September or so 1992."
<the_oz>
placemat, close enough
<nikolar>
zid`: too bad windows didn't get the memo :P
<dostoyevsky2>
the_oz: I can't shake the feeling that whoever designed utf8 had to be a bit drunk
<nikolar>
What's wrong with utf8
<zid`>
not enough runes
<zid`>
apparently
<the_oz>
4am coffee 'n changing history
<the_oz>
just thangs ya do when drunkginer
<the_oz>
drunkgineer*
<nikolar>
utf8 even tells you the codepoint size in the first byte
<nikolar>
What more could you want
<nikolar>
It's backwards compatible too
<the_oz>
backwards compatibility isn't always that great a feature
<nikolar>
In case of utf8, it's a killer feature
<nikolar>
With literally 0 downsides
<the_oz>
for their usage it was, but eventually somebody's gonna make a better thing to be backward compatible with
<the_oz>
for instance
<the_oz>
you could reorder characters such that 0-9 is the 0-9th character
<the_oz>
reorder further so 0-f is 0-f
<nikolar>
Why would you do that
<nikolar>
Why does it matter
<the_oz>
reorder further so base64
<the_oz>
is literally
<the_oz>
because when the math works out, the math works out
<the_oz>
it's not whether one should or not, but just because they can
<nikolar>
So we should make all exiting text on every computer invalid, just so some encoding could do one less addition
<nikolar>
That seems like a non reason
<nikolar>
Utf8 is fine and I have a feeling it will be fine for the foreseeable future
<dostoyevsky2>
nikolar: the different normalizations unicode supports is where utf8 gets weird, not sure why there are so many... basically you it's hard to compare unicode strings... I guess it's a general unicode feature and not limited to utf8 though
<the_oz>
only because you haven't figured out how to represent more characters in fewer bytes
<nikolar>
dostoyevsky2: sure, but that would be an issue with any encoding you pick
<the_oz>
maybe there's more to it if you'd care to hear it. But, I'm not here to convert you on a non complete character encoding
<dostoyevsky2>
nikolar: And there is no default normalization for utf8, which I think might be a problem... so e.g. if you rsync from a mac to a linux box via rsync, be sure to use `--iconv=UTF8-MAC,UTF8 '
<the_oz>
especially if unwilling, not my goal
<nikolar>
the_oz: considering that utf8 is roughly optimized to have shorter encodings for more common codepoint (forgot what that property is called) I'd say it's very close to optimal in that respect
<nikolar>
What's a non complete character encoding
<the_oz>
it is very close, minimal shaving
<zid`>
huffman encode your text, duh
<zid`>
You can beat huffman but I forget what they're called
<nikolar>
dostoyevsky2: I don't have Macs :)
<zid`>
you do weird shit like use a custom base to encode your symbols
<nikolar>
zid`: arithmetic coding
<zid`>
because your probabilities aren't powers of two
<zid`>
that's one yea
<zid`>
and then there's the other one
<zid`>
where you do a bit recursive float
<nikolar>
Yeah can't remember what that one's called
<nikolar>
arithmetic is recursive float I'm pretty sure
<dostoyevsky2>
nikolar: Alternatively: Scrape the internet... You always have to make sure to normalize correctly when trying to compare utf8 strings, and if you forget it might work like 99% of the time
<nikolar>
Eh Unicode is a nightmare, just treat strings as arrays of bytes terminated by 0 (in c)
<the_oz>
but sacrificing NULL and not caring about whether you need space for 1 2 or 3 bytes based off the backing up to the first byte
<zid`>
yea, never actually process *characters*
<zid`>
That's insanity
<zid`>
And the two times apple tried it, they had CVEs
<zid`>
they tried to split text for notifications and append "..."
<nikolar>
Lel nice
<zid`>
and ofc, RTL text instantly wrote out of a buffer and hard locked every iphone's screen
<zid`>
when everybody started texting it to each other
<nikolar>
I remember reading about those
<nikolar>
RTL was a mistake :P
<the_oz>
"what's a non complete character encoding"
<the_oz>
exactly how it sounds
<dostoyevsky2>
In my url title bot I started to dump the unicode forms of the utf8 strings, it's so messy, often multiple forms are matching
<the_oz>
vapor
<nikolar>
What library deals with Unicode normalization stuff
<nikolar>
icu or something
<zid`>
icu yea
<zid`>
i810n is illegal thankfully
<zid`>
I have FIXED WIDTH RECORDS and I have STRINGS, I do not have any characters
<zid`>
people who have characters are known as "typesetters"
<zid`>
not programmers
<the_oz>
what's the difference
<nikolar>
Lel
<zid`>
character are what authors use to give novels interesting action
<zid`>
a loosely typed conversion is when someone with shit spelling turns you christian
<nikolar>
Kek, that's not wrong
<the_oz>
I (CAST*) YOU OUT DEMON
<zid`>
C++ prorgrammer detected
spareproject has left #osdev [#osdev]
<the_oz>
don't malign me with your ++ism
<zid`>
Don't write types like a C++ programmer then and maybe I won't
<the_oz>
is there some convention I'm not aware of
<the_oz>
typedef struct {} vomit_t;?
<the_oz>
_oh_boy_I'm_in_cpp_now
<zid`>
int* vs int *
<dostoyevsky2>
I guess with utf16 the normalization is less severe because you are either in JavaScript which does normalize for you (I think) or Windows (which usually does need to convert from utf8 anyways, so adding the normalization on top doesn't seem much of extra overhead)
<the_oz>
omg the space
<zid`>
people have been killed over less
<nikolar>
^
<the_oz>
remind me to never touch your code
<the_oz>
ewwwwwwwwwwwwwwwwww
<nikolar>
dostoyevsky2: windows Unicode support is a nightmare, half their own stuff breaks with non ascii file paths
<zid`>
That's.. a very strange thing to call 'eww' over
<nikolar>
the_oz: do touch mine either, they look pretty similar
<zid`>
"eww your code is consistently written"
<nikolar>
*don't
<zid`>
"matches the conventions of the spec for what types are called, rather than randomly mutating them, ewww"
<the_oz>
your code to your convention. You understand the barrier at the very least
<zid`>
And your convention was C++'s
<nikolar>
And "matches the semantics or the language, eew"
<zid`>
which is why I said you were a C++ programmer, simple
<the_oz>
I am a C++ dev now
<zid`>
always ere
<zid`>
were
<nikolar>
Kek
<the_oz>
compile my conversation
<nikolar>
?
<the_oz>
it's kinda like kiss my ass
<zid`>
fuck off then?
<heat>
linux my kernel
<the_oz>
I demand rigorous be applied evenly
<dostoyevsky2>
nikolar: I wrote a filepath sanitizer for my linux boxes where I e.g. find paths normalized in non nfc utf8 and then convert them to nfc... I just run that in a cronjob now
<nikolar>
zid`: lol
<dostoyevsky2>
I guess one should only always use ascii in filenames
<nikolar>
dostoyevsky2: ZFS also has an option you can set, that only allows valid utf8 (not sure if there are other restrictions) in file paths
<childlikempress>
mmap🙀🙀❌❌🤮
<nikolar>
But also, no, I will use non ascii in my paths :)
<heat>
childlikempress, MMAP GANG
<nikolar>
MMAP
<dostoyevsky2>
if it wasn't for mmap() all the effort they put in unix into getting fork() be fast would be wasted... as fork() without immediate exec() use cases, not sure if those still exist anymore in modern programming
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
Arthuria has joined #osdev
marcopolo2 has quit [Quit: Connection closed for inactivity]
Arthuria has quit [Ping timeout: 272 seconds]
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
xenos1984 has quit [Ping timeout: 264 seconds]
npc has joined #osdev
xenos1984 has joined #osdev
<netbsduser>
dostoyevsky2: in an ideal world we could drop the fork()
<netbsduser>
i know some old network serving daemons like to do it and so do some naughty programs that want to escape their session and process group
<netbsduser>
both are of dubious import and better served with other techniques, and vfork() can provide the flexibility of fork in preparing state for the exec() that you will be doing soon anyway
<heat>
solaris does spawn in-kernel
<heat>
yo apparently i've had my sys_truncate stubbed out with an -ENOSYS for the longest time and I haven't noticed :skullemoji:
<sortie>
Yeah for Sortix I am planning to do spawn in-kernel too
<sortie>
Think it will be the most efficient way to do it
<netbsduser>
i have no objection to doing spawn that way (presumably it's what the posixoids intended)
<netbsduser>
i like posix spawn in principle but apparently it doesn't have what people crave
<sortie>
The biggest issue there is that posix_spawn has an evergrowing set of options
<sortie>
And those become syscall ABI
<heat>
gotta love posix_ functions
<heat>
terminally terrible
<sortie>
You usually know it's bad when it's prefixed by posix_
<sortie>
Not always though
<nikolar>
I never used posix_spawn but I've heard it's fine (tm)
<sortie>
But posix_spawn is actually fine as an API
<sortie>
Never used it though
<heat>
posix_spawn is fine except when it's not, and it was obviously completely rushed and designed by committee
<heat>
and obviously the only relevant implementation of it (linux) is a wrapper around clone + exec
hwpplayer1 has joined #osdev
<nikolar>
I guess no one cared to do it properly
<heat>
what's doing it properly?
<heat>
most important uses of posix_spawn (or vfork) are going to wait for the pid to die anyway, so blocking for vfork Just Works
<nikolar>
In-kernel was the intention I assume
<netbsduser>
the posix specifiers perhaps got a bit out of control and decided they were architects rather than draughtsmen
<netbsduser>
i've heard the same problem afflicts today's c iso committee
<heat>
stdc_
<heat>
i like how C++ does it
<heat>
most features (not _language_ feature related) were already prototyped in libraries
<nikolar>
netbsduser: you're not wrong
<Ermine>
but actually one just needs to design something than unix to evade fork/exec
<heat>
are you sure about that?
<heat>
ForkEx()!
<Ermine>
is it a thing?
<Ermine>
... apparently not
<Ermine>
something other than unix*
goliath has joined #osdev
<nikolar>
There is some fork like thing for windows
<nikolar>
That was introduced for wsl1
<Ermine>
when I've typed forkex in google it gave me some minecraft youtuber, and 0 windows-related links
<nikolar>
Kek
craigo has joined #osdev
Goodbye_Vincent has quit [Remote host closed the connection]
PapaFrog has quit [Ping timeout: 252 seconds]
Goodbye_Vincent1 has joined #osdev
<heat>
it's not a thing Yet
<heat>
don't let others ruin your operating system
<heat>
do it yourself by adding fork
<nikolar>
What's isn't a thing yet
PapaFrog has joined #osdev
<heat>
ForkEx() on win32 isn't a thing yet
<heat>
UNFORTUNATELY
<netbsduser>
nikolar: it was there from the beginning
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
Arthuria has joined #osdev
* Ermine
writes a letter to MS CEO demanding to add ForkEx
<sortie>
heat: That is false. Fork is actually supported by the Windows kernel
<heat>
>on win32
mrkajetanp has joined #osdev
mrkajetanp has quit [Ping timeout: 246 seconds]
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
karenw has joined #osdev
Dead_Bush_Sanpai has quit [Read error: Connection reset by peer]
Dead_Bush_Sanpai has joined #osdev
* geist-sdf
yawns
<geist-sdf>
okay, well i've been awake longer, but just felt like yawning again
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
<dinkelhacker>
what does sdf stand for?
<the_oz>
>forkex instead of spawn
<heat>
syrian democratic forces
<heat>
(unironically, it's a shell account, see sdf.org)
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
<dinkelhacker>
all the acronyms googel is giving me make no sense
<geist>
yeah, fixed it if you refresh the pastebin
<nikolar>
interesting
<nikolar>
m68k seems like an interesting
<nikolar>
*interesting target
<geist>
okay so i think that means if i double up some of the entries you get something like
<geist>
/ entries: 128, 8*128, 16*64, 4096
<geist>
ie, 128 entries at the root (L0), and every 8 of those point to consequetive L1 entries, and then at L1 every 16 point to consequetive L2 entries
<geist>
a waste of memory for sure, but fits the model of 4K pages across the board
<nikolar>
eh sure, if you really want
<nikolar>
doesn't seem to hard to just do it "properly"
<geist>
well point is if you have a 4K PMM and you cant easily sub allocate pages
<geist>
then you end up doubling up consequetive page tables to make the whole thing look like it's a fairly consistent thing
mrkajetanp has joined #osdev
mrkajetanp has quit [Remote host closed the connection]
mrkajetanp has joined #osdev
mrkajetanp has quit [Ping timeout: 272 seconds]
<geist>
one other neat feature is like arm64 there are separate supervisor and user page tables, though they overlap, which is sort of different
<geist>
ie, there are two page tables that effectively overlay each other, and they're consulted based on which mode the cpu is in
<geist>
which is actually pretty slick
<geist>
no meltdown with that
<nikolar>
oh neat
<nikolar>
i wonder, what system should you even target if you're want m68k
<geist>
well i have a rosco m68k
<geist>
otherwise working with qemu right now
<nikolar>
is rosco a new thing
<nikolar>
are m68k even still producted
<geist>
not really and rosco is a hobby project
xal has quit [Quit: bye]
<netbsduser>
nikolar: primarily qemu in my case
<netbsduser>
amiga i want to work on
<nikolar>
geist: that's what i meant
<nikolar>
it's a current project
xal has joined #osdev
<nikolar>
and unfortunate, i quite like the m68k
<netbsduser>
but the best emulator isn't as nice as qemu and while i have a real amiga it's a slow cycle to test on it
<geist>
i have one here with 4MB in it, though it's only a 010
<geist>
but you can find tons of 030s and 040s online
<geist>
rosco has a new 030 variant
<netbsduser>
there is an m68k renaissance underway at the osdev discord server with no fewer than 3 kernels now ported to it
<nikolar>
do they go up to 060, i forgor
<nikolar>
netbsduser: neat
<nikolar>
i do find it quite an interesting arch
<netbsduser>
nikolar: they do, i have one
<nikolar>
which one integrated the fpu
<nikolar>
was it 050
<netbsduser>
040, there was no 050
<nikolar>
oh really
<netbsduser>
the 060 is an odd one
<nikolar>
huh 060 was superscalar
<nikolar>
cool
<nikolar>
huh 030s are surprisingly cheap on ebay
<nikolar>
maybe i shoudl get some while they are
<heat>
m68k? more like m68lame
<nikolar>
what would you prefer heat
guideX_ has joined #osdev
<Ermine>
I'd like to see m68k machine though
<kof673>
> In the Sega Saturn, the 68000 was used as the sound processor, and in the Atari Jaguar they were used as a main controller for all the other dedicated hardware
<heat>
x86!
<nikolar>
heat: you already have that
<heat>
moar x86
<heat>
small cores big cores medium cores fast cores slow cores lots of cores single core
<Ermine>
m86k
<heat>
how many avxs do you want? all of them.
<heat>
avx1024jadnajdnjwad
<nikolar>
is that a thing Ermine or am i tripping
<Ermine>
nikolar: you're tripping
<nikolar>
ok cool
<Ermine>
512 avxen
<heat>
ONE THOUSAND AND TWENTY FOUR AVX
<nikolar>
heat: are we doing the riscv thing where you just keep appending letters for extension
<nikolar>
*extensions
<heat>
yes that's kind of how avx cpuid bits go
<the_oz>
I was looking at llvm vector type
<Ermine>
exactly the kind of thoughts you have at 3 am
guideX has quit [Ping timeout: 252 seconds]
<nikolar>
heat: sure, but not the actual naming
<nikolar>
right?
<heat>
no
<nikolar>
there we go
<heat>
there we go what?
<heat>
the intel people use letter soup as avx512 cpuid bits
<nikolar>
ok never mind
<heat>
AVX512VBMI
<nikolar>
i haven't encountered avx512 in the wild yet so haven't gotten into it
<heat>
AVX512 isn't actually *a thing* as much as it is an insane group of lots of cpuid bits for different features (that all share "avx512" in the name)