KappaPP

所属分类:大数据
开发工具:F#
文件大小:0KB
下载次数:0
上传日期:2021-12-23 22:44:12
上 传 者sh-1993
说明:  Kappa++是一种深奥的编程语言,仅由全局TwitchTV表情、,
(Kappa++ is an esoteric programming language consisting of only global TwitchTV emotes,)

文件列表:
KappaPP.sln (1586, 2021-12-23)
KappaPP/ (0, 2021-12-23)
KappaPP/KappaPP.fsproj (1030, 2021-12-23)
KappaPP/Program.fs (462, 2021-12-23)
KappaPP/Properties/ (0, 2021-12-23)
KappaPP/Properties/launchSettings.json (113, 2021-12-23)
KappaPP/src/ (0, 2021-12-23)
KappaPP/src/aero/ (0, 2021-12-23)
KappaPP/src/aero/app/ (0, 2021-12-23)
KappaPP/src/aero/app/Cli.fs (3135, 2021-12-23)
KappaPP/src/aero/app/Help.fs (1116, 2021-12-23)
KappaPP/src/aero/app/Runner.fs (2300, 2021-12-23)
KappaPP/src/aero/entry/ (0, 2021-12-23)
KappaPP/src/aero/entry/Entry.fs (1572, 2021-12-23)
KappaPP/src/aero/error/ (0, 2021-12-23)
KappaPP/src/aero/error/Errors.fs (853, 2021-12-23)
KappaPP/src/aero/events/ (0, 2021-12-23)
KappaPP/src/aero/events/Event.fs (2263, 2021-12-23)
KappaPP/src/aero/lang/ (0, 2021-12-23)
KappaPP/src/aero/lang/Interpreter.fs (3809, 2021-12-23)
KappaPP/src/aero/lang/Lexer.fs (1123, 2021-12-23)
KappaPP/src/aero/lang/Syntax.fs (7056, 2021-12-23)
KappaPP/src/aero/runtime/ (0, 2021-12-23)
KappaPP/src/aero/runtime/Runtime.fs (5881, 2021-12-23)
KappaPP/src/aero/runtime/Stack.fs (2833, 2021-12-23)
KappaPP/src/aero/utils/ (0, 2021-12-23)
KappaPP/src/aero/utils/ConsoleUtils.fs (1382, 2021-12-23)
KappaPP/src/aero/utils/Constants.fs (785, 2021-12-23)
KappaPP/src/aero/utils/StdWrapper.fs (777, 2021-12-23)
KappaPPTests/ (0, 2021-12-23)
KappaPPTests/KappaPPTests.fsproj (1121, 2021-12-23)
KappaPPTests/Program.fs (56, 2021-12-23)
KappaPPTests/test/ (0, 2021-12-23)
KappaPPTests/test/app/ (0, 2021-12-23)
KappaPPTests/test/app/RunnerTests.fs (648, 2021-12-23)
KappaPPTests/test/entry/ (0, 2021-12-23)
... ...

