Live data from Hacker News

WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

github.com

21–30 of 57 posts

Re: WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

#21
post #7
post #2

Quite amazing solution. From the .hta file you can see it was inspired by VBScript (whose most popular software is ILOVEYOU I guess). It looks like the ultimate hack, but why not ? It's very creative and the intention is good as well: TypeScript/JavaScript is a very popular language. Though C#.NET is great as well. It could make sense in the very long-term that Microsoft themselves explore this possibility. Ultimatel…

This stuff pre-dates .NET and quite honestly I think that’s what m$ was going for in those early days. VBScript was pretty annoying and dealing with COM objects sucked badly. Back in the day we’d build in a local VB interop with JavaScript so we could make system calls and interact with native Windows stuffs. This predates JSON so at the time we’d use XmlHttpRpc to talk to remote/hosted services. I’ll double down on…

> “But where are my TYPEs!? How do I know what type that variable is!?”

Someone clearly hasn’t worked in any sort of sizable code base. Come back when you are writing something spanning hundreds of JS files and where it takes you three times the time to verify that any small change isn’t a typo or wrong type off from a runtime error. TS heavily speeds up the development cycle by bringing an entire class of errors from runtime to compile time and that has nothing to do with OO and inheritance.

Simply put, TS is an infinitely better and safer language to develop in and it took the web world by storm for a reason. People didn’t decide to switch en masse for shits and giggles and you should realize that just because you have a different view does not mean that everyone else around you is wrong.

> m$

Seriously? It’s 2024, and we’re all adults. This does nothing but water down your point.

Re: WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

#22
post #10
post #4

Earlier quoted context omitted.

> using native JavaScript without all the BS that comes with TypeScript do you think javascript was just too easy and people had to invent some bs to make it more interesting for no reason? You don't even know what you're talking about when you make the connection from ts to oop. My experience comming into javascript is that it's a garbage language and the web stack was a joke, everything was hard for the wrong reaso…

I think, based on many battles, a lot of folks in the early days that came from Java/C++ absolutely struggled with the key concepts of JavaScript, couldn’t find “features” (like strong typing) they claimed were critical for writing good software and invented ways to make the language fit their paradigm, rather than really deep dive into the language and embrace it. There were constant battles back then - and I’m sure…

no one said any thing about functional vs oop. Why does every vanilla js "veteran" think types === OOP and the reason we do typescript is for OOP? How about basic things like not even have a module system (before nodejs) for Christ's sake? How about doing functional programing properly, with types?

Re: WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

#23
post #18
post #15

Earlier quoted context omitted.

I love functional languages but I'm not sure how JavaScript could be considered as a functional language (at least if functional means something like haskell, or elm). Functions-as-values isn't enough, otherwise Python could be called a functional language.

Classic example of comments I've heard since the 90s. I’d strongly encourage doing a deeper dive here. Functions in JS are objects and can have their own methods/props + scope. They’re a first class citizen.

people are stupid only you, some javascript coder of all people, knows the secret of programming, spit it out in clear terms instead of making non-argument.

Re: WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

#24
post #9

Earlier quoted context omitted.

Is being a "prototypal language" not an "OO inheritance model"?

Firstly, it’s functional with closures… From there prototypal - so you can express whatever you want… the key is being functional. This was a key to the advent of JSON, but is also one of the most elegant and powerful bits of JS

You're wrong. The prototypical model of JS was inspired by the Self programming language[0], itself a descendant of Smalltalk. It is a very crude implementation for sure, but it is object programming nevertheless. Closures being present sours the purity a bit, but closures are poor man's objects[1] anyway.

[0]: https://selflanguage.org/

[1]: https://stackoverflow.com/a/11421598

Re: WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

#25
post #19
post #17

Earlier quoted context omitted.

