<klange>
I really need to sit down and write a proper stroke algorithm, this is just drawing boxes.
<klange>
Boxes were good enough for the squiggles in the system monitor app's graphs, but not for any serious artistry.
<Mutabah>
Neat
<Mutabah>
(* Holy cow, you're whooping my osdev arse)
<Mutabah>
Althoug... I'm knee-deep in FAT write support, so there's that?
<bnchs>
i read your message at first as "I'm knee-deep in FAT
<bnchs>
and wondering wtf were you talking about
<Mutabah>
Well... it does require wading through the FAT
<bnchs>
now i don't know if i should be doing your mom jokes
<sakasama>
I wouldn't recommend it: she has a really bad sense of humor.
<zid>
lemep and ziv both died in the past two months
<zid>
lempel*
<zid>
rip zip
<sakasama>
Death shall come for us all eventually.
<gog>
wow i should've switched to wayland a while ago
<nikolar>
Oh that's sad
<zid>
corporate shill detected smh
<nikolar>
I was just implementing a lz77 compressor
<klange>
Mutabah: if it makes you feel any better, I am suffering from the shittiness of my heap allocator at the moment as I watch virtual addresses skyrocket
<klange>
It might finally be time to implement a proper mmap interface.
<Mutabah>
I have no idea how bad my heap allocator is, I haven't tested it enough to be sure... but it's probably pretty bad
<zid>
Bad is good, bad is reliable.
<zid>
If it does not work, you can always work around it.
<zid>
Fancy allocator get in way, ruin program
<klange>
Mine is going on 13 years old - predates the OS. The old version was pretty good at keeping virtual addresses low, but had trouble with reallocing large allocations that made it fall down hard when I introduced things like non-lazy window resizing.
<klange>
I "upgraded" it to unmap large allocations on free, which vastly reduced actual memory consumption, but it's too stupid to reuse those addresses on its own (it's built on sbrk!) so virtual addresses can climb rapidly now.
<klange>
I wrote the thing for a uni systems course, and "must only use sbrk" was a requirement.
<klange>
And it went through a little competition where it performed rather well on both time and space relative to glibc and my classmates at the time.
<klange>
So when I went about that whole 'writing an OS' thing, I reused it first for the kernel heap allocator, and later for the userspace allocator - one of the first parts of newlib to be replaced by in-house code :)
<klange>
Just need to replace the sbrks with the dumbest of mmap continuous page allocations and we'll be golden, since the allocator doesn't even rely on the continuity of sequential sbrk calls anyway.
<Mutabah>
Random note: I'm having quite a bit of fun using rust's shared^mutable semantics for a filesystem API
<klange>
It's by Keith Packard, so there must be some merit to it.
<FireFly>
strokes being hard is something I found out the hard way ._.
* FireFly
should read this paper
<klange>
So a simple stroke is a Minkowski sum of the path and a 'pen' shape, and with a convolution approach you can generate a path describing an approximation of that minkowski sum, and viola, you got a stroke.
<nortti>
oh, is that a new 2d shape renderer in kuroko?
dayimproper has joined #osdev
nyah has joined #osdev
sinvet has joined #osdev
EthicsGradient is now known as AttitudeAdjuster
Left_Turn has joined #osdev
slidercrank has quit [Remote host closed the connection]
slidercrank has joined #osdev
gog has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
SGautam has joined #osdev
<netbsduser>
i hate lock ordering
<netbsduser>
by far the thing that demands some of the most attention in operating systems, i think
<moon-child>
this is one argument in favour of lockfree data structures
<moon-child>
you can have local reasoning
<netbsduser>
no silver bullet
<netbsduser>
currently i'm trying to define a locking protocol for an epoll implementation i am throwing together
<gog>
meow
heat has joined #osdev
<froggey>
just use one large lock, ez
* nikolar
pets gog
* gog
prr
<gog>
i found something that i didn't break
<gog>
yay
<gog>
even though it's something i also worked on
<gog>
yay
* gog
throws her rig out the window
<gog>
i fucking _hate_ our sales frontend
<gog>
it's so bad
<gog>
we just keep tacking shit on it and it gets more broken
<heat>
have you considered switching frameworks?
<heat>
just for the fun of it
<gog>
no
<gog>
it's in-house
<heat>
i heard react sucks and angular is the best
<heat>
SWITCH NOW
<gog>
react isn't the thing here
AttitudeAdjuster has quit [Quit: WeeChat 3.7]
EthicsGradient has joined #osdev
EthicsGradient is now known as AttitudeAdjuster
<heat>
i've been writing some js code for uni
<heat>
the whole node ecosystem is depressingly scary
<GeDaMo>
Just import things directly from Github! :P
jjuran_ has joined #osdev
alethkit is now known as nobody
nobody is now known as alethkit
nikolar has quit [Remote host closed the connection]
jjuran_ has quit [Remote host closed the connection]
jjuran_ has joined #osdev
AttitudeAdjuster has quit [Quit: WeeChat 3.7]
AttitudeAdjuster has joined #osdev
jjuran has quit [Ping timeout: 255 seconds]
jjuran_ is now known as jjuran
<gog>
ok one more problem fixed
<gog>
but one that also accumulates tech debt because it conflicts with one of my big proposals
<gog>
yaaaaaay
<gog>
i want to gut the whole thing and start from scratch but that would take months
<gog>
i want to have a big refactor party but that would take weeks
<gog>
boss doesn't want to feature freeze
<gog>
this is going to crash and burn before long
<gog>
we're on a bad path
pmaz has quit [Quit: Konversation terminated!]
nikolar has joined #osdev
<nikolar>
It's horrific
gildasio has quit [Ping timeout: 255 seconds]
gildasio has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
<klange>
nortti: not specifically; it's the path rasterizer I built for my truetype renderer.
<klange>
nortti: the Kuroko bindings are new, but the focus here is the new stroke renderer; old one just turned line segments into boxes
<nortti>
ah
bradd has quit [Ping timeout: 248 seconds]
danilogondolfo has joined #osdev
arminweigl has quit [Ping timeout: 248 seconds]
SGautam has quit [Quit: Connection closed for inactivity]
Turn_Left has quit [Ping timeout: 246 seconds]
arminweigl has joined #osdev
Turn_Left has joined #osdev
kspalaiologos has joined #osdev
<kof123>
not to start an argument but: "to figure out how long ago C89 was " .... "vi was made for a world that doesnt exist anymore" .....my q would be does c89 world still exist or even be underpinnings many places, as the rustaceans might say
<kof123>
(vi quote from bill joy)
<kof123>
or: is it still having its influence, no matter how old it is
<kof123>
there is "old in age" and "old as in no longer influencing things" -- i would say may or may not overlap
<heat>
lots of stuff is either written in c89 or c89-style
<heat>
large portions of linux are c89
<slidercrank>
the kernel?
<slidercrank>
it's built with -std=gnu11
<Ermine>
some pieces are gnu11, but everything else...
<heat>
it being GNU11 is relatively recent, and most of the kernel still builds and is written against C89
<heat>
the whole "we switched to C11" thing is just a "you can now write new files in C11" instead of "you can now send patches rewriting everything to C11"
<heat>
mainly because the 2nd option is not productive and in general maintainers want code that fits in with the surroundings
[itchyjunk] has joined #osdev
<slidercrank>
they also added rust support :) so we're departing from c89
<gog>
rust rust rust rust
<gog>
i hate API integrations but i'm the integrations expert now
<gog>
i am going to [parody redacted in minecraft] this fucking support agent
<zid>
rustrustrust
<zid>
I tried to write a rust program this weekend
<zid>
I did not get very far
<gog>
i'm trying to do my job but there's always some shit to fix that i already fixed
<zid>
It needed me to understand what <(), E> meant
<zid>
on line 1
<zid>
so I gave up
<gog>
pretty soon i'll be fixing those fixes to the fixes
<gog>
and i'll be stuck in an endless loop of fixing the fixes that fix the fixes to the fixes
<zid>
ah yes, another trivial example that only hits on the behavior I need to kow
<zid>
and doesn't do things like &'static
<zid>
or _
<zid>
This is great as a reference for a language you already know
<sakasama>
Honestly, async and unsafe behaviour is such a mess in rust that I only touch the language when someone else insists on tormenting me with it.
<sakasama>
_ is just a placeholder in the prolog fashion.
<zid>
Yes, because rust is here to replace prolog
<sakasama>
It is! You didn't know that's deprecated too?
<heat>
actually now im wondering what the binary NOT of a bool is
<zid>
My favourite method to invert a binary tree: change printf("This is a binary tree, printed last row first"); to printf("This is a binary tree, printed first row first");
<zid>
google likes databases, they should know that the data is still the same data, but just presented by a different query
<sakasama>
zid: I think heat desired a different kind of inversion. Why can't we see the user's intestines?
<zid>
oh, an eversion?
<zid>
I'll get the kukri
<zid>
You tie him down
<zid>
they like to wriggle
<heat>
zid, quick, you're a C expert
<zid>
I am
<zid>
What do you need help with
<heat>
what do you think a binary NOT'ed C99 bool "true" is
<Ermine>
~true = ?
<heat>
yes
<zid>
IDB cus of how integers are represented
<zid>
but, -1
<zid>
-2
<zid>
even
<heat>
it's still true
<zid>
yes, bitwise NOT rarely implements logical NOT
<zid>
heat ur a C expert
<zid>
what's the symbol for the XNOR operator
<heat>
ass
<zid>
incorrect, the answer was, ==
<sakasama>
*
<zid>
People hate finding that out.
<zid>
"0 0 is same, 1 1 is same, 0 1 is not-same, 1 0 is not-same"
<bslsk05>
wiki.osdev.org: Porting Newlib - OSDev Wiki
<heat>
best article ever
<klange>
Should replace that article with just "Oh gods, just don't, use musl or mlibc or seriously write your own libc instead, newlib is terrible, let it die already"
<heat>
"Download newlib source (I'm using 2.5.0)"
<heat>
he's using 2.5!
<heat>
Stable release: 4.1.0 / December 18, 2020; 2 years ago
danilogondolfo has quit [Remote host closed the connection]
<heat>
i do wonder if BSD libc is a solid alternative in general
<klange>
iirc, it's not written for portability
<heat>
neither is musl
<heat>
which is why they're simple to port
<heat>
glibc is probably too hard for the average newbie as to get a basic build you need to dive into glibc build internals and to essentially copy linux's whole sysdeps while replacing it bit by bit
<klange>
the kids these days are happy to implement Linux's syscall itnerface
<heat>
... I should really get a glibc alternative build of my OS working
raggq has quit [Quit: upgrades]
<MrBonkers>
heat why wouldn’t one use mlibc? It might not be as complete as musl, but it designed to be portable, you can turn off features you don’t want (not interested in Linux compatibility? Just turn it off and Linux API’s aren’t available) and it can run quite a bit of software (wayland being indeed one of them)
<heat>
objectively there's little reason not to run mlibc on a hobby OS
<heat>
except maybe code being of dubious quality, although I admit I haven't looked at it at all
<heat>
like, getting a libc 100% right is **HARD**
<MrBonkers>
Absolutely
<heat>
musl has correct code of terrible quality
<MrBonkers>
we’re working on getting Linux to run
<MrBonkers>
on mlibc
<klange>
the last version of newlib I used was... 1.19
<MrBonkers>
as in, a full userland there
<zid>
The best reason is so that you can write your own
<zid>
cus it's more fun
<heat>
""fun""
<MrBonkers>
which is mostly sysdeps at this point
<klange>
if you're doing osdev already, a libc is probably your idea of fun
<zid>
^
<klange>
or you're probably not having fun doing the osdev in the first place
<heat>
hmmm i dunno
<zid>
I like osdev cus I get to write things like "memcpy" 400 times
<klange>
I pride myself on the fact that ToaruOS is all 100% homegrown garbage.
<heat>
i have fun with kernel stuff, I'm not sure if I would have fun language-lawyering over a libc
<klange>
It's the same as spec lawyering over some shitty hardware.
<klange>
Quite happily my half-baked garbage libc will play quake, run gcc, and even had a working Python build before I went even more insane and made my own one of those.
<zid>
I'm watching a man repair a 70s land rover with exactly the same mindset
<zid>
except he's welding instead of writing assembly
C-Man has joined #osdev
<sakasama>
Please petition to have him adapt that machine to my unique requirements.
<zid>
are your unique requirements be that it's going to turn back into rust in 10 more years
<zid>
like every other land rover
<zid>
if so, very doable
<klange>
(In defence of my mental faculties, building my own Python turned out to be one of the least stupid and most rewarding/useful things I've done.)
<zid>
one day I will get off my ass and figure out how the hell to write a compiler
<zid>
I got most of the way through some of the planning for some of it!
<sakasama>
zid: No, we discussed my requirements already.
<zid>
I don't think that's so much of an adaptation as a rewrite
* sakasama
has been writing a compiler for awhile: it's why she rarely bothers with actual osdev.
<zid>
a land rover is a machine that turns iron into iron oxide by being sat on
<sakasama>
No sense fussing over the details; surely it can be repurposed.
<zid>
could isekai you with it
* sakasama
would gladly go to another planet.
<zid>
congratulations, you're now a spider.
<sakasama>
That's an improvement! Bonus points if it includes a balanced ternary architecture.
<zid>
Nope, it's a ff2 style job architecture implemented by the local demigod