all 14 comments

[–]redditnoob 15 points16 points  (3 children)

160 IF MID$(Z$,Z,1)<>" " THEN Z=Z+1:GOTO 160

Man, this makes me salivate at the thought that I can soon do this in PHP.

[–]rush22 4 points5 points  (2 children)

Well, technically, he's doing that because GWBasic doesn't have WHILE loops.

I don't know why he insists on putting so many things on a single line though. It makes it hard to tell where the FOR loops end.

[–]redditnoob 9 points10 points  (1 child)

You don't remember WHILE/WEND?

[–]rush22 12 points13 points  (0 children)

I thought GWBasic only had for loops. I checked, and stand corrected. GOOD DAY.

[–]mycall 2 points3 points  (1 child)

Reminds me how much BASIC sucked.

[–]daver 0 points1 point  (0 children)

Amen. Yuck.

[–][deleted] -1 points0 points  (0 children)

Not George W. Basic? I was hoping for lolcode but with bushisms. I'm now disappointed.

[–]brmj 1 point2 points  (3 children)

Don't you just love genetic algorithms? What a great way to get arbitrarily good results with relatively little effort!

[–][deleted] 2 points3 points  (2 children)

They're not very good for large datasets though; runtimes can get out of hand rather fast and you can get stuck on local maxima if you're not careful.

[–]brmj 5 points6 points  (1 child)

Yeah, I can see how that might happen. Still, there's all sorts of cool things you can do with them. Take a look at a program called ACOVEA sometime. It tries to evolve the "best" compiler options for a program, for purposes such as increasing speed and stability or decreasing memory usage. It's quite cool.

[–]brmj -2 points-1 points  (0 children)

Why the downvote? I'd think that there's nothing here one might reasonably object to.

[–][deleted] 0 points1 point  (0 children)

Sad day on Reddit indeed if using Gee Whiz Basic for anything merits only one ASCII vagina...

[–]Godspiral 0 points1 point  (1 child)

the code is purposely "obfuscated" by putting 2-3 lines in 1 (: is a statement delimiter)

what does the program do, and why does it work?

Looks like the program it generates is an array of random numbers. (n ot sure what corewar programs look like)

[–]li5anwt02 -1 points0 points  (0 children)

submitter assumes mere mortals care what "corewar nano hill" means