Domain: survex.com
Stories and comments across the archive that link to survex.com.
Comments · 8
-
Re:One line?
You're no fun. If I worked for you, I'd quit as soon as possible.
Really, who couldn't love code like this:
0d=d:IFdVDUd:a=POINT(32*POS,31-VPOS<<5):RETURNELSEMODE9:GCOL-9:CLG:O
FF:d=9:REPEATVDU30:REPEATGOSUBFALSE:IFPOS=28VDUPOS,15,VPOS,24;11,26:IF0E
LSEIFa=0PRINT:UNTIL0ELSEUNTILVPOS=25:v=ABSRNDMOD7:i=0:VDU4895;3:REPEATm=
9-INKEY6MOD3:FORr=TRUETO1:t=rANDSGNt:IFt=rCOLOURv-15:VDUrEORm:i+=m=7AND9
-6*r:IF0ELSEFORn=0TO11:d=n/3OR2EORd:GOSUBFALSE:IF1<<(n+i)MOD12AND975AND&
C2590EC/8^vVDU2080*ABSr;:t+=a:IF0ELSENEXT,:VDU20:UNTILt*LOGm:UNTILVPOS=3Anyone who had to read it, update it, or debug it?
Anyone who had to play the fucking game (it's full of game-breaking bugs - http://survex.com/~olly/rheoli... )? -
Re:replacing line feeds with terminators is not a
In BBC BASIC, a colon is a statement terminator, much like a semicolon in languages with C-style syntax. The linked code is therefore not a one-liner by any meaningful definition of the term. One could replace all of the linefeeds in Linux kernel source with semicolons and other appropriate terminators. That wouldn't make the kernel a one-liner.
If it's a one-line program, why is it more than one line?
A line of code is not the same as a line on a screen. The program won't fit on one line on most screens, but it will fit on one line of BBC BASIC, which fortunately has a well defined, but short maximum length of 256 characters. The whole program is 257 bytes as there is an extra byte to mark the end of the program.
-
Tetris in one line of BBC Basic
In my eyes, this is way more impressive - the link contains a detailed explanation of how it was achieved.
Tetris in one line of BBC Basic
And here's the final code:
0d=d:IFdVDUd:a=POINT(32*POS,31-VPOS5):RETURNELSEMODE9:GCOL-9:CLG:O
FF:d=9:REPEATVDU30:REPEATGOSUBFALSE:IFPOS=28VDUPOS,15,VPOS,24;11,26:IF0E
LSEIFa=0PRINT:UNTIL0ELSEUNTILVPOS=25:v=ABSRNDMOD7:i=0:VDU4895;3:REPEATm=
9-INKEY6MOD3:FORr=TRUETO1:t=rANDSGNt:IFt=rCOLOURv-15:VDUrEORm:i+=m=7AND9
-6*r:IF0ELSEFORn=0TO11:d=n/3OR2EORd:GOSUBFALSE:IF1(n+i)MOD12AND975AND&
C2590EC/8^vVDU2080*ABSr;:t+=a:IF0ELSENEXT,:VDU20:UNTILt*LOGm:UNTILVPOS=3 -
Re:Still not as good as:
Nor this http://survex.com/~olly/rheolism/: real Tetris in one line of BBC BASIC, 255 bytes after tokenisation. All the shapes are stored in one 32-bit constant. It's just amazing.
Peter
-
Re:Input
Behold Tetris:
0MODE9:OFF:GCOL-9:CLG:REPEATs=s+VPOS:PRINTCHR$30s:REPEATSYS6,135TOi,p,d:PRINTTAB (p=0)CHR$9;:IFPOS=22VDU3100;VPOS,21;6667;:UNTIL0ELSEUNTILVPOS=25:v=ABSRNDMOD7:VD U31:COLOUR3:REPEATm=9-INKEY(INKEYTRUEOR6)MOD3:FORr=TRUETO1:t=rANDSGNt:IFt=rCOLOU Rv-15:VDUrEORm:i+=m=7AND9-6*r:IF0ELSEFORn=0TO11:d=nDIV3OR2EORd:VDUd:IF1
-
Troglographs are not new
Troglographs are not new.
-
Survex
No, really, it is called survex. Given data it attempts to construct a map of the cave allowing for inaccuracy. At least, so the author told me. I've got better things to do with my weekend than crawl around wet caves...
-
Re:1.44 MB?Not that tetris is all that complex, but still.
No kidding.
How about Tetris implemented in one line of BBC BASIC?
:-)0MODE9:OFF:GCOL-9:CLG:REPEATs=s+VPOS:PRINTCHR$30s
: REPEATSYS6,135TOi,p,d:PRINTTAB
(p=0)CHR$9;:IFPOS=22VDU3100;VPOS,21;6667;:UNTIL0EL SEUNTILVPOS=25:v=ABSRNDMOD7:VD
U31:COLOUR3:REPEATm=9-INKEY(INKEYTRUEOR6)MOD3:FORr =TRUETO1:t=rANDSGNt:IFt=rCOLOU
Rv-15:VDUrEORm:i+=m=7AND9-6*r:IF0ELSEFORn=0TO11:d= nDIV3OR2EORd:VDUd:IF1<<(n+i)MO
D12AND&C2590ECDIV8^vAND975t+=POINT(p*POS,31-VP OS<<5):IFrVDUp,8:IF0ELSENEXT,:VDU2
0:UNTILt*LOGm:UNTILVPOS=3:ZTim