Data Oriented GUI in Rust by Raph Levien - Bay Area Rust Meetup

  Рет қаралды 80,930

Rust

Rust

Күн бұрын

Пікірлер: 25
@hvrjstn
@hvrjstn 6 жыл бұрын
A talk that would make Mike Acton proud. :) I find it interesting that a lot of modern GUI frameworks are borrowing a lot of principles from game programming. Good stuff. Thanks for the talk.
@nextlifeonearth
@nextlifeonearth 6 жыл бұрын
That's only logical actually. Video games are just interactive graphical media, sounds a lot like a GUI.
@jack-d2e6i
@jack-d2e6i 5 жыл бұрын
@@nextlifeonearth The main difference being that games try to maximise the hardware usage, where GUIs try to minimise the hardware usage.
@FaTalCubez
@FaTalCubez 4 жыл бұрын
@@jack-d2e6i I would say both are trying to use hardware as efficiently as possible
@kuhluhOG
@kuhluhOG 4 жыл бұрын
@@jack-d2e6i not exactly true games try to maximize the efficiency of their hardware usage
@anotherelvis
@anotherelvis 6 жыл бұрын
Great talk. Great idea to make a separate video per talk in the meetup.
@bloody_albatross
@bloody_albatross 4 жыл бұрын
About line granularity redraws: What if you have unicode characters that extend over a line? (I know many text editors cut that off.)
@SnowyMan95
@SnowyMan95 6 жыл бұрын
I'm looking at that UiState thing... there's a vec of boxes of dyn stuff.... that will need an allocation for every new widget; then those are going to be scattered around in memory (I suppose jemalloc helps somewhat); and then there's going to be a double pointer dereference needed to get to both data and behaviour... I have to ask: do u even cache m8?
@batlin
@batlin 5 жыл бұрын
What do you think would be a nicer alternative?
@KiranPurushothaman
@KiranPurushothaman 4 жыл бұрын
@@batlin if you cared about caches you would layout widgets of the same type together and keep their data small enough to fit in cache (or make the widget data itself SoA so you can pick which system uses which data). Jumping around in memory randomly is the opposite of data oriented design. IMO there is no good way to write generic toolkits that are "data oriented" because the data layouts would depend on which widgets are actually used in your app and how you update them. I wish people would stop equating ECS architecture with data oriented design. ECS is just one architecture that solves a specific subset of problems in games.
@EidosGaming
@EidosGaming 3 жыл бұрын
@@KiranPurushothaman You could do a custom allocator that allocates widgets next to each other despite being different sizes (which you would store next to each widget). I'm still a Rust newbie, so I'm not sure how you'd do that, but in C++ it's definitely possible. You would get very good caching since all your related widgets (i.e children) would be next to each others, however this makes for a very very complicated system, no random access, difficult to insert/remove elements ...
@wegreenall
@wegreenall 2 жыл бұрын
Are there really going to be enough widgets that it makes a difference? or is this a question of good technique?
@dupersuper1000
@dupersuper1000 2 жыл бұрын
@@wegreenall well, in theory, “data oriented design” sort of implies that the programmer would try to make their data cache-efficient. In practice, it really does depend on how *often* the objects need to be fetched from distant caches and/or main memory. If you load an object and keep it around for a while, it might not make a huge difference.
@osimmac
@osimmac 4 жыл бұрын
that cube mic is awesome
@marcusklaas4088
@marcusklaas4088 5 жыл бұрын
Great presentation!
@emdadgar_official
@emdadgar_official 3 жыл бұрын
what is the best GUI tool kit right now in rust . ?
@gt3293
@gt3293 3 жыл бұрын
Not sure what the best is, but druid is good for simple custom widgets, iced is another elm-based one, and tauri is great if you want to turn a web-app into a desktop app
@thesurlydev
@thesurlydev 5 жыл бұрын
Here's a link to the slides: docs.google.com/presentation/d/1aDTRl5R-icAF38Di-qJ4FzAl3pLlutTKVFcr3mUGgYo/edit#slide=id.p
@RyanLynch1
@RyanLynch1 3 жыл бұрын
thanks!!!
@andrekohler5792
@andrekohler5792 6 жыл бұрын
I would have prefered more graphics and less text on the slides.
@markotikvic
@markotikvic 4 жыл бұрын
@Dzmitry Lahoda docs.google.com/presentation/d/1aDTRl5R-icAF38Di-qJ4FzAl3pLlutTKVFcr3mUGgYo/edit#slide=id.p
@tissuepaper9962
@tissuepaper9962 4 жыл бұрын
It's a technical presentation about a specific piece of code. Of course it's mostly text.
@henrikg1388
@henrikg1388 2 жыл бұрын
I know this is four years old, but if that was the status then, Rust still have a long way to go. You expect any modern language to have a complete and tested GUI toolkit.
@llothar68
@llothar68 2 жыл бұрын
I don't know of any language that has a GUI toolkit, except Delphi and Browser based JS. It's not a language feature and never should. At the moment there is unfortunately not even a good toolkit. MacOS is in the huge swift - swiftUI rework, GTK 4 is buggy and Win UI3 is a sad joke, Qt shows that there is no interest and even Android is not there as it is too simple for large screens (Android 12L release showed that)
@v01d_r34l1ty
@v01d_r34l1ty 2 жыл бұрын
@@llothar68 Java (AWT + Swing) and C# (Windows.Forms) are the big 2 with standardized GUI libraries. We will likely never see and should never see a STL GUI for C, but I would like to see one for C++ and/or Rust in the future. It's about damn time that technology standard (platform specific) features like sockets/networking/encryption and graphics start becoming language features. In C++ we already have , , libraries. In Rust, there's std::thread, std::fs, and std::ops::Generator.
Keynote | Ergonomic APIs for hard problems - Raph Levien
52:40
RustLab Conference
Рет қаралды 8 М.
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Xilem: Let's Build High Performance Rust UI - Raph Levien
41:47
Rust Nederland (RustNL)
Рет қаралды 12 М.
Let’s write async rust from the ground up! - Conrad Ludgate
56:07
Rust Nation UK
Рет қаралды 15 М.
Is It Time to Rewrite the Operating System in Rust?
1:09:18
InfoQ
Рет қаралды 303 М.
Rust at speed - building a fast concurrent database
52:54
Jon Gjengset
Рет қаралды 214 М.
Why Can't We Make Simple Software? - Peter van Hardenberg
41:34
Handmade Cities
Рет қаралды 183 М.
Moving beyond Arc˂Mutex˂T˃˃ - Katharina Fey
1:00:10
Rust Nation UK
Рет қаралды 17 М.
The Talk You've Been Await-ing for
49:58
InfoQ
Рет қаралды 63 М.
Making Systems Programming Accessible by Andrew Kelley
47:47
TigerBeetle
Рет қаралды 44 М.