Agh
|
|
« Reply #40 on: November 25, 2008, 04:09:03 AM » |
|
shortest whitescreen code?
*[[e*]*s*]*
no, this is shorter: *[s[e]*]
|
|
« Last Edit: November 25, 2008, 04:24:12 AM by Agh »
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #41 on: November 25, 2008, 04:24:23 AM » |
|
*[s[e]*]
acknowledged, and: neat
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #42 on: November 25, 2008, 06:43:52 AM » |
|
fiddled with the rule 110 code so that it doesn't delete itself as it goes along ( source) quite slow though, so here're the first couple of lines, for those without the requisite patience:
about screen blanking: can anyone think of any methods of blanking the screen whatever state it's in without making use of the specific dimensions of the grid? pretty sure it's impossible, but you never know...
|
|
« Last Edit: November 25, 2008, 07:26:41 AM by increpare »
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #43 on: November 25, 2008, 07:49:03 AM » |
|
One other thing that would be nice would be to have a red outline or something on the cell where the head currently is.
|
|
|
Logged
|
|
|
|
whitespace
|
|
« Reply #44 on: November 25, 2008, 07:51:49 AM » |
|
Increpare, you make me very happy I probably have to move the project to another language than as2 to speed it up, I'm quite sure it won't be c, but maybe 5rocessing will be better alternative. (I'm not that great programmer ) It's pretty cool to make application that others understand better than yourself. I made a program that creates the fibonacci numbers in some kind of way (canvas is too small), it does destruct the upper row everytime though. (At the time I'm writing this I think I know a way to solve this) Anyway: fibonacci * [[s*en] sw[w]enn [[e]w*w[w]ess[e]*[w]enn] ss] I haven't got much time to make changes very quick. I like all of your suggestions though. The 'debug-like features' will definately see daylightday someday. I think I will implement an input command first, cause that's pretty easy to do. It will work like this: if program-pointer encounters a #, program pauses and waits for user input, user input is restricted to telling wether the current cell will be blank or white.
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #45 on: November 25, 2008, 08:10:09 AM » |
|
Increpare, you make me very happy Your language is a real pleasure to play with. I'd love to write my own interpreter for it...but...don't really have time at the moment I made a program that creates the fibonacci numbers in some kind of way (canvas is too small), it does destruct the upper row everytime though. (At the time I'm writing this I think I know a way to solve this)[/quote] Here're two snippits that might be of help copy contents of current square to square two rows below: ss [*] s [*] nnn
[ ss [*]* s [*]* nnn *]
[*]
sss
[nnn [*]* sss *]
nnn
restore square from to rows below to current square Anyway: fibonacci * [[s*en] sw[w]enn [[e]w*w[w]ess[e]*[w]enn] ss] it looks very cool it's really nice to be able to see an algorithm in motion.
|
|
|
Logged
|
|
|
|
Decipher
Guest
|
|
« Reply #46 on: November 25, 2008, 08:14:56 AM » |
|
whitespace: If you are not against someone else handling the interpreter, I'm willing to write one in C/C++. Also, I might even come up with a real assembler/compiler that will create machine code out of the given file at a later stage. Because the language syntax and handling is really simple, it shouldn't be a problem to deal with it at machine code level.
|
|
|
Logged
|
|
|
|
whitespace
|
|
« Reply #47 on: November 25, 2008, 08:28:43 AM » |
|
whitespace: If you are not against someone else handling the interpreter, I'm willing to write one in C/C++. Also, I might even come up with a real assembler/compiler that will create machine code out of the given file at a later stage. Because the language syntax and handling is really simple, it shouldn't be a problem to deal with it at machine code level.
That would be very cool, allthough I will probably stay working on ideas in the mean time, and am not sure where to take the project in the end. Thinking of the concept took me maybe a week, but I wrote the interpreter in half an hour. For your reference, this is my actionscript: var prog:String = ""; var px:Number = 0; var py:Number = 0; var pr:Number = 0; var speed = 5; run.onPress = function () { prog = input.text; for (i=0; i<40; i++) { for (j=0; j<40; j++) { t = _root.attachMovie("t", "t"+i+"_"+j, i*100+j); t._x = j*10; t._y = i*10; t.gotoAndStop(1); } } px = 0; py = 0; pr = 0; speed = 5; _root.onEnterFrame = function() { work(); }; }
function work() { for (i=0;i<speed;i++) { var com = prog.charAt(pr); if (com == "e") { px++; if (px == 40) { px = 0; } } if (com == "w") { px--; if (px == -1) { px = 39; } } if (com == "s") { py++; if (py == 40) { py = 0; } } if (com == "n") { py--; if (py == -1) { py = 39; } } if (com == "*") { if (_root["t"+py+"_"+px]._currentframe == 1) { _root["t"+py+"_"+px].gotoAndStop(2); } else { _root["t"+py+"_"+px].gotoAndStop(1); } } if (com == "[") { if (_root["t"+py+"_"+px]._currentframe == 1) { var c = 1; for (i=pr+1; i<prog.length; i++) { if (prog.charAt(i) == "[") { c++; } if (prog.charAt(i) == "]") { c--; if (c == 0) { pr = i; break; } } } } } if (com == "]") { var c = 1; for (i=pr-1; i>-1; i--) { if (prog.charAt(i) == "]") { c++; } if (prog.charAt(i) == "[") { c--; if (c == 0) { pr = i-1; break; } } } } pr++; } }
Thanks for your interest! I would love to see real bitmaps coming out of the compiler.
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #48 on: November 25, 2008, 08:33:28 AM » |
|
C++ version would be good...but much appreciations would be got from this corner if you'd keep it cross-platform (using QT, or whatever). I would love to see real bitmaps coming out of the compiler.
bitmaps...and gifs, right?
|
|
|
Logged
|
|
|
|
Decipher
Guest
|
|
« Reply #49 on: November 25, 2008, 08:48:08 AM » |
|
Alright then, I'm coding a cross-platform interpreter in C++. I'll upload the first version tomorrow. For tonight, I just want to take my long-lasting nap .
|
|
|
Logged
|
|
|
|
whitespace
|
|
« Reply #50 on: November 25, 2008, 09:29:34 PM » |
|
Fixed version of Fibonacci sequence (without destruction) * [[s*en] sw[w]enn [[e]w*ssss*nnnnw[w]ess[e]*[w]enn] ssss[*nnnn*essss] nnnnw[w]e ss]
|
|
|
Logged
|
|
|
|
agj
|
|
« Reply #51 on: November 26, 2008, 08:06:21 PM » |
|
Wow, I don't know how you guys make these, I can't wrap my head around the language.
I'd love it if you made a webapplet deal of this, maybe with the two colors chosen randomly, or selected somehow beforehand.
I'd like to suggest the canvas to be sized in a power of 2, for added symmetry. Maybe 64x64. Unless there's a reason for 40x40?
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #52 on: November 26, 2008, 08:08:57 PM » |
|
I'd love it if you made a webapplet deal of this, ditto that. maybe with the two colors chosen randomly, or selected somehow beforehand.
leave your mark on the app, heh Fixed version of Fibonacci sequence (without destruction) Ah: cool
|
|
|
Logged
|
|
|
|
Loren Schmidt
|
|
« Reply #53 on: November 28, 2008, 03:45:21 AM » |
|
You guys make me wish I was a programmer! Nice stuff. Inchworm (originally conceived as moving blocks from one pile to another) eeeeeeee*e*e*e*e*e*e*e* [[*w*]*[*e*]*w*w*] Better version: widening diagonal lines Happy accident *[[eenn*ww]*[nnwww*ss]*[wwss*ee]*[ssee*nn]*] *[[en*w]*[nw*s]*[ws*e]*[se*n]*] There's a bug in my outward spiral! *[[en*w]*s[nw*s]*e[ws*e]*n[se*n]*w]
|
|
|
Logged
|
|
|
|
Decipher
Guest
|
|
« Reply #54 on: November 28, 2008, 06:05:22 AM » |
|
By the way, as I aforepromised I coded an interpreter in C++, just waiting for whitespace for a proof check and last moment updates. So, it will be here, no worries. I might also code and host another one in Python/PHP for web use.
|
|
|
Logged
|
|
|
|
whitespace
|
|
« Reply #55 on: November 28, 2008, 06:54:58 AM » |
|
By the way, as I aforepromised I coded an interpreter in C++, just waiting for whitespace for a proof check and last moment updates. So, it will be here, no worries. I might also code and host another one in Python/PHP for web use.
Great! Sorry I couldn't reply earlier. You got all permission I could give to just show it to us here. I have thought about the language, and came to the decision that there will be no difference made to the first sketch. The simplicity is the thing that makes it neat imo. There could ofcourse be features to a code-editor/interpreter, then I think about: *show program-pointer *show cell-pointer *pause *next step and pause *do .. steps and pause *dimensions x/y *scale (like mspaint 100%,200%,400%,800%) *background/foregroundcolor *animation-speed *save/load program There could be an input for the programs by providing a window where the user can paint cells, when program is executed this input-window is the initial state of the output, instead of the blank we're used to until now. This input-window could have options to fill in predefined patterns: *vertical lines *diagonal lines *checkerboard *filled white *random spread in % Really cool would be export functionality, but I'm not quite sure how hard this is to accomplish. Export as bitmap. Export as gif. Export as avi,mpeg? Web-functionality with community would be awesome, and could possibly take the idea a bit to the masses, where now it's a real geeky nerdtoy I think. Actually that's all my opinion on the thing and I'm very open to all suggestions. I'm waiting in excitement Decipher! You guys make me wish I was a programmer! Nice stuff.
There's a bug in my outward spiral!
I like your programs, and I believe it's maybe better not to be programmer to create nice stuff. The buggy spiral is beautiful I think, I think it's cool to 'see' the bugs in the programs, they have very nice output most of the times.
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #56 on: November 28, 2008, 07:57:19 AM » |
|
and I believe it's maybe better not to be programmer to create nice stuff.
|
|
|
Logged
|
|
|
|
whitespace
|
|
« Reply #57 on: November 28, 2008, 08:16:12 AM » |
|
and I believe it's maybe better not to be programmer to create nice stuff.
I dare to think blank minds are better able to create originality in creavity.
|
|
|
Logged
|
|
|
|
whitespace
|
|
« Reply #58 on: November 28, 2008, 08:32:56 AM » |
|
I made binary counter I think if you imagine the 3rd column to resemble the number 1, the fourth the number 2,the fifth 4, sixth 8, seventh 16 etc. this one counts from 1 till millions. It could be more beautiful or efficient I think. *[ss*s[*]n[e*s[*]n]*e[*nn[*n*ss*n]sse]ne[*e]*w*[*w*]*]
|
|
« Last Edit: November 28, 2008, 10:18:21 AM by whitespace »
|
Logged
|
|
|
|
lostgeek
TIGBaby
No it isn't broken
|
|
« Reply #59 on: November 29, 2008, 05:50:34 PM » |
|
<link to this thread> sounds so cool. I'm starting to write an interpreter in java right now
done damn. I just read the timestamp and realized that it is 2am. Well here it is. There is a //TODO for more than binary field states involving colors and such. And maybe I'll add a better CLI. But first things first. Good night!
|
|
|
Logged
|
|
|
|
|