Live data from Hacker News

LeanQt – GUI is here, Widgets are near

github.com

31–40 of 55 posts

Re: LeanQt – GUI is here, Widgets are near

#31

Are there tools to evaluate (imperfectly) the percent of a binary that actually gets used? Like, run an application, run the watcher tool, then “walk the application” as best as possible and get an output: “35% of the binary was never read.” ? What’s on my mind is evaluating the actual result of tools and methods for not including unnecessary things. I struggle with this in web land. Tree shaking and such does a wond…

Read this classic article: https://fgiesen.wordpress.com/2012/04/08/metaprogramming-for...

The section called "A plan so insane, it might just work" describes what you mention.

Re: LeanQt – GUI is here, Widgets are near

#32
post #29
post #17

Earlier quoted context omitted.

> 10kSLOC for the entire universe It is the nature of idealists that they see the world idealized. Smalltalk-80 itself has nearly 30 kSLOC (the low-level code for the VM adds another 5 to 10 kSLOC); it's just more difficult to count, but I wrote tools which can do it ( https://github.com/rochus-keller/Smalltalk/ ).

Not at all being idealistic, this is a hard problem. But if we're really going to compare stuff.. Systemd alone is over 1 million lines. Probably X/Wayland as well. And the not-slim QT is probably going to end up over 1 million lines soon enough. There is a reason why this slim version exists. That's at least two orders of magnitude difference in complexity. Maybe there's no getting around it but one has got to wonde…

Oh they definitely went horribly wrong somewhere. And I suspect that shared sense is the reason so many alternative, niche, minimalist and retro projects are springing up. Personally I'm keeping a close eye on Haiku and SerenityOS as potential ports in the storm of ever-taller Jenga towers of dependencies and complexity...

Re: LeanQt – GUI is here, Widgets are near

#33

Are there tools to evaluate (imperfectly) the percent of a binary that actually gets used? Like, run an application, run the watcher tool, then “walk the application” as best as possible and get an output: “35% of the binary was never read.” ? What’s on my mind is evaluating the actual result of tools and methods for not including unnecessary things. I struggle with this in web land. Tree shaking and such does a wond…

In an interview I can't find anymore a developer from Farbrausch said that they used such a method to optimize the .kkrieger demo and ended up having a bug in the main menu because while recording the coverage the user never scrolled to a certain main menu item. So once you scrolled there you couldn't scroll up anymore.

Re: LeanQt – GUI is here, Widgets are near

#34

Are there tools to evaluate (imperfectly) the percent of a binary that actually gets used? Like, run an application, run the watcher tool, then “walk the application” as best as possible and get an output: “35% of the binary was never read.” ? What’s on my mind is evaluating the actual result of tools and methods for not including unnecessary things. I struggle with this in web land. Tree shaking and such does a wond…

In an interview I can't find anymore a developer from Farbrausch said that they used such a method to optimize the .kkrieger demo and ended up having a bug in the main menu because while recording the coverage the user never scrolled to a certain main menu item. So once you scrolled there you couldn't scroll up anymore.

This reminds me of Naughty Dog overwriting standard library functions to gain more RAM for Crash Bandicoot. They would just “delete a function and see if the game still worked.”

Re: LeanQt – GUI is here, Widgets are near

#35

Are there tools to evaluate (imperfectly) the percent of a binary that actually gets used? Like, run an application, run the watcher tool, then “walk the application” as best as possible and get an output: “35% of the binary was never read.” ? What’s on my mind is evaluating the actual result of tools and methods for not including unnecessary things. I struggle with this in web land. Tree shaking and such does a wond…

Executable binaries are memory mapped into memory. So the pages are lazily loaded. So in theory you could study how many of the pages (4 KB each) of the binary were actually loaded to get a rough idea. Obviously not very precise since it has a 4 KB granularity.

Re: LeanQt – GUI is here, Widgets are near

#37
post #29
post #17

Earlier quoted context omitted.

