The CUTE Journey

Every now and then you will find yourself needing to install a really old Ubuntu version. I stumbled into this with CUTE and Scintilla. You see, the RedDiamond project really needs to jump ship from QPlainTextEdit. The syntax highlighting available in that module is horribly inefficient. If you never have more than a couple thousand lines in your source file and you don’t have multiple source files of that size, you can probably continue on fat, dumb, and happy with it. Life sucks if you routinely have source files tipping the scales at 5K lines or more. This makes for a long load time. Even the creator of Featherpad is starting to have updates tweaking the syntax highlighting because he too is using that class and the class is more of a student project than a robust editing widget.

Thankfully Scintilla is out there. Sadly, nobody had yet ported it to CopperSpice. I have a port but I haven’t had time to work on the new editor version so I cannot say for certain my port works. The Qt port that is part of Scintilla relies on a somewhat dangerous thing. It is relying on every character either being one byte or starting with some multi-byte indicator value making it a two byte character. I’m sure it works in America, just look at all of the editors using Scintilla and Qt.

QString in Qt is very different from what CopperSpice has implemented. I got pulled away from my coding helping out on the family farm and by life in general. I coded what I thought was going to work quite a while back. CopperSpice string changes made it sound like the existing QByteArray logic used by the Qt version wasn’t going to work. Internally CopperSpice uses QChar32 while internally Qt uses QChar which stores UTF-16.

At any rate, when I return to coding I will find out if my modifications were correct or if I need to force a UTF-16 QByteArray and use the previous logic. If I understood the logic correctly, UTF-16 cannot store all Unicode values in two bytes. CopperSpice chose QChar32 (wasting a bit of RAM) to embrace a wider Unicode set. This means the unofficial packages found in this post will be the last ones using QPlainTextEdit.

Research and Background

Make no mistake, there are hundreds of editors out there using Scintilla. The FOX Toolkit even includes one using a port of Scintilla for that GUI library. (The FOX Toolkit is worth kicking the tires on if you don’t need all of the bloat of Qt. It also doesn’t really push the C++ compiler which is why the toolkit works on so many systems.) I’ve known about Juffed for quite a while. Scintilla itself comes with Scite. Most everybody who does any serious programming on the x86 platform has heard of Notepadqq as well. A very robust free (as in beer) editor that doesn’t have the Microsoft tracking code.

The Internet is evil.

Burn that though into your brain. The Internet is evil. I got sucked into a all-of-my-free-time-and-then-some black hole because of one link. Once an editor was created using Scintilla it got added to that list and never removed. I glanced at several. One looked particularly interesting, and that one was CUTE.

CUTE text editor screenshot

I scraped that screenshot from this site. The screenshots had a Windows 95 era look to them but I wasn’t letting that bother me. There wasn’t a lot of code in the repo so it would be a good tire kicker getting started with Scintilla. (Yes, I was going to look at Scite code as well!)

There is a lesson for those who read on

There were things I added to RedDiamond I wanted to keep. There were things that started in Diamond and I was going to throw out. There were more features I wanted to add.

Above all, since I was going to use Scintilla as the editing core, I wanted to look at a lot of OpenSource editors for how-to ideas and features that might be worth adding to RedDiamond. I wanted to finally create the editor I had wanted my entire PC working career. I didn’t want a “general” text editor that got tabs wrong. I wanted a programmer’s text editor that got tabs correct, had EDT keypad navigation and a host of other features.

In short people, I wanted to make RedDiamond a kick-ass editor that would remain stable because it would not allow plug-ins. Admit it. You’ve all installed a plug-in for an editor and had it bust other things. Sometimes it busts the entire editor. Script-kiddies cutting their first programming teeth tend to write those things and they don’t know how to test. Worse yet, they suffer from “Oh, I’ll write my own” way more than us old people. That’s why between ELPA and MELPA Emacs has sooo many near-duplicate packages. Some might even be 100% duplicate, just written by someone else and placed in “the other” package library because someone didn’t bother to search both before writing.

One outright fantasy, would be if the final editor could not only get tabs correct, but could handle all/most legal COBOL source formats. Click the link for editors that got tabs wrong and read. Some time around COBOL-85 the source format dropped the line number/card format requirement. The drug induced hallucination would then be to extend that functionality to support BASIC line-number-era formatting and the no line required later. Same with FORTRAN and a few other languages. Before you go thinking that to be rather kooky, keep in mind PowerBasic created PBEdit with Scintilla. Sadly it isn’t OpenSource to look at.

