Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Won’t work in TS.

I would actually love extension of TS with operator overloading for vector maths (games, other linear algebra, ML use cases). I wouldn’t want libraries to rely on it, but in my own application code, it can sometimes be really helpful.



Check out C#. CliWrap does exactly this: https://github.com/Tyrrrz/CliWrap/blob/master/CliWrap/Comman...

    // Examples
    var cmd = Cli.Wrap("foo") | (stdOut, stdErr);

    var target = PipeTarget.Merge(
        PipeTarget.ToFile("file1.txt"),
        PipeTarget.ToFile("file2.txt"),
        PipeTarget.ToFile("file3.txt")
    );

    var cmd = Cli.Wrap("foo") | target;




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

Search: