<bslsk05>
www.theregister.com: Torvalds weighs in on 'nasty' Rust vs C for Linux debate • The Register
gog has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
<the_oz>
"oh man it's almost like a religion!"
<the_oz>
>your language is unsafe and should be exterminated, you need to use this alternative
<the_oz>
I do not like that mindset! >you religious wackjob
<gog>
idk if it's just a meme or a jab at c-enjoyers but some rustaceans really love to claim that everything in C should be rewritten in rust to make it safer
<gog>
and i wonder if such people know anything about software engineering to understand how reckless actually doing that would be
kfv has joined #osdev
* Ermine
crosses out rust in today's osdev bingo card
<heat>
so Ermine how about the wayland
<gog>
it's an essential piece of the linux desktop ecosystem
<heat>
i think it's garbage redhatware like systemd
<Ermine>
I'm desperately trying to grok GEM
<the_oz>
it's the usual definition "it's not thoughtcrime like this" when that reality isn't shared
<Mondenkind>
they should make systemd but suckless
<Ermine>
wayland is too high-level for me
<gog>
succless
<heat>
systemd but tiki torch march in the woods?
<Ermine>
heat: ^
<gog>
lmfao
<gog>
YOU WILL NOT REPLACE INIT
<Ermine>
radeon needs atomic KMS
<Ermine>
wayland wants atomic KMS API
<Ermine>
converting stuff to atomic is considered advanced topic
<Ermine>
:')
<heat>
i dont know what atomic kms is
<heat>
here's a tip for amdgpu: fuck that amd codedrop
<heat>
.zip in git form
<Ermine>
one can't just rewrite it rn
<Ermine>
also radeon != amdgpu
<heat>
no one can
<Ermine>
radeon is for older stuff
<Lucretia>
the_oz: I've seen far more religious zealotry in favour of c
hwpplayer1 has joined #osdev
<heat>
i imagine radeon isn't good as well
<Ermine>
people give less fucks about it
<heat>
Lucretia, nooooo you have it all wrong, religious zealotry is only religious zealotry if _I_ don't agree with it
<gog>
it's been like 10 years since Southern Islands
<the_oz>
sure, but at least that religious zealotry is based on "not other b/c bad" illogic.
<the_oz>
It's not religious zealotry in general that I object to because at least it's primarily sourced
<Ermine>
and I can't really operate on it without a gpu to test on
<gog>
i think anything needing radeon is sliding into retro/niche
<Ermine>
latest of those are still pretty capable machines
<Ermine>
but yes
marcopolo2 has quit [Quit: Connection closed for inactivity]
Etabeta1 has joined #osdev
<the_oz>
one need only wait beyond one generation, like if you only skip one generation (what, 4 years?)
<the_oz>
my last bought machine recently ate the dust from 2011
<Ermine>
also r128 and mach64, which are ancient but some people want them to be supported
<Ermine>
and drivers for those should be relatively simple
<ddevault>
Wayland doesn't care about atomic mode setting per-se
<ddevault>
Wayland is a protocol
<ddevault>
w/e it's bait anyway
<heat>
well i imagine ermine's talking about the big wayland compositors
<pounce>
gog: if u keep talkin shit im coming over and rewriting ur kernel in rust
<heat>
versus xorg garbo that can still in theory use userspace xorg gpu drivers
<gog>
pounce: do it
<gog>
i'm not even working on it anyway
<gog>
somebody should
<pounce>
there's going to be soooo much safety
<Ermine>
ddevault: yes, but compositors do benefit from atomic api
<pounce>
gog: ok but you have to rewrite my kernel in C, deal?
<gog>
yes
<heat>
pounce i have a proposal for you
<heat>
you: send patches to my kernel
<heat>
i:
<ddevault>
Ermine: I guess
foudfou has joined #osdev
<heat>
deal ?
<ddevault>
but like
<gog>
he's already engaged--oh
_ngn has quit [Ping timeout: 260 seconds]
<ddevault>
everyone's hobby OS here could implement Wayland just fine with wl_shm and a framebuffer
foudfou_ has quit [Remote host closed the connection]
<pounce>
gog: not next month!
<gog>
:o
chiselfuse has quit [Ping timeout: 260 seconds]
<pounce>
ddevault: there's still a libinput dependency, no?
<ddevault>
no
_ngn has joined #osdev
<pounce>
huh, when did that happen?
<ddevault>
if you port a Linux compositor they probably depend on libinput
<ddevault>
but again Wayland is just a protocol
chiselfu1e has joined #osdev
<ddevault>
it's pretty generic
<ddevault>
wlroots even has pluggable adapters for things like libinput which you could easily replace if you do want to port a compositor rather than NIH
<heat>
yea wayland is a protocol, X11 is a protocol
<Ermine>
I'm whining about linux tho
<heat>
you can implement wayland in windows
<gog>
WoW
<gog>
wayland on windows
<Ermine>
and trying to contribute to drm
<bl4ckb0ne>
Ermine: you can definetly make wlroots run with simpledrm and the pixman renderer
<ddevault>
I implemented a Wayland "compositor" in a couple hundred lines of obstructed C that renders windows in ASCII art, no dependencies
<ddevault>
obsfuscated*
<ddevault>
on phone
<Ermine>
bl4ckb0ne: true, but that's not my goal
<zid`>
world of wayland
<bl4ckb0ne>
whats your goal
<ddevault>
to complain about Linux
<bl4ckb0ne>
ah, thats just bait
<ddevault>
which is fair enough :)
<Ermine>
:D
<bl4ckb0ne>
i'll leave you to it then Ermine
<nortti>
ddevault: will wayland clients gracefully degrade if you don't implement the extension protocols? iow, could I still run say gtk4 apps with only the base wayland protocol?
levitating has joined #osdev
<Ermine>
I mean, I want to try to implement a proper driver for r128 and learn drm along the way
<ddevault>
usually yes
<ddevault>
probably not all of them
<Ermine>
but amd guy thinks it's better implemented as part of radeon
<ddevault>
the core wayland protocol handles graphics with mmap'd file descriptors that have pixel buffers in them
<ddevault>
input is generic, it doesn't depend on libinput aside from using evdev scancodes and xkb keymaps
<Ermine>
which makes me want to improve state of things in radeon per se
<ddevault>
(xkbcommon is very portable)
<ddevault>
there are extensions for stuff like dmabufs which are linux-specific, but that mostly just matters for stuff like mesa clients or hardware video decoding
<ddevault>
gtk should fall back to shared memory just fine
<nortti>
makes sense
<Ermine>
interestingly enough, xkbcommon has special keysyms for vt switching
<ddevault>
if you have a decent spread of POSIX and a C11 compiler and you're willing to write input and graphics backends for wlroots you can get a wayland compositor working on any OS
<pounce>
I was talking abt the scancodes
<pounce>
pretty sure freebsd needed to include those in their port
<ddevault>
pounce: libinput != evdev
<ddevault>
but to be entirely honest if you really don't want to use evdev scancodes you can skip it
<ddevault>
you just have to write your own xkb layouts to interpret your own scancodes
<ddevault>
and even the xkb stuff is optional, though in practice real-world clients expect it; if you write your own clients you can just pass along raw scancodes and then the client interprets it at their discretion
<nortti>
Ermine: do you plan to also resurrect the mesa side of r128, with a modern DRI3 capable kernel driver for it?
<ddevault>
but yes, in practice wayland somewhat arbitrarily chose the evdev scancodes and so your OS has to provide them for real-world software to work
<Ermine>
nortti: no, I don't think it worths it
<ddevault>
but it does not require all of evdev or libinput, you just have to use this particular arbitrary set of numbers assigned to scancodes
levitating has quit [Ping timeout: 246 seconds]
<nortti>
does x11 have its own set of scancodes?
<ddevault>
not sure
<nortti>
thinking since aiui evdev is used as part of the legacy x11 input stack too, but there's a lot of x11 servers on random platforms
<heat>
probably, given it predates evdev
<Ermine>
nortti: r128 can do some opengl 1.x at best, and literally everything requires newer opengl(es)
<ddevault>
yeah but I'm not sure if evdev inherited the key code constants from its predecessor
<ddevault>
I don't know much about X11 in all honesty though
<ddevault>
no clue how it deals with keyboard input
<heat>
we should ask alan coopersmith
gog has quit [Ping timeout: 260 seconds]
<heat>
given he's the only one still working on that thang
<Ermine>
but if it is implemented as part of radeon, then render node will be exposed...
spareproject has quit [Remote host closed the connection]
<Ermine>
x11 has DDX for libinput and evdev
<Ermine>
the former being recommended
<bl4ckb0ne>
pls dont implement x11
<heat>
you mean xorg
<Ermine>
no, why would I do that
jedesa has joined #osdev
<Ermine>
speaking of wayland, gotta grok xdg positioner
<ddevault>
xdg positioner is one of the weirder parts of wayland
<ddevault>
are you a client or a server
<Ermine>
server
<ddevault>
my condolances
<ddevault>
are you using wlroots
<Ermine>
ofc
<ddevault>
ah
<ddevault>
then it will mostly deal with it for you :)
<Ermine>
yeah
<Ermine>
It's very pleasant library actually
<ddevault>
you know how if you right click a window to open a context menu, and your mouse is near the right edge of the screen, the context menu needs to open to the left of your mouse rather than to the right
<ddevault>
xdg_positioner puts it on the left
<heat>
do you still need to pass --fuck-nvidia-fuck-fuck-fuck-this-fuck-me for it to work?
<bl4ckb0ne>
--unsupported-gpu
<ddevault>
but since clients aren't allow to know where your mouse or the window is with respect to the whole screen, it describes rules for how the client wishes for its popups to be moved in this situation for the compositor to interpret and make the decisions
<the_oz>
no bending as if actually present in the 3d environment literally unusable
<heat>
omg
<heat>
did you not puke?
<ddevault>
I almost did
<bl4ckb0ne>
i almost did a few time
<ddevault>
but we were being paid handsomely not to
<ddevault>
VR is a dead end
<heat>
lol
<bl4ckb0ne>
id like to get back to it at some point but funding's a bitch
<bl4ckb0ne>
also the price of hw gatekeeps it
<ddevault>
nevertheless it is an interesting demonstration of things that Wayland's generic approach lends itself to in a way that can't really be done with X11
<heat>
yeah
<the_oz>
it's really cute how hard the old tropes of the simulacrum of a monitor and mouse cursor are being emulated multiple layers
<Ermine>
ddevault: thanks for explanation!
<ddevault>
no problem :)
<ddevault>
I actually dug my VR kit out of storage when moving into my new house
<ddevault>
since we have enough space to actually comfortably play here
<ddevault>
and... I messed with it off and on for three weeks and haven't touched it since
<ddevault>
not worth the pain in the ass to get the whole VR stack for linux set up again
<bl4ckb0ne>
havent moved wxrc to wlroots 0.18 but it should be working fairly well
<the_oz>
tank, load the jump program
<the_oz>
woooooooooooooooshhh
<the_oz>
alexa, what's 7 times 23
<ddevault>
bl4ckb0ne: did libsurvive ever get room scale?
<ddevault>
with monado?
<bl4ckb0ne>
nope, but the monado tracking is fairly ok
<bl4ckb0ne>
libsurvive badly needs a fork
<ddevault>
wxrc was such a pointless project lol
<ddevault>
but at least we put some effort into the ecosystem
<ddevault>
and it was fun to work on
Turn_Left has joined #osdev
<bl4ckb0ne>
still maintaining the monado wl code and the drm lease protocol
<Ermine>
I don't have any well-defined stance on it to begin with
<Ermine>
Anyway, back to DRM code, cya!
<ddevault>
well I'm sure your preferred subset of the language is the good subset and everyone else who uses C++ will be coming around shortly
<ddevault>
later o/
<heat>
i live for the bingo
<heat>
anything else does not matter
<the_oz>
suckless, plan9, haskell
<Ermine>
heat: add drm/kms to bingo
levitating_ has joined #osdev
<bl4ckb0ne>
monado is C but some parts are C++ because of opencv
<heat>
can you rewrite it all in rust? thanks
<heat>
ideally do C -> C++ -> rust -> back to C++ to piss off the maximum amount of people
<bl4ckb0ne>
hm i could
<bl4ckb0ne>
but i dont know rust
<heat>
doesn't matter, someone will eventually rewrite it for you
<bl4ckb0ne>
people were talking about writing hmd drivers in rust on discord but im not on discord so im wilingfuly ignoring it
<netbsduser``>
i have for some time been thinking about writing a maximally controversial kernel as a fun exercise in shitposting
<netbsduser``>
to be my new greatest shitpost after porting systemd to openbsd
<heat>
rewrite suckless in template-heavy c++
<netbsduser``>
i think traditional c++ and a lot of exceptions would be an excellent start
<heat>
wdym traditional?
<netbsduser``>
90s style
<heat>
that's not maximally controversial
<netbsduser``>
i think it is
<zid`>
uniqptr_sharedptr_nullable_t
<heat>
i mean, depends on who you want to piss off
<Ermine>
add boost to piss off more people
<heat>
OH
<zid`>
boost would be great
<netbsduser``>
hackernews can't go a minute without starting a two minutes of hate session for exceptions or even inheritance
<heat>
don't forget diamond inheritance
<netbsduser``>
the idea came to me when i was reading about the microkernel mk++ (genuinely interesting kernel, strictly layered design, implemented in c++, a lot of functionality was built up through inheritance from lower layers' classes; also formally verified, and cooler than sel4 because it actually does things)
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<netbsduser``>
it was never released because the open group turned into standardmongers instead
<ddevault>
hah, I was mulling over how to make a maximally controversial OS
<ddevault>
and it occured to me to use quickjs and build it in javascript
<bl4ckb0ne>
userland in javascript only
<heat>
thats a terrible idea for one simple reason
<heat>
it's just too bad
<heat>
everyone will understand it's a troll
<bl4ckb0ne>
im sure nodejs people would lovei t
<ddevault>
I think quickjs could be fairly easily built freestanding
<netbsduser``>
heat: it is a fine line
<heat>
you need something plausible
<heat>
to make people really upset
<heat>
but not "lol nice troll dumbass"
<netbsduser``>
i have a whole array of things in mind to wind up hackernews, reddit, and co
<ddevault>
well
<ddevault>
how about python then
<netbsduser``>
for example the kernel would have to be called "free open source software" but released under that mongodb licence
<heat>
hahahaha
<ddevault>
apache 2.0 + commons clause
<netbsduser``>
that alone would fire up a hundred comments of fury and bile
<heat>
you could write it all in really unsafe rust
<heat>
you'd piss off the C/C++ people and the rust people too
<ddevault>
I started looking into x86_64 assemblers written in javascript to see if anyone had done one
<ddevault>
you know, for "inline assembly"
<bl4ckb0ne>
ddevault when is helios getting on the front burner
<ddevault>
I need to rethink the message passing ABI entirely
<bl4ckb0ne>
the motivation messing with GOP came back recently
<ddevault>
the kernel is mostly good but overhauling the ABI is going to be dramatic enough that I might as well start over and cherry pick the good parts
<ddevault>
and userspace needs to be rethought probably from the ground up, some drivers might be reusable but the rest not so much
<bl4ckb0ne>
ill wait for the big bang before doing so then
<ddevault>
but mainly the ABI problem is the main thing keeping me turned off from working on it
<bl4ckb0ne>
i really want to run wlroots on a simpledrm like only to dunk on Ermine
<ddevault>
I don't have a good design in mind and until I come up with one it feels like a waste to work on it
<heat>
personally i'm waiting for bunnix 2.0
<ddevault>
I may or may not have started a fourth OS project
<bl4ckb0ne>
:O
<netbsduser``>
bunnix 2.0: from v7 to svr4
<ddevault>
but my motivation for that one evaporated immediately, I'd rather work on helios or bunnix
<ddevault>
didn't even finish the serial driver before I got annoyed and fucked off to work on something else
<ddevault>
I think the next time I set aside a month for osdev one way or another I'm going to make something self hosting
<ddevault>
bunnix could be fun to work on some more but the fs code sucks
<ddevault>
so it's probably blocked until I feel like implementing ext2
<nikolar>
ddevault: what was the idea behind the newest project
<ddevault>
I don't know if you saw my blog post telling R4L devs to make their own linux compatible kernel
<ddevault>
I said it would be easier than they thought
<ddevault>
was briefly tempted to put my money where my mouth is
<bl4ckb0ne>
were you writing rust
<bl4ckb0ne>
for... fun
<ddevault>
no, in hare
<ddevault>
I thought about doing it in rust, thought about RiiR hboot to get my bearings, but couldn't rouse enough fucks to give
levitating_ has quit [Remote host closed the connection]
levitating_ has joined #osdev
goliath has joined #osdev
<dinkelhacker>
ddevault: Would have been interesting to hear what you think about Rust for osdev. My limited experience so far is that it adds a lot of friction.
<ddevault>
I don't really like Rust
<ddevault>
but I'm not particularly comfortable using it
<ddevault>
so my opinion is not that useful
voidah has quit [Ping timeout: 248 seconds]
levitating_ has quit [Ping timeout: 252 seconds]
<Ermine>
bl4ckb0ne: how do I actually force simpledrm
<dinkelhacker>
Initially I got excited about it because I liked the idea of having traits, generics, etc at my disposal. But yea.. all the fights with the borrow checker and cargo kind of got annoying.