I don’t care if you think those languages are old and obsolete. I want this to be the editor I’ve always wanted on the PC. There are thousands (possibly millions) of text editors out there and they all have things that suck about them. I want this editor to not have a sucky part.

Once it is close to perfect I can use it to create an IDE for CopperSpice. I’m old and want to retire so that IDE won’t be free, just the editor.

What’s the Lesson?

Never fixate on a “make it work today” project just because you have some time on your hands.

If you haven’t done that to yourself, you haven’t worked in IT long enough. I knew my brother wanted help with planting season and it was coming up fast. I knew there were other family obligations coming up. But “today,” whenever today was, I had the time. This seemed like a fun and interesting little challenge.

Pay somebody to slap you really hard when you start thinking like that.

The other lesson I’m saving until the very end.

Last Update 2013 and That was to Package Binaries

I saw that on SourceForge and didn’t care. Today I had time. Today I could play with trying to get this to build/run under Ubuntu 20.04 LTS. If that didn’t work, I was certain I could find a Ubuntu 12.04 LTS ISO to install in a VM.

Gotta say, I’ve been warned about thinking before. Doesn’t lead to good outcomes for me. This was no different. The little Gnome was cackling in the back of my mind. It really enjoys my enduring pointless frustration. That Gnome even helps me ignore obvious things like the fact this was written using Python 2 and the name of the missing library methods reminds me of something I can’t quite put my finger on.

qextscintilla.h – Why Does That Sound Familiar?

The Gnome kept stepping on this thought every time it popped up. I got most of the build to “work” using modern stuff once I installed Python and Qt development in a Ubuntu 20.04 LTS VM. I searched and I searched. There was something familiar about that file name. It had to be in one of the development package libraries.

Keep in mind I’m currently ignoring all of the other Scintilla based text editors that would actually compile because they are currently maintained. I want to get this one to work. The little Gnome is whispering “You can’t throw in the towel now. What will you do with the rest of your day? Are you really going to let a little program like this defeat you?”

It knows (gnows?) how to push my buttons.

Fine! I’ll set up a 12.04 LTS VM! Note, the setting up sections to follow are for

Setting up a Ubuntu 12.04 LTS VM in 2021

This part is only useful for those who want to set up 12.04 LTS in a VM today. I will be installing things that “should” have built CUTE.

Download Ubuntu 12.04 LTS release from here. Install into a VM.

sudo apt-get install build-essential
sudo apt-get install synaptic

Install all updates and if you are using Virtualbox, install the Guest Additions. This may require several reboots.

Reboot before proceeding.

sudo apt-get install subversion
sudo apt-get install python-dev   # this installs 2.7
sudo apt-get install jed jed-extra
sudo apt-get install qtcreator
sudo apt-get install libshiboken-dev
sudo apt-get install shiboken
sudo apt-get install pyqt-tools python-qt-dev
sudo apt-get install pyside-tools python-pyside.qtgui python-pyside.qtuitools python-pyside.qtxml
sudo apt-get install libpyside-dev
sudo apt-get install qt3-dev-tools libqt3-headers qt3-apps-dev python-qt3 libqt3-mt-dev
sudo apt-get install gnutls-bin libqt3-i18n python-qt3-gl
sudo apt-get install qt3-dev-tools-compat libfxscintilla-dev

Download and install version 2.10.0 of qscintilla from Riverbank Computering.

mkdir Projects
cd Projects
svn checkout https://svn.code.sf.net/p/cute/svn/trunk cute-svn
cd cute-svn/CUTE
jed configure.sh

Copy python 2.4 logic to make 2.7 in both places where 2.4 appears. You should have two sections in configure.sh looking much like the following:

elif test -f $withval/include/python2.4/Python.h; then
      PYTHON_INCDIR=$withval/include/python2.4
      PYTHON_LIBS="-L$withval/lib/python2.4/config -lpython2.4 -lutil -ldl"
elif test -f $withval/include/python2.7/Python.h; then
      PYTHON_INCDIR=$withval/include/python2.7
      PYTHON_LIBS="-L$withval/lib/python2.7/config -lpython2.7 -lutil -ldl"
if test -f /usr/include/python2.4/Python.h; then
      PYTHON_INCDIR=/usr/include/python2.4
      PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
elif test -f /usr/include/python2.7/Python.h; then
      PYTHON_INCDIR=/usr/include/python2.7
      PYTHON_LIBS="-L/usr/lib/python2.7/config -lpython2.7 -lutil -ldl"

Configure still doesn’t work.

sudo apt-get install python-qscintilla2 libqscintilla2-dev

No Love!

Download Scintilla 3.2.4 from SourceForge and extract into Projects directory.

cd ~/Projects/scintilla/qt/ScintillaEdit
python WidgetGen.py
cd ~/Projects/scintilla/qt/ScintillaEditPy
python sepbuild.py

Start QtCreator.

Open project ~/Projects/scintilla/qt/ScintillaEdit/ScintillaEdit.pro

Build All

Result of build
cd ~/Projects/scintilla/bin
Everything seems to be there

You see, the configure script was expecting to find this library built from scratch at the same directory tree level as the CUTE project. It’s okay for those of you who are laughing right now. I’m sharing this so you can all get a good yuck while learning how to install really old Ubuntu versions in a VM.

cd ~/Projects/cute-svn/CUTE
still no love

Now we actually edit configure.sh.

The Help text lied

Obviously the help text lied.

That logic is a wee bit ugly

Basically there is a hard coded directory tree and you get to change the base via a command line parameter. That would be okay if it weren’t for one teeny tiny thing.

qextscintilla.h doesn’t exist anywhere.

Adding insult to injury for someone that is an old timer with Qt, the prefix “qext sounds very familiar.

Setting up a Ubuntu 8.04 LTS VM in 2021

This part will provide useful information for anyone that has to maintain something very old. In particular, medical devices that were approved long ago will force you to use the old tool chain.

Yes, Ubuntu 8.04 LTS has long since been officially dropped. Thing of it is, that means it moved to older, possibly slower and not mirrored servers. Most likely these servers are much like the ones you end up on when you sign up for $8.95/year hosting services. They will handle the tiny number of people who actually visit your blog or whatever.

The only real downsize of this is you have tweaking to do. If you are really lucky someone else has already had to do the tweaking and posted the answer like this one. That saved me a lot of searching. As I stated, the repos got moved.

Download Ubuntu 8.04 LTS from here and install into a VM. (I used the 64-bit version) Once you have completed your install and rebooted, open a terminal.

cd /etc/apt
sudo mv sources.list sources.list_orig

Now copy/save/whatever the new sources.list you pulled down from the link above. If you are too lazy to scrape it yourself from the other link then download u18-sources-list.txt here and rename once you get it. I was going to put it into this post but the Code block of WordPress block editor is busted bad. It was using the # character for something and really mangling the file.

Reboot. Login and open another terminal.

sudo rm -vf /var/lib/apt/lists/*
sudo apt-get update
sudo apt-get upgrade

Note: Ubuntu 8.04 (and several other Ubuntu flavors) had issues with monitors running in VMs. If your GUI stops working you can <ALT><CTRL><F2> to open a terminal. Just login there and type

sudo reboot now

The above works if Windows 10 is your host. It does not work if Ubuntu 16.04 LTS is your host. Why would anyone use Ubuntu 16.04 LTS as a host? To get the version of VirtualBox that works with the libxrandr-dev version found in Ubuntu 8.04 LTS. Otherwise you have a tiny little screen no matter what you do.

Assuming you are still progressing:

sudo apt-get install build-essential
sudo apt-get install libxrandr-dev

You need the build-essential for the Guest Additions. (I assume you are using Oracle Virtualbox.) “Insert Guest Additions” next. Autorun will not work. After you’ve inserted the CD via the Devices menu you have to open a terminal and type the following:

cd /media/cdrom0
sudo ./VBoxLinuxAdditions.run

Reboot. (Yes, all of the rebooting rather sucks.) Most likely your screen will remain a tiny box in the center of your actual screen. At least it will if you are using a current Virtualbox on Windows 10. I tried every video card Oracle provides. Found no monitor love. Newer Virtualbox needs version 1.4 and 1.2 is what the repo has. Use GUI tool that should be telling you about updates with big red arrow pointing down up by your name at the top of the screen to apply “held back” updates.

Reboot.

The following were installed in my hopeless attempt at getting CUTE to work.

sudo apt-get install python-kde3-dev python-qt3 python-qt-dev python-qtext 
sudo apt-get install libssl-dev libwww-ssl-dev libwww-ssl0 python-openssl 
sudo apt-get install subversion python2.4-dev qt3-dev-tools libqt3-mt-dev 
sudo apt-get install python-kde4-dev pyqt4-dev-tools python-qt4-dev python-qt4-dbus 
sudo apt-get install python-qt3-gl libqscintilla-dev python-pyopenssl epiphany-browser 
sudo apt-get install galeon autoconf python-qscintilla2 libqscintilla2-dev scite
sudo apt-get autoremove

Now I had to svn checkout CUTE on host computer and copy to shared folder to get into Ubuntu 8 as SSL is far too old. One of the reason’s I installed so many browsers was the hope one could work around the issue. Bad thing hope. Causes us to suffer needlessly.

The elusive header file

I couldn’t believe it when I found the header file. I thought “Yes! Now I’ve won.” Been warned about thinking before. I edited configure.sh and took out the /qt/ in the paths where the code was looking for qextscintilla.h

if test "${with_qscintilla+set}" = set; then
 withval="$with_qscintilla"
 QSCINTILLA=
  if test -f $withval/qextscintilla.h; then
      QSCINTILLA=$withval
   elif test -f $withval/include/qextscintilla.h; then
      QSCINTILLA=$withval/include

Now configure should actually build.

cd ~/Projects/cute-svn/CUTE
./configure.sh --with-qscintilla=/usr/include/qscintilla/

There was a dim glimmer of hope.

roland@roland-u8-desktop:~/share/cute-svn/CUTE$ ./configure.sh --with-qscintilla=/usr/include/qscintilla/
 checking for true… /bin/true
 checking for false… /bin/false
 checking for g++… g++
 checking for C++ compiler default output file name… a.out
 checking whether the C++ compiler works… yes
 checking whether we are cross compiling… no
 checking for suffix of executables… 
 checking for suffix of object files… o
 checking whether we are using the GNU C++ compiler… yes
 checking whether g++ accepts -g… yes
 configuring for CUTE 0.3.0 (12 April 2005)
 checking for a BSD-compatible install… /usr/bin/install -c
 checking for mv… /bin/mv
 checking for rm… /bin/rm
 checking for cp… /bin/cp
 checking for echo… /bin/echo
 checking for ar… /usr/bin/ar
 checking for qmake… /usr/bin/qmake
 checking build system type… x86_64-unknown-linux-gnu
 checking host system type… x86_64-unknown-linux-gnu
 checking for Operating System Distribution… done
 checking for Python location… yes
 checking for Qscintilla location… yes
 configure.sh: creating ./config.status
 config.status: creating Makefile
 config.status: creating src/cute.pro
 config.status: creating src/config.h
 config.status: src/config.h is unchanged
 config.status: executing default commands
 Configuration on Tue Jun 15 11:41:22 CDT 2021:
 Host:               x86_64-unknown-linux-gnu -- debian lenny/sid
   CUTE version:           0.3.0 (12 April 2005)
   Source code location:       .
   Install binaries:          ${exec_prefix}/sbin
   Install config files:       ${prefix}/etc
   Scripts directory:          
   C++ Compiler:           g++ 4.2.4
   Compiler flags:           -O
   Linker flags:            -O
   Libraries:              
 Python libs:              -L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl
   Python include:          /usr/include/python2.4
   Qscintilla dir:          /usr/include/qscintilla/

Running make rather dashed hope, until I looked at it closely. This will seem obvious to you, but I had to first get a scrollback buffer setting big enough to get back here. For some reason it didn’t redirect to a file properly.

/usr/share/qt3/bin/uic ../ui/projectdialog.ui -o ../ui/projectdialog.h
 /usr/share/qt3/bin/uic ../ui/statusbar.ui -o ../ui/statusbar.h
 g++ -c -pipe -Wall -W -g -D_REENTRANT  -DQT_THREAD_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I.. -I/usr/include/qscintilla//qt/ -I/usr/include/qscintilla//include -I/usr/include/python2.4 -I/usr/include/qt3 -I../moc/ -o ../obj/cute.o cute.cpp
 cute.cpp:46:34: error: qextscintillaprinter.h: No such file or directory
 cute.cpp:47:31: error: qextscintillabase.h: No such file or directory
 In file included from cute.h:55,
                  from cute.cpp:49:
 c

Yes, stupid me should not have used a slash at the end of the directory path, but that is not the interesting part. Some other place in the command file is hard coding “/qt/” and “/include” on the end of that.

Hard coding of directory paths is always bad people!

That was hidden in autoconf/configure.in

autoconf/configure.in

And in src/cute.pro.in

src/cute.pro.in

They also screwed us with a hard coded /lib.

After cleaning up the first hosing I tried another clean build.

Newest build error

This is where the Gnome cackled the loudest. This is where I remember why Qext sounded so familiar.

There was a most unfortunate time in Qt’s history where they had this Website called “Playground.” Things that were being worked on unofficially, perhaps as proof of concept, got put here. They were all prefixed with “Qext” to indicate they were “Extra” classes/modules and not part of actual Qt. When something was deemed worthy of being included in Qt it was then taken out of the playground. The Qext became just Q. Many of the method names, parameters, and parameter types would change.

I got fried on this with the serial port class on a project. Early development started with the playground. Before we finished a new release of Qt came out that included QSerialPort. That was not just a quick substitution with the editor.

CUTE is abandonware. From what I’ve seen just looking at the compiler output, anyone looking to bring it back would have to start over. That last compilation error means this was written using a very old C/C++ standard. I remember during the days of DOS when we could just assume most pointers were interchangeable, but that was long ago.

Gnome 1 Rollie 0

Some Mainframe Nostalgia

I only dabbled on the IBM mainframe over my 30+ year career. One thing that gives me great nostalgia now is SPF. SPFLite2 in particular.

I don’t actually remember what we had on ROSCOE when I made the mistake of attending DeVry in Lombard. It kind of reminded me of the editor I had to use later at client sites. You see, I was either a PC consultant or a DEC/VAX consultant. Prior to the Internet you either used VMSMail for company email, or you had to have a mainframe account because your client used PROFS. You can read more about VMSMail in this book.

The Minimum You Need to Know to Be an OpenVMS Application Developer

Since you already had an account and you could do COBOL on that VAX thing, once in a while they asked you to do some mainframe COBOL too. I talk quite a bit about terminals in my latest book.

https://www.theminimumyouneedtoknow.com/agile_book.html

In large part because that book walks through IT history from the days of paper tape and punched cards through to today. Everything happens because of what came before. The American Greenback determined the size of the punched card.

Sadly those images aren’t to scale, but the greenback determined the size of the punched card because people were already used to handling things of that size. We already had wallets to carry them and trays to hold them. The card divided out into 80 columns. Early terminals had to support 80 columns. Many paper terminals supported 132 from the beginning, but CRT and other video terminals weren’t viable until they could support at least 80 columns.

paper terminal
DEC Paper terminal commonly used for systems consoles long after the VT-100 was introduced

The featured image of this post is an IBM 3278 Courtesy of Richard Thomson and terminals-wiki.org and that is where our journey begins. Maybe I spent too much time using emulators? I seriously remember the later 3270 family terminals having quite a few colors.

There was also a red that would show up. Don’t get me wrong, they were still considered “green screens” but they had colors other than green on them. Given my mono-colored VT terminals of the day, I found that kind of nice. Kind of like you see in this emulator shot.

You need to understand the terminal being used so you can take my statements about SPFLite2 with the grain of salt they need. The default installation opted for a blue on white color scheme. It is easy on the eyes, but it saddened me as well.

First screen of first run

When you download and install SPF on Windows this will be what you see for your first run. Be sure to choose (C) for the keymap.

3277 keyboard

ENTER is that funky key on the right side of the space bar. RETURN is that hooked arrow key above the shift key. I talk a lot about this in the AGILE book because the CUA battle and the “ENTER is on the numeric keypad” insurgence left casualties. IBM had “smart” terminals. You could arrow to any cursor position on the screen in any application. The TAB key would navigate between fields flagged for entry. If you want to know more about those days and why things shook out the way they did, you can buy a copy of my AGILE book.

If you know nothing about IBM choose the (C) option because that key is about where the ENTER key was. Prior to Microsoft adding worthless Windows keys to the keyboard, IBM really spaced the CTRL keys out.

IBM 1391472 PS/2 Keyboard 84 Key keyboard

You have to be slightly better aim with 104 key keyboards.

right control key for typical 104 key keyboard.
Main Window with help open

What you have to understand is that we didn’t have GUI or mouse back then. ISPF (Interactive System Productivity Facility) was a complete file commander. You would have to dig back to DOS applications to find something close to part of it. GNU Midnight Commander would be the closest analogy to the file navigation now. GNU Emacs is the closest I’ve used. I’m told THE (The Hessling Editor) also has an SPF emulation mode.

The file path

Let me direct your attention to the File / Path line in the above image. You who have only worked on the x86-wanna-be-a-real-computer-one-day-when-I-grow-up platforms wont’ understand just how critical this was. With hundreds of network drives you might be starting to understand. Far too many of you have had one hard drive and maybe one DVD/CD drive. As drives got bigger people could not be trusted to be organized so Microsoft created a GUI file navigator and tried to force all of your stuff to be in Documents.

Imagine yourself during a time like this:

Tape library and librarian

There would be anywhere from six to forty tape drives. You would issue a mount request for a specific tape to operations. Some time later operations would reply to your request with the device where the tape was mounted.

The same thing happened with disk packs.

Removable disk pack in drive

We didn’t have GUI and nobody wanted to GUI navigate through a device hierarchy of forty-plus drives.

After entry

I type in the path and hit the funky enter key (mapped to right CTRL) and presto! I’m taken directly to the place of interest. Had I chosen to enter something for Filter Mask as well, only files passing the filter would show up.

Bottom of window

The bottom of the window displays incredibly useful information that we had to memorize. It is important to note that when on a file line the commands can be shortened to the single underlined letter. Please note that DIFFA/B has more than one underlined character. Just typing D will delete.

Brows a directory
OPEN on a source file will OPEN for EDIT. Yes, EDIT will do same. EDIT will always EDIT. OPEN may not.

Note: If OPEN opens for edit, it will OPEN in a new window that will have the File Manager tab and your file tab. EDIT will open a new tab in the existing window.

Define Profile

Here is the answer to the question your mind had about my previous statement. You from the PC world most likely have never worked on anything that did not have default file associations. SPFLite2 has its own file associations called profiles. Here I was opening a BASIC source file for the first time. Note that you can flag files to ‘Do not Edit’ and tell SPFLite2 to ‘Open with Windows.’ You can also do some kinky profile linking and associating one profile to multiple file extensions.

Editing our BASIC file

You will notice that SPFLite2 supports a tabbed interface. It also supports multiple windows ala the help window and others. Above is what the BASIC program looks like when I open it.

Note: The numbers on the left side are SPFLite2 line numbers. They do not exist in the source file though they look just like standard COBOL line numbers.

Some of you might now start to understand why I made such a stink about the 3270 terminal colors. I wanted a much more purist color scheme. The blue on white isn’t bad, it just isn’t 3270 SPF. You can try messing with this via the OPTIONS command.

OPTIONS

I like to set editors to Re-Open last file(s) at start if they support such a feature. I really like it when they are persistent and will save even unnamed buffers between sessions. No such luck here.

Note: You can change anything you want and just rename the configuration file to start over. You can also copy the configuration file to a new name.

Configuration file is under Documents/SPFLite

One of the download options was some AUTO color files for a few languages. I downloaded and installed them. I’m probably going to delete all of them. They assume a default color theme and, well, let me just show you how things went.

I’m pretty certain I could have fixed the line number coloring if I was willing to put more time into messing with all of the schemes. I was trying to see how COBOL was handled. I also wanted to see how other things were handled.

The file list didn’t look too bad.

I don’t think the COBOL AUTO recognized .COB as COBOL as many PC things only recognize .cob. Some might also recognize .cbl but that isn’t an old school standard.

The C-language stuff didn’t impress me either.

A large part of my disappointment with the AUTO stuff is I was unwilling to put however long it took doctoring the schema settings to get something I could live with. I might at some point, just not now. You can easily figure out which each AUTO uses. The AUTO files go in Documents/SPFLite/AUTO. Here is a snippet of the C-language one.

; SPFLite Colorize File
  MIXEDCASE YES
  ESCAPECHR \
  QUOTED    5
  NUMERIC   6
  COMMENT1  7 // 0
  COMMENT2  7 /* */
 ;DELIMS    !"#$%&'()*+,-./:;<=>?@[]^_{|}~    (all delimiters between 33 and 127)  DELIMS    !"$%&'()*+,-./:;<=>?@[\]^{|}~
 WORD  8 !
  WORD  8 "
  WORD  8 #
  WORD  8 $
  WORD  8 %
  WORD  8 &
  WORD  8 '
  WORD  8 (
  WORD  8 )
 …
  AUTOCAPS 10 #define
  AUTOCAPS 10 #elif
  AUTOCAPS 10 #else
  AUTOCAPS 10 #endif
  AUTOCAPS 10 #endregion
  AUTOCAPS 10 #error
 …
  AUTOCAPS 11 BOOL
  AUTOCAPS 11 BYTE
  WORD 11 break
  WORD 11 case
  WORD 11 char
  WORD 11 const
 …
 ; done

You will notice it appears 5, 6, 7, 8, 10, and 11 are what C uses. As long as each AUTO file for a language assigns 8 to symbols, 11 to keywords, and 10 to compiler directives one could come up with a color schema they really like that worked for all languages.

It was at this point when I nuked the config file and started over. I, like far too many humans, can spend days getting colors “just right.”

Both Screen and Schemes have color settings

For those who want to go down the path of getting things “just right” I need to point out that both the Screens and Schemes tabs have color settings. Schemes apply to the text and screens applies to everything around the text like tabs and line numbers. I cam here to set the font.

People who do not read the text to the right will find changing the font non-intuitive. While you can type the name in if you happen to know it, you click the “Choose” button below the values.

Font dialog
After new font

Ah, I should point out I downloaded the optional font library and installed just a token few of them.

Notice the dot lines in front of some directories. That is SPFLite telling you that your current priv level will not let you edit in those directories. When you own everything you don’t see that.

Drive I own everything on

Exiting a file isn’t as straight forward as most PC users would like. You can read the documentation for AUTOSAVE. This is a feature for automatically saving your files. I’m talking about ending the edit session in a single file tab. For that you use END at the command prompt. Close won’t work, quit won’t work, and EXIT will bail all the way out of that SPFLite2 window.

You can also right click on the file tab. Unlike many PC applications this will not bring up a special menu, it just closes the tab.

