Above is how you'd enter the code in Commodore 64 BASIC (the listing would expand the keywords), The ? is PRINT, the G shift-O (right angle character) is GOTO.
Here are the solutions Olimex received. I've selected a few interesting solutions and added some of my own:
This is a cool language. Utterly useless, but cool. And this is a family-friendly blog so I'm not spelling out the name.
while(1): print "."
print 1 while 1;
I haven't written anything lispy in years. I doubt I ever wrote a loop in that language.
Here's some other languages that weren't submitted...
Program z(output); begin while true do begin writeln('x'); end; end.
Yeah, a bit wordy. That's Pascal for ya. Haven't written Pascal since the late 80's during my first CS class in College.
PROGRAM Z 1 PRINT *, "x" GO TO 1 END PROGRAM Z
Less wordy. I don't know why but I love Fortran. It just seems so simple and transparent.
repeat print("x") until false
I'm curious about Lua. It seems neat and is supposed to be lightweight and great for embedded microcontrollers.
MOV 0, 1
This is code used in CoreWar. It doesn't output to a screen. RedCode can only modify the core's memory. Although the RedCode VM displays memory as output so I guess you could argue... but I'll spare us all.
$ loop: $ write sys$output "x" $ goto loop
Or something like that. I couldn't find an online DCL interpreter and I'm fresh out of OpenVMS systems to test on. I used to write a ton of DCL scripts. I grew up on VMS in college before migrating to Unix.
procedure main() repeat write ( 'x' ); end
I learned a bit of Icon at the University of Arizona where it was developed. It evolved from SNOBOL.
Alright, your turn. What obscure languages can you throw at me?
Can you think of any languages that don't support infinite loops? I think APL might be one.
Post in the comments...