Tag: Languages
-
Getting the POSTPONE word to work in Forth
I have struggled with this issue for several weeks now and I didn’t find the explanations in Starting Forth or the 2012 Forth standard or even the GForth documentation particularly enlightening, so I wanted to write this to – hopefully – add some clarity to anyone else trying to get this right in their own…
-
Passing by reference in C++ – a downside
Once you realise what is happening this is obvious, but it took me a while… I wanted to write some longs out as character strings in C++, so wrote some code like this: But compile time error after compile timer error followed as I was told that I could not use this code with unsigned…
-
Plunging deeper
For the last month I have been working hard on some C/C++ code to simulate a 16 core computer. I had already got some code that did this – written in Groovy – but the limitations of the Java VM made it just too difficult to write efficient code to do what I really wanted…
-
Code Club first session
At last managed to lead my first “Code Club” session – it had a slightly chaotic start as none of the computers we were using had Scratch installed and nor did we have access to a login that allowed us to install Scratch in the Windows “Programs” directory – but once we worked around that…
-
The expressive power of BASIC
As I have been working on BINSIC – my reimplementation of BASIC as a domain specific language via Groovy– I have been increasingly struct by how unbelievably awful BASIC is (at least in the ZX80/ZX81 dialect that I am basing all this on). My memories of it are of a fun language where it was…
-
Is Groovy back in fashion?
Last year I was taught “Object Orientated Design and Programming” as part of my Birkbeck MSc, using Groovy, a dynamic functional language built on top of Java and running on the Java VM. I enjoyed it and liked Groovy – I went on to write some pieces of software for my MSc project using it.…
-
An example of the poor editing in O’Reilly’s “Programming Android”
OK, I don’t really want to sound like I am bashing this book – Programming Android: Java Programming for the New Generation of Mobile Devices – because, by its very nature, writing a technical book must be highly demanding in terms of accuracy and I see no signs of any mistakes – just what I…
-
My first R program
Having used Groovy (which makes the scripting environment feel familiar) and some Scheme (via Structure and Interpretation of Computer Programs), R does feel completely alien, but it still feels like a steep learning curve. But here’s my short script – And here’s the graph (of Linux kernel compile times) it generates – the blue line…
-
Writing more code to avoid writing any of the report?
I have managed to churn out 160 lines of working C today – which I think is quite good going, though, according to this, maybe I could have churned out 400 of C++ or even 960 of Perl (I love Perl but the mind boggles). My program will tell you how pages pages are present…
-
Performance collapse in the Open JVM
Unfortunately, I do not have time to investigate this further myself, but others may do. But yesterday I had a serious performance issue with the (open) JVM – though I was able to solve it with an algorithm change – swapping the problematic (integer) code for a lot of floating point maths: not the usual…