boyfarrell.com Archives: Learning Curve
· previous page
26 April 2007
malloc: *** Deallocation of a pointer not malloced: 0×500120; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
I keep on getting this error all afternoon when a Cocoa application. It basically means ‘you are releasing something twice’. e.g. WRONG! … //lovely code … [object release]; … //lovely code making you forget things … [object release]; CORRECT! … //lovely well behaved code … [object release]; … //lovely well behaved code not at all [...]
continue reading... » 3 Comments
11 January 2007
evTics.app
A little app for working with wavelength (nm) electron-volt (eV) plots in gnuplot. It will generate a gnuplot command which will place ‘nicely spaced’ electron volt (eV) tic marks on the second x axis (x2) using setx2tics(). Usage 1) Type in the range of you wavelength axis in the start and top fields, then, 2) [...]
continue reading... » One Comment
3 October 2006
Linked Axes In gnuplot
It is sometimes nice to display two x or y axes, when there is a well defined transformation between the two. For example, it is common to see value plotted against of wavelength (nm) and photon energy (eV) or alternatively wavelength (nm) and photon frequency (Hz). These plots have so called ‘linked axes’. Unfortunately, this [...]
continue reading... » 0 Comments
2 March 2006
Cocoa Data Reader
Please find the a class that reads columns of data using NSString and NSArray methods over in the projects/read section.
continue reading... » 0 Comments
21 January 2006
long double datatype on MacOS
I recently found out from a scitech@listsapple.com posting that the way long double is defined on MacOS PPC hardware does not increase the range of available numbers; it only addings to the precision of the calculation. “Long double on Tiger is formatted as a 128 bit head to tail pair of doubles. The first double [...]
continue reading... » 0 Comments
12 January 2006
Thinking about objects
I was doing something completely unrelated to this topic when for some reason I thought of a nice way to explain object orientated programming in an easy to understand way (by the way I should say the book that made it click for me was Stephen Kochans’ Programming in Objective-C). Most arguments start out my [...]
continue reading... » 0 Comments
29 November 2005
MacOS UNIX Terminal Commands
This is all | ever seem to use! cd = change directorycd ~ = change directory to your home (the tide character always mean home to MacOS)cd / = change directory to the rootls = list file in directoryls -a = list all (even invisible files)ls -al = as above but with metadata printed too.mkdir [...]
continue reading... » 0 Comments
6 November 2005
Objective-C Vector Class
Here is a custom Vector class I have been working on: Vector.h and Vector.m. Please find the archived Xcode 2.1 project file. The Vector class is a wrapper class for a standard C array but with many methods which you might want to use on your own data. It makes it easy to handle large [...]
continue reading... » 0 Comments
2 November 2005
Xcode and gnuplot
I am new to programming and I’m new to the MacOS X platform. As such I am indebted to those clever people at MacOSX.com and Cprogramming.com for the time spent answering my questions on, how to get gnuplot and working with macOS applications. We want to installing gnuplot and make it work from inside Xcode [...]

