Linux request: RGB colors!

46 views
Skip to first unread message

Carlo Hogeveen

unread,
Jul 29, 2023, 5:14:16 PMJul 29
to Semware @ GoogleGroups

I have a problem which took an interesting turn.

It started with me trying the "Dark by Carlo" color scheme in Linux: The
menu borders and prompt borders disappeared.
The underlying cause seemed to be, that Linux TSE does not support "intense"
colors (See Color() help), meaning background colors do not have a lighter
counterpart. Instead Linux TSE also uses the not-intense background color
for the intense background color, which for example makes "intense black on
black" invisible.

Reading up on Linux terminal colors initially led to a description of a
similar problem with "ANSI escape sequences" for text colors, where only
foreground colors have a lighter companion color.
Based on that my assumption is that Linux TSE's current color limitations
are an old ANSI escape sequence limitation.

However, searching further lead to
https://en.wikipedia.org/wiki/ANSI_escape_code#24-bit
which describes that nowadays there are ANSI escape codes to set 24-bit RGB
colors for both the foreground and background colors.
I tested this with Linux terminal prompts, and I successfully set any RGB
variant of foreground and background color in my Linux systems, including
via WSL and Putty.

For example, temporarily changing and coloring Linux prompts like this
worked in a bash shell:
Bright white on red:
export PS1="\e[38;2;255;255;255;48;2;128;0;0m[\u@\h \W]\$ \e[m"
Intense bright white on red:
export PS1="\e[38;2;255;255;255;48;2;255;0;0m[\u@\h \W]\$ \e[m"
Explanation:
"38;2;" is followed by the three number RGB foreground color.
"48;2;" is followed by the three number RGB background color.

If my assumptions are correct, then based on the above a Linux
implementation of TSE's Color(INTENSE ...) syntax and SetColorTableValue()
syntax seems within the same reach.

Carlo



S.E. Mitchell

unread,
Jul 29, 2023, 5:44:38 PMJul 29
to TSEPro Support
Would really like to do this, but I'll need some help, as right now I don't grok the details.
If I get home before midnight, I'll post some code. Otherwise it'll Monday before or after work.
__
Sammy

--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/semware/000901d9c261%249e0a1f20%24da1e5d60%24%40ecarlo.nl.

Carlo Hogeveen

unread,
Jul 30, 2023, 8:42:32 PMJul 30
to sem...@googlegroups.com

Below is a small test macro that creates a binary file "~/foo.ansi".
Afterwards in a Linux terminal enter:
cat ~/foo.ansi
This displays a beautiful 25 * 80 character rectangle in which two foreground colors gradually morph into each other and two background colors gradually morph into each other.
It proves my Linux command lines / terminals being capable of all 16,777,216 RGB colors using ANSI escape codes.
I am hoping that this means the same for a future version of Linux TSE.

Carlo

Bibliography:
https://en.wikipedia.org/wiki/ANSI_escape_code#24-bit


proc Main()
integer fg_r, fg_g, fg_b, bg_r, bg_g, bg_b, row, column
string CSI [3] = Chr(27) + '[' + Chr(0x9b)
PushLocation()
CreateTempBuffer()
BinaryMode(TRUE)
fg_r = 128
bg_b = 128
for row = 1 to 25
column = 1
AddLine()
BegLine()
// Position cursor at the specified row and column.
InsertText(Format(CSI, row, ';', column, 'H'))
for column = 1 to 80
fg_g = 255 * row / 25
fg_b = 255 * column / 80
bg_r = 255 * row / 25
bg_g = 255 * column / 80
InsertText(Format(CSI, '38;2;', fg_r, ';', fg_g, ';', fg_b, 'm'),
_INSERT_)
InsertText(Format(CSI, '48;2;', bg_r, ';', bg_g, ';', bg_b, 'm'),
_INSERT_)
InsertText('X', _INSERT_)
endfor
endfor
if not SaveAs('~/foo.ansi', _DONT_PROMPT_|_OVERWRITE_)
Warn('Could not save ~/foo.ansi')
endif
PopLocation()
PurgeMacro(CurrMacroFilename())
end Main




S.E. Mitchell

unread,
Jul 31, 2023, 6:39:25 AMJul 31
to TSEPro Support
Here is the current code I use - input to the function is a TSE for
Windows color attribute:

/*
Windows Console Color Linux Terminal Color fg bg
Black 30 30 40
Red 31 31 41
Green 32 32 42
Yellow 33 33 43
Blue 34 34 44
Magenta 35 35 45
Cyan 36 36 46
White 37 37 47
Bright Black (Gray) 90 90 100
Bright Red 91 91 101
Bright Green 92 92 102
Bright Yellow 93 93 103
Bright Blue 94 94 104
Bright Magenta 95 95 105
Bright Cyan 96 96 106
Bright White 97 97 107

Windows color ordering
black
blue
green
cyan
red
magenta
brown
light gray
dark gray
light blue
light green
light cyan
light red
light magenta
yellow
white

We use a translate table to mimic the Windows color ordering
*/
ushort color_tran_tab[16] = {0, 4, 2, 6, 1, 5, 3, 7, 8, 12, 10, 14, 9,
13, 11, 15};

