13 votes

A fully-functional graphical text editor with syntax highlighting in thirty-nine lines of K.

Tags: k, editor

12 comments

  1. [8]
    Greg
    Link
    I used to use Q (the "simplified" successor to K) in one of my first jobs, and to this day I haven't decided whether Arthur Whitney is a sadist, a genius, or both.

    I used to use Q (the "simplified" successor to K) in one of my first jobs, and to this day I haven't decided whether Arthur Whitney is a sadist, a genius, or both.

    5 votes
    1. Akir
      Link Parent
      Going to the root page for the domain, you come across this lovely tidbit: I rather hate to admit there are times I wrote javascript code that looked like that.

      Going to the root page for the domain, you come across this lovely tidbit:

      k is similar to python and javascript [...]

      I rather hate to admit there are times I wrote javascript code that looked like that.

      2 votes
    2. [6]
      Eva
      Link Parent
      There's a fantastic post on Whitney I read a few years ago; let me find it.

      There's a fantastic post on Whitney I read a few years ago; let me find it.

      1 vote
      1. [5]
        Eva
        Link Parent
        @Greg: http://archive.vector.org.uk/art10501320

        @Greg:

        http://archive.vector.org.uk/art10501320

        It began badly. We were walking along the South Downs Way in early summer, the sun glittering on the English Channel on our right, the Weald of Sussex stretching away to our left. “How big,” asked Arthur, “should a text editor be?”

        I’ve known Whitney most of my life. I know what he does. I know his stupid questions. And still I can’t resist trying to give helpful answers. “I don’t know. One could find out, surely? What do Emacs and Vim weigh – tens of megabytes?”

        “I’ve got a text editor in four lines of K. Just need to add Copy and Paste.”

        5 votes
        1. [2]
          imperialismus
          Link Parent
          This reminds me of the legendary story of Mel. It’s impressive but I’d hate to be this guy’s colleague. When your code looks like Perl code golf and that’s idiomatic, you gotta start wondering...

          This reminds me of the legendary story of Mel. It’s impressive but I’d hate to be this guy’s colleague. When your code looks like Perl code golf and that’s idiomatic, you gotta start wondering what you’re doing with your life.

          4 votes
          1. Eva
            Link Parent
            He's a multimillionaire because of his code, so I can't imagine he's that sorry!

            He's a multimillionaire because of his code, so I can't imagine he's that sorry!

            1 vote
        2. [2]
          Greg
          Link Parent
          That was fascinating - it's like reading the rationale of a 10x programmer writ large, in one of the few situations that it really did pay off!

          That was fascinating - it's like reading the rationale of a 10x programmer writ large, in one of the few situations that it really did pay off!

          2 votes
          1. Eva
            Link Parent
            He's not the most brilliant programmer who's ever been seriously discussed, but I certainly find his approach interesting, if nothing else.

            He's not the most brilliant programmer who's ever been seriously discussed, but I certainly find his approach interesting, if nothing else.

            2 votes
  2. [4]
    gergir
    Link
    Wow...

    Wow...

    4 votes
    1. [3]
      Eva
      Link Parent
      The base of it is only four lines!

      The base of it is only four lines!

      2 votes
      1. [2]
        gergir
        Link Parent
        I love elegant programmes. My mother did cryptography and showed me stuff she did for fun when she was my age and it looked like what you did here.

        I love elegant programmes. My mother did cryptography and showed me stuff she did for fun when she was my age and it looked like what you did here.

        2 votes
        1. Eva
          Link Parent
          It's not mine, unfortunately, but yeah, absolutely! I love languages that lend themselves toward elegance!

          It's not mine, unfortunately, but yeah, absolutely! I love languages that lend themselves toward elegance!

          1 vote