HNHacker News
TopNewBestAskShowJobs

snek

1,676 karma · joined February 24, 2017

submissionscomments
snek··on Wasm vs. PNaCl Performance Benchmark
On the note of webassembly's text format (WAT), it's a fantastic introduction into a low level assembly. Wasm is a virtual stack machine, and it's strongly statically typed, so WAT is surprisingly readable. That being said, if the WAT you're reading wasn't hand-written, it's probably going to be unreadable anyway.

Here's an example of some mutex operations in WAT: https://gist.github.com/devsnek/9274f1420b7641d1b6c34141921f...

snek··on Wasm vs. PNaCl Performance Benchmark
As someone who has worked with PNaCL before, I think its really important to stress how utterly terrible it is to work with. The intermediary representation for PNaCL was based off of LLVM IR, which is not (contrary to what a lot of people think) platform independent. The nail in the coffin though, was probably sandboxing. PNaCL is basically just running some opaque binary on your computer and crossing your fingers that chrome's sandboxing was up to snuff. Wasm, on the other hand, is built from the ground up as a mathematically verified sandboxed vm, and this works so well that modern wasm compilers don't even need to emit bounds checks on memory lookups in many cases. On a more organizational level, other browsers were not comfortable implementing something with so much control from a single company.
snek··on Wasm vs. PNaCl Performance Benchmark
Wasm has no concept of a browser, or any outside-world interaction APIs. Wasm hosts can provide APIs, for example emscripten provides bindings to wasm for canvas and networking.
snek··on Guess I'm Done with Discord
You have to remember that even if you don't care about your account getting hacked, hacked accounts are a nuisance for other users of the platform as well.
snek··on Guess I'm Done with Discord
That's Twilio's database, not Discord's. Maybe it's fair to be upset at Discord for using Twilio if Twilio can't keep their database up to date, but I don't think there are that many alternatives to Twilio.
snek··on Guess I'm Done with Discord
2FA is account security, not proof of being a good human user. TOTP is a very simple algorithm (python impl: https://github.com/pyauth/pyotp) that can be easily automated. After all, your phone telling you the code to type in has automated it.
snek··on JavaScript: The Modern Parts
Article is unrelated. The overhead for Wasm is from copying structs into and out of the Wasm's linear memory. Wasm only has ints and floats at the boundary, so you have to copy everything into structures it can understand.

Note that there is work to improve this (interface types, anyref, etc), but we're not there yet.

snek··on Using TypeScript with React
"Classes considered harmful"
snek··on General Electric: A Bigger Fraud Than Enron
wowee two pages of very large sans-serif text and "Think about this...". Is it just me or does this look like an 8th grade social studies report?
snek··on G.E. Is Accused of $38B Fraud
Well that is the point of activist short sellers; not too different from security researchers having a monetary incentive with bug bounty programs.
snek··on Ruffle – An Adobe Flash Player Written in Rust Compiled to WebAssembly
I really hope that the web archive can put this to good use, similar to how they emulate MS-DOS games in browser.
snek··on Ruffle – An Adobe Flash Player Written in Rust Compiled to WebAssembly
Unlike flash player, this runs in the browser sandbox. It's limited to what WASM and JS can access. It's also OSS, so definitely not proprietary. I can't answer the resource usage part.
snek··on Media Can’t Stop Presenting Horrifying Stories as ‘Uplifting’ Perseverance Porn
Well if you read the article, they say that the media should take these stories as opportunities to discuss pressing social issues instead of skating around them. Reporting is about bringing cohesive context to information, and these stories do the opposite.
snek··on Japanese anime studio Khara moving to Blender
having the option between free maya on an educational license and blender, i still chose blender. before 2.8 the ui in blender wasn't fantastic, but it's always been better in terms of features (at least as long as i've been doing 3d), and the community is super friendly.
snek··on Project Mu – A modular UEFI environment for building modern devices
I'm looking forward to the "UEFI: The Good Parts" O'Reilly book.
snek··on Planet: Imaging the entire Earth every day
Using a UA switcher and FF, I can't seem to find anything broken. I think the author of this page is just a bit zealous for chrome.

It also seems to work without UA switcher, but still states it won't work. ¯\_(ツ)_/¯

snek··on Show HN: engine262 - the self-hosted JavaScript engine
engine262 is primarily designed as an interface for developing and verifying JavaScript languages features as they're added to the JavaScript specification. If you read through the source, most of the code mirrors the algorithms as they appear in the specification. As such, performance is an explicit non-goal.

Hopefully y'all get a kick out of playing with some future JS features too. I'm also working locally on a system for stepping through code, although it depends on SharedArrayBuffer, which is disabled in many browsers.

Fun example of specification parity: https://tc39.es/ecma262/#sec-object.fromentries vs https://github.com/engine262/engine262/blob/85fdf5b2dcd50269...

snek··on Faster AMP on the Origin: AMP and SSR
Many licenses require that the license be distributed with the code. uglifyjs, babel minifier, and google closure compiler all try to preserve license information.
snek··on Faster AMP on the Origin: AMP and SSR
The sad truth is that Google's goal isn't efficiency, it is keeping people on Google's property. The best way to do this is to make people package their websites into little bundles that are safe for Google to preload. They're even working on a way to capture sites that don't want to invest in AMP (signed exchanges).
snek··on Should lawyers learn to code? Arguments for and against
Real question: should they be trained in formal logic? Should everyone be trained in formal logic? (I think so, anyway)
snek··on A Guide to Recording 660FPS Video on a $6 Raspberry Pi Camera
This isn't just a thought experiment, this is how some of the most influential slow motion to date has been shot, from the famous bullet dodge in the matrix to the first 1-billion fps camera. (Okay yes technically the 1-billion one is the same camera run many times but it's the same synchronization problem)
snek··on Ask HN: How can we destroy AMP?
You're asking the wrong question. AMP isn't bad, Google ranking AMP pages over equally-fast non-AMP pages is bad. But Google's main goal here is to preload/render content without the content knowing it is being preloaded, so that the page appears to load instantly when the user clicks on it.

What I think actually needs to happen is a standard for deferred navigation where the UA can be told to load a bunch of resources and then choose one of them to actually navigate to (basically what AMP does). The problem here is that Google is (as we type here) actively coming up with horrible standards like signed exchanges so that they never have to send users away from their own domain, so I don't think they would be fans of a standardized system that killed AMP.

snek··on Lawsuit filed against GitHub in wake of Capital One data breach
Actually, github monitors for that. They discuss it a bit at https://help.github.com/en/articles/about-token-scanning, although the list of companies is a bit outdated.
snek··on Contributing to the Mozilla code base
Many of these protocols are already whitelisted by firefox so that they can be handled by extensions.
snek··on Contributing to the Mozilla code base
I think browsers are somewhat unique even among "large projects" for the sheer breadth of their codebases. Everything from networking to graphics to midi is somewhere in there, and they all have to provide a somewhat common interface. It just has to be complex, no matter how well the project is organized.

On a sidenote, firefox has fantastic build times (like 20-45 minutes cold), and the codebase is fairly well organized, so if you want to try contributing to a browser, that's probably the one to start with. Chromium has a much nicer source IMO, but cold build times can be as high as seven or eight hours.

snek··on “We plan to hide ‘https’ scheme and subdomain ‘www’ in Chrome omnibox in M76”
This is the thing I would want to ask Matthew Prince about if I ever met him. Cloudflare working on AMP really surprised me, I would've expected them to make some sort of de-AMP product.
snek··on Moving the Linux desktop to another reality
Goodness this website is slow
snek··on What’s New in ES2019
You can use regex for other characters, the point of the trim functions is that they match the somewhat complex unicode whitespace.
snek··on What’s New in ES2019
There is no type annotation proposal.
snek··on What’s New in ES2019
In JS, the pattern is the type. That is the point of duck typing.
← PreviousPage 4 of 14Next →