Hacker News new | past | comments | ask | show | jobs | submit login

This is the Internet of Things for code. This is wonderful.

This is also probably a snarky shot at npm [1], for those who lack context.

[1] https://news.ycombinator.com/item?id=11340510




My goal was for it to be entertaining and educational[1]. I love npm (which made this possible to begin with!)

[1] ES6 features (arg defaults, destructuring, modules, template literals, String.prototype.repeat), babel configuration and runtime compilation, async / await


I feel like require-from-twitter really helps enforce the Unix philosophy. It's hard to write modules with multiple responsibilities in 140 characters.


There will be a fork that allows concatenation of multiple tweets.


I wonder how large a system could be created using nested tweets of js. Needs versioning though.



This does need a warning, but PDF isn't the reason.


What does the link do?


It opens your mind until your brain falls out.


It's just a PDF.

It's a funny PDF, though.


Actually, there are several immutable FS-over-tinyURL projects. I have created some of them too. A real problem with Twitter is that you can get banned quickly for doing this.


What. The. Hell.

Amazing.


Careful what you wish for - someone is bound to try to prove you wrong now.


Hey, nice one! But reading the code I didn't see any arg defaults or destructuring. Saw the other stuff though! Which is pretty darn cool.


I was considering the source tweet as well :D


This is brilliant :).


Except the problem isn't editing, but deletions.

Twitter allows deletions and explicitly requires you to process and honor deletion events in their TOS. They have even blocked API access to programs that don't honor deletions.

So, just as bad (or, maybe worse, in that you can't even keep around committed code that comes through this process, if the originating tweet was deleted) as npm.


On the other hand, no one can reclaim a tweet after it's been yanked. So, `require from tweet` is a safer system for your production systems.


Reading the NPM blog today - that's not really a problem in NPM.

Reclaiming a module name requires a breaking version for any new code, so it shouldn't be an issue there.


It's still an issue for any developers who use '>' instead of '~' or 'x'. That's quite a few.


Twitter API clients are required to delete all copies of tweet contents when a tweet is yanked, or Twitter will revoke API access, which might bring your production systems to a deserved halt.


Yes but they won't accidentally pull a malicious version of the tweet pretending to be the original. They'll just stop working


That is an unacceptable outcome for production systems.


I'm surprised no one has mentioned IPFS as a solution to the deleting.


You have left out a very crucial fact which completely destroys your argument: Twitter has no verification process that the tweet was deleted because you're NOT ADVERTISING THE TWEETS. You're using them as source code. So the public is NOT privy to what you're doing with the tweets! So Twitter would have to get a search warrant to determine that you aren't deleting tweets! Of course they don't care; they care about what you're revealing to the public.


Twitter doesn't need a search warrant to query their own servers.


Your computer has to download the tweet before it runs the tweet. It will be cached on your computer. Compliance with twitter TOS means you have to clear your cache when twitter says the tweet was deleted. Since you're using the tweet to run code, it doesn't hurt anything if you ignore the "deleted tweet" advisory.


> Twitter would have to get a search warrant to determine that you aren't deleting tweets

Search warrants are incident to criminal activity in the United States of America. Twitter is a private company, not a law enforcement agency.


I put my code on Github. Twitter could monitor my repos if they wanted.

Writing a monitor for all of Github would even be possible.


I would say it is an equally snarky shot at all those who choose to depend on a third party module for something that can be written in 140 chars.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: