Can you help me think of problems for my programming language?

410 Views Asked by At

I've created an experimental toy programming language with a (now) working interpreter. It is turing-complete and has a pretty low-level instruction set.

Even if everything takes four to six times more code and time than in PHP, Python or Ruby I still love programming all kinds of things in it.

So I got the "basic" things that are written in many languages working:

  • Hello World
  • Input -> Output
  • Countdowns (not as easy as you think as there are no loops)
  • Factorials
  • Array emulation
  • 99 Bottles of Beer (simple, wrong inflection)
  • 99 Bottles of Beer (canonical)
  • Collatz conjecture

  • Quine (that was a fun one!)

  • Brainf*ck interpreter (To proof turing-completeness, made me happy)

So I implemented all of the above examples because:

  • They all used many different aspects of the language
  • They are pretty interesting
  • They don't take hours to write

Now my problem is: I've run out of ideas! I don't find any more examples of what problems I could solve using my language.

  • Do you have any programming problems which fit into some of the criteria above for me to work out?
12

There are 12 best solutions below

0
On

Rather than more things to do in that toy language, I'd think hard about implementing a language that's somewhat more complete and useful. In particular, spend some time thinking about the things you dislike about other languages, and see if you can't improve them.

1
On

try implementing various types sorts and searches, using arrays and then pointers.

Sorting Algorithm
Search Algorithm

1
On

Something recursive perhaps?

I've got two toy languages of my own. I've done some of what you described. Another thing I did was try to print out the Fibonacci Sequence. One more thing you can do is write a program that checks to see if a number is prime.

Do you have a link to your language? I'd like to check it out!

0
On

This could be a good application of the items you find at http://codekata.pragprog.com/2007/01/code_kata_backg.html#more

2
On

After you finish with writing a bunch of short applications it might be interesting to write a simple server. A lot of topics come up with servers that would help you identify if your language can address things like UDP/TCP, threading, queues, security, etc.

0
On

Check out the RubyQuiz site. Plenty of silly little things you could do to test out your language.

0
On

You could add support for arbitrary precision arithmetic by either writing it as a module for your language in your language or as a first class language construct.

5
On

Implement a compiler (to any language you know) for your language, in the language itself.

0
On

Try things from Project Euler - these puzzles are always good for testing out new languages.

0
On

You could consider implementing the tests for the "Shootout".

0
On

How about canonical data structures and algorithms? Or semi-canonical? For intance, I always wanted to implement associative array based on radix trie. That looks fun.

0
On

Try to implement something real. For example web based mail client. Do just abstract task is boaring.