Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
holy lol

https://github.com/azer/left-pad/blob/master/index.js

Adbot
ADBOT LOVES YOU

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer
drat you missed out on being the cornerstone of an entire software ecosystem by like two years.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
im late to this whole brogrammer game

i still write all my web dev stuff in boring old manual html, js, and css.

we just inherited a project at work that used webpack and babel and its a spa so theres a whole frontend toolchain of uglify.js and source maps and i wasted my thursday and friday simply getting it to loving compile

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
i'll make the guy fawkes video

abraham linksys
Sep 6, 2010

:darksouls:
the overhead of creating and using an npm module is theoretically so low that they've always encouraging splitting everything into its own module. even libraries like lodash are also available as individual modules. i have a project that uses _.clamp exported to an individual module because sure, why not, this lovely language and its lack of a standard lib means i gotta get this function from somewhere and it's easier than copy-pasting and i don't need to pull in all of lodash just for it

of course npm hosed up by making it possible to unpublish anything. they should do what mix does and give you an hour to unpublish/revert or what rubygems does and let you remove it from the searchable index but allow existing dependent packages to still install it

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
i'm the pre-alpha version number

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
did you guys see the comments on his blog announcement? where several biological adults are telling him he did the right thing? the survival of the web is in these people's hands

cowboy beepboop
Feb 24, 2001

Suspicious Dish posted:

i wrote that last night

code:
    function formatHex(v, w) {
        var S = v.toString(16).toUpperCase();
        while (S.length < w)
            S = '0' + S;
        return S;
    }
why is there an npm module for this and why don't people just write out the two lines of while loop in their own module

i think you mean why doesn't the startard library save you from this dumb boilerplate

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
a challenger appears!

JavaScript code:
function left_pad(str, len, ch) {
  // argument fixup stuff here

  var res = String(ch);
  for (var n = 1; n < len; n += n)
    res += res;
  res += str;
  return res.slice(-len);
}
i don't have a github account, can someone submit this? let's make a diffrence yospos

Gazpacho fucked around with this message at 08:01 on Mar 23, 2016

suffix
Jul 27, 2013

Wheeee!

Suspicious Dish posted:

i wrote that last night

code:
    function formatHex(v, w) {
        var S = v.toString(16).toUpperCase();
        while (S.length < w)
            S = '0' + S;
        return S;
    }
why is there an npm module for this and why don't people just write out the two lines of while loop in their own module

bro get on the micro-library train, what if like every function was its own library
(i see this idea every year or so, usually they propose identifying functions by hash or uuid or something)

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

suffix posted:

bro get on the micro-library train, what if like every function was its own library
(i see this idea every year or so, usually they propose identifying functions by hash or uuid or something)

getting close to the unix philosophy yea

JawnV6
Jul 4, 2004

So hot ...

suffix posted:

usually they propose identifying functions by hash or uuid or something
that sounds complicated, just use strlen() for now

Sapozhnik
Jan 2, 2005

Nap Ghost

JawnV6 posted:

that sounds complicated, just use strlen() for now

img-captain-america

Shaggar
Apr 26, 2006
if its not in jquery or knockout you probably don't need it

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
npm is such a great ecosystem you guys

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
the code isn't that bad but obviously it need some kind of stackoverflow-like maturity engine

i'm less upset about this one guy, than the throngs who are rushing to say that he "did the right thing", meaning any one of them is ready to go galt over hurt feelings

Gazpacho fucked around with this message at 01:13 on Mar 24, 2016

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
anyone can write good code. distributing and managing it with maturity is the test, and so much of the js ecosystem won't or can't. like underscore guy, who had a hissy fit over people suggesting that maybe his heavily used library should follow semver so he's not shipping backwards incompatible changes in minor version.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:


lomarf

fritz
Jul 26, 2003

Maluco Marinero posted:

anyone can write good code.


objection.

fritz
Jul 26, 2003

Maluco Marinero posted:

distributing and managing it with maturity is the test, and so much of the js ecosystem won't or can't. like underscore guy, who had a hissy fit over people suggesting that maybe his heavily used library should follow semver so he's not shipping backwards incompatible changes in minor version.

but this is truth

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

fritz posted:

objection.
well as long as they limit themselves to 20 lines at a time

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Maluco Marinero posted:

anyone can write good code. distributing and managing it with maturity is the test, and so much of the js ecosystem won't or can't. like underscore guy, who had a hissy fit over people suggesting that maybe his heavily used library should follow semver so he's not shipping backwards incompatible changes in minor version.

