HUGE SUCCESS

Posted by s on April 3, 2008, 12:20 a.m.

Ya, so I got it to print out "HELLO"

Which means I've basically got a Befunge interpreter down. Which now means all I need to do is

Make an interface because notepad sucks

Get it to parse the lines instead of manually copy pasting read-line

Add extensions (currently trying to rig in a lambda system where you can write LISP code and call it with l)

Also, I got 512MB of RAM and a computer for a marble. Too bad the RAM is kind of broken and so if the wrong place gets accessed, the computer locks

OMFG

OMFG

OMFG

OMFG

OMFG

OMFG

OMFG

(define(xy) (nth x(nth y code)))

(set

'code '()

'x 0

'y 0

'xs 1

'ys 0

'mode 0

'str '()

'lbd "")

(letn ((n 0) (f (open "C:/Program Files/newlisp/(pOjek)/_.txt" "r")))

(while (read-line f)

(push (explode (lower-case (current-line))) code -1)

)

)

(while 1

(case mode

(0

(case (xy)

({0} (push 0 str))({1} (push 1 str))

({2} (push 2 str))({3} (push 3 str))

({4} (push 4 str))({5} (push 5 str))

({6} (push 6 str))({7} (push 7 str))

({8} (push 8 str))({9} (push 9 str))

({>} (set 'xs 1 'ys 0))

({<} (set 'xs -1 'ys 0))

({v} (set 'ys 1 'xs 0))

({^} (set 'ys -1 'xs 0))

({+} (push (+ (pop str)(pop str))))

({-} (push (- (pop str)(pop str))))

({*} (push (* (pop str)(pop str))))

({/} (push (/ (pop str)(pop str))))

({%} (push (% (pop str)(pop str))))

({|} (set 'ys (if (> (pop str)) 1 -1) 'xs 0))

({_} (set 'xs (if (> (pop str)) 1 -1) 'ys 0))

({#} (set 'x (+ x (* xs 2)) 'y (+ y (* ys 2))))

({!} (push (= (pop str)) str))

({.} (println (pop str)))

({,} (print (pop str)))

({:} (letn (n (pop str)) (push n str)(push n str)))

({"} (set 'mode 1))

({f} (set 'mode 2 'fun '()))

({l} (eval-string lbd))

({@} (exit))

))

(1

(if (= (xy) {"})

(set 'mode 0)

(push (xy) str)

))

(2

(push (xy) fun -1)

(if (= (length fun) 3)

(begin

(case (join fun)

("lbd" (while (string? (nth 0 str))(push (pop str) lbd -1)))

)

(set 'mode 0)

)))

)

(inc 'x xs)

(if (< x) (set 'x (length (nth y code))))

(if (> x (length (nth y code))) (set 'x 0))

(inc 'y ys)

(if (< y) (set 'y (length code)))

(if (> y (length code)) (set 'y 0))

)

Ya, so lead it to the right _.txt and use

"olleh",,,,,0"))3 1 +(tnirp("flbdlv

@lGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGl<

Comments

PY 16 years, 9 months ago

… a marble?

Was it a cool marble?

Anyway, 512MB of broken RAM is a good deal.

s 16 years, 9 months ago

Twas a normal marble. I'd given him about 1500 marbles, but while shipping he'd dropped a bunch and missed one which I found a few days later. Then, his mother was complaining about the junk computer they'd had for the past year and so he was like "Want a computer?"

PY 16 years, 9 months ago

Mmm. That's still good.

1.5k marbles is pretty good for 512 RAM.

Nighthawk 16 years, 9 months ago

I want a computer marble! Can I get one with XP? Or do they just make Vista marbles now?

s 16 years, 9 months ago

Isn't this an odd visitor, misreading what is to be read

That being said, computer marbles are pretty interesting. Spherical fractals could be pretty interesting

1.5K marbles for 512MB of RAM that freezes the computer? Ya, I'd say

PY 16 years, 9 months ago

A speractal, eh?