The Artima Developer Community
Sponsored Link

Weblogs Forum
Just for Fun

3 replies on 1 page. Most recent reply: Jul 26, 2005 8:49 AM by Michael Feathers

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Michael Feathers

Posts: 448
Nickname: mfeathers
Registered: Jul, 2003

Just for Fun (View in Weblogs)
Posted: Jul 26, 2005 8:49 AM
Reply to this message Reply
Summary
I like little programming languages. The sad thing about designing one is that people expect you to have a purpose.
Advertisement

On another thread recently, someone here spoke about a language he is working on called Atom. Chris Diggins has his work on Heron. In spare moments, while procrastinating on other things, I've been working on a language called Grot. I haven't mentioned it before because its level of ambition is incredibly low. It isn't designed to break any new ground, and in fact, I expect it to be useless.. which is fine by me. I like to "charge up" by working on little projects in my spare time.. things that I can keep immune from creeping seriousness.

Grot is named after a shop in an extremely funny 1970s BBC TV series called 'The Rise and Fall of Reginald Perrin'. Grot, the programming language, may not be completely useless once the interpreter is done, but I am doing it just for fun.

In a nutshell, Grot is a prototype based OO language that uses Python style indentation to end up with a syntax simpler than Smalltalk.

I'm using this code, essentially an xUnit written in Grot, to guide my implementation. There are many design choices yet to be made but implementation is underway in an emergent fashion. If you think it might be good for anything aside from fun, please let me know. I can't guarantee that I won't sabotage it and make it less useful in response, but I probably won't. It would be nice if it ended up somewhat useful, as long as developing it remains less than serious.

false ifTrue: aBlock
    pass

false ifFalse: aBlock
    aBlock value

true ifTrue: aBlock
    aBlock value

true ifFalse: aBlock
    pass
    
test setUp
    pass

test tearDown
    pass

test runTest
    pass
    
test should: aBool
    aBool ifFalse:
        self hurl: "assertion failed"

test run: aResult
    self do:
        self setUp
        self runTest
        self tearDown
    ifUnable:
        e | aResult addFailure: e
  
testSuite tests := list clone
  
testSuite add: test
    self tests add: test

testSuite run: aResult
    self tests do:
        aTest | aTest run: aResult

result failures := list clone
    
result addFailure: failure
    self failures add: failure

result show
    self failures do:
        failure | sout print: failure

divTest := test clone

divTest runTest
    self should: 6 / 2 = 3

aSuite := testSuite clone

aSuite add: divTest

aResult := result clone

aSuite run: aResult

aResult show


Elizabeth Wiethoff

Posts: 89
Nickname: ewiethoff
Registered: Mar, 2005

Re: Just for Fun Posted: Aug 9, 2005 7:11 PM
Reply to this message Reply
> self hurl: "assertion failed"

Whether or not you someday sabotage Grot, keep the word 'hurl'. Hurl is a fun word. It will remind you (and other programmers) not to be too serious.

Michael Feathers

Posts: 448
Nickname: mfeathers
Registered: Jul, 2003

Re: Just for Fun Posted: Aug 9, 2005 8:00 PM
Reply to this message Reply
> > self hurl: "assertion failed"
>
> Whether or not you someday sabotage Grot, keep the word
> 'hurl'. Hurl is a fun word. It will remind you (and other
> programmers) not to be too serious.

Thanks. :) It's a homage to Ron Jeffries. He doesn't like exceptions and he often talks about methods that hurl. Thanks as well for the reply. I was just about to mark interest in inconsequential programming languages as zero :)

Elizabeth Wiethoff

Posts: 89
Nickname: ewiethoff
Registered: Mar, 2005

zero interest? Posted: Aug 16, 2005 7:52 PM
Reply to this message Reply
> Thanks as well for the reply. I was just about to
> mark interest in inconsequential programming languages as
> zero :)

Wow. How sad in these days of "instant" electronic communications to think that no reply within a few days means zero interest. As you can probably see, I'm seldom in a rush to communicate. :->

Flat View: This topic has 3 replies on 1 page
Topic: Going all in... Previous Topic   Next Topic Topic: Thinking out loud about Concepts

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use