CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   CHALLENGE: The 2004 summer challenge (http://www.codingforums.com/showthread.php?t=40156)

liorean 06-11-2004 06:38 PM

CHALLENGE: The 2004 summer challenge
 
In an hour I'll be gone for the most of the summer, but before then, I challenge all JavaScript experts here with something that will be more than a little tricky:

Your reference for this will be The Unlambda Programming Language.

Unlambda is a small language with a deciviously simple looking set of commands. It's a purely functional language (purely functional not in the sense of Haskell, but in the sense of the fact that the only constructs in it are functions) without a lambda expression.

So, my challenge is the following

Create a function constructor which:
- Takes an Unlambda 2 program as a single string argument
- Returns a function

The returned function must:
- Execute the Unlambda program when run
- Take a string argument to simulate STDIN input, or alternatively prompt the user for input.
- Return an array consisting of the evaluation of the Unlambda program and a string representing the STDOUT output, alternatively returning just the evaluation and instead alerting the output.

SlySecretSpy 06-17-2004 01:08 AM

And the prize is????

jkd 06-17-2004 01:42 AM

A sense of achievement.

I'd attempt this, but it's a lot of work for a "useless" script (I use the term loosely)... like a lot of work. It's not a challenge as much as writing an entire interpretter in Javascript.... ugh. Even doing ones for limited subsets of assembly took me way too much time and effort.

liorean 08-24-2004 10:55 PM

Well, I was hoping to see what you could do, Jason, but oh well. I'm currently rewriting the one I created for performance, but I'll soon post mine.

Roy Sinclair 08-24-2004 11:14 PM

Welcome back from your summer disconnect :)

liorean 08-25-2004 11:07 AM

Quote:

Originally Posted by Roy Sinclair
Welcome back from your summer disconnect :)

Thanks. I see you took the chance to pass me in the posting league, just when I had gained a comfortable lead...

Roy Sinclair 08-25-2004 08:44 PM

I've been very busy this summer or that might have been a huge lead, you're fast though. I expect you'll probably pass me again before next summer.


All times are GMT +1. The time now is 01:39 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.