Stories
Slash Boxes
Comments

SoylentNews is people

posted by chromas on Wednesday August 22 2018, @09:22PM   Printer-friendly
from the :wq dept.

Over at The New Stack is a brief but entertaining history of the editor vi and Vim.

"The editor was optimized so that you could edit and feel productive when it was painting slower than you could think. Now that computers are so much faster than you can think, nobody understands this anymore," Joy said. "It was a world that is now extinct. People don't know that vi was written for a world that doesn't exist anymore."


Original Submission

This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1) 2
  • (Score: 5, Interesting) by JoeMerchant on Wednesday August 22 2018, @09:28PM (90 children)

    by JoeMerchant (3937) on Wednesday August 22 2018, @09:28PM (#724873)

    I never saw the appeal of memorization of a huge number of multi-key commands.

    In the DOS days, when GUI editors weren't an option, I did use Brief (by Underware) and loved it - never have seen any editor do rectangular block copy as well - it had multiple windowing and basically everything you could ask for, in DOS. Critically: you only had to remember a dozen or so key commands to use most of the power of the editor, and if you were using it multiple hours per day, every day, that wasn't a problem.

    My problem with vi is that it's "too powerful" and I don't use it often enough to keep all those commands (beyond :wq) memorized, much less muscle-memory trained. There are too many competing graphical editors to make the learning curve appealing. Perhaps vi can do Brief style rectangle copy-paste? Brief did it with two keys for copy and two keys for paste (I forget the exact keys, but something like Alt-B and Alt-D)... how many keys does vi need to accomplish the same thing while editing? And, yes, the key to switch from editing mode to command mode, and back, counts.

    --
    🌻🌻 [google.com]
    • (Score: 5, Interesting) by Anonymous Coward on Wednesday August 22 2018, @09:37PM (14 children)

      by Anonymous Coward on Wednesday August 22 2018, @09:37PM (#724877)

      The whole point is to communicate your desires to a machine, and what this machine does well is precise repetition.

      Yet, for some strange reason, a large number of people find it appealing to use a communication device with a single button (and some sense of imprecise location).

      I, for one, find it appealing to use a communication device with 60-to-100 buttons, programmable to relay the exact information I'd like through nearly arbitrary, contextually determined combinations.

      I bet the bell curve has something to do with these distinct approaches to communicating with computers.

      • (Score: 0) by Anonymous Coward on Wednesday August 22 2018, @10:13PM (1 child)

        by Anonymous Coward on Wednesday August 22 2018, @10:13PM (#724897)

        Maybe. Maybe not: https://www.youtube.com/watch?v=dP1xVpMPn8M [youtube.com]

        • (Score: 1, Informative) by Anonymous Coward on Wednesday August 22 2018, @11:35PM

          by Anonymous Coward on Wednesday August 22 2018, @11:35PM (#724937)

          On that note:
          https://github.com/martanne/vis [github.com]
            Pretty much THE perfect terminal text editor.
          https://github.com/as/a [github.com]
            Very similar to Acme but written in clean go and should be able to overcome acme's limitation in the future.
          https://github.com/deadpixi/sam [github.com]
            Fixed up sam for modern machines. Has a few extra features but mostly only attractive to people who don't like acme's mouse and want something more conventional.

          Sadly none of these have complex language scripts support (right-to-text) and only vis has syntax highlighting but it's parsing expression grammar based so it kinda sucks to the point I often find myself better off without it.

          Anyhow, A needs a lot more exposure and could really use some love since the main dev is entirely absorbed in trying to get feature parity with acme and is writing everything on their own (their own gui tool kit for instance)...

      • (Score: 1, Insightful) by Anonymous Coward on Thursday August 23 2018, @01:16AM

        by Anonymous Coward on Thursday August 23 2018, @01:16AM (#724993)

        Yes, exactly this. It's why I've stuck with Vim all these years, and it's why I'll never give up the command line. GUIs are a pain in the ass, and that's not even when trying to walk somebody through a GUI over the phone! Seriously, I have talked total novices through command line over the phone in a tenth the amount of time it takes for me to describe a GUI, especially a bad GUI.

        Words are the natural way for humans to communicate complex ideas. Why should we be reduced to pictograms, gestures, and grunting with our machines?

      • (Score: 2) by chromas on Thursday August 23 2018, @03:04AM

        by chromas (34) Subscriber Badge on Thursday August 23 2018, @03:04AM (#725037) Journal

        a communication device with a single button

        Just Apple users until the last couple years.

      • (Score: 1) by khallow on Thursday August 23 2018, @04:11AM (8 children)

        by khallow (3766) Subscriber Badge on Thursday August 23 2018, @04:11AM (#725061) Journal

        The whole point is to communicate your desires to a machine, and what this machine does well is precise repetition.

        Yet, for some strange reason, a large number of people find it appealing to use a communication device with a single button (and some sense of imprecise location).

        Ok. Why is it strange that people would prefer to communicate their desires to a machine with an elegant communication device with a button rather than a keyboard? Seriously, what makes that strange?

        • (Score: 1, Informative) by Anonymous Coward on Thursday August 23 2018, @05:09AM (7 children)

          by Anonymous Coward on Thursday August 23 2018, @05:09AM (#725080)

          What's elegant about a mouse? The keyboard allows communication through language, where you can express yourself with eloquence, rather than caveman-style point and click and drag. The mouse is inferior in form, function, and utility.

          • (Score: 3, Insightful) by G-forze on Thursday August 23 2018, @07:30AM (1 child)

            by G-forze (1276) on Thursday August 23 2018, @07:30AM (#725097)

            You have a strange concept of language. No CLI I've ever used has understood any of the actual languages I speak and read/write, but rather has to be fed a very exact series of nonsensical-unless-you-already-know-them character combinations. That requires a huge amount of learning before being efficient to use, whereas a well designed GUI can be used (fairly) efficiently from the get-go, without actually having to memorize or look up any specific commands.

            --
            If I run into the term "SJW", I stop reading.
            • (Score: 2) by Arik on Thursday August 23 2018, @03:12PM

              by Arik (4543) on Thursday August 23 2018, @03:12PM (#725230) Journal
              "You have a strange concept of language."

              Et tu.

              "No CLI I've ever used has understood any of the actual languages I speak and read/write"

              Wow. Just wow.

              So you think that if it doesn't parse natural language flawlessly (an impossible task as you should realize if you'd think about it for a few seconds) it's not language? THAT is a really strange concept of language indeed!

              We humans use specialized language all the time, in every walk of life, for all kinds of reasons. Language is a tool which is made to fit the task at hand. "Strike" means something totally different in a martial arts studio to what it means at a union meeting. Every profession has it's own language, and this is not entirely about confusing outsiders (though that's generally seen as a positive side effect) but because it's actually necessary in order to do the job! So when you learn to do anything useful at all, you also learn a new language, in a sense. It's all still English (or whatever your native tongue might be) though, they aren't actually different languages in the usual sense of the word, just specialized types of English.

              So I have to say EVERY CLI I've ever used (even in foreign countries!) has in fact understood my native tongue, which is English. Every programming language I have ever seen is a specialized version of English.

              You might compare them to legalese, or engineering jargon; but in one way they are MUCH easier to learn than anything like that. Precisely because they are finite, defined languages in a way that no language used for spoken, face to face communication can ever be. There's no body language, there's no hmmm or umm, there's no nervous chatter. Each word is precisely, mathematically defined, and each one is used for affect.

              "That requires a huge amount of learning before being efficient to use, "

              A huge amount in comparison to what? In any pertinent comparison I can think of at the moment, it seems quite small.

              "whereas a well designed GUI can be used (fairly) efficiently from the get-go, "

              Only for a narrow range of carefully chosen (and prepared for) tasks.

              --
              If laughter is the best medicine, who are the best doctors?
          • (Score: 1) by khallow on Thursday August 23 2018, @11:29AM (4 children)

            by khallow (3766) Subscriber Badge on Thursday August 23 2018, @11:29AM (#725152) Journal

            What's elegant about a mouse?

            Why ask that? It's simple, intuitive, and powerful in what it does.

            The keyboard allows communication through language, where you can express yourself with eloquence, rather than caveman-style point and click and drag.

            Only if you can express yourself eloquently with that language through the keyboard. If you can't, well, there you go.

            The mouse is inferior in form, function, and utility.

            Except when it isn't, of course. As tools computer mice and keyboards do different jobs.

            • (Score: 3, Funny) by Arik on Thursday August 23 2018, @02:57PM (3 children)

              by Arik (4543) on Thursday August 23 2018, @02:57PM (#725224) Journal
              "Why ask that? It's simple, intuitive, and powerful in what it does."

              It's none of that. Simple? You have a very imprecise and indirect linkage to move a 'pointer' around a virtual space composed of pixels smaller than you can see, and a couple of buttons to 'activate' the selected pixel in different ways. In a way that is 'simpler' than having 100 odd entrypoints, but you can't actually make a system simpler that way - when you reduce the entrypoints you make the pathways longer to compensate, generally speaking. The complexity inherent in the system cannot really be avoided (save via brute dumbing down - removing functions or making them entirely inaccessible) it can only be moved around.

              So your entry point with a mouse-driven system essentially gives you only two values at each stage - the (imprecise) location of the pointer as a pixel and which button was pushed. Then you either have an immediate selection or activation event or you activate a menu which has to be navigated by a series of subsequent events (menu selections) before ultimately generating another event. This can and does get very complex.

              Intuitive? Far, far from intuitive. Anyone who's watched people that were not already familiar with these things pick them up and try to use them for the first time would fall down laughing at your description. The only intuitive interface is the nipple - everything else has to be learned.

              Powerful? I'm sure in some sense, ultimately you can use it to direct the power of the pc, that's the only power it has. For the vast majority of tasks, you can direct that power far more elegantly and efficiently using a real input device, and for many things that's the only practical option.

              "Except when it isn't, of course. As tools computer mice and keyboards do different jobs."

              This is true.

              The keyboard is a fully capable general interface device for a personal computer. It is capable of fully replacing the toggle switches and punch cards that it replaced.

              The mouse replaced nothing, and is capable of replacing nothing. The mouse is a pointing device. It's not the best pointing device but it is the least expensive and most popular pointing device. It let's you fingerpaint and poke things. It's a tool for selling PCs to people that don't need them and can't use them.
              --
              If laughter is the best medicine, who are the best doctors?
              • (Score: 1) by khallow on Friday August 24 2018, @04:19AM (2 children)

                by khallow (3766) Subscriber Badge on Friday August 24 2018, @04:19AM (#725610) Journal

                You have a very imprecise and indirect linkage to move a 'pointer' around a virtual space composed of pixels smaller than you can see, and a couple of buttons to 'activate' the selected pixel in different ways.

                What's the problem with that? And why is it supposed to be relevant?

                • (Score: 0) by Anonymous Coward on Friday August 24 2018, @02:46PM (1 child)

                  by Anonymous Coward on Friday August 24 2018, @02:46PM (#725825)

                  Programmers and engineers value precision.

                  • (Score: 1) by khallow on Saturday August 25 2018, @01:47AM

                    by khallow (3766) Subscriber Badge on Saturday August 25 2018, @01:47AM (#726109) Journal
                    Not everyone is a programmer and engineer.
      • (Score: 2) by opinionated_science on Thursday August 23 2018, @03:36PM

        by opinionated_science (4031) on Thursday August 23 2018, @03:36PM (#725241)

        I recently started *reusing* vim after quite a hiatus. The difference? Modern vim has many language specific features for Python (!) , SAS (!!!!!) , FORTRAN( yeah).

        Combined with modern desktops and 4K monitors and a terminal that is 500x300, I don't see how *any* gui can beat it for coding productivity.

        Then again, almost all coding environments with a gui, do allow external editors.

    • (Score: 2) by Revek on Wednesday August 22 2018, @09:42PM (10 children)

      by Revek (5022) on Wednesday August 22 2018, @09:42PM (#724880)

      Depends on what you want it to do. If you need to do several different bulk manipulations of a file, vim is the shit. If you need to edit a small config file, use nano. Its the text editor that allows you tell it what to do and not blunder around like a luser.

      --
      This page was generated by a Swarm of Roaming Elephants
      • (Score: 2, Redundant) by Arik on Wednesday August 22 2018, @09:56PM (7 children)

        by Arik (4543) on Wednesday August 22 2018, @09:56PM (#724889) Journal
        "If you need to edit a small config file, use nano. Its the text editor that allows you tell it what to do and not blunder around like a luser."

        Ed has been renamed to nano?

        Man I can't believe I missed that.
        --
        If laughter is the best medicine, who are the best doctors?
        • (Score: -1, Flamebait) by Anonymous Coward on Wednesday August 22 2018, @10:20PM (1 child)

          by Anonymous Coward on Wednesday August 22 2018, @10:20PM (#724903)

          If you need to edit a small config file, you probably have a small job editing config files.

          Some people have grown up jobs

          • (Score: 0) by Anonymous Coward on Wednesday August 22 2018, @10:28PM

            by Anonymous Coward on Wednesday August 22 2018, @10:28PM (#724908)

            What?! Ima volunteer editor to the dwarven news exchange you insensitive clod! Yea its a small job but for grown ups!

        • (Score: 2) by bzipitidoo on Wednesday August 22 2018, @10:25PM (1 child)

          by bzipitidoo (4388) on Wednesday August 22 2018, @10:25PM (#724906) Journal

          Ed?? What's with this user interface nonsense? Use sed!

          • (Score: 0) by Anonymous Coward on Thursday August 23 2018, @12:02AM

            by Anonymous Coward on Thursday August 23 2018, @12:02AM (#724947)

            Sed? You kids and your hand-holding. Use butterflies!

        • (Score: 2) by NewNic on Thursday August 23 2018, @12:50AM (2 children)

          by NewNic (6420) on Thursday August 23 2018, @12:50AM (#724976) Journal

          nano is for lusers now. The new hotness is pico.

          --
          lib·er·tar·i·an·ism ˌlibərˈterēənizəm/ noun: Magical thinking that useful idiots mistake for serious political theory
          • (Score: 2) by suburbanitemediocrity on Thursday August 23 2018, @01:01AM (1 child)

            by suburbanitemediocrity (6844) on Thursday August 23 2018, @01:01AM (#724982)

            I used pico long before I ever heard of nano. Not the I've used either more than a few dozen times.

            • (Score: 0) by Anonymous Coward on Thursday August 23 2018, @05:24AM

              by Anonymous Coward on Thursday August 23 2018, @05:24AM (#725082)

              I use atto. It's nice, if a bit minimalistic. For example you write device drivers with 'cat > /dev/whatver'.

      • (Score: 2) by hendrikboom on Thursday August 23 2018, @12:34AM

        by hendrikboom (1125) Subscriber Badge on Thursday August 23 2018, @12:34AM (#724962) Homepage Journal

        The one great thing about nano is its list of commands at the bottom of the screen. It usually contains what you really need. Of course there may be other commands that you'd want, but you don't really need them.

      • (Score: 0) by Anonymous Coward on Thursday August 23 2018, @07:52AM

        by Anonymous Coward on Thursday August 23 2018, @07:52AM (#725104)

        mcedit should be enough for anybody.

    • (Score: 5, Informative) by digitalaudiorock on Wednesday August 22 2018, @09:45PM (5 children)

      by digitalaudiorock (688) on Wednesday August 22 2018, @09:45PM (#724881) Journal

      I've used nothing but vi (usually gvim) for a long time. I can't say I'd recommend vi to someone necessarily, but I do find it's great once you start learning even a little of what it's capable of.

      As long as I've been using it I'm sure I've barely scratched the surface, but what I do know seems just too powerful to give up for anything else. Things like being able to do a complex regex replace of everything between two markers...huge stuff. What's more, that stuff all works in a console with no GUI. I also find the syntax highlighting to be better than most. I'm stunned for example as to how many text editors can't handle proper syntax of heredoc quoting. Editors are all about what one you know of course.

      • (Score: 2) by JoeMerchant on Wednesday August 22 2018, @11:01PM

        by JoeMerchant (3937) on Wednesday August 22 2018, @11:01PM (#724928)

        do a complex regex replace

        Nifty stuff, for those who speak regex... When I use regex, or sed or similar, it's a Google search for what x expression does "human description", like remove excess white space, or transform new lines to spaces, etc.

        Rather than try to hand manipulate large files with languages like regex, I prefer to generate large files programatically from smaller definitions of what goes in those files... If the pattern needs to change, change the translator code and run it again, and again, and again until it looks right. Then, extending the pattern with new definitions is a reliable operation.

        --
        🌻🌻 [google.com]
      • (Score: 2) by legont on Thursday August 23 2018, @12:35AM (3 children)

        by legont (4179) on Thursday August 23 2018, @12:35AM (#724965)

        Unfortunately vi (and sed) regular expressions are crippled and I can't remember what does not work.

        --
        "Wealth is the relentless enemy of understanding" - John Kenneth Galbraith.
        • (Score: 3, Informative) by jmorris on Thursday August 23 2018, @07:41AM (2 children)

          by jmorris (4844) on Thursday August 23 2018, @07:41AM (#725099)

          Dunno about whatever gimped version of vi you ran into, but gvim on my machine is linked to libpcre2-8.so.0 so the regexes do whatever ya want until yer brain melts trying to understand em.

          • (Score: 2) by digitalaudiorock on Thursday August 23 2018, @01:14PM (1 child)

            by digitalaudiorock (688) on Thursday August 23 2018, @01:14PM (#725190) Journal

            OMG...learn something new every day. I'd actually never even noticed that support nor the :perldo command at all, and I've had the perl USE flag off on my Gentoo vim all this time. Holy crap. Thanks!

            Tom

            • (Score: 2) by digitalaudiorock on Thursday August 23 2018, @01:19PM

              by digitalaudiorock (688) on Thursday August 23 2018, @01:19PM (#725192) Journal

              To clarify, I'd always just used the build in vim regex syntax. One thing I love about that :perldo syntax is that you don't have to constantly remember which regex characters need to be escaped, which is really what makes the built in ones confusing in the first place.

              Tom

    • (Score: 3, Insightful) by suburbanitemediocrity on Wednesday August 22 2018, @09:45PM (1 child)

      by suburbanitemediocrity (6844) on Wednesday August 22 2018, @09:45PM (#724882)

      I do large amounts of writing without looking at the screen. Not possible without key commands.

      Even things like looking down and scrolling until I get the button to send and email is very annoying when I can do [control]ENTER to send. And ARROW keys are usually so much faster than moving your hand off the keyboard to the mouse and having to position it on a word is cumbersome and requires mental energy..

      • (Score: 2) by JoeMerchant on Wednesday August 22 2018, @11:08PM

        by JoeMerchant (3937) on Wednesday August 22 2018, @11:08PM (#724931)

        That is what I loved about Brief, was keyboard based everything - even window size adjustments.

        However, much of that was due to the limited nature of EVERYTHING back then, I don't think that Brief's window system would scale well to dual 4K displays...

        Also, just now, I wanted to move an e-mail recipient from the To: field to the CC: field (not the height of noble scientific pursuit, I'll grant, but still a task that wants doing), and with the GUI I can click and drag it, even in Gmail in Chrome... I'd rather not muscle-memory train a 6 key sequence to do the same thing, particularly since I probably only do such a thing once every few weeks...

        --
        🌻🌻 [google.com]
    • (Score: 3, Informative) by Knowledge Troll on Wednesday August 22 2018, @09:57PM (21 children)

      by Knowledge Troll (5948) on Wednesday August 22 2018, @09:57PM (#724891) Homepage Journal

      note that vim probably has a better way to do this but a copy operation in vi is like this:

      move to the first line you want to copy

      know how many lines you want to copy, call that N

      while in command mode type in: Ny

      for example, copying 10 lines is 10y

      now navigate to the place you want to insert the lines and type p in command mode

      You only have to move into command mode once to do this. Knowing the line number you want can take between a few to many key strokes.

      It's not like it's a typing drag race but if it were I think you would find that vi has cases where it could vastly outperform a normal style editor.

      • (Score: 3, Informative) by ChrisMaple on Wednesday August 22 2018, @10:41PM (1 child)

        by ChrisMaple (6964) on Wednesday August 22 2018, @10:41PM (#724918)

        For example, to copy lines 68 through 89 to just after line 115
        :68,89co115
        To leave write mode, use the escape key.
        To enter write mode, there are several possibilities, A, a, I, i, R, O, and o depending on what you want to do. For beginners, 'i' is all you need.
        'm' for move, used like "co" above.
        ":w" to write the file, ":q" to quit, ":wq" to write and quit.
        'x' to delete the current character. "dd" to delete the current line.
        Arrow keys to move the cursor.
        That's it! All you need to use vim.
        Search and replace using regular expressions can be quite complicated, but that's something you don't need for basic use.
        Many other functions are available, but aren't necessary for the beginner.

        • (Score: 2) by Thexalon on Thursday August 23 2018, @02:39AM

          by Thexalon (636) on Thursday August 23 2018, @02:39AM (#725024)

          Another move I've always found handy is to go to the top of the section you want to move/copy, "v" (for "visual mode"), down until you've highlighted the section, and then either "d" (delete) or "c" (copy), and then "p" to paste it wherever you want it.

          The 1-letter commands generally have good mnemonics to aid in learning them.

          --
          The only thing that stops a bad guy with a compiler is a good guy with a compiler.
      • (Score: 2) by JoeMerchant on Wednesday August 22 2018, @11:21PM (15 children)

        by JoeMerchant (3937) on Wednesday August 22 2018, @11:21PM (#724933)

        So, what I'm talking about with column copy is more like:

        You've got a section of indented code you want to move back a level, in Brief: arrow to a corner of the rectangle of characters you want to erase, Alt-A to start the rectangle selection, arrow to the other corner, Alt-B (or whatever it was) to complete the rectangle selection, now you can Ctrl-X to cut it, and if you want that rectangle of text somewhere else - once it's on the paste buffer you can arrow to wherever and Ctrl-V to insert the rectangle of text at the column-row where you are - your rectangle is inserted below and to the right of your cursor, pushing all text appearing after the column you pasted into to the right for the number of rows in your rectangle. And, the part that column-operating editors ALL get wrong, but Brief got right is: the cursor jumps from your insertion point to the bottom left of the inserted rectangle. One (of many) good application for this is rapid indenting of a block of code: copy a rectangle of the desired width of spaces, then Ctrl-V repeatedly until you've reached the end of your block to indent - no arrow (or mouse) navigation required.

        There are lots of very cool things that can be done with rectangle manipulation like that. If you have a table of information, you can duplicate or remove columns very simply and easily.

        Obviously, it's not an essential function, I've lived without it for 25+ years, but when a good application for it comes along I still miss it. I think there is something similar in vi, but instead of the two-key commands to activate it, it's more like 4 or 5 - pretty much ruins the ride for me. The fun part is repeatedly hitting Ctrl-V and getting what you want without a whole bunch of complex manipulations to make it happen multiple times (and, if I could eyeball that the paragraph needs 28 lines indented, then I could probably include 28 in a vi command to make that happen, but I'm not the kind of guy who can count all the toothpicks that came out of a fumbled toothpick box before they hit the ground.)

        --
        🌻🌻 [google.com]
        • (Score: 2) by Knowledge Troll on Wednesday August 22 2018, @11:38PM (6 children)

          by Knowledge Troll (5948) on Wednesday August 22 2018, @11:38PM (#724940) Homepage Journal

          If you want to do an operation like reduce the brace level of code you use a regex to rewrite the line as a string, like this: 10,20s/^ //

          that says from line 10 to 20 apply the regex that rewrites the first four spaces into nothing

          to do that on an entire file is like this: %s/^ //

          I don't know how to do an operation in columns spanning many lines but you can do operations involving a number of characters on one line fairly easily. There may be a technique for defining a box as you describe in vim - gvim (the gui version) I think will let you do it with the mouse but I don't really use it.

          • (Score: 2) by coolgopher on Thursday August 23 2018, @12:49AM

            by coolgopher (1157) on Thursday August 23 2018, @12:49AM (#724974)

            You can also use to increase indent.

            Indentation amount is controlled by the shift-width setting (e.g. sw=2).

          • (Score: 2) by JoeMerchant on Thursday August 23 2018, @01:45AM (2 children)

            by JoeMerchant (3937) on Thursday August 23 2018, @01:45AM (#725007)

            So, regex is very cool and all, but I'm not sure I want to invest the effort in learning a language that complex just so I can edit text marginally faster...

            --
            🌻🌻 [google.com]
            • (Score: 2) by Knowledge Troll on Thursday August 23 2018, @01:57AM (1 child)

              by Knowledge Troll (5948) on Thursday August 23 2018, @01:57AM (#725012) Homepage Journal

              *shrug* You asked, though I'm fluent in regex and use them in vi the least. Being fluent in regex is assumed with all professionals anywhere around me.

              • (Score: 2) by JoeMerchant on Thursday August 23 2018, @12:06PM

                by JoeMerchant (3937) on Thursday August 23 2018, @12:06PM (#725167)

                There's lots of ways to specialize, I accidentally ended up versed in design controls and FDA/ISO compliance - not a topic I would have chosen, but valuable nonetheless. Regex is optional around here, and even frowned upon unless it comes with comments fully specifying what it is intended to do, and not do, because most of our programmers can't regex to save their lives.

                --
                🌻🌻 [google.com]
          • (Score: 2) by tangomargarine on Thursday August 23 2018, @08:21PM (1 child)

            by tangomargarine (667) on Thursday August 23 2018, @08:21PM (#725386)

            If you want to do an operation like reduce the brace level of code you use a regex to rewrite the line as a string, like this: 10,20s/^ //

            that says from line 10 to 20 apply the regex that rewrites the first four spaces into nothing

            You have to invoke this 4 times though, right? I'm not seeing anything that does 4 on its own.

            s/^ //

            s/<find>/<replace>/
            ^ beginning of line
            So replace the first space in a selected line with empty string.

            --
            "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
            • (Score: 2) by Knowledge Troll on Thursday August 23 2018, @09:05PM

              by Knowledge Troll (5948) on Thursday August 23 2018, @09:05PM (#725405) Homepage Journal

              Good catch! It needs <pre>around it but I don't think I can do that with the markup available. It just take 4 spaces in a row which HTML converted into a single rendered space.

        • (Score: 2) by jmorris on Thursday August 23 2018, @08:03AM (2 children)

          by jmorris (4844) on Thursday August 23 2018, @08:03AM (#725106)

          You should read the Vim help text about auto indent mode. Just highlight a block of code and let it fix the indenting for you. Better, if you are writing code in it with auto indent it knows the rules for the language and does what needs to be done. Type the closing } and it jumps back to where it is supposed to be, etc.

          Or to add a level of indent to a block, position on the first line of the block, do >i{ and yer done. You really need to explore what vim brings to the table.

          • (Score: 3, Insightful) by JoeMerchant on Thursday August 23 2018, @12:21PM

            by JoeMerchant (3937) on Thursday August 23 2018, @12:21PM (#725174)

            I've been around long enough to have used several different IDE editors, which have several different auto-indent functionalities (all broken by default, most not fixable), plus different editors with different indentation helping command sequences, again mostly unique in their implementation. There's a big value in training the muscle memory to do things that work everywhere, not just in your special flower environment. I learned this the "hard way" with AutoCad 14 - I programmed it all up with custom command shortcuts to improve my workflow, worked in that environment for 3 months, then went to the production shop to help the real thing get built. I was so completely and utterly lost on anybody else's AutoCad (that obviously lacked my custom command shortcuts) I often had to run back to my laptop just to make a simple edit - maybe more efficient overall, but not great in the shop.

            --
            🌻🌻 [google.com]
          • (Score: 2) by tangomargarine on Thursday August 23 2018, @06:28PM

            by tangomargarine (667) on Thursday August 23 2018, @06:28PM (#725328)

            You should read the Vim help text about auto indent mode. Just highlight a block of code and let it fix the indenting for you.

            C-M-\

            Better, if you are writing code in it with auto indent it knows the rules for the language and does what needs to be done. Type the closing } and it jumps back to where it is supposed to be, etc.

            Yep. Emacs has a plugin for auto-closing parens when you open them too, but I found it got in the way more often than it helped so I turned it off again.

            Forcing emacs to automatically indent by the appropriate amount (plus other syntactical sugar plugin stuff) in different languages was a right bastard, though. It's supposed to be a lot easier than the horrible hacks I kludged up to do it but I couldn't figure out how.

            --
            "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
        • (Score: 0) by Anonymous Coward on Thursday August 23 2018, @03:03PM

          by Anonymous Coward on Thursday August 23 2018, @03:03PM (#725226)

          Vim has a similar function to what you describe. It probably doesn't exist in traditional vi.

          ctrl+v to enter visual block mode
          highlight the text you want to manipulate
          then you can use x to cut it
          or maybe maybe y to copy it
          and p to paste it somewhere else if you want.

          you can use I to insert text on every line (appearing to the left of the selected block), or A to append text on every line (appearing to the right of the selected block).

          This is the mechanism I personally use most often for adding/removing indentation levels in blocks of code.

        • (Score: 2) by tangomargarine on Thursday August 23 2018, @06:20PM (3 children)

          by tangomargarine (667) on Thursday August 23 2018, @06:20PM (#725324)

          You've got a section of indented code you want to move back a level

          C-u -4 C-x TAB

          The "C-u -4" is just telling it to perform the "indent by 1 space" operation negative four times, though.

          And, the part that column-operating editors ALL get wrong, but Brief got right is: the cursor jumps from your insertion point to the bottom left of the inserted rectangle.

          Yeah, for some reason the emacs default for inserting registers leaves the cursor at the beginning of it, too. Had to figure out how to change that setting.

          --
          "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
          • (Score: 2) by JoeMerchant on Thursday August 23 2018, @07:55PM (2 children)

            by JoeMerchant (3937) on Thursday August 23 2018, @07:55PM (#725377)

            So, even if I could remember and easily execute C-u -4 C-x TAB, why would I want to?

            Cursor to one corner
            Alt-A
            Cursor to other corner (visual editing, horrors, but at least it's a character interface)
            Alt-B
            Ctrl-X

            Not only is it faster and simpler to execute, it's also something approaching intuitive.

            --
            🌻🌻 [google.com]
            • (Score: 2) by tangomargarine on Thursday August 23 2018, @08:16PM (1 child)

              by tangomargarine (667) on Thursday August 23 2018, @08:16PM (#725384)

              So, even if I could remember and easily execute C-u -4 C-x TAB, why would I want to?

              My point is just that this is something you can do with various editors. Which is better is subjective.

              Or if we want to literally do it your way using emacs rectangle mode, Ctrl+SPACE at beginning, arrow to select,* C-x r k, which is an exactly equal number of keys.

              C-x is the standard keychord before any sort of default macro, (R)ectangle (K)ill.

              *you don't have to do anything to denote the end of the selection

              it's also something approaching intuitive.

              Ha. Yeah, because anything involving rectangular selections is ever intuitive, sure.

              YMMV

              --
              "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
              • (Score: 2) by JoeMerchant on Friday August 24 2018, @02:13AM

                by JoeMerchant (3937) on Friday August 24 2018, @02:13AM (#725550)

                I think if more editors had good rectangle selection implementations, that coding style conventions would be different than they are, more matrix oriented. It doesn't happen all the time, but many times I do find situations where organizing code into a 2D array on the editing screen both makes it more readable, and much more easily edited with rectangle selection manipulations.

                --
                🌻🌻 [google.com]
      • (Score: 2) by MichaelDavidCrawford on Thursday August 23 2018, @05:16PM (2 children)

        by MichaelDavidCrawford (2339) Subscriber Badge <mdcrawford@gmail.com> on Thursday August 23 2018, @05:16PM (#725278) Homepage Journal

        He always said "Ying-Yang" quietly to himself whenever he typed "yy".

        As a result I have always done that too.

        --
        Yes I Have No Bananas. [gofundme.com]
    • (Score: 5, Interesting) by Snotnose on Wednesday August 22 2018, @10:19PM (2 children)

      by Snotnose (1623) on Wednesday August 22 2018, @10:19PM (#724901)

      I never saw the appeal of memorization of a huge number of multi-key commands.

      You aren't old enough to remember days before the GUI. Early GUIs sucked, GUI designers tried to shoehorn everyday commands issued by Makefiles onto the command line, and sucked at it. Compilers/linkers had more options than you could put into your GUI elements. You could try, but I always had that 1 option the GUI designer didn't think was important. So I had to make a workaround to the GUI, once I make a workaround why use the GUI?

      I admit, vi(m) has a huge learning curve. Wanna know why I stick with it? I'm a touch typist. As long as my fingers are on a keyboard I'm golden. Take my hand off the keyboard to use a mouse? I've lost.

      Also says why a lot of us neckbeards perfrer vim over the typical IDE. I learned Java a while back, with an eye to loading my code to an Android. Wanna know what I do? I develop most of the code via VIM, javac/java, and a Makefile; then at the last minute I switch to NetBeans.

      --
      When the dust settled America realized it was saved by a porn star.
      • (Score: 5, Insightful) by coolgopher on Thursday August 23 2018, @01:06AM (1 child)

        by coolgopher (1157) on Thursday August 23 2018, @01:06AM (#724987)

        Early GUIs sucked

        What do you mean "early"? The modern UIs suck just as much, if not more. At least back in the day the problem tended to be that too much stuff was crammed in. These days you just don't get the stuff and are expected to sit pretty and consume, not *do*.

        And yeah, make is an amazing tool.

        • (Score: 2) by Dr Spin on Thursday August 23 2018, @10:01AM

          by Dr Spin (5239) on Thursday August 23 2018, @10:01AM (#725130)

          Yep. It does not take much brain power to figure a modern quad-core processor at 4GHz can suck more powerfully than a 486 at 10MHz.

          Now, thanks to the miracle of Meltdown, the "Lake" series processors can even suck your data into another dimension.

          --
          Warning: Opening your mouth may invalidate your brain!
    • (Score: 2) by NewNic on Thursday August 23 2018, @12:47AM

      by NewNic (6420) on Thursday August 23 2018, @12:47AM (#724973) Journal

      beyond :wq

      ZZ FTW!

      --
      lib·er·tar·i·an·ism ˌlibərˈterēənizəm/ noun: Magical thinking that useful idiots mistake for serious political theory
    • (Score: 2, Disagree) by bart9h on Thursday August 23 2018, @01:05AM (3 children)

      by bart9h (767) on Thursday August 23 2018, @01:05AM (#724986)

      What makes vi better than emacs is that DON'T have to memorize a ton of multi-key commands. You combine actions, objects and motions to edit very efficiently and naturally, greatly reducing the memorization requirements.

      • (Score: 2) by tangomargarine on Thursday August 23 2018, @06:12PM (2 children)

        by tangomargarine (667) on Thursday August 23 2018, @06:12PM (#725319)

        You don't have to memorize a ton of multi-key commands in vi; you have to memorize a bunch of single-key commands. With emacs, it has a help mode where if you can't remember what you want, you either C-h k for "what does this key chord do?", C-h f "does this function do what I think it does?", or M-x enter-the-full-name-of-the-command-with-autocomplete.

        Is vi self-documenting?

        --
        "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
        • (Score: 0) by Anonymous Coward on Thursday August 23 2018, @07:50PM (1 child)

          by Anonymous Coward on Thursday August 23 2018, @07:50PM (#725375)

          Escape Meta Alt Ctrl Shift! See, it's so easy! (I think Stallman has six fingers on each hand to come up with stuff like that).

          • (Score: 2) by tangomargarine on Thursday August 23 2018, @08:43PM

            by tangomargarine (667) on Thursday August 23 2018, @08:43PM (#725396)

            It's an old joke, but Meta = Alt and I don't think emacs uses Esc for anything more than an alias to some other key. If your emacs gets jammed up you're supposed to be able to exit it via Esc Esc Esc I think? So Meta Ctrl Shift only.

            The emacs doc claims [gnu.org] that it doesn't care about case in keychords, but from experience I'm not sure I believe them. If we buy that we're down to just Ctrl and Meta.

            A lot of key chords actually involve only one modifier key, releasing everything, and typing some other character, rather than holding 2 or 3 modifiers at once. C-x [blah] for a lot of stuff, and C-[blah] directly for editing basics.

            --
            "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
    • (Score: 3, Interesting) by RS3 on Thursday August 23 2018, @01:39AM (3 children)

      by RS3 (6367) on Thursday August 23 2018, @01:39AM (#725002)

      I started using 'joe' a very long time ago. I wasn't particularly used to the commands but they're easy, joe is small and quick, and I love the syntax highlighting.

      • (Score: 3, Informative) by JoeMerchant on Thursday August 23 2018, @01:49AM (2 children)

        by JoeMerchant (3937) on Thursday August 23 2018, @01:49AM (#725008)

        I've used several different ones over the years, but I've fallen back to nano because it's always there, gedit for "next level" stuff that becomes a PITA in nano, and Qt Creator for code editing because: IDE - available anywhere, 10x faster to install than Visual Studio.

        --
        🌻🌻 [google.com]
        • (Score: 2) by RS3 on Thursday August 23 2018, @01:59AM (1 child)

          by RS3 (6367) on Thursday August 23 2018, @01:59AM (#725015)

          Yeah, nano is okay too. It's familiarish because I started using pine very long ago and still do in some contexts.

          10x faster to install than Visual Studio.

          LoL, Windows 10 is 10x faster to install than Visual Studio!

          Ever try joe?

          • (Score: 2) by JoeMerchant on Thursday August 23 2018, @12:32PM

            by JoeMerchant (3937) on Thursday August 23 2018, @12:32PM (#725177)

            I'm trying to remember the weird editor I was using around 2013, pretty sure it wasn't joe, but it was attractive because it had most of the functionality of gedit, including a little syntax coloring, but was functional via ssh, and available via apt-get.

            --
            🌻🌻 [google.com]
    • (Score: 3, Informative) by bzipitidoo on Thursday August 23 2018, @03:42AM (3 children)

      by bzipitidoo (4388) on Thursday August 23 2018, @03:42AM (#725051) Journal

      You don't need to know very much to do basic editing in vi. Most guides flood the beginner and occasional user with way too many details. This is a minimal set of commands for vi that I wrote up a long time ago:

      vi starts in command mode.
      Can precede most commands with a number telling how many times to
      do a command. For example, hitting 42 followed by the down arrow will
      move the cursor down 42 lines. "42x" will delete 42 characters.
      ESC Change to command mode.

      Command mode:
      Move cursor with arrow keys. If there aren't any arrow keys, j,k,h,l works.
      i Change to insert mode. Insert before cursor.
      a Change to insert mode. Insert after cursor.
      r Replace 1 character.
      R Overwrite mode.
      x Delete 1 character.
      dw Delete 1 word.
      dd Delete 1 line.
      P Put deleted text before cursor.
      p Put deleted text after cursor.
      G Go to end of file. If preceded by a number, go to that line.
                            1G goes to the start of file.
      ctrl-G Display line number where cursor is.
      J Join. Merge next line with this line.
      / Search. Follow "/" with text to find.
      : Change to command line. ":" prompt appears at bottom of screen.

      Command line:
      wq Write file and Quit
      q! Quit, don't save file.
      %s/old/new/g Substitute. Replace "old" with "new" on all lines.
      r file.txt Read "file.txt" into editor at line after cursor location.

      • (Score: 2) by bob_super on Thursday August 23 2018, @05:02AM (1 child)

        by bob_super (1357) on Thursday August 23 2018, @05:02AM (#725077)

        The problem with that list (thanks), is that if you use vi once a month or less, you're not going to remember it.
        Most other editors can be used in a blink right after you open them for the first time after a few months. vi requires regular use.

        for a world that doesn't exist anymore

        Now that the Apple assholes are killing the Fn keys, and people type so much on touchscreens, there is no question keyboard-centric vi and friends are getting even more niche. Ironic, when Linux is the most used OS (kernel) around.

        • (Score: 2) by bobthecimmerian on Friday August 24 2018, @03:23AM

          by bobthecimmerian (6834) on Friday August 24 2018, @03:23AM (#725582)

          I agree with your point. On the other hand, GVim is pretty newbie friendly. It has most of the useful options in nice menus at the top with the related keystrokes listed, so the learning curve is much less ugly - in GVim, all the newbie has to remember is 'i' to switch to insert mode and Esc to switch out of it. Or if you want the menu option Edit - Global Settings - Toggle Insert Mode (equivalent command :set im!) will put the editor permanently in Insert mode, and all other commands are just accessed from the GUI menus.

          With the benefit of hindsight, I wish I had learned vim that way. "How do I undo typing? Let me see, Edit - Undo. Oh, it's the 'u' key. Cool. How do I switch to the next buffer? ..."

      • (Score: 2) by JoeMerchant on Thursday August 23 2018, @12:16PM

        by JoeMerchant (3937) on Thursday August 23 2018, @12:16PM (#725172)

        I think one of my biggest gripes about vi is the lack of prominent visual indication for what mode you are in. That, and the lie that there's edit mode and command mode - there's also command line mode, which at least jumps the blinkincursor to the bottom of the screen.

        --
        🌻🌻 [google.com]
    • (Score: 2) by bobthecimmerian on Thursday August 23 2018, @07:56PM (17 children)

      by bobthecimmerian (6834) on Thursday August 23 2018, @07:56PM (#725378)

      I'm a heavy vim user, but I understand what you're saying. For the record, rectangle copy-paste in vim is Ctrl+v, navigate the cursor to the end of your block, y to copy (d to delete), and then navigate to the target location and p to paste. You never leave command mode, so the switch from insert mode to command mode does not apply. If you want to save what you've rectangle cut/copied into the system clipboard, you would do "+y instead of just y to copy. If you want to copy it into a named register so you can use it later, you could do "ay or "by to save it into register a or b, respectively and then later "ap or "bp would paste it.

      I got hooked on vim because I worked on systems where it was the only text editor available. Or the only other editor is nano, and it doesn't take much skill with vim to be substantially faster than a nano user. For anyone working in a similar environment, of course extensive skill with vim makes sense. But working in an environment like that is pretty damn rare even for people in the tech industry, let alone the for general public. So the case for vim is not as strong as it used to be.

      And as a vim power user, I am just plain fast. I can bang out regex-based text substitutions, highlight half a page, forward and reverse search, create macros for tasks too complex for regex substitutions, hop back and forth between buffers, use multiple copy and paste registers, split screen, execute command line programs and watch the results or even insert the results into the current file without leaving vim, and more. And I can do all of that without taking my hands away from their regular keyboard position, not even to the arrow keys. I don't think many people would be faster with SublimeText or Notepad++ or similar. Incidentally I'm not comparing vim to an IDE, that's a separate beast and as much as I love vim or emacs I don't think they're a valid IDE substitute.

      But as much as vim enables me to be quick, I am not sure it was worth the learning curve. If my career had been such that I could get by with nano in terminals and a traditional GUI text editor elsewhere, and all of the time I spent learning vim went into, say, better proficiency with one of the build tools I would probably be better off.

      • (Score: 2) by JoeMerchant on Friday August 24 2018, @02:09AM (16 children)

        by JoeMerchant (3937) on Friday August 24 2018, @02:09AM (#725547)

        For me, it wasn't just build tools - I was in small companies, so it was also how to navigate trade show presentations, VC funding pleas, finding ways to keep your underperforming team members from driving your high performers crazy/away, regulatory compliance, site lease negotiations, how to hire C++ programmers quickly in a market area where none with skill apply, and politics - oh, the joys of small company + big ego politics. So, regex vim and I never really got to be buds, I've seen them around but they're just too demanding to be my friends.

        nano is almost always there (as the name implies) for small edits, and for a while I was using jed as an intermediate capability editor that works through an ssh connection - jed is no vim or emacs, but it's better than nano and not demanding at all (small on-screen prompts sufficient to keep the uninitiated functional) - it's been about 4 years since I fired up jed, took a while just to remember the name, I'm sure there are many similar others out there, but vi / vim are going to be immortal, maintained at least until after I'm gone - so for those who have invested the time, you've got a friend for life. I just wonder, if I had invested the time to become vi proficient, then put it down for 4 years, how much would I retain?

        --
        🌻🌻 [google.com]
        • (Score: 2) by bobthecimmerian on Friday August 24 2018, @03:13AM (15 children)

          by bobthecimmerian (6834) on Friday August 24 2018, @03:13AM (#725578)

          Granted that I haven't taken any prolonged breaks from vim, but most of the important options are muscle memory - as ingrained as Ctrl+C or Ctrl+Alt+Delete.

          A friend of mine swore by jed. I never really tried it.

          I understand there are lots of other ways to build one's skills of all sorts besides switching between learning vim and learning Make or Maven or CPAN or whatever. But a lot of the other activities you describe have to be done during work hours because they need access to company resources or colleagues. I can horse around with the tools I mentioned on my own PC in my spare time. It's not an especially fun way to pass the time, but since it makes the work day less painful the investment is worthwhile. I mostly stay out of company politics except to try to play diplomat from time to time. But it's a two edge sword - there's often less stress in the front line work, but when people higher on the totem pole make a decision you emphatically disagree with you have no clout to push back. And there's not always less stress in the front line work, if the management is incompetent or callous they will bury you in work. I've been more lucky than not.

          • (Score: 2) by JoeMerchant on Friday August 24 2018, @10:52AM (14 children)

            by JoeMerchant (3937) on Friday August 24 2018, @10:52AM (#725736)

            on my own PC in my spare time.

            Yeah, so... real-estate, wife, divorce, boat, race car, wife, children, more real-estate, travel, land development, house maintenance, car maintenance, yard maintenance. There was StarCraft level spare time in there, lower bronze level StarCraft II spare time. Maybe if I had gone silver there's an argument for enough spare time for vi?

            When I get some of that spare time I'll be releasing my own blockchain / value token system - simpler and more accessible than the others for the simple fact that: if I can put it together in _my_ spare time, it has to be simple. I really do believe that there's value in simplicity, obviousness and accessibility, not only in editors but really in all things.

            --
            🌻🌻 [google.com]
            • (Score: 2) by bobthecimmerian on Friday August 24 2018, @12:23PM (13 children)

              by bobthecimmerian (6834) on Friday August 24 2018, @12:23PM (#725761)

              :) StarCraft 2 and Nethack are the only two PC games I've played in the past two years, so we have that in common. I reached lower bronze level in 2011 or so but I haven't played multiplayer with anyone other than family members since 2012 and I've lost what little edge that I had.

              I'm married with kids myself. This fall we have football, soccer, dance, and Girl Scouts, plus a wealth of orthodontist visits. Well, mostly the wealth of the orthodontist. My calendar has more grey slots on it than a checkerboard.

              • (Score: 2) by JoeMerchant on Friday August 24 2018, @02:48PM (12 children)

                by JoeMerchant (3937) on Friday August 24 2018, @02:48PM (#725828)

                My orthodontist literally bought a new Porsche 911 the week after we signed the contract.

                Kids are the bottomless time-sink. I switched from StarCraft to Hearthstone because it's less demanding of focused attention / better fit for home life with the kids, then I got really disgusted with the amount of time I was actually putting into it because it was so easy to just play a game "while" doing something else, so now I noodle on the idea of a "simple" blockchain system instead.

                --
                🌻🌻 [google.com]
                • (Score: 2) by bobthecimmerian on Saturday August 25 2018, @02:34AM (11 children)

                  by bobthecimmerian (6834) on Saturday August 25 2018, @02:34AM (#726126)

                  For all I know our orthodontist comes to work in a Rolls Royce, but if he does he has the taste to park it behind the building. On the other hand our old psychiatrist left the practice and the new one reserved the closest spot to the entrance for himself and alternates between showing up in a Maserati and a Fisker Karma. We're on the hunt for another psychiatrist.

                  I had some initial enthusiasm for blockchains, but I've come to think it's a solution still searching for a problem. I'm more interested in projects to support a distributed, decentralized web that - crucially - is easy for the average person to use instead of tech power users. I basically never have the mental energy outside work to contribute to one. But I'm hoping as the kids reach college age that I might. Things like the dat protocol and Beaker browser, Scuttlebutt, offline first Progressive Web Apps, the NoBackend movement, Sandstorm (one of my favorites, conceptually similar to OwnCloud or NextCloud but in my view superior in a number of key aspects), etc...

                  • (Score: 2) by JoeMerchant on Saturday August 25 2018, @03:08PM (10 children)

                    by JoeMerchant (3937) on Saturday August 25 2018, @03:08PM (#726243)

                    Since you've already mastered regex and vim, maybe this can inspire you for blockchain applications that are "easy for the average person to use instead of tech power users"?

                    http://mangocats.com/ao/IslandLife.html [mangocats.com]

                    It's disorganized, incomplete, and still morphing around in search of a solid form, I'm targeting May 4 2019 as a "gel date" to have it ready for public input, but if anybody wants to read / critique it with the understanding that I'm retaining 100% control of this branch (feel free to branch and own your own version at anytime)... there it is.

                    --
                    🌻🌻 [google.com]
                    • (Score: 2) by bobthecimmerian on Monday August 27 2018, @01:38PM (9 children)

                      by bobthecimmerian (6834) on Monday August 27 2018, @01:38PM (#726881)

                      I like your ideas. I haven't done a deep read through, but what I see makes sense. I see three concepts so far that separate your ideas there from what I have seen in most other blockchain products, and I may have missed a few more: 1.) no currency generation through proof-of-work or proof-of-stake or, as far as I can tell, other forms of mining. 2.) ability to censor content 3.) the ability to add expiration dates to contracts.

                      I will admit I'm not motivated enough to contribute. I also think you face a colossal obstacle: coinmarketcap.com already lists 1890 cryptocurrencies. I am absolutely certain there are some gems somewhere mixed in that colossal pile of trash. But how do you find them? How are the things worth using, or at least worth exploring for interesting ideas and maybe reusable code, going to stand out from another set of lipstick on the pyramid scheme piggy?

                      • (Score: 2) by JoeMerchant on Monday August 27 2018, @02:02PM (8 children)

                        by JoeMerchant (3937) on Monday August 27 2018, @02:02PM (#726893)

                        Thanks for reading. The closest in philosophy I have found is Stellar, by the Ripple creator but reinvented with less greed attached. Where I diverge from Stellar is that they're still trying to have a "big complicated single distributed validation system" (more or less their own words), instead of something simple that ordinary mortals can administer themselves. I think proof of work mining is folly, it's folly that is currently working due to the level of greed/speculation swirling around it, but that can't sustain it into widespread use - it will always be some kind of niche, it's too expensive to operate as a real mainstream financial backbone.

                        All the talk of side-chains, etc. I see as an attempt to wean off proof of work while still retaining it as a central pillar. I still can't wrap my head around how people expect to trust this central pillar without it being fabulously expensive to operate - the more participants in the mining network, the more expensive it is to run, so whatever value it has is going to end up near equilibrium with the cost to run it... too esoteric and philosophical for this early in the morning.

                        My real vision, and hope for eventually getting noticed, is to package a system that is so damn simple that it can be analyzed and understood within a few hours by experts, explained satisfactorily to lay people within a few minutes, and deployed like a software appliance / phone app system by almost anybody on almost any hardware. The core crypto in bitcoin et. al. is simple enough to run on tiny embedded devices, all the mining power is just make-work.

                        When a share in a blockchain represents a promise from someone, they build their own value by fulfilling those promises satisfactorily, and providing proof through an easily accessed and easily trusted blockchain. Something akin to web of trust should be possible wherein reliable blockchain operators can endorse others and eventually it becomes impractical to rewrite history because those endorsements are impossible to forge, and too valuable to the endorsers to be given away. That's all about 3 generations past the Island Life story, but that's the vision of where it can go, and a little bit about how it might get there.

                        As I said, fuzzy, incomplete, needs development that it may or may not get. Next time I get an hour to work on it I want to re-design the large number storage scheme a little bit. On the one hand, a number is a number, why bother on a detail like that? on the other - if the underlying structures are super clean / simple, that can foster a family of compatible applications that aren't all differentiating themselves by varying the underlying data structures and interfaces...

                        --
                        🌻🌻 [google.com]
                        • (Score: 2) by bobthecimmerian on Tuesday August 28 2018, @01:27PM (7 children)

                          by bobthecimmerian (6834) on Tuesday August 28 2018, @01:27PM (#727327)

                          Funny, I hadn't visited coinmarketcap.com in months. I went through it yesterday and went to the official web pages of a few different digital currencies, picking at random. I ran into the concept of side-chains for the first time. Then you mention it here with your comment just a few hours later.

                          The one value I see in something like proof-of-work is the systems where it generates some kind of computing resource that other people can rent with the same token. I know storj.io tries to work that way with storage, but when I last examined it the initial investment cost was too high. The MaidSafe/SafeNetwork/SafeCoin project does too. I'm a million miles away from asserting that they get it right, or that they actually plan what they advertise and are not running an elaborate pyramid scheme. But at the least I think the idea is interesting - the dream of replacing centralized server hosting with virtual computing powered by a blockchain storage level and distributed computing resources.

                          I understand what you're trying to do, in broad terms. If you haven't tried it already, it might be worthwhile to read through some of the options that already exist. I suspect you'll find something that overlaps your goals, or maybe at least a community that would adopt your goals. Good luck.

                          • (Score: 2) by JoeMerchant on Tuesday August 28 2018, @03:38PM (6 children)

                            by JoeMerchant (3937) on Tuesday August 28 2018, @03:38PM (#727372)

                            some kind of computing resource

                            I just can't get past the future vision that: no matter how valuable computing resources are, they have such negligible cost that there will always be competition providing that computing resource for less.

                            The "revolutionary" value in I see in blockchains is: transparency, and consistency. Everybody gets a copy, and everybody understands how that copy is formatted and how to get the information they need out of it. That's nothing that couldn't have been done in 1990, but the motivation for compatibility, consistency and open communication wasn't there. At this point, compute, storage and communication resources are so cheap that they can sustain the massive overhead of mining and still provide value in the blockchain so produced. Of course the "immutable trustability" that everybody goes on about is a big deal, too, but by itself: so what? The fact that everybody can see it is actually sort of novel vs a website that is hosted by a central provider and can go down... The fact that people are paying to record things on the blockchain kind of acts as a barrier to entry that something like the internet wayback machine didn't have, and so it struggles with the massive volume of crap out there while the bitcoin blockchain stays at a more manageable data rate.

                            I started out intentionally ignoring the existing implementations and whitepapers just to see where I ended up without them as a corrupting influence. Then I started looking in more detail at what was out there. It took a surprisingly long time to find Ripple - the major non-proof-of-work blockchain, but, once found, it's pretty obvious (#3 market cap and all.) I actually brushed across Ripple a couple of weeks before I understood that it has no proof of work, you can read quite a bit of "analysis" of a system and they can still leave out rather crucial points like that sometimes. Stellar didn't surface for me until months after Ripple, again surprising, but I guess I'm not looking at it like a full time job, either. My initial "vision" more centered around reimbursement schemes for the recorders, and that can still happen, but I think it's more valuable to keep things straightforward and simple, the recorder reimbursement can be a layer on top of a simpler "trustable" core.

                            I set May 4, 2019 as an arbitrary "go public" date, but now we're looking at buying a boat so that may put a serious damper on the amount of time I invest in blockchain development... we shall see.

                            --
                            🌻🌻 [google.com]
                            • (Score: 2) by bobthecimmerian on Tuesday August 28 2018, @08:47PM (5 children)

                              by bobthecimmerian (6834) on Tuesday August 28 2018, @08:47PM (#727494)

                              With respect to computing as a resource for digital currency and the low cost, the whole point is to make it crazy cheap. So it might be marginally cheaper to share all of your data with Facebook, Google, etc... but since you're spending, hypothetically, $3.17 per month on SafeNetwork resources to host your own GMail equivalent and Facebook equivalent you don't mind. Or you plug an old laptop into a wall, install SafeNetwork on it, and it "mines" for you contributing resources to the SafeNetwork and you don't pay anything for your hosted resources beyond a tiny bit of electricity. More resilience, less censorship (though that's a can of worms), more privacy, less advertising.

                              But right now all of that is mostly a dream, might as well ask for a pony. Or a unicorn.

                              I understand your point about not getting polluted by other ideas. Good luck with your blockchain. And your boat.

                              • (Score: 2) by JoeMerchant on Tuesday August 28 2018, @09:45PM (4 children)

                                by JoeMerchant (3937) on Tuesday August 28 2018, @09:45PM (#727513)

                                For resource cost, I worked out a nice rule-of-thumb for electricity, at something like $0.11/kwh your annual cost for 24-7 consumption of 1 watt is $1. So, a typical Intel NUC-ish compact pc might cost $20 per year to run, if you want compensation for your router, etc. that might start to get up to your $3.17 per month - without considering the cost of broadband. I'd consider broadband and the router hardware to be fixed costs, nothing additional for running a network node on top nothing you'd notice, anyway, as compared to normal usage.

                                Taking family to see the boat tonight, truly don't know how this is going to go...

                                --
                                🌻🌻 [google.com]
                                • (Score: 2) by bobthecimmerian on Wednesday August 29 2018, @03:22PM (3 children)

                                  by bobthecimmerian (6834) on Wednesday August 29 2018, @03:22PM (#727855)

                                  Man, we're really off in the weeds. I'm having fun, thanks for the discussion. What did you and your family think of the boat?

                                  The dream of these SafeNetwork-style thing is that the level of tech literacy required is much lower. Install and go. I am typing this from my Linux workstation / home media server / home backups box. I do run the (fully open source) sandstorm.io software on the machine and they provide dynamic DNS, so my personal (redacted).sandcats.io subdomain is on the public web. If I wanted a static IP address so I could also host email or whatever on it, I'd need to pay Comcast a pretty penny in extra fees.

                                  • (Score: 2) by JoeMerchant on Wednesday August 29 2018, @09:12PM (2 children)

                                    by JoeMerchant (3937) on Wednesday August 29 2018, @09:12PM (#728010)

                                    My life experience of running public facing servers is: go dedicated or don't bother. Virtual machines and containers could be a middle ground, but I definitely don't see attempting to run a secure server that handles even little financial transactions without it being some kind of pre-configured software appliance with all the firewall configuration and other process security pre-configured for the sysops, even to the point of the server software running system self-audits to make sure the configuration is still kosher.

                                    The boat is scary-fun, hard to decide: 1974 36' trawler with a ferro-concrete hull - $15K, problems include rotten wood under the fiberglass in the superstructure that needs replacing (maybe 1/2 sheet of plywood, call it a whole sheet of plywood after you get into it and find other hidden gems), an exhaust manifold that needs replacing, water leak through the flybridge instruments, broken windshield (flat plate glass - easy), other than that it's really nice. New outside hull paint, could use new deck paint. Insurance on the concrete hull is difficult, and probably about $2K/yr, dockage is about $240/month - so maybe $5K/yr fixed expenses... if it lasts 3 years and we really use it twice a month, that's $30K plus all the repair labor for 150 trips, $200/trip + about $1/mile in running costs. Figure an average trip might be 20 miles, $220 per trip. Plus the time you can spend in the boat at the dock. This started as an idea for how to get a cheap apartment on the other side of town (30 minutes away, but 4 minutes from the kids' school), and it might still be that: cheaper than an apartment, but the docks on that side of town are $500/month and it's hard to think that that would be better than a dock less than half the price 10 minutes from home, even if that marina has a swimming pool...

                                    I wish I were 25 again, back then I looked into houseboats but couldn't find anything acceptable for less than $80K, which is what I spent on my first house - this thing would have been awesome back then... now, we can enjoy it while doing the restoration work, but I'm not sure we've really got the spare time to enjoy it like we'd want to... It might get sold away from us before the custom exhaust manifold arrives next Thursday, and if that happens I'm O.K. letting it go. If it's still for sale when the exhaust manifold gets put on, we'll take a test cruise with the kids and let that help decide...

                                    --
                                    🌻🌻 [google.com]
                                    • (Score: 2) by bobthecimmerian on Thursday August 30 2018, @01:38AM (1 child)

                                      by bobthecimmerian (6834) on Thursday August 30 2018, @01:38AM (#728099)

                                      Good luck either way.

                                      • (Score: 2) by JoeMerchant on Thursday August 30 2018, @04:55PM

                                        by JoeMerchant (3937) on Thursday August 30 2018, @04:55PM (#728324)

                                        Fast 'n loose math missed a 2: would need 6 years at 2 trips per month to get ~150 trips, so that would be an additional $15K of dock and insurance, making the trips $300 each at 6 years of continuous use, or $400 each at 3 years (or $800 each for one year, if it sinks after a year)... I'm cooling on it even without that bad math, our house-house needs wood work, caulk and paint, too, and when we went to see the trawler the smell of bug bomb came home with us on our clothes and hair... My boat diversion is leaning toward sail (where it was before this concrete beast came along), my wife is looking at bigger and more expensive trawlers... I just don't see that ever making sense, unless the blockchain thing does something unlikely for me.

                                        --
                                        🌻🌻 [google.com]
  • (Score: 4, Funny) by rts008 on Wednesday August 22 2018, @09:40PM (7 children)

    by rts008 (3001) on Wednesday August 22 2018, @09:40PM (#724878)

    Emac FTW!!!! ;-)

    • (Score: 2, Insightful) by Anonymous Coward on Wednesday August 22 2018, @09:56PM (5 children)

      by Anonymous Coward on Wednesday August 22 2018, @09:56PM (#724890)

      There's a certain religiosity in the Emacs community, promulgated no doubt by Stallman and his FSF.

      While that religiosity engenders a useful theoretical zeal that is enticing, I find that the Vim community's rough-and-tumble pragmatism are better for getting shit done.

      • (Score: 4, Funny) by Anonymous Coward on Wednesday August 22 2018, @10:16PM (1 child)

        by Anonymous Coward on Wednesday August 22 2018, @10:16PM (#724898)

        And when you're done doing shit, you can always use Emacs to get some work done.

        • (Score: 2) by gawdonblue on Thursday August 23 2018, @12:10PM

          by gawdonblue (412) on Thursday August 23 2018, @12:10PM (#725168)

          If only Emacs had a decent text editor :)

      • (Score: 2) by krishnoid on Wednesday August 22 2018, @10:40PM (2 children)

        by krishnoid (1156) on Wednesday August 22 2018, @10:40PM (#724917)

        Religiosity? Pfah! On an entirely unrelated note, Emacs-Lisp (and Lisp in general) is the one true editor customization, configuration, and extension language.

        • (Score: 2) by hendrikboom on Thursday August 23 2018, @12:42AM (1 child)

          by hendrikboom (1125) Subscriber Badge on Thursday August 23 2018, @12:42AM (#724970) Homepage Journal

          Except, of course, for its dynamic instead of static binding. I hear they're trying to do something about that, but the huge mass of elisp code is holding them back.

          • (Score: 2) by krishnoid on Thursday August 23 2018, @02:56AM

            by krishnoid (1156) on Thursday August 23 2018, @02:56AM (#725032)

            It seems like Emacs Lisp as of 24.1 [emacswiki.org] now allows for lexical binding on a per-file basis, with 'defvar' declaring a dynamically-bound variable. Did you mean this, or to kill dynamic binding altogether?

    • (Score: 2) by srobert on Thursday August 23 2018, @03:56AM

      by srobert (4803) on Thursday August 23 2018, @03:56AM (#725057)

      As long as I can activate evil-mode, it's tolerable.

  • (Score: 3, Informative) by Arik on Wednesday August 22 2018, @09:53PM (4 children)

    by Arik (4543) on Wednesday August 22 2018, @09:53PM (#724888) Journal
    "The editor was optimized so that you could edit and feel productive when it was painting slower than you could think. Now that computers are so much faster than you can think, nobody understands this anymore,"

    Ok, there's some truth to that. Remote terminals can have significant lag (but that hasn't changed much!) But it's really deceptive. In fact, VI running locally on an old frame-buffer to a monochrome display is *not* noticeably slow by todays standards - it's actually *faster* than it might run on more modern hardware going through a high-resolution bitmapped display system with all the excess overhead of a window manager and so on loaded.

    And that's all really kind of missing the point anyway. One of the best features of VI/M is that it doesn't *need* a display that can keep up with what you're doing. No program really does, if it's written right. The loop that responds to keystrokes is the highest priority, the screen update code can and should be interrupted freely to keep up with the input. Whenever the input stops, then it's time to work on the screen. There's absolutely no need to bother displaying intermediate steps while I'm still giving you input.

    --
    If laughter is the best medicine, who are the best doctors?
    • (Score: 2, Informative) by Anonymous Coward on Wednesday August 22 2018, @10:17PM

      by Anonymous Coward on Wednesday August 22 2018, @10:17PM (#724899)

      WYSIWYG may be good for quickly learning basic commands, but like LATEX, computers are better suited for the grunt work of formatting.

      I worked with a physicist at los alamos who was very good with both Tex ad vi. It was impossible to follow him as he reworked his entire paper - just a bunch of screen flashes, blocks disappearing, reappearing for a few minutes. After which a whole new paper magically appeared, perfectly formatted.

    • (Score: 2) by hendrikboom on Thursday August 23 2018, @12:47AM

      by hendrikboom (1125) Subscriber Badge on Thursday August 23 2018, @12:47AM (#724971) Homepage Journal

      I once wrote and used a screen editor that got used over a 300-baud telephone line. I could type as fast as I was capable of typing. After each keystroke, the editor would calculate what the screen ought to look like, calculate the minimum scrolling motions that would put the lines in right place and then proceed to insert or delete text into those lines, giving priority to the ones I was working with. It worked pretty well.

    • (Score: 2) by DavePolaschek on Thursday August 23 2018, @01:40PM (1 child)

      by DavePolaschek (6129) on Thursday August 23 2018, @01:40PM (#725197) Homepage Journal

      Even more fun was "rvi" which was a retro-separation of the "draw stuff on a screen" from the "do the editing using ed" back end. The version I used was distinct from the later "vim --remote" but may have inspired it.

      300 baud connection to the server mostly felt fast enough as long as you had a reasonably snappy computer running the screen-editor portion. And yeah, your typing and sending editing commands off to the server was the highest priority. Next was the "pulling down lines from the server so I can display them" loop. It was an incredible kludge.

      • (Score: 2) by Arik on Thursday August 23 2018, @02:31PM

        by Arik (4543) on Thursday August 23 2018, @02:31PM (#725214) Journal
        "It was an incredible kludge."

        I guess this is where we disagree.

        It's not a kludge. It's good design.

        I miss it every day, in programs that are so poorly designed they're ignoring my input while trying to push out unneeded (and unwanted) screen updates that never needed to happen at all, let alone as interrupts.
        --
        If laughter is the best medicine, who are the best doctors?
(1) 2