Readit News logoReadit News

Deleted Comment

Deleted Comment

ensiferum commented on Is there any future for the GTK-based Desktop Environments?   ludditus.com/2021/05/30/i... · Posted by u/rohshall
anthk · 3 years ago
I use Fluxbox (slightly tweaked Zukitre theme), lxappearance, Tango2 icons and Rox filer with a bunch of plugins among Rox-Lib under ~/lib.

90% CLI oriented but with common sensical GUI plugins and settings.

The best of both words, and a "DE" with unmatched speeds.

ensiferum · 3 years ago
Another fluxbox user here. I've basically ran the same configuration for nearly 15 years now. Everything is in muscle memory and never changes. Totally the best UX
ensiferum commented on Is there any future for the GTK-based Desktop Environments?   ludditus.com/2021/05/30/i... · Posted by u/rohshall
bayesian_horse · 3 years ago
My point is not about lack of usability or documentation. Rather that the nature of HTML+CSS+JS lets you do things you can't do as easily in either GTK or QT. In the latter, yes you can easily achieve a certain kind of UI, but not deviate from it, and even formatting/displaying a significant amount of information that doesn't fit into one of the classic widgets can be a bit of a pain.
ensiferum · 3 years ago
Qt also has QML which allows you to do things similar to what you would have with the combination of HTML,CSS and JS
ensiferum commented on Unit Testing is Overrated (2020)   tyrrrz.me/blog/unit-testi... · Posted by u/ivanvas
injidup · 3 years ago
The first example is such a straw man. The LocationProvider class has no business being a class. It should just be a function. Problems then go away.
ensiferum · 3 years ago
And the sunset calculator doesn't need a location provider. All it needs are location coordinates which can be given to the calculate function.

In fact the whole thing then becomes a standalone function which takes Location and other relevant parameters and returns the computer sunrise/sunset values. Pure function and super easy to unit test.

If one needs to do a lot of "mockups" for your unit tests then maybe one needs to consider the API and class design. Removing needless coupling helps testability by removing the need to use mocks in the first place.

ensiferum commented on Eigen: A C++ template library for linear algebra   eigen.tuxfamily.org/index... · Posted by u/cpp_frog
Const-me · 3 years ago
Using it for years, and mostly happy with that library. The performance is awesome for very long vectors / large matrices.

It’s less than ideal for small things when the size is known at compile-time. If one knows SIMD intrinsics, in some of these cases the Eigen’s implementation can be outperformed by a large factor like 2-4. Also it’s very hard to mess with RAM layout of some things (like sparse matrices), just too many layers of abstraction and too much template metaprogramming.

But still, out of the box the usability of Eigen is awesome. And until the code is written, debugged, integrated and benchmarked, it’s generally impossible to tell whether a particular algorithm gonna be a performance bottleneck. That’s why I’m mostly happy with the library.

ensiferum · 3 years ago
Any idea about perf diff between this and GLM? In Computer graphics my use case is with fixed 4x4 matrices and vec4s. Thanks!
ensiferum commented on Spin – WebAssembly Framework   fermyon.com/blog/introduc... · Posted by u/rammy1234
emteycz · 3 years ago
No, the original claim of Wasm definitely isn't only one side point about development. The original claim of Wasm is that all of these features are packaged in a well thought out whole + the success of this platform (thanks to browsers mostly) is what's so interesting about it.
ensiferum · 3 years ago
No, not original Claim about WASM but your original Claim that about hot reloading and WASM.

"Hot reloading is a good example."

Again. You don't need WASM for hot reloading.

ensiferum commented on Spin – WebAssembly Framework   fermyon.com/blog/introduc... · Posted by u/rammy1234
emteycz · 3 years ago
I can't take a DLL and expect it to work on Linux/Mac. Wasm allows free sharing of portable binaries - with cross-language interop.
ensiferum · 3 years ago
But that's sort of moving the goal posts now. Original claim for WASM was that it allows hot reloading. Which is a thing you can do with DLLs just fine.
ensiferum commented on Spin – WebAssembly Framework   fermyon.com/blog/introduc... · Posted by u/rammy1234
bkolobara · 3 years ago
I'm the author of a Wasm on the server side runtime[0] that focuses primarily on rust compiled to Wasm, and this question comes up quite often. Why compile to Wasm if you can compile to native code directly? To add to Radu's answer, here are some of my favourite reasons.

Having an in-between bytecode layer allows you to build application architectures in rust that would not be possible when compiling directly to machine code. Hot reloading is a good example. Having the VM hold onto resources like tcp streams and file descriptors allows you to exchange the business logic without even breaking a tcp connection. Fine-grained sandboxing is another good example. Revoking filesystem access from just parts of your applications or limiting memory/cpu usage for each individual request[1] is something that is just impossible to do correctly without a vm managing it.

A less obvious benefit are the improvements to the developer experience, like compile times. Most of the dependencies (async executor, tcp stack, message passing, ...) are usually already part of the wasm runtime and don't need to be compiled/linked again. The rust compiler also seems to have a better time when it comes to generating .wasm executables instead of native ones. Most rust wasm apps I write compile much faster than equivalent native ones. Just because there is so much less for the compiler to do.

Many wasm runtimes, like lunatic, include an async scheduler and green threads/processes. This means that you get most of the benefits of async rust without needing to actually use async and worry about all the issues that come with it[2].

[0]: https://github.com/lunatic-solutions/lunatic

[1]: https://www.youtube.com/watch?v=8gwSU3oaMV8&list=PLdo4fOcmZ0...

[2]: https://eta.st/2021/03/08/async-rust-2.html

ensiferum · 3 years ago
But you can already do this with DLLs or with SOs files. You can keep your network logic for example inside another module (perhaps the host app) and then load the logic that acts on the received data as a dll.

Process separation and IPC natively using a library such as Qt is literally a few hundred lines of code.

ensiferum commented on Developers spend most of their time figuring the system out   lepiter.io/feenk/develope... · Posted by u/webmaven
layer8 · 3 years ago
There is a minority of developers who believe that code can and should be mostly self-documenting, and that comments should be avoided because they become outdated and nobody reads them anyway.

For example: http://web.archive.org/web/20100415205750/http://blog.weapon...

ensiferum · 3 years ago
Yeah this is impossible because code that isn't written cannot document itself and then the only option is to have a comment. And sometimes the meaningful thing is exactly what doesn't exist. For example here we're not doing X because of Y.

u/_y4o5

KarmaCake day965August 20, 2015View Original