Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

★ /prog/ Challenge Vol. 5 ★

Name: Anonymous 2010-06-11 23:51

The challenge suggestion thread was too busy going nowhere, and I feel like writing some code, so here is a /prog/ challenge.

THE CHALLENGE:
Design a toy programming language. You may implement either a compiler or interpreter, and you may write the implementation in any language of your choosing.

Post the source code to your implementation as well as programs in your language to accomplish at least two of the following tasks, plus one ``wild card'' program not listed here.

    • Factorial calculator
    • Fibonacci sequence generator
    • Prime number sieve (e.g. Eratosthenes, Atkin, etc.)
    • fgrep (output lines of input containing a given string)
    • Caesar cipher
    • Simple interactive calculator
    • Tic-tac-toe (AI not required)
    • The game of Nim (http://en.wikipedia.org/wiki/Nim)

Entries must be submitted prior to 2010-06-21 00:00, which gives one full week and two weekends. Judgment will be in three categories: presentation and cleverness of designed language, clarity of implementation, and overall usefulness/entertainment/trolling value of the ``wild card'' program.

Winner will receive ten Susscoins, to be transferred via /prog/mail.

Name: Anonymous 2010-06-17 1:51

>>80
Whilst thinking about it further, I'm changing it slightly, so you can write it in any direction you want(as long as it fits the down right up left(and is surrounded by whitespace).

So you can write it like this:

n   
=                     .
_                     n
c                     }
=                     1
0i=1t=0n*{t           -
          =           n
          0t+it+ci=cc=t

Or in any darn order really, trying to work in a way. Also adding in so you can reuse operators and variables by crossing over paths. There's only five operators, = + - _ ., or equals, add, subtract, get input, output variable. Only support for integers, no strings or arrays. I have exams next week, I'll try to finish it, but at the moment, all there is is a simple interpreter for the base language.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List