Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 4dl
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mirhagk




PostPosted: Tue Nov 02, 2010 2:13 pm   Post subject: 4dl

I found this link while searching through old posts.
http://www.cliff.biffle.org/esoterica/4dl.html
It's a very interesting concept, although vastly unneccasary it does challenge one to thing beyond three dimensions. I would like to actually try to implement a program like this for fun... well what passes for fun for me lol.

K first I don't get the character movements... like what does that do... and second is there any advantage?

Maybe Ill make a 2D version.

Can someone help me?
Sponsor
Sponsor
Sponsor
sponsor
TerranceN




PostPosted: Tue Nov 02, 2010 3:01 pm   Post subject: RE:4dl

Pretty much execution can move in a certain direction (by default x+), when it hits a command it executes the command then continues in the direction that is set. If it hits something thats not a command, it is ignored. I guess its up to the programmer to make sure it does not go off the grid.

The way the hello world worked was a 0 was added to the stack so you could tell when its empty later on. Then "!dlroW ,olleH" was added to the stack one character at a time (so when you popped letters off later they would be in order), then the stack was printed one by one until it found a 0, then the program ended.

I just don't understand how it was printed, as I didn't see a '.' which pops the top character off the stack and prints it. Perhaps he meant '.' instead of '2'?

I don't see any advantage right away, but I'm sure someone could come up with a use for it.

I would try 2d first, at least you can visualize it if you're confused.
mirhagk




PostPosted: Tue Nov 02, 2010 9:02 pm   Post subject: RE:4dl

Oh my goodness, thank you so much, I didn't understand what they meant by "Pushes the character adjacent along X-. " or w/e. And yes I think your correct in assuming it's a . not a 2.

Okay, well my first step will be doing it in 2 dimensions, then I will crank it up to 3, then 4. (maybe 5, lol jk).

And a 2 dimensional one could be useful for if the program branches into 2 paths, it'd be convenient to just switch paths rather than have 2 paths defined in 1 dimension. (ie no jump command, just move to start of next column)

I couldn't find any sort of complier/interpreter so Ill just make my own, should be pretty easy.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: