Posts

What Microsoft Can Do to Make Me Hate Windows a Little Less

Those who know me know that I have little love for Microsoft Windows.  The platform is a special snowflake, and coming from a Unix background (real UNIX , not Linux, btw), every time I'm faced with Windows I feel like I'm in some alternate dimension where everything is a little strange and painful. I have to deal with Windows because of applications.  My wife runs Quickbooks (which is one of the more chaotic and poorly designed bits of software I've run across), the kids have video games they like.  I've had to run it myself historically because some expense report site back at former employer AMD was only compatible with IE.  I also have a flight simulator for RC aircraft that only works in Windows (better to practice on the sim, no glue needed when you crash, just hit the reset button.) All of those are merely annoyances, and I keep Windows around on one of my computers for this reason.  It's not one I use primarily, nor one I carry with me when I travel. ...

On Misunderstandings

Yesterday there was a flurry of activity on Twitter, and in retrospect, it seems that some have come away with interpretations of what I said that are other than what I intended.  Some of that misunderstanding is pretty unfortunate, so I'd like to set the record straight on a couple of items now. First off, let me begin by saying that this blog, and my Twitter account, are mine alone, and are used by me to express my opinions.  They represent neither illumos nor Lucera , nor anyone or anything else. Second, I have to apologize for it seems that I've come across as somehow advocating either against diversity (whether in the community or in the workplace) or in favor of toxicity. Nothing could be further from the truth.  I believe strongly in diversity and an inclusive environment, both for illumos, and in the work place.  I talked about this at illumos day last year  (see about 13:30 into the video, slides here ), and I've also put my money where my mouth ...

A Space Shooter in Curses

Image
Some of you who follow me may know that I have recently built a pretty nifty framework for working with terminals.  ANSI, ASCII, VT100, Windows Console, etc.  Its called Tcell , and located on github.  (Its a Go framework though.)  It offers many of the same features as curses, though it is most definitely not a clone of curses. Anyway, I decided it should be possible to write a game in this framework, so I wrote one. I give you Escape From Proxima 5 , a 2D multi-axis scrolling space shooter written entirely in Go, designed to operate in your text terminal The game is fairly primordial, but there is a playable level complete with enemies and hazards.   It's actually reasonably difficult to get past just this first level. Mostly the idea here is that you can get a sense of what the game engine is capable of, and see Tcell in action. As part of this, I wrote a pretty complete 2D game engine.  Its got rich sprite management with collision detection, ...

Fun with terminals, character sets, Unicode, and Go

Image
As part of my recent work on Tcell , I've recently added some pretty cool functionality for folks who want to have applications that can work reasonably in many different locales. For example, if your terminal is running in UTF-8, you can access a huge repertoire of glyphs / characters. But if you're running in a non-UTF-8 terminal, such as an older ISO 8859-1 (Latin1) or KOI8-R (Russian) locale, you might have problems.  Your terminal won't be able to display UTF-8, and your key strokes will probably be reported to the application using some 8-bit variant that is incompatible with UTF-8.  (For ASCII characters, everything will work, but if you want to enter a different character, like Я (Russian for "ya"), you're going to have difficulties. If you work on the console of your operating system, you probably have somewhere around 220 characters to play with.  You're going to miss some of those glyphs. Go of course works with UTF-8 natively.  Which ...

Tcell - Terminal functionality for Pure Go apps

Introducing Tcell  - Terminal functionality for Pure Go apps As part of the work I've done on govisor , I had a desire for rich terminal functionality so that I could build a portable curses-style management application. This turned out to be both easier and harder than I thought. Easier, because there was an implementation to start from --  termbox-go , but harder because that version wasn't portable to the OS I cared most about , and fell short in some ways that I felt were important.  (Specifically, reduced functionality for mice, colors, and Unicode.) This led me to create my own library; I've made some very very different design choices.  These design choices have let me both support more platforms (pretty much all POSIX platforms and Windows are included), increase support for a much richer set of terminals and terminal capabilities, etc. The work is called " Tcell " (for terminal cells, which is the unit we operate on -- if you don't like the...

On Go, Portability, and System Interfaces

I've been noticing more and more lately that we have a plethora of libraries and programs written for Go, which don't work on one platform or another.  The root cause of these is often the use of direct system call coding to system calls such as ioctl().  On some platforms (illumos/solaris!) there is no such system call. The Problems But this underscores a far far worse problem, that has become common (mal)-practice in the Go community.  That is, the coding of system calls directly into high level libraries and even application programs.  For example, it isn't uncommon to see something like this (taken from termbox-go ): func tcsetattr(fd uintptr, termios *syscall_Termios) error {         r, _, e := syscall.Syscall(syscall.SYS_IOCTL,                 fd, uintptr(syscall_TCSETS), uintptr(unsafe.Pointer(termios)))         if r != 0 {             ...

Announcing govisor 1.0

Image
I'm happy to announce that I feel I've wrapped up Govisor to a point where its ready for public consumption. Govisor is a service similar to supervisord , in that it can be used to manage a bunch of processes.  However, it is much richer in that it understands process dependencies, conflicts, and also offers capabilities for self-healing, and consolidated log management. It runs as an ordinary user process, and while it has some things in common with programs like init, upstart, and Solaris SMF, it is not a replacement for any of those things.  Instead think of this is a portable way to manage a group of processes without requiring root.  In my case I wanted something that could manage a tree of microservices that was deployable by normal users.  Govisor is my answer to that problem. Govisor is also written entirely in Go, and is embeddable in other projects.  The REST server interface uses a stock http.ServeHTTP interface, so it can be used with various ...