HNHacker News
TopNewBestAskShowJobs

DiThi

1,312 karma · joined June 23, 2014

submissionscomments
DiThi··on WebGL2 Fundamentals
A side channel attack in WebGL similar to Spectre/Meltdown is probably not possible, simply because you don't know when stuff is going to be rendered and how long it takes. You tell the GPU "do this computation" and if it took too long vsync will take 32 ms instead of 16. Maybe you can get a bit more precision with gl.readPixels but I seriously doubt it. I tried to micro benchmark features and changes and I always get too much noise.
DiThi··on Show HN: Ipfs-dropzone, a subclass of Dropzone.js that publishes to IPFS
I see. Then don't go "full ES6" but I prefer exporting an object with the class for reasons I've explained in a comment above.

But I do see ES6 modules in the wild, some of them I'm using with other languages. So I guess it's fine to leave it as-is. Or if you want to ensure maximum compatibility, use babel as I suggested but add the sources to .npmignore so they're not duplicated in the published packages.

DiThi··on Show HN: Ipfs-dropzone, a subclass of Dropzone.js that publishes to IPFS
Because having a mix of libraries/modules which some export defaults and some don't makes it cumbersome to require them here and there: I have to remember which was exported as default and which had the class inside. Also it makes more obvious visually which variables are modules and which are classes/functions. For my projects I avoid default exports even when a module only has one class (which happens frequently).

Additionally, ES6 default exports don't mix well with commonJS, sometimes I have to add require('foo').default for no apparent reason.

> Also with npm scripts, local deps that expose executables are added to your PATH

I think it didn't work reliably on windows or cygwin or something. I just tried and it works everywhere. Good to know! The only gotcha is that ";" and "&&" must have spaces around.

DiThi··on Show HN: Ipfs-dropzone, a subclass of Dropzone.js that publishes to IPFS
For other people in the comments that may have a similar problem.
DiThi··on Show HN: Ipfs-dropzone, a subclass of Dropzone.js that publishes to IPFS
> I don't know how to publish this package in a way all JS transpilers and bundlers out there can understand. Please help me.

Don't do this:

    module.exports = IPFSDropzone
Do this (and change documentation accordingly)

    module.exports = {IPFSDropzone}
or to go full ES6 do this

    export {IPFSDropzone};
add the package babel-env and add this script to package.json:

    "scripts": {
      "prepublish": "node node_modules/babel-cli/bin/babel *.js -d build/"
    },
and change main to "build/index.js".

Run "npm run prepublish" to test.

Edit: Now that I think of it, compiling with babel is probably unnecessary. But it doesn't hurt and can help old setups.

DiThi··on LLVM patch to fix half of Spectre attack
I think it means they're tricks for better performance when you _don't_ have speculative execution.
DiThi··on Fork is not my favourite syscall
If it doesn't exist already, there should be a "standard spawn stub" that, in absence of spawn it creates a new spawner process at the very beginning of an application start up, so when you do spawn, the spawner process is the one that forks with none of the copied memory and open file descriptors.

> That this nearly 50 year old crappy design choice has come to this astonishes me.

That makes me feel old. For me Unix was always invented 30-something years ago...

DiThi··on Tesla Model 3 Sets New EV Cannonball Run Record
The argument is not that "it's unfair to compare". The argument is that everything else being roughly equal, people prefer to wait for the Tesla because of its style.
DiThi··on What Could Have Entered the Public Domain on January 1, 2018
https://www.forbes.com/sites/derekkhanna/2014/02/03/50-disne...

Specially interesting those from works made in the 1800s: Most of those would have been copyrighted under the current law if it applied at the time they made the movies!

DiThi··on The 3DO: The birth of my cynicism
> Teams like Occulus are falling down the same trap as 3DO

Did you try any game like Lone Echo? It's so good it's the only game I broke my "not buying exclusives" rule with (I have a Vive). I paid for about 30-40 VR games in Steam, so it's not exactly a 3DO.

It's spelled Oculus, by the way.

DiThi··on Ask HN: What was the best CS paper you read in 2017?
What paper was the best in 2014?
DiThi··on The scrypt parameters
> An "expensive" hash function like scrypt provides both the user and the attacker the same slowdown/cost multiplier.

Not really. The user only has to wait for the computation once, a few times at most, and it can easily take less time than typing the passwords.

> * Use long secrets (ie. not human-rememberable passwords)

That's very often not the case. Some people like me put truly random passwords on every service. But 99.9% don't.

Also, you can perfectly combine _both_ long keys and expensive hashes.

DiThi··on I made a talking emoji using regular emojis and JavaScript
> Instead iterating through every byte like ""[n]

Pedantic note: JS iterates through UTF-16 2-byte code units. It's that way for compatibility reasons (used to be UCS-2), but it's the worst of both worlds: not as good as UTF-8 for ASCII, can't do operations in O(1) time like UTF-32.

DiThi··on Fog.sh – decentralized content publishing on the IOTA ledger
So they're betting that it's the hardware of the future. And not something like the Mill CPU, which has been in development for much longer and it seems it will be able to execute all the millions pieces of existing software, faster and with less energy.
DiThi··on Fog.sh – decentralized content publishing on the IOTA ledger
> By using ternary, you lose thru conversion but gain computational power.

How does that work? Isn't it being emulated on binary hardware?

DiThi··on Fog.sh – decentralized content publishing on the IOTA ledger
> 1: By using a ternary number system, the amount of devices and cycles can be reduced significantly.

How does that work? Trying to find information, it looks like it's designed for devices of the future that don't exist; so it's built on assumptions that may be plain wrong.

DiThi··on As the U.S. Retreats, Canada Doubles Down on Net Neutrality
> Regulatory compliance (especially FCC common-carrier compliance) is an added cost of doing business which absolutely could be enough to keep a business from starting up.

Have you calculated how much does that really cost? I'd say it's several orders of magnitude lower[0] than the consequence of other regulations that are the real cause there are no more ISPs.

[0] (response to a comment I made wrongly stating it doesn't cost a cent) https://news.ycombinator.com/item?id=15891156

DiThi··on As the U.S. Retreats, Canada Doubles Down on Net Neutrality
I don't see how NN would slow down breaking monopolies. The cost of complying with NN for new ISPs is negligible. And what do you mean by government "controlling" the internet? What are they deciding, exactly? As far as I know, it's just making sure that NN (the default state of computer networks) is preserved, by having them disclosing some data to the public.
DiThi··on Perkeep – Open-source data modeling, storing, search, sharing and synchronizing
Because it is! (edit: oh I see it's in the header)
DiThi··on Disney to Acquire Twenty-First Century Fox
The reason for the existence of copyright is that authors can receive compensation for their work, to incentivize creation in a new world where copying costs almost nothing ("why would I work writing a book when anybody with a press can just copy me?"). Similar to patents. But it seems people forget this.

Disney won't _die_ if their early characters become public domain. If they're hurt it will be very slowly, with enough time for jobs to shift.

And it's not clear that copyright is necessary for creativity. In some ways it can hindrance sometimes. See the case of the fashion industry https://www.ted.com/talks/johanna_blakley_lessons_from_fashi...

I guess people somehow think that only the lowest quality versions of public domain works will be popular, when the opposite is frequently the case. Like it happened, for example, with Disney versions of the Brothers Grimm fairy tales. Which is rather ironic: Disney created an empire in big part thanks to public domain.

DiThi··on Show HN: Jazzle – An Innovative, Fast Transpiler for ECMAScript 2015 and later
> I am from a country where I can no longer access npm without tor, and even then it is so excruciatingly slow as to be unusable.

Since it seems you can access github, you can install dependencies without touching npmjs, with one of these:

    npm install git+ssh://git@github.com:<githubname>/<githubrepo.git[#<commit-ish>]
    npm install git+ssh://git@github.com:<githubname>/<githubrepo.git>[#semver:^x.x]
    npm install git+https://git@github.com/<githubname>/<githubrepo.git>
    npm install git://github.com/<githubname>/<githubrepo.git>
    npm install github:<githubname>/<githubrepo>[#<commit-ish>]
(add --save if your npm is old)

Why would a country ban npmjs?

DiThi··on Show HN: Jazzle – An Innovative, Fast Transpiler for ECMAScript 2015 and later
Maybe because it combines the functionality of Babel and UglifyJS (and maybe others) while being faster than all. (I don't really know, I haven't tried it)
DiThi··on A WebAssembly interpreter written in JavaScript
Wouldn't it be better to just deploy asm.js alongside wasm? Emscripten can easily generate both, and a simple check can select which script to load.

    if(window.WebAssembly != null){
        loadScript('script.wasm.js');
    }else{
        loadScript('script.asm.js');
    }
DiThi··on The State of JavaScript 2017
Sadly? I'd say fortunately it's no longer a fad, but only fans of the language (like me) use it.
DiThi··on The State of JavaScript 2017
What about Coffee Script? Was it forgotten even though version 2 has been released recently with all features I missed and more?
DiThi··on AMD Finally Pushing Out Open-Source Vulkan Driver
Everybody that upvoted that comment to the top, at least.
DiThi··on Net Neutrality’s Holes in Europe May Offer Peek at Future in U.S
> precisely because it's permanently one pen stroke away from being eradicated

So NN is not a problem, just a temporary fix. And it doesn't limit competition (it costs nearly zero to comply). The problem are _other_ regulations. So why are some people so obsessed with removing NN?

DiThi··on Show HN: Airmash – Multiplayer Missile Warfare HTML5 Game
What I said... It's not a new idea, but it didn't made a genre back then. It was a very different internet world, too.
DiThi··on Net Neutrality’s Holes in Europe May Offer Peek at Future in U.S
> Comcast basically said, You're pushing too much stuff, pay up or we'll throttle you, and throttle they did.

It's more complex than that. And in any case Netflix gives CDN boxes to ISPs for free.

DiThi··on Net Neutrality’s Holes in Europe May Offer Peek at Future in U.S
America needs to be able to create "virtual" ISPs with full and equal access to internet. Until then, the NN law is needed.
← PreviousPage 3 of 23Next →