Abuse filter log

Abuse Filter navigation (Home | Recent filter changes | Examine past edits | Abuse log)
Jump to navigation Jump to search
Details for log entry 7,618

21:08, 26 May 2021: Jedgrei (talk | contribs) triggered filter 9, performing the action "edit" on Pxem. Actions taken: Warn; Filter description: require new users to introduce themselves (examine)

Changes made in edit

 
|name=Pxem
 
|name=Pxem
 
|paradigms=Imperative paradigm
 
|paradigms=Imperative paradigm
|author=ぬこ/nk.<ref name="authorName">[https://web.archive.org/web/20120605223423/http://cfs.maxn.jp/neta/pxem.php The original document page] is said to be written by "ぬこ" while [https://vivibit.net/remember_pxem/ this new blog] is by "nk." This is because (s)he changed his/her name, which is explained on latter page. Therefore "ぬこ" is the original name and "nk." is the new one.</ref>
+
|author=ぬこ/nk.<ref name="authorName">[https://web.archive.org/web/20120605223423/http://cfs.maxn.jp/neta/pxem.php The original document page] is said to be written by "ぬこ" while [https://vivibit.net/remember_pxem/ this new blog] is by "nk." This is because (they changed their name, which is explained on latter page. Therefore "ぬこ" is the original name and "nk." is the new one.</ref>
 
|year=[[:Category:2008|2008]]
 
|year=[[:Category:2008|2008]]
 
|typesys=none
 
|typesys=none
 
|files=<code>.pxe</code>, <code>.pxem</code>
 
|files=<code>.pxe</code>, <code>.pxem</code>
 
}}
 
}}
'''Pxem'''(pronunciation is not specified, but author personally pronounces "ペクシム", which is pronounced like:pay-coo-she-moo<ref name="Blog"/>) is a programming language designed by "ぬこ"(Romanization:Nuko) or "nk."<ref name="authorName"/>. It is said that its name "Pxem" does not have any meanings. It was named because "it's easy to type its name with keyboard."<ref>No reliable sources about this origin known, as on 2019/08/04.</ref>
+
'''Pxem'''(pronunciation is not specified, but author personally pronounces "ペクシム"(pekushimu)<ref name="Blog"/>) is a programming language designed by ぬこ(nuko) or "nk."<ref name="authorName"/>. It is said that its name "Pxem" does not have any meanings. It was named because "it's easy to type its name with keyboard."<ref>No reliable sources about this origin known, as on 2019/08/04.</ref>
   
 
== History ==
 
== History ==
Pxem used to be published in author's own website before, which does not exist anymore. According to his/her new blog<ref name="Blog">[https://vivibit.net/remember_pxem/ Pxemの思い出] — ビビビッ (''Vivid Bit'') (Japanese).</ref>, (s)he used to compete in coding-golf held on [http://golf.shinh.org/ anarchy golf] using Perl, PHP, and [[brainfuck]]. One day, shinh, the host of the site, introduced [[GolfScript]], which is designed for coding-golf. In some courses, the script enables you to code with only one-byte files. This inspired him/her to design a new language for coding-golf working with zero-byte files. This is how Pxem got designed.
+
Pxem used to be published in author's own website before, which does not exist anymore. According to their new blog<ref name="Blog">[https://vivibit.net/remember_pxem/ Pxemの思い出] — ビビビッ (''Vivid Bit'') (Japanese).</ref>, they used to compete in coding-golf held on [http://golf.shinh.org/ anarchy golf] using Perl, PHP, and [[brainfuck]]. One day, shinh, the host of the site, introduced [[GolfScript]], which is designed for coding-golf. In some courses, the script enables you to code with only one-byte files. This inspired them to design a new language for coding-golf working with zero-byte files. This is how Pxem got designed.
   
 
== Specifications ==
 
== Specifications ==

Action parameters

VariableValue
Edit count of the user (user_editcount)
0
Name of the user account (user_name)
'Jedgrei'
Age of the user account (user_age)
977571
Page ID (page_id)
11918
Page namespace (page_namespace)
0
Page title (without namespace) (page_title)
'Pxem'
Full page title (page_prefixedtitle)
'Pxem'
Action (action)
'edit'
Edit summary/reason (summary)
'Changed pronouns to 'they' for simplicity'
Old content model (old_content_model)
'wikitext'
New content model (new_content_model)
'wikitext'
Old page wikitext, before the edit (old_wikitext)
'{{infobox proglang |name=Pxem |paradigms=Imperative paradigm |author=ぬこ/nk.<ref name="authorName">[https://web.archive.org/web/20120605223423/http://cfs.maxn.jp/neta/pxem.php The original document page] is said to be written by "ぬこ" while [https://vivibit.net/remember_pxem/ this new blog] is by "nk." This is because (s)he changed his/her name, which is explained on latter page. Therefore "ぬこ" is the original name and "nk." is the new one.</ref> |year=[[:Category:2008|2008]] |typesys=none |memsys=[[:Category:Stack-based|stack-based]] |dimensions=one-dimentional |class=[[:Category:Turing complete|Turing complete]] |refimpl=(Original ("ぬこ"/nk's)) [https://vivibit.net/remember_pxem/#i-2 pxemi.7z], [https://vivibit.net/remember_pxem/#i-8 text2pxem.pl]<br/>(wktk's) [https://github.com/wktk/rpxem rpxem] |majorimpl= |dialects= |influence= |influenced= |files=<code>.pxe</code>, <code>.pxem</code> }} '''Pxem'''(pronunciation is not specified, but author personally pronounces "ペクシム", which is pronounced like:pay-coo-she-moo<ref name="Blog"/>) is a programming language designed by "ぬこ"(Romanization:Nuko) or "nk."<ref name="authorName"/>. It is said that its name "Pxem" does not have any meanings. It was named because "it's easy to type its name with keyboard."<ref>No reliable sources about this origin known, as on 2019/08/04.</ref> == History == Pxem used to be published in author's own website before, which does not exist anymore. According to his/her new blog<ref name="Blog">[https://vivibit.net/remember_pxem/ Pxemの思い出] — ビビビッ (''Vivid Bit'') (Japanese).</ref>, (s)he used to compete in coding-golf held on [http://golf.shinh.org/ anarchy golf] using Perl, PHP, and [[brainfuck]]. One day, shinh, the host of the site, introduced [[GolfScript]], which is designed for coding-golf. In some courses, the script enables you to code with only one-byte files. This inspired him/her to design a new language for coding-golf working with zero-byte files. This is how Pxem got designed. == Specifications == === Virtual machine === Pxem interpreter works with a virtual machine with a stack ― stores values as integer type ―, a buffer ― stores a string for stacking into the stack ―, a temporary memory ― stores only a value at the same time, as integer type. The stack and the temporary memory will be initialized with no values. According to original interpreter, it is distinguished whether temporary memory has been used or not. === File name and contents === Pxem interpreter recognizes file name mainly as a source code of program. Contents of file, on the other hand, will be ignored unless file name includes either <code>.e</code> or <code>.f</code>, which is described in [[#Instructions|further sections]]. === How the code gets read === At first content of file name will be read from beginning to end. When it reaches to <code>.d</code> or end, the program terminates. When it reaches to <code>.e</code>, the interpreter begins to read content of file as the new process, which will be interpreted as part of Pxem code, from beginning to end. When it reaches to <code>.d</code> or end of file, the process ends, then original process gets continued. Vice versa when it reaches to <code>.e</code> inside file. === Instructions === Each command is consist of the following sequence: <code>.</code> (dot) and an ASCII character, and they are case-insensitive. Before the pointer reaches to the command, the character currently read will be added to the buffer as a character code. When the pointer reaches to the command, the content in the buffer gets pushed into the stack before the command gets operated. For example, the file <code>abcd.stuv.pxe</code> can be separated into 5 parts: <code>abcd</code>, <code>.s</code>, <code>tuv</code>, <code>.p</code>, and <code>xe</code>. Before reaching to the first instruction <code>.s</code>, the four characters d, c, b, and a get stacked in those order, which d is in bottom while a is in top. Then, by <code>.s</code> instruction, the top value 'a' gets popped. Later, the three characters v, u, and t get stacked in that order. By <code>.p</code>, the stack will be empty, because each content gets outputted as an ASCII character. Finally, two characters get pushed in following order then the program terminates: e, and x. ==== Output ==== {| class="wikitable" |- ! Command !! Description |- | <code>.p</code> || Pops and outputs as a character, then repeats until the stack gets empty.<ref group="ins" name="empty">If stack is empty, nothing happens</ref> ;Example :<code>hello world.pxe</code> :;Output ::<code>hello world</code> (without newline at end) |- | <code>.o</code> || Pops once and outputs as a character.<ref group="ins" name="empty"/> ;Example :<code>hello world.o.pxe</code> :;Output ::<code>h</code> |- | <code>.n</code> || Pops once and outputs as an integer value.<ref group="ins" name="empty"/> ;Example :<code>hello world.n.pxe</code> :;Output ::<code>104</code> (<code>h</code> values 104 in ASCII) |} ==== Input ==== {| class="wikitable" |- ! Command !! Description |- | <code>.i</code> || User inputs a character of a byte to stack. EOF values -1. ;Example :<code>hello.iworld.pxe</code> :;Input example ::<code>3</code> :;Output ::<code>world3hello</code> |- | <code>._</code> || User inputs a signed integer to stack. ;Example :<code>hello._world.pxe</code> :;Input example ::<code>95</code> (values <code>_</code> in ASCII) :;Output ::<code>world_hello</code> |} ==== Operating stack ==== {| class="wikitable" |- ! Command !! Description |- | <code>.c</code> || '''Duplicate''': Pops once, then pushes the popped item twice.<ref group="ins" name="empty"/> ;Example :<code>hello world.c.pxe</code> :;Output ::<code>hhello world</code> |- | <code>.s</code> || '''Drop''': Pops once and discards the item.<ref group="ins" name="empty"/> ;Example :<code>hello world.s.pxe</code> :;Output ::<code>ello world</code> |- | <code>.v</code> || Reverses content of the stack. ;Example :<code>hello world.v.pxe</code> :;Output ::<code>dlrow olleh</code> |} ==== Operating content of file ==== {| class="wikitable" |- ! Command !! Description |- | <code>.f</code> || Stacks content of file as a string. This command never erases content of file. ;Example : :;Filename ::<code>world.f.pxe</code> :;Content of file ::<code>hello,</code> :;Output ::<code>hello,world</code> |- | <code>.e</code> || '''Execution''': Recognizes content of file as a part of Pxem code and begins new process there, making a new stack memory(items in original stack will be copied) and a temporary register (empty)<ref name="Blog"/>. After the process ends, *Content of the stack will be stacked to original one. *Content of the temporary register will be lost<ref group="ins">This is not officially documented, but pxem.h of pxemi.7z satisfies this specification.</ref>. You may run this command as many times as you'd like. ;Example 1 :<code>hello.e.world.pxe</code> ''(content is none)'' :;Output ::<code>worldhellohello</code> ;Example 2 : :;Filename ::<code>hello.e.world.pxe</code> :;Content ::<code>.v.c</code> ::;Output :::<code>worldllehhello</code> |} ==== Random value ==== {| class="wikitable" |- ! Command !! Description |- | <code>.r</code> || Pops an item x, then pushes a signed random integer between 0 and (x-1). For example, if x were 10, one of 0-9 would be generated.<ref group="ins" name="empty"/><ref group="ins">It was not originally specified what would happen if top value were either 0 or -1 on [https://web.archive.org/web/20120605223423/http://cfs.maxn.jp/neta/pxem.php original description page], but according to pxem.h of pxemi.7z, the original interpreter, it is implemented in following function: <pre class="rectwrap"> inline void Pxem::getRand(){ int aaa = rand() % pStack.top(); pStack.pop(); pStack.push(aaa); } </pre> Therefore the program would result in an error by dividing by 0. </ref> ;Example :<code>0.r.n.pxe</code> :;Output ::One of 0-47 (character <code>0</code> values 48 in ASCII) |} ==== Conditional looping ==== All of the following instructions may be nested. {| class="wikitable" |- ! Command !! Description |- | <code>.w</code> || '''Loop while not zero''': Pops top value and tests if it is 0 or not<ref group="ins">It won't test if stack is empty.</ref>. If it's zero, skip to the matching <code>.a</code> instruction.<ref group="ins" name="cond">It was not specified on original description page, but according to [https://vivibit.net/remember_pxem/ revival blog page], the author clarified what would happen the number of values in the stack were not enough: nothing would happen to content of the stack. However, it was not clarified whether the program loops or not. But according to the original interpreter pxem.h of pxemi.7z, the program will loop.</ref> |- | <code>.x</code> || '''Loop while less''': Pops two top values. If firstly popped value is equal or greater than secondly popped one<ref group="ins">Original description said: ''if first-popped item is NOT smaller than the other''.</ref>, skip to the matching <code>.a</code> instruction.<ref group="ins" name="cond"/> |- | <code>.y</code> || '''Loop while greater''': Pops two top values. If firstly popped value is equal or less than secondly popped one<ref group="ins">Original description said: ''if first-popped item is NOT greater than the other''.</ref>, skip to the matching <code>.a</code> instruction.<ref group="ins" name="cond"/> |- | <code>.z</code> || '''Loop while not equal''': Pops two top values. If they are equal, skip to the matching <code>.a</code> instruction.<ref group="ins" name="cond"/> |- | <code>.a</code> || '''End of loop''': Jumps back to corresponding one of four above. If there are not, the program results in an error<ref name="Blog"/>. |} ;Note :Five commands above can be nested. ;Example 1 :<code>Hello, world.w.pxe</code> :<code>Hello, world.a.pxe</code> ::Both two above results in an error during running. Former one is because of reaching to no <code>.a</code>'s while other is because of reaching <code>.a</code> before four others. ;Example 2 :<code>abcdeffggghijj.z.a.pxe</code> :;Output ::<code>hijj</code> ;Example 3 :<code>abcdeffggghijj.x.a.pxe</code> :;Output ::<code>hijj</code> ;Example 4 :<code>abcdeffggghijj.y.a.pxe</code> :;Output ::<code>cdeffggghijj</code> ;Example 5 :<code>a.w.a.pxe</code> ::This program will never terminate, for causing an infinite loop. ==== Temporary memory ==== {| class="wikitable" |- ! Command !! Description |- | <code>.t</code> || Pops top value. The value gets stored in temporary register.<ref group="ins">Old content in the register will be lost.</ref><ref group="ins">It is not clarified what would happen if the stack were empty.</ref> |- | <code>.m</code> || Pushes content in temporary register.<ref group="ins">The content of the register will not be lost.</ref> If the register is empty, nothing happens. |} ==== Termination ==== {| class="wikitable" |- ! Command !! Description |- | <code>.d</code> || '''Return'''<ref group="ins">Original description just says to stop execution.</ref>. This instruction works differently on either file name or content. ;In file name :The program gets terminated. ;In content of file :The subprocess gets terminated, then content of stack gets stacked to parent one, and the temporary register gets destroyed. |} ==== Arithmetic operation ==== {| class="wikitable" |- ! Command !! Description |- | <code>.+</code> || '''Addition operation''': Pops two top values, then pushes sum of them.<ref group="ins" name="op">If the stack has less than two values, nothing happens.</ref> |- | <code>.-</code> || '''Subtraction operation''': Pops two top values, then substrates smaller one from larger one. Pushes the result.<ref group="ins" name="op"/> |- | <code>.!</code> || '''Multiplication operation''': Pops two top values, then pushes their product.<ref group="ins" name="op"/> |- | <code>.$</code> || '''Division operation''': Pops two top values, then divides larger one by smaller one. Pushes the quotient.<ref group="ins" name="op"/><ref group="ins" name="div">The program would result in an error if top value were 0, according to pxem.h of pxemi.7z, the original interpreter.</ref> |- | <code>.%</code> || '''Modulo operation''': Pops two top values, then divides larger one by smaller one. Pushes the remainder.<ref group="ins" name="op"/><ref group="ins" name="div"/> |} <references group="ins"/> == Examples == === [[Hello, world!]] === To output ''Hello, world!'', the filename should be: Hello, world!.pxe while the contents of file is arbitrary. ==== Other example ==== This alternative example is efficient if you prefer not to use symbols other than period and hyphen. This program outputs a newline, too. Hello.pAa.-Am.-.pworld.pak.-Ab.-.pxe === Echo (or [[cat program]] in exact) === ;Filename :1.w.o.i.c12.-.+.a.s.pxe ;File Contents :''(none)'' === Ultimate problem === ;Filename :42.pxe ;File Contents :''(none)'' === delete last line === ;Filename :1.w.i.c12.-.+.a1.zak.-.a.v.pxe ;File Contents :''(none)'' === [[FizzBuzz]] === ;Filename :ak.-akbuzz.-ak4.-akfizz.-ak2.-1.p05.-.tab.z01.-.c.m.+.c.t05.-.%.w.s01.-.m03.-.%.W.s.m.nak.-.p00.-.c.c.c.a.wak.-fizz.p00.-.c.c.a.a.w01.-.m03.-.%.w.sak.-buzz.p00.-.c.c.a.wak.-fizzbuzz.p00.-.c.a.a.md2.-02.-.!.a.d.pxe ;File Contents :''(none)'' === Prints 10 one-digit random numbers === ;Filename :ak.-.z.tak.-.c.r.n.p.m01.-.-.c00.-.a.pxe == Implementations == === By original designer === ==== pxemi.exe (original) ==== Original author used to publish its interpreter named "'''pxemi.exe'''", which was developed in C++ and would work on Windows only. ==== Lost code generator ==== On original page there used to be a code generator, which seems to be lost. ==== pxemi.7z ==== After ten years, its original interpreter got published again on original author's blog<ref name="Blog"/>. In this page the interpreter is distributed as '''pxemi.7z''', zipping two files '''pxem.h''' and '''pxemInterpreter.cpp'''. ===== Bug ===== As on January 1st, 2020, the header file '''pxem.h''' has a following bug: *<code>inline void Pxem::copy()</code> — a method for command <code>.c</code> — is missing the procedure for an empty stack; the specification supposes the command works like an NOP in the case, but the actual implementation is missing the part. ==== text2pxem.pl ==== There's also a simple supportive kit '''text2pxem.pl'''. It compiles a text file into Pxem code file and emulates with text file. The usage is: #Put pxemi.exe<ref>It implies that interpreter's name must be "pxemi.exe". It seems that you have to change <code>pxemi.exe</code> of the file into appropriate name.</ref> and text2pxem.pl in the same directory. #Make a text file with any name (name does not matter). #Write filename first. You can separate into lines. You put any horizontal tab characters at the beginning of a line, they are ignored. You put a tab in the end, you can write a comment followed by the character. #If you'd like to write content of the file, you have to put '''one line of''' <code>__EOF__</code> to imply the end of filename. Then following contents are recognized as contents. #Run text2pxem.pl with following arguments: #*1st argument must be filename for text file you made. With no 2nd argument, it compiles into Pxem file. #*You specify 2nd argument <code>-e</code>, it does not only compile, but also execute with the file. ;Usage example : :;Your file :: <pre class="rectwrap">n4-).- mk ':-)' ak.- mk '\n' n4-.- mk ':-' ak.- mk '\n' n4.-.p mk ':' 01.-.t mk 0 and toreg .z loop A n4-).- mk ':-)' ak.- mk '\n' .p print .m fromreg .e exec file .v.s.v delete flag .p print .m fromreg 12.-.+ mk 1 and add .t toreg .m .a end loop A .d.pxe __EOF__ .t toreg .z loop B 01)).-.m.-.t 00.-.m .a end loop B </pre> This file<ref name="Blog"/>, for example, generates a file named <code>n4-).-ak.-n4-.-ak.-n4.-.p01.-.t.zn4-).-ak.-.p.m.e.v.s.v.p.m12.-.+.t .m.a.d.pxe</code>, with content <code>.t.z01)).-.m.-.t00.-.m.a</code>. :;Using the tool ::<code>txt2pxem.pl filename</code> :::Just a compilation. ::<code>txt2pxem.pl filename -e</code> :::Not only compilation, but also execution. :::You must put an <code>-e</code> exactly on the second argument. By the way you have to replace every <code>\r\n</code> into <code>\n</code> if you're running text2pxem.pl on non-Windows environments. === Others === As on September 2018, there are three repositories for interpreter-development, which are on [[#External Links]]. == Turing-completeness == "nk." originally predicted Pxem is not Turing-complete because Pxem has no built-in command for "swap" operation of the stack<ref name='Blog'/>. In May 2020, several proofs of Turing-completeness of Pxem gets published on a personal blog <ref>[http://forums.acidch.at/showthread.php?tid=7526 Minimalization of Pxem] — Acid Forums.</ref>. == External Links == *{{wayback|20120605223423|http://cfs.maxn.jp/neta/pxem.php|Original description page (Japanese)}} *[https://vivibit.net/remember_pxem/ The blog by original author] (Japanese) ― '''Original interpreter source (and supportive tools) available!''' (Stated to be licensed under WTFPL) *[http://www.nicovideo.jp/watch/sm5808782 Pxemでネギを振ってみた - NicoNico Video] ― The only video to try running Pxem.(Japanese) *[https://github.com/wktk/rpxem wktk/rpxem] ― The interpreter developed in Ruby. Some commands (<code>.d</code> and some) doesn't work properly. **[https://wktk.jp/tags/pxem/ wktk's blog] ― Two programs are shown. One is to output whether the number is prime number or not and the other one is to calculate the factorial. *[https://github.com/rhwckl/pxem rhwckl/pxem] ― The compiler-time interpreter developed in C++. Two libraries:Boost and Sprout are necessary in order to compiler. The syntax is modified. *[https://github.com/GH-TpaeFawzen/Pxem2Cplusplus11 GH-TpaeFawzen/Pxem2Cplusplus11] — Implemented in Bourne shell. Translates into C++11 program. == References == <references/> [[Category:Languages]] [[Category:Stack-based]] [[Category:Implemented]] [[Category:2008]] [[Category:Probabilistic]] [[Category:Nondeterministic]] [[Category:Turing complete]]'
New page wikitext, after the edit (new_wikitext)
'{{infobox proglang |name=Pxem |paradigms=Imperative paradigm |author=ぬこ/nk.<ref name="authorName">[https://web.archive.org/web/20120605223423/http://cfs.maxn.jp/neta/pxem.php The original document page] is said to be written by "ぬこ" while [https://vivibit.net/remember_pxem/ this new blog] is by "nk." This is because (they changed their name, which is explained on latter page. Therefore "ぬこ" is the original name and "nk." is the new one.</ref> |year=[[:Category:2008|2008]] |typesys=none |memsys=[[:Category:Stack-based|stack-based]] |dimensions=one-dimentional |class=[[:Category:Turing complete|Turing complete]] |refimpl=(Original ("ぬこ"/nk's)) [https://vivibit.net/remember_pxem/#i-2 pxemi.7z], [https://vivibit.net/remember_pxem/#i-8 text2pxem.pl]<br/>(wktk's) [https://github.com/wktk/rpxem rpxem] |majorimpl= |dialects= |influence= |influenced= |files=<code>.pxe</code>, <code>.pxem</code> }} '''Pxem'''(pronunciation is not specified, but author personally pronounces "ペクシム"(pekushimu)<ref name="Blog"/>) is a programming language designed by ぬこ(nuko) or "nk."<ref name="authorName"/>. It is said that its name "Pxem" does not have any meanings. It was named because "it's easy to type its name with keyboard."<ref>No reliable sources about this origin known, as on 2019/08/04.</ref> == History == Pxem used to be published in author's own website before, which does not exist anymore. According to their new blog<ref name="Blog">[https://vivibit.net/remember_pxem/ Pxemの思い出] — ビビビッ (''Vivid Bit'') (Japanese).</ref>, they used to compete in coding-golf held on [http://golf.shinh.org/ anarchy golf] using Perl, PHP, and [[brainfuck]]. One day, shinh, the host of the site, introduced [[GolfScript]], which is designed for coding-golf. In some courses, the script enables you to code with only one-byte files. This inspired them to design a new language for coding-golf working with zero-byte files. This is how Pxem got designed. == Specifications == === Virtual machine === Pxem interpreter works with a virtual machine with a stack ― stores values as integer type ―, a buffer ― stores a string for stacking into the stack ―, a temporary memory ― stores only a value at the same time, as integer type. The stack and the temporary memory will be initialized with no values. According to original interpreter, it is distinguished whether temporary memory has been used or not. === File name and contents === Pxem interpreter recognizes file name mainly as a source code of program. Contents of file, on the other hand, will be ignored unless file name includes either <code>.e</code> or <code>.f</code>, which is described in [[#Instructions|further sections]]. === How the code gets read === At first content of file name will be read from beginning to end. When it reaches to <code>.d</code> or end, the program terminates. When it reaches to <code>.e</code>, the interpreter begins to read content of file as the new process, which will be interpreted as part of Pxem code, from beginning to end. When it reaches to <code>.d</code> or end of file, the process ends, then original process gets continued. Vice versa when it reaches to <code>.e</code> inside file. === Instructions === Each command is consist of the following sequence: <code>.</code> (dot) and an ASCII character, and they are case-insensitive. Before the pointer reaches to the command, the character currently read will be added to the buffer as a character code. When the pointer reaches to the command, the content in the buffer gets pushed into the stack before the command gets operated. For example, the file <code>abcd.stuv.pxe</code> can be separated into 5 parts: <code>abcd</code>, <code>.s</code>, <code>tuv</code>, <code>.p</code>, and <code>xe</code>. Before reaching to the first instruction <code>.s</code>, the four characters d, c, b, and a get stacked in those order, which d is in bottom while a is in top. Then, by <code>.s</code> instruction, the top value 'a' gets popped. Later, the three characters v, u, and t get stacked in that order. By <code>.p</code>, the stack will be empty, because each content gets outputted as an ASCII character. Finally, two characters get pushed in following order then the program terminates: e, and x. ==== Output ==== {| class="wikitable" |- ! Command !! Description |- | <code>.p</code> || Pops and outputs as a character, then repeats until the stack gets empty.<ref group="ins" name="empty">If stack is empty, nothing happens</ref> ;Example :<code>hello world.pxe</code> :;Output ::<code>hello world</code> (without newline at end) |- | <code>.o</code> || Pops once and outputs as a character.<ref group="ins" name="empty"/> ;Example :<code>hello world.o.pxe</code> :;Output ::<code>h</code> |- | <code>.n</code> || Pops once and outputs as an integer value.<ref group="ins" name="empty"/> ;Example :<code>hello world.n.pxe</code> :;Output ::<code>104</code> (<code>h</code> values 104 in ASCII) |} ==== Input ==== {| class="wikitable" |- ! Command !! Description |- | <code>.i</code> || User inputs a character of a byte to stack. EOF values -1. ;Example :<code>hello.iworld.pxe</code> :;Input example ::<code>3</code> :;Output ::<code>world3hello</code> |- | <code>._</code> || User inputs a signed integer to stack. ;Example :<code>hello._world.pxe</code> :;Input example ::<code>95</code> (values <code>_</code> in ASCII) :;Output ::<code>world_hello</code> |} ==== Operating stack ==== {| class="wikitable" |- ! Command !! Description |- | <code>.c</code> || '''Duplicate''': Pops once, then pushes the popped item twice.<ref group="ins" name="empty"/> ;Example :<code>hello world.c.pxe</code> :;Output ::<code>hhello world</code> |- | <code>.s</code> || '''Drop''': Pops once and discards the item.<ref group="ins" name="empty"/> ;Example :<code>hello world.s.pxe</code> :;Output ::<code>ello world</code> |- | <code>.v</code> || Reverses content of the stack. ;Example :<code>hello world.v.pxe</code> :;Output ::<code>dlrow olleh</code> |} ==== Operating content of file ==== {| class="wikitable" |- ! Command !! Description |- | <code>.f</code> || Stacks content of file as a string. This command never erases content of file. ;Example : :;Filename ::<code>world.f.pxe</code> :;Content of file ::<code>hello,</code> :;Output ::<code>hello,world</code> |- | <code>.e</code> || '''Execution''': Recognizes content of file as a part of Pxem code and begins new process there, making a new stack memory(items in original stack will be copied) and a temporary register (empty)<ref name="Blog"/>. After the process ends, *Content of the stack will be stacked to original one. *Content of the temporary register will be lost<ref group="ins">This is not officially documented, but pxem.h of pxemi.7z satisfies this specification.</ref>. You may run this command as many times as you'd like. ;Example 1 :<code>hello.e.world.pxe</code> ''(content is none)'' :;Output ::<code>worldhellohello</code> ;Example 2 : :;Filename ::<code>hello.e.world.pxe</code> :;Content ::<code>.v.c</code> ::;Output :::<code>worldllehhello</code> |} ==== Random value ==== {| class="wikitable" |- ! Command !! Description |- | <code>.r</code> || Pops an item x, then pushes a signed random integer between 0 and (x-1). For example, if x were 10, one of 0-9 would be generated.<ref group="ins" name="empty"/><ref group="ins">It was not originally specified what would happen if top value were either 0 or -1 on [https://web.archive.org/web/20120605223423/http://cfs.maxn.jp/neta/pxem.php original description page], but according to pxem.h of pxemi.7z, the original interpreter, it is implemented in following function: <pre class="rectwrap"> inline void Pxem::getRand(){ int aaa = rand() % pStack.top(); pStack.pop(); pStack.push(aaa); } </pre> Therefore the program would result in an error by dividing by 0. </ref> ;Example :<code>0.r.n.pxe</code> :;Output ::One of 0-47 (character <code>0</code> values 48 in ASCII) |} ==== Conditional looping ==== All of the following instructions may be nested. {| class="wikitable" |- ! Command !! Description |- | <code>.w</code> || '''Loop while not zero''': Pops top value and tests if it is 0 or not<ref group="ins">It won't test if stack is empty.</ref>. If it's zero, skip to the matching <code>.a</code> instruction.<ref group="ins" name="cond">It was not specified on original description page, but according to [https://vivibit.net/remember_pxem/ revival blog page], the author clarified what would happen the number of values in the stack were not enough: nothing would happen to content of the stack. However, it was not clarified whether the program loops or not. But according to the original interpreter pxem.h of pxemi.7z, the program will loop.</ref> |- | <code>.x</code> || '''Loop while less''': Pops two top values. If firstly popped value is equal or greater than secondly popped one<ref group="ins">Original description said: ''if first-popped item is NOT smaller than the other''.</ref>, skip to the matching <code>.a</code> instruction.<ref group="ins" name="cond"/> |- | <code>.y</code> || '''Loop while greater''': Pops two top values. If firstly popped value is equal or less than secondly popped one<ref group="ins">Original description said: ''if first-popped item is NOT greater than the other''.</ref>, skip to the matching <code>.a</code> instruction.<ref group="ins" name="cond"/> |- | <code>.z</code> || '''Loop while not equal''': Pops two top values. If they are equal, skip to the matching <code>.a</code> instruction.<ref group="ins" name="cond"/> |- | <code>.a</code> || '''End of loop''': Jumps back to corresponding one of four above. If there are not, the program results in an error<ref name="Blog"/>. |} ;Note :Five commands above can be nested. ;Example 1 :<code>Hello, world.w.pxe</code> :<code>Hello, world.a.pxe</code> ::Both two above results in an error during running. Former one is because of reaching to no <code>.a</code>'s while other is because of reaching <code>.a</code> before four others. ;Example 2 :<code>abcdeffggghijj.z.a.pxe</code> :;Output ::<code>hijj</code> ;Example 3 :<code>abcdeffggghijj.x.a.pxe</code> :;Output ::<code>hijj</code> ;Example 4 :<code>abcdeffggghijj.y.a.pxe</code> :;Output ::<code>cdeffggghijj</code> ;Example 5 :<code>a.w.a.pxe</code> ::This program will never terminate, for causing an infinite loop. ==== Temporary memory ==== {| class="wikitable" |- ! Command !! Description |- | <code>.t</code> || Pops top value. The value gets stored in temporary register.<ref group="ins">Old content in the register will be lost.</ref><ref group="ins">It is not clarified what would happen if the stack were empty.</ref> |- | <code>.m</code> || Pushes content in temporary register.<ref group="ins">The content of the register will not be lost.</ref> If the register is empty, nothing happens. |} ==== Termination ==== {| class="wikitable" |- ! Command !! Description |- | <code>.d</code> || '''Return'''<ref group="ins">Original description just says to stop execution.</ref>. This instruction works differently on either file name or content. ;In file name :The program gets terminated. ;In content of file :The subprocess gets terminated, then content of stack gets stacked to parent one, and the temporary register gets destroyed. |} ==== Arithmetic operation ==== {| class="wikitable" |- ! Command !! Description |- | <code>.+</code> || '''Addition operation''': Pops two top values, then pushes sum of them.<ref group="ins" name="op">If the stack has less than two values, nothing happens.</ref> |- | <code>.-</code> || '''Subtraction operation''': Pops two top values, then substrates smaller one from larger one. Pushes the result.<ref group="ins" name="op"/> |- | <code>.!</code> || '''Multiplication operation''': Pops two top values, then pushes their product.<ref group="ins" name="op"/> |- | <code>.$</code> || '''Division operation''': Pops two top values, then divides larger one by smaller one. Pushes the quotient.<ref group="ins" name="op"/><ref group="ins" name="div">The program would result in an error if top value were 0, according to pxem.h of pxemi.7z, the original interpreter.</ref> |- | <code>.%</code> || '''Modulo operation''': Pops two top values, then divides larger one by smaller one. Pushes the remainder.<ref group="ins" name="op"/><ref group="ins" name="div"/> |} <references group="ins"/> == Examples == === [[Hello, world!]] === To output ''Hello, world!'', the filename should be: Hello, world!.pxe while the contents of file is arbitrary. ==== Other example ==== This alternative example is efficient if you prefer not to use symbols other than period and hyphen. This program outputs a newline, too. Hello.pAa.-Am.-.pworld.pak.-Ab.-.pxe === Echo (or [[cat program]] in exact) === ;Filename :1.w.o.i.c12.-.+.a.s.pxe ;File Contents :''(none)'' === Ultimate problem === ;Filename :42.pxe ;File Contents :''(none)'' === delete last line === ;Filename :1.w.i.c12.-.+.a1.zak.-.a.v.pxe ;File Contents :''(none)'' === [[FizzBuzz]] === ;Filename :ak.-akbuzz.-ak4.-akfizz.-ak2.-1.p05.-.tab.z01.-.c.m.+.c.t05.-.%.w.s01.-.m03.-.%.W.s.m.nak.-.p00.-.c.c.c.a.wak.-fizz.p00.-.c.c.a.a.w01.-.m03.-.%.w.sak.-buzz.p00.-.c.c.a.wak.-fizzbuzz.p00.-.c.a.a.md2.-02.-.!.a.d.pxe ;File Contents :''(none)'' === Prints 10 one-digit random numbers === ;Filename :ak.-.z.tak.-.c.r.n.p.m01.-.-.c00.-.a.pxe == Implementations == === By original designer === ==== pxemi.exe (original) ==== Original author used to publish its interpreter named "'''pxemi.exe'''", which was developed in C++ and would work on Windows only. ==== Lost code generator ==== On original page there used to be a code generator, which seems to be lost. ==== pxemi.7z ==== After ten years, its original interpreter got published again on original author's blog<ref name="Blog"/>. In this page the interpreter is distributed as '''pxemi.7z''', zipping two files '''pxem.h''' and '''pxemInterpreter.cpp'''. ===== Bug ===== As on January 1st, 2020, the header file '''pxem.h''' has a following bug: *<code>inline void Pxem::copy()</code> — a method for command <code>.c</code> — is missing the procedure for an empty stack; the specification supposes the command works like an NOP in the case, but the actual implementation is missing the part. ==== text2pxem.pl ==== There's also a simple supportive kit '''text2pxem.pl'''. It compiles a text file into Pxem code file and emulates with text file. The usage is: #Put pxemi.exe<ref>It implies that interpreter's name must be "pxemi.exe". It seems that you have to change <code>pxemi.exe</code> of the file into appropriate name.</ref> and text2pxem.pl in the same directory. #Make a text file with any name (name does not matter). #Write filename first. You can separate into lines. You put any horizontal tab characters at the beginning of a line, they are ignored. You put a tab in the end, you can write a comment followed by the character. #If you'd like to write content of the file, you have to put '''one line of''' <code>__EOF__</code> to imply the end of filename. Then following contents are recognized as contents. #Run text2pxem.pl with following arguments: #*1st argument must be filename for text file you made. With no 2nd argument, it compiles into Pxem file. #*You specify 2nd argument <code>-e</code>, it does not only compile, but also execute with the file. ;Usage example : :;Your file :: <pre class="rectwrap">n4-).- mk ':-)' ak.- mk '\n' n4-.- mk ':-' ak.- mk '\n' n4.-.p mk ':' 01.-.t mk 0 and toreg .z loop A n4-).- mk ':-)' ak.- mk '\n' .p print .m fromreg .e exec file .v.s.v delete flag .p print .m fromreg 12.-.+ mk 1 and add .t toreg .m .a end loop A .d.pxe __EOF__ .t toreg .z loop B 01)).-.m.-.t 00.-.m .a end loop B </pre> This file<ref name="Blog"/>, for example, generates a file named <code>n4-).-ak.-n4-.-ak.-n4.-.p01.-.t.zn4-).-ak.-.p.m.e.v.s.v.p.m12.-.+.t .m.a.d.pxe</code>, with content <code>.t.z01)).-.m.-.t00.-.m.a</code>. :;Using the tool ::<code>txt2pxem.pl filename</code> :::Just a compilation. ::<code>txt2pxem.pl filename -e</code> :::Not only compilation, but also execution. :::You must put an <code>-e</code> exactly on the second argument. By the way you have to replace every <code>\r\n</code> into <code>\n</code> if you're running text2pxem.pl on non-Windows environments. === Others === As on September 2018, there are three repositories for interpreter-development, which are on [[#External Links]]. == Turing-completeness == "nk." originally predicted Pxem is not Turing-complete because Pxem has no built-in command for "swap" operation of the stack<ref name='Blog'/>. In May 2020, several proofs of Turing-completeness of Pxem gets published on a personal blog <ref>[http://forums.acidch.at/showthread.php?tid=7526 Minimalization of Pxem] — Acid Forums.</ref>. == External Links == *{{wayback|20120605223423|http://cfs.maxn.jp/neta/pxem.php|Original description page (Japanese)}} *[https://vivibit.net/remember_pxem/ The blog by original author] (Japanese) ― '''Original interpreter source (and supportive tools) available!''' (Stated to be licensed under WTFPL) *[http://www.nicovideo.jp/watch/sm5808782 Pxemでネギを振ってみた - NicoNico Video] ― The only video to try running Pxem.(Japanese) *[https://github.com/wktk/rpxem wktk/rpxem] ― The interpreter developed in Ruby. Some commands (<code>.d</code> and some) doesn't work properly. **[https://wktk.jp/tags/pxem/ wktk's blog] ― Two programs are shown. One is to output whether the number is prime number or not and the other one is to calculate the factorial. *[https://github.com/rhwckl/pxem rhwckl/pxem] ― The compiler-time interpreter developed in C++. Two libraries:Boost and Sprout are necessary in order to compiler. The syntax is modified. *[https://github.com/GH-TpaeFawzen/Pxem2Cplusplus11 GH-TpaeFawzen/Pxem2Cplusplus11] — Implemented in Bourne shell. Translates into C++11 program. == References == <references/> [[Category:Languages]] [[Category:Stack-based]] [[Category:Implemented]] [[Category:2008]] [[Category:Probabilistic]] [[Category:Nondeterministic]] [[Category:Turing complete]]'
Unified diff of changes made by edit (edit_diff)
'@@ -2,5 +2,5 @@ |name=Pxem |paradigms=Imperative paradigm -|author=ぬこ/nk.<ref name="authorName">[https://web.archive.org/web/20120605223423/http://cfs.maxn.jp/neta/pxem.php The original document page] is said to be written by "ぬこ" while [https://vivibit.net/remember_pxem/ this new blog] is by "nk." This is because (s)he changed his/her name, which is explained on latter page. Therefore "ぬこ" is the original name and "nk." is the new one.</ref> +|author=ぬこ/nk.<ref name="authorName">[https://web.archive.org/web/20120605223423/http://cfs.maxn.jp/neta/pxem.php The original document page] is said to be written by "ぬこ" while [https://vivibit.net/remember_pxem/ this new blog] is by "nk." This is because (they changed their name, which is explained on latter page. Therefore "ぬこ" is the original name and "nk." is the new one.</ref> |year=[[:Category:2008|2008]] |typesys=none @@ -15,8 +15,8 @@ |files=<code>.pxe</code>, <code>.pxem</code> }} -'''Pxem'''(pronunciation is not specified, but author personally pronounces "ペクシム", which is pronounced like:pay-coo-she-moo<ref name="Blog"/>) is a programming language designed by "ぬこ"(Romanization:Nuko) or "nk."<ref name="authorName"/>. It is said that its name "Pxem" does not have any meanings. It was named because "it's easy to type its name with keyboard."<ref>No reliable sources about this origin known, as on 2019/08/04.</ref> +'''Pxem'''(pronunciation is not specified, but author personally pronounces "ペクシム"(pekushimu)<ref name="Blog"/>) is a programming language designed by ぬこ(nuko) or "nk."<ref name="authorName"/>. It is said that its name "Pxem" does not have any meanings. It was named because "it's easy to type its name with keyboard."<ref>No reliable sources about this origin known, as on 2019/08/04.</ref> == History == -Pxem used to be published in author's own website before, which does not exist anymore. According to his/her new blog<ref name="Blog">[https://vivibit.net/remember_pxem/ Pxemの思い出] — ビビビッ (''Vivid Bit'') (Japanese).</ref>, (s)he used to compete in coding-golf held on [http://golf.shinh.org/ anarchy golf] using Perl, PHP, and [[brainfuck]]. One day, shinh, the host of the site, introduced [[GolfScript]], which is designed for coding-golf. In some courses, the script enables you to code with only one-byte files. This inspired him/her to design a new language for coding-golf working with zero-byte files. This is how Pxem got designed. +Pxem used to be published in author's own website before, which does not exist anymore. According to their new blog<ref name="Blog">[https://vivibit.net/remember_pxem/ Pxemの思い出] — ビビビッ (''Vivid Bit'') (Japanese).</ref>, they used to compete in coding-golf held on [http://golf.shinh.org/ anarchy golf] using Perl, PHP, and [[brainfuck]]. One day, shinh, the host of the site, introduced [[GolfScript]], which is designed for coding-golf. In some courses, the script enables you to code with only one-byte files. This inspired them to design a new language for coding-golf working with zero-byte files. This is how Pxem got designed. == Specifications == '
New page size (new_size)
18221
Old page size (old_size)
18275
Lines added in edit (added_lines)
[ 0 => '|author=ぬこ/nk.<ref name="authorName">[https://web.archive.org/web/20120605223423/http://cfs.maxn.jp/neta/pxem.php The original document page] is said to be written by "ぬこ" while [https://vivibit.net/remember_pxem/ this new blog] is by "nk." This is because (they changed their name, which is explained on latter page. Therefore "ぬこ" is the original name and "nk." is the new one.</ref>', 1 => ''''Pxem'''(pronunciation is not specified, but author personally pronounces "ペクシム"(pekushimu)<ref name="Blog"/>) is a programming language designed by ぬこ(nuko) or "nk."<ref name="authorName"/>. It is said that its name "Pxem" does not have any meanings. It was named because "it's easy to type its name with keyboard."<ref>No reliable sources about this origin known, as on 2019/08/04.</ref>', 2 => 'Pxem used to be published in author's own website before, which does not exist anymore. According to their new blog<ref name="Blog">[https://vivibit.net/remember_pxem/ Pxemの思い出] — ビビビッ (''Vivid Bit'') (Japanese).</ref>, they used to compete in coding-golf held on [http://golf.shinh.org/ anarchy golf] using Perl, PHP, and [[brainfuck]]. One day, shinh, the host of the site, introduced [[GolfScript]], which is designed for coding-golf. In some courses, the script enables you to code with only one-byte files. This inspired them to design a new language for coding-golf working with zero-byte files. This is how Pxem got designed.' ]
Unix timestamp of change (timestamp)
1622063287