# Kappa++ ## Introduction Kappa++ is an esoteric programming language consisting of only global TwitchTV emotes. It is a stack based programming language, meaning that values can be pushed onto stacks and popped once needed. The language uses reverse polish notation (RPN) for operators. ## Hello World! There are many ways to manipulate stacks in order to create a "Hello World!" output. This is just an example: ``` TBAngel VoteYea PogChamp VoteYea CoolCat CoolCat LUL LUL CoolCat TheIlluminati KKona CoolCat CoolCat SabaPing KKona SabaPing TehePelo LUL KappaPride TehePelo PogChamp VoteYea VoteNay LUL VoteNay LUL CoolCat PoroSad riPepperonis CoolCat UnSane riPepperonis CoolCat TheIlluminati KKona PoroSad SabaPing LUL VoteYea PogChamp KappaPride ThankEgg SSSsss CoolCat LUL Kappa TheIlluminati TehePelo LUL Kappa TehePelo PogChamp KappaPride ThankEgg TheIlluminati CoolCat LUL Kappa ``` Here is a minified version of this code: ``` TBAngel VoteYea PogChamp VoteYea CoolCat CoolCat LUL LUL CoolCat TheIlluminati KKona CoolCat CoolCat SabaPing KKona SabaPing TehePelo LUL KappaPride TehePelo PogChamp VoteYea VoteNay LUL VoteNay LUL CoolCat PoroSad riPepperonis CoolCat UnSane riPepperonis CoolCat TheIlluminati KKona PoroSad SabaPing LUL VoteYea PogChamp KappaPride ThankEgg SSSsss CoolCat LUL Kappa TheIlluminati TehePelo LUL Kappa TehePelo PogChamp KappaPride ThankEgg TheIlluminati CoolCat LUL Kappa ``` Here is the Twitch Chat version of it:
## Tools ### Help To get information about the tools of Kappa++ execute KappaPP.exe with `-help`. ``` > KappaPP.exe -help ``` ### Runner To run Kappa++ source code execute KappaPP.exe with `-run` and the path to the file containing the source code. ``` > KappaPP.exe -run "C:\Users\Admin\scripts\HelloWorld.pog" Executing C:\Users\Admin\scripts\HelloWorld.pog: KappaPP :: lang = K++ (V::1.0.0) Hello, World! ``` The file extension is irrelevant. Save the file with any or no file extension. ### CLI Tool For an interactive command line experience execute Kappa.PP.exe with `-cli`: ``` > KappaPP.exe -cli ``` ╔══════════ K++ CLI Runtime ══════════════════════════════
╠ KappaPP :: lang = K++ (V::1.0.0)
╠ Enter K++ source lines to invoke them. Enter nothing to exit.
╠ TBAngel
╠ SabaPing TehePelo LUL Kappa VoteYea VoteNay LUL TwitchUnity LUL Kappa TheIlluminati CoolCat LUL Kappa   
╠ H
╠ i
╠ !
╠ ThankEgg
╠ 
╚══════════ K++ Finish ═══════════════════════════════════ # Language Reference ## Null Any series of characters that does not match a Literal, Operator, Stack Operator, Conditional Operator or Region-Identifiers is consider a null value. This way a comment can just be written in line. ``` TBAngel <> comment before code: VoteYea PogChamp [delete stack] ThankEgg ``` This piece of code is equivivalent to: ``` TBAngel VoteYea PogChamp ThankEgg ``` ## Literals Literals can always be pushed onto the current stack. If the value is printed the ASCII value will be printed! | Emote | Literal value | | ------------- | ------------- | | VoteNay | 0 | | VoteYea | 1 | | TehePelo | 2 | | TheIlluminati | 3 | | SSSsss | 4 | | TwitchUnity | 5 | | UnSane | 6 | | SabaPing | 7 | | PoroSad | 8 | | OhMyDog | 9 | ## IO Operators | Emote | Description | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- | | Kappa | Prints the ASCII value of the current stacks top value. The value will be popped off the stack. (SYS_OUT) | | KappaPride | Prints the ASCII values of all values of the current stack. The values will be popped off the stack, leaving an empty stack. (SYS_OUT) | | SwiftRage | Same as Kappa, but SwiftRage should be used for errors. (ERR_OUT) | ## Literal Operators These operators manipulate the current stacks top values. The values may be popped, peeked or replaced by the result of the operator. | Emote | Description | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | riPepperonis | Pops the top two values of the current stack, sums them and pushes the result onto the current stack. | | KKona | Pops the top two values of the current stack, subtracts the top value from the second top value and pushes the result onto the current stack. | | FBBlock | Pops the top value. (This can be useful to pop a condition if it is not needed anymore) | | MorphinTime | Pops the top two values of the current stack, divides the second top value by the top most value and pushes the result onto the current stack. | | TwitchSings | Pops the top two values of the current stack, multiplies top value by the second top value and pushes the result onto the current stack. | | LUL | Pops the top two values of the current stack and concatenates them. e.g.: If the stack was 1>2>3, the stack will be 1>23 because the 2 and 3 got concatenated. | | CoolCat | Peeks the top value of the current stack and pushes it again onto the stack (duplicating the top value). | | PowerUpL | Peeks the top two values of the current stack and checks if the second top value is lower than the top value. If it is lower a 1 (VoteYea) will be pushed onto the stack otherwise a 0 (VoteNay) will be pushed onto the stack. | | PowerUpR | Peeks the top two values of the current stack and checks if the second top value is greater than the top value. If it is greater a 1 (VoteYea) will be pushed onto the stack otherwise a 0 (VoteNay) will be pushed onto the stack. | | TwitchVotes | Peeks the top two values of the current stack and checks if the second top value is equal to the top value. If it is equal a 1 (VoteYea) will be pushed onto the stack otherwise a 0 (VoteNay) will be pushed onto the stack. | ## Region Operators A region of code has an origin and an end. These regions can be skipped with conditional operators. | Emote | Description | | ------- | ------------------------ | | GivePLZ | Opens a region of code. | | TakeNRG | Closes a region of code. | ## Conditional Operators In Kappa++ regions of code can be skipped if a conditional operator evaluates to true. If the evaluation is successful the next region is skipped. It does not have to be directly after the condition but it is recommended. | Emote | Description | | --------- | ------------------------------------------------------------------------------------------- | | EleGiggle | Peeks the top value of the stack. If it is not 0 (VoteNay) the next region will be skipped. | | Jebaited | Peeks the top value of the stack. If it is 0 (VoteNay) the next region will be skipped. | ## Stack Operators These operators manipulate, create or set the current stack. There can be an unlimited number of stacks with unlimited number of values pushed onto the stacks.
Per default the current stack is the ORIGIN stack. Working on the ORIGIN stack is considerd bad habit but it is possible. The ORIGIN stack should only be active to create other stacks. | Emote | Description | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | TBAngel | Sets the current stack to the ORIGIN stack. | | PogChamp | Creates a new stack and sets it as the current stack. The ID of the stack is the top value of the current stack. The top value will be popped off the stack. If PogChamp is called with an ID of an existing stack, the current stack will be set to the existing stack instead of creating a new one. | | ThankEgg | Destroys the current stack with all it's content and sets the current stack to ORIGIN. | | CopyThis | Creates a new stack and sets it as the current stack. The content of the new stack is equal to the previously active stack. The ID of the stack is the top value of the current stack. The top value will be popped off the stack. | # Language Safety The language is very forgiving and errors should not be possible. For example, if an operator is peeking or popping an empty stack a 0 (VoteNay) is returned instead of exiting with an error.

近期下载者

相关文件


收藏者