NEW isn’t a command either

Probably the shocking thing for me was “NEW” wasn’t a command. You can create a new tab by left-clicking on “New” or by typing the command EDIT NEW and hitting the ENTER key.

New blank tab not yet associated with a file

SPFLite2 is a Line Editor

The help text is massive for SPFLite. You could literally spend days skimming through all of the commands. There is so much kinky stuff you can do if you want to put the time into learning it. SPFLite2 deviates from the mainframe inspiration in some subtle but critical ways.

When you create a new file on the mainframe the editor opens to a screen of blank temporary lines. As you can see above, SPFLite does not do this. You have to insert at least one line yourself. The “Top” and “Bottom” things don’t exist.

I seem to remember being able to set an “insert mode” by typing I* in the line number area which would then just keep inserting lines while you typed on the mainframe. I have not found such a feature on SPFLite2. I’m sure there is something, I just haven’t found it.

Here’s a little beginning sequence to get you going. Be sure to remember to hit ENTER (the right <Ctrl> key if you followed my instructions) after each thing.

Note that temporary lines do not have line numbers. “I” inserts temporary lines and “N” inserts permanent. Temporary lines will use whatever MASK is set. When you set a MASK it is set for the entire edit session. You can change the MASK value but not actually get rid of the MASK. When you SPLIT lines or Insert temporary lines, the MASK is used.

