ArnoldC

Discussion in 'Daily Life' started by LetsRaceBwoi, Mar 14, 2016.

  1. LetsRaceBwoi

    LetsRaceBwoi Well-Known Member

    upload_2016-3-14_19-34-57.png
    why does this exist-
    [​IMG]
    Hello World!
    Code:
    IT'S SHOWTIME TALK TO THE HAND "Hello, World!" YOU HAVE BEEN TERMINATED
    
    Still, works nicely :)

    HASTA LA VISTA, BABY
    http://lhartikk.github.io/ArnoldC/
  2. pisarz1958

    pisarz1958 Administrator Staff Member Moderator

  3. LetsRaceBwoi

    LetsRaceBwoi Well-Known Member

    hahahahah
    EDIT:
    TrumpScript hello world:
    Code:
    say "Hello, World!"
    America is great.
  4. Tirea

    Tirea Active Member

    Am I the only one that appreciates the complex simplicity of brainfuck?!
    Code:
    ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
    pisarz1958 likes this.
  5. LetsRaceBwoi

    LetsRaceBwoi Well-Known Member

    This one is much shorter ;)
    Code:
    --<-<<+[+[<+>--->->->-<<<]>]<<--.<++++++.<<-..<<.<+.>>.>>.<<<.+++.>>.>>-.<<<+.
    ABCD is another esoteric programming language. Here's the shortest "Hello World" for it:
    Code:
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAADDAAADBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDBBBBBBBBBBBBDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAADAAADBBBBBBDBBBBBBBBDBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDBBBBBBBBBBBBBBBBBBBBBBBD
    
    I wrote an interpreter for it in C#, too:
    https://mega.nz/#!dZAm3YBI!tylGfWcC2CQnd3vBsLuoASnNSm-9oZSh3wGAyBbquC8
    (Luckily the console has a copy-paste function, haha)
  6. LetsRaceBwoi

    LetsRaceBwoi Well-Known Member

    I came up with my own esoteric language, HashQ. Here's how it works:
    Each program has its own register, which it can add to, remove from, and reset. Each program can also input to and output from said register. Registers hold characters (C# chars) and, when the program is started or the register is reset, it is a null character ('\0').
    Sample Program
    Here is a simple "Hello, World!" statement:
    Code:
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=#++++++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    +++++++++++++++=#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    +++++++++++++++++++++++++++++++++++++++++++++=#+++++++++++++++++++++++++++++++++
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=#+++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ++++++++++++++++++++++++++++=#++++++++++++++++++++++++++++++++++++++++++++=#++++
    ++++++++++++++++++++++++++++=#++++++++++++++++++++++++++++++++++++++++++++++++++
    +++++++++++++++++++++++++++++++++++++=#+++++++++++++++++++++++++++++++++++++++++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=#++++++++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ++++++++++++++++++++++++++=#++++++++++++++++++++++++++++++++++++++++++++++++++++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++=#++++++++++++++++++++++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=#
    +++++++++++++++++++++++++++++++++=#
    As you can see, it's pretty complex, but looking at it, it's rather simple!
    Let's look at the first line:
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=#++++++
    If we ignore the last few plus symbols on the end, it becomes:
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=#
    The plus symbols represent an ASCII character - in this case, the number of pluses equates to the ASCII decimal position. There are 72 plus symbols, meaning that it's the letter H.
    The equals symbol then outputs this character, and the hash symbol resets the register to a null character.
    This continues throughout the code, changing the number of pluses each time to create the string "Hello, World!".

    Current Features
    Here's what you can do currently:
    Planned Features
    At some point in the future I'll add support for if statements, which will look something like this:
    [_'A']+[!]#;
    This will collect input (the underscore character) and if it's the letter 'A', it will add to the register. Otherwise, it will reset the register! The semicolon at the end denotes the end of the if statement.
    I might also add while loops, adding support for simple echo programs, for instance:
    [/T]_=#;
    This will take input, output it and reset the register while (/) true (T).
    This will involve implementing true and false booleans (T/F respectively).

    Interpreter
    Here's a link to the current version of the HashQ Interpreter (v1.1):
    https://mega.nz/#!4dIDAaDJ!8hIqq5_kjO75AN4OA2mdEfrpp9-goQgFv8ROE7-ZG5k

Share This Page