Recent submissions

Comment · 5 years ago
Leaking your auth tokens through XSS sucks more.
Comment · 6 years ago
Overview from the about section (note: it's not my project):

> Unravel is my project to reengineer the internet (DNS and up). It will replace messaging, chat, social networking, search, media and file shareing, and a whole lot more. It will be open source and alow anyone to build anything they want on top of it. It will be built to be secure, and provide privacy, veryfyability.

> At its core Unravel will be a mesh distributed database with an API to access the data. It makes heavy use of checksums and ECC encryption for encryption and verification. It is written in C for maximum preformance, and is built to run on anything from an enbeded device, to a phone, a PC or a super computer.

> I dont like what the internet has become. Especialy I don't like the cloud. Today most comunication online happens using walled guarden intermediaries who store and inspect and triage everything. There shouldnt need to be any intemidiares to do any of the things we want to do, but right now we have to. I think that who controls information matters. I think that privacy matters. I think the user should be in charge, of what they see, and who they comunicate with, the software they run, and what information they store and share.

> Maybe the rest of the world dont care about any of this. Maybe everyone else is happy with the internet we have. I'm fine with that, I'm just not fine with there not being any other options. Thats what im doing, I'm building another option, because I can, and because someone should.

Comment · 6 years ago
Overview of the talk from a comment[0] of that video:

> The goal of Node was event driven HTTP servers.

>

> 5:04

> 1 Regret: Not sticking with Promises.

> * I added promises to Node in June 2009 but foolishly removed them in February 2010.

> * Promises are the necessary abstraction for async/await.

> * It's possible unified usage of promises in Node would have sped the delivery of the eventual standartization and async/await.

> * Today Node's many async APIs are aging baldly due to this.

>

> 6:02

> 2 Regret: Security

> * V8 by itself is a very good security sandbox

> * Had I put more thought into how that could be maintained for certain applications, Node colud have had some nice security guarantees not available in any other language.

> * Example: Your linter shouldn't get complete access to your computer and network.

>

> 7:01

> 3 Regret: The Build System (GYP)

> * Build systems are very difficult and very important.

> * V8 (via Chrome) started using GYP and I switched Node over in tow.

> * Later Chrome dropped GYP for GN. Leaving Node the sole GYP user.

> * GYP is not an ugly internal interface either - it is exposed to anyone who's trying to bind to V8.

> * It's an awful experience for users. It's this non-JSON, Python adaptation of JSON.

> * The continued usage of GYP is the probably largest failure of Node core.

> * Instead of guiding users to write C++ bindings to V8, I should have provided a core foreign function interface (FFI)

> * Many people, early on, suggested moving to an FFI (namely Cantrill) and regrettably I ignored them.

> * (And I am extremely displeased that libuv adopted autotools.)

>

> 9:52

> 4 Regret: package.json

> * Isaac, in NPM, invented package.json (for the most part)

> * But I sanctioned it by allowing Nod's require() to inspect package.json files for "main"

> * Ultimately I included NPM in the Node distribution, which much made it the defacto standard.

> * It's unfortunate that there is centralized (privately controlled even) repository for modules.

> * Allowing package.json gave rise to the concept of a "module" as a directory of files.

> * This is no a strictly necessary abstraction - and one that doesn't exist on the web.

> * package.json now includes all sorts of unnecessary information. License? Repository? Description? It's boilerplate noise.

> * If only relative files and URLs were used when importing, the path defines the version. There is no need to list dependencies.

>

> 12:35

> 5 Regret: node_modules

> * It massively complicates the module resolution algorithm.

> * vendored-by-default has good intentions, but in practice just using $NODE_PATH wouldn't have precluded that.

> * Deviates greatly from browser semantics

> * It's my fault and I'm very sorry.

> * Unfortunately it's impossible to undo now.

>

> 14:00

> 6 Regret: require("module") without the extension ".js"

> * Needlessly less explicit.

> * Not how browser javascript works. You cannot omit the ".js" in a script tag src attribute.

> * The module loader has to query the file system at multiple locations trying to guess what the user intended.

>

> 14:40

> 7 Regret: index.js

> * I thought it was cute, because there was index.html

> * It needlessly complicated the module loading system.

> * It became especially unnecessary after require supported package.json

>

> 15:28 Talks about Deno.

[0]: https://www.youtube.com/watch?v=M3BM9TB-8yA&lc=UgwteTb0N1PFq...

Comment · 7 years ago
For reference, I own an Xiaomi Mi Notebook Pro which is at 87% capacity after 1 year.
Comment · 7 years ago
Comment · 7 years ago
Comment · 7 years ago
In Reason

    let sum = (a, b) => a + b;
actually accepts only arguments of type int, not any numeric type. The + operator is defined as

    let (+): (int, int) => int;
To have the function accept floats, for example, you would have to use the +. operator like this

    let sum = (a, b) => a +. b;

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton