Archive for the ‘Uncategorized’ Category

Test from mac journal

Monday, May 31st, 2010

Just a test ignore, blog in full screenThe OS X Shell explained.

Running Google Test on Snow Leopard, C++ TDD

Thursday, February 25th, 2010

A quick post from a coffee shop in Laos, I’m installing the Google Test framework on my OS X machine to do some TDD C++ work,

I’m using Make, and when I got to the instructions in the README explaining the how to run the sample tests …
### Using GNU Make ###
I ran into a problem ..


myosxmachine:make joe$ make clean && make
rm -f sample1_unittest gtest.a gtest_main.a *.o
g++ -I.. -I../include -g -Wall -Wextra -c ../samples/sample1.cc
g++ -I.. -I../include -g -Wall -Wextra -c ../samples/sample1_unittest.cc
g++ -I.. -I../include -g -Wall -Wextra -c ../src/gtest-all.cc
g++ -I.. -I../include -g -Wall -Wextra -c ../src/gtest_main.cc
ar rv gtest_main.a gtest-all.o gtest_main.o
ar: creating archive gtest_main.a
a - gtest-all.o
a - gtest_main.o
g++ -I.. -I../include -g -Wall -Wextra sample1.o sample1_unittest.o gtest_main.a -o sample1_unittest
ld: in gtest_main.a, archive has no table of contents
collect2: ld returned 1 exit status
make: *** [sample1_unittest] Error 1

Turns out there is an issue with ld and ar on OSX 10.6 .

Adding the ARFLAGS =-q -s to the sample makefile fixes the issue

Localising Rails

Wednesday, October 14th, 2009

I’m currently working on the  DIGITAL LIBRARY OF LAO MANUSCRIPTS which has been insteresting dealing with Fonts and various localisation issues. More later.

Getting started writting Flex based AIR applications from the command line

Monday, March 9th, 2009

There are couple or gotchas installing the latest  Open Source Flex and AIR SDKs.  Here are instructions to get started

Download the AIR and Flex SDKS

Get Flex from : http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK

Get Air from http://www.adobe.com/products/air/tools/sdk/

I installed them into /usr/local/flex_sdk and /usr/local/air_sdk

Add their bin directories to your path, in .profile or .bash_profile e.g.

export PATH=/usr/local/mysql/bin:$PATH:~/bin:/usr/local/flex_sdk/bin:/usr/local/air_sdk/bin

Make the compliers executable

sudo chmod +x mxmlc

sudo chmod +x amxmlc

It turns out the lastest version of the compiles scripts are dos terminated lines so you need to do

dos2unix mxmlc

dos2unix amxmlc

You can get dos2unix from macports , sudo port install dos2unix

(bug here :http://bugs.adobe.com/jira/browse/SDK-16699)

Next issue is the samples won’t compile, you will get an error “error while loading initial content”.

You need to update the namespace in your AIR project’s AppName-app.xml file to reflect the new AIR version 1.5:

<application xmlns="http://ns.adobe.com/air/application/1.5">

(from http://blog.sunild.com/2008/12/error-while-loading-initial-content.html)

Making autotest and growl a snap

Sunday, January 25th, 2009


sudo gem install growl-glue

In .autotest

require 'growl_glue'
GrowlGlue::Autotest.initialize

Easy

Apple embraces a little ruby with MobileME

Thursday, June 19th, 2008

I’m sure most of the Apple fan boys here have seen  Apples new improved .net offering, MobileMe.
It turns out that the MobileMe interface is built using an opensource  Ajax/Widget  toolkit called SproutCore.

Lets have a look on how you install SproutCore

sudo gem install sproutcore

Look familiar ?  View Helpers  are RHTML files e.g.

<%= label_view :my_label, :tag => ‘h1′, :inner_html => ‘Hello World!’ %>

The ruby stuff is only used in production, in a similiar way that GWT uses Java to generates the HTML and JS runtime files….

While SproutCore uses Ruby to generate static HTML and JavaScript files, you are not tied to Ruby or Rails in production.  SproutCore runs in the browser, your production system can use whatever backend you want, as long as it sends JSON to the browser.