The autoconf guide to portable shell
Subsidiary tip of the day: read all the above.
Then, read this: Filenames in shell.
Then, bookmark this Bourne miscellany.
Subsidiary tip of the day: read all the above.
Then, read this: Filenames in shell.
Then, bookmark this Bourne miscellany.
Top tip of the day: don’t quote backticks when setting variables. Their content is not split, though everyone seems to do it, and it’s not portable. You also don’t need to quote anything that is used at the head of a case statement. Keep quoting variables everwhere else though! (Surely you’re not like a certain unnamed company where, despite my gentle urgings against bashisms and shell malpractice, we still can’t do a build from a checkout into a path with spaces?)
Finally, I excised a really nasty bit of code from a script we actually send to customers which was lifted from an old version of autoconf. It attempts to use echo to perform a simple printf %s ... by testing for all the platform-specific switches like -n and \c. Don’t do this! The last shipping OSes without printf were SysVR3 (until 1988) and SunOS 4 (until 1994). If you love your really old shells just too much, at least do what autoconf 2.50 does and use printf first if it’s available (testing with an eval, of course, because, as usual, it might not be on your PATH on Solaris…).
Good day!
From a complexity-control point of view, threads are a bad substitute for lightweight processes with their own address spaces; the idea of threads is native to operating systems with expensive process-spawning and weak IPC facilities.
Wrote a workaround for a WinSock bug (unbelievable that they can ship with these problems). Calling setsockopt with an IPPROTO_TCP option on a socket doing a non-blocking connect silently fails, despite the fact that the socket is bound irrevocably as a genuine TCP socket, just not yet readable or writeable. Just one stupid company’s stupid code.
Slow Bugzilla day, as they say. Today’s top item, “VNC Viewer ‘New Connection’ window is missing a 'minimise’ button”, has a surprising resolution: INVALID! Join in the conversation, and add your comments to the story now.
Windows NT® 4.0 (also known as the Shell Update Release) has been garnering much attention for its new usability and performance improvements. But there’s much more to Windows NT 4.0 than just the pretty Windows® 95 user interface.
Big day! Up at 6.10, but didn’t get a Raspberry Pi, sadly.
Was graciously granted a FreeBSD build machine at work and spent lunchbreak getting my port to run smoothly. It’s now the fastest of all platform builds, has the most comfortable shell environment to work in of all our build VMs, and will probably be supported for longer and better and run more stably than our assorted cronky old Linux platforms we support, the contemporaries of the slick, shiny, FreeBSD 7 box we now have. I’m not satisfied or anything; it’s just the beauty of those TWM hues in Xvnc that makes me smile.
I heard from Adrian today, still in Barcelona, that the WebSockets plugin from last month actually (somewhat?) works, provably now that we have a viewer for it.
Working hard on some proposals for the next version of RFB. Draft 1 of the very first informal scoping document is already overwhelmingly formalistic, but at least the LModern is friendly and inviting. I’m hoping that without too much work we make the new messages we introduce readily can be transport-agnostic (currently, RFB requires a reliable transport). This is handy because a 16×16 tile is a perfect UDP packet, so if I get it right, we should manage to make a neat and lightweight flow control that’s powerful enough to allow framebuffer updates over UDP. That’s very important down the line for mobile access, because it’s a killer when you’re constrained by the TCP stack doggedly resending stale pixel data.
Finally, the fifth most important operating system of the year released its consumer preview today, in case you were living under a rock. I gave it a spin, and it seemed pretty unsurprising. Deep down, I know that all these years they’ve been working hard on producing a wonderful bourne shell for us, but as far as I can tell, it’s just too ambitious for them to quite make the next release with it, but maybe in Windows 2012R1… It has some new runtime of some sort, WinRT, or so I gather from co-workers, but I don’t get the hype. It’s the same old beast as NT4 really, with a bit of boring UI work that grabs the press. Luckily, there’s more interesting systems programming going on elsewhere at the moment.
See also Avoiding Linuxisms. POSIX is a marvellous thing!
What this means is that I’ve just finished all the tweaks to compile and run our product natively. Happy.
Installing “BeyondTrust® PowerBroker® Identity Management Services Open Edition formerly-known-as-Likewise-Open”. We laugh at these guys a lot in the office, every time we have to support their product. With a name like that, it’s bound to be good.
BLEST pair of Sirens, pledges of Heaven’s joy,
Sphere-born harmonious Sisters, Voice and Verse,
Wed your divine sounds, and mixed power employ,
Dead things with inbreathed sense able to pierce;
And to our high-raised phantasy present
That undisturbèd Song of pure consent,
Aye sung before the sapphire-coloured Throne
To Him that sits thereon,
With saintly shout and solemn jubily;
Where the bright Seraphim in burning row
Their loud uplifted angel trumpets blow,
And the Cherubic host in thousand quires
Touch their immortal harps of golden wires,
With those just Spirits that wear victorious palms,
Hymns devout and holy psalms
Singing everlastingly:
That we on Earth, with undiscording voice,
May rightly answer that melodious noise;
As once we did, till disproportioned Sin
Jarred against Nature’s chime, and with harsh din
Broke the fair music that all creatures made
To their great Lord, whose love their motions swayed
In perfect diapason, whilst they stood
In first obedience, and their state of good.
O, may we soon again renew that song,
And keep in tune with Heaven, till God ere long
To his celestial consort us unite,
To live with Him, and sing in endless morn of light!
This guy has some good rants on websockets, saving me the trouble. I’m strongly annoyed by the deficiencies of some aspects of the spec, which forces framing logic into the application layer unnecessarily and expensively, given that it’s stupidly mandated that the underlying protocol is TCP. I find this stuff very frustrating, and think that when we publish a recommendation for “RFB over the WebSockets transport” we’ll just throw out framing altogether. Our RealVNC server and websockify.js ignore the underlying framing and add in a cheap frame header on every flush, which I think is going to have to be the way to go for serving protocols expecting an underlying stream.
A very interesting opinion piece. Somewhat argumentative, but I think actually sound.