Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

NB: I saw LibreJS in use months ago, in person at the FSF offices. I also got in an argument about it in which I brought up points that are echoed in comments on this page.

But, I was missing the point then. (Maybe I still am.)

I think the point of this thing is show web users a truth that they might not have thought about: that most javascript in the wild isn't licensed at all && they depend heavily on it.

To see this point clearly, try an experiment: install and activate the add-in. Now, try to do something on the web. Find a restaurant, buy airline tickets, comment on a post, author a post on your blog. Most likely, you can't do any of those things. That's the point. Even ardent free software supporters are depending on [large number] lines of non-free software every day.



sort by: page size:

> If this existed, would you — an open source software developer — sign up and use it?

To whomever does create such a thing, please make any JavaScript served to the user free software (it'd be a bonus if the server software were too, of course).[0] There are sites I'd use to make donations, but I can't because the code is non-free; I don't find this to be an unreasonable request for free software projects.

[0]: https://www.gnu.org/philosophy/javascript-trap.en.html


> 1. Hardly any websites work without JavaScript these days.

Got to be that guy: that's a circular argument. Other websites are doing X, hence you should do X too.

It's as much an argument for docs-as-SPA as it's for having a large Outbrain ad with a picture of some skin disease in your docs.

(Disclaimer: I don't hate web apps that don't work without JS — I build them too. But a page of text shouldn't require JS. You can ship the JS-only version as a separate website, but don't force all users to use it)


> You may be running nonfree programs on your computer every day without realizing it—through your web browser.

We most certainly are, there's very little may be about it.

It's nice that we can see Javascript (albeit, often minimized) but we should never assume that visibility === free.


> What is "Proprietary JavaScript"? JavaScript is a part of the web, arguably the least proprietary technology platform in existence.

They're not arguing the language is proprietary, they're taking issue that the code embedded in websites is often under a proprietary license. See https://fsf.org/campaigns/freejs


> But that means you have to upload raw source code.

And what is wrong with that? JavaScript source-code-only is by orders of magnitude the most popular and successful software distribution method.


> Do you feel the same abuse when you download a desktop application, and it runs code?

Not if the source code is available. Other reasons for no are that it's not automatic and invisible.

> You are free to revoke your permission for any site to run javascript, but website owners are not obligated to go out of their way to provide their services to you if you choose to do so.

People don't do that enough for it to have much of an effect.


> Websites that Require JavaScript. When I encounter a website that absolutely requires JavaScript to function so conditioned are my reflexes that I find I've backed out and off it without me even having realizing it. I can wiz through dozens and dozens of news items on Hacker News and easily bypass any sites that will not function without JS. I've never needed to worry, as on the Web there's always thousands of equivalent or alternative websites that are more 'cooperative' from which to choose.

One of my side-projects is a solitaire based card game that I am writing a server for in Rust and a client for in JavaScript.

If I presented visitors with js disabled the opportunity to download a native client (yes, real native not just handing you a single-executable bundle of a browser and the web app), would you download it?

a) If I provided the binaries hosted on my server, served to you over TLS?

b) If I linked you to it in Windows Store / Mac App Store / an Ubuntu PPA on launchpad.net / Google Play Store / iOS App Store / F-Droid?

c) If I told you to install the Rust tool chain via https://rustup.rs/ and to run “cargo install” plus the name of my package that would be hosted on crates.io?

d) If I linked you to the build instructions in the wiki on GitHub that would tell you how to build it from source?

Please rank these from most likely to least likely that you would be willing to do if you were interested in my solitaire game.

And also, how would I best demonstrate the value to you of my solitaire game? Embedded video (plain video tag that doesn’t require js)? Screenshots and text? A link to the video on YouTube?


> Not everyone would use it

If the right people would provide the library, it would be used by enough people.

> Yes, in my mind you'd have to change everything from the ground up, starting with no longer using javascript outside of the browser

Whats the point of inside or outside of the browser?


> Calling methods with the square bracket notation > If it includes something like the above [...] and it doesn't have a free license statement, should people really complain about it?

Why on earth would this project concern itself with the coding styles of the JS that the author prefers? Even if the site and/or JS is free software, why do things things matter?

I mean, I get linting your own code, but linting the code of sites you visit just seems pointless.

This, banning AJAX requests and with the arduous process of getting into the 'libre' whitelist, makes this project a complete joke.


> A lot of non-free software is written in Javascript

Dropping JS will just lead to a lot of non-free software written in [something else]. It's not like non-free software will suddenly stop existing. You're not banning English because of the content that might use it.

There must be a better approach to this than "I'm not running any code because some of it may be non-free".


> Yes but if it was „incredibly naive“ to download and run JavaScript in the browser sandbox how naive would it have been to download and run native code outside of any sandbox?

It would be naive to download and run native code for every website you visiti, yes. A few that you trust and where you think that is warranted is a different matter.

Running javascript in a sandbox provides the illusion of safety so it gets enabled by default while still creating tons of problems.


> I have an extension idea; it's literally a single line of JS.

That's better suited as a userscript.


