And also why so many cross-platform applications are written in Electron these dayskoitsu wrote: And now you know why I stick with CLI software development.
Single, precompiled program for both Windows and Linux?
Moderator: Moderators
Re: Single, precompiled program for both Windows and Linux?
My games: http://www.bitethechili.com
Re: Single, precompiled program for both Windows and Linux?
Lots of people know JavaScript... It's a very versatile language that makes it easy to get things done quickly. Combine that with the ability to effortlessly deploy to several platforms and you have your answer.gauauu wrote:And also why so many cross-platform applications are written in Electron these days
Re: Single, precompiled program for both Windows and Linux?
The other answer is that some developers feel entitled enough to believe that their program is the only program running on a computer, and they have no reservation against using 450 MB of RAM for a task that could take 30 MB or less. Compare the RAM use of Skype for Linux (desktop), even minimized down to just the taskbar icon for notification of new messages, with the RAM use of an IRC client such as HexChat.
- TmEE
- Posts: 960
- Joined: Wed Feb 13, 2008 9:10 am
- Location: Norway (50 and 60Hz compatible :P)
- Contact:
Re: Single, precompiled program for both Windows and Linux?
I very much dislike such programs. That laptop I generally use for everything will be brought to its knees, fan at full blast and everything near frozen. Joys of modern world...
- Drew Sebastino
- Formerly Espozo
- Posts: 3496
- Joined: Mon Sep 15, 2014 4:35 pm
- Location: Richmond, Virginia
Re: Single, precompiled program for both Windows and Linux?
I don't know how anyone could feel good about themselves for creating horribly unoptomized programs that are all to common, unfortunately. Assembly has always had the reputation of being impossible to program in (usually said by people who aren't assembly programmers...), but I've been seeing the same be said about C, which is ridiculous. Of course, your algorithms have a large part to do with performance, but I keep seeing all these CS majors having to write a bunch of fancy notation about the efficiency of an algorithm ...while they code in Python.
- TmEE
- Posts: 960
- Joined: Wed Feb 13, 2008 9:10 am
- Location: Norway (50 and 60Hz compatible :P)
- Contact:
Re: Single, precompiled program for both Windows and Linux?
You don't need assembly for a high performance program, just normal C/C++ is enough. But world seems to move towards interpreted stuff where JIT is the best case.
Maybe the carbon emissions limiting stuff catches up with computers and wasted cycles get taxed or something. one can hope lol
Maybe the carbon emissions limiting stuff catches up with computers and wasted cycles get taxed or something. one can hope lol
- Drew Sebastino
- Formerly Espozo
- Posts: 3496
- Joined: Mon Sep 15, 2014 4:35 pm
- Location: Richmond, Virginia
Re: Single, precompiled program for both Windows and Linux?
I don't fully understand the reason (even in this thread about cross compatibility) because your performance goes to shit for some admittedly nice library functions (not that they couldn't be implemented in C/C++) a few perks like garbage collection. How about don't make seemingly everything dynamically allocated as what seems to be common practice at this point.
Re: Single, precompiled program for both Windows and Linux?
Exactly. That was my point -- despite how much it's annoying to use Electron apps, it makes complete sense from the developer's perspective, based on how difficult or inconsistent other cross-platform toolkits are.tokumaru wrote:Lots of people know JavaScript... It's a very versatile language that makes it easy to get things done quickly. Combine that with the ability to effortlessly deploy to several platforms and you have your answer.gauauu wrote:And also why so many cross-platform applications are written in Electron these days
My games: http://www.bitethechili.com
Re: Single, precompiled program for both Windows and Linux?
It makes total sense from the developer's perspective. Using JavaScript and the tons of libraries that exist for it they can get their products released much sooner than if they bothered with optimized code reach platform. Speed of development is much more important than execution speed these days!
What bothers me the most isn't even the performance or RAM usage of these programs (as long as I don't need to keep them running in the background, of course), but the fact that each program comes with its own copy of node.js, chromium, and the whole runtime environment, making programs that would otherwise occupy just a few kilobytes cause you storage problems on your mobile devices.
What bothers me the most isn't even the performance or RAM usage of these programs (as long as I don't need to keep them running in the background, of course), but the fact that each program comes with its own copy of node.js, chromium, and the whole runtime environment, making programs that would otherwise occupy just a few kilobytes cause you storage problems on your mobile devices.
Re: Single, precompiled program for both Windows and Linux?
Just wanting to put in my own two cents.
All this stuff sucks because creating stuff from scratch outside of languages which require toolkits and such to make a UI is a complete and utter bitch, and it sucks. And it's 10x more code and headache for what should be 5% of your time.
I totally understand why it's appealing to roll a language and environment where doing custom stuff well and cool doesn't suck and you can even code in it. But it does suck that it's so high level and shoe-horned into working instead of being the actual right tool for the job. Add so much code to the environment to make it work even when it shouldn't.
TLDR: I think UI's and probably multiple platforms are why this shit sucks.
All this stuff sucks because creating stuff from scratch outside of languages which require toolkits and such to make a UI is a complete and utter bitch, and it sucks. And it's 10x more code and headache for what should be 5% of your time.
I totally understand why it's appealing to roll a language and environment where doing custom stuff well and cool doesn't suck and you can even code in it. But it does suck that it's so high level and shoe-horned into working instead of being the actual right tool for the job. Add so much code to the environment to make it work even when it shouldn't.
TLDR: I think UI's and probably multiple platforms are why this shit sucks.
Re: Single, precompiled program for both Windows and Linux?
It's surprising what you can do with even a small amount of JavaScript and HTML.
I once downloaded a .zip for a Discord log viewer, and was surprised to find out it contained an 18 KB .html file. I'd never downloaded a program only to find out it was just an .html file before. But I tried it, and was shocked at how much functionality it had despite being so small.
No megabytes of JavaScript being dragged in. No dependencies at all, in fact, besides the web browser itself. Yet... you could load files, you could switch between different channel tabs, you could change the number of messages per page, filter by user or message, formatting was processed, images were loaded inline... It's impressive how much functionality was packed into that one file.
Yes, I know. It's all because it has a massive web browser to call into. That's a dependency. The power to manipulate these trees of semantic elements and have it all work and render and everything else comes at a pretty hefty price, storage-wise. But I also think it's true that your web browser isn't exactly going anywhere, unless you plan to live as a hermit. The fact that you're able to read this post in the first place kinda tells me you aren't.
So, if you want to write a program as a simple web app, that's a perfectly legitimate choice in my eyes. It's probably the easiest way to make a cross-platform program these days, and you get a bunch of nice features out of the box, like users being able to customize its appearance completely using CSS, accessibility for the blind practically for free (assuming you don't abuse JS to hell and back), spell-checking in text inputs, and other fun stuff along those lines.
But that also leads me to my next point. Your user having a web browser can be taken for granted. So just have it run in the browser! You don't need to drag in your own entire separate copy of Chromium to run it on. It can still be local without having to be a native app. You probably don't need a lot of those JavaScript dependencies either. If you can make small native apps, then you can sure as hell make small web apps, considering how powerful web browsers are these days.
I once downloaded a .zip for a Discord log viewer, and was surprised to find out it contained an 18 KB .html file. I'd never downloaded a program only to find out it was just an .html file before. But I tried it, and was shocked at how much functionality it had despite being so small.
No megabytes of JavaScript being dragged in. No dependencies at all, in fact, besides the web browser itself. Yet... you could load files, you could switch between different channel tabs, you could change the number of messages per page, filter by user or message, formatting was processed, images were loaded inline... It's impressive how much functionality was packed into that one file.
Yes, I know. It's all because it has a massive web browser to call into. That's a dependency. The power to manipulate these trees of semantic elements and have it all work and render and everything else comes at a pretty hefty price, storage-wise. But I also think it's true that your web browser isn't exactly going anywhere, unless you plan to live as a hermit. The fact that you're able to read this post in the first place kinda tells me you aren't.
So, if you want to write a program as a simple web app, that's a perfectly legitimate choice in my eyes. It's probably the easiest way to make a cross-platform program these days, and you get a bunch of nice features out of the box, like users being able to customize its appearance completely using CSS, accessibility for the blind practically for free (assuming you don't abuse JS to hell and back), spell-checking in text inputs, and other fun stuff along those lines.
But that also leads me to my next point. Your user having a web browser can be taken for granted. So just have it run in the browser! You don't need to drag in your own entire separate copy of Chromium to run it on. It can still be local without having to be a native app. You probably don't need a lot of those JavaScript dependencies either. If you can make small native apps, then you can sure as hell make small web apps, considering how powerful web browsers are these days.
Re: Single, precompiled program for both Windows and Linux?
For sake of counterpoint:
Also, your analysis of the software that can view the log is only part of the reality. The software that builds this JavaScript (because that's what it is -- the .html is for convenience and presentation) is here -- https://github.com/chylex/Discord-History-Tracker -- and involves Python bare minimum. If you want a minified CSS (for minimising how much disk space/network traffic the CSS uses) you need Java, and if you want similar for the JavaScript itself, you need Node and npm. This is probably a good 200MBytes or more of tools/disk space/whatever just to build what, a glorified log viewer?. I urge you to browse through repository I linked -- don't just click the URL, actually go through the subdirs -- and you'll see what I mean.
This is why many of us in this industry call it "webshit". But if you're going to use webshit, you might as well go all-in and use it to its fullest, because you've succumbed to the bloat by choosing it. You can indeed make some pretty useful things with it, but there are very very few (read: extreme minority) of webshit people who focus on minimalism. I only know of 3 or 4 people *at most*, and those people are like needles in a haystack. Most of what you find in the web-o-sphere will be large -- either in run-time or in build. Keeping runtime sizes down (executable, RAM, etc.) is good, and I appreciate that when I see it, same with web devs that minimise the number of external fetches for content, keep code clean and minimal (one JS file under 64KBytes is wonderful), etc... but it's not commonplace.
But at least you can do GUI things a bit easier... assuming you like CSS, HTML, and all of that.
Meanwhile, IRC clients -- which is really just what Discord is, a glorified IRC client -- come in no where near that. I can also manipulate, view, search, etc. IRC logs using any tool on any OS that can open/read a text file. No HTML, no 260MByte RAM client to generate logs, no "oh I can't do anything with this because it's in some special webcrap format", etc.. I can actually talk on IRC without even using a real IRC client -- I've used telnet on many occasions.Also, your analysis of the software that can view the log is only part of the reality. The software that builds this JavaScript (because that's what it is -- the .html is for convenience and presentation) is here -- https://github.com/chylex/Discord-History-Tracker -- and involves Python bare minimum. If you want a minified CSS (for minimising how much disk space/network traffic the CSS uses) you need Java, and if you want similar for the JavaScript itself, you need Node and npm. This is probably a good 200MBytes or more of tools/disk space/whatever just to build what, a glorified log viewer?. I urge you to browse through repository I linked -- don't just click the URL, actually go through the subdirs -- and you'll see what I mean.
This is why many of us in this industry call it "webshit". But if you're going to use webshit, you might as well go all-in and use it to its fullest, because you've succumbed to the bloat by choosing it. You can indeed make some pretty useful things with it, but there are very very few (read: extreme minority) of webshit people who focus on minimalism. I only know of 3 or 4 people *at most*, and those people are like needles in a haystack. Most of what you find in the web-o-sphere will be large -- either in run-time or in build. Keeping runtime sizes down (executable, RAM, etc.) is good, and I appreciate that when I see it, same with web devs that minimise the number of external fetches for content, keep code clean and minimal (one JS file under 64KBytes is wonderful), etc... but it's not commonplace.
But at least you can do GUI things a bit easier... assuming you like CSS, HTML, and all of that.
Re: Single, precompiled program for both Windows and Linux?
I can read this post in Firefox. I cannot use Skype in Firefox because Skype for Web denies access from any web browser that isn't Microsoft Edge or Google Chrome. In order to use Skype for Web on the computers that I regularly use, I would have to install Google Chrome and run it alongside the existing Firefox browser, potentially causing the computer to dip into swap.Nicole wrote:Yes, I know. It's all because it has a massive web browser to call into. That's a dependency. The power to manipulate these trees of semantic elements and have it all work and render and everything else comes at a pretty hefty price, storage-wise. But I also think it's true that your web browser isn't exactly going anywhere, unless you plan to live as a hermit. The fact that you're able to read this post in the first place kinda tells me you aren't.
Except for ability to keep other applications in RAM at the same time, as koitsu alluded.Nicole wrote:So, if you want to write a program as a simple web app, that's a perfectly legitimate choice in my eyes. It's probably the easiest way to make a cross-platform program these days, and you get a bunch of nice features out of the box
Re: Single, precompiled program for both Windows and Linux?
koitsu wrote:For sake of counterpoint:
[Task Manager showing Discord.exe processes]
You did see I was arguing against web apps as native apps, right? RAM usage is not nearly as bad when you're not dragging in an entire extra browser for each individual program. Don't just look at your browser processes either; they usually include multiple tabs in a single process.tepples wrote:Except for ability to keep other applications in RAM at the same time, as koitsu alluded.
Maybe, because I happened to mention a Discord log viewer, you think my post is supposed to be a glowing endorsement of Discord or something. It's not. Discord is horribly bloated and occasionally brings my computer to its knees for a few seconds whenever I bring up the native app.koitsu wrote:Meanwhile, IRC clients -- which is really just what Discord is, a glorified IRC client -- come in no where near that.
The fact that the program happened to be a Discord log viewer was just pure chance. The reason it left an impression on me to begin with was the contrast of its size to other, clearly far more bloated web apps. Don't take my endorsement of a 18 KB program and apply it to what is currently a 300 MB behemoth on my hard drive. It is not the same thing.
...is not relevant. Any program, native ones included, can have horribly convoluted build processes. That log viewer was just an example of a full-fledged GUI program that can do something useful (and still have room for extra features!) despite only being an 18 KB .html file. I don't really care how that file was made, and even if I did, there is nothing in principle stopping it from being built with a small C program or even hand-written.koitsu wrote:Also, your analysis of the software that can view the log is only part of the reality. The software that builds this JavaScript
My post is advocating for more of them.koitsu wrote:but there are very very few (read: extreme minority) of webshit people who focus on minimalism.
Much easier. So much easier that inexperienced programmers flock to it in droves. These programmers frequently don't have the background knowledge to understand what's happening under the hood. Some of them know and don't care. It's only natural that many programs will be large, bloated messes. But it really doesn't have to be that way.koitsu wrote:But at least you can do GUI things a bit easier... assuming you like CSS, HTML, and all of that.
I am not endorsing Skype. I use Firefox myself. I can't stand apps that don't work across all major browsers.tepples wrote:I can read this post in Firefox. I cannot use Skype in Firefox because Skype for Web denies access from any web browser that isn't Microsoft Edge or Google Chrome. In order to use Skype for Web on the computers that I regularly use, I would have to install Google Chrome and run it alongside the existing Firefox browser, potentially causing the computer to dip into swap.