Don't vi on me and tell me it's raining! Where's pico?
#1
Hello all,

Love it.  

I've not used vi  seriously since the 1990's, and as a modal editor, I managed to remember enough to quit.  :q!  My current editor of preference is sublime text, which is awesome!, but not on the basic boot images found here, let alone for arm instruction sets.

My long time editor is emacs, cause it does lots, and the key bindings work for Cisco kit too, and lots of other systems.  Missing.

My go to ultra light weight editor is pico, taken from the pine email program (yeah, any one using pine yet, on pine???), and it provides plenty of what's needed for basic system editing.  But that's not here either.

Copying from my netbook does no good, cause the binaries are all x86_64, and pine64 is AArch64.  

So, I am looking for these as precompiled binaries, and failing that, I'll have to cross compile on the netbook.  Or I could refresh myself on vi, but...yeah... that's gonna happen.

I'll post my solution once I've found it.

David
David, the lip smacking pirate hedgehog.  "SHIVER me timbers!"  
#2
Do you have internet access on the pine64? You can 'sudo apt install emacs'.

Is this on the ubuntu install or debian install?

Also, try nano instead of pico... or maybe that is on because I install that.
#3
(09-19-2016, 06:35 PM)pfeerick Wrote: Do you have internet access on the pine64? You can 'sudo apt install emacs'.

Is this on the ubuntu install or debian install?

Also, try nano instead of pico... or maybe that is on because I install that.

Yeah, that's the trouble, I'm wifi'ng via my cellphone, and need an editor to configure the wifi.  Sure, there's vi, but why make it easy?  I want pico, which in arm64 terms is, yes, nano.  

Also, I do not have to cross compile (in this case) because there are .deb binaries.  Which I got from:
https://launchpad.net/ubuntu/xenial/arm64/nano/2.5.3-2

I'm still looking at cross-compiling, but once I get the pine online, I can proceed with the ussual apt-get stuff.

And in full disclosure, I'll refresh myself on vi too.  

I am surprised the only editor on the boot media is vi.  Nano is pure GNU/FSF kit, no trouble from UW.  Now to sneaker net this onto the microsd.

Thank you for the reply.   Smile
David, the lip smacking pirate hedgehog.  "SHIVER me timbers!"  
#4
hi tampadave,  the modal editor vi ( vim ) is installed on all decent base distros by default because its the defacto standard for system text editing, especially across the network via ssh,  without exception bar none ( for unix-like systems ).

The reason is simple; the vim editor is ubiquitous and everyone worth their salt knows and understands it, omitting it would be silly-- not to mention it contains a powerful tooset, is easy to use, and has a very tiny footprint in memory. 

If you do not know vim, I'd recommend learning it; also, I'd keep the fact that you don't know it a secret, especially if you're looking for a job.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#5
(09-19-2016, 09:50 PM)MarkHaysHarris777 Wrote: hi tampadave,  the modal editor vi ( vim ) is installed on all decent base distros by default because its the defacto standard for system text editing, especially across the network via ssh,  without exception bar none ( for unix-like systems ).

The reason is simple; the vim editor is ubiquitous and everyone worth their salt knows and understands  it, omitting it would be silly-- not to mention it contains a powerful tooset, is easy to use, and has a very tiny footprint in memory. 

If you do not know vim, I'd recommend learning it; also, I'd keep the fact that you don't know it a secret, especially if you're looking for a job.

Thanks Mark.  You're right about vi/vim being ubiquitous.  It's why I used to teach it to my students, and I used it for a time for c coding.  But then I adopted emacs (and it begins... Flame on!...), and just ended up using emacs instead of vi.  I never consciously stopped using vi, I just used emacs instead.  

My favorite editor today is sublime text, but it is not ported, nor likely to be ported, to aarch64/arm64.  The modal behavior of vi is an obstacle to its use.  Always has been; always will be.  Other than that, it does the same things most other editors do.  But then so do the other non-modal editors — without the modal irritation.