> The problem comes not from the language JavaScript, but from the fact that browsers, by default, will pull in JavaScript code that gets sent to them and run it to do anything at all. Emacs is supposed to defend your freedom. It's supposed to help you to defend your freedom, and lead you to defend your freedom, which means it shouldn't lead you to throw your freedom away as soon as you visit a site that tries to send you a non-free program to run straight off of that other machine. So it's important not to lead users to do computing this way.

I don't know how this is related to extending Emacs with JavaScript, but it's more or less correct about how JavaScript works in the browser (modulo "anything at all" being "anything at all in the browser sandbox"). If you only want to run free software, you necessarily must disable JS in your browser.


> Have they switched of JavaScript? Because people still do.

As an experiment I tend to disable JavaScript periodically. It is amazing how fast and responsive applications become. The amount of cruft that is downloaded is insane! Typically my experiments end after a month or so, because a lot of website don’t work _at all_ with JavaScript disabled.


> Essentially, users do not really benefit from the use of JavaScript, but websites do, and they do so mightily!

Bullshit. Lots of features that are essential in people's everyday use case need Javascript in the web.

> 4. Websites that Require JavaScript. When I encounter a website that absolutely requires JavaScript to function so conditioned are my reflexes that I find I've backed out and off it without me even having realizing it. I can wiz through dozens and dozens of news items on Hacker News and easily bypass any sites that will not function without JS. I've never needed to worry, as on the Web there's always thousands of equivalent or alternative websites that are more 'cooperative' from which to choose.

Good for you for who's use is just for browsing in HN. As for most people there who use it for work and personal reasons, I am glad Javascript is there to provide features that are not possible without it.

> 5. In very rare instances when I must visit a site that requires JavaScript to function, I've a browser add-on that has an icon on the navigation toolbar which allows me to simply toggle JS on and off whenever required. Accidentally leaving JS on is almost impossible as the icon changes from green to red when off. Similar methodologies apply on my rooted smartphone: along with the absolute prerequisite of completely removing (deleting) Google's GApps, the 3rd-party browser I use has a feature to turn JavaScript quickly off

Guess what language that browser add-on you are using is written in.

> In a much more user-centric web environment, none of us users would ever need this JavaScript 'junk'.

In a user-centric environment, we put people needs first. So having a language that empowers developers to put features that are useful to the user is the primary focus. If you want to create JS less websites, you STILL can do so.

I understand that Javascript has much to improve. But your hatred for it borders on the idealogical.


> how annoying websites are which use Javascript for things which could be done without

A good example of sites which use JavaScript for things they don’t really need are those GP mentions: ‘government sites, e-stores, banking.’

Government sites: the vast majority of government sites are simply informative text. There’s absolutely no need for me to grant the government permission execute code on my computer (which is what JavaScript does) in order to read the minutes of the latest council meeting. Even when interactivity is needed (e.g. an online tax-payment system), HTML forms (the sort we’ve had for over two decades) are a perfectly good solution for ‘enter information in a box and submit it.’ JavaScript can definitely lead to more attractive, more usable solutions — but it’s completely optional. Government sites are a great example of something which should work for anyone, even someone using an old BeOS box on the other end of a modem connexion running over a bit of wet string.

E-stores: there’s simply no need for JavaScript to display pictures & descriptive text of goods in an attractive fashion. There’s simply no need for JavaScript to give me a form to enter my credit card information & mailing address. Again, JavaScript can make the experience better, but it is also a privacy and security risk. I seem to recall that Amazon made quite a lot of money before JavaScript was a thing; I imagine it could continue to do so.

Banking: there’s no need for my bank to execute code on my computer to send me a statement of my accounts, nor to give me a form to pay bills or send money. Indeed, in my experience JavaScript just makes things worse, because instead of downloading a single HTML document from my bank’s servers I get to download dozens of trackers and bugs, as well as the code necessary to hit multiple APIs and stitch the page together out of its parts on my own desktop.

I think I read something yesterday, here or elsewhere, about how client-side JavaScript really took off at the same time as server-side Ruby was a big thing, with the implication that the reason was that Ruby was so slow that websites had to offload as much computation as possible. I don’t know, now, if that was actually the case, but I do know that it’s 2018 and my desktop experience is slower than it was in 1998, thanks to JavaScript.


> LibreJS includes a default subject line and body for the complaint email, with a link to the JavaScript Trap essay.

If that's not some pedantic RMS bullshit, I don't know what is.

At least it's easy enough for a spam filter to catch.


OP: thanks a lot paukiatwee for sorting out that html5.js hosted on Google Code still there ... of course will consider this :)

> How avoid Google will lead to openness? my main point of view that there are a lot of alternatives there but we just keep going on using what we used to use on daily basis, for example, DuckduckGo and StartPage are there but we just avoid them while we can use them. The same for too many things there over the internet.


> I’d love more tips for no-build-system javascript

1. MDN has a comprehensive guide on JavaScript modules [0]

2. A build system free way to build interactive websites could be to combine libraries like htmx[1] and or lit[2] or just the sub package lit-html[3]. Or just go with native web components and a bit of AJAX.

[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid...

[1] https://github.com/bigskysoftware/htmx

[2] https://github.com/lit/lit

[3] https://github.com/lit/lit/tree/main/packages/lit-html

next

Legal | privacy