Talk:FlogScript

From Esolang

Jump to: navigation, search

FlogScript seems to be quite dense (don't know any right word), in the sense (or so it seems) one can do programs with low amount of characters. An Underload interpreter in 80 characters (not counting whitespace) -- that is impressive! I'd really like to try out this language, I hope someone explained how it works. --Keymaker 09:58, 27 April 2008 (UTC)

I will explain the Underload interpreter, and hopefully you will understand how it works. None of the whitespace is necessary in this program, although in some other FlogScript programs, some of the whitespace is necessary.
  • The first line Ia: takes all the input and stores it in a variable. (It assumes the variable is called _ if you don't write the variable name)
  • The lines with [ and up to ] is a list.
  • The next line _(\: takes the first character from the program stored in the variable, and stores the rest back in the variable, the one character picked is on the stack.
  • The next line selects one of the codes from the above list according to which character is read from the Underload program. The 1/?=~ splits the string, finds the character in the string, selects the same index from the list of FlogScript codes corresponding to the Underload ones, and executes it.
  • The _,0=!F[ line checks if the value in the variable has a zero length, if not, it will go back to the beginning of the current block (starting by { and you put }~ at the end to execute it).
Many FlogScript commands are similar to GolfScript, although there are many differences. If you have more questions about specific commands or other things, please ask here, and whoever knows the answer will answer here first. --Zzo38 18:54, 2 May 2008 (UTC)

[edit] WebFlogScript and more

Did you try to use this program language yet? It can also be used in web-site scripts. An example is at: http://zzo38computer.cjb.net/esoteric/FlogScript/tvplot.wflog This program generates a random TV PLOT, from the BASIC program of the same name but much improved. Most of it is just data, and some of it is just the HTML codes and stuff like that. The actual part of the program which generates and outputs the text selected at random from the list is only ten characters long. --Zzo38 19:18, 7 July 2008 (UTC)

Personal tools