taskReproducible paper template - Tasks: task #15764, Text editors in Maneage

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #15764: Text editors in Maneage

Submitted by:  Mohammad Akhlaghi <makhlaghi>
Submitted on:  Thu 27 Aug 2020 04:19:58 PM UTC  
 
Should Start On:  Wed 26 Aug 2020 11:00:00 PM UTC Should be Finished on:  Wed 26 Aug 2020 11:00:00 PM UTC
Category:  Software Priority:  5 - Normal
Status:  Done Privacy:  Public
Percent Complete:  100% Assigned to:  Mohammad Akhlaghi <makhlaghi>
Open/Closed:  Closed Effort:  0.00

( Jump to the original submission)

Fri 11 Sep 2020 06:47:27 PM UTC, comment #10: 

Mohammad-reza seemed to be convinced (for the time being!), and there were no complaints from Boud in the last two weeks, so I'll close this task.

But please feel free to share any further thoughts on this if you have any ;-).

Mohammad Akhlaghi <makhlaghi>
Project AdministratorIn charge of this item.
Sat 29 Aug 2020 04:54:35 AM UTC, comment #9: 

Hi Mohammad, Boud, and Raul,

I totally understand the motivation and concern here and it has never left my thoughts.

As you said Mohammad, Interface of a software to the users, is very crucial. I think defining a user interface is a problem that requires critical thinking and would make us review and revisit all parts of the design using logic.

In this context, as the starting point and something that is supposed to serves as a user interface of maneage, nano would be a basic utility. However, I feel that eventually we have to move towards making something ourselves.

Probably, when we want to seriously have discussions around the interface of maneage to the users, we can open a new task.

Mohammadreza Khellat <mkhellat>
Project Member
Fri 28 Aug 2020 02:33:48 PM UTC, comment #8: 

Thanks Boud, the issue of editors has always been a very subjective issue! I completely agree with the elegance, and minimalist approach of 'ed'.

But we should also consider this: Maneage is purely in plain-text. So its "user-interface" is effectively the text editor. When we have something like Nano as the default text editor (available in any Maneaged project), non-advanced people can also feel more comfortable in using/modifying Maneaged projects.

For many, the command-line itself is a new thing, not to mention all the other new tools we are asking them to learn: Git, shell, LaTeX, Make, and Maneage's internal structure! Nano looks something like a GUI editor and is interactive, and they don't have to spend a lot of time getting use to it.

But of course, if you would like the default editor in your project to be 'ed' we can add its build instruction in 'basic.mk' and just change 'nano' in the 'targets-proglib' of 'basic.mk' to nano ;-).

Boud and Mohammad-reza, if you are convinced with this argument, please close the task. If not I am open to discuss more, I don't have a strong opinion, I am just thinking in terms of new users ;-).

Mohammad Akhlaghi <makhlaghi>
Project AdministratorIn charge of this item.
Fri 28 Aug 2020 02:17:34 PM UTC, comment #7: 

Mohammad-Reza, Mohammad, all:

comment #5:

> basic.mk should be kept, as much as possible, loyal to the idea of having a minimalist, POSIX-compliant, and UNIX-philosophy obedient core. Those text editors are limited in redirection capabilities from/to other Unix core tools.
>
> The idea of having separate options for building these editors as high-level tools is a great one.


That's an argument in favour of ed , which allows stdin and stdout, AFAIK:

printf "a\nThese\nthree\nlines\n.\nw dummy_file\nq" | ed

should create the file dummy_file with those three lines. :)

Would ed be an acceptable compromise in basic.mk instead of nano ? :)

Boud Roukema <boud>
Project Member
Fri 28 Aug 2020 02:12:25 PM UTC, comment #6: 

Thanks a lot Raul and Mohammad-reza! This job is now merged into Maneage as Commit 87948105.

I tried the VIM install on my system and noticed that it is linking to many extra GUI-related libraries on my system, so after some searching, I was able to disable all the GUI-related and network functionality. So like Emacs and Nano (and all other Maneaged software), the only host library that VIM needs from the host is the C library :-).

Thanks Mohammadreza for sharing your thoughts on Nano being part of high-level. I also thought a lot about it, but the problem is that 'sed' and 'awk' aren't interactive editors, it will be extremely frustrating to correct a shell-script or C/Python program with SED (although certainly not impossible!).

Since Maneage is in pure plain-text, if all Maneaged projects come with at least Nano installed, interactive editing of Maneaged projects will also be easy to do. Its the same with Git (which we install in 'basic.mk'): Git isn't related directly related to the analysis of the project, but Maneage is organized with Git and whoever uses Maneage will probably need Git too, and some systems don't have it! So although you don't need Git to build Maneage from a tarball, after its finished, you will have Git to start building upon the history if you want ;-).

Mohammad Akhlaghi <makhlaghi>
Project AdministratorIn charge of this item.
Fri 28 Aug 2020 12:00:37 PM UTC, comment #5: 

original submission:

> Please share your thoughts about adding text editors.


In my opinion, vi, nano and emacs should all be part of high-level.mk. Text processing and manipulation in basic.mk should be kept exclusive to 'sed' and 'awk' (even awk with compromise-because we already had sed by Lee E. McMahon!).

basic.mk should be kept, as much as possible, loyal to the idea of having a minimalist, POSIX-compliant, and UNIX-philosophy obedient core. Those text editors are limited in redirection capabilities from/to other Unix core tools.

