23 comments

[ 3.6 ms ] story [ 65.0 ms ] thread
flems.io (lightweight online html, js,css editor) does this also. i was very impressed, when i first encountered this. Everything is encoded in the url to share.

https://flems.io/#0=N4IgzgpgNhDGAuEAmIBcIB0ALeBbKIANCAGYCWMY...

cryptpad does the same, i read yesterday. https://cryptpad.fr/

(comment deleted)
URL parameters starting with # sound interesting, since they are obviously not sent to the server.
I looked it up: "#" is the location.hash and sets the anchor part of a URL. And is probably perfect for client side parameters, which is what I need. Such a discussion on HN is really often very helpful. There was a comment here that unfortunately got deleted again before I could reply that mentioned that.
It's called a "fragment", and it's never sent to the server in HTTP requests. It was originally intended to have an HTML anchor as its value. Like when you click on a section or paragraph and you see the URL in the location bar gets "#<anchor>".
Partly this is doable because although RFC 2616 (HTTP/1.1) specifies a max URL length of 2048 bytes, all the major browsers will process URLs which are much longer, with Safari allowing URL strings up to 2GB in size![1]

In 2021 probably one of the bigger blockers of giant URLs is CDNs, which impose various limits on URL size. e.g. Cloudflare limits URLs to 16kb.

[1] https://github.com/apple/swift-corelibs-foundation/blob/b23d...

Using fragments instead of query strings bypasses CDN limits, but obviously those are going to be a lot more fragile in general.
What about in 2022?
(comment deleted)
Wow, very friendly and welcoming UI/UX that quickly makes me try out stuff. It looks simple but the flow is very polished. Good job! P.S. Do you have more plans for this app? I see there's tutorials on programming.
Thanks. The main motivation was to develop a programming language for beginners. The code runner, the web apps, and the various tutorials were created kind of on the side.
Cool, but why are the variables named like you are trying to conserve memory? I understand `dx` and `dy`, but `thres` and `n_part` ?
For me the code is more maintainable if the variable names are not too long. (thres = threshold, n_part = number of particles)
How is this different from Try It Online https://tio.run ?
It runs in the browser using WASM, not on the server. And it is a beginner-friendly programming language.
In case anybody would like to view the source, see below (via PowerShell[0]):

    $Post = Invoke-WebRequest -URI "https://news.ycombinator.com/item?id=31883209" -UseBasicParsing
    $Link = $Post.Links.Where{$_.href -like "https://easylang.online/run/?code=*"}.href
    $EncodedCode = $Link -replace "https://easylang.online/run/\?code=(.+)",'$1'
    $Code = [Web.HTTPUtility]::URLDecode($EncodedCode)
    Write-Output $Code
[0]: https://github.com/PowerShell/PowerShell, note that Windows PowerShell 5.x is installed on most Windows systems by default.
Or you click on "Code" on the web page.