Electron JavaScript Programs

The past 6 months I've learned JavaScript and CSS. Just now I tried out Electron and packaged my webapp into an .exe and ran it on Windows 7.

To be honest, this is kinda neat. But I've been browsing Jow Forums for many years, and I have a nagging feeling that what I'm doing is """"wrong"""". So tell me Jow Forums, am I a faggot or is it okay to use JS, node.JS and Electron to write programs?

Attached: electron-796x448.jpg (796x448, 11K)

Other urls found in this thread:

unix.stackexchange.com/questions/255373/replace-text-quickly-in-very-large-file
twitter.com/SFWRedditImages

Jow Forums will complain but its fine

You're doing it wrong.

based and basedpilled

You're literally running another Chrome instance just for some shitty web app. Why would anybody want that?

Go learn a real language faggot.

>it's fine to bundle an entire browser in an exe file just for a shitty web app

Learn C++ for Windows, Objective C and Swift for Mac OS, and C for unix-likes with x11

Congrats OP, you made a chrome app.

Use whatever you need for getting shit done. If file size isn't an issue, it's perfectly fine to use it

I still don't get why they don't just point to chrome, or a global engine installation, downloading missing files during an installation stage

Nah I do love a 300MB of RAM calculator

inb4 the unused RAM is wasted RAM guy
also sikk trips bro

Depends on what you want.

If you're fine with being a (below) mediocre programmer or you're just doing it as a hobby then don't worry and do whatever you like.

If you actually want to be a high paid professional then you should work on fundamentals in more low level languages like C, Go, or Rust.

No it isn't okay.
Out of a shit ton of ways to make a GUI program, you chose one of the worst.

As much as I can't stand the bloat.

If you need to build a cross platform, browser app, your choices are:

- Build a native version for each OS. Fuck that.
- use Qt or some allegedly cross platform UI that "works" but never quite looks right on any platform
- Write Javapoo
- Use Electron

I'm still not convinced which of the second two is the least worst

name one (1) practical use of C++ in Windows that isn't easier in C# or Java

OP here. I'll admit the bloat is real. My program is only a couple KB big. What's the best way to transition away from JavaScript if I want to make programs for Windows? They are mostly intricate functions with a simple GUI to input and extract data. Would be nice if adding multicore support wasn't too hard to figure out how to do.

Attached: Bloat.png (479x505, 81K)

How about writing software that doesn't require hundred megabyte crutch installed on the system for it to work?

>Rust
Tranny detected

Attached: fd.png (825x571, 493K)

Circlejerking on Jow Forums

I use AutoHotkey for simple programs, and WPF/C# for more complex things.

Learn C++ and Python

>Congrats OP, you made a chrome app.

Thanks. I never thought I'd be able to learn how to do this. I'm pretty proud and happy desu. And it's so much fun. I just wish the performance was better, because it's horrible right now. Only uses one core, don't even max it, is a ram hog and it chokes on large data sets. I guess I have a lot to learn.

please, leave JS to the web, we're sick of having software that takes all of our RAM for no reason.

>I guess I have a lot to learn.
I hate having to tell you this but some guy with 2 months of programming experience with Python could make scripts with the same functionality and that don't choke on large data sets or come bundled with an entire web browser

Attached: 1489243158001.jpg (499x488, 108K)

>I use AutoHotkey for simple programs

I love ahk, I use to automate tasks at work so I don't have to do them manually. Feels good to eat lunch while the computer works for me.

Right now I'm trying to make an ahk script that identify the top left corner of bounding boxes like pic related, then click and hold the mouse while dragging diagonally until it identify the right hand bottom corner ot the same bounding box. So far I've got it to find the corners based on pixel color and move the mouse horisontally but I can't figure out how to make it stop when it find a pixel of a desired color. I'm sure I'll figure it out though.

Attached: 0_HMacEfECt2PYQOxF.jpg (1280x720, 204K)

