Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Andrew Powell
    @shellscape
    @sindresorhus i'm late replying, but thank you for the followup
    Andrew Powell
    @shellscape
    @sindresorhus curious if there are any conventions (and if not, any interest) for supporting object generation from the CLI
    eg. --foo[bar] 0 would result in cli.flags = { foo: { bar: 0 } }
    --foo[bar] 0 --foo[bar] 1 would result in cli.flags = { foo: { bar: [0, 1] } }
    Andrew Powell
    @shellscape
    ah i see this is already supported in dotted options. cheers
    Ted Jameson
    @MasterOfTheTiger
    This is interesting.
    Rob Mac
    @maccelerated
    @sindresorhus https://github.com/electron/electron/issues/10017#issuecomment-387714568 probably means that got's readme should mention only setting useElectronNet in main process, or maybe removing remote support and disallowing renderer net use. I'd make a PR but I don't know what to do.
    Sindre Sorhus
    @sindresorhus
    @maccelerated If it's really true it does not work even through the remote module, we should indeed disallow it. I commented: https://github.com/electron/electron/issues/10017#issuecomment-388627975
    Andrew Powell
    @shellscape
    @sindresorhus which terminal color scheme are you using these days?
    Sindre Sorhus
    @sindresorhus
    @shellscape I'm still using https://github.com/sindresorhus/iterm2-snazzy
    Andrew Powell
    @shellscape
    gracias
    Andrew Powell
    @shellscape
    @sindresorhus which tool are you using to create the ora screenshot svg with this json file? https://github.com/sindresorhus/ora/blob/master/screenshot.json
    Sindre Sorhus
    @sindresorhus
    Andrew Powell
    @shellscape
    gracias
    Andrew Powell
    @shellscape

    @sindresorhus re: an old, old chalk issue: chalk/chalk#180. I'm contributing to rollup now, and there's a small color library author going around opening a poopton of PRs on projects to swap his lib in place of chalk (advertising it as a faster drop-in replacement, which it's not). one of his selling points is the filesize. normally not a concern, but rollup is unique in that it self-rolls it and its dependencies and ships that to npm (there are a number of reasons for that). so the size was a selling point for the maintainers, as it dropped the CLI size by nearly 40kb. not sure why 40kb is exciting to anyone, but alas.

    you had mentioned that color-convert might be lazy loaded. I see that module's use has since been moved into ansi-styles. are there any more targets for slimming down the code that'd actually be used (so it's a target for tree shaking) that you can think of, and how might one go about lazy-loading color-convert in ansi-styles these days?

    Sindre Sorhus
    @sindresorhus
    @shellscape Yeah, I've seen that too. Though to be honest, maintainers that buy that bullshit deserve what they get. Obviously it's faster if it only does 20% of what Chalk does. Chalk fixes so many terminal bugs and inconsistencies.

    as it dropped the CLI size by nearly 40kb. not sure why 40kb is exciting to anyone, but alas.

    That's a silly argument...

    Andrew Powell
    @shellscape
    you'll get no disagreement from me
    Sindre Sorhus
    @sindresorhus

    and how might one go about lazy-loading color-convert in ansi-styles these days?

    I don't know how good tree-shaking is these days or how to optimize for it. Last I tried it, it didn't work at all and was just plain hype.

    Andrew Powell
    @shellscape
    rollup and webpack do a pretty solid job of that these days. for me anyhow, it's quite impressive as to how much code it can eliminate from a bundle now.

    maintainers that buy that bullshit deserve what they get

    :laughing:

    thanks for responding so quickly. i'll keep poking at it to see if there's anything I can spot that will aid in that. if it doesn't happen it's no worries, and I'll keep pounding on the benefits of it over the upstart
    Sindre Sorhus
    @sindresorhus
    Ok, I found the thread you're talking about.
    Lol

    I credit them for using setPrototypeOf/proto, which I originally learned from kleur. I didn't know you had contributed that code. For that reason, I just added you to the credits in the notes.

    This was actually first done in Chalk, but whatever...

    Andrew Powell
    @shellscape
    lol I was going to drop that tidbit but chose not to wade into it
    Sindre Sorhus
    @sindresorhus
    Yeah, not worth it. I have better things to do than drama.
    Andrew Powell
    @shellscape
    I stopped counting at 60 PRs from that author proposing the swap in various libs.
    was curious how many projects he had approached. the guy has some passion, I'll give him that
    Sindre Sorhus
    @sindresorhus
    Well, he only needs to do 31000 more PRs to replace all Chalk usage :p
    Andrew Powell
    @shellscape
    lol
    Andrew Powell
    @shellscape
    @sindresorhus just saw to-readable-stream. curious about the advantages, if any, over into-stream.
    and also if objectMode is something that could be derived from the input
    wtgtybhertgeghgtwtg
    @wtgtybhertgeghgtwtg
    It's smaller.
    Andrew Powell
    @shellscape
    heh, thought that was kind of obvious
    functional* advantages
    Sindre Sorhus
    @sindresorhus
    Probably more stable too.
    I made into-stream when the stream stuff in Node.js core was completely broken and bad. It has improved a lot of recent times, so now we no longer need a wrapper module to be able to use streams.
    Andrew Powell
    @shellscape
    :thumbsup:
    Seth Holladay
    @sholladay
    Hey, @sindresorhus. Have you had a chance to look at sindresorhus/find-up#28 yet? Looks like the Webpack folks might want to use find-up if we can get that find-by-function feature out. I can merge but figured you'd probably want to review first.
    See: https://github.com/webpack/webpack-cli/pull/693/files#r235808648
    Sindre Sorhus
    @sindresorhus
    @sholladay Hey, sorry. My OSS activity has been very limited in the past month because of wedding and family visits. I'll take a look today :)
    Aung Myo Kyaw
    @AungMyoKyaw
    Hi @sindresorhus and @all
    What is your opinion on programmer who have no cs degree ?
    Should they take cs degree for living long in tech industry.
    Sindre Sorhus
    @sindresorhus
    @AungMyoKyaw CS degree can be useful, but it's by no means a requirement. It really depends on what kind of job you want.
    Andrew Powell
    @shellscape
    @sindresorhus saw your issue on webpack-dev-server, that's par for the course with that project. wanted to point you at a vastly superior alternative that me and a few wily Brazilian devs have authored https://github.com/shellscape/webpack-plugin-serve.
    Andrew Powell
    @shellscape
    oh wow. looks like the webpack folks deleted my response to you in #924. how weak.
    Rob Kayson
    @MrRoboman

    Hi! I found a link to here from https://gist.github.com/sindresorhus/1656c46f23545deff8cc713649dcff26
    I'm trying to write an eslint rule that enforces a unique string argument be sent to specific function across files. For example,

    // file A
    fn('aStringArg') // no duplicates!
    
    // file B
    fn('aStringArg') // no duplicates!
    fn('someOtherString') // this is okay :)

    My first thought was to create a Set and check against it to see if the string has been used. However, the Set never gets cleared, and if a developer deletes the duplicate arg, the original is still marked by eslint because the value remains in the Set.
    Does anyone have an idea how to implement this rule?
    Thanks!

    Rob Kayson
    @MrRoboman
    Figured a thing out. I made a map of filenames to sets of arg strings. Within the create function in the lint rule, I create a new set and add it to the mapping. Mostly works :)
    Siddharth Thevaril
    @siddharth-thevaril
    Hi, is anyone online?
    If anyone has any insights, please advise