After hitting ENTER I got the temporary line below the =MASK> prompt and my cursor was on that temporary. I had to arrow up to the MASK line, type the MASK and hit enter again. I’m sure there is an easier way, but this way was obvious.

The MASK can be very handy when you have a bunch of comments to enter. Remember, the editor defaults to overstrike.

Viewing file in Notepad++

You will note that SPFLite2 takes the term “temporary” seriously. We see lots of extra comment lines but they don’t have line numbers so they are temporary.

Summary

This is nowhere near a complete tutorial on SPFLite2. You could spend days reading the help text and learning the incredibly powerful features built into this editor. I had a blast reminiscing with this.

You have to remember that this is a different mode of thinking that all of today’s PC editors. This is from a time when we were told to keep functions and COBOL paragraphs to one screen length. Definitely no more than a page.

You can’t really understand the mainframe world until you get at least a tiny understanding of the primary editor.

You can’t really understand why people call midrange and mainframe systems real computers until you walk a mile in that world. This is not a hack-on-the-fly universe. We had to actually design things.

Long Hours Kill You

The WHO (World Health Organization) recently published a study claiming working long hours will kill you. I agree, though I routinely do it.

Here’s the difference for me. I routinely work 80-90+ hour weeks when on a project. This is an on-site project far away from home. I don’t do touristy things. I don’t often, if ever, hang out with coworkers on weekends. I’m there to bank as much money as possible.

At the end of my contract I go back to the family farm to decompress. Sometimes I stay here three months, sometimes it is close to two years. You can work 80-90 hour weeks, but you have to lead a semi-retired kind of life. Long breaks between projects. Only take projects you find interesting. You don’t even realize you are working like a slave when you truly enjoy what you are doing or are simply fascinated by it.

I’ve blogged before about how technical recruiters cannot understand a semi-retired life consultant. They are using to low wage slaves who can’t miss more than one paycheck without being on the street. When your bill rate is high enough and you are working 80-90 hour weeks, you can take a lot of time off, if you live cheap.

https://www.theminimumyouneedtoknow.com/agile_book.html

I talk quite a bit about this topic in my latest book. In particular you probably want to read Karoshi – Do More With Less. There are other essays and conversations about the people I know of who died in IT. Some of them I personally knew. Others I came to the client site after the death. Others were just local lore about managers killing themselves in the office to buy their development team more time to complete the project.

I kid you not.

Management at most companies seems to want at least 60 hours per week. You can read this lengthy thread on Quora if you don’t believe that.

If you grew up on a farm you can generally work all the time. At least if you grew up on a farm when I did because that’s all there was to do. We had three television stations; five if the weather was perfect and we turned the antenna. There was no air conditioning and no Internet. You could sweat while reading a book or you could sweat while working. At least when you were working you were moving.

Featured image by Miguel Á. Padriñán from Pixabay

Greylisting

Here’s an idea! Let’s add a new feature called Greylisting, set the default to be on, and push the update out without a word. What could possibly go wrong?

Back on 3/25/2021 at around noon I sent an email to a pimp I keep in touch with. (For those that don’t work in IT, person at consulting firm. They arrange a date, collect a fee . . . you get the idea.) I called him a few hours later because I was surprised he had not responded. He didn’t get the email. I got a phone call from him early the following morning telling me that email showed up at 1am.

A few days later there was another pimp talking to me on the phone pushing me to get a signed RTR (Right to Represent) back to him so he could present me to the client. Well, “signed” is a bit of an overstatement in today’s world. They send an email and you reply with “I confirm.” We were talking on the phone. I was replying to his email which had just come in. About half an hour later I forwarded his email to my almost never used GMail account. Replying from there got to him right away.

This morning was the last straw. I bought some stuff on eBay about 7am. I had been buying other stuff on eBay this past week and the sale confirms showed up right away. It was well after noon and I had seen nothing. In the words of Popeye “That’s all I can stands I can’t stands no more!”

CPanel menu

The boys and girls developing CPanel decided to add a new feature called “Greylisting.” This shiny new feature randomly hangs onto email from, apparently, every source that isn’t Gmail until the wee hours of the morning. They pushed this out with basically a word to no one. I didn’t find out about it until I chatted with support.

The default is ON for all domains managed by your CPanel.

What could possibly go wrong, right?

So, log into your CPanel account. If you are like me that means logging into your hosting service then choosing CPanel from their menu. You are looking for that little envelop with the exclamation mark in it that says “Configure Greylisting.” It’s in the email section of your CPanel menu. Click it and turn Greylisting off for all your domains.

If you want to read more about technical recruiters (pimps) you can start here.

CS Graduate Falsehoods

What should be the #1 entry on this list of CS Graduate Falsehoods is missing:

Agile is valid Software Engineering

Otherwise that list of computer science graduate falsehoods is rather good. No list could be complete, but, other than missing Agile, that list does a good job of identifying computer science graduate falsehoods.

Some recent graduates have actually smelled the tea brewing though. They are asking us old-timers “What surprised you the most in your career as a software engineer?

Featured image by 愚木混株 Cdd20 from Pixabay