196 Replies
there
I will preface my work by saying I'm not incredibly experienced with rust, I've been working with it for only a few months now.
So I've just been going through and refactoring some simple error handling stuff to make it nicer
So some projects handle errors differently
urge to ask you if you wanna make stardust clients is rising
@Skull is it possible that we could build monado-gui to be generic in terms of it's XR backend?
Like you can point it to SteamVR, or Monado, or Stardust?
Or do you think that's out of scope for this project?
stardust isn't a backend yet
and it was def mostly tailored towards monado
and stardust won't really be something you launch separately ideally
when we can shove it onto a standalone linux headset
So stardust XR is what exactly then, sorry I'm not really familiar with the stardust project
ok so it's basically a system UI
the idea is you run monado for the drivers and reprojection
then stardust to use your 2D (eventually XR) apps through it
and openxr apps connect to stardust
Monado has that autorunner merge request should anyone be willing to see what's up.
You can custom tailor a monado build tree to launch stardust and serve up the XR bindings
i made a good description
You could cook stardust into an autorun config
An XR system UI to make using all your 2D—and eventually OpenXR—apps together intuitive, accessible, and fun by using community-made virtual objects as interfaces.
So it launches with the session lib
so what, telescope?
oh i see
yea
so like the steamvr overlay
It uses some xml type stuff to specify and launch binaries
Kiiinda but more spatially and intuitively oriented instead of point and click flat panel
and it's not meant to be an overlay
It's a VR user interface meant to allow you to configure your VR setup
Your PC can be headless and stardust can be the interface for instance, it's meant to be the interface to the PC
XR, it can do AR too
like
gotcha gotcha
read this description
and check out #cool-demos-archive
a little vague but I think I get the general idea
so it's like
A XR desktop environment?
like KDE plasma, or Gnome, but targeting XR devices instead
yea
sorta
gotcha, that makes a lot of sense
a desktop environment is 3 things though
a display server (X WMs, wayland compositors)
core settings (plasma settings, gnome settings)
and default apps (gnome disks, epiphany, etc)
stardust is just the display server part
but i want to make the other 2 along with it so we can make a DE from it
It has many use cases on top because of how modular it is, you can reconfigure it to your liking
So much less about the monolithic design paradigms of those desktops.
yea stardust is 100% object based
Right, Monado is the compositor/XR backend, while Stardust is the UI frontend
yep!
that makes sense
I like that
and like i was saying, stardust isn't like anything else
everything is freeform
it's all just objects
Right, that's why I was having a hard time really understanding it
yea, it's not like any other computer UI
gonna be stupidly intuitive though
but that's a show not tell intuition
because i suck at explaining things
It's a XR desktop environment who's whole purpose is to improve computing via the use of 3 dimensional space as an interface
That's what I'm getting
not just 3D space
but different interfaces
you can drop out a virtual laptop or place a touchscreen on a wall
then drop any 2D app into them
and you can yank the apps right out of them and switch too
Right, you're utilizing 3D space to interface with your computer
yea, but nothing else lets you swap interfaces on the fly like that
It's like the whole iron man cgi stuff you see but real
oh god not that
no? :kek:
sorry, that UI isn't really good tbh
we wanna make one that is fun to use but not wildly impractical :p
Gil Pais
YouTube
Holo table. Marvel's agents of s.h.i.e.l.d.
Agent Ward and agent Coulson trying to use the holotable.
Season 1, episode 13
this is why iron man UI is bad
from a marvel TV show itself :p
I mean I was more thinking like what's seen in iron man 1/2
but I get what you're sayin
It's an XR workspace environment
not just workspace
the idea is that this goes all the way to all day
i mean, you can drop your lists on the door so you don't forget them on the way out, then just yoink them out of the door and onto your wrist
ya know?
it doesn't technically let you do anything new, but it lets you do all of it at once with 1 device :p
Sounds like a desktop, but where every point in a 3D space is your desktop
yea
i guess
So like an XR workspace environment
i just don't feel it gives the right impression
ya know?
I'm gonna be honest
No limits on the space, no limits on where you can put the space
the term desktop environment doesn't go into detail as to what Gnome or KDE can do, but that's still the overarching description for them
Same is true of stardust as far as I can tell
Yes the finer details are quite complex
stardust is much more like wayfire than gnome
get what i mean?
wayfire is just a base, without anything else wayfire barely does anything
also in terms of compositors, wayfire is the most extensible
still has the problem of "everything is in the config file, read text like it's the 1800s you nerd"
sorry, i hate config files
I mean KDE is somewhat similar with it's widgets, that sort of just sounds like that to me
I would imagine one of the big things would be to just reuse software but within this environment
yea for sure
which would include running whole desktop environments in virtual windows
already done that before
well there ya go
So, Stardust is an XR Workspace Environment
but it's not just for work
it can do what your phone can
literally
it runs android via waydroid
so just XR environment
i guess
Yeah that sounds about right
XR Environment
but XR environment also means a vrchat world and an HDRI
ya know
sorry
yeah
i know i'm nitpicking
i just wanna make sure the description gives people the right idea
I think XR Environment gives a decent idea
because explaining stardust is really hard because everyone takes the system UI for granted
You could also say XR Computing Environment
Though I think computing is a little redundant
there haven't really been any new system UIs since smartphones
smartwatch UIs are just smaller smartphone UIs
there's been gesture based stuff
but it's not really useful
that's not really new
it just turns it into a cursor or something
Well like the pixel watch was going to have gesture stuff
and the one pixel or nexus phone had some weird gesture thing for a while
¯\_(ツ)_/¯
goofy ahh input
So I've gone through some error handling and made some changes to make crashes more explicit and whatnot https://github.com/technobaboo/rex/compare/main...CorneliusCornbread:monado-gui-cornelius:main
GitHub
Comparing technobaboo:main...CorneliusCornbread:main · technobaboo/...
Monado Replica EX, a monado builder and runner. Contribute to technobaboo/rex development by creating an account on GitHub.
I'm not done yet but that's where I'm at currently
I promised a bud of mine I'd play some Space Engineers with him today
If you have questions @ me in this channel and I'll be happy to answer them
no questions, looks great
I figured out why that one code snippet was calling take()
basically child is a structure which contains stdout: Option<File> and take was just taking ownership and replacing the structure's ownership with None
It seems like that might cause issues though, as if something needs stdout for that child it won't be there
ahh yea :S
I didn't notice before because cargo check wasn't being ran by Clion out of the box
thanks clion
:bruh_klee:
but I think instance.rs could use a mild refactor, not sure what your guy's opinion on that would be
I'm thinking I'm going to redo the error handling I've already currently done, it would make more sense (since this is a gui app) to have a graphical pop up that prompts the user with the error and then exits out of the application, maybe we could make a macro for that
the expect()s are fine if you're using a CLI app
but it's gui
:P
nah nvm I'm just gonna write a trait for that and implement it for Results and Options
oooh i love that idea
ye, also throw basically most of what I've done in the trash because I'm realizing there's much better ways to do what I'm doing
:kek:
that's progress :D
also at some point we are going to want to sit down and decide on a way to structure the progress file wise
nothing crazy just how where we want to put stuff
yea good point
ye, figured that out, just gotta do the pop up
okay the pop up is going to be quite difficult
because it relies on the App update loop to create the window
couldn't you just do unwrap and do the popup on panic handler?
oh shoot
yeaa
augh
yeahhhhh
one workaround is to, again, ruin everything by making every error bubble up
I don't like that
couldn't you just bubble up a result to a singular function in update?
why not?
I could do that
I just don't want to have to have everything return a result you know?
yeah, it looks like that's gonna be the nicest option
otherwise
we could try and do something with async or coroutines
doing this though, it's not going to be as nice as just calling .expect_gui()
It's going to be by returning an error and bubbling up the error as far as it needs to go
ya'lls thoughts?
make a global queue of errors
that you can do
however
then push an error to it
if we want to halt execution of something to wait for a users input to a pop up, then we have to halt that thread of execution
hence the need to coroutines or async
for example
when you call expect it crashes the program and will not execute anything beyond that line
say we call expect_gui() and we want to have a dialogue that's something like (regenerate config or exit)
in the former case we need to halt execution of that thread of code, regenerate the config, load it, then continue
i have a horrible horrible idea
god awful idea
and regardless we need to halt execution of that thread until we get to the update() loop and then update the UI with the new window
:agony:
on panic handler you make another window with the error
like another thread?
just spin up a new egui instance
in the panic handler
that's
actually really not that bad of an idea
oh no
i should have expected someone with barry bee benson as their pfp would be a bit ok with this
barry bee beson?
But I don't see why that's a bad idea at all
it's all abstracted away in an error handler of some kind
because what if egui panics
what does it do then
just shit the bed then
:skele:
fdnsaljkfnalsd
I mean why would egui panic?
look
it may be jank
but
fuck it we ball
okay
so
I might
have done just that
if it works
:skele:
it does not
it panics
:cat_pain:
https://crates.io/crates/native-dialog
👀
let's try that
who could have seen that coming
it was worth a shot
:kek:
:hypers:
not sure why the message is goofy
:Thonk:
okay the one library is borked
but I found another
this one works for now
and I'm probably gonna fork the other one
because I'm pretty sure I can see where it's bugged by just looking through the source code mildly
that looks great
AND
it halts the app
that's the code
that's ALL you have to do
:ah_yes_bottled_water:
amazinggg
i LOVE IT
same
easy API
Don't gotta worry about it
can you turn that into a crate
and give me the ability to set a title and such?
you mean the dialog?
https://crates.io/crates/dialog
the
.expect_gui
ohhh
I mean
I could yeah
i would love that
it's literally just 43 lines of code
:kek:
i'd use it in stardust all the time
The only problem is it has an extra dependency
so maybe I'll make it it's own crate, based on the fork of https://crates.io/crates/native-dialog
native dialogue interfaces with KDE much nicer
but
it borked
GitHub
Dialog box text formatted incorrectly? · Issue #41 · balthild/nativ...
So I tried this out on KDE on Wayland and doing a basic message dialog no matter what I put in for the message it's malformed: message code MessageDialog::new() .set_type(MessageType::Error) .s...
It seems to be a change within Qt
which sucks doodoo
but yeah I'll get around to doing that
eventually
also
I changed the name
expect_dialog
just to be more descriptah yee
okay now to go around in find ALL uses of expect
control shift f in vscode :3
ye ye
but clion
:skele:
done
okay
I also fixed the gitignore for the project
it pretty much empty
which it shouldn't be for a rust project
GitHub
Comparing technobaboo:main...CorneliusCornbread:main · technobaboo/...
Monado Replica EX, a monado builder and runner. Contribute to technobaboo/rex development by creating an account on GitHub.
current changes
more to be made
:D
I
make a PR?
you want one now?
i mean... whenever you're ready
I mean I think there's more to be done tbh
also
I forked off of @Skull
:kek:
so I dunno how that works
oh nah I can just PR direct into malekiRe's repo
forks are really just new remotes
neat
do it into mine
malek's abandoned his afaik
are you spookyskeletons?
no
technobaboo
wait
asfkljasdgf
I wanted to make it a draft
there
GitHub
Improved error handling and general clean ups by CorneliusCornbread...
Added panic error handling that will pop up a dialog before exit
Fixed some issues with gitignore
update dependencies
refactor main.rs?
:D
yayyy
draft PR created
feel free to update it and i'll merge it when you want
sounds good
I'll upgrade it to a full PR when it's ready
keep an eye on it if you wanna review changes as they happen
also, I highly recommend when you merge it to squash commits
dunno if you knew that
it just makes dealing with commit history sooo much easier
yes of course
So I just forked that one native dialog project and fixed the formatting issue
GitHub
GitHub - CorneliusCornbread/expect-dialog-rs: A simple utility for ...
A simple utility for error handling that uses a dialog for it's notification as opposed to just stdout - GitHub - CorneliusCornbread/expect-dialog-rs: A simple utility for error handling th...
it's not a crate
due to the fact that it relies on a patched version of
native-dialog
Which I don't really want to publish, stepping on the toes of the original creator if they come back
I'm thinking about reaching out to them to take over managing the projectah fair
but just
will do for now
so feel free to use it in whatever project
I've updated it as a dependency in monado-gui
so it relies on the same repo
nice
i'm reaching out to the repo owner of native-dialog-rs rn about whether or not they're going to pick the repo back up or if they're wanting to pass on maintaining it to someone else.
:polishcow:
Woot!
That's slick
yessir
and the implementation is very simple, I didn't really know where to put the function, *we still gotta figure out some organization for the project.
gets rid of any error handling when you want to load any config, it will automagically gib that behaviour
@Nova @Skull sorry for the ping, but how is logging/terminal output done in this project? I noticed instance.rs was using println! but that was it?
And when I mean logging I mean logging for the gui app itself, not monado
Easy to stick an svg into the egui?
?
Curious about some equipment icons for attached devices in the session
ahh, I have no idea
so I'm going to assume all the logging stuff is exclusive to logging monado's output and this app has no special logging. In future we should probably create our own logging system which writes to some log files but I'm just gonna use println!() for debugging errors
also I think I spotted a bug with
load_instances()
so this function uses the error coalescing operator ?
Which from my understanding, will early return, meaning in this iterator it will quit before it finishes if one of the items can't be loaded
I thought it might only skip some items, but now I'm realizing that it will quit before the iterator finishes and returns an object, so if one instance is invalid nothing will be loaded
or would it?
:Thonk:
hmmmm
okay I think it does actually coalesce properly
I'd have to test it to find it, I'll do that later
@Skull question for you, is monado-gui working in terms of running monado itself? I'm trying to give it a monado runtime to use and I'm really sure what from my builds I'm supposed to be copying into monado's instances folderyou don't
just make a new folder in the instances folder with the name of the instance
and restart the gui
and you can set setting and launch from there
so it's currently just a folder with a toml file in it?
yes
👍
If I set env vars on the GUI will they carry through to the Monado runtime?
yes!
Oh thank god
Alrighty that makes this very interesting now
yeah no that works properly, just checked
I didn't figure error coalescing operators would work that nicely, though I guess it makes sense considering they're lambda statements
:polishcow:
We got any tools to interface with the Monado instance live already in or is the infrastructure just fire and forget for now?
I'm finishing up my PR, I'm gonna update the dependecies and call it for this PR so it can be merged. Next thing would probably be to decide upon a project file structure
ignore the output of monado itself, I'm on my laptop with nothing on monado configured
but
:polishcow:
no more looking through old docs
it's all up to date
https://github.com/technobaboo/rex/pull/1
@Nova @Skull she's ready for review
GitHub
Improved error handling and general clean ups by CorneliusCornbread...
Added panic error handling that will pop up a dialog before exit
Fixed some issues with gitignore
update dependencies
refactor main.rs? Dropping this to decrease the scope of this PR
aw crap
I just realized I didn't put the right link for the expect-dialog repo
oop
uh
my b
In future I'm going to have to self review my PR's more closely
wait
why does this PR say a bunch of files changed
:Thonk:
idk
it's not a problem tho
uh
GitHub
rex/Cargo.toml at main · technobaboo/rex
Monado Replica EX, a monado builder and runner. Contribute to technobaboo/rex development by creating an account on GitHub.
yes
I forgor to push
sorry I'm in class multi tasking
:skul:
lemme make another PR
ok then i'm gonna hold off merging anymore
you test it and make sure it works
:p
I'm sorry
:kek:
it's a small issue but it's nonetheless the difference of it compiling or not compiling
you double check it to make sure it works
it works 👍
just checked
apologies for the goof up again
@HydraLM this is the WIP description
thanks
but that is a short one
a more accurate and longer one is good too
that description is more like the elevator pitch
@Nova Figured I'd mention this if you're using
expect-dialog-rs
I added a macro to it called panic_dialog
that does exactly what it sounds like. works just like panic
too but with a dialognicee