the one thing I can't understand is why the lodash guy keeps trying to merge it and underscore together instead of just saying gently caress it and saying lodash is better, underscore is trash, let's move on with our lives. what does he gain out of this horrible arrangement trying to work with that guy?

buttchugging adderall
May 7, 2007

COME GET SOME
Kik posted the email chain and a response to the whole debacle in their own medium post: https://medium.com/@mproberts/a-discussion-about-the-breaking-of-the-internet-3d4d2a83aa4d

Basically dude is a child.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Stumpalitious posted:

Kik posted the email chain and a response to the whole debacle in their own medium post: https://medium.com/@mproberts/a-discussion-about-the-breaking-of-the-internet-3d4d2a83aa4d

Basically dude is a child.

holy poo poo hes a huge baby

homercles
Feb 14, 2010

It seems a bit career limiting to throw such a visible temper tantrum.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
this one dude doesn't seem to be dealing well with the criticism: https://twitter.com/izs/status/712510512974716931

(see his other tweets in the thread)

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Symbolic Butt posted:

this one dude doesn't seem to be dealing well with the criticism: https://twitter.com/izs/status/712510512974716931

(see his other tweets in the thread)

he apparently retweeted something from the fake baldwin who's all about gamergate?

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

homercles posted:

It seems a bit career limiting to throw such a visible temper tantrum.
if hypothetically we were hiring someone to write one-page JS modules and his resume landed on my desk, i might not necessarily toss it, but I'd make sure our engineering VP knew the story and got a chance to lecture him about the consequences he could face if he were to intentionally gently caress over us or our customers

otoh he's an autodidact and gently caress autodidacts

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
I too can't get it hard unless I lay down some cold hard life truths on a hypothetical js autodidact fucktard
come see live today the creation of tomorrow's industry dinosaurs

gonadic io
Feb 16, 2011

>>=
How to clutter Hackage hackage.haskell.org
23 points submitted 9 hours ago by noteed22 commentssharesavehidereport

http://hackage.haskell.org/package/ispositive

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Isn't testing if a number is an integer and positive in js just doing "(butt) => butt|0 == butt && butt > 0;"

piratepilates fucked around with this message at 21:53 on Mar 24, 2016

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
jesus it's a perfectly legitimate thing to have in a javascript library. javascript likes to implicitly convert between types in sometimes surprising ways, and it has pitfalls like number vs Number and string vs String, so strict type-checking wrappers for common operators make a lot of sense. every time I wrote javascript I had to write stupid type-checking code that I didn't deem worth of a library (not that there were library loading/linking frameworks I could use), and these would have been a godsend, considering they're widely used and include unit tests and documentation

yes, it's silly that a package has more metadata than code, but that's so very often the case in other languages too: lots of functions will be smaller than the combination of their documentation, unit tests, etc. if you wanted a larger package than just one or two function, what the hell would you call it anyway? "utils"?

hackbunny fucked around with this message at 22:00 on Mar 24, 2016

AWWNAW
Dec 30, 2008

Gazpacho posted:

if hypothetically we were hiring someone to write one-page JS modules and his resume landed on my desk, i might not necessarily toss it, but I'd make sure our engineering VP knew the story and got a chance to lecture him about the consequences he could face if he were to intentionally gently caress over us or our customers

otoh he's an autodidact and gently caress autodidacts

what's wrong with learning something on your own? doesn't every single programmer have to do that at least once a week

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



hackbunny posted:

jesus it's a perfectly legitimate thing to have in a javascript library. javascript likes to implicitly convert between types in sometimes surprising ways, and it has pitfalls like number vs Number and string vs String, so strict type-checking wrappers for common operators make a lot of sense. yes, it's silly that a package has more metadata than code, but that's so very often the case in other languages too: lots of functions will be smaller than the combination of their documentation, unit tests, etc. if you wanted a larger package than just one or two function, what the hell would you call it anyway? "utils"?

"Standard Library"

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

AWWNAW posted:

what's wrong with learning something on your own? doesn't every single programmer have to do that at least once a week
an autodidact is someone who learns everything on their own, beep boop i m a dictionary

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

piratepilates posted:

"Standard Library"

with an estimated release date of around 2020 and estimated to be fully deployed by 2030?

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Gazpacho posted:

an autodidact is someone who learns everything on their own, beep boop i m a dictionary

what the gently caress are you on about

AWWNAW
Dec 30, 2008

Gazpacho posted:

an autodidact is someone who learns everything on their own, beep boop i m a dictionary

i guess i get what you're saying but i've worked with way more beep bop dictionary motherfuckers that had CS degrees than didn't

Adbot
ADBOT LOVES YOU

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
is a cs degree the norm now?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply