HNHacker News
TopNewBestAskShowJobs

snek

1,676 karma · joined February 24, 2017

submissionscomments
snek··on Facebook is embedding tracking data inside the photos you download
If anyone who works at Facebook reads this, I am so very curious, when you're asked to build something like this, how do you approach that morally? I really want to know the opinion of someone actually working there.
snek··on Judge Gives E-Cigarette Makers 10 Months to Seek FDA Review
That's an excellent use of e-cigs. The issue is the companies that stuff enormous amounts of nicotine into their e-cigs and then claiming that it "helps people quit smoking" only because they're even more addicted to the e-cig, and then the kids who get hooked on these bad e-cigs.
snek··on Blender 2.80 release candidate
Even in the new UI, I still use right click to select. Old habits die hard.
snek··on Hostyoself: Server in a browser – host from your computer, your phone, etc.
To clarify: there is no server in your browser. You just shoot data across a websocket through https://hostyoself.com/ws
snek··on Hermes – A small JavaScript engine optimized for running React Native on Android
I'd like to introduce you to my religion.

https://webassembly.org/

snek··on Hermes – A small JavaScript engine optimized for running React Native on Android
Very nice numbers, although worth mentioning hermes only appears to support es5, so there's way less stuff to load.
snek··on Python consumes a lot of memory – how to reduce the size of objects?
Interestingly, V8 (the JS engine) is actively finishing up its own implementation of 32 bit pointer compression.

https://bugs.chromium.org/p/v8/issues/detail?id=7703

snek··on Preserving Laptop Stickers on MacBooks
does anyone know of vinyl skins for the thinkpad x1 extreme?
snek··on Prime Video on Chromecast and Android TV, YouTube on Fire TV
I use prime for the movies too!
snek··on Apple kills the non-Touch Bar MacBook Pro
I just got an x1 extreme, and although it takes a bit more fiddling than an x1 carbon to get running with Linux, it's an amazing experience after my macbook air. Hackers, if you want to move away from the mac ecosystem, take a look at thinkpads running linux.
snek··on Firefox 68.0
This is a lot of FUD. Making a browser is hard, and making a modular browser is harder. It's clearly on their list of things to do, but it's behind all the other "making a browser" things.
snek··on A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
I'm really sad that I lost my gist on this, but I was working on a system in Node.js for defining the capabilities of modules in an es module graph (as you suggest) where there might not be defined package boundaries. The implementation complexity (required changes to upstream V8) resulted in us going with node policies as they are today.

I don't remember the exact API, but basically an es module graph is a directed graph (e.g. edges have a direction), and because there is only one entrypoint in node, we can therefore create a hierarchy of modules. From this point on, you basically start at the root with X permissions, and from there each module can reduce the permissions of modules they import (or they can reduce their own permissions, but they can't raise them after that obviously).

snek··on A Secure Runtime for JavaScript and TypeScript Built with V8, Rust, and Tokio
V8 provides some protections against spectre-like attacks, but that's not specific to deno, as Node.js uses V8 as well.

"Secure" in this case refers to being able to not give deno access to the network or filesystem.

snek··on Babel 7.5
it's part of the stage 1 preset, and in the future it will either disappear from the stage 1 preset or move to the stage 2 preset.
snek··on How to Enable DNS-over-HTTPS in Firefox
Cloudflare has a list of all data they collect from firefox DoH here: https://developers.cloudflare.com/1.1.1.1/commitment-to-priv...
snek··on How to Enable DNS-over-HTTPS in Firefox
This article got the trr.mode key slightly wrong

0 - Default (will be one of the below options, right now it happens to be 5)

1 - Race regular DNS and DoH, use whichever one responds first

2 - Try DoH, use regular DNS if DoH fails

3 - Use DoH, regular DNS is disabled entirely

4 - unused

5 - DoH is fully disabled, always use regular DNS

snek··on ISP Association Nominates Mozilla as “Internet Villain”
Firefox also supports ESNI! These crazy villians shakes fist at Mozilla
snek··on ISP Association Nominates Mozilla as “Internet Villain”
Make sure you have a resolver mode (trr.mode) that matches your comfort!

0 = use whatever the default is (one of the below)

1 = race DoH and regular dns and use whichever replies first

2 = try DoH and then fall back to regular dns

3 = only DoH

4 = unused

5 = explicitly off

The default resolver is identical to 1.1.1.1 except it collects less data: https://developers.cloudflare.com/1.1.1.1/commitment-to-priv...

snek··on Python Ported to WebAssembly
My experience with the wasmer entity has been and continues to be that it is just copying/repackaging stuff other people do to get VC money.

Something of this sort was done a long time ago with pypy[1] and more recently CPython[2]

1: https://pypyjs.org/ 2: https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scien...

snek··on Google Earth Ported to Browsers with WebAssembly
Interestingly, they've been publicly working on this for over a year, but only in the last few weeks did they remove the "only run in chrome" check.
snek··on The Cost of JavaScript in 2019
As they get faster, people use that as an excuse to stuff more code into their sites. It's a very sad pattern.
snek··on The Cost of JavaScript in 2019
These things are being slowly worked on:

https://github.com/WICG/display-locking

https://github.com/tc39/proposal-javascript-standard-library... (https://developers.google.com/web/updates/2019/03/kv-storage)

https://github.com/tc39/proposal-observable

...etc

snek··on The Cost of JavaScript in 2019
This is an excellent analysis of JS performance and usage, although it seems to suggest optimizing your site for V8 a bit too much.

Also, the "LONG TASKS MONOPOLIZE THE MAIN THREAD. BREAK 'EM UP!" section header felt a bit on the nose.

snek··on Show HN: Web pages stored entirely in the URL
Wait until they find out about browser URL length limits :)
snek··on HTML is the Web
Putting a click element on a div is transparent to accessibility systems. And no, it isn't possible to consider an element with an onclick the same as a button, because events bubble, which means the element with the event listener isn't necessarily the element being watched for a click. IIRC there even used to be a "good practice" where people would attach a single click handler at the root and use it to dispatch events based on the `event.target` instead of attaching a separate handler to each target.
snek··on HTML is the Web
There are ARIA attributes which let you customize the advertised meaning/intent of an element, but there is nothing to, say, mark that a particular location on the page should be considered a button. As far as I'm aware, this matches how Android, Windows, iOS, etc work.

There are so many parts that go into the accessibility of an element, handling tab index, handling keyboard input, handling screenreaders, spoken voice prompting, etc, that a custom solution usually ends up being detrimental to the user's experience.

snek··on HTML is the Web
The reason browsers use the document as a building block is to provide a consistent and accessible UI to everyone using your site. This is the exact same thing that Windows, Apple, Android, etc do with their UI frameworks that they recommend you use. It also provides the ability for websites to safely degrade on older browsers because unknown elements can still be rendered in the correct hierarchy.

Now in both cases, you can just make your app a fullscreen canvas or opengl/metal viewport or whatever and manually render everything to that while manually handling user input, but you lose interactivity, accessibility, extensibility, etc.

snek··on HTML is the Web
Gosh please use the correct elements when you make a webpage, even if you're in react vue jsx whatever. It makes browsing the web so much easier for people using accessibility tools, and as the author of this article says, it's very easy to do. There are even automated tools to help test accessibility, with pa11y and lighthouse being the most popular.
snek··on Show HN: Guardscript – Detect any changes made to your JavaScript files
Imagine an internet where instead of making this tool, people stopped including billions of third party scripts.
snek··on Regulatory Capture at ICANN
Everything I read about ICANN as of late is just horrible. There must be something we can do :(
← PreviousPage 6 of 14Next →