Dotfile Maintenance

Here is a party I’m a bit late in joining. And it is one of those ideas that makes you smack your head wondering why you didn’t think of it. Config file tweaks For years, I’ve maintained a tar.Z bundle that contains a .profile, .cshrc, .bashrc, .vimrc etc. You can tell how old it is by the fact that I still maintain it with compress rather than gzip. When I started it, gzip did not exist.

Read more »

Dairying in Mongolia

This will be a bit off from the normal fodder for this blog, but I thought it was interesting. Lets start with a bit of biology. Babies naturally produce an enzyme called lactase that allows them to digest the main sugar component of milk - lactose. Many (globally it would be most) people lose that ability near puberty. This leads to lactose intolerance and the GI issues it can cause. Many people of European heritage, however, are lactase persistent and maintain the ability to digest lactose - to the delight of the dairy industry.

Read more »

Musical Sensors

Vibrating cantilevers has a long history of being used as sensors, but almost always in the micro-domain. The cantilever is frequently etched into silicon or other substrate. The weight of even single molecules can be measured or detected. The idea is fairly simple. Change the distribution of weight on the cantilever, and the frequency of vibration will change. It can even be used as a motion detector since acceleration in the same plane as the natural vibration will either start the cantilever vibrating or will change the frequency of the vibration.

Read more »

Onyx Spec Page

I figured I better at least start the Onyx Spec page, so I did. You can find it in the Menu. Built in types are there now. Onyx Spec

Read more »

Onyx Specification

Built-in Types Integral: int - 32 bit signed integer byte - 8 bit unsigned integer bigint - 64 bit signed integer May need to add a few more but they will all have form intnn (e.g. int16 or int8) There are no unsigned versions except byte. implicit conversion can only widen, but cannot narrow. Narrowing conversion can be explicitly requested. Narrowing conversion will throw an exception if the source value is out of range.

Read more »

The Onyx Project

I have decided to design, and build my own computer language. It will be called Onyx. I agree, that is a pretty big task. So we will take a bit at time. Design Criteria I don’t really have a whole lot yet. You might think of onyx as C++ EXCEPT - meaning, it acts like C++ EXCEPT these differences. Over time the list will grow and I’ll turn it into a full-feature language spec.

Read more »

Spirit X3 Separate Lexer - Part I

Back in this post, I said about Spirit .. …it would be very feasible to write a lexical analyzer that makes a token object stream available via a ForwardIterator and write your grammar rules based on that. But is it ? really? The short answer is - Yes it is feasible, but probably not a good idea. The long answer is the journey we’ll take on the next two posts.

Read more »

Static Exceptions

Dynamic Exceptions have their flaws. Herb Sutter has proposed a replacement known as Static Exceptions . Lets look at it a bit. Before we do, we need to look at the C+11 feature std::error_code std::error_code and Friends Anyone who has done any coding in C knows about good old errno, the global int that many system functions will set to signal a problem. This, of course, has many problems, not the least of which is that different platforms could and did use different integer values to represent the same error.

Read more »

MSSQL Pivot

Pivots (turning a column’s values into actual columns) is a very common activity. Spreadsheet programs have robust support for it. But Standard SQL? Not so much. The Problem Create Table orders ( orderNumber int, sku char(3), quantity int, salesPerson varchar(10) ); insert into orders values ( 1, 'ZR34', 2, 'Mary'), ( 1, 'AS99', 1, 'Mary'), ( 2, 'ZR34', 1, 'Jim'), ( 2, 'MB01', 1, 'Jim'); The ubiquitous order table with the SKU, quantity and sales person.

Read more »