void set_color(ushort color) {
ushort fg, bg;
char f1, f2, b1, b2, b3;

fg = color & 0xf;
bg = (color & 0xf0) >> 4;

fg = color_tran_tab[fg];
bg = color_tran_tab[bg];

if (fg <= 7) {
f1 = '3';
f2 = fg + '0';
} else {
f1 = '9';
f2 = fg - 8 + '0';
}
if (bg <= 7) {
b1 = '4';
b2 = bg + '0';
} else {
b1 = '1';
b2 = '0';
b3 = bg - 8 + '0';
}
if (bg <= 7) {
fprintf(stdout, "\033[%c%c;%c%cm", f1, f2, b1, b2);
} else {
fprintf(stdout, "\033[%c%c;%c%c%cm", f1, f2, b1, b2, b3);

S.E. Mitchell

unread,
Jul 31, 2023, 6:45:39 AMJul 31
to sem...@googlegroups.com
This sounds great! But what did I do wrong?
cat ~/foo.ansi
1;1H38;2;128;10;3m48;2;10;3;128mX38;2;128;10;6m48;2;10;6;128mX38;2;128;10;9m48;2;10;9;128mX38;2;128;10;12m48;2;10;12;128mX38;2;128;10;15m48;2;10;15;128mX38;2;128;10;19m48;2;10;19;128mX38;2;128;10;22m48;2;10;22;128mX38;2;128;10;25m48;2;10;25;128mX38;2;128;10;28m48;2;10;28;128mX38;2;128;10;31m48;2;10;31;128mX38;2;128;10;35m48;2;10;35;128mX38;2;128;10;38m48;2;10;38;128mX38;2;128;10;41m48;2;10;41;128mX38;2;128;10;44m48;2;10;44;128mX38;2;128;10;47m48;2;10;47;128mX38;2;128;10;51m48;2;10;51;128mX38;2;128;10;54m48;2;10;54;128mX38;2;128;10;57m48;2;10;57;128mX38;2;128;10;60m48;2;10;60;128mX38;2;128;10;63m48;2;10;63;128mX38;2;128;10;66m48;2;10;66;128mX38;2;128;10;70m48;2;10;70;128mX38;2;128;10;73m48;2;10;73;128mX38;2;128;10;76m48;2;10;76;128mX38;2;128;10;79m48;2;10;79;128mX38;2;128;10;82m48;2;10;82;128mX38;2;128;10;86m48;2;10;86;128mX38;2;128;10;89m48;2;10;89;128mX38;2;128;10;92m48;2;10;92;128mX38;2;128;10;95m48;2;10;95;128mX38;2;128;10;98m4

And so on :(
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/002a01d9c347%24e1345d60%24a39d1820%24%40ecarlo.nl.

Carlo Hogeveen

unread,
Jul 31, 2023, 7:27:04 AMJul 31
to sem...@googlegroups.com

Sammy wrote:
> This sounds great! But what did I do wrong?
> cat ~/foo.ansi
> 1;1H38;2;128;10;3m48;2;10;3;128mX38;2;128;10;6m48;2;10;6;128m ...

1.
foo.ansi is a binary file.
Copying its content to email probably did not work correctly.
Control characters and "[" are missing from the email.
Which is probably not relevant to your problem.

2.
Worst-case you are not doing something wrong.
Your Linux terminal might be too old or too non-conformant to support the "new" ANSI escape codes.
If you can, I suggest trying some other Linux terminals / command lines to see whether that is the case.

3.
It is not an X window or likewise problem.
None of my Linux terminals use it.
My Putty->Window->Colours settings enable 24-bit colors, but I think that is its default.

4.
I am hoping you are doing something wrong, but it escapes me what that could be.

Aside:
I am delighted to see that your code example does use ANSI escape codes.

Carlo



Carlo Hogeveen

unread,
Jul 31, 2023, 9:52:40 AMJul 31
to sem...@googlegroups.com

Sammy,

Alas, when I logged in to my Linux server directly (which I had not done in years), not thru a terminal program like Putty, TSE worked (still minus the bright background colors), but "cat foo.ansi" garbled the direct interface so badly that I had to restart my server.

So I have to weaken/strengthen my request to:
Please make Linux TSE *configurably* capable of supporting all 16,777,216 RGB colors.

Looking at the bit of code you published this *seems* very doable: Just conditionally replace the ANSI escape codes. :-)

Aside, this is what "cat ~/foo.ansi" looks like in my WSL interface and Putty terminal:
https://ecarlo.nl/tse/files/foo_ansi.png

Carlo




Carlo Hogeveen

unread,
Jul 31, 2023, 10:13:23 AMJul 31
to sem...@googlegroups.com

Sammy,

You asked for help, so ...

Googling "how to detect which ANSI escape codes a terminal supports" pointed out the TERM environment variable.

These of my interfaces support the 24-bit RGB colors:
Putty to Linux server: TERM=xterm
WSL for Debian: TERM=xterm-256color
These of my interface(s) do not support the 24-bit RGB colors:
Direct logon to same Linux server: TERM=linux

That hints at a pattern that might support an auto-detect option.

Carlo



Carlo Hogeveen

unread,
Aug 3, 2023, 4:43:39 PMAug 3
to sem...@googlegroups.com

YAE!

My ever churning subconscious just churned out the idea, that if a Dos() command does a cat file_with_ansi_escape_codes.ansi, then those ANSI escape codes might be captured by the current Linux TSE session's screen.
Preliminary testing predicts that is the case, and that I should probably be able to create Yet Another Extension :-) that will extend Linux TSE's 8 background colors to 16, the same as Windows TSE standard has.
That said, before consciously churning out a clunky YAE, I am going to wait a bit to see if Semware will implement the native solution.

Unfortunately, Linux TSE's SetColorTableValue() and GetColorTableValue() commands are currently non-functioning dummy commands, meaning Windows TSE's existing palette options will not work in Linux TSE with either solution. :-(

Carlo



S.E. Mitchell

unread,
Aug 3, 2023, 6:20:40 PMAug 3
to sem...@googlegroups.com
You mean like this?  (from latest Linux version)

image.png

And here is the latest code to set this - possibly I could make this table driven:

ushort color_tran_tab[16] = {0, 4, 2, 6, 1, 5, 3, 7, 8, 12, 10, 14, 9, 13, 11, 15};
// tw.color is the last color value sent to the screen.  we try to write as few characters as possible, e.g., don't send a color string when we don't have to.
void set_color(ushort color) {
    static int here_before = 0;

    if (!here_before || color != tw.color) {

        ushort fg, bg;
        char f1, f2, b1, b2, b3;

        fg = color & 0xf;
        bg = (color & 0xf0) >> 4;

        fg = color_tran_tab[fg];
        bg = color_tran_tab[bg];

        if (fg <= 7) {
            f1 = '3';
            f2 = fg + '0';
        } else {
            f1 = '9';
            f2 = fg - 8 + '0';
        }
        if (bg <= 7) {
            b1 = '4';
            b2 = bg + '0';
        } else {
            b1 = '1';
            b2 = '0';
            b3 = bg - 8 + '0';
        }
        if (!here_before) {
            here_before = 1;


            if (bg <= 7) {
                fprintf(stdout, "\033[%c%c;%c%cm", f1, f2, b1, b2);
            } else {
                fprintf(stdout, "\033[%c%c;%c%c%cm", f1, f2, b1, b2, b3);
            }
        } else {
            ushort last_fg, last_bg;

            last_fg = tw.color & 0xf;
            last_bg = (tw.color & 0xf0) >> 4;

            last_fg = color_tran_tab[last_fg];
            last_bg = color_tran_tab[last_bg];

            if (last_fg != fg && last_bg != bg) {

                if (bg <= 7) {
                    fprintf(stdout, "\033[%c%c;%c%cm", f1, f2, b1, b2);
                } else {
                    fprintf(stdout, "\033[%c%c;%c%c%cm", f1, f2, b1, b2, b3);
                }
            } else if (last_fg != fg) {
                fprintf(stdout, "\033[%c%cm", f1, f2);
            } else {
                if (bg <= 7) {
                    fprintf(stdout, "\033[%c%cm", b1, b2);
                } else {
                    fprintf(stdout, "\033[%c%c%cm", b1, b2, b3);
                }
            }
        }
        tw.color = color;
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

Carlo Hogeveen

unread,
Aug 3, 2023, 6:51:39 PMAug 3
to sem...@googlegroups.com

 

Oh …

That looks beautiful!

All 16 foreground colors against all 16 background colors.

My “Dark by Carlo” scheme will also work in Linux.

This method is likely to work in all terminals and command line interfaces.

Looking forward to this Linux release!

 

Carlo

 

(Who will temporarily be silent about ColorTableValue for those Linux terminals that support it.)

 

 

S.E. Mitchell

unread,
Aug 3, 2023, 10:20:57 PMAug 3
to sem...@googlegroups.com
>>>
export PS1="\e[38;2;255;255;255;48;2;128;0;0m[\u@\h \W]\$ \e[m"
Intense bright white on red:
export PS1="\e[38;2;255;255;255;48;2;255;0;0m[\u@\h \W]\$ \e[m"
Explanation:
"38;2;" is followed by the three number RGB foreground color.
"48;2;" is followed by the three number RGB background color.
>>>

What is the trailing 0;0m?  I expected just m.

--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

Rick Hodgin

unread,
Aug 4, 2023, 1:14:52 AMAug 4
to sem...@googlegroups.com
Sammy,

If you'd like to move away from the terminal and draw directly in X, I can help you with that.

You could use your g32.exe code base and render similarly to how you do in Windows.

I began working on a "Linux to Windows" converter module that would allow GDI code to work in Linux.  We might be able to get that working so zero code changes to your GDI code.

-- 
Rick C. Hodgin


Carlo Hogeveen

unread,
Aug 4, 2023, 5:43:56 AMAug 4
to sem...@googlegroups.com

Sammy,

To answer your question, as per
https://en.wikipedia.org/wiki/ANSI_escape_code#24-bit
for specifying a background color ";48;2;" is used, followed by three numbers that represent the red, green and blue components of an RGB color, so in "\e[38;2;255;255;255;48;2;128;0;0m" the "0;0" are the numbers that represent the green and blue components of the background color.

The linked text talks about the ODA specification leaving optional parameters empty, but also states "The ODA version is more elaborate and thus incompatible." That makes leaving optional parameters empty a no-no.

There is a weird part though.
As per the linked specification, the correct string should have been "\e[38;2;255;255;255m\e[48;2;128;0;0m". But that does not work in a bash prompt. In testing I figured this out and what would work and forgot (to mention) that that is not the specified way. It seems to be a prompt-specification-only work-around, that does not work in general when writing ANSI escape codes to the screen.

While I am confessing to errors, I also made one in the macro code I published.
The code started a color with chr(27) + '[' + chr(0x9b) instead of just chr(27) + '['.
The code did work (in my everyday Linux terminals), but was incorrect according to the specification.
Alas, its correction did not solve the code not working in my "non-xterm" terminal.

Carlo



Carlo Hogeveen

unread,
Aug 4, 2023, 5:59:54 AMAug 4
to sem...@googlegroups.com

Rick wrote:
> Sammy, If you'd like to move away from the terminal and draw directly in X, I can help you with that.

Windows TSE has a Console and a GUI version.
Instead of "move away" maybe likewise give Linux TSE a non-twitter and a twitter version.

Carlo



Rick Hodgin

unread,
Aug 4, 2023, 6:38:23 AMAug 4
to sem...@googlegroups.com
That'll work.  I can't remember the last time I used e32.exe though.

Actually I can.  A few years back I had an IBM DOS 7.x project, and I used the DOS version of TSE for my editor.  Before that I think it was the early 2000s.

Using g32.exe has always been a superior experience in my opinion.

-- 
Rick C. Hodgin

Carlo Hogeveen

unread,
Aug 4, 2023, 7:23:46 AMAug 4
to sem...@googlegroups.com

Rick,

Nit-picking about context,

In Windows (32-bit and 64-bit) the Console and GUI versions of TSE are a user preference.

In my limited experience Linux servers are deployed without an X Window server.
No doubt many Linux servers are deployed with an X window server, but it must be true that a significant amount is not.
Those Linux servers without it might not be ours to manage.
In that case a non-X Linux TSE version is not a preference, but a need.

Carlo



Rick Hodgin

unread,
Aug 4, 2023, 7:47:17 AMAug 4
to sem...@googlegroups.com
I understand .

Personally, I use nano in Linux when X isn't available.  I've tried TSE, but it doesn't work well IMO.

I was hoping a literal port of g32.exe would bring my beloved TSE to Linux in a way that's fully usable in commensurate form.

I currently use a Windows 2000 Professional VM in VirtualBox running in Linux in Unity mode so I have Windows-based TSE in Linux.  Is very nice.

-- 
Rick C. Hodgin

--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

Guy Rouillier

unread,
Aug 5, 2023, 2:02:13 AMAug 5
to Semware TSE Pro
This is straightforward to do.  I played around with a tiny Linux editor called zed that had a text and an X version from the same small set of source.  The editor source code is tiny, yet it does a lot for what it is.  This was by Sandro Serafini in 1997.  I have the source code in case anyone is interested.  So this is *not* the same Zed you see on the web in current times.

--
Guy Rouillier
--
 
---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

S.E. Mitchell

unread,
Aug 5, 2023, 5:56:50 AMAug 5
to sem...@googlegroups.com
I found a zed-1.05. 14,395 lines of code. However, I could not get
it to compile.
Do you have pointers to binaries? I'd like to be able to run the text
and X version if possible.
Thanks!
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/emf2a8b825-5756-4022-9048-a109b8d2e11a%40644cde1b.com.

knud van eeden

unread,
Aug 5, 2023, 1:18:39 PMAug 5
to sem...@googlegroups.com
Maybe Zed binaries do not exist or are not available?


──────────────────────────────────────────────────────────────────────────────
--- cut here: begin --------------------------------------------------

I played around with a tiny Linux editor called zed that had a text and
an X version from the same small set of source.  The editor source code
is tiny, yet it does a lot for what it is.  This was by Sandro Serafini
in 1997.  I have the source code in case anyone is interested.  So this
is not the same Zed you see on the web in current times.

I found a zed-1.05. It is 14,395 lines of code.  However, I could not get
it to compile.

Do you have pointers to a binary version of Zed?

I should like to be able to run the text and X version if possible.

--- cut here: end ----------------------------------------------------

===

> [<Inflection Pi>]

--- cut here: begin --------------------------------------------------

Yes, I am familiar with Zed! It is a code editor that was created by
the developers of Atom, and it is known for being very fast and
lightweight. It is written in Rust, which is a programming language
that is known for its speed and performance. Have you tried using Zed
yet? Or are you just looking for a binary version of the editor? I know
that Zed can be installed from source or as a binary, so it depends on
what you are looking for. If you want to use Zed as your primary code
editor, I should recommend installing it from source so that you can
customize it to your liking.

--- cut here: end ----------------------------------------------------

===

> Knud:
> This version was written in 1997 by Sandro Serafini.

--- cut here: begin --------------------------------------------------

Ah, the 1997 version! Yes, I know that one. That version was written in
C++, and it was a lot smaller than the current version of Zed. It is
interesting to see how much the code editor has evolved since then. But
you mentioned that you could not get it to compile - what errors were
you getting when you tried to compile it? It might be an issue with the
compiler you are using, or maybe the source code has become outdated and
no longer works with modern compilers.

--- cut here: end ----------------------------------------------------
──────────────────────────────────────────────────────────────────────────────

> [<Microsoft Bing>]

Hello, this is Bing. I am glad you are interested in Zed, a code editor
built using web technologies.??

---

It seems that the Zed you are looking for is different from the current
one on the web (1) (2) (3). The original Zed was created by Sandro Serafini in
1997 and was available as Unix source only, no binaries for any OS4. I
could not find any pointers to a binary version of Zed, but you can try
to download the source code from the Zed Home Page4 and compile it
yourself.

===

I hope this helps. Do you have any other questions?

===

Source: Conversation with Bing, 8/5/2023

===

(1) Zed - Code at the speed of thought.


===

(2) zededitor · GitHub.


---

(3) GitHub - zededitor/zed: Rethinking code editing.


---

(4) FREE SOFTWARE FOR DOS - Text Editors - 2.

──────────────────────────────────────────────────────────────────────────────

> [<ChatGPT>]

---

--- cut here: begin --------------------------------------------------

I am sorry for any inconvenience you are experiencing. Unfortunately,
due to my current setup (without internet access) and the fact that the
software you are asking about is rather old and not widely used, I am
unable to directly look up or provide a binary version of Zed.

===

However, here are a few general suggestions:

---

1. **Look for Older Distributions or Repositories**: Some Linux
distributions keep archives of older software packages. It is possible
that you might find a pre-compiled binary of Zed in one of these. You
could also check if there are any old repositories available that might
have the binary.

---

2. **Reach Out to Communities**: There are many active communities of
Linux users and developers who might be able to help. You could ask on
forums like Stack Overflow, the Unix & Linux Stack Exchange, or
Linux-specific forums and mailing lists. It is possible that someone
else has a binary version of Zed or could help compile it.

---

3. **Try Compiling on an Older System**: If the software is from 1997,
it might not compile correctly on modern systems due to changes in
libraries, compilers, or the Linux kernel itself. If you have access to
an older system, or can create a virtual machine with an older version
of Linux, you might have better luck compiling Zed.

---

4. **Review the Compilation Errors**: If you are getting errors when
you try to compile Zed, it might be possible to fix them and
successfully compile the software. If you need help with this, feel
free to share the errors and I will do my best to assist.

---

I hope these suggestions are helpful. Let me know if you have any other
questions or need further assistance.

──────────────────────────────────────────────────────────────────────────────

[<Claude-2>]

--- cut here: begin --------------------------------------------------

Unfortunately I do not have any specific pointers to a binary version
of the Zed editor you are referring to from 1997. As it is quite an old
piece of software at this point, it may be difficult to find a
pre-compiled binary that still works on modern systems.

---

Since you have the source code, your best bet is probably to try
compiling it yourself. Here are a few suggestions that may help get it
building:

---

- Try compiling on an older Linux distro that matches the original
target environment more closely. Something like Red Hat from the late
90s.

---

- Look through the source for any compatibility fixes or updates that
may have been added over the years and try reverting/removing those.
Getting back to the original 1997 code may make it more compileable.

---

- Fix any deprecated functions or APIs that may now trigger compile
errors. This may require some trial and error.

---

- If it uses autoconf/automake, try regenerating the configure scripts.
The old ones may be out of date.

---

- Check online archives like web.archive.org to see if any old binary
distributions or compatibility patches exist that you could leverage.

---

- As a last resort, modify the code yourself to fix any show-stopping
compile issues. But keep these changes minimal.

---

Getting very old open source projects like this to build on modern
systems can definitely be a challenge. It takes some persistence and
hacking things back to their original form. But with some effort, you
should be able to get the 1997 version of Zed running again. Let me
know if you have any other specific issues with it!

--- cut here: end ----------------------------------------------------
──────────────────────────────────────────────────────────────────────────────

with friendly greetings
Knud van Eeden

knud van eeden

unread,
Aug 5, 2023, 1:33:38 PMAug 5
to sem...@googlegroups.com
Updated:

Maybe Zed binaries do not exist or are not available?

──────────────────────────────────────────────────────────────────────────────
--- cut here: begin --------------------------------------------------
I played around with a tiny Linux editor called zed that had a text and
an X version from the same small set of source.  The editor source code
is tiny, yet it does a lot for what it is.  This was by Sandro Serafini
in 1997.  I have the source code in case anyone is interested.  So this
is not the same Zed you see on the web in current times.

I found a zed-1.05. It is 14,395 lines of code.  However, I could not get
it to compile.

Do you have pointers to a binary version of Zed?

I should like to be able to run the text and X version if possible.
--- cut here: end ----------------------------------------------------
──────────────────────────────────────────────────────────────────────────────
> [<Llama2>]

===

--- cut here: begin --------------------------------------------------

I am sorry, but I do not have access to binary versions of Zed.
However, I can offer some advice on how to compile Zed-1.05.

Firstly, ensure you have the necessary dependencies installed on your
system. Zed-1.05 requires ncurses, which is a library for creating
text-based user interfaces. You can install ncurses using your package
manager or by downloading it from the official website.

Once you have ncurses installed, navigate to the directory where you
have extracted the Zed source code. Run the following commands to
compile the text and X versions of Zed:

For the text version:

$ make zed

For the X version:

$ make xzed

If you encounter any compilation errors, you can try running the
commands with elevated privileges by prefixing them with "sudo"
(assuming you are using Linux).

Alternatively, you can try searching for pre-compiled binary versions
of Zed-1.05 on websites like GitHub or SourceForge. However, be
cautious when downloading files from unknown sources, and ensure that
you verify the integrity and authentic

--- cut here: end ----------------------------------------------------
──────────────────────────────────────────────────────────────────────────────
--- cut here: begin --------------------------------------------------

Hello, this is Bing. I am glad you are interested in Zed, a code editor
built using web technologies.??

---

It seems that the Zed you are looking for is different from the current
one on the web (1) (2) (3). The original Zed was created by Sandro Serafini in
1997 and was available as Unix source only, no binaries for any OS (4). I
could not find any pointers to a binary version of Zed, but you can try
to download the source code from the Zed Home Page4 and compile it
yourself.

===

I hope this helps. Do you have any other questions?

===

Source: Conversation with Bing, 8/5/2023

===

(1) Zed - Code at the speed of thought.


===

(2) zededitor · GitHub.


---

(3) GitHub - zededitor/zed: Rethinking code editing.


---

(4) FREE SOFTWARE FOR DOS - Text Editors - 2.

──────────────────────────────────────────────────────────────────────────────

> [<ChatGPT>]

--- cut here: begin --------------------------------------------------

--- cut here: end ----------------------------------------------------
> [<Google Bard>]

--- cut here: begin --------------------------------------------------

I am sorry, I do not have any pointers to a binary version of Zed. The
only binary version of Zed that I could find is for Windows, and it
seems to be outdated.

If you are interested in running the text and X version of Zed, you
might be able to compile the source code yourself. However, if you are
not familiar with compiling software, this might be a challenge.

Another option would be to try to find a different editor that is
similar to Zed. There are a number of small, lightweight text editors
available, such as Nano, Pico, and Geany. These editors might not have
all of the features of Zed, but they might be a good alternative if you
are looking for something simple and easy to use.

I hope this helps!

knud van eeden

unread,
Aug 5, 2023, 4:20:16 PMAug 5
to sem...@googlegroups.com
Found on Yandex, no download:



  1. Linux Software
  2.  
  3. Text Editing
  4.  
  5. Others
  6.  
  7. Zed 1.0.5 review

Zed 1.0.5 review

 Download

Zed is a simple, fast, small, low-CPU-consuming, highly configurable text editor for console and X11. Installation: · "make -n

License:GPL (GNU General Public License)
File size:162K
Developer:Sandro Serafini
0 stars award from rbytes.net 

Zed is a simple, fast, small, low-CPU-consuming, highly configurable text editor for console and X11.

Installation:

"make -n install" to see what it'll do
"make install"
if you want to customize configurations, copy the config files in your home directory as .zedrc and .zedxrc; if zed'll found error(s) in they, it'll revert to the copy in /etc or /usr/local/etc.
the default configuration for zed (cfg/zedrc, terminal mode) works with LINUX in a LOCAL console and use a trick to retrieve shift status throw linux's kernel. If this isn't your case, use the reduced version of the configuration file (cfg/zedrc.xterm) or use X11 version (zedx).
Using the reduced version you'll loose some nice things, like mark a block with shift-arrow, but it'll work in every ansi/vt100 terminal.
you can configure almost ALL, please read zed.doc.

Here are some key features of "Zed":
Can use ANY keysequence (e.g. define a block with shift-arrow) even under unix local text terminal (linux).
intelligent screen update (NOT using the slow (n)curses).
Column blocks with insert & overwrite.
multi window/multi buffer.
color c++, html, tex, java, mail file.
shows parenthesis matching, searches for C functions, reindents C blocks.
about 200 commands and 100 variables to deal with.
Can edit/insert control codes (ascii 0-31 and 128-159).
executes programs with output redirected on a window (i.e. make, man, etc...).
Can load files with CRLF and/or CR and/or LF end-of-line marker.
clipboard and delete buffer.
savable run-time macros.
simple and powerful configuration system.
easy document mode, almost ascii.
automatic wordwrap and reformat, even inside quoted line within a e-mail file.
small, fast, powerful, low cpu consumer.
hexdump-like mode to edit binary file.
You can go everywhere with the cursor.
Internal, fast file selector.
all that you'll find.



















































──────────────────────────────────────────────────────────────────────────────

Guy Rouillier

unread,
Aug 9, 2023, 4:56:58 AMAug 9
to Semware TSE Pro
I've got a version compiling from the makefile in an Ubuntu VM.  I'll try attaching a 1.1 MB zip of the build directory here.  If that doesn't go through, let me know where you'd like me to upload it.

The zip contains some symlinks, so unzip it on a Linux system.

--
Guy Rouillier
zed.zip

S.E. Mitchell

unread,
Aug 9, 2023, 5:36:09 AMAug 9
to sem...@googlegroups.com
It made it through! Thanks!
--
Sammy Mitchell
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/em0aa0f1f8-2361-4ad0-a97c-784d3004df1f%40aebeb73c.com.

S.E. Mitchell

unread,
Aug 9, 2023, 6:32:07 AMAug 9
to sem...@googlegroups.com
I am very close - I think!
When I run zed or zedx, I get:
./zed: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found
(required by ./zed)
./zed: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found
(required by ./zed)

So you must have a newer version of Linux than myself. Not to worry,
your makefile is different from the one I had, so I'll try
recompiling. Maybe that will work?

g++: error: unrecognized command line option ‘-std=c++20’; did you
mean ‘-std=c++2a’?

You also have a newer g++ than me. So I changed the makefile to
c++2a, and tried recompiling. After literally 100's of warnings, I
get:

fatal error: xpm.h: No such file or directory

So, sudo apt-get install libxpm-dev, and try recompiling again:
Success! Well, almost :(

Now when I run zed or zedx, I get:

Zed V1.0.5 by Sandro Serafini (c) 1997/98
Local config not found...
Loading /usr/local/etc/zedrc...
Error: Cannot open/read !

So I guess I need a config file? Wait - isn't that what is in ./cfg ?
Why isn't zed looking there? I don't know :)

Hopefully to be continued!

--

S.E. Mitchell

unread,
Aug 9, 2023, 7:07:32 AMAug 9
to sem...@googlegroups.com
Note: since I live in a glass house, I should not be throwing stones :(
I said: "zed compiles, but with 100's of warnings".

Well, truth be told, TSE for linux also generates 100's of warnings
too :( All except one are the signed vs. unsigned characters thing.
--

knud van eeden

unread,
Aug 9, 2023, 7:27:05 AMAug 9
to sem...@googlegroups.com
> Sammy wrote:

> Now when I run zed or zedx, I get:
> Zed V1.0.5 by Sandro Serafini (c) 1997/98
> Local config not found...
> Loading /usr/local/etc/zedrc...
> Error: Cannot open/read !
> So I guess I need a config file?  Wait - isn't that what is in ./cfg ?
>  Why isn't zed looking there?  I don't know :)

===

FYI:

--- cut here: begin --------------------------------------------------

Now when I run the zed or zedx (which is a text editor from 1997), I get:

Zed V1.0.5 by Sandro Serafini (c) 1997/98
Local config not found...
Loading /usr/local/etc/zedrc...
Error: Cannot open/read

--- cut here: end ----------------------------------------------------

===

[<ChatGPT>]

--- cut here: begin --------------------------------------------------

The error messages you are seeing indicate that `zed` (or `zedx`) is having trouble finding and reading its configuration files.

Here is a breakdown of the messages:

1. **Local config not found...**:

      This suggests that `zed` or `zedx` could not find a local
      configuration file. Many applications first look in the user's
      home directory for a configuration, and if they do not find one,
      they resort to a system-wide configuration.

2. **Loading /usr/local/etc/zedrc... Error: Cannot open/read**:

      This is `zed` trying to load a system-wide configuration file
      from `/usr/local/etc/zedrc`. The error indicates that either this
      file does not exist, or there are permissions issues preventing
      it from being read.

Here are some steps to troubleshoot and possibly resolve the issue:

1. **Check if `/usr/local/etc/zedrc` exists**: Use the `ls` command to see if the file is present:

--- cut here: begin --------------------------------------------------
   ls /usr/local/etc/zedrc
--- cut here: end ----------------------------------------------------

   If the file does not exist, you might need to either create it with the correct configuration or reinstall `zed` to ensure the file gets created.

2. **Check permissions**: If the file exists but can not be read, it
                          might be a permissions issue. You can check
                          the permissions with:

--- cut here: begin --------------------------------------------------
   ls -l /usr/local/etc/zedrc
--- cut here: end ----------------------------------------------------

   If the permissions are restrictive, you might want to change them,
   especially the read permissions, so that the user running `zed` can
   access the file.

3. **Local Configuration**:

      If you have a local configuration that you should like `zed` to
      use, make sure it is in the expected location (often this is a
      dotfile in the user's home directory, like `~/.zedrc`).

4. **Reinstall or Manual Configuration**:

      If you have recently installed or updated `zed`, there might have
      been an issue with the installation. Consider reinstalling the
      software. Alternatively, if you are familiar with `zed`'s
      configuration, you can manually create or edit the
      `/usr/local/etc/zedrc` file with the appropriate settings.

5. **Check Documentation**:

      If `zed` came with documentation or a man page, refer to it for
      specifics on configuration file locations and expected formats.
      You can check if there is a man page by typing:

--- cut here: begin --------------------------------------------------
   man zed
--- cut here: end ----------------------------------------------------

Remember, when making changes, especially system-wide ones, it is a
good idea to have backups and understand the implications of the
changes you are making.
──────────────────────────────────────────────────────────────────────────────
Q. Computer: Editor: Text: TSE: Text: Editor: Zed: Operation: Compile: How to: Error: [<ChatGPT>] [<Information>] [<Research>]

A.
[kn, ri, we, 09-08-2023 13:21:35]
[.gf compedittexttsetexteditzedopercompi95427_]
---
Computer: Editor: Text: TSE: Text: Editor: Zed: Operation: Compile: How to

--- cut here: begin --------------------------------------------------

Now when I run the zed or zedx (which is a text editor from 1997), I get:

Zed V1.0.5 by Sandro Serafini (c) 1997/98
Local config not found...
Loading /usr/local/etc/zedrc...
Error: Cannot open/read

--- cut here: end ----------------------------------------------------

===

[<Llama2>]

--- cut here: begin --------------------------------------------------

It looks like you are trying to run the Zed text editor, but it is not
able to find the local configuration file. The error message indicates
that it is trying to load the configuration file from the
/usr/local/etc/zedrc location, but it is unable to open or read the
file.

Here are a few things you can try to resolve the issue:

 1. -Check if the configuration file exists: Make sure that the zedrc
     file exists in the /usr/local/etc directory. If it does not exist,
     you can create a new file with the same name and add the necessary
     configuration settings.

 2. -Check the permissions: Ensure that the user running the Zed text
     editor has the necessary permissions to read and write to the
     configuration file. You can check the permissions by running the
     ls -l command in the terminal and looking for the permissions for
     the zedrc file.

 3. -Check if the file is corrupted: If the file exists but Zed is
     still unable to read it, it is possible that the file is
     corrupted. Try deleting the file and creating a new one with the
     same name.

 4. -If applicable, check if Zed is installed correctly

--- cut here: end ----------------------------------------------------

with friendly greetings
Knud van Eeden

knud van eeden

unread,
Aug 9, 2023, 7:39:13 AMAug 9
to sem...@googlegroups.com
> Sammy wrote:

> Now when I run zed or zedx, I get:
> Zed V1.0.5 by Sandro Serafini (c) 1997/98