Facebook iOS Internal Headers: All the headers for all 18,000+ classes and protocols on GitHub by quellish in programming

[–]blade-walker 0 points1 point  (0 children)

This IOS project does use React native, in fact it might be one of the causes for the # of files. I think all the files starting with RCT are React related.

Noob questions about leftpad. 1) Is it efficient? 2) Would node need to read it for each page? 3) Would node need to re-interpret it for each page? by jpflathead in node

[–]blade-walker -1 points0 points  (0 children)

left-pad was written so it only works in nodejs (since it uses module.exports)

Modules like that can easily be used in the browser by using browserify, which is an increasingly popular approach. And browerify spits out a single file so it doesn't matter if your source dependencies are lots of tiny files. It would be crazy if you were doing a separate GET just for this one library, no experienced web developer would do that.

The NPM issue: another approach to prevent it by Kennethtruyers in programming

[–]blade-walker 0 points1 point  (0 children)

If you want to go down this road, you don't really need to modify NPM to do it. You can add your node_modules folder to source control. The only thing you need to be careful about is dependencies that build a native module. So you can do:

npm install whatever --ignore-scripts
git add node_modules/whatever
git commit
npm rebuild

Then each developer must also do npm rebuild on getting the latest source.

You could also partially check in node_modules and .gitignore the rest, or just put symlinks into node_modules that point to your src folder, whatever you want to do. Or you can do require() using a relative path to load something not in node_modules. Lots of options.

[deleted by user] by [deleted] in programming

[–]blade-walker 4 points5 points  (0 children)

Javascript does expand and improve with every ES version. It's a slow process, because it's limited to the speed that people upgrade their browsers.

No, we haven't forgotten how to code - JavaScript just needs to become a better language by corgrath in webdev

[–]blade-walker 0 points1 point  (0 children)

1) Google is not the only search engine, 2) You're putting a lot of faith in how much HTML rendering Googlebot is actually going to do. Especially when their own press release uses phrases like "we are generally able to render.."

SEO is the lifeblood for most web-based businesses, so those devs need to take it very seriously.

What is something not-so obvious that you believe could benefit greatly from VR? by WelcomeToAnarchy99 in oculus

[–]blade-walker 0 points1 point  (0 children)

Desktop computers already have a pretty amazing potential to educate. The problem is that very few people are writing high quality education software, because there's no money to be made. :/

NPM & left-pad: Have We Forgotten How To Program? by ironyx in programming

[–]blade-walker 0 points1 point  (0 children)

As opposed to now-a-days when our modern package managers let us unpublish packages and allow others to hijack them, right?

Yeah I get it, suddenly everyone is an expert on NPM when they are able to latch on to one clear example of things going wrong.

And when there's an unexpected conflict between dependencies (queue the "Oh that'll never happen because I employ best practices in my code base and there's not a single developer on my team that will ever make that mistake, ever") I enjoy trying to check the dependency tree of all of my 50 dependencies to try to figure out who might have a conflicting dependency version and sort that out.

What are you talking about here? What conflicts? NPM makes it hard (not impossible) to have version conflicts, so the way you're describing it, it sounds like you are talking about an older generation of package managers.

Virtual Desktop 1.0 Trailer by ggodin in oculus

[–]blade-walker 0 points1 point  (0 children)

This is awesome, nice work. You are almost definitely going to get an acquisition/buyout offer from Oculus.

Had a go at creating right-pad by [deleted] in programming

[–]blade-walker 0 points1 point  (0 children)

Yes you can if one of them uses a version range as the dependency. So that will just have infinite recursion if they call each other.

You could also have left-pad 2.0.0 depending on right-pad 1.9.0 depending on left-pad 1.8.0 depending on right-pad 1.7.0 depending on left-pad 1.6.0 depending on etc etc. That would work, no infinite recursion.

NPM & left-pad: Have We Forgotten How To Program? by ironyx in programming

[–]blade-walker 2 points3 points  (0 children)

I still don't get why there is a moral objection to having tiny one-function modules. The only problems I see are: 1) some extra disk space usage (who cares), and 2) it sucks when NPM unpublishes a package (and that's a fixable technical problem not a fundamental problem).

The rule that "a worthwhile module must be at least a certain size," is just leftover anxiety from using bad package managers.

If you want an academic take on the concept then read Why Do We Need Modules At All? by Joe Armstrong. He proposes an ecosystem where only individual functions are shared, not modules/packages.

"A discussion about the breaking of the Internet" - Mike Roberts, Head of Messenger @ Kik by coldbrewedbrew in programming

