It might be developer fantasy but half of the giants in the mobile market really did take off this way:
* xiaomi with their miui skin/custom ROM - "bringing iOS like polish to Android" back then
* oneplus with their initial devices with cyanogenmod - clean aosp interface without any bloat and lots of features.
In fact, when my brother was buying phones for my mom (neither of them were really that technically inclined), he bought a Motorola mostly because "it doesn't have all those ads like redmi at the same price"
Indeed - I remember MKBHD praising the initial OnePlus thanks to that approach. Today he's got 20M subscribers. If Motorola gets big tech reviewers on their side it's a big market.
Not to mention the more techy people in a family unit often make recommendations. I told my dad to buy a Nexus phone for that same reason which he still has, of course it's 10y old now so I'll probably have him upgrade to a Motorola.
I think the main difference due to weight boils down to you riding in one gear lower when not using assistance.
On flat roads, I usually ride on 3rd or 4th gear (out of 7), now i ride in 2nd or 3rd.
But where i ride, the road isn't even and has a lot of steep slopes. There I'm on 1st gear all the time anyway and the assistance i get totally saves my knees, and ensures I'm not all sweaty when i reach my destination. Even compared to the light weight regular bicycles i rode before, this is better.
Once at speed you can maintain tempo in the highest gear on this bike. It does consume a lot of power that way but it is also really neat to be doing a 65 km ride in what is much less than twice the time that it takes to do that same trip by car.
That really depends on the kind of user interface no?
If you just have a lot of text and a few rectangles and no animation, immediate mode would work well...
But if you have a lot of images, animation etc ... You'd anyway have to track all the textures uploaded to the GPU to not reupload them. Might as well retain as much of the state as possible? (Eg. QtQuick)
The more dynamic/animated an UI is, the less there's a difference between a retained- and immediate-mode API, since the UI needs to be redrawn each frame anyway. Immediate mode UIs might even be more efficient for highly dynamic UIs because they skip a lot of internal state update code - like creating/destroying/showing/hiding/moving widget objects).
Immediate-mode UIs can also be implemented to track changes and retain the unchanged parts of the UI in baked textures, it's just usually not worth the hassle.
The key feature of immediate mode UIs is that the application describes the entire currently visible state of the UI for each frame which allows the UI code to be 'interleaved' with application state changes (e.g. no callbacks required), how this per-frame UI description is translated into pixels on screen is more or less an implementation detail.
> The more dynamic/animated an UI is, the less there's a difference between a retained- and immediate-mode API, since the UI needs to be redrawn each frame anyway. Immediate mode UIs might even be more efficient for highly dynamic UIs because they skip a lot of internal state update code - like creating/destroying/showing/hiding/moving widget objects).
That depends on the kind of animations - typically for user interfaces, it's just moving, scaling, playing with opacity etc.. that's just updating the matrices once.
So you describe the scene graph once (this rectangle here, upload that texture there, this border there) using DOM, QML etc..., and then just update the item properties on it.
As far as the end user/application developer is concerned , this is retained mode. As far as the GPU is considered it can be redrawing the whole UI every frame..
> it's just moving, scaling, playing with opacity etc.. that's just updating the matrices once.
...any tiny change like this will trigger a redraw (e.g. the GPU doing work) that's not much different from a redraw in an immediate mode system.
At most the redraw can be restricted to a part of the visible UI, but here the question is whether such a 'local' redraw is actually any cheaper than just redrawing everything (since figuring out what needs to be redrawn might be more expensive than just rendering everything from scratch - YMMV of course).
It's not about what gets redrawn but also how much of the UI state is still retained (by the GPU). Imagine having to reupload all the textures, meshes to the GPU every frame.
Something like a lot of text ? Probably easier to redraw everything in immediate mode.
Something like a lot of images just moving, scaling, around? Easier to retain that state in GPU and just update a few values here and there...
> Easier to retain that state in GPU and just update a few values here and there
It's really not that trivial to estimate, especially on high-dpi displays.
Rendering a texture with a 'baked UI' to the framebuffer might be "just about as expensive" as rendering the detailed UI elements directly to the framebuffer.
Processing a pixel isn't inherently cheaper than processing a vertex, but there are a lot more pixels than vertices in typical UIs (a baked texture might still win when there's a ton of alpha-blended layers though).
Also, of course you'd also need to aggressively batch draw calls (e.g. Dear ImGui only issues a new render command when the texture or clipping rectangle changes, e.g. a whole window will typically be rendered in one or two draw calls).
"Our systems aren't foolproof because anyone can just boot Linux from USB. Hence we should enforce secure boot with proprietary keys and disable functionality for non attested PCs"
This is not far fetched. All Android vendors went down this path and now you can't even enable developer mode if you want your bank app to work to approve your bank loan.
> Also, don’t expose it to hot water (this could weaken the waterproof seals), or high pressure water. It’s not invincible.
Aahhh. Finally the mystery of how my old pebble died is solved. Hopefully . One fine morning, the display came off. It was supposed to be waterproof and there was no puffed up battery either.
Glue and seals weaken with exposure to temperature extremes in both directions. I found this out the hard way too.
I spent all day out in below freezing temps, when I got back to my hotel room and my smartband (not pebble) started to warm up, the screen just fell off. Everything still worked and the screen was lit up. Fortunately I discovered it before I ripped the screen off on something. When I got home I was able to glue the screen back on and it's been operating just fine, of course it's probably no longer waterproof.
Hoping this thing holds out until I get my Pebble.
Glue and seals weaken with exposure to temperature extremes in both directions. I found this out the hard way too.
Yeah, the stuff everyone uses in consumer electronics is crap.
I learned a lot about this after I got a used boat and started working on it myself. I wish manufacturers would take a page from the marine industry and use better quality materials like Stainless 316 for metal frames and fasteners (much more rust-resistant than common 304 Stainless), Santoprene for gaskets (a UV-resistant EDPM blend with a working temperature from -81°F to 275°F / -60°C to 135°C), higher quality adhesives, etc. I noticed SCUBA (diving) and SCBA (firefighting) hardware tends to be built somewhat better (though still not perfect), presumably because it's life-safety. And NASA and others pioneered incredible materials and assembly methods for aviation and spaceflight back in the day. We have the means to build for longevity, it just costs 3X+.
Don't even get me started about commodity vulcanized rubber coatings that become a sticky mess after a few years.
He seems to say not in a hot tub, but IIRC I've seen him say that showers are OK. Maybe it's because showers don't submerge the watch, even if the temp is similar? That is, the watch itself wouldn't heat up nearly as much in the shower as it would in a hot tub or bath.
Friendly reminder that they're water-resistant not water-proof... Soap decreases surface tension and might enable the water to enter through the microphone or speaker hole. Might also be susceptible to steam entering and condensing inside.
IDK if there are any watches where the vendor promises their being vapor-tight.
I don't think there is a single "they" here such as consumer electronics manufacturers. All the bloated web apps, all the native apps etc... Are responsible for this too. "Memory is cheap" has been the mantra for ages now.
It's just that the first people who would feel the heat because of all this is consumer electronics manufacturers.
If you're building a "webapp" where you think in terms of components, no point keeping the style sheet separate..
If you're building a "website" which is basically a list of hyperlinked documents with the same styling, having just one style sheet would make sense...
Of course, there's a lot of gray area in between the two...
At the end of the day, the most that most of us can really do is be annoyed at the quirks of these leaky abstractions in the large codebases that's thrust upon us.
While I don't have the performance bottleneck numbers of React, I don't think it's about Javascript vs. WASM here.
I've seen/built some large Qt/QML applications with so much javascript and they all performed much better than your average React webapp. In fact the V8 / other browser Javascript engines also have JIT while the QML engine didn't.
Comparing QtQuick/QML + JS to HTML + JS - both GPU accelerated scenegraphs, you should get similar performance in both. But in reality it is rarely the case. I suspect it might be the whole document oriented text layout and css rules, along with React using a virtual DOM and a lot of other dependencies to give us an abstraction layer.
I'd love to know more about this from someone who did an in depth profiling of the same/similar apps on something like QtQuick vs. React.
It depends on the app. If the app has many hundreds or even thousands of DOM elements, there's no way to make that work smoothly with React or any other library or framework. Then a canvas based solution can fix things. I know, I've had to fix slow React apps.
It's a tradeoff people make between ease of integration - just download the .h file into your project folder and #include it in your source file instead of worrying about source build system vs target build system, cross compiling headaches etc...
And compilation times: any time you change any of your source files, your compiler also has to recompile your dependencies. (Assuming you haven't used precompiled headers).
I'm completely ignorant about this, but wouldn't it be possible to compile separately your project to improve compilation times? for instance, if you're using OP's vector library, which is self contained, you could compile that first and just once?
int add(int a, int b){
// Long logic and then this
return a+b;
}
Let's say this is your main.c.
#include "add.h"
int main(void) {
return add(5,6);
}
The preprocessor just copies the contents of add.h into your main.c whenever you're trying to compile main.c. (let's ignore the concept of precompiled headers for now).
What you can instead do is just put the add function declaration in add.h that just tells the compiler that add function takes two integers and returns an integer.
int add(int a, int b);
You can then put the add function definition in add.c , compile that to an add.o and link it to your main.o at link time to get your final binary - without having to recompile add.o every time you change your main.c.
Recompiling the dependencies should only really happen if you change the file with the implementation include (usually done by defining <library>_IMPLEMENTATION or something like that.
* xiaomi with their miui skin/custom ROM - "bringing iOS like polish to Android" back then
* oneplus with their initial devices with cyanogenmod - clean aosp interface without any bloat and lots of features.
In fact, when my brother was buying phones for my mom (neither of them were really that technically inclined), he bought a Motorola mostly because "it doesn't have all those ads like redmi at the same price"
reply