Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: What makes good code? (also, winner of the programming challenge)

Author: Tim Foden

Date: 03:05:46 02/24/05

Go up one level in this thread


On February 24, 2005 at 05:13:27, Steffan Westcott wrote:

>Thank you for my placing, though really this is just a bit of fun. That was my
>only condition for entry in this challenge :)
>
>It was also a chance for me to oil my rusty Perl skills, and hopefully make
>people think and be entertained. I was disappointed by the lack of any other
>entries in 'exotic' languages.
>
>Cheers,
>Steffan

I posted my C++ version of a program that I first wrote in "Myla"... 17 lines.
Then I converted it to a C++ program.  This is the original Myla source.

for i = 0 to 63
  for j = 0 to 63
    if i = j; continue; endif
    cnt = 0
    for k = 0 to 63
      if k && (k & 7) = 0; print "/"; endif
      if k = i || k = j
      	if cnt != 0; print cnt; cnt = 0; endif;
        if k = i; print "N"; else; print "n"; endif
      else
        cnt = cnt + 1
        if (k & 7) = 7; print cnt; cnt = 0; endif
      endif
    next
    println " - - 0 1"
  next
next

I guess this would qualify not so much as an exotic language, but a unique
one... Only I have it, as I wrote it  :)

It's a strange mix of all sorts of languages, including BASIC, C, Pascal, etc,
but mainly BASIC I guess.  But I haven't implemented GOTO at all.  :)

For any that might not have guess already, Myla stands for MY LAnguage.

Cheers, Tim.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.