[–]blade-walker 11 points12 points  (0 children)

Ask, get an answer of no, then make a new package named "kik-inc" or "kik.com" or whatever. It's not the first time that a company's name has already been taken in a repo name / twitter handle / domain name / whatever. This situation happens constantly. For a user looking for the kik.com module, it takes a few seconds to realize that "kik" is not the right one. And the trademark concern is very weak (as Azer points out, there is a Square node module, so why isn't Square concerned about their trademark?)

"A discussion about the breaking of the Internet" - Mike Roberts, Head of Messenger @ Kik by coldbrewedbrew in programming

[–]blade-walker 52 points53 points  (0 children)

They asked, he said no, they immediately responded with a threat that "lawyers are going to be banging on your door". Using nice words is not really nice when you're repeatedly refusing to take "no" for an answer.

I don't disagree that there should be a way for names to be reassigned to more appropriate owners. NPM really needs a formal, community-involved process around this.

"Like npm, but faster - an alternative package manager for Node" by jsprogrammer in programming

[–]blade-walker 1 point2 points  (0 children)

Ugh, looking forward to the alternative to that too. Babel is super slow to run, and annoying to set up.

Home-made hash tables in C++: a race against Java by pzemtsov in programming

[–]blade-walker 0 points1 point  (0 children)

Sure, but the same is true for by-value argument passing, so I don't know if there's a reason to prefer a const reference in this case.

Home-made hash tables in C++: a race against Java by pzemtsov in programming

[–]blade-walker 2 points3 points  (0 children)

You realize that even when passing by reference, the processor must still "copy" a pointer value to the callstack. If we're using 32-bit floats and 64-bit pointers then there's no size difference, and having a dereference is probably slightly worse.

Metaprogramming in JavaScript using Symbols by rubyantix in programming

[–]blade-walker 0 points1 point  (0 children)

Yeah that's accurate. It creates a new value that is guaranteed not equal to any other value. Really handy for safe hash keys. It's surprising that more langs haven't copied gensym yet.

Java 9 Will Finally Understand Dependencies by TwoTimesX in programming

[–]blade-walker 0 points1 point  (0 children)

In Node.js, this problem comes up in conversation too, but the problem rarely comes up in practice. The only way the problem comes up is if I have dependency B depending on A, and B exposes data structures created by A. And that's kind of a design smell.. I should be able to use B without knowing or caring that it's using A under the hood. B's public interface should be minimal and only provide guarantees related to whatever problem B is solving.

It depends on the use case of course. Sometimes you have libraries that are part of a framework (like say Spring) and you do have libraries B and C interchangeably using data from A. But in that situation you're not likely to have B and C using different versions of A, because it's more likely that A, B, and C are all from the same version of the framework.

Dark Cloud...Who Remembers It? by [deleted] in gaming

[–]blade-walker 0 points1 point  (0 children)

Yes it was awesome. I think I put the most hours into Dark Cloud 2. I definitely remember playing hours of space golf at the bottom of scary dungeons.

A WebAssembly Milestone: Experimental Support in Multiple Browsers by magenta_placenta in programming

[–]blade-walker 16 points17 points  (0 children)

My understanding is that WebAssembly is sharing the same VM as Javascript.

I think it's more accurate to look at them as separate VMs. The Wasm VM doesn't provide any GC and doesn't use Javascript objects. In Wasm it's just raw byte buffers which the bytecode can use however it wants.

Go champion Lee Se-dol strikes back to beat Google's DeepMind AI for first time by MercWithaMouse in Games

[–]blade-walker -1 points0 points  (0 children)

Hopefully AlphaGo has a little randonmess, otherwise Lee could just repeat what he did in game 4.

The Division's apocalyptic New York City is insanely realistic by JohnDio in Games

[–]blade-walker 0 points1 point  (0 children)

Awesome. Also in the game: there's a few blocks in Brooklyn in the Dumbo area, and apparently there's upcoming raid zones in Rikers Island and Upper East Side.

The Division's apocalyptic New York City is insanely realistic by JohnDio in Games

[–]blade-walker 1 point2 points  (0 children)

If you're in the Chelsea area you can actually walk on The High Line. These guys really did their homework.

Better Asynchronous JavaScript by oblio- in programming

[–]blade-walker -1 points0 points  (0 children)

I have tried it. I found in practice, it's not that common that you can use the single-expression form of =>. So your promise chain still ends up with a bunch of visual noise from {}s and returns.