I've yet to find vi keybindings used by anything other than vi.  emacs keybindings are used elsewhere, notably for me in Cisco IOS.  Oh, bash too.  

This is an old, old thing of unresolvable contention.

As for jobs, eh.  If I were seeking employment at a vi siloed Unix/GNU/Linux environment, it would take about an hour to get back on track with vi, but I've not needed to do that — ever.

I'm glad vi is there.  vi is a very capable editor.  Its modal nature is so annoying to me that I'm willing to spend more time installing something else, just so that I do not have to use it, at all.  vi is not hard to use.  vi is annoying.  To me anyway.

nano is a gnu tool, at 178172 bytes for the nano_2.5.3-2_arm64.deb deb package, it is small enough to put into the tool chain, and non-modal.  (Yeah!)  I'd include it with these boot images.  

I think the social issue with vi is to "set apart" the unix/gnu/linux hardcore types from the pleebs.  I think the stickyness of vi lies in the fact that it IS annoying to "those" who are less deserving of a good system, cause they are not willing to go through the hassle of modal editing.  Which is as sensible as a dot three file extension paradigm.  (ohh that's gotta hurt!!)  This social comment applies to the exclusive presence of vi, not the presence of vi.

Forcing noobs onto the spike that is vi, is cruel (not unusual).  It keeps lots of potential adopters from adopting.  See above, regarding their "worthiness."  Forcing me to do anything is what got me here in the first place.  EULAs and NDAs, and blah blah blah, I even got away from Redhat because they started telling me what my system was going to be.  No thanks.  This whole thing is about freedom, not proscription.  Nano ought be be on these images, so that no one is forced to use vi.  Are we going to be noob friendly?  Or not?  Right now, we are not.  Don't play that line about how: "back in my day we all used vi, and liked it!"  Yeah, coming from ed, vi was awesome!

Anything but vi!  OMG!!!!  (except ed)

Whew.  That felt good.

For system configuration edits, nano wins in my experience, beating out emacs, vi, whatever....  Anything more complicated and I'm looking at sed, awk or a bash script.  Perl is good too.  You just can't beat regex when it comes to text processing.  But for upstart configs, nano wins in my opinion, and it should already be there.  vi is there too.  nano provides a choice, and makes this part of the learning curve moot.  For those who are interested, pop this wget line into your inet connected bash shell, and it'll get it for you:

wget http://launchpadlibrarian.net/250291860/..._arm64.deb



David

PS: you can even build config files straight from bash, without any editor:

echo "Hello world." >> configmuch
echo "Nice weather today.  Mostly." >> configmuch
echo "I like turtles." >> configmuch
cat configmuch
Hello world.
Nice weather today.  Mostly.
I like turtles.

You'll just have to overwrite them if you make a mistake.
David, the lip smacking pirate hedgehog.  "SHIVER me timbers!"  
#6
Is this how it should look like?

Code:
tk@pine64:~$ aptitude search '~Peditor' | grep "^i"
i   nano                            - small, friendly text editor inspired by Pi
i   vim                             - Vi IMproved - enhanced vi editor          
i   vim-tiny                        - Vi IMproved - enhanced vi editor - compact
tk@pine64:~$ type pico
pico is /usr/bin/pico
tk@pine64:~$ readlink -f /usr/bin/pico
/bin/nano
#7
(09-20-2016, 02:07 PM)tampadave Wrote: This is an old, old thing of unresolvable contention.

There is no contention , nor is there anything to resolve. I personally could care less what editor you use , nor what your favorite compiler is.  The beauty of gnu+linux is that you are free to build whatever tool box you like , and you are free to become proficient at whatever toolset you find useful. In fact if you like you may also freely build your own kernel and assemble your own distro.  Knock your SoC(s) off, as they say...

... when I evaluate your distro for my next article , the first thing I will check immediately after htop , is vim.  If I find it your stock goes up... if I don't find it the article will condemn the distro as an incomplete and frail attempt not worth the time-- discussion over.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#8
(09-20-2016, 07:13 PM)MarkHaysHarris777 Wrote:
(09-20-2016, 02:07 PM)tampadave Wrote: This is an old, old thing of unresolvable contention.

... I personally could care less what editor you use , ...

... when I evaluate your distro for my next article , the first thing I will check immediately after htop , is vim.  If I find it your stock goes up... if I don't find it the article will condemn the distro as an incomplete and frail attempt not worth the time-- discussion over.

Sounds good, just don't do it in CamelCase.  If you're running on my distro, you can use nano to code your article, if you want to, cause it'll be there!  Noob products are better for noob users.  No one is hurting for storage space anymore, so the only reason I could see for NOT including nano is a social reason, not a technical reason.  

It is all about the purpose of the distribution, which is about the actual users.  In our case(s), we take advantage of the ability to build our own kernels, pick our own file systems, tweak our own cflags.  Mark, it's been a long long time since i was new at this, like the late seventies.  This stuff is still pervasively overwhelming to me in scale and step by step requisites.  The only reason why we have the users that we have is because it is more accessible to entry level adopters.  

I used to use a reverse polish logic notation calculator, back when calclators were special, and never had to worry about it getting stolen, cause nobody else could figure out how to use it.  You don't really see them anymore, do you?  (Moot now, cause we can just code up whatever we want now, anyway...)

pine64's are very affordable, capable, full blown computers, which makes them accessible to students.  Stopping the world to learn the context of vi, unique to its own way of doing a very common thing, for them, is nonsensical.  Like reverse polish logic notation.  nano is more intuitive, and immediately usable to do things they have to do, at the first stage of a pine64 build.  vi is nothing more than a text editor.  It is not any more important than the things you do with a text editor.  And the things needing to be done for a new pine64 build are utterly basic config file editing, well met by nano.  Time spent learning just how to do anything with vi is time no longer available to apply towards learning and using the pine64.

It's like not having man pages... oh yeah, those seem to be missing too...  Different post.

It would be stupid not to have vi as part of a gnu/linux distribution.  Kind of like omitting regular expressions.  It is wrong to proscribe, by omission of any other editors, that this is the editor you HAVE to use.  How does that not make sense?


David
David, the lip smacking pirate hedgehog.  "SHIVER me timbers!"  
#9
(09-20-2016, 08:29 PM)tampadave Wrote: It would be stupid not to have vi as part of a gnu/linux distribution.  Kind of like omitting regular expressions.  It is wrong to proscribe, by omission of any other editors, that this is the editor you HAVE to use.  How does that not make sense?

I agree.

Angel
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#10
Now that we have the vim trolling behind us, I thought it might be helpful to answer your real question: "Where is pico?"

... pico editor ( on PineA64 gnu+linux , which is debian based, including armbian ) is nano. I'll let tkaiser speak for armbian , I'll address debian and ubuntu from pine64.pro.  The debian image ( generally ) has nano installed by default with a link for pico activated in /etc/alternatives/.  Ubuntu , on the other hand , has nano ( pico ) installed only if the user installs it :

sudo  apt-get  install  nano

The above installation command will bring nano on-board and will build the /etc/alternatives/pico links automatically. 

The pico , or nano , command will start the nano editor with an empty buffer within the terminal emulation shell of choice. Its generally a useful if not clunky editor with mousability and limited  command interface. nano is intuitive and easy to learn , and many non Jedi gravitate toward it ( have mouse -- will point and grunt ).

If you manage to get a full graphical interface running on your pine board , you and your students may actaully be interested in learning to use the 'pluma' editor , which is very much like the graphical editor common on most Windows desktops.  

Just for the record , I am an old-time lisp programmer ( among many other Jedi arts ) and I as a consequence use emacs all the time along with my plethora of other skills. Its interesting to note, however, that emacs with its almost limitless meta-key bindings is rather vim on lisp steroids-- plenty of fun , and thoroughly functional !

I give lessons in all of the above with unbiased zeal , and without prejudice ...
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )


Forum Jump:


Users browsing this thread: 6 Guest(s)