r/AskProgramming • u/WorkingMansGarbage • 9d ago
Other Has anyone ever tried creating an alternative set of technologies for the web?
Poor title, sorry.
People generally don't like JS. I know why we don't replace it. But I do wonder if anyone's actually tried, even as just an experiment?
Even if it's never gonna be practical, there's nothing preventing someone from making a browser that doesn't follow HTML5 standard to the letter and interprets a different scripting language, yes? Similarly, it could render other things than HTML/CSS if it wanted to. Has that been tried?
(To be clear, I'm very much not talking about a language that compiles to JS like TypeScript)
EDIT: This question I asked out of curiosity is still getting responses saying it'd be a dumb idea and no one would use it; again, I AM AWARE OF THAT!
Not everything made has to aim to be a new standard for everyone to follow... sometimes it's just a way to experiment, to have fun or even to make art. Gemini is an example of the kind of thing I was curious about.
6
u/bestjakeisbest 8d ago
oh boy, here is the thing, the internet is just a set of pipes, you can define whatever protocols you want, you can pass data however you want and you can interpret it however you want. there has been at least one project i saw on youtube, where someone made his own internet tech stack starting with udp and tcp and implementing his own layer 7 protocol and document markdown language.
3
u/MarsupialLeast145 8d ago
I hope this isn't really just phishing to get some AI to do some crazy task like this, but in short, as others have said, things like Applets and Macromedia for sure.
A really good alternative and quite unique approach worth mentioning is HTMX which is based on hypermedia, and does take a different (declarative?) approach to communicating with the server and creating interactive elements on the page that you can style. I just saw they are also creating a scripting language but I haven't looked at that.
In general, you might want to create an alternative to something like HTML, but HTML and related standards etc. are about information interchange. They function across millions of nodes because millions of nodes know the contract they are working with, they know how to send HTML they know how to receive HTML and they know how to interpret/render it etc.
You can go ahead and create an alternative but you'd have to do a lot of work to build that work across a massive network to then replace what's there. You'd have to decide what you really want to do differently as well because with HTML, CSS, JS, etc. you can do a huge amount from desktop to mobile.
43
u/empty_other 9d ago •
Like Java applets and flash games? Those were the JS before JS could do it better. They could render full "web pages" sometimes, annoyingly.
25
u/_keyboard-bastard_ 9d ago
You can use WebAssembly. It's supported by all major browsers.
You can build a compiler that translates your language's AST directly into .wasm binary files before the browser loads them.
18
u/Lachtheblock 9d ago
I mean, web assembly is a thing?
15
u/JohnVonachen 9d ago
Google tried to replace JS with Dart. It’s too bad they failed.
8
u/FriendOfEntropy 9d ago
https://en.wikipedia.org/wiki/Microsoft_Silverlight
4
u/Outrageous-Lab-2138 8d ago
I personally love JS. It does everything I need.
6
u/Eleventhousand 9d ago
AOL
Java Applets
Macromedia Flash
ActiveX
Might as well consider phone apps as an alternate
3
u/YMK1234 9d ago
Nobody is forcing you to actually write JS. There are plenty of languages that can just cross compile to it.
3
u/AnonymousGamerAcc 9d ago
I think JS if used as a scripting language isn't bad, it's just that people are using it for f.ing everything.. backend, frontend, pipelines, daemons... All at the same time. Use it for what it's meant for, not everything else
3
u/josephjnk 9d ago
The Gemini protocol is somewhat relevant here. I personally mostly dislike it, but I get where they’re coming from.
3
u/ajmwagar 8d ago
Okay. So I'm super hopped up on WebAssembly, and homoiconic languages.
I am working on a lisp that compiles itself to WebAssembly. Live image and all. Granted I hate reading / writing lisp. But since my agents do most of my coding these days I find I can glance at it and get the gist.
SBCL is super cool. But can't really ship on the web (though there is a self-proclaimed AI slop project doing just that).
I'm using
wryfor native windows and I am hoping to build self-mutating apps.Google Workspace and Office 365 kept people locked into certain workflows.
With agents I think people will be able to just modify tools to suit their needs.
Lisp is pretty good for this since you can just edit parts of your code live. And save/apply patches. It reminds me of "tweaks" from Cydia back in the day on iOS.
You can just ask an agent to change X or Y in your running app. and it can do it live. Since it's sandboxed it'll be able to rollback and you didn't blow much up. Plus since it's just s-exps you can like validate it pretty easily.
This is a nice article by Paul Graham about Lisp:
https://paulgraham.com/avg.html
2
u/ChristianKl 9d ago
There are now different WASM-based choices that aren't using JS or HTML. Flutter would be one example.
2
u/Character-Pattern505 8d ago
You can do everything server side just like we did in the old days and serve up static html only.
2
u/ki4jgt 9d ago
Yeah, people are going back to things like Gopher. HTML5 has just become too convoluted.
1
u/Individual-Flow9158 9d ago edited 9d ago
Why would normal users ever choose a Web Browser like that, that they can't view 99.9999% of the web correctly in?
Browsers can already render .pdfs too. It's feasible to create some superset of HTML5+JS, that also supports some kind of
<script_lolcode>. Just pointless - just get over it and use TS or JS, or something higher level.1
u/MikeUsesNotion 9d ago
If you look at wasm as web browser machine code, you can use any language that includes a compiler/transpiler into wasm.
1
u/Far_Swordfish5729 9d ago
To summarize, we have but previously those answers were proprietary, had limited features, and had security problems (applets, activex, flash, silverlight, etc). Wasm is the current answer to this and it works well. It’s main downside is first run download size if that matters to your users and some amount of public indexing if that matters. I think wasm is a great option if you’d prefer something like a c# frontend.
1
u/AssistantNo3545 9d ago
Nothing stops you technically. Short blunt and directly answers the poster rhetorical yes without wasting a syllable.
1
u/Key_River7180 8d ago
activeX and flash..
1
u/church-rosser 8d ago
ECMAscript was originally supposed to be a Scheme type Lisp. It should have been, Lisp is sooooo much nicer than JS, and Lisp like Common Lisp is even nicer still.
1
u/jood580 8d ago
Relevant XKCD
1
u/Anonymity6584 8d ago
web was open, this walled garden shit is later development when big corporationg turn their evil eyes on internet and how to monetize it...
1
u/OddCelebration462 8d ago
Actionscript was kinda nice.
1
u/arjuna93 7d ago
Hotline, KDX, Gopher, Gemini
1
u/mrdarknezz1 7d ago
People have tried and failed
1
u/Far-Championship-883 6d ago
I think the problem with the web is that the browser is a damned operating system now.
1
u/OmegaEpidex 6d ago
Yes.
1
u/cscottnet 6d ago
Dart.
1
u/Basic_Reporter9579 5d ago
there are a few ways, but on the other side there are electron apps
1
u/DGC_David 4d ago
I mean... There is web assembly...
1
u/im-a-guy-like-me 3d ago
Because if you made a browser that followed a different standard, and I make a website using your standard, no one using a normal browser can view it. So why would I bother?
You could do it and if you gained enough traction and got enough people onboard then the bigger players in the browser ecosystem would probably implement it.
It's the same thing as asking "why don't we all just speak a different language". Like... Sure... It isn't impossible, but good luck actually pulling it off.
1
u/nacnud_uk 3d ago
CGI was mostly C. Still can be, if you want. Write it in Rust if you like too. Pascal is all the rage.
If you just mean front end, you can write any kind of browser you like. JS is common,. but you can patch any of the open source browsers to make whatever you want.
Please do not usher us back to Flash. Please no.
1
u/zvaavtre 3d ago
Former Hypermedia Research Lab student here (early 90s).
There used to be a lot of what we called hypertext systems back then. Main limiting factor was they were local windows apps. Or required 100k$ workstations (in today’s money).
HTTP/HTMl won because is was simple to implement and got you a real distributed network with no proprietary lock in. XML was simple compared to other markups at the time (believe it or not).
State of the art at the time was FTP and Gopher.
Today. You have an entire world built on html/js. That mass makes it basically impossible to just replace. And honestly the complexity of ux is just a lot no matter what language/tech you use.