in reply to Re^5: Small Perl 6 discoveries IV, hash access
in thread [Perl6] Perl 6 discoveries IV, hash access

I'm still not sure what a "snippet" is, but you're definitely telling me that I should invent my own unicode mapping and "with little or more effort" implement it in 672 lines of JSON. If only I weren't so darned lazy.
  • Comment on Re^6: Small Perl 6 discoveries IV, hash access

Replies are listed 'Best First'.
Re^7: Small Perl 6 discoveries IV, hash access (snippets)
by LanX (Saint) on Oct 09, 2017 at 14:01 UTC
    > I'm still not sure what a "snippet" is,

    basically the combination of an interactive code template and an abbreviation plus trigger. Sets are activated according to context. (Like Perl mode)

    Here a demo for emacs

    http://youtube.com/watch?v=MayeP8Akwas

    > I should invent my own unicode mapping

    Most editors support the snippet model originating from TextMate, including converters.

    IIRC does Perl 6 allow alternative none unicode versions of it's operators.

    Like >> for »

    Consequently "inventing" a generic and agnostic solution shouldn't be difficult, like typing <<+TAB or oo+BAR (for infinity)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

      For code points that are to be used more than once, that is a feasible solution. However, if you need arbitrary characters, that you don't know in advance, the situation is more difficult.
        Does Perl 6 need arbitrary unicode characters?

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!

Re^7: Small Perl 6 discoveries IV, hash access
by holli (Abbot) on Oct 09, 2017 at 15:55 UTC
    I copy and pasted the operators from the docs and massaged the text into cson by using a simple regex search and replace. Took 15 minutes including testing.


    holli

    You can lead your users to water, but alas, you cannot drown them.
      I just want something that works out of the box, that I don't have to screw around with, that has a reasonable chance of working on a random machine that I find myself sitting in front of, that I can tell people "here use this it will solve your problems", but apparently that doesn't exist.