Archive

Archive for the ‘computing’ Category

Control Flow Graph Linearisation in OWL BASIC

February 14th, 2010 Robert Smallshire No comments

To compile the code comprising an OWL BASIC procedure, function or main program into CIL, we must linearise the Control Flow Graph (CFG) representing the program statements. The CFG undergoes many transformations during compilation, for example to eliminate unreachable code or convert GOSUB routines into named procedures. Generation of CIL using Reflection.Emit requires [...]

Read the rest of this entry »
Categories: .NET, OWL BASIC, computing Tags: ,

OWL BASIC produces its first executable

August 4th, 2009 Robert Smallshire 4 comments

After a long haul, and diversions into other more important projects — including starting a family — OWL BASIC today produced its first executable. Its not much. In fact its hardly anything. Just 2048 bytes of Windows PE executable containing the global variable declarations from Acornsoft’s 1982 Sphinx Adventure. Each file of BASIC source [...]

Read the rest of this entry »
Categories: .NET, IronPython, OWL BASIC, Python, computing Tags:

In C++ throw is an expression

July 31st, 2009 Robert Smallshire 9 comments

After 15 years programming in C++, I was surprised to discover today that throw in C++ is an expression rather than a statement. As a result, throw may be used as part of larger expressions.

int x = 5;
int y = x > 4 ? x : throw std::out_of_range;

The only use I’ve found for this — [...]

Read the rest of this entry »
Categories: C++, computing, software Tags:

Installing Eclipse on Windows Vista

July 27th, 2009 Robert Smallshire 5 comments

Eclipse doesn’t come with an installer for Windows. As a result of this, installing Eclipse into Program Files is very awkward without getting into a tussle with User Account Control, and virtualisation of the Program Files directory.
After far too much effort I have finally found a sequence that Works For Me™ on Windows Vista [...]

Read the rest of this entry »
Categories: computing, software Tags: , ,

An unofficial Europython 2009 retrospective

Europython 2009 was my first Python conference, this being the first year that I’ve been able to use Python professionally for application development. We’d made a decision that if we were to be using Python commercially, we should be active within the Python community, so two of our team travelled from Norway to Birmingham, UK. [...]

Read the rest of this entry »
Categories: Python, Uncategorized, computing, software Tags:

String compatibility between Python implementations

June 18th, 2009 Robert Smallshire 3 comments

Jython and IronPython run on platforms where strings are unicode capable by default. Both implementations have chosen to make str essentially an alias for unicode in Python source code. The bytes type, introduced in PEP358 as part of transition to fully unicode Python 3.0, is unambiguously a sequence of single byte values. We can see [...]

Read the rest of this entry »

IronPython hammers CPython when not mutating class attributes

May 22nd, 2009 Robert Smallshire 6 comments

Earlier today I posted the second article in what is turning out to be a short series in the investigation into why the performance of IronPython is around 100× slower than CPython, when running the front-end of my OWL BASIC compiler.
The most informative comment was from Curt Hagenlocher who works on IronPython in the Visual [...]

Read the rest of this entry »
Categories: .NET, IronPython, Jython, Python, computing, software Tags:

IronPython 2.0 and Jython 2.5 performance compared to Python 2.5

IronPython 2.0 can be hundreds of times slower than CPython on some microbenchmarks. Jython 2.5 can scale better than CPython on those same benchmarks.

Read the rest of this entry »

Dismal performance with IronPython

May 17th, 2009 Robert Smallshire 2 comments

IronPython can be slow – 10x to 100x slower than CPython on real-world code and it has been observed to be up to 6000x slower.

Read the rest of this entry »

OWL BASIC runtime library takes shape

February 11th, 2009 Robert Smallshire 2 comments

For a useful re-implementation of BBC BASIC, especially in compiled form, a run-time system is needed to provide services to the running program which cannot be directly provided by the operating system. In the case of our OWL BASIC implementation, we are targeting .NET so we already have a very sophisticated run-time in the [...]

Read the rest of this entry »