elizarov

    elizarov

    5 years ago
    holgerbrandl: I, for one, welcome our kscript overlords! All we need is
    apt-get kscript
    supported (and
    brew install kscript
    of course)
    h

    holgerbrandl

    5 years ago
    @elizarov Never thought about it, but it’s a good idea and I’ll look into [it](https://github.com/holgerbrandl/kscript/issues/25). Though. the current [installation](https://github.com/holgerbrandl/kscript#installation) using
    curl -Lso ~/bin/kscript <https://git.io/v9R73> && chmod u+x ~/bin/kscript
    seems pretty straightforward already.
    orangy

    orangy

    5 years ago
    curl from random url + chmod+x? Asking for a trouble…
    h

    holgerbrandl

    5 years ago
    I see your point.
    orangy

    orangy

    5 years ago
    Otherwise it looks really cool 😄
    I dunno, is it possible to launch a daemon JVM process like gradle or something, so that JVM is always ready for a script? It can die automatically in few minutes of inactivity, recycle periodically to avoid memory leaks, etc.
    h

    holgerbrandl

    5 years ago
    there are frameworks like nailgun (http://martiansoftware.com/nailgun/) to do so, but in the end it’s just 300ms for the jvm warmup, so I have not looked into it yet.
    mikehearn

    mikehearn

    5 years ago
    You can use AppCDS as well (as it's for local development purposes) which can speed startup quite a bit
    orangy

    orangy

    5 years ago
    300ms in a bash script processing thousands of files might add up to smth
    mikehearn

    mikehearn

    5 years ago
    maybe write a bash replacement 🙂 btw holger, your /start/,/stop/ example does not appear to match the kotlin example, and in your line numbering example, the kotlin can be shorter using string interpolation.
    orangy

    orangy

    5 years ago
    kash? 🙂
    c

    cedric

    5 years ago
    FYI here's Scala equivalent, for inspiration: https://github.com/lihaoyi/Ammonite
    h

    holgerbrandl

    5 years ago
    @mikehearn thanks for your suggestions. I’ve corrected them.
    @cedric I’ve worked with ammonite for a while, but somehow never embraced it enough to use it as an actual bash replacement. It was/is useful for scala-prototyping. I wish the kotlin REPL (which could serve the same prototyping purpose) would be half as stable as ammonite, but somehow it’s (imho) progressing just slowly.