|
I'd start making plans to escort people out the door if they depended on this nonsense.
|
# ? Mar 24, 2016 02:31 |
|
|
# ? May 29, 2024 20:36 |
|
Heh. I think I can actually break that 1-line function, though it's surprisingly tough --- that requires messing up Function.prototype.call, which will pretty much will make everything explode. But then, if you're not doing anything that level of stupid, the function doesn't seem any better than "foo instanceof Array" (Me, I am a fan of foo instanceof [].constructor, of course!) Edit: I guess the "library" approach is better if one is doing cross-frame function calls. Yes, instanceof Array would return false on arrays from a different Window. This the coding horrors thread, right? OddObserver fucked around with this message at 03:02 on Mar 24, 2016 |
# ? Mar 24, 2016 02:50 |
|
Internet Janitor posted:If you use a CLI unpacker, archives that don't contain a top level folder can very easily explode their files into the current directory and make a mess when you blindly say "extract all". If you use a GUI unpacker you're less likely to make this mistake. Whether you care or not probably predicts which type of tools you use. I hate the ones that have the root folder in there as I always right click and select unpack to ./archivename
|
# ? Mar 24, 2016 07:19 |
|
https://gist.github.com/rauchg/5b032c2c2166e4e36713require-from-twitter posted:Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
|
# ? Mar 24, 2016 07:21 |
|
http://left-pad.io/
|
# ? Mar 24, 2016 12:09 |
|
code:
|
# ? Mar 24, 2016 12:38 |
|
That NPM stuff seems like someone heard "don't reinvent the wheel" and decided to run with it (and run with it, and run with it).
|
# ? Mar 24, 2016 13:28 |
|
Working on a new project with the ERP team to get customer data out on website for them. Example column names from a data dump: code:
|
# ? Mar 24, 2016 13:35 |
|
Hammerite posted:That NPM stuff seems like someone heard "don't reinvent the wheel" and decided to run with it (and run with it, and run with it). Which isn't a bad thing in on itself, but now you have modules that are one-liners and that's completely ridiculous.
|
# ? Mar 24, 2016 13:41 |
|
necrotic posted:This actually happened already because of this fiasco. Though this looks like someone simply botched the publishing mechanism instead of pushing something nefarious. Best part is the TempleOS guy chiming in.
|
# ? Mar 24, 2016 13:55 |
|
I love how that is-positive-integer module imports a module in order to a logical AND between two boolean expressions. Which in turn imports a number of modules, one of which is a module to do a logical AND between two booleans.
|
# ? Mar 24, 2016 14:27 |
|
HardDisk posted:Which isn't a bad thing in on itself, but now you have modules that are one-liners and that's completely ridiculous. Well that's what I mean, not reinventing the wheel is a good principle but you have to balance it against other considerations, not just totally ignore everything else and take it to an absurd extreme.
|
# ? Mar 24, 2016 15:07 |
|
dwazegek posted:I love how that is-positive-integer module imports a module in order to a logical AND between two boolean expressions. Which in turn imports a number of modules, one of which is a module to do a logical AND between two booleans. Well, we wouldn't want to do any premature optimization would we? That is ridiculous.
|
# ? Mar 24, 2016 15:47 |
|
dougdrums posted:web developers who want to be "systems programmers" but not actually learn anything about how a computer works. Every day I spend a few minutes worried that this is me.
|
# ? Mar 24, 2016 15:48 |
|
Hammerite posted:That NPM stuff seems like someone heard "don't reinvent the wheel" and decided to run with it (and run with it, and run with it). It makes sense in browser dev world where everything you do could be broken in some weird version of opera/chrome/ie/ff and you want your left pad function to be written by someone who has taken the time to understand and test these things. not that it's true in this case, but js world is definitely a place where simple things can break in weird ways.
|
# ? Mar 24, 2016 15:56 |
|
Yeah, I sometimes find myself looking for a npm library to do a somewhat simple thing just because I'm not sure I can account for all of the browser quirks. I mean, I wouldn't for a 1 line function...but maybe I would for a 20-30 line function that has lots of contributors in the hope that OSS will save me from having to figure out how 20 different browsers do...whatever.
|
# ? Mar 24, 2016 16:11 |
|
Beyond just polyfills I think people worry too much about js quirks across browsers. What will really gently caress you over are CSS quirks.
|
# ? Mar 24, 2016 16:46 |
|
xzzy posted:In summary, everyone involved was a dipshit, ignore NPM forever. End of lesson. Seriously, I would never risk any real project on the chance that some external dipshit can gently caress it up just cause his feelings were hurt.
|
# ? Mar 24, 2016 16:46 |
|
The thing about NPM and node is that the module is the basic unit of program composition. Where you might copy and paste a helper class (or bit-banging macro) from somewhere in another environment, in node/NPM you're expected to deal with it as a module, and then by induction basically you get this mess where the module package metadata outweighs the code by a factor of 30 and you have more 3rd-party points of failure than you can count.
|
# ? Mar 24, 2016 17:19 |
|
MALE SHOEGAZE posted:It makes sense in browser dev world where everything you do could be broken in some weird version of opera/chrome/ie/ff and you want your left pad function to be written by someone who has taken the time to understand and test these things. That makes perfect sense, but not when you get to the point where you're implementing a "library" that just &&s two things. At that point it seems safe to say that people have lost sight of the original purpose of having small modules and it's just a thing that they are doing for the sake of it.
|
# ? Mar 24, 2016 17:20 |
|
Hammerite posted:That makes perfect sense, but not when you get to the point where you're implementing a "library" that just &&s two things. At that point it seems safe to say that people have lost sight of the original purpose of having small modules and it's just a thing that they are doing for the sake of it. Yeah absolutely. The current state of npm is like if someone was trying to make a hyperbolic argument against using libraries except it's no longer hyperbole.
|
# ? Mar 24, 2016 18:33 |
|
Someone wrote an npm package that implements leftpad() by querying left-pad.io.
|
# ? Mar 24, 2016 18:39 |
|
fleshweasel posted:Beyond just polyfills I think people worry too much about js quirks across browsers. What will really gently caress you over are CSS quirks. This is probably true, but just like it's too much effort to figure out how to make something work across all browsers, it's too much effort to make sure something does work across all browsers! (I mean, too much effort for me and the type of projects I normally do.)
|
# ? Mar 24, 2016 19:10 |
|
Input events are still a huge mess cross-browser, that will never get cleaned up, because too much code has old compatibility hacks.
|
# ? Mar 24, 2016 20:09 |
|
Suspicious Dish posted:Input events are still a huge mess cross-browser, that will never get cleaned up, because too much code has old compatibility hacks. Clearly the solution here is to do away with Javascript as a content tool and switch to Flash. ()
|
# ? Mar 24, 2016 20:12 |
|
Let's face it, it's time to give Java applets a second chance.
|
# ? Mar 24, 2016 20:26 |
|
Let's give Silverlight a first one.
|
# ? Mar 24, 2016 20:54 |
|
Soricidus posted:Let's face it, it's time to give Java applets a second chance. Great, you've just made all of the security people reading this thread die of an aneurysm.
|
# ? Mar 24, 2016 21:33 |
MisterZimbu posted:Let's give Silverlight a first one. I think I just felt my blood pressure spike.
|
|
# ? Mar 24, 2016 22:48 |
|
lua.. that's the current darling of embedded scripting languages, right?
|
# ? Mar 24, 2016 22:50 |
|
MisterZimbu posted:Let's give Silverlight a first one. I would unironically rather build UIs in a cut-down version of WPF than in Swing, Qt or CSS/HTML.
|
# ? Mar 24, 2016 22:51 |
|
include a mirror of npm in all browsers
|
# ? Mar 24, 2016 22:57 |
|
xzzy posted:lua.. that's the current darling of embedded scripting languages, right? Lua's been around for ages. Nearly fifteen years ago I was working on a C++ program with embedded Lua scripting. It's popular because it has a small footprint and it's fairly easy to get the right hooks set up.
|
# ? Mar 24, 2016 23:00 |
|
Language-wise Lua is just JS minus the big WTFs and plus some small WTFs. The only reason to use it over JS is for implementation-quality reasons, so using it in browsers wouldn't really change anything.
|
# ? Mar 25, 2016 00:12 |
|
MALE SHOEGAZE posted:include a mirror of npm in all browsers That may not be far off; the IPFS project has been trying to implement an npm mirror, and Joe Armstrong has been talking about content-addressed modules for a few years now.
|
# ? Mar 25, 2016 00:24 |
|
IPFS is bitcoin but without any incentives for people to run nodes, right
|
# ? Mar 25, 2016 01:02 |
|
https://github.com/jezen/is-thirteen/issues
|
# ? Mar 25, 2016 05:21 |
|
Suspicious Dish posted:IPFS is bitcoin but without any incentives for people to run nodes, right I thought bitcoin was bitcoin but without any incentive for people to run nodes
|
# ? Mar 25, 2016 12:40 |
|
Hammerite posted:I thought bitcoin was bitcoin but without any incentive for people to run nodes nah, the incentive to run nodes is fake trading volume allowing people in china to exchange their crumbling yuan for silicon valley vc cash.
|
# ? Mar 25, 2016 17:29 |
|
|
# ? May 29, 2024 20:36 |
|
Plorkyeran posted:Language-wise Lua is just JS minus the big WTFs and plus some small WTFs. The only reason to use it over JS is for implementation-quality reasons, so using it in browsers wouldn't really change anything. Just so I know what column to put you in, do you consider 1-based arrays to be a small or big WTF?
|
# ? Mar 26, 2016 01:17 |