HNHacker News
TopNewBestAskShowJobs

snek

1,676 karma · joined February 24, 2017

submissionscomments
snek··on HTTP 402: Payment Required
https://www.google.com/teapot
snek··on Fancy Clojure REPL
I love seeing what people are doing in the space of REPL interactivity. I've been working on a similar project, but for Node.js[1]. One of the things I've found the most helpful so far is color highlighting the input, in addition to the output.

[1]: https://github.com/nodejs/repl

snek··on Float Toy
I really like this one: https://bartaz.github.io/ieee754-visualization/
snek··on Standalone WebAssembly games using I/O devices
wasi doesn't have sound or video, it appears wasmer exposed a nonstandard api via wasi file streams.
snek··on Problems with TypeScript
Whenever that thing about Airbnb comes up I feel compelled to remind that it was a study of eight bugs, three of which ts would've prevented.
snek··on Teen Vogue published and then deleted an uncritical story about Facebook
Archive.is blocks cloudflare dns from resolving it's site. I'd recommend finding something else.
snek··on Brittle starfish are second known example of vision in an organism without eyes
People who cannot see often turn to echolocation: https://www.sciencemag.org/news/2019/10/echolocation-blind-p...
snek··on Secure EcmaScript, a runtime for running third-party code safely
I've had a few arguments with the person who leads SES over the past couple years, stemming from the idea that the realm shim is able to be attacked by new language features it doesn't know about. (for example, dynamic import exposing the outside environment).

I'd probably stick to a WASM VM unless JS exposed the ability to spin up a separate VM like that on its own (which is very unlikely to ever happen).

snek··on Performance Testing HTTP/1.1 vs. HTTP/2 vs. HTTP/2 and Server Push for REST APIs
One of my favourite demos is https://http2.akamai.com/demo
snek··on WebAssembly is easy – a hello world example
It is designed to be able to skip the "tier up JIT" stage that JS code has to go through, where JS code is profiled at runtime to decide what should be optimized, what the types are, etc. `1 + 1` in JS and `(i32.add (i32.const 1) (i32.const 1))` should still result in the same cpu code, the only difference is that it takes longer for the JS code to get there (and there's no guarantee that it happens to the JS code).

(and yes I know, the addition would be constant folded, it's just an example okay)

snek··on WebAssembly is easy – a hello world example
This `iw` module is a pretty cool toy, but it has to compile wasm text format to wasm bytecode at runtime, every time.

An actual `Hello World` is not too much effort to be honest (30 loc) https://gist.github.com/devsnek/18228912613de5068e448bf21a66...

snek··on Duktape is an embeddable JavaScript engine, with a focus on portability
moddablexs and quickjs are probably better at this point, with current spec compatibility and whatnot. still a lot of respect for duktape though, it is not that bad to embed.
snek··on Ask HN: Any Pebble Alternatives?
I've just kept using my pebble. consistent week long battery life, it gives me notifications and tracks my activity, not much else needed.
snek··on Open-Source Spotify App
Also https://github.com/librespot-org/librespot and https://github.com/hrkfdn/ncspot
snek··on ECMAScript proposal: String.prototype.replaceAll
Yes, but it works quite well for this task.
snek··on ECMAScript proposal: String.prototype.replaceAll
You can use String.raw:

  new RegExp(String.raw`\s`)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
snek··on ECMAScript proposal: String.prototype.replaceAll
lua has s:gsub, which is basically the same thing... or are you saying js should've popped into existence with thousands of stdlib functions?
snek··on ECMAScript proposal: String.prototype.replaceAll
It has to do with certain behaviours of RegExp objects, such as the `lastIndex` property, as well as consistency with `matchAll`. There was a lot of discussion[1] about what should happen with a regex that doesn't have /g, and in the end the most consistent choice was to just disallow them entirely.

[1]: https://github.com/tc39/proposal-string-replaceall/issues/16

snek··on Make CPython segfault in 5 lines of code
it was not caused by a failure of the js vm though, it was caused (from what i can tell) by a failure in c++ tracing code.
snek··on Make CPython segfault in 5 lines of code
node dev here - none of the prs here deal with segfaults from js code, because that doesn't really happen (at least, I've never seen it happen). You might have some more success searching V8's bug tracker.
snek··on Still Why No HTTPS?
I apologize for not having a source, but browsers are actually looking into disabling shared caches between sites because of side-channel attacks.
snek··on AT&T drops out of FCC speed-test program so it can hide bad results
> "Sometimes providers boost speeds for households during the actual FCC speed-testing period," the Journal wrote. "Comcast a few years ago upgraded speeds in some regions without notifying the FCC, making test results look stellar, people close to the FCC program said. The FCC discovered the changes after spotting anomalous data and adjusted the numbers."

This whole thing is frustrating. It is made to sound like some kids pulling some harmless pranks or something. What the heck. These companies are deliberately lying and confusing government agencies.

snek··on Repl from Repo
so it tries to automatically submit prs to repos using the users? sounds like why typescript has the @types org. I'd be annoyed receiving prs of weird metadata from people using some random site or tool.
snek··on Exploiting prototype pollution

  obj = Object.create(null)
  obj = {}
is exactly the same as

  obj = {}
I would also do `Object.keys().forEach()`.
snek··on The 40% Keyboard
I use a 40% keyboard (the planck ez), and I have to say I really enjoy using it. Typing english is about the same speed at this point, but I'm still lagging a bit behind in programming, mostly because my brain still confuses layers and shift. The thing I love most through is that I no longer curl my left pinky under my hand to hit shift, and my pinky doesn't hurt all the time.
snek··on Show HN: Testing HN titles against a neural network
"blockchain ai butts": Bad: 0.0048 - Good: 0.9952
snek··on Brave launches 1.0
Regardless of Brave's intent, they operate in the advertising industry, and eventually, if not already, it will become a conflict of interest.
snek··on Bad JSON Parsers
There was a rumor that was IETF was going to specify a bunch of new breaking changes in RFC 7195 (March 2014), and because of that (irrational) fear ECMA published the 1st edition of 404 very quickly in October of 2013.

RFC 8259 and the 2nd edition of ECMA-404 contain the same change, a single sentence, specifying that JSON must use UTF-8.

snek··on Electron 7.0
> [build process]

I agree, the chromium build tooling is unfriendly af.

> I call bullshit

Lot of works goes into deterministic builds, have fun going down this rabbit hole: https://bugs.chromium.org/p/chromium/issues/detail?id=314403

> Now I have to trust them to keep all these dependencies up-to-date

Looks like it rolls on average every 10-20 minutes: https://chromium.googlesource.com/chromium/src/+log/HEAD/DEP...

> and I have to accept the unecessary bloat?

Ah yes, because all operating systems ship with a pristine installation of the latest pdfium.

snek··on Firefox Preview/GeckoView Add-Ons Support
fondly thinks back to the launch of firefox preview where hn was convinced that them not explicitly mentioning extensions in their first quarter goals meant they weren't ever going to have them and the end of the world was coming
← PreviousPage 2 of 14Next →