More Than Nothing

“You mean you can't take less; it's very easy to take more than nothing.”

Archive for the ‘Languages’ Category

Object initialisation in rose

Posted on February 24, 2009 by [ICR] under Languages, Programming, Rose

Recently I’ve been thinking more about a toy language I have created called rose. It’s largely an exercise to teach myself about some of the difficulties of language design, giving me a greater understanding and apreciation of the languages I work in. Some of the guiding features of rose are immutable-by-default fields and as few [...]

No Comments | Read the rest of this entry »

A case for depreciating the decrement operator (oh, and increment too)

Posted on November 27, 2008 by [ICR] under Languages, Programming, Rants

If you ever read any of my code you’re probably likely to come across something like this, and equally likely to find it a little bizarre. for (int i = 0; i < length; i += 1) { // Some code } I have issues with the standard increment and decrement operators in C style [...]

1 Comment | Read the rest of this entry »

Parsing a mini-helper language

Posted on February 5, 2008 by [ICR] under Computers & Technology, Languages, Programming

I often find myself creating elaborate spreadsheets to help with things. Usually it amounts to cells with huge nested if statements which, if you’ve never used an Excel style language, looks like this: =IF(D3″”,IF(A3=0, IF(D3=0, 0, 1), “-”),”") And that’s a simple example. The basic syntax is IF(Pred, Then, Else) and nesting them all on [...]

No Comments | Read the rest of this entry »

A proposal for const functions in C#

Posted on January 15, 2008 by [ICR] under C#, Languages, Programming

As I move more and more towards a functional style of programming I often find myself using referentially transparent functions in amongst the rest of my C# code. A referentially transparent function is basically one that guarantees that it has no side-effects (modifies anything outside of the function) such that every time you call it [...]

1 Comment | Read the rest of this entry »

The syntax of IronTuring

Posted on November 21, 2007 by [ICR] under Languages, Programming, Turing.NET

I’ve had a few issues with moving from VS2008 beta 2 to the release version, so have not really been able to progress with the code for IronTuring. This has lead me to step back and think a little harder about the syntax I am using in terms of implementation (I know design and implementation [...]

No Comments | Read the rest of this entry »

Introducing IronTuring

Posted on November 21, 2007 by [ICR] under Languages, Programming, Turing.NET

I've been wanting to look into compilers (lexer and parser) for a while now, and recently decided to scratch my itch and design and write the compiler for a toy language I've called IronTuring. The language defines a simple Turing machine (a variation of a Finite State Automaton) which can then be compiled either into [...]

No Comments | Read the rest of this entry »

Truth Table Generator

Posted on November 19, 2007 by [ICR] under Languages, Mathematics, Programming, Python

Combining my desire to learn more about parsing and the need for an ability to check various truth tables I have made a program that will take an expression and output a truth table for it. http://www.atomice.plus.com/TruthTables.zip It was written in Python, so you’ll need to download the runtime. You can either run it from [...]

1 Comment | Read the rest of this entry »

Secrets of the "using" statement

Posted on June 2, 2007 by [ICR] under C#, Languages, Programming

C# has a lot of syntactic sugar (and from what I understand Visual Basic even more so). However, often this syntactic sugar hides more than is at first obvious. Take, for example, the “using” statement. This statement basically means “Create this variable and then, when you exit the following code block, call this variables Dispose [...]

No Comments | Read the rest of this entry »

A day wasted on frivolous coding

Posted on September 1, 2006 by [ICR] under Languages, Programming

I had planned today to have a hard days slog watching the remainder of Firefly. Unfortunately, however, I got a little sidetracked. My girlfriend linked me to a little problem one of her friends had been having. It involved finding an algorithm using stacks to create a random permutation of numbers. I couldn't find an [...]

No Comments | Read the rest of this entry »