The idea of having separate options for building these editors as high-level tools is a great one.

Mohammadreza Khellat <mkhellat>
Project Member
Fri 28 Aug 2020 09:51:28 AM UTC, comment #4: 

I am happy to say that I was able to fix the installation of emacs in macOS. I added the option `--with-ns=no' in the configure step and it went up to the end.

  --with-ns               use Nextstep (macOS Cocoa or GNUstep) windowing
                          system. On by default on macOS.

See commit: https://gitlab.com/maneage/project-dev/-/commit/2c998771

So, at least in my macOS laptop I have everything (nano, emacs, and vim) properly installed. Check that everything is fine in your machines, and then we could merge into the maneage branch. Thanks a lot!

Raul Infante-Sainz <infantesainz>
Project Member
Fri 28 Aug 2020 09:06:42 AM UTC, comment #3: 

Hi all, I also added Vim as a high level plain text editor. I had to only change the uncompressed directory name. This minor modification was necessary to remove the dash and the dot because the directory name is `vim82' instead of `vim-8.2'.

You can have a look and test if it works (branch `vim'): https://gitlab.com/maneage/project-dev/-/commit/ca0d9637

You will notice that I also fixed a minor typo in the read of physical cores (previous commit 9e09f2d8).

Related with `emacs', I am not able to install it. In the configure step, when checking multiple things, it crashes with this output:

configure: error: Non-toolkit scroll bars are not implemented for Nextstep.

I am trying to find a solution but if you have any idea let me know.

Raul Infante-Sainz <infantesainz>
Project Member
Thu 27 Aug 2020 09:23:45 PM UTC, comment #2: 

Thanks for bringing up 'ed' Boud! It is indeed a wonderful and small editor. We can add at it as an optional program in 'high-level.mk', but probably keeping Nano as the default editor would be more useful to many early users (who are already learning a lot of new tools).

I feel Nano is more new-user friendly (especially that it prints the necessary commands on the bottom of the screen!). This even helps people who don't use it too often like myself(!).

Mohammad Akhlaghi <makhlaghi>
Project AdministratorIn charge of this item.
Thu 27 Aug 2020 07:56:40 PM UTC, comment #1: 

Nano as a default in 'basic.mk', and emacs and vim as opt-in options in high-level.mk seems reasonable to me.

However, we could also consider adding 'ed'. As a binary it's only 1/4 the size of nano:

$ ls -l /bin/nano /bin/ed
-rwxr-xr-x 1 root root  51552 Feb 20  2016 /bin/ed*
-rwxr-xr-x 1 root root 225320 Jan 11  2017 /bin/nano*

and the packed source code of ed is only about 10% of the size of nano:

-rw-r--r-- 1 boud boud    6800 Feb 20  2016 ed_1.10-2.1.diff.gz
-rw-r--r-- 1 boud boud   87416 Feb 25  2014 ed_1.10.orig.tar.gz
-rw-r--r-- 1 boud boud   27804 Jan 11  2017 nano_2.7.4-1.debian.tar.xz
-rw-r--r-- 1 boud boud 1013296 Jan 11  2017 nano_2.7.4.orig.tar.xz

I usually only do very elementary editing in ed , but it's convenient for those simple edits.

Boud Roukema <boud>
Project Member
Thu 27 Aug 2020 04:19:58 PM UTC, original submission:  

I just added GNU Nano as a Basic software and GNU Emacs as a high-level software in Commit df39c8d080d3 of the 'new-software' branch of project-dev.

Text editors are not directly related to the processing of the project, however as described in the commit message, they are critical during the processing of the project: when you move to another system that may not have an editor at all! In particular this is strongly felt with Docker images (when using a minimal OS like debian-slim), where you need to use './project shell', but don't have any editor there to edit files :-(!

Nano is very small (in total 3.5MB), so I put it in 'basic.mk' to be available in any project as a minimal/simple text editor. But even the minimal Emacs (that we build here!) is roughly 180MB, so it is only built if requested in 'high-level.mk'.

I am thinking that for example if someone uses Emacs, they can add it in 'TARGETS.conf' during development if they work on multiple systems, but upon publication, they can remove it from 'TARGETS.conf'.

Raul, maybe you can also add the 'vim' editor in 'high-level.mk'?  I tried to do it, but since I am not familiar with its features (to know which ones are not necessary to add extra dependencies). If we can build it with minimal dependencies (like Emacs, where I disabled almost everything extra!) it would be good ;-).

Once Vim is also included and tested on a few systems, we can merge this branch into Maneage. First I wanted to post this on
task #15698 (New or updated software). But text editors aren't analysis software, so I thought the discussion can follow independent of that general task here.

Please share your thoughts about adding text editors.

Mohammad Akhlaghi <makhlaghi>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mkhellat (Posted a comment)
  • -email is unavailable- added by infantesainz (Posted a comment)
  • -email is unavailable- added by boud (Posted a comment)
  • -email is unavailable- added by makhlaghi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-11 makhlaghi Assigned toNone => makhlaghi
        Open/ClosedOpen => Closed
    2020-08-28 boud Open/ClosedClosed => Open
    2020-08-28 makhlaghi Open/ClosedOpen => Closed
    2020-08-28 makhlaghi StatusIn Progress => Done
        Percent Complete80% => 100%

    Back to the top


    Powered by Savane 3.5