Saturday, September 25, 2010

Turtle Diophantine

If you spend exactly 920 pesos, how many pizzas can you buy at @160 and @120

Update 26 September
Blank asks Does yours work ok with:

small $11
large $17
total $1000

Thanks for the alternate solution. Yes, my solution works for all (positive) integers. It uses repeat until rather than repeat 10 in the solution you supplied. If there are a large number of solutions, they will print off screen though.

en espaƱol in Spanish

Labels: , ,

Monday, September 13, 2010

Pippy sliderule

Sliderule for Pippy on Sugar
Use arrow keys to move upper scale

Create more markings at useful intervals
Create alternate scales, CI, A, K, S, T, LL, Ln
Add a cursor
Mouse input
Circular sliderule
Replicate all the features at

Note blog messes up indenting

# sliderule

import pippy, pygame, sys
from pygame.locals import *
import math

# always need to init first thing

# create the window and keep track of the surface
# for drawing into
screen = pygame.display.set_mode()

# turn off the cursor

color = (0, 0, 0)
bgcolor = (250,250,250)
rdisp = 0

def drawnum(posx, posy, num):
fsize = 25
msg = str(num)
font = pygame.font.Font(None, fsize)
text = font.render(msg, True, color)
textRect = text.get_rect()
textRect.centerx = posx
textRect.centery = posy
screen.blit(text, textRect)

def drawbox(rightdisp,downdisp,markdisp):
pygame.draw.line(screen, color, (rightdisp+100, downdisp), (rightdisp+800, downdisp))
pygame.draw.line(screen, color, (rightdisp+800, downdisp), (rightdisp+800, downdisp+100))
pygame.draw.line(screen, color, (rightdisp+800, downdisp+100), (rightdisp+100, downdisp+100))
pygame.draw.line(screen, color, (rightdisp+100, downdisp+100), (rightdisp+100, downdisp))
for i in range (1,10):
pygame.draw.line(screen, color, (rightdisp+700*math.log10(i)+100, downdisp+markdisp), (rightdisp+700*math.log10(i)+100, downdisp+markdisp+20))

def draw2box():


# events
while pippy.pygame.next_frame():
for event in pygame.event.get():
if event.type == QUIT:

if event.type == KEYDOWN:
if event.key == K_ESCAPE:
elif event.key == 275:
rdisp += 10
elif event.key == 276:
rdisp -= 10

Labels: , , ,

Sunday, September 12, 2010

Turtle sliderule

Turtle sliderule for Turtle Blocks on Sugar (or Gnome)
Use A and D to move upper scale

Complete the rectangle representing each slider
Create more markings at useful intervals
Create alternate scales, CI, A, K, S, T, LL, Ln
Add a cursor
Mouse input
Circular sliderule
Replicate all the features at

(note there is a redundant multiply by 1 operation to circumvent a Turtleart bug, V96, fixed in V99)

Labels: , ,

Wednesday, September 08, 2010

Legends and Poems from the Land of the Sleeping Crocodile

AI KNANANUK HO AI KNANOIK NOUSI RAI TIMUR RAI NOUSI LAFAEK DUKUR or Legends and Poems from Timor the Land of the Sleeping Crocodile was written by Cliff Morris.

The following biography comes from A Traveller's Dictionary in Tetun-English and English-Tetun from the Land of the Sleeping Crocodile East Timor

"Cliff Morris went to East Timor as a twenty year old soldier during 1942 where he learned about the complexities of the Animist religion and to admire the Timorese people for their common human concern for all people. On visiting the island in 1973 accompanied by his son Peter, he learned how the friendship so freely given in 1942 had cost the people very dearly in the revenge carried out by the Japanese, after the departure of the Australian troops."

"He resolved to commit his life to do something of everlasting good for the people. For ten years he struggled to completing a 10,000 word Tetun-English dictionary from his own fading memory, then with the help of Paulo Quintao da Costa who authenticated the word list, it was finally published by the Australian National University in 1984 as a memorial to all those who lost their lives in Timor in the war against the Japanese. In 1983 he travelled Australia looking for people who were well versed in the story telling of the Animist religion and from this work produced a small book containing some of the village stories and poems to save them from being lost as they are probably no longer told in their country of origin."

The book, Legends and Poems from Timor the Land of the Sleeping Crocodile, has been digitised and made available, free, to schools in East Timor by the Seaton OLPC User Group and Caval. Thanks to Caval for investigating copyright and digitising at no cost.

Contents ....... 2MB pdf
Chapter 1 ...... 6MB pdf
Chapter 2a .... 7MB pdf
Chapter 2b .... 5MB pdf
Chapter 3 ...... 13MB pdf
Chapter 4a .... 6MB pdf
Chapter 4b .... 6MB pdf
Chapter 4c .... 9MB pdf
Chapter 4d .... 2MB pdf
Chapter 5a .... 8MB pdf
Chapter 5b .... 5MB pdf
Chapter 5c .... 4MB pdf
Chapter 6 ...... 1MB pdf
Chapter 7 ...... 7MB pdf
Uncorrected OCR 245kB text

Labels: , , ,

Saturday, September 04, 2010

Software Freedom Day is an event held all over the world to celebrate and raise awareness of free software and open source software.

I will be giving a half hour talk on Sugar, the operating system of the OLPC laptop at 12:30 on Saturday 18 September 2010, at the State Library of Victoria, Melbourne Australia.

Update, 18 Sept

Photo from the event,
(thanks Jiri)

Labels: ,