Examine individual changes

Abuse Filter navigation (Home | Recent filter changes | Examine past edits | Abuse log)
Jump to navigation Jump to search

This page allows you to examine the variables generated by the Abuse Filter for an individual change.

Variables generated for this change

VariableValue
Edit count of the user (user_editcount)
0
Name of the user account (user_name)
'WinslowJosiah'
Age of the user account (user_age)
153820
Page ID (page_id)
0
Page namespace (page_namespace)
0
Page title (without namespace) (page_title)
'Bespoke'
Full page title (page_prefixedtitle)
'Bespoke'
Action (action)
'edit'
Edit summary/reason (summary)
'Create page for Bespoke'
Old content model (old_content_model)
''
New content model (new_content_model)
'wikitext'
Old page wikitext, before the edit (old_wikitext)
''
New page wikitext, after the edit (new_wikitext)
''''Bespoke''' is an [[esoteric programming language]] created in 2025 by Josiah Winslow. It encodes instructions into the lengths of words, similarly to his earlier esolang [[Poetic (esolang)|Poetic]]. Programs can tend to look like abstract poetry, although a series of instruction mnemonics are often used when developing programs to make the process easier. ==Overview== Bespoke has both a stack and a heap for storing data. Arbitrary precision signed integers can be pushed and popped onto the stack, and the heap maps integer addresses to integer values. Source code for Bespoke is entered in the form of words, in any natural language. Words are considered to consist of any number of alphabetic characters and apostrophes, and any character that is not either of these is ignored and treated as a delimiter. Apostrophes do not delimit words or add to the letter count. Each word is then converted to numbers as follows: * If a word is less than 10 letters long, it is converted to that single digit. * If a word is exactly 10 letters long, it is converted to the digit <code>0</code>. * If a word is more than 10 letters long, it is converted to a series of digits, representing the number as written in decimal notation (for example, a 12-letter word becomes <code>12</code>). The digits are then turned into a series of instructions and executed. ==Instructions== In addition to the necessary digit sequences for each instruction, a series of mnemonics that match the digit sequences will also be provided, for readability and ease of use. {| class="wikitable" |+ 1: Heap storage/retrieval (<code>H</code>) |- ! Digits !! Mnemonic !! Description |- | 11 || <code>H V</code> || Pop ''addr'', then push the value stored at heap address ''addr'' (0 if it doesn't exist). |- | 13 || <code>H LDV</code> || Same as 11. |- | 15 || <code>H LOADV</code> || Same as 11. |- | 17 || <code>H LOADVAL</code> || Same as 11. |- | 19 || <code>H LOADVALUE</code> || Same as 11. |- | 12 || <code>H SV</code> || Pop ''val'' then ''addr'', then store ''val'' at heap address ''addr''. |- | 14 || <code>H STRV</code> || Same as 12. |- | 16 || <code>H STOREV</code> || Same as 12. |- | 18 || <code>H STOREVAL</code> || Same as 12. |- | 10 || <code>H STOREVALUE</code> || Same as 12. |} {| class="wikitable" |+ 2: Stack manipulation (<code>DO</code>) |- ! Digits !! Mnemonic !! Description |- | 21 || <code>DO P</code> || Pop the top value. |- | 22 || <code>DO PN</code> || Pop ''n'', then pop the ''n''th value from the top. |- | 23 || <code>DO ROT</code> || Pop ''n'', then rotate the stack by moving the top value down to the ''n''th position. |- | 24 || <code>DO COPY</code> || Push a copy of the top value. |- | 25 || <code>DO COPYN</code> || Pop ''n'', then push a copy of the ''n''th value from the top. |- | 26 || <code>DO SWITCH</code> || Swap the top two values. |- | 27 || <code>DO SWITCHN</code> || Pop ''n'', then swap the top value with the ''n''th value from the top. |- | 28 || <code>DO TURNOVER</code> || Reverse the stack. |- | 29 || <code>DO TURNOVERN</code> || Pop ''n'', then reverse the top ''n'' values of the stack. |- | 20 || <code>DO ROTINVERSE</code> || Pop ''n'', then rotate the stack backwards by moving the value at the ''n''th position up to the top. |} {| class="wikitable" |+ 3, 4, and 9: Pushing numbers (<code>PUT</code>, <code>PUSH</code>, and <code>CONTINUED</code>) |- ! Digits !! Mnemonic !! Description |- | 3 || <code>PUT</code> || Push multi-digit numbers: follow with length first (where 0 is considered 10), then digits.<br>E.g. <code>PUT XX:I NUMBERZERO</code> pushes 10; <code>PUT XXXXX:TRI BI SEVENTH SEXTET INTEIGHT</code> pushes 32768; <code>PUT XXXXXXXXXX:I BI TRI FOUR FIFTH SEXTET SEVENTH INTEIGHT DIGITNINE NUMBERZERO</code> pushes 1234567890. |- | 4 || <code>PUSH</code> || Push single-digit numbers: follow with the digit to push.<br>E.g. <code>PUSH FOUR</code> pushes 4; <code>PUSH SEVENTH</code> pushes 7; <code>PUSH NUMBERZERO</code> pushes 0. |- | 9 || <code>CONTINUED</code> || Use immediately after a 3 (<code>PUT</code>), 74 (<code>CONTROL CALL</code>), or 78 (<code>CONTROL FUNCTION</code>) command to use longer multi-digit numbers.<br>E.g. <code>PUT XXXXXXXXXX:TRI I I TRI I BI I I I TRI; CONTINUED XXXX:I BI BI I</code> pushes 31131211131221. |} {| class="wikitable" |+ 5: Input (<code>INPUT</code>) |- ! Digits !! Mnemonic !! Description |- | 51 || <code>INPUT N</code> || Read input as a number and push it onto the stack. |- | 53 || <code>INPUT INT</code> || Same as 51. |- | 55 || <code>INPUT INTGR</code> || Same as 51. |- | 57 || <code>INPUT INTEGER</code> || Same as 51. |- | 59 || <code>INPUT INTNUMBER</code> || Same as 51. |- | 52 || <code>INPUT CH</code> || Read input as a character and push its Unicode codepoint value onto the stack. |- | 54 || <code>INPUT CHAR</code> || Same as 52. |- | 56 || <code>INPUT STRING</code> || Same as 52. |- | 58 || <code>INPUT STRINGCH</code> || Same as 52. |- | 50 || <code>INPUT STRINGCHAR</code> || Same as 52. |} {| class="wikitable" |+ 6: Output (<code>OUTPUT</code>) |- ! Digits !! Mnemonic !! Description |- | 61 || <code>OUTPUT N</code> || Pop ''n'', then output ''n'' as a number. |- | 63 || <code>OUTPUT INT</code> || Same as 61. |- | 65 || <code>OUTPUT INTGR</code> || Same as 61. |- | 67 || <code>OUTPUT INTEGER</code> || Same as 61. |- | 69 || <code>OUTPUT INTNUMBER</code> || Same as 61. |- | 62 || <code>OUTPUT CH</code> || Pop ''n'', then output ''n'' as a Unicode codepoint. |- | 64 || <code>OUTPUT CHAR</code> || Same as 62. |- | 66 || <code>OUTPUT STRING</code> || Same as 62. |- | 68 || <code>OUTPUT STRINGCH</code> || Same as 62. |- | 60 || <code>OUTPUT STRINGCHAR</code> || Same as 62. |} {| class="wikitable" |+ 7: Control flow (<code>CONTROL</code>) |- ! Digits !! Mnemonic !! Description |- | 71 || <code>CONTROL B</code> || Break out of the current loop. |- | 72 || <code>CONTROL IF</code> || Pop ''cond'', then run this block if ''cond'' is nonzero; otherwise, skip past the matching 73 (<code>CONTROL END</code>). |- | 73 || <code>CONTROL END</code> || End this block. |- | 74 || <code>CONTROL CALL</code> || Call a function; follow with multi-digit number (the function's "name") with the same syntax as the 3 (<code>PUT</code>) command.<br>E.g. <code>CONTROL CALL XXX:PRINT SQUARE ROOT</code> calls a function "named" 564. |- | 75 || <code>CONTROL WHILE</code> || Define a while loop block; pop ''cond'' at the start, and run this block in a loop while ''cond'' is nonzero. |- | 76 || <code>CONTROL RETURN</code> || Return from the current function. |- | 77 || <code>CONTROL DOWHILE</code> || Define a do-while loop block; pop ''cond'' at the end, and run this block in a loop while ''cond'' is nonzero.<br>(This loop always runs without popping anything the first time through.) |- | 78 || <code>CONTROL FUNCTION</code> || Define a function block; follow with multi-digit number (the function's "name") with the same syntax as the 3 (<code>PUT</code>) command.<br>E.g. <code>CONTROL FUNCTION XXX:PRINT SQUARE ROOT</code> defines a function "named" 564. |- | 79 || <code>CONTROL RESETLOOP</code> || Skip this iteration of the current loop. |- | 70 || <code>CONTROL ENDPROGRAM</code> || Immediately end program execution. |} {| class="wikitable" |+ 8: Arithmetic operations (<code>STACKTOP</code>) |- ! Digits !! Mnemonic !! Description |- | 81 || <code>STACKTOP F</code> || Pop ''n'', then push 1 if ''n'' is zero, and 0 otherwise. |- | 82 || <code>STACKTOP LT</code> || Pop ''b'' then ''a'', then push 1 if ''a'' < ''b'', and 0 otherwise. |- | 83 || <code>STACKTOP POW</code> || Pop ''b'' then ''a'', then push ''a'' ^ ''b''. (Negative powers get calculated as <code>abs(b)</code>th roots, rounded down to an integer.) |- | 84 || <code>STACKTOP PLUS</code> || Pop ''b'' then ''a'', then push ''a'' + ''b''. |- | 85 || <code>STACKTOP MINUS</code> || Pop ''b'' then ''a'', then push ''a'' - ''b''. |- | 86 || <code>STACKTOP MODULO</code> || Pop ''b'' then ''a'', then push ''a'' % ''b''. (The result has the same sign as ''b''.) |- | 87 || <code>STACKTOP PLUSONE</code> || Pop ''n'', then push ''n'' + 1. |- | 88 || <code>STACKTOP MINUSONE</code> || Pop ''n'', then push ''n'' - 1. |- | 89 || <code>STACKTOP PRODUCTOF</code> || Pop ''b'' then ''a'', then push ''a'' * ''b''. |- | 80 || <code>STACKTOP QUOTIENTOF</code> || Pop ''b'' then ''a'', then push ''a'' / ''b'' (rounded down to an integer). |} {| class="wikitable" |+ 0: Comments (<code>COMMENTARY</code>) |- ! Digits !! Mnemonic !! Description |- | 00 || <code>COMMENTARY INITIALIZE</code> / <code>COMMENTARY TERMINATE</code> || Define a block comment; the digits 00 both start and end the comment. |- | 0 ... 0 || <code>COMMENTARY ... INITIALIZE</code> / <code>COMMENTARY ... TERMINATE</code> || Another way to define a block comment; any nonzero digits can go within the ..., and the same digit sequence will both start and end the comment. |} ==Examples== ===[[Hello, World!]]=== more peppermint tea? ah yes, it's not bad I appreciate peppermint tea it's a refreshing beverage but you immediately must try the gingerbread I had it sometime, forever ago oh, and it was so good! made the way a gingerbread must clearly be baked in fact, I've got a suggestion I may go outside to Marshal Mellow's Bakery so we both receive one This corresponds to the following mnemonics: PUSH NUMBERZERO PUT XX:TRI TRI PUT XXX:I NUMBERZERO NUMBERZERO PUT XXX:I NUMBERZERO INTEIGHT PUT XXX:I I FOUR PUT XXX:I I I PUT XX:INTEIGHT SEVENTH PUT XX:TRI BI PUT XX:FOUR FOUR PUT XXX:I I I PUSH SEVENTH DO COPYN DO COPY PUT XXX:I NUMBERZERO I PUT XX:SEVENTH BI CONTROL DOWHILE OUTPUT CH DO COPY CONTROL END ===[[Truth machine]]=== there I stumble falling up even whilst I go down falling out This corresponds to the following mnemonics: INPUT N CONTROL DOWHILE DO COPY OUTPUT N DO COPY CONTROL END ===[[Fibonacci sequence]]=== Takes a number ''n'' as input, and outputs the first ''n'' Fibonacci numbers. read a note I wrote you it says "someone shall love you, as big as past lovers did, put in a collection" surely it will be in truth, somebody here is probably isolated existing in pain without you This corresponds to the following mnemonics: PUSH I PUSH I INPUT INT DO COPY CONTROL WHILE PUSH TRI DO ROT DO COPY OUTPUT INT PUT XX:I NUMBERZERO OUTPUT CH PUSH BI DO COPYN STACKTOP PLUS DO TURNOVER STACKTOP MINUSONE DO COPY CONTROL END Fun fact: the Fibonacci sequence program was the first ever Bespoke program, written when the specs weren't yet finalized. ==Implementation== * [https://github.com/WinslowJosiah/bespokelang Official Python interpreter] (contains other example programs) [[Category:2025]] [[Category:Turing complete]] [[Category:Stack-based]] [[Category:Implemented]] [[Category:Languages]] [[Category:Pseudonatural]]'
Unified diff of changes made by edit (edit_diff)
'@@ -1,0 +1,291 @@ +'''Bespoke''' is an [[esoteric programming language]] created in 2025 by Josiah Winslow. It encodes instructions into the lengths of words, similarly to his earlier esolang [[Poetic (esolang)|Poetic]]. Programs can tend to look like abstract poetry, although a series of instruction mnemonics are often used when developing programs to make the process easier. + +==Overview== + +Bespoke has both a stack and a heap for storing data. Arbitrary precision signed integers can be pushed and popped onto the stack, and the heap maps integer addresses to integer values. + +Source code for Bespoke is entered in the form of words, in any natural language. Words are considered to consist of any number of alphabetic characters and apostrophes, and any character that is not either of these is ignored and treated as a delimiter. Apostrophes do not delimit words or add to the letter count. Each word is then converted to numbers as follows: + +* If a word is less than 10 letters long, it is converted to that single digit. +* If a word is exactly 10 letters long, it is converted to the digit <code>0</code>. +* If a word is more than 10 letters long, it is converted to a series of digits, representing the number as written in decimal notation (for example, a 12-letter word becomes <code>12</code>). + +The digits are then turned into a series of instructions and executed. + +==Instructions== + +In addition to the necessary digit sequences for each instruction, a series of mnemonics that match the digit sequences will also be provided, for readability and ease of use. + +{| class="wikitable" +|+ 1: Heap storage/retrieval (<code>H</code>) +|- +! Digits !! Mnemonic !! Description +|- +| 11 || <code>H V</code> || Pop ''addr'', then push the value stored at heap address ''addr'' (0 if it doesn't exist). +|- +| 13 || <code>H LDV</code> || Same as 11. +|- +| 15 || <code>H LOADV</code> || Same as 11. +|- +| 17 || <code>H LOADVAL</code> || Same as 11. +|- +| 19 || <code>H LOADVALUE</code> || Same as 11. +|- +| 12 || <code>H SV</code> || Pop ''val'' then ''addr'', then store ''val'' at heap address ''addr''. +|- +| 14 || <code>H STRV</code> || Same as 12. +|- +| 16 || <code>H STOREV</code> || Same as 12. +|- +| 18 || <code>H STOREVAL</code> || Same as 12. +|- +| 10 || <code>H STOREVALUE</code> || Same as 12. +|} + +{| class="wikitable" +|+ 2: Stack manipulation (<code>DO</code>) +|- +! Digits !! Mnemonic !! Description +|- +| 21 || <code>DO P</code> || Pop the top value. +|- +| 22 || <code>DO PN</code> || Pop ''n'', then pop the ''n''th value from the top. +|- +| 23 || <code>DO ROT</code> || Pop ''n'', then rotate the stack by moving the top value down to the ''n''th position. +|- +| 24 || <code>DO COPY</code> || Push a copy of the top value. +|- +| 25 || <code>DO COPYN</code> || Pop ''n'', then push a copy of the ''n''th value from the top. +|- +| 26 || <code>DO SWITCH</code> || Swap the top two values. +|- +| 27 || <code>DO SWITCHN</code> || Pop ''n'', then swap the top value with the ''n''th value from the top. +|- +| 28 || <code>DO TURNOVER</code> || Reverse the stack. +|- +| 29 || <code>DO TURNOVERN</code> || Pop ''n'', then reverse the top ''n'' values of the stack. +|- +| 20 || <code>DO ROTINVERSE</code> || Pop ''n'', then rotate the stack backwards by moving the value at the ''n''th position up to the top. +|} + +{| class="wikitable" +|+ 3, 4, and 9: Pushing numbers (<code>PUT</code>, <code>PUSH</code>, and <code>CONTINUED</code>) +|- +! Digits !! Mnemonic !! Description +|- +| 3 || <code>PUT</code> || Push multi-digit numbers: follow with length first (where 0 is considered 10), then digits.<br>E.g. <code>PUT XX:I NUMBERZERO</code> pushes 10; <code>PUT XXXXX:TRI BI SEVENTH SEXTET INTEIGHT</code> pushes 32768; <code>PUT XXXXXXXXXX:I BI TRI FOUR FIFTH SEXTET SEVENTH INTEIGHT DIGITNINE NUMBERZERO</code> pushes 1234567890. +|- +| 4 || <code>PUSH</code> || Push single-digit numbers: follow with the digit to push.<br>E.g. <code>PUSH FOUR</code> pushes 4; <code>PUSH SEVENTH</code> pushes 7; <code>PUSH NUMBERZERO</code> pushes 0. +|- +| 9 || <code>CONTINUED</code> || Use immediately after a 3 (<code>PUT</code>), 74 (<code>CONTROL CALL</code>), or 78 (<code>CONTROL FUNCTION</code>) command to use longer multi-digit numbers.<br>E.g. <code>PUT XXXXXXXXXX:TRI I I TRI I BI I I I TRI; CONTINUED XXXX:I BI BI I</code> pushes 31131211131221. +|} + +{| class="wikitable" +|+ 5: Input (<code>INPUT</code>) +|- +! Digits !! Mnemonic !! Description +|- +| 51 || <code>INPUT N</code> || Read input as a number and push it onto the stack. +|- +| 53 || <code>INPUT INT</code> || Same as 51. +|- +| 55 || <code>INPUT INTGR</code> || Same as 51. +|- +| 57 || <code>INPUT INTEGER</code> || Same as 51. +|- +| 59 || <code>INPUT INTNUMBER</code> || Same as 51. +|- +| 52 || <code>INPUT CH</code> || Read input as a character and push its Unicode codepoint value onto the stack. +|- +| 54 || <code>INPUT CHAR</code> || Same as 52. +|- +| 56 || <code>INPUT STRING</code> || Same as 52. +|- +| 58 || <code>INPUT STRINGCH</code> || Same as 52. +|- +| 50 || <code>INPUT STRINGCHAR</code> || Same as 52. +|} + +{| class="wikitable" +|+ 6: Output (<code>OUTPUT</code>) +|- +! Digits !! Mnemonic !! Description +|- +| 61 || <code>OUTPUT N</code> || Pop ''n'', then output ''n'' as a number. +|- +| 63 || <code>OUTPUT INT</code> || Same as 61. +|- +| 65 || <code>OUTPUT INTGR</code> || Same as 61. +|- +| 67 || <code>OUTPUT INTEGER</code> || Same as 61. +|- +| 69 || <code>OUTPUT INTNUMBER</code> || Same as 61. +|- +| 62 || <code>OUTPUT CH</code> || Pop ''n'', then output ''n'' as a Unicode codepoint. +|- +| 64 || <code>OUTPUT CHAR</code> || Same as 62. +|- +| 66 || <code>OUTPUT STRING</code> || Same as 62. +|- +| 68 || <code>OUTPUT STRINGCH</code> || Same as 62. +|- +| 60 || <code>OUTPUT STRINGCHAR</code> || Same as 62. +|} + +{| class="wikitable" +|+ 7: Control flow (<code>CONTROL</code>) +|- +! Digits !! Mnemonic !! Description +|- +| 71 || <code>CONTROL B</code> || Break out of the current loop. +|- +| 72 || <code>CONTROL IF</code> || Pop ''cond'', then run this block if ''cond'' is nonzero; otherwise, skip past the matching 73 (<code>CONTROL END</code>). +|- +| 73 || <code>CONTROL END</code> || End this block. +|- +| 74 || <code>CONTROL CALL</code> || Call a function; follow with multi-digit number (the function's "name") with the same syntax as the 3 (<code>PUT</code>) command.<br>E.g. <code>CONTROL CALL XXX:PRINT SQUARE ROOT</code> calls a function "named" 564. +|- +| 75 || <code>CONTROL WHILE</code> || Define a while loop block; pop ''cond'' at the start, and run this block in a loop while ''cond'' is nonzero. +|- +| 76 || <code>CONTROL RETURN</code> || Return from the current function. +|- +| 77 || <code>CONTROL DOWHILE</code> || Define a do-while loop block; pop ''cond'' at the end, and run this block in a loop while ''cond'' is nonzero.<br>(This loop always runs without popping anything the first time through.) +|- +| 78 || <code>CONTROL FUNCTION</code> || Define a function block; follow with multi-digit number (the function's "name") with the same syntax as the 3 (<code>PUT</code>) command.<br>E.g. <code>CONTROL FUNCTION XXX:PRINT SQUARE ROOT</code> defines a function "named" 564. +|- +| 79 || <code>CONTROL RESETLOOP</code> || Skip this iteration of the current loop. +|- +| 70 || <code>CONTROL ENDPROGRAM</code> || Immediately end program execution. +|} + +{| class="wikitable" +|+ 8: Arithmetic operations (<code>STACKTOP</code>) +|- +! Digits !! Mnemonic !! Description +|- +| 81 || <code>STACKTOP F</code> || Pop ''n'', then push 1 if ''n'' is zero, and 0 otherwise. +|- +| 82 || <code>STACKTOP LT</code> || Pop ''b'' then ''a'', then push 1 if ''a'' < ''b'', and 0 otherwise. +|- +| 83 || <code>STACKTOP POW</code> || Pop ''b'' then ''a'', then push ''a'' ^ ''b''. (Negative powers get calculated as <code>abs(b)</code>th roots, rounded down to an integer.) +|- +| 84 || <code>STACKTOP PLUS</code> || Pop ''b'' then ''a'', then push ''a'' + ''b''. +|- +| 85 || <code>STACKTOP MINUS</code> || Pop ''b'' then ''a'', then push ''a'' - ''b''. +|- +| 86 || <code>STACKTOP MODULO</code> || Pop ''b'' then ''a'', then push ''a'' % ''b''. (The result has the same sign as ''b''.) +|- +| 87 || <code>STACKTOP PLUSONE</code> || Pop ''n'', then push ''n'' + 1. +|- +| 88 || <code>STACKTOP MINUSONE</code> || Pop ''n'', then push ''n'' - 1. +|- +| 89 || <code>STACKTOP PRODUCTOF</code> || Pop ''b'' then ''a'', then push ''a'' * ''b''. +|- +| 80 || <code>STACKTOP QUOTIENTOF</code> || Pop ''b'' then ''a'', then push ''a'' / ''b'' (rounded down to an integer). +|} + +{| class="wikitable" +|+ 0: Comments (<code>COMMENTARY</code>) +|- +! Digits !! Mnemonic !! Description +|- +| 00 || <code>COMMENTARY INITIALIZE</code> / <code>COMMENTARY TERMINATE</code> || Define a block comment; the digits 00 both start and end the comment. +|- +| 0 ... 0 || <code>COMMENTARY ... INITIALIZE</code> / <code>COMMENTARY ... TERMINATE</code> || Another way to define a block comment; any nonzero digits can go within the ..., and the same digit sequence will both start and end the comment. +|} + +==Examples== + +===[[Hello, World!]]=== + + more peppermint tea? + ah yes, it's not bad + I appreciate peppermint tea + it's a refreshing beverage + + but you immediately must try the gingerbread + I had it sometime, forever ago + oh, and it was so good! + made the way a gingerbread must clearly be + baked + + in fact, I've got a suggestion + I may go outside + to Marshal Mellow's Bakery + so we both receive one + +This corresponds to the following mnemonics: + + PUSH NUMBERZERO + PUT XX:TRI TRI + PUT XXX:I NUMBERZERO NUMBERZERO + PUT XXX:I NUMBERZERO INTEIGHT + PUT XXX:I I FOUR + PUT XXX:I I I + PUT XX:INTEIGHT SEVENTH + PUT XX:TRI BI + PUT XX:FOUR FOUR + PUT XXX:I I I + PUSH SEVENTH DO COPYN + DO COPY + PUT XXX:I NUMBERZERO I + PUT XX:SEVENTH BI + CONTROL DOWHILE + OUTPUT CH + DO COPY + CONTROL END + +===[[Truth machine]]=== + + there I stumble + falling up + even whilst I go down + falling out + +This corresponds to the following mnemonics: + + INPUT N + CONTROL DOWHILE + DO COPY + OUTPUT N + DO COPY + CONTROL END + +===[[Fibonacci sequence]]=== + +Takes a number ''n'' as input, and outputs the first ''n'' Fibonacci numbers. + + read a note I wrote you + it says "someone shall love you, + as big as past lovers did, + put in a collection" + surely it will be + in truth, somebody here is probably isolated + existing in pain without you + +This corresponds to the following mnemonics: + + PUSH I + PUSH I + INPUT INT + DO COPY + CONTROL WHILE + PUSH TRI DO ROT + DO COPY + OUTPUT INT + PUT XX:I NUMBERZERO + OUTPUT CH + PUSH BI DO COPYN + STACKTOP PLUS + DO TURNOVER + STACKTOP MINUSONE + DO COPY + CONTROL END + +Fun fact: the Fibonacci sequence program was the first ever Bespoke program, written when the specs weren't yet finalized. + +==Implementation== + +* [https://github.com/WinslowJosiah/bespokelang Official Python interpreter] (contains other example programs) + +[[Category:2025]] [[Category:Turing complete]] [[Category:Stack-based]] [[Category:Implemented]] [[Category:Languages]] [[Category:Pseudonatural]] '
New page size (new_size)
10960
Old page size (old_size)
0
Lines added in edit (added_lines)
[ 0 => ''''Bespoke''' is an [[esoteric programming language]] created in 2025 by Josiah Winslow. It encodes instructions into the lengths of words, similarly to his earlier esolang [[Poetic (esolang)|Poetic]]. Programs can tend to look like abstract poetry, although a series of instruction mnemonics are often used when developing programs to make the process easier.', 1 => '', 2 => '==Overview==', 3 => '', 4 => 'Bespoke has both a stack and a heap for storing data. Arbitrary precision signed integers can be pushed and popped onto the stack, and the heap maps integer addresses to integer values.', 5 => '', 6 => 'Source code for Bespoke is entered in the form of words, in any natural language. Words are considered to consist of any number of alphabetic characters and apostrophes, and any character that is not either of these is ignored and treated as a delimiter. Apostrophes do not delimit words or add to the letter count. Each word is then converted to numbers as follows:', 7 => '', 8 => '* If a word is less than 10 letters long, it is converted to that single digit.', 9 => '* If a word is exactly 10 letters long, it is converted to the digit <code>0</code>.', 10 => '* If a word is more than 10 letters long, it is converted to a series of digits, representing the number as written in decimal notation (for example, a 12-letter word becomes <code>12</code>).', 11 => '', 12 => 'The digits are then turned into a series of instructions and executed.', 13 => '', 14 => '==Instructions==', 15 => '', 16 => 'In addition to the necessary digit sequences for each instruction, a series of mnemonics that match the digit sequences will also be provided, for readability and ease of use.', 17 => '', 18 => '{| class="wikitable"', 19 => '|+ 1: Heap storage/retrieval (<code>H</code>)', 20 => '|-', 21 => '! Digits !! Mnemonic !! Description', 22 => '|-', 23 => '| 11 || <code>H V</code> || Pop ''addr'', then push the value stored at heap address ''addr'' (0 if it doesn't exist).', 24 => '|-', 25 => '| 13 || <code>H LDV</code> || Same as 11.', 26 => '|-', 27 => '| 15 || <code>H LOADV</code> || Same as 11.', 28 => '|-', 29 => '| 17 || <code>H LOADVAL</code> || Same as 11.', 30 => '|-', 31 => '| 19 || <code>H LOADVALUE</code> || Same as 11.', 32 => '|-', 33 => '| 12 || <code>H SV</code> || Pop ''val'' then ''addr'', then store ''val'' at heap address ''addr''.', 34 => '|-', 35 => '| 14 || <code>H STRV</code> || Same as 12.', 36 => '|-', 37 => '| 16 || <code>H STOREV</code> || Same as 12.', 38 => '|-', 39 => '| 18 || <code>H STOREVAL</code> || Same as 12.', 40 => '|-', 41 => '| 10 || <code>H STOREVALUE</code> || Same as 12.', 42 => '|}', 43 => '', 44 => '{| class="wikitable"', 45 => '|+ 2: Stack manipulation (<code>DO</code>)', 46 => '|-', 47 => '! Digits !! Mnemonic !! Description', 48 => '|-', 49 => '| 21 || <code>DO P</code> || Pop the top value.', 50 => '|-', 51 => '| 22 || <code>DO PN</code> || Pop ''n'', then pop the ''n''th value from the top.', 52 => '|-', 53 => '| 23 || <code>DO ROT</code> || Pop ''n'', then rotate the stack by moving the top value down to the ''n''th position.', 54 => '|-', 55 => '| 24 || <code>DO COPY</code> || Push a copy of the top value.', 56 => '|-', 57 => '| 25 || <code>DO COPYN</code> || Pop ''n'', then push a copy of the ''n''th value from the top.', 58 => '|-', 59 => '| 26 || <code>DO SWITCH</code> || Swap the top two values.', 60 => '|-', 61 => '| 27 || <code>DO SWITCHN</code> || Pop ''n'', then swap the top value with the ''n''th value from the top.', 62 => '|-', 63 => '| 28 || <code>DO TURNOVER</code> || Reverse the stack.', 64 => '|-', 65 => '| 29 || <code>DO TURNOVERN</code> || Pop ''n'', then reverse the top ''n'' values of the stack.', 66 => '|-', 67 => '| 20 || <code>DO ROTINVERSE</code> || Pop ''n'', then rotate the stack backwards by moving the value at the ''n''th position up to the top.', 68 => '|}', 69 => '', 70 => '{| class="wikitable"', 71 => '|+ 3, 4, and 9: Pushing numbers (<code>PUT</code>, <code>PUSH</code>, and <code>CONTINUED</code>)', 72 => '|-', 73 => '! Digits !! Mnemonic !! Description', 74 => '|-', 75 => '| 3 || <code>PUT</code> || Push multi-digit numbers: follow with length first (where 0 is considered 10), then digits.<br>E.g. <code>PUT XX:I NUMBERZERO</code> pushes 10; <code>PUT XXXXX:TRI BI SEVENTH SEXTET INTEIGHT</code> pushes 32768; <code>PUT XXXXXXXXXX:I BI TRI FOUR FIFTH SEXTET SEVENTH INTEIGHT DIGITNINE NUMBERZERO</code> pushes 1234567890.', 76 => '|-', 77 => '| 4 || <code>PUSH</code> || Push single-digit numbers: follow with the digit to push.<br>E.g. <code>PUSH FOUR</code> pushes 4; <code>PUSH SEVENTH</code> pushes 7; <code>PUSH NUMBERZERO</code> pushes 0.', 78 => '|-', 79 => '| 9 || <code>CONTINUED</code> || Use immediately after a 3 (<code>PUT</code>), 74 (<code>CONTROL CALL</code>), or 78 (<code>CONTROL FUNCTION</code>) command to use longer multi-digit numbers.<br>E.g. <code>PUT XXXXXXXXXX:TRI I I TRI I BI I I I TRI; CONTINUED XXXX:I BI BI I</code> pushes 31131211131221.', 80 => '|}', 81 => '', 82 => '{| class="wikitable"', 83 => '|+ 5: Input (<code>INPUT</code>)', 84 => '|-', 85 => '! Digits !! Mnemonic !! Description', 86 => '|-', 87 => '| 51 || <code>INPUT N</code> || Read input as a number and push it onto the stack.', 88 => '|-', 89 => '| 53 || <code>INPUT INT</code> || Same as 51.', 90 => '|-', 91 => '| 55 || <code>INPUT INTGR</code> || Same as 51.', 92 => '|-', 93 => '| 57 || <code>INPUT INTEGER</code> || Same as 51.', 94 => '|-', 95 => '| 59 || <code>INPUT INTNUMBER</code> || Same as 51.', 96 => '|-', 97 => '| 52 || <code>INPUT CH</code> || Read input as a character and push its Unicode codepoint value onto the stack.', 98 => '|-', 99 => '| 54 || <code>INPUT CHAR</code> || Same as 52.', 100 => '|-', 101 => '| 56 || <code>INPUT STRING</code> || Same as 52.', 102 => '|-', 103 => '| 58 || <code>INPUT STRINGCH</code> || Same as 52.', 104 => '|-', 105 => '| 50 || <code>INPUT STRINGCHAR</code> || Same as 52.', 106 => '|}', 107 => '', 108 => '{| class="wikitable"', 109 => '|+ 6: Output (<code>OUTPUT</code>)', 110 => '|-', 111 => '! Digits !! Mnemonic !! Description', 112 => '|-', 113 => '| 61 || <code>OUTPUT N</code> || Pop ''n'', then output ''n'' as a number.', 114 => '|-', 115 => '| 63 || <code>OUTPUT INT</code> || Same as 61.', 116 => '|-', 117 => '| 65 || <code>OUTPUT INTGR</code> || Same as 61.', 118 => '|-', 119 => '| 67 || <code>OUTPUT INTEGER</code> || Same as 61.', 120 => '|-', 121 => '| 69 || <code>OUTPUT INTNUMBER</code> || Same as 61.', 122 => '|-', 123 => '| 62 || <code>OUTPUT CH</code> || Pop ''n'', then output ''n'' as a Unicode codepoint.', 124 => '|-', 125 => '| 64 || <code>OUTPUT CHAR</code> || Same as 62.', 126 => '|-', 127 => '| 66 || <code>OUTPUT STRING</code> || Same as 62.', 128 => '|-', 129 => '| 68 || <code>OUTPUT STRINGCH</code> || Same as 62.', 130 => '|-', 131 => '| 60 || <code>OUTPUT STRINGCHAR</code> || Same as 62.', 132 => '|}', 133 => '', 134 => '{| class="wikitable"', 135 => '|+ 7: Control flow (<code>CONTROL</code>)', 136 => '|-', 137 => '! Digits !! Mnemonic !! Description', 138 => '|-', 139 => '| 71 || <code>CONTROL B</code> || Break out of the current loop.', 140 => '|-', 141 => '| 72 || <code>CONTROL IF</code> || Pop ''cond'', then run this block if ''cond'' is nonzero; otherwise, skip past the matching 73 (<code>CONTROL END</code>).', 142 => '|-', 143 => '| 73 || <code>CONTROL END</code> || End this block.', 144 => '|-', 145 => '| 74 || <code>CONTROL CALL</code> || Call a function; follow with multi-digit number (the function's "name") with the same syntax as the 3 (<code>PUT</code>) command.<br>E.g. <code>CONTROL CALL XXX:PRINT SQUARE ROOT</code> calls a function "named" 564.', 146 => '|-', 147 => '| 75 || <code>CONTROL WHILE</code> || Define a while loop block; pop ''cond'' at the start, and run this block in a loop while ''cond'' is nonzero.', 148 => '|-', 149 => '| 76 || <code>CONTROL RETURN</code> || Return from the current function.', 150 => '|-', 151 => '| 77 || <code>CONTROL DOWHILE</code> || Define a do-while loop block; pop ''cond'' at the end, and run this block in a loop while ''cond'' is nonzero.<br>(This loop always runs without popping anything the first time through.)', 152 => '|-', 153 => '| 78 || <code>CONTROL FUNCTION</code> || Define a function block; follow with multi-digit number (the function's "name") with the same syntax as the 3 (<code>PUT</code>) command.<br>E.g. <code>CONTROL FUNCTION XXX:PRINT SQUARE ROOT</code> defines a function "named" 564.', 154 => '|-', 155 => '| 79 || <code>CONTROL RESETLOOP</code> || Skip this iteration of the current loop.', 156 => '|-', 157 => '| 70 || <code>CONTROL ENDPROGRAM</code> || Immediately end program execution.', 158 => '|}', 159 => '', 160 => '{| class="wikitable"', 161 => '|+ 8: Arithmetic operations (<code>STACKTOP</code>)', 162 => '|-', 163 => '! Digits !! Mnemonic !! Description', 164 => '|-', 165 => '| 81 || <code>STACKTOP F</code> || Pop ''n'', then push 1 if ''n'' is zero, and 0 otherwise.', 166 => '|-', 167 => '| 82 || <code>STACKTOP LT</code> || Pop ''b'' then ''a'', then push 1 if ''a'' < ''b'', and 0 otherwise.', 168 => '|-', 169 => '| 83 || <code>STACKTOP POW</code> || Pop ''b'' then ''a'', then push ''a'' ^ ''b''. (Negative powers get calculated as <code>abs(b)</code>th roots, rounded down to an integer.)', 170 => '|-', 171 => '| 84 || <code>STACKTOP PLUS</code> || Pop ''b'' then ''a'', then push ''a'' + ''b''.', 172 => '|-', 173 => '| 85 || <code>STACKTOP MINUS</code> || Pop ''b'' then ''a'', then push ''a'' - ''b''.', 174 => '|-', 175 => '| 86 || <code>STACKTOP MODULO</code> || Pop ''b'' then ''a'', then push ''a'' % ''b''. (The result has the same sign as ''b''.)', 176 => '|-', 177 => '| 87 || <code>STACKTOP PLUSONE</code> || Pop ''n'', then push ''n'' + 1.', 178 => '|-', 179 => '| 88 || <code>STACKTOP MINUSONE</code> || Pop ''n'', then push ''n'' - 1.', 180 => '|-', 181 => '| 89 || <code>STACKTOP PRODUCTOF</code> || Pop ''b'' then ''a'', then push ''a'' * ''b''.', 182 => '|-', 183 => '| 80 || <code>STACKTOP QUOTIENTOF</code> || Pop ''b'' then ''a'', then push ''a'' / ''b'' (rounded down to an integer).', 184 => '|}', 185 => '', 186 => '{| class="wikitable"', 187 => '|+ 0: Comments (<code>COMMENTARY</code>)', 188 => '|-', 189 => '! Digits !! Mnemonic !! Description', 190 => '|-', 191 => '| 00 || <code>COMMENTARY INITIALIZE</code> / <code>COMMENTARY TERMINATE</code> || Define a block comment; the digits 00 both start and end the comment.', 192 => '|-', 193 => '| 0 ... 0 || <code>COMMENTARY ... INITIALIZE</code> / <code>COMMENTARY ... TERMINATE</code> || Another way to define a block comment; any nonzero digits can go within the ..., and the same digit sequence will both start and end the comment.', 194 => '|}', 195 => '', 196 => '==Examples==', 197 => '', 198 => '===[[Hello, World!]]===', 199 => '', 200 => ' more peppermint tea?', 201 => ' ah yes, it's not bad', 202 => ' I appreciate peppermint tea', 203 => ' it's a refreshing beverage', 204 => ' ', 205 => ' but you immediately must try the gingerbread', 206 => ' I had it sometime, forever ago', 207 => ' oh, and it was so good!', 208 => ' made the way a gingerbread must clearly be ', 209 => ' baked', 210 => ' ', 211 => ' in fact, I've got a suggestion', 212 => ' I may go outside', 213 => ' to Marshal Mellow's Bakery', 214 => ' so we both receive one', 215 => '', 216 => 'This corresponds to the following mnemonics:', 217 => '', 218 => ' PUSH NUMBERZERO', 219 => ' PUT XX:TRI TRI', 220 => ' PUT XXX:I NUMBERZERO NUMBERZERO', 221 => ' PUT XXX:I NUMBERZERO INTEIGHT', 222 => ' PUT XXX:I I FOUR', 223 => ' PUT XXX:I I I', 224 => ' PUT XX:INTEIGHT SEVENTH', 225 => ' PUT XX:TRI BI', 226 => ' PUT XX:FOUR FOUR', 227 => ' PUT XXX:I I I', 228 => ' PUSH SEVENTH DO COPYN', 229 => ' DO COPY', 230 => ' PUT XXX:I NUMBERZERO I', 231 => ' PUT XX:SEVENTH BI', 232 => ' CONTROL DOWHILE', 233 => ' OUTPUT CH', 234 => ' DO COPY', 235 => ' CONTROL END', 236 => '', 237 => '===[[Truth machine]]===', 238 => '', 239 => ' there I stumble', 240 => ' falling up', 241 => ' even whilst I go down', 242 => ' falling out', 243 => '', 244 => 'This corresponds to the following mnemonics:', 245 => '', 246 => ' INPUT N', 247 => ' CONTROL DOWHILE', 248 => ' DO COPY', 249 => ' OUTPUT N', 250 => ' DO COPY', 251 => ' CONTROL END', 252 => '', 253 => '===[[Fibonacci sequence]]===', 254 => '', 255 => 'Takes a number ''n'' as input, and outputs the first ''n'' Fibonacci numbers.', 256 => '', 257 => ' read a note I wrote you', 258 => ' it says "someone shall love you,', 259 => ' as big as past lovers did,', 260 => ' put in a collection"', 261 => ' surely it will be', 262 => ' in truth, somebody here is probably isolated', 263 => ' existing in pain without you', 264 => '', 265 => 'This corresponds to the following mnemonics:', 266 => '', 267 => ' PUSH I', 268 => ' PUSH I', 269 => ' INPUT INT', 270 => ' DO COPY', 271 => ' CONTROL WHILE', 272 => ' PUSH TRI DO ROT', 273 => ' DO COPY', 274 => ' OUTPUT INT', 275 => ' PUT XX:I NUMBERZERO', 276 => ' OUTPUT CH', 277 => ' PUSH BI DO COPYN', 278 => ' STACKTOP PLUS', 279 => ' DO TURNOVER', 280 => ' STACKTOP MINUSONE', 281 => ' DO COPY', 282 => ' CONTROL END', 283 => '', 284 => 'Fun fact: the Fibonacci sequence program was the first ever Bespoke program, written when the specs weren't yet finalized.', 285 => '', 286 => '==Implementation==', 287 => '', 288 => '* [https://github.com/WinslowJosiah/bespokelang Official Python interpreter] (contains other example programs)', 289 => '', 290 => '[[Category:2025]] [[Category:Turing complete]] [[Category:Stack-based]] [[Category:Implemented]] [[Category:Languages]] [[Category:Pseudonatural]]' ]
Unix timestamp of change (timestamp)
'1736963305'