Talk:Omgrofl

From Esolang
Jump to navigation Jump to search

using omgrofl

The link to the c# converter seems to be dead, is there some software left to run Omgrofl? 89.217.157.209 16:13, 23 May 2007 (UTC)

Seems not, jurajborza.eu has disappeared. Google's cache only contains the text page for omgrofl, not the converter itself. Hopefully the site will show up under some name again, at least at the Wayback Machine, which delays pages for several months. --Ørjan 19:31, 23 May 2007 (UTC)

This is pointless, it's basically lolcode. --(this comment by 75.68.49.100 at 22:02, 20 January 2009 UTC; please sign your comments with ~~~~)

Yes, how ridiculous of Sedimin to plagiarize lolcode. And a year before it was invented, too! --Ørjan 09:16, 21 January 2009 (UTC)

heh/brb

You might consider replacing "heh" with "brb", also perhaps consider including "omg" somewhere. (User:Wildhalcyon)

Only outputting values, no characters?
poiuy_qwert 06:01, 4 Jun 2006 (UTC)

Wildhalcyon) hm, replacing heh with brb is good idea :) let it be!

poiuy_qwert: I am actually outputting character, as in brainfuck, I forgot to mention it at rofl command

Sedimin 08:28, 4 Jun 2006 (UTC)


values

Can variables hold arbitrary values? I can't find anything that says otherwise. If so, then this language is Turing-complete. Also, may I suggest that the space after "wtf" be optional (producing "wtflol"), that emoticons can be used as comments, that "iz" can be replaced with "=", that "to", "too", "two", and "2" be interchangeable, and that the slashes in "/dev/null" can be replaced with backslashes? --Ihope127 23:11, 4 Jun 2006 (UTC)

why replace slashes in /dev/null with backslashes? :) Sedimin 07:06, 5 Jun 2006 (UTC)
um, wate, waz it /dev/null or \dev\null? ;-) --Ihope127 13:35, 5 Jun 2006 (UTC)
lool, it iz /dev/null, try dd if=/dev/null of=/dev/hda to verify  ;) Sedimin 14:36, 5 Jun 2006 (UTC)
To quote the second sentence in the article: It is equipped with a stack, has support for byte-sized variables and keywords resembling Internet slang
Another way to make it turing complete would be to swap the stack for a queue. Or simply add some queue operators to it.

for loop

And how about adding a For loop construct like this one:
  w00t Prints the numbers 1 through 10 
  4 lol iz 1 2 10
   rofl lol
  brb
--Rune 23:32, 4 Jun 2006 (UTC)

Rune -

you don't need For loop construct to do so, it could be done with rtfm and tldr (while-break) like below:
the other thing is that it's a bit longer than the "for/4" construct :)
Of course you dont need a for loop construct, but that doesn't mean we shouldn't add one. --Rune 09:40, 5 Jun 2006 (UTC)
So why not, using 4 as for would be cool, but the syntax should be clear. Exactly as you suggested, something like this:
4 <variable> iz <init-value> 2 <end-value> 
 ...
brb

Stepping would be either 1 or -1 depending on that if <init-value> is greater or lower than <end-value>. (e.g. if using 4 lol iz 4 2 0 then in each iteration lol is decreased by one)

w00t Prints numbers 1 through 10
lol iz 1
rtfm
rofl lol w00t print out the number
 wtf lol iz 10
  tldr
 brb
lmao lol w00t increase it 
brb

queue and TC

The turing-completeness would be nice - As you have suggested - adding a queue would suffice - what about making the program stack and queue the one thing, and adding one command to take out variable from the queue? (like n00b pushes/enqueues, l33t pops and maybe hax0r dequeues.) What about it?
Wasn't that exactly what I suggested? In other words, I totally agree :) --Rune 09:40, 5 Jun 2006 (UTC)
Yes, it was :) I don't say that I invented it, it was you who suggested it :) So let it be part of the language.
But - how to prove that Omgrofl is Turing complete when it has queue? I just can't get the idea.. :( Sedimin 12:28, 5 Jun 2006 (UTC)
The queue can act as a Turing machine's tape. Just run through it repeatedly, and whenever you meet the tape head, do some super-mega-really-secret operation on it (i.e. change the tape cell under it and move it), and whenever you meet the end-of-tape marker, extend the tape in both directions. --Ihope127 13:35, 5 Jun 2006 (UTC)
Do you mean the same queue as I do? I mean the queue as the FIFO data structure, where you can enqueue/dequeue items? Maybe I get it wrong, but don't you mean something exactly like brainfuck's tape? An infinite array with pointer? :\ Sedimin 14:36, 5 Jun 2006 (UTC)
You can emulate an infinite array with a queue. --Rune 14:48, 5 Jun 2006 (UTC)
I see now what you guys meant. :)Sedimin 16:46, 5 Jun 2006 (UTC)