> 10kSLOC for the entire universe It is the nature of idealists that they see the world idealized. Smalltalk-80 itself has nearly 30 kSLOC (the low-level code for the VM adds another 5 to 10 kSLOC); it's just more difficult to count, but I wrote tools which can do it ( https://github.com/rochus-keller/Smalltalk/ ).

Not at all being idealistic, this is a hard problem. But if we're really going to compare stuff.. Systemd alone is over 1 million lines. Probably X/Wayland as well. And the not-slim QT is probably going to end up over 1 million lines soon enough. There is a reason why this slim version exists. That's at least two orders of magnitude difference in complexity. Maybe there's no getting around it but one has got to wonde…

Well, to be fair Qt Core, Gui and Widgets can du much more than ST-80; there are more platform abstractions, things like threads and unicode, more and more powerful widgets, more powerful font and 2d drawing, etc.; it's not just the same functionality with a different number of SLOC.

For the people who are comfortable with even less, it's worth comparing it to the 1991 Ceres Oberon System, which has less than 14 kSLOC including the compiler and TUI.

Re: LeanQt – GUI is here, Widgets are near

#38
post #12

Earlier quoted context omitted.

> Not Alan Key 10kSLOC for the entire universe good. if this was enough that's what we'd use though, no ? While I like this project, I don't use half of the features it mentions in the supported features, and I use half of the features with no support planned so it's not an option for me ; i'd wager anyone not making todo apps has different set of requirements which leads to something like Qt which comes with everyth…

> no scripting support ... No SQL It's mostly about concentration of responsibilities, or as they say on Unix: " do one thing and do it well ". Scripting support can easily be delegated to other projects (LeanQt inherits meta and introspection facilities of Qt which make dynamic bindings easy to accomplish, see e.g. this one for Lua: https://github.com/rochus-keller/NAF/tree/master/Script2); the same applies to datab…

yes, and Qt SQL does one thing and does it well, which is getting SQL data in a format compatible with Qt's data model. You can do it by hand but you will just literally be reimplementing what is in QtSQL's module as soon as you want to display the result of queries in a table in your GUI. Same for scripting: the "meta and introspection facilities of Qt" are exactly what makes it possible to just call a member function or set a property of a C++ object from QJSEngine ; you can use another JS engine but you'll just end up reimplement all the glue code that is in QJSEngine, and for the sake of what? Having DLLs that start with another letter than Q?

Re: LeanQt – GUI is here, Widgets are near

#39

Earlier quoted context omitted.

> Not Alan Key 10kSLOC for the entire universe good. if this was enough that's what we'd use though, no ? While I like this project, I don't use half of the features it mentions in the supported features, and I use half of the features with no support planned so it's not an option for me ; i'd wager anyone not making todo apps has different set of requirements which leads to something like Qt which comes with everyth…

See, I’d rather use Qt for the UI, rusqlite for data access, and Lua, Rhai, or an embedded JS engine for scripting.

Why, what is it going to bring you

Re: LeanQt – GUI is here, Widgets are near

#40

Are there tools to evaluate (imperfectly) the percent of a binary that actually gets used? Like, run an application, run the watcher tool, then “walk the application” as best as possible and get an output: “35% of the binary was never read.” ? What’s on my mind is evaluating the actual result of tools and methods for not including unnecessary things. I struggle with this in web land. Tree shaking and such does a wond…

You can run a profiler to determine which functions actually get called.

I'm reminded of a Smalltalk hack called Spoon. It required two systems: a host system running the full Smalltalk with all its classes, and a target system which had the barest possible Smalltalk environment. Any time an attempt was made to access a class that didn't exist on the target system, it would ask the host system for that class and if available, download it in serialized bytecode form and run it. This may have worked at method level granularity -- i.e., classes were only populated with methods that were actually used on the target system -- I'm not sure. But the result was the target system only contained enough of Smalltalk to actually run the program.

Post reply on HN