Pages

Wednesday, January 23, 2013

Sranan Tongo


Sranan Tongo is a creole language spoken by most people in Suriname. It is the mother tongue of about 100,000 people in Suriname who are descendants of slaves brought from Africa during the colonial period. It is also the lingua franca between different ethnic groups in Suriname. Today many Sranan Tongo speakers also live in the Netherlands.

Features of Sranan Tongo. Sranan is similar to Aukan and Saramaccan. As a creole language it is characterized by simple morphology and a relatively small vocabulary. There is no inflection or declension in the words. Although it is impossible to know for sure how many words there are in Sranan, they number in the several thousand, rather than hundreds of thousands for major world languages. These features make it a relatively easy language to learn.

Odi en grantangi gi luku disi e piki.  Hello and thank you very much for looking at this information.

Being a Creole, Sranan Tongo uses words like: e aux.v. indicates that the action of the verb is still in progress or that it repetitive is. Yu no e si taki mi e tnapu dya e wakti yu! Can’t you see that I’m standing here waiting for you? Although I could not find a reason for the use of "e" before the word "si", I am guessing it is like saying: "You not seeing..."

 What I like about this language is that it has a much smaller vocabulary when compared to other world languages which allows some ambiguity but also allows the speaker to simply get to the main point and say it.
Another thing I like is how words are formed or put together like the word for Dictionary - Wortubuku literally "Word-Book". The word for Language - Tongo (tongue), Leriman - Teacher; a learned person.

Didibri tesi Yesus fotenti dei langa. The devil tempted Jesus for forty days.

There is an online New Testament version of Sranan Tongo here, you can read and listen to the text.



