[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cursed is a language designed to be as bad as possible, while still maybe being good(?)

License

Notifications You must be signed in to change notification settings

AMiller42/Cursed-Language

Repository files navigation

Cursed

Try Cursed out today in the online interpreter! (Disclaimer: Doesn't work yet; it'll work tomorrow.)

Example program to demonstrate syntax: Cursed FizzBuzz

Confirmed Bugs Features

Note: Potential features / features with missing details are marked with (?)

  • There will be a golfy syntax and readable syntax for most things, which can be mixed together

  • Switch statements instead of if statements, but instead of break, you have to use goto

  • While loops that confirm that you actually want to break the loop

  • Four loops that always execute four times

  • Labels are set with ;label;

  • There are goto ;label; statements, which you can return from by using goto ;camefrom;

  • Dysfunctional Functions™ (Not sure what that means yet, but with a name like that, I've got to include it.)

  • All variables are global

  • \uxxxx anywhere gets converted to UTF-16 character before execution; if part of it is missing, it gets padded with random characters 0-F

  • No rng commands, instead you use the previous feature or a delimiter that marks code as optional so it gets executed 50% of the time

  • Output is just a variable, and you produce output by setting that variable. However, to reduce ambiguity, any variable with out in the name will work

  • Input is also a variable, which you retrieve a value from. Again, any variable with in in the name will work

  • Use -> to set variables or retrieve from variables. You can also use <-

  • Strings are delimited with double single quotes: ''Hello World''

  • Arrays are delimited with single double quotes, with pipes separating values: "1|2|3"

  • Arrays can have negative and decimal indexes, and they're 1-indexed, i.e. a"-2", a"-1", a"1", a"2" will all work, but a"0" will just segfault

  • All keywords can be used as variables, rendering the function of the keyword inoperable

  • Like any keyword, you can try to set null like a variable, but the value will be trashed

  • Like keywords, you can also use numbers as variables, including decimals

  • Escape character is !, but to escape ! characters, you have to use \

  • Brackets are mirrored, e.g. }]) ([{

  • Strange automatic typecasting / overloading, e.g.

    • [] -> 0
    • [[]] -> 1
    • null -> 0
    • [null] -> 1
    • etc.

Examples

Print "Hello, World!"

''Hello, World\!''->out

Truth-Machine

x<-in})x(x->out{

Cat Program

in->out

Define an Array of Strings

"''Hello''|''World\!''"

About

Cursed is a language designed to be as bad as possible, while still maybe being good(?)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published