I'm trying to learn Python for machine learning purposes, so perhaps that's what I should double down on. I've considered learning C# because all mt colleagues at work claim that Python is a meme language..

I think that java is objectively better than js, especially for desktop programs. Also, I prefer the look of java programs over the shit that html/css/jsfags come up with.

It's not. You can easily automate a lot of shit with Python.
Comparing it to C# is also incredibly stupid.

I should clarify, they don't compare it to C# but they think it's a better language to learn than Python for the stuff we do. I suppose it's because their whole stack is based around Microsoft solutions.

Attached: 1535240035267.jpg (540x540, 44K)

>I've considered learning C# because all mt colleagues at work claim that Python is a meme language..
What does that even mean?

Python, like all languages, has upsides and downsides, recognize which languages are suited for which tasks.

Figure out what _you_ want to do and then choose a language based on that.

Electron is "fine" if you don't care about performance or low level details. The problem arises when you only know how to use Electron and you need performance or knowledge of lower level details.

Letting Jow Forums tell you what programming language to use is stupid. Half the faggots here can't even write a hello world.

Excluding good languages for political reasons like
is only limiting your options. If you want to get good, that is.

If you just want to fuck around as a hobby then it literally doesn't matter what you do. If you want to quickly iterate on badly performing monsters, then Electron is probably your thing. If you want to wank about how hardcore you are then 6502 assembly is probably more your thing.

>window 7

not shocking a retarded webdev is also one of the paranoid retards who strays on old versions of OS

thought this would be a linux elitist post but instead it's 1000 times more retarded lmao

It's so far the best method for making cross platform desktop apps. The only problem is that it's bulky as fuck, but this isn't much of an issue since storage is cheap and plentiful these days.

Windows 10 is a botnet.

Attached: 1534551080781.jpg (1280x720, 65K)

why the fuck don't we have a system where the OS only runs one underlying instance of the web renderer and uses it for all the apps and replace x11/wayland too?

chromeOS fags need not apply. thats not it.

>Python is the low-level, high-performance option now

The ride never ends
I bet ten years from now the new popular thing will be a garbage-collected VM compiled to WASM in a browser instance. "Bare metal" Javascript will be the high-performance option because you can write a text editor that uses less than 1GB

powershell

Are there any actual alternatives, that allow UI styling with HTML/CSS?

That's the main selling point, really, imo

>python
>script language
>c#
>general purpose programming language

>Figure out what _you_ want to do and then choose a language based on that.

I do a lot of text parsing and RegEx. So far I've been writing JS programs for it, and in cases with very big data sets I've used SED (Unix).

I've considered Perl, as it's supposedly good for natural language processing, and I'm very familiar with perl style regex. But lately I've also been doing more and more machine learning, so Python is my main focus right now. But ideally I'd like to run my JS apps and my SED scripts on Windows, but that would require a language that I can use to wrote programs that perform well on very large data sets (1TB+ of text) as well as have good RegEx support and ideally not be too hard to learn.

I should clarify, ideally I'd like to _convert_ my JS and SED scripts into another language that combines the ease of use of JS with the performance of SED.

Python is not the low-level or high-performance option, it's the "sane option that doesn't involve running an entire browser for what could probably be done in a 50-100 LoC script"

>I do a lot of text parsing and RegEx.
Then Electron probably isn't your thing.

Which language you use depends on what your priorities are.

If minimizing time/resources, for example if this needs to be run every day or every x minutes on a shared system then something like SED or a custom C++ solution would probably be best. If this is a professional gig you probably also shouldn't be asking for advice on Jow Forums.

If quick iterations or lots of changes are what you need then short SED or Python programs would probably be best.

If maintainability is the prime concern then SED, JS or Python probably isn't your best choice, unless you're writing very short utilities.

I honestly don't know how SED, Python, C++ and Perl stack up in terms of exactly your text processing/regex needs.

If what you're writing is larger than say, 100 lines then you should probably precisely benchmark the languages and go through proper decision making to avoid shooting yourself in the foot.

If you don't need ultra performance and relatively quick development time I would recommend SED or Python.

Both can be run with Cygwin or the new Windows for Linux subsystems, so portability shouldn't be a problem.

JavaFX

TornadoFX/Kotlin is even better.

Thanks for the insight. The way I see it, I'll try this route: JS->Python->Something that can run on "bare metal" (C,C++,etc)

Performance is important, but not paramount as SED works for now for those cases and I can break down larger projects and feed them to my JS programs in chunks, though long term obviously it would be nice to find an elegant all in one solution. I have to learn all this stuff while at the same time continually solving my tasks with the skill set I have, hence why I do JS now.

Although Jow Forums advice is a bit random, I've gotten some great advice here. Usually the advice that keeps repeating is the one to go for, and I just ask the same thing over and over until I'm fairly certain it's solid.

>I'm still not convinced which of the second two is the least worst
At least Java can be compiled to something very close to optimal machine language, and it will probably use one half to one fourth of the memory of the corresponding Electron program. Also, do keep in mind that there are alternative JVM languages that are more pleasant to use than Java itself, including but not limited to Kotlin.

>Performance is important, but not paramount as SED works for now for those cases and I can break down larger projects and feed them to my JS programs in chunks, though long term obviously it would be nice to find an elegant all in one solution. I have to learn all this stuff while at the same time continually solving my tasks with the skill set I have, hence why I do JS now.
No worries then. If you're learning on the company dime then you should definitely experiment around and see what works.

I looked at the sed source and it seems like it reads until at newline and then loads that into memory. Unless your files are 1TB without newlines then it will probably be the most mature and capable tool available.

I'm not sure how well Python does memory management for reading specific file string lengths.

If you're using sed you should probably also look at the first reply here:
unix.stackexchange.com/questions/255373/replace-text-quickly-in-very-large-file

Notice also that sed is writting in C by people smarter than both of us, so you probably won't get any performance increases from rewriting it unless you're tailoring it specifically to your hardware and/or situation.

>Although Jow Forums advice is a bit random, I've gotten some great advice here. Usually the advice that keeps repeating is the one to go for, and I just ask the same thing over and over until I'm fairly certain it's solid.
I've been here for a long time. I joined the army a few years back and stopped coming.
When I rejoined Jow Forums after a deployment I recognized that nobody knew what the fuck they were talking about, and yet everybody accepted the same old facts as the truth because everybody who knew better had left long ago (even people like Meplat were just airplane mechanics).

When I learned how to program I had the same experience with Jow Forums. People are just regurgitating the same old shit that has been passed down by people who also didn't know what the fuck they were talking about.

cont
My adviced would be to supplement whatever Jow Forums is with sites that actual professionals frequent.

After a few months you'll realize how little people here know and how much of it is just stupid language/editor/OS wars that everybody can join into because it doesn't require technical expertise from people who don't actually program.

Garbage collection. The fact that node.js is c++. There's also a reason why Microsoft themselves didn't use Java or their own c# to remake minecraft

If you go around in life always taking the easy route you're going to have a bad time. You're also a lazy worthless pajeet

>Notice also that sed is writting in C by people smarter than both of us, so you probably won't get any performance increases from rewriting it unless you're tailoring it specifically to your hardware and/or situation.

Good point. What I love about SED is that it can max out my storage media, so I can in theory just throw faster storage at the problem if I want speed. The downside of course is that some times I need to do more complex operations than SED can handle, so custom JS functions are needed.

>When I learned how to program I had the same experience with Jow Forums. People are just regurgitating the same old shit that has been passed down by people who also didn't know what the fuck they were talking about.

I see your point, I suppose I'm still at the babby stage when it come to this kinda stuff so there is still value to find here for me.

Your colleagues are fucking idiots

>Describes ChromeOS
>chromeOS fags need not apply
dam_sun.jpg