Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Barney Carroll
    @barneycarroll
    @jussi-kalliokoski just dropping in to say Trine has been an utter revelation for me
    So many Javascript APIs I've been struggling with for so long, I think I can fix, but then realise they're just fundamentally ugly because of language restrictions… and then data::arbitraryFn shows up. Genius. Fixes so much stuff, I hardly know where to start.
    :clap:
    Jussi Kalliokoski
    @jussi-kalliokoski
    @barneycarroll thanks, glad to hear that! but most of the credit goes to the syntax proposal that makes Trine possible :smile:
    riding on the giants' shoulders here
    Barney Carroll
    @barneycarroll
    …Or rather, lots of normal sized people, all stacked on top of one another ;)
    But the pattern at the core of Trine is inspirational
    TBH I'm mostly interested in applying the pattern on decorators for my application code
    Jussi Kalliokoski
    @jussi-kalliokoski
    correct, albeit that sounds a bit like oppression :laughing:
    Barney Carroll
    @barneycarroll
    Hehe
    Filip Stachura
    @filipstachura
    @jussi-kalliokoski Thanks for the feedback! BTW AFAIK term guys is inclusive (https://en.wiktionary.org/wiki/guys), at least in non formal conversations.
    Filip Stachura
    @filipstachura
    FYI: Here's appropriate issue in TypeScript repository: Microsoft/TypeScript#3508
    Barney Carroll
    @barneycarroll
    An interesting aspect of seamless binding is how it becomes far easier to rationalise about decorating functions
    Chuck in Symbols and you get some really powerful stuff
    Jussi Kalliokoski
    @jussi-kalliokoski
    @filipstachura I don't personally find it non-inclusive personally either, but it's not me I'm trying to include, and I know that a lot of people do find it non-inclusive. It's an easy thing to replace so if it has the chance to make people feel more welcome, I think it's worth the effort. :)
    Eh, was going for a milder smiley but that works too :D
    Nice, thanks for the link! Subscribed! Hopefully will be able to support TS soon too.
    Jussi Kalliokoski
    @jussi-kalliokoski
    @barneycarroll decorating functions as in "functions that decorate" or "adding decorators to functions"?
    yep - with symbols you get "sort of" private properties on pure data allowing encapsulation without classes
    Jussi Kalliokoski
    @jussi-kalliokoski
    then again, Symbols can be enumerated as well - a more powerful model at encapsulating data is functions, using the uniqueness of objects allowing for the encapsulation of the secret as well:
    "use strict";
    
    function hide (data, secret) {
        function hidden (attemptedSecret) {
            if ( attemptedSecret === secret ) {
                return data;
            } else {
                throw new Error("Attempt to access data with invalid secret");
            }
        }
    
        return hidden;
    }
    
    var secret = {};
    var hidden = hide({ foo: "1" }, secret);
    
    console.log(hidden(secret).foo); // "1"
    hidden({}) // Error
    Gaetano Checinski
    @nikhedonia
    how does exactly prepublish work? - how do i genereate the missing doc ? - should i care?
    Jussi Kalliokoski
    @jussi-kalliokoski
    npm run prepublish - if it doesn't error should be ok
    Gaetano Checinski
    @nikhedonia
    in my case(see PR #37) it complains, about a missing jsdoc for zip
    Gaetano Checinski
    @nikhedonia
    ok i cleaned up my mess ;P
    Karlin Fox
    @karlin
    Hi! Is there any convenient way to import everything in trine at once (for manual use in babel-node repl)?