Log in

Interests and Hobbies [entries|archive|friends|userinfo]

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Open Source for Mobile Devices and Web Development [Feb. 16th, 2017|04:43 pm]
[Tags|, , , , , , , , , , ]

There are some great Open Source applications out there for desktops and laptop machines, but it's much harder to find Open Source for mobile devices. Most mobile devices require their users to go through a proprietary app store just to get software onto their devices. This is a setup back for the Open Source movement since more and more people are turning to mobile devices as their primary computing source.

If you have suggestions and/or recommendations for FLOSS alternatives in the mobile space, please share them with me and other Free, Libre and Open Source advocates on the Schoolforge mailing list ( https://schoolforge.net/ ).

I'll share some Open Source options I've found to date for developing mobile and cloud based applications.

Cross-platform Mobile App Development

Here are a couple of very interesting projects that let developers create cross-platform mobile applications:

Developers can use C/C++ which can be compiled to run natively on certain platforms or converted to Java bytecode output that can run on phones that only support Java applications. One can also develop HTML/CSS/JavaScript applications for phones that support those formats (similar to Cordova).

This project supports HTML/CSS/JavaScript development of applications that will work on a wide variety of mobile platforms.

C/C++ Mobile Development

If you want to port your own C/C++ programs or interesting Open Source C/C++ applications to mobile devices such as Android, these projects may be useful.

Information on using libSDL 2.x with Android.

Port of Nano-X/MicroWindows to Android. Nano-X/MicroWindows supports a subset of simple X11 and Windows applications. Many FLTK applications port easily when run with Nano-X.

Article on building and running Allegro based applications on Android.

C/C++ CGI Development

As a C/C++ programmer, I was surprised by how few CGI applications were built with these languages. Originally, I read that the reasoning behind this was that one would have to spawn a new process every time one wanted to run a C/C++ CGI program. Interpreted languages could be built into the web server and avoid spawning new processes. However, with the introduction of libraries such as FastCGI, the inefficiencies of running compiled programs as CGI applications is no longer an issue. From everything I've read, C/C++ CGI programs are much faster than other CGI programs if they avoid the process spawning issue. If you want a highly efficient CGI program, it's a good time to revisit using C/C++ with the proper libraries.

Here's some more information on FastCGI.

If anyone's interested, I have builds of FastCGI and Apache with fcgid support for Windows/MinGW (including patches to get them working on later versions of Windows).

Wt is one of the few projects I've seen that tries to provide useful CGI functionality and routines for C/C++ programmers.

C/C++ on the Web

One can also use projects like emscripten to compile C/C++ code into JavaScript that will run on the web. It's an easy way to port your own C/C++ applications or run popular Open Source applications to the web.


Another area of web development that surprises me is when I see so many language alternatives to JavaScript. JavaScript is supported (in some fashion) by most browsers. However, other programming languages are not. In order to get other languages to work in a browser, they typically need to be converted back to JavaScript. In a case like emscripten, it can be useful to convert C/C++ to JavaScript for porting purposes. However, many new web projects are choosing other languages besides JavaScript (because developers prefer the language) and then using tools to convert those languages back to JavaScript so they'll work via the Internet. Often the conversions introduce a lot of unnecessary code or provide slower implementations than the original. If I'm porting a project that's already written, it's great to be able to move it over with projects like emscripten. However, if I'm writing something new for the web that requires a programming language, I always use JavaScript. It's more efficient to write something specifically for that language than rely on generated code converted from another language.

It's also nice to be able to write CGI in JavaScript and share the same functions, objects and code between the client (browser) and the server. This is one of the major benefits provided by projects like CommonJS. The CommonJS site used to maintain a very nice list of server side JavaScript implementations. Unfortunately, the CommonJS project appears to no longer be active. It's been replaced by more implementation specific solutions like node.js.

There are alternatives for running server side JavaScript other than node.js if you don't want to be locked into a particular web server.

One option is TeaJS which uses FastCGI and works with a variety of web servers including Apache and Nginx.

Another option is jsc which is a JavaScript implementation that is a part of Webkit (one of the most commonly used browser libraries).

There are also some interesting TinyJS implementations and forks at various code archives such as github. You'll find more details under my Scripting Languages post ( http://lmemsm.livejournal.com/12416.html ).
LinkLeave a comment

PDF and Postscript [Dec. 20th, 2016|02:58 pm]
[Tags|, , , , , , , , ]

Some interesting Open Source command line programs output their results in Postscript and/or PDF format. That makes it useful to have lightweight PDF and PostScript viewers that don't require a lot of dependencies to build so you can view their output quickly. It's also nice on Linux systems if they work in framebuffer mode, so you don't have to start an X Windows session just to view results. Cross-platform viewers work on a variety of systems from Linux and Mac to Windows to DOS and even Android. Having tools to edit/modify PDF and PostScript output is also useful.

I've been searching a lot lately for lightweight PostScript and PDF viewer options. Thought I'd share some of what I've learned about cross-platform PostScript and PDF support. If you know of any other viewers or PDF/PostScript related programs with minimal build dependencies that I may have missed, please let me know. I'm always looking for additions for my Open Source applications list: http://www.distasis.com/cpp/osrclist.htm

First, here some of the programs I use that output to PDF or PostScript.

This does have a lot of build dependencies (needs Qt and webkit), but it's one of the few programs that I've been able to find that does a good job of converting HTML to PDF.

Other HTML to PostScript/PDF alternatives are html2ps ( http://user.it.uu.se/~jan/html2ps.html ) which requires Perl and PhantomJS ( http://phantomjs.org/ ).

I use abcm2ps to convert songs in ABC notation to sheet music. Later versions of abcm2ps have the ability to output to SVG as well as PostScript. I have a lightweight SVG viewer based on nanosvg and SDL that displays SVG, so that should be an interesting display option if a PostScript viewer isn't readily available. I can upload the build scripts for it to my archive if anyone wants to try out the SVG viewer.

lcal and pcal
Personal calendars and lunar calendars can also be output to PostScript format.

The graphics layout engine outputs charts and graphs to PostScript, PDF and some graphics formats.

Other applications can output starcharts, barcodes, graphs, etc. to PostScript format. The applications I listed above are the ones I personally use the most in this category. If you have other favorites, would be interested to hear about them.

Next, I'll mention some PDF libraries and viewers.

The two main PDF rendering libraries/applications are mupdf and poppler.

Poppler is a library based on the xpdf viewer, so in most cases you really only need one of these on your system. They both have a lot of the same utility programs. When building poppler, there's additional support for GTK and Qt frameworks if you have those on your system. I typically build with these turned off to lower dependencies.

Mupdf was written by the developers of Ghostscript. It renders very quickly and is supposed to be very lightweight. However, what I dislike about it is its growing list of dependencies. Newer versions of mupdf provide more and more functionality, but they're requiring more dependencies to do so. Later versions of mupdf now require harfbuzz which I typically don't use with any other applications. (I'm not using Opentype fonts.) Also, the developers recommend you use their third party libraries rather than system libraries. There are work-arounds to use the system libraries, but it's a nuisance to modify the build scripts each time the program is updated. The API is not very stable either. Every time I download a new version, it seems to break third party utilities built using the mupdf library.

Mupdf has example viewers that come with it. The latest example includes an OpenGL based viewer. I did some work on a SDL based viewer using mupdf, but the API kept changing, making it difficult to maintain. When the OpenGL based viewer was added, I looked into using picogl in place of OpenGL/Mesa as a backend for the viewer. Using a viewer that comes with mupdf meant the mupdf developers would be responsible for dealing with the API changes. I got the OpenGL based viewer to build with picogl, but picogl still needs additional functionality to provide clear rendering of the text displayed by the mupdf viewer. Hope to work on this further in the future and would love to hear from anyone else who'd be interested in helping on this project.

There are some SDL and framebuffer based PDF viewers. However, they were either not easy to port to other platforms or had heavy dependencies I didn't want to add to my system. I found it interesting that some viewers used SDL as the actual graphical user interface (and could run in framebuffer mode on Linux), but still required GTK or Qt as an additional interface when rendering pages.

I finally found a lightweight, cross-platform PDF viewer that uses FLTK as a front end. It's called SpRead ( https://github.com/muranoya/SpRead ). It can be run in framebuffer on Linux using FLTK built with nano-x. The viewer is very lightweight and does seem to render quickly. Dependencies are really minimal compared to other viewers I've looked at. However, mupdf renders faster in many cases. SpRead uses poppler for PDF rendering and libarchive for zipped/archived file access.

Some other interesting PDF libraries available for editing and creating PDFs are qpdf ( http://qpdf.sourceforge.net/ ) and libharu ( http://libharu.org/ ).

Poppler and xpdf both come with PDF to text conversion utilities. This is very useful if you want to work with grep to search for a word or phrase in a collection of PDF files. Mupdf has added the ability to convert to text in more recent versions. However, their help/man pages on how to use their tools could use improvement. When I was searching for a lightweight PDF to text converter, I ran across pdftxt at https://litcave.rudi.ir/ As I mentioned, the mupdf library API keeps changing with newer releases, so typically when I update my version of mupdf, the pdftxt build breaks. I've uploaded patches to build pdftxt with the version of mupdf that I've most recently updated to. You can find patches and build scripts at the archive link on this page:

Since lightweight PDF viewers are more plentiful than PostScript viewers, I searched for PostScript to PDF converters. The main option in this category is Ghostscript. Like mupdf, it requires several dependencies and uses its own versions rather than system versions of libraries. It's actually worse in this area than mupdf. The only viable option to Ghostscript that I could find for PostScript rendering was xpost ( https://github.com/luser-dr00g/xpost ). It has less dependencies that Ghostscript and is easier to build. However, it's still a work in progress. I'm hoping at some point that it will replace Ghostscript for the functionality I'm interested in, but it at this point, it still doesn't have all the functionality I require. It does look like a promising project though.

Those are some of the interesting libraries and applications I've found on my search for PostScript and PDF related utilities. Hope you find some of them useful. If you know of other lightweight, cross-platform alternatives, I'd love to hear from you about them.
LinkLeave a comment

FLOSS Fonts [Dec. 13th, 2016|10:55 am]
[Tags|, , , , , , , ]

This is a list of mono-spaced fonts, Unicode fonts, font resources in general and useful FLOSS font sites.

Monospaced fonts are particularly useful for programming. They can help improve readability. Some programming editors (like PFE) only work with monospaced fonts. Other editors allow the use of more varied fonts. However, monospaced fonts are useful when working with PRE tags in HTML, ASCII art and in other areas.

Other useful fonts include Unicode fonts for internationalized projects and fonts for people with handicaps or disabilities such as fonts designed for people with dyslexia.

Using a Free, Libre or Open Source font or a public domain or Creative Commons licensed font makes it easy to reuse fonts in Open Source (or even commercial) projects.

Bitmap Fonts

Fonts for DOS and Windows Command Prompts

Free Monospaced Fonts (Bitmap)

Dina Programming Font

Electronic Font Open Laboratory

Envy Code A

Envy Code B


Liberation Fonts


MIT license

Proggy Fonts

Raize font


Terminus font
Includes a large size font especially useful for terminals in framebuffer mode on Linux systems.


Free Truetype Monospaced Fonts

Adobe Fonts


Bitstream Vera

Available with Povray software.

Cutive Mono

DejaVu Fonts

Droid Sans Mono

Envy Code R

Font Squirrel Monospaced fonts

GNU FreeFont

GNU Unifont


Unicode font for medievalists

Lucida Sans Typewriter Regular - included with Oracle's Java SDK

Matthew Welch's MIT licensed fonts
White Rabbit worked as a monospaced font


Oxygen Monospace
Oxygen Fonts

PT Mono

Roboto Mono
Google's Roboto fonts

SIL Encore Fonts
Several unicode fonts including some monospaced ones.

Source Code Pro
Adobe Font

String Literal

Ubuntu Fonts
Ubuntu Mono

Xerox Alto mono-spaced font

Other Fonts

EB Garamond


Lato Fonts

Libertine Open Fonts Project


Simon Tatham's Fonts Page

Sorts Mill fonts

Font Related Links

Cufon Type Converter
Convert TTF fonts to cufon font format for web sites. With a few text changes, fonts can be used with Raphael.js too.

Create your own fonts.

Font Library

Font Squirrel
Handpicked Free Fonts

Google Fonts

Monospace/Fixed Width Programmer's Fonts


SIL Open Font License (OFL)

Wikipedia Open Source Unicode Typefaces

Unicode Font Guide For Free/Libre Open Source Operating Systems
LinkLeave a comment

FLTK applications list [Dec. 8th, 2016|11:50 am]
[Tags|, , , , ]

I covered SDL based applications. Now, I'd like to cover FLTK based applications for desktops and/or productivity.

While there isn't as much FLTK application development going on as I would like, there are some projects that specialize in using FLTK. TinyCore Linux is probably the most well-known Linux project that uses several FLTK applications. Nanolinux is based on TinyCore but uses nano-x as a lightweight alternative to X Windows. The developer of NanoLinux uses mainly FLTK applications and has modified and updated several FLTK applications to give them new life. He's also created some of his own where good alternatives did not exist. The Equinox Desktop Environment also uses FLTK, but it typically requires another EDE specific library along with FLTK support. Also, EDE users don't always look for FLTK applications for their desktops. Some will typically use anything they consider lightweight (whether it really is lightweight or not). A few mobile devices use FLTK as their main GUI. Users of those systems have developed some interesting applications for their devices.

There are several versions of FLTK. Applications may work with one version and not another. I've spent a lot of time searching for applications and porting applications to the latest version. I did try to update the FLTK software links list at the official FLTK web site with information on what worked with the latest version of FLTK and with information on newer FLTK applications, but was unable to add some of the newer, more interesting FLTK applications out there. So, this is my definitive list at this point in time of the best FLTK applications available. For more information on FLTK and applications, see also http://www.distasis.com/cpp/scrlib.htm#fltk

I'm sure I haven't covered everything and as mentioned, check NanoLinux and Tiny Core Linux for more FLTK based applications. I'm always looking for new, portable, lightweight FLTK based applications. If you know of something I may have missed or you're working on a new FLTK based project, please contact me.


Shows disk usage. Works on POSIX systems with du command. I have patches to port this to Windows.

Calculator. The FLTK web site link includes information on some of my patches to get it to build successfully as well as link to the original source code.

Graphical diff program.

Traverse directories and find file differences. Some of it was based on fldiff.

Password manager. I ported this to work with the latest versions of FLTK and tinyxml2. It's interesting, but at this point, I'd prefer a Keepass compatible password manager. I'm looking into chkpass as a lightweight alternative for password management.


prozgui for prozilla
Fast file downloader. I have patches for building and to port this to Windows. I use a version based on GNU GPLv2 development instead of the GNU GPLv3 development.

IRC client. Based on MegaIRC, but with a lot of cleanup. I have patches to add gettext/libintl support. This is the best option for IRC using FLTK that I've found to date.

This has good potential as a threaded IRC client. It can handle multiple connections. I could get it to build on Windows either with patches or a build of MinGW with POSIX instead of Windows native threading support. It needs some work on storing IRC connections. Doesn't seem to remember any connections once you leave the application.


There are two webkit based browsers for FLTK. That's great news for FLTK applications users. What's not so great is that they don't port well to non-POSIX systems. If you want the most lightweight webkit based browser (and webkit browsers are not by nature lightweight), I'd go with either of these options instead of the many other webkit ports out there.

I was able to get the original version of netrider to port to Windows and a Windows version of it is available at Sourceforge. However, when I upgraded the version of my MinGW compiler, I was no longer able to build netrider. Seems the webkit developers took some shortcuts in the older code that really weren't up to C++ standards. Netrider upgraded to a later version of webkit (which fixed the compiler issue), but the newer version was never ported to Windows.

This was never ported to Windows although it might be easier to port that the latest version of Netrider. It uses makefiles created by the developer instead of cmake.

When people talk about FLTK based web browsers, Dillo always comes up. However, Dillo is the opposite of what I think of when I think about portable code. One developer decided to fork Dillo and make it more structured and easier to port. He's really done a wonderful job on cleaning up the code. I'd recommend this browser over Dillo if you're interested in doing anything with the source code or need a lightweight HTML viewer for FLTK. DPlus is also the lightest browser I could find that could display output from diffh properly. Most console browsers like lynx had trouble rendering the color differences in the output.

While this is meant as a utility rather than a web browser, I used DPlus as the starting point for my HTML/CSS based dialog replacement.

Mail clients

The developer of Nanolinux wrote a nice, basic, stable e-mail client. (He also reused part of my Open Source POP3 e-mail code.)

This has a lot of potential. It took a long while to get it to build with the latest version of FLTK and it's still kind of buggy. I also needed to update helper libraries fl_toggletree and fleditor to work with the latest FLTK. The interface is a lot of like sylpheed and foxmail. I would love to see some new development on this and would be happy to help update it.

There was a nice, very basic, stable e-mail client at Sourceforge. Doesn't appear to be available from there any longer.

RSS reader
Gautier's RSS reader
This one has a lot of potential. It has an attractive user interface that's easy to work with. However, it does have the ability to sort RSS posts at this point at time. It needs to be used in conjunction with a script and tools like curl to download the RSS feeds. It's basically just a reader. It uses SQLLite to store the RSS data so it can potentially provide fast access to RSS posts. I'd love to see some further development done on this project.


Cross-platform VLC based media player.

Unfortunately, this only works on POSIX systems so far. I have been able to build it on Cygwin as well as BSD and several Linux systems. This might be portable to more platforms using nano-x (and possibly SDL as the backend for nano-x), but I did not get very far in investigating this option. It is my favorite xine front end and is more lightweight than many of the other xine front end options. It provides a variety of features including a nice visualization component for use while playing music.


Simple Audio recorder and player based on Sox. I have done some work to port this one to Windows.

Midi keyboard.

Audio effects program to stretch sounds.

After more than one try to get this to build with the latest version of FLTK, I finally managed to get this working. It's a nice, lightweight audio editor. It doesn't display multiple tracks like Audacity. It does not have good support for playing or recording wave files. It's basically just a wave file editor. Was considering using libsox or another Open Source sound library to add support for playing wave files.

There is a fork of FLTK called NTK. It isn't as portable as FLTK and requires POSIX/X Windows support. A suite of audio applications were created with it.


This is a great, lightweight graphics editor. I really like this one.

Specialized graphics editor for coloring old photos.

Other graphics and drawing options include Antipaint and Cinepaint. Antipaint was updated to work with the lastest version of FLTK and to improve portability by the developer of Nanolinux. You'll find it at the Nanolinux web site. At one point Cinepaint decided to port their project from GTK to FLTK. You'll find some older versions with some FLTK support and utilities. However, the FLTK port is not actively developed.


The Daily Journal is a Personal Information Manager (PIM). It has several nice features including the ability to set alarms to remind you of appointments. I use one of the older versions (0.7) which ports well to newer versions of FLTK and, per my recommendation, so does NanoLinux.

Simple todo list. Haven't used it in a while, but if you're looking for a todo list program, it's an option.

PDF/Ebook Readers

A functional, basic PDF viewer and archived image viewer. I really like this one. It requires a compiler with later C++ support to build. Needs minimal dependencies, mainly libarchive and poppler. While poppler isn't as fast as mupdf at rendering, this still works pretty fast.

Image viewer with plugin support for mupdf and poppler.

There's also flaxpdf which is optimized for efficiency and uses mupdf. However, it's not at all portable to non-POSIX systems.

I tried BDReader as well but there are a lot of dependencies involved in building this.

File managers

I don't use any of these and personally prefer the SDL based file manager mentioned earlier. However, they're nice lightweight GUI file managers. I'm sure there are a few others not mentioned below as well.



Other POSIX only FLTK applications

GUI front end for synaptics touchpad controls.

FLTK ALSA Mixer front end.


I've yet to find a FLTK based editor I really like. For now, I'm still using SciTE, Fxite and nano.

I would love to find a Scintilla based FLTK editor. The closest I've found is https://github.com/cyantreeguo/Fl_Scintilla

There are many FLTK editor controls out there, including the one used by Postoffice.

Nanolinux offers flwriter.

The most interesting editor option I've found so far is fldev. There's a link to the original at http://www.fltk.org/wiki.php?V235+TC+Q and further development by the developer of NanoLinux at https://sourceforge.net/projects/fldev/ The main drawback is that it only opens one file at a time. The original author began to add support to use it as a debugger in conjunction with gdb. I'd love to get that support working properly and in a cross-platform manner and have been experimenting with it as time allows.

flabc is an editor specifically designed for ABC notation, but it appears to be a stable, well-written editor and may be useful for other editing purposes.
LinkLeave a comment

libSDL applications list [Nov. 30th, 2016|09:43 am]
[Tags|, , , , , ]

While libSDL is typically used for games, there are some applications that can be used to replace common desktop and productivity applications. I'll list the ones I've found here. If you have other alternatives, please let me know.

I've been working on simplifying the applications I typically use on Linux so that they can run in framebuffer mode using DirectFB or Nano-x instead or requiring X Windows. I'm always looking for portable applications, so I can run them on any system I'm using (at home or at work) whether it's Linux or FreeBSD or Windows or something else. I'd love to hear from others with similar goals.

The list just covers libSDL applications. They all built with SDL 1.2.x and I'm creating or locating ports to SDL 2.x as well. I haven't listed SDL based applications that use PDCurses or OpenGL/TinyGL. There are enough of those to warrant their own lists. More information on SDL applications and other screen libraries is available at: http://www.distasis.com/cpp/scrlib.htm#sdl I've posted some of the patches/build scripts for my SDL 2.x ports and will add more over time. You can find them from the archive link at: http://www.distasis.com/cpp/lmbld.htm

URLs are accurate as of when this was posted. However, they can change over time. You can use a search engine or archive.org wayback tool to find pages that have been moved or backups of older versions of pages.

Font viewers:

Good for picking what font you want to work with quickly.

Let's you see all the characters in the font, so you can check if there's support for specific characters needed for internationalization.

Epub reader:

Includes text to speech capabilities using Festival Lite.

Word Processors:

There are a series of SDL based text editors that use a core of common code with some variations in order to port to various handheld devices. Tried building and running, but it's hard to work with since it expects an on screen keyboard rather than a real physical keyboard.

File Manager:

Completely SDL based, two pane file manager.


Lightweight, fast graphics viewer.

Slideshow viewer.

Graphics editor.

Older SVG library. Includes a simple SVG viewer.

Supports SVG rendering and is not tied to a particular screen library. I built a simple SDL SVG viewer with it. If you're looking for SVG support for SDL, this is the best option I've found to date.




Tuxpaint and lunapaint are also SDL options for graphics editors, but I'm not currently using either of them.


Mod player. Can also create music.

The project has a simple, lightweight wave file viewer. I added support so that it works with SDL in place of some of the other graphics options it used.

Sample audio applications.

AV players:



Unfortunately no one's added sound support yet.












LinkLeave a comment

my core utilities [Nov. 27th, 2016|12:30 pm]
[Tags|, , , , , , , , ]

I've listed some core utilities options besides GNU. I thought I'd share something about what utilities I personally prefer to use. My main requirement in a good set of core utilities is portability. This is rather hard to find. You would think that if a utility was efficient and lightweight, it would be easy to port. However, that's not necessarily so. Many utilities that are designed for efficiency take advantage of features of a particular operating system which makes them harder to port.

At first, I considered starting with sbase which had stated goals similar to what I was looking for, but it didn't have enough features to effectively replace the GNU core utilities when developing and building programs. While newer versions of sbase have added a lot of functionality, they've become much less portable.

My favorite source for inspiration is Minix. Earlier versions provided some interesting and fairly portable versions of a variety of utilites:
Some of the utilities don't have sufficient UTF-8 support or lack some newer functionality found in GNU utilities that makes them fail when attempting to build applications. However, they make a useful starting point.

In some cases, the OBase or BSD utilities do a better job than the older Minix ones and still do that job efficiently. I particularly like the version of patch found on BSD systems. It's an earlier variant of the Free Software Foundation's patch program. Unlike the FSF's version of patch which uses the GNU license, it uses a BSD style license.

For some utilities, I've consulted the POSIX standards ( http://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html ) and rewritten them from scratch.

Rather than trying to port utilities such as the Free Software Foundations coreutils, I thought having a lightweight, efficient, highly portable option would be a useful alternative. Many of the FSF developers have little interest in portability making it hard to get later versions of their programs working on non-POSIX systems. I was surprised at how little interest most users have in developing portable alternatives to the core utilities that could be used to build software. Not only was their little interest, some people posted extremely negative comments when anyone suggested creating alternatives to the FSF software. I was also surprised by some of the negative reactions I read about wonderful projects like SBase.

I have a growing collection of public domain, BSD and MIT licensed alternatives to the GNU core utilities. For now, I just use them for my own projects. If you have an interest in portable utilities and tools, would like to see a viable portable alternative to the FSF's GNU coreutils or would like to further discuss related topics in a positive light, feel free to contact me. I'd enjoy talking with other developers and utility users on the topic.

You'll find some added information on my utilities and information on how to discuss the topic further at:
LinkLeave a comment

core utilities [Nov. 27th, 2016|11:44 am]
[Tags|, , , , , , , ]

Most systems (other than BSD based ones) use GNU's core utilities. It's used by most Linux distributions. Cygwin, MinGW and gnuwin32 run ported versions of the GNU applications as well. Even Microsoft's SFU/SUA included some of the GNU utilities. However, the GNU core utilities are typically more bloated and have more feature creep than other versions of standard Unix utility programs. BSD systems have their versions of core utilities. The latest version of Minix has adopted the BSD utilities. They tend to be less bloated than the GNU versions, but are still more bloated than other options out there. The BSD utilities also tend toward adding new features similar to but not to the same extent as the GNU utilities. Also, some of their utilities aren't as well optimized as the GNU versions. Busybox seems like the most viable option for a lightweight but still comprehensive version of core utilities. I'm currently using it on my Debian system instead of the GNU core utilities. Toybox is a similar alternative to Busybox. It has a better license option than Busybox, but it's lacking some features and tools that Busybox has.

Here are some links to core utility collections:

Earlier Minix alternatives
Earlier versions of Minix put together an interesting collection of lightweight utilities from various sources.

Windows ports of Busybox:


Heirloom Project
Based on traditional implementations of standard Unix utilities. Not very portable to non-POSIX systems. Not as bloated as GNU or BSD core utilities.

Port of OpenBSD userland to Linux.

This started out as a discussion on one of the suckless.org mailing lists of how to write efficient core utilites that weren't all part of one executable like Busybox or Toybox. Some good examples were posted and the project was started. Then project development was quiet for a while. The project became active again and one of the main goals besides efficiency was UTF-8/internationalization support. Looks like they've borrowed some UTF-8 support concepts (such as Runes) from Plan 9. It's not designed to be portable to non-POSIX systems. However, it does look like they've covered replacing most of the basic core utilities with lightweight, efficient versions.

Other alternatives:
LinkLeave a comment

Patents and Open Source [Nov. 11th, 2016|12:28 pm]
[Tags|, , ]

--- Free Software and Patent Policy ---

Patents can inhibit and encumber legal distribution of Free and Open Source software.

One might think that the best way to avoid patent issues would be to stick with Free software and Free operating systems. However, these distributions typically deal mainly with software free of copyright issues not patent issues. Patents may only be issues in some parts of the world and many Free operating systems feel justified in distributing patented code (source code only) as part of their freedom of speech.

Note that Free software and operating systems in this article correspond to the Free Software Foundation's definition of "Free" and is not necessarily equivalent to Open Source. The Free Software Foundation provides a list of what they consider Free operating systems at https://www.gnu.org/distros/free-distros.en.html

Debian is a good example of a mostly Free operating system ( https://www.gnu.org/distros/common-distros.en.html ). Unlike many completely Free operating system alternatives, its package repository is so extensive, one can find a variety of useful patent unencumbered options. They've also documented information on their polices regarding patented software. Perhaps surprisingly, the best places to find patent unencumbered and royalty-free operating systems are from commercial sources.

The following links give some information on Debian's policies toward patents and patent issues:

--- Patent Encumbered Software---

It's hard to pin down a definitive list of what software may be patent encumbered. Sometimes, even the developers of the software themselves are vague as to whether the software might infringe on patents or not. So, checking a program's web site for patent information may not always help. Typically, one will find software that uses certain compression/decompression algorithms or supports certain multimedia encoding/decoding on lists of patent encumbered software. Here are some lists of software that may have distribution issues.

--- Patent Unencumbered Multimedia Formats ---

One can help to avoid patent encumbered software by using royalty-free or patent unencumbered alternatives such as some of the following:

--- GIF format and LZW ---

A good example of patent related issues with software is the GIF format. Patents on LZW compression used by the GIF format were a main reason for creation of the PNG format. Even though the related LZW patents have expired, one still sees Free software that uses alternatives like libungif (library that encodes only uncompressed GIFs).

--- MPEG-1 issues ---

According to Wikipedia's article on smpeg ( http://en.wikipedia.org/wiki/SMPEG ), it sounds as if the MPEG-1 format is patent unencumbered. However, upon further reading they contradict the information in their MPEG-1 article ( http://en.wikipedia.org/wiki/MPEG-1 ) and state that a full MPEG-1 encoder/decoder cannot be implemented royalty-free because the MP3 audio format which is part of that standard still has several active patents on it.

One possible solution might be to remove the MP3 support in MPEG-1 software. It would be enough to allow viewing of educational information such as the MPEG 1 videos at:
HubbleSOURCE - http://hubblesource.stsci.edu/sources/video/clips/

--- Multimedia Patents ---

Information on when some multimedia patents expire:

--- Patent Unencumbered Software Options ---

This list covers software and builds of software that attempt to avoid patented code or code that is not royalty free.
  • xine-lib pruned - http://pkgs.fedoraproject.org/lookaside/pkgs/xine-lib/
    Pruned older version of xine-lib that has patent encumbered code stripped from it. Some lightweight xine front ends that can be used with it include xine-ui, flxine, toxine or vplayer. (Note: When I contacted the Fedora Project offering to help update this to a later version, they were very much against updating the pruned library and very impolite about the situation. I do have a later version of this library with patented code stripped.)

  • sox - http://sox.sourceforge.net/ - Sound eXchange, the Swiss Army knife of sound processing programs, can be built with only royalty free and patent unencumbered libraries and codecs.

Graphics programs that can built with patent unencumbered libraries and codecs include:

---===== FLIC Format =====---

---===== Animated PNG =====---

---===== Animated GIF =====---

---===== Ogg Theora =====---

---===== Ogg Vorbis =====---

The OpusFAQ - https://wiki.xiph.org/OpusFAQ - says that Ogg Vorbis and speex are being replaced by Opus. I haven't seen any Open Source projects specifically switch from Ogg Vorbis to Opus. However, Xiph.Org Foundation developers created Opus to replace Ogg Vorbis and recommend that projects switch to using the newer format.

---===== WebM and VPX =====---

--- Other Possibilities ---

As mentioned, one can remove the MP3 code from smpeg. There's a pruned older version of smpeg that does this. It might then be usable with other libraries and applications such as xine-lib, dumpmpeg.

Twolame - http://www.twolame.org/ - is optimized for MP2 (MPEG Audio Layer 2) and might provide an alternative to MP3.

--- What can you do? ---

The best way to encourage royalty-free and patent unencumbered software is to support Open formats that are patent unencumbered. As consumers, pick devices that can handle these Open formats. Share multimedia in patent unencumbered formats and encourage multimedia providers to offer these formats.

Here's a list of efforts to encourage patent unencumbered options.
LinkLeave a comment

Workarounds for I/O issues with Windows console programs and terminal emulators [Nov. 10th, 2016|12:00 pm]
[Tags|, , , , , , ]

If you've tried to run Windows console programs (such as pdcurses based applications) using a terminal emulator (rxvt, mintty) via msys (including msys2), you'll probably have I/O issues. Output may not appear properly on the screen.

There are two work-arounds for the issue.

1. Use software from a project that deals with console/terminal incompatibilities.

Winpty - provides and interface similar to a Unix pty-master for communicating with Windows console programs.

Alternative to MinGW and Cygwin and build scripts for various Open Source tools:

2. Run the program in a console instead of a terminal.

I have an article on setting up msys to work with the standard Windows console instead of a terminal at:

For alternatives to the standard Windows console, take a look at these projects.

ConEmu Console emulator - Unlike Console 2, this has a build file for gcc.

Console 2 - Command prompt replacement. May be used with cmd.exe or rxvt or other shells.

ConsoleZ - Console 2 fork with improved support for Windows Vista/7/8/10.
LinkLeave a comment

Windows and MinGW C/C++ resources [Nov. 10th, 2016|11:56 am]
[Tags|, , , , , , , , , ]

This post includes a list of resources for building applications and libraries for Windows using MinGW or similar projects.

Just wanted to note some of the native Windows porting projects I've worked on before I list some of the other projects out there. I've compiled the X server code and built a X server on Windows (similar to the Xming X server but with all my own patches). I'm looking into porting msh to Windows and other platforms (including patches for better handling of internationalization/UTF-8 character codes). I'm working on porting various core utilities based on Minix, BSD and custom implementations. I have patches and build scripts for several Open Source libraries and programs. See http://www.distasis.com/cpp/lmbld.htm for further details and a link to some of the scripts and patches. I work with regex and fnmatch libraries based on MIT licensed code from musl. musl uses regex code from the BSD licensed tre library. I also work with a BSD gettext implementation based on code put together for PostgreSQL. The libiconv and iconv implementations I use are written from scratch using custom UTF-8/internationalization code. I also have my own custom implementations of libmman, libdl and pthreads as well as other libraries I use to help with porting applications.

Places to download builds of various Open Source software and libraries for Windows and MinGW:

Many of the GNU libraries and programs patched and recompiled for MinGW.

Devpaks repository Libraries for the Dev-C++ compiler which uses MinGW. Could also be used without Dev-C++. Files should be standard tar.bz2 files renamed with .devpak extension.

OpenSuse Windows Packages has windows packages cross-compiled using MinGW on OpenSuse and the OpenSuse Build System (OBS).

ezwinports has ports of Unix and GNU software to MS-Windows.

MinGW packages repository

TakeoffGW - Cygwin style package manager and native Windows packages built with the OpenSUSE Build Service.

Patches and build scripts to build Open Source software for Windows:


MSYS and Cygwin alternatives:

Alternative to MinGW and Cygwin and build scripts for various Open Source tools:

GNU on Windows - lightweight alternative to Cygwin. Native Win32 programs.

Busybox port for Windows:
Lightweight versions of core utilities.

Busybox-w32 fork:

UnxUtils - Native Win32 ports of core utilities.

Unix Tools for Windows - Native Windows implementations emulating core utilities written in C++.

Native Win32 port of an older version of bash.

GNU Bash for Windows

WinZsh - Z shell for Windows

Xming X Server - Windows native X server

Open Source libraries patched for Windows:

Relocatable libintl for MinGW.

POSIX dynamic runtime library loading (libdl) compatibility routines.

POSIX mmap functionality.

Various POSIX functions implemented for Windows.

Winpty - provides and interface similar to a Unix pty-master for communicating with Windows console programs.

Pthreads and C/C++ 11 threads compatibility patches and implementations:

pthreads-win32 - Red Hat's POSIX thread library for Win32.

Simplified Pthread Emulation with Macros - Minimal pthread emulation.

TinyCThread - C11 threads implementation

c11threads - GNU compatibility headers for C11 thread support
LinkLeave a comment

[ viewing | most recent entries ]
[ go | earlier ]