iz liek

Currently iz is used for both assignment and conditionals. How about using iz exclusively for assignment, and iz liek for the conditional? Example:

wtf lolzor iz liek 0
 lmao lolzor
brb

--Rune 14:21, 5 Jun 2006 (UTC)

Hm, do you mean it or have you just made the same typo two times (liek/like)? Cos in the summary you have written 'iz like' :) Sedimin 14:36, 5 Jun 2006 (UTC)

OK, so I mispelled it in the summary... :P I'm not used to writing in internet slang. --Rune 14:48, 5 Jun 2006 (UTC)
OK, 'iz like' now replaces 'iz' in conditional
LOL, I really meant it to be liek... That's how l33t h4xorZ spell like --Rune 19:01, 5 Jun 2006 (UTC)
ZOMG 0|< d00d 13t it b3 th4t way ... :-D l33t h4x0r Sedimin 19:59, 5 Jun 2006 (UTC)
ow stop wiht thwe leet--!!!Ihope127 20:00, 5 Jun 2006 (UTC)

!!??

what about lol! = lol*2 lol!! = lol*3 lol!!! = lol*4... lol? = lol/2 (flooring) lol?? = lol/3 lol!?? = lol*2/3... --jix 20:42, 5 Jun 2006 (UTC)

oh of course if an immediate value is larger than 255 it will wrap around... --jix 22:04, 5 Jun 2006 (UTC)

interesting idea. But - using lol! will change the value of lol?

so would this print out different things or the same?

lol iz 33
lool iz lol!
rofl lool
rofl lol

I prefer that lol! won't change the value of lol Sedimin 07:05, 6 Jun 2006 (UTC)

yeah that's the way i thought it would be.... not changing the value... oh and it shouldn't be used if the value is changed by something else...

lmao lol!

that should be invalid --jix 11:42, 6 Jun 2006 (UTC)

OK, that's good idea. then - can i add it into specs? Sedimin 05:41, 8 Jun 2006 (UTC)

where to place nope

i am writing an interpreter atm and i'm not sure where to place the nope.. the text says in front of the iz... the example says behind the iz... i prefer behind the iz... --jix 23:11, 5 Jun 2006 (UTC)

great thing about the interpreter, keep going, i'm writing converter to C#.

sorry for misleading specification, it is fixed now. usage of nope:

 x iz nope uber y
lol iz nope liek 7

Sedimin 07:05, 6 Jun 2006 (UTC)

more i/o

I think there should be a command to input a string and push the ASCII values of the chars on to the stack. My idea for the name of the command is huh. Also a command to pop and output the values on the stack as chars until a number less than 1 or greater than 255. My idea for the name of the command is rawr. Poiuyqwert

so the huh command will do something like
rtfm
stfw lol
 wtf lol iz liek 10 (read enter-terminated string)
  tldr
 brb
n00b lol
brb

EOF and files

as suggested on IRC, there should be something to check for EOF. It may be called pwnd - how about the usage? Should it be a special value? Or function? I personally think of this: wtf lol iz liek pwnd checks if lol contains EOF? then a simple cat program could look liek

rtfm
 stfw lol
 wtf lol iz liek pwnd
  tldr
 brb
 rofl lol
brb

Sedimin 05:41, 8 Jun 2006 (UTC)

If a variable is going to be able to contain EOF, then it needs to be more than byte-sized so that reading a 0 (or 255) is not the same as EOF. Alternatively pwnd just checks the current inputstream for EOF, and is not related to a variable at all. Example: wtf pwnd. You could also allow multiple input streams: wtf <file handle> is pwnd
How about using pwnd? to check for EOF and pwnd! to force EOF (that is, close the file)?
Here's an idea for code that opens a file, checks if it is EOF/closed, and if it isn't then it is closed:
  lol iz \file.txt
  wtf lol iz nope pwnd?
    lol iz pwnd!
  brb
stfw and and rofl could be expanded to take a file handle as an optional second paramter
--Rune 13:13, 8 Jun 2006 (UTC)
lol iz \file.txt opens a file "file.txt" or "\file.txt"? If it's the first, then what will happen if file is named "1"? .. there should be some kind of operator, like lol iz da file.txt..
But what happens when we'll have something like lol iz da file w00t something - it will open the file "file" or file called "file w00t something"? Also, there could be only 255 file handles... :/ and I think hard-coded file names are not so cool, so it may open read the filename from stack/queue as zero-terminated string.?
Sedimin 19:24, 8 Jun 2006 (UTC)

Delimited comments

I want to propose two extensions to commenting syntax. The first is delimited comments, which will be set off with < and >, and prefixed to lines of code. THe Omgrofl Style Manual should encourage programmers to mention which programmer wrote which line with these delimited comments. Furthermore, crucial information regarding the persons who wrote the code such as their arrival and departure to and from the project should be included in administrative comments, set off with ***. Thus, an uncommented (poor style) program such as:

w00t Hello world
lol iz 72
rofl lol
lol iz 101
rofl lol
lol iz 108
rofl lol
rofl lol
lool iz 111
rofl lool
loool iz 44
...

should be written as (proper style)

*** mr_bear has joined #Hello_world
*** ChanServ has set mode +o on mr_bear
<mr_bear> w00t Hello world
<sexykittn9> lol iz 72
<brucewayne4{AFK}> rofl lol
*** nrrdgrrl42_ has joined #Hello_world
<nrrdgrrl42_> lol iz 101
<sexykittn9> rofl lol
<nrrdgrrl42_> lol iz 108
*** nrrdgrrl42 has left channel #Hello_world: ping timeout
*** nrrdgrrl42_ is now known as nrrdgrrl42
<sexykittn9> rofl lol
<sexykittn9> rofl lol
<mr_bear> lool iz 111
<sexykittn9> rofl lool
*** sexykittn9 was kicked by mr_bear for: flooding
*** brucewayne4{AFK} is now known as brucewayne4
<brucewayne4> loool iz 44
...

etc. The commented code is much more readable, not to mention informative. 18:45, 9 Nov 2006 (UTC)

An alternate system would have comments delimited with btw (for the remainder of a line) or btw/hth to delineate blocks.

Rather than using <name> for an identifier, use that system for namespacing. Chat is an impersonal medium attempting to replace a more personal medium, and any system using chat-like metaphors or symbology in parody should amplify that impersonality as much as possible.

Omgrofl to PHP translator

Badly implemented, incomplete and slow. Mind the shit.

Source Code

<?php echo"<?php ";while($f=fgets(STDIN))echo str_replace(" ","",strtolower(
trim(preg_replace(array("{brb}","{rtfm}","{tldr}","{stfu}","{roflmao[ ]?(l(o+)l)}",
"{lmao[ ]?(l(o+)l)}","{rofl[ ]?((\d+)|(l(o+)l))}","{wtf[ ]?((\d+)|(l(o+)l))[ ]?iz".
"[ ]?nope[ ]?uber[ ]?((\d+)|(l(o+)l))}","{wtf[ ]?((\d+)|(l(o+)l))[ ]?iz[ ]?nope[ ".
"]?liek[ ]?((\d+)|(l(o+)l))}","{wtf[ ]?((\d+)|(l(o+)l))[ ]?iz[ ]?uber[ ]?((\d+)|(".
"l(o+)l))}","{wtf[ ]?((\d+)|(l(o+)l))[ ]?iz[ ]?liek[ ]?((\d+)|(l(o+)l))}","{4[ ]?".
"(l(o+)l)[ ]?iz[ ]?(\d+)[ ]?2[ ]?(\d+)}","{(l(o+)l)[ ]?iz[ ]?((\d+)|(l(o+)l))}"   ,
"{w00t(.*)}","{afk[ ]?(\d+)}","{(l(o+)l)}","{[\044]{2}}"),array("}","for(;;){","b".
"reak;","die();","$1=$1-1;","$1=$1+1;","echo(chr($1));","if($1<$5){","if($1!=$5){",
"if($1>$5){","if($1==$5){","for(\$$1=$3;$$1<$4;\$$1++){","\$$1=$3;","","usleep($1".
");","\$$1","$"),$f))));echo"?>";?>

Examples

Note: Translator does not conform to "one statement per line":

lol iz 97
rtfm
  rofl lol
  wtf lol iz liek 121 
    tldr
  brb
  lmao lol
brb
lol iz 12
wtf lol iz liek 12
  rofl 122
brb
looooool iz 10
rofl looooool
lol iz 97 rtfm rofl lol wtf lol iz liek 121 tldr brb lmao lol brb lol iz 12 wtf lol iz liek 12 rofl 122 brb looooool iz 10 rofl looooool
loliz97rtfmrofllolwtflolizliek121tldrbrblmaololbrbloliz12wtflolizliek12rofl122brblooooooliz10rofllooooool

Each of these examples perform the same function and produce the same output.

Unimplemented Features

Intelligent for-loops; currently they only increment.
The stfw command.
dev/null crap.
Stack/queue.
--(this comment by 82.17.66.43 at 00:59, 2 January 2008 UTC; please sign your comments with ~~~~)

Turing-completeness

While omgrofl is clearly Turing-complete, the reason stated on this page is insufficient, and worse, unnecessary. It would suffice to explicitly construct a queue machine in omgrofl, but this has not been done.

About Variable Names

So, in the description of variable names, it states that "these must be a form of the slang word lol". Does derivatives of lol work then, being a form of lol, like 'lolol' or 'lulz'? If so, how would a interpreter of this language go about knowing what forms of lol are acceptable? Iconmaster (talk) 00:36, 15 September 2013 (UTC)