I've enjoyed vanilla JS since forever, and currently work in a TS shop, and FWIW I think you're waaaay off base. There may have been times and places where TS was heavily OO, but all the TS I come into contact with is heavily functional, class-averse, immutable by default, etc. (In face, the Java/C++/OO-types I know strongly dislike TS because it's structurally typed. TS doesn't care a jot who extends what - as long…

There it is… that’s the classic argument. Large teams/codebase. I totally get the appeal, but the idea this can’t be done effectively without it is nonsense. Long before TS, we had JS apps with teams of 50-100+ working across hundreds of not up to a couple thousand files - in CVS/SVN repos (ugh). I will concede that TS does help in the larger teams/codebases but - I will contend it is not necessary if your team is co…

Certainly we had large teams using JS before TS - back in ye olde days before modules, when everyone picked or built a smallish abstraction (e.g. jquery) and built smallish unconnected things on top of it. But now that modules are mature and thousands of files can all reference each other, types are just necessary. They don't have to be declared in TS - you can get by to various extents with JSDocs or inference - but there's no benefit to doing those things, so large teams don't.

What I am saying is, across several comments you seem to be arguing that you think TS's massive popularity is partly due to its proponents liking Java or classical inheritance, or not understanding FP or closures, or something. And that's just wildly not true. And it's also not even true that the TS world particularly favors OO. If you weren't saying those things and I misunderstood, my bad!

Re: WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

#26
post #8

Earlier quoted context omitted.

Static/strong typing is not necessary in JS. Yes, ES6 brings the OOPiness

That’s just like your opinion, man. Just because you think that doesn’t mean it’s true. The sheer fact that TS has overtaken JS for the majority of web development says enough.

[deleted]

Re: WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

#27
post #3

Been doing this since 1999. The only thing novel I see here is the transpilers - but you know… you don’t need that. You can build HTAs with native JavaScript, CSS and HTML - and with a little VBScript mixin, directly work with Windows libs. Back in ‘99 and early 00’s I was delivering “thin-client” control panels & management tools for server farms, sensitive accounting data, among a variety of other things. It was (a…

[deleted]

Re: WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

#28
post #25
post #19

Earlier quoted context omitted.

There it is… that’s the classic argument. Large teams/codebase. I totally get the appeal, but the idea this can’t be done effectively without it is nonsense. Long before TS, we had JS apps with teams of 50-100+ working across hundreds of not up to a couple thousand files - in CVS/SVN repos (ugh). I will concede that TS does help in the larger teams/codebases but - I will contend it is not necessary if your team is co…

Certainly we had large teams using JS before TS - back in ye olde days before modules, when everyone picked or built a smallish abstraction (e.g. jquery) and built smallish unconnected things on top of it. But now that modules are mature and thousands of files can all reference each other, types are just necessary. They don't have to be declared in TS - you can get by to various extents with JSDocs or inference - but…

It’s fair that there are proponents & value props beyond those early folks that came from the Java type world.

I guess I’m tainted/jaded by the early proponents and initial rationale that was absolutely tied to - “ewwww dynamic types!?! Gross, where are my strong/static types!?”. I’ve just fought that too many times - and that was a very strong argument at the inception of TS. There certainly are value props that go beyond and more to be discovered I’m sure.

I feel like MANY if not most of the devs I work with today simply use TS cause “that’s what you do these days” - but they have no clue what the “why” is and are baffled by native JS typing - and still consider JS “garbage” as a result. Bummer. In the Scala community I hear so much hate for NodeJS because it enables JS for server-side, “where it doesn’t belong” for many of these same old reasonings about typing (even with TS!?).

So yah, there’s value there, but you don’t NEED it to write large, good software. I’m clearly just jaded by the religious debates that have gone on and on - so despite their utility, I can come across very anti to the “solutions” to IMHO shitty arguments.

Re: WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

#30
post #8

Earlier quoted context omitted.

Static/strong typing is not necessary in JS. Yes, ES6 brings the OOPiness

That’s just like your opinion, man. Just because you think that doesn’t mean it’s true. The sheer fact that TS has overtaken JS for the majority of web development says enough.

> TS has overtaken JS for the majority of web development

Has it? Or is that "just like your opinion, man"? Any citation? There's some sources that say it's more popular based on things like social mentions, etc, but that's a vanity metric. Perhaps the statement is true if you mean "web development" to be a very limited scope (like SPA using a build step), but I'm not even sure that's true then.

Post reply on HN