Fa waka? - What's up? Literally: how's (your) walk ( FA-WA-KA)
Fa i go? - How are you? Literally: how's (it) going? ( FAI-GO )
e go! - it's going! (answer) ( I-GO )
Fa yu tan? - How are you? ( FA-YOU-TAN )
Ala suni bun? - (is) everything well? ( ALLA-SANNY-BOENG )
Mi lobi dati! - I love that! ( ME-LUBY-DATY )
Mi sorri! - I'm sorry! ( ME SORRY )
Omeni wan? - How much is one? (What's the price?)
Mi gwe! - I'm leaving
Mi de go na oso - I'm going home
Mi go na winkri - I'm going to the store
Su-ma na yu? - Who are you? ( SUE-MA-NA-YOU )
Pe yu e go? - Where are you going? ( PAY-YOU-AH-GO )
Pe yu e de? - Where are you? ( PAY-YOU-AH-DAY )
Omany? - How much? ( O-MANY )
Yepi! - Help ( YEPY )
Pe disi presi? - Where's this place? ( PAY DEE-SEE PRACY)
Soot bus mi mus teki? - What bus must I take? ( SOOT BUS ME MUZ TAKY )
Skowtu! - Police! ( SCOW-TWO )
Pe de skoru de? - Where's the school? ( PAY-DAY-SCEW-RUW DAY )
Pe yu de wroko? - Where do you work? ( PAY-YOU-ROCK-O-GI )
Pe mi kan fini wroko? - Where can I find work? ( PAY-ME-KAN-FINY-ROCK-O )
Kantoro - Office

Saturday, January 12, 2013

Sousic - a brief introduction

Dhi es Introduction a SousicSousic es practical literar Lugha. It es practical Lugha pro Literatur.

This is an introduction to Sousic. Sousic is a practical literary language. It is a practical language for literature.

Unlike most "conlangs" which are made to be spoken as an international second language,  Sousic is a language for readers. It is designed for optimal ease of reading.

The orthography of Sousic has the following characteristics:

  • very strict
  • naturalistic
  • no diacritics
  • Latin alphabet
  • computer friendly
  • simplified but not simplistic
  • designed for optimal ease of reading
  • heavily influenced by English but entirely regular
  • often recognizable to English and French speakers
  • several ways often exist for writing the same sound
  • all words are pronounced exactly as they are written
  • there is only one correct spelling for any given word
  • to determine the correct spelling of a word a dictionary must be used

I am excited to see when Sousic is finished and also see what kind of literature is available in this language.
Here is the original blog post. Here is the official site for Sousic for pronunciation and grammar.

'''Gough Whitlam''' [Gof Whitlam] wos Australian Premier Minister khilaal 1972-1975.

   Gough Whitlam was the Australian prime minister from 1972 to 1975.

Since there is so much more information available on the website, I will not reiterate everything here, rather I want to direct you to the blog and website where you can learn more about this fascinating language!

Wednesday, January 9, 2013

Python

What is Python? It is a computer programming language. While programming languages are strictly for computers (and programmers) and used for actual communication between people but it is nonetheless very interesting to see how a computer language works.  


Python is a very simple language and is perfect for beginners yet powerful enough that gaming companies like: Activision Blizzard, Firaxis Games use Python for their games. 

So what does Python look like? 

1| name = input(" Please tell me your name: ")
2|print("Hello", name)


So what does all this mean? Line 1 is asking for you to type your name that is the "input". After you type your name and press enter the computer will display the following: "Hello (your name)". Now this is a very simple example and as you can see, anyone could write some simple code and start programming. 

Here is another example of a simple game: 

from pygame import * # Use Pygame's functionality!

ballpic = image.load('ball.png')

done = False

ballx = 0 # Ball position variables
bally = 0
ballxmove = 1
ballymove = 1

init()            # Start Pygame
screen = display.set_mode((640, 480)) # Give us a nice window
display.set_caption('Ball game') # And set its title

while done == False:
    screen.fill(0)    # Fill the screen with black (colour 0)
    screen.blit(ballpic, (ballx, bally))    # Draw ball
    display.update()

    time.delay(1)        # Slow it down!

    ballx = ballx + ballxmove    # Update ball position
    bally = bally + ballymove

    if ballx > 600:       # Ball reached screen edges?
        ballxmove = -1
    if ballx < 0:
        ballxmove = 1
    if bally > 440:
        ballymove = -1
    if bally < 0:
        ballymove = 1

    for e in event.get():    # Check for ESC pressed
        if e.type == KEYUP:
            if e.key == K_ESCAPE:
                done = True


Here is a (long) short game which can be programmed to play on your computer.
The Dodger game has the player control a small man (which we call the player's character) who must dodge a whole bunch of baddies that fall from the top of the screen. The longer the player can keep dodging the baddies, the higher the score they will get.


import pygame, random, sys
from pygame.locals import *
WINDOWWIDTH = 600
WINDOWHEIGHT = 600
TEXTCOLOR = (255, 255, 255)
BACKGROUNDCOLOR = (0, 0, 0)
FPS = 40
BADDIEMINSIZE = 10
BADDIEMAXSIZE = 40
BADDIEMINSPEED = 1
BADDIEMAXSPEED = 8
ADDNEWBADDIERATE = 6
PLAYERMOVERATE = 5
def terminate():
    pygame.quit()
    sys.exit()
def waitForPlayerToPressKey():
    while True:
        for event in pygame.event.get():
            if event.type == QUIT:
                terminate()
            if event.type == KEYDOWN:
                if event.key == K_ESCAPE: # pressing escape quits
                    terminate()
                return
def playerHasHitBaddie(playerRect, baddies):
    for b in baddies:
        if playerRect.colliderect(b['rect']):
            return True
    return False
def drawText(text, font, surface, x, y):
    textobj = font.render(text, 1, TEXTCOLOR)
    textrect = textobj.get_rect()
    textrect.topleft = (x, y)
    surface.blit(textobj, textrect)
# set up pygame, the window, and the mouse cursor
pygame.init()
mainClock = pygame.time.Clock()
windowSurface = pygame.display.set_mode((WINDOWWIDTH, WINDOWHEIGHT))
pygame.display.set_caption('Dodger')
pygame.mouse.set_visible(False)
# set up fonts
font = pygame.font.SysFont(None, 48)
# set up sounds
gameOverSound = pygame.mixer.Sound('gameover.wav')
pygame.mixer.music.load('background.mid')
# set up images
playerImage = pygame.image.load('player.png')
playerRect = playerImage.get_rect()
baddieImage = pygame.image.load('baddie.png')
# show the "Start" screen
drawText('Dodger', font, windowSurface, (WINDOWWIDTH / 3), (WINDOWHEIGHT / 3))
drawText('Press a key to start.', font, windowSurface, (WINDOWWIDTH / 3) - 30, (WINDOWHEIGHT / 3) + 50)
pygame.display.update()
waitForPlayerToPressKey()
topScore = 0
while True:
    # set up the start of the game
    baddies = []
    score = 0
    playerRect.topleft = (WINDOWWIDTH / 2, WINDOWHEIGHT - 50)
    moveLeft = moveRight = moveUp = moveDown = False
    reverseCheat = slowCheat = False
    baddieAddCounter = 0
    pygame.mixer.music.play(-1, 0.0)
    while True: # the game loop runs while the game part is playing
        score += 1 # increase score
        for event in pygame.event.get():
            if event.type == QUIT:
                terminate()
            if event.type == KEYDOWN:
                if event.key == ord('z'):
                    reverseCheat = True
                if event.key == ord('x'):
                    slowCheat = True
                if event.key == K_LEFT or event.key == ord('a'):
                    moveRight = False
                    moveLeft = True
                if event.key == K_RIGHT or event.key == ord('d'):
                    moveLeft = False
                    moveRight = True
                if event.key == K_UP or event.key == ord('w'):
                    moveDown = False
                    moveUp = True
                if event.key == K_DOWN or event.key == ord('s'):
                    moveUp = False
                    moveDown = True
            if event.type == KEYUP:
                if event.key == ord('z'):
                    reverseCheat = False
                    score = 0
                if event.key == ord('x'):
                    slowCheat = False
                    score = 0
                if event.key == K_ESCAPE:
                        terminate()
                if event.key == K_LEFT or event.key == ord('a'):
                    moveLeft = False
                if event.key == K_RIGHT or event.key == ord('d'):
                    moveRight = False
                if event.key == K_UP or event.key == ord('w'):
                    moveUp = False
                if event.key == K_DOWN or event.key == ord('s'):
                    moveDown = False
            if event.type == MOUSEMOTION:
                # If the mouse moves, move the player where the cursor is.
                playerRect.move_ip(event.pos[0] - playerRect.centerx, event.pos[1] - playerRect.centery)
        # Add new baddies at the top of the screen, if needed.
        if not reverseCheat and not slowCheat:
            baddieAddCounter += 1
        if baddieAddCounter == ADDNEWBADDIERATE:
            baddieAddCounter = 0
            baddieSize = random.randint(BADDIEMINSIZE, BADDIEMAXSIZE)
            newBaddie = {'rect': pygame.Rect(random.randint(0, WINDOWWIDTH-baddieSize), 0 - baddieSize, baddieSize, baddieSize),
                        'speed': random.randint(BADDIEMINSPEED, BADDIEMAXSPEED),
                        'surface':pygame.transform.scale(baddieImage, (baddieSize, baddieSize)),
                        }
            baddies.append(newBaddie)
        # Move the player around.
        if moveLeft and playerRect.left > 0:
            playerRect.move_ip(-1 * PLAYERMOVERATE, 0)
        if moveRight and playerRect.right < WINDOWWIDTH:
            playerRect.move_ip(PLAYERMOVERATE, 0)
        if moveUp and playerRect.top > 0:
            playerRect.move_ip(0, -1 * PLAYERMOVERATE)
        if moveDown and playerRect.bottom < WINDOWHEIGHT:
            playerRect.move_ip(0, PLAYERMOVERATE)
        # Move the mouse cursor to match the player.
        pygame.mouse.set_pos(playerRect.centerx, playerRect.centery)
        # Move the baddies down.
        for b in baddies:
            if not reverseCheat and not slowCheat:
                b['rect'].move_ip(0, b['speed'])
            elif reverseCheat:
                b['rect'].move_ip(0, -5)
            elif slowCheat:
                b['rect'].move_ip(0, 1)
         # Delete baddies that have fallen past the bottom.
        for b in baddies[:]:
            if b['rect'].top > WINDOWHEIGHT:
                baddies.remove(b)
        # Draw the game world on the window.
        windowSurface.fill(BACKGROUNDCOLOR)
        # Draw the score and top score.
        drawText('Score: %s' % (score), font, windowSurface, 10, 0)
        drawText('Top Score: %s' % (topScore), font, windowSurface, 10, 40)
        # Draw the player's rectangle
        windowSurface.blit(playerImage, playerRect)
        # Draw each baddie
        for b in baddies:
            windowSurface.blit(b['surface'], b['rect'])
        pygame.display.update()
        # Check if any of the baddies have hit the player.
        if playerHasHitBaddie(playerRect, baddies):
            if score > topScore:
                topScore = score # set new top score
            break
        mainClock.tick(FPS)
    # Stop the game and show the "Game Over" screen.
    pygame.mixer.music.stop()
    gameOverSound.play()
    drawText('GAME OVER', font, windowSurface, (WINDOWWIDTH / 3), (WINDOWHEIGHT / 3))
    drawText('Press a key to play again.', font, windowSurface, (WINDOWWIDTH / 3) - 80, (WINDOWHEIGHT / 3) + 50)
    pygame.display.update()
    waitForPlayerToPressKey()
    gameOverSound.stop()
_________________________________________________________



While all the code above may seem overwhelming at first, remember there is much to learn before you start coding like this. Programming can be fun and rewarding, so go ahead and give it a try!