JSPM

hidescript

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q20288F
    • License MIT

    HideScript (.hs) Programming Language

    Package Exports

    • hidescript
    • hidescript/main.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hidescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Introduction

    HideScript is a programming language in which code is represented by dots and spaces. Each character is encoded based on the number of spaces. The following table shows the correspondence between Hide Script characters and JavaScript characters:

    HideScript Character JavaScript Character
    1 spaces Symbol ' '
    2 spaces Symbol 'a'
    3 spaces Symbol 'b'
    4 spaces Symbol 'c'
    5 spaces Symbol 'd'
    6 spaces Symbol 'e'
    7 spaces Symbol 'f'
    8 spaces Symbol 'g'
    9 spaces Symbol 'h'
    10 spaces Symbol 'i'
    11 spaces Symbol 'j'
    12 spaces Symbol 'k'
    13 spaces Symbol 'l'
    14 spaces Symbol 'm'
    15 spaces Symbol 'n'
    16 spaces Symbol 'o'
    17 spaces Symbol 'p'
    18 spaces Symbol 'q'
    19 spaces Symbol 'r'
    20 spaces Symbol 's'
    21 spaces Symbol 't'
    22 spaces Symbol 'u'
    23 spaces Symbol 'v'
    24 spaces Symbol 'w'
    25 spaces Symbol 'x'
    26 spaces Symbol 'y'
    27 spaces Symbol 'z'
    28 spaces Symbol '0'
    29 spaces Symbol '1'
    30 spaces Symbol '2'
    31 spaces Symbol '3'
    32 spaces Symbol '4'
    33 spaces Symbol '5'
    34 spaces Symbol '6'
    35 spaces Symbol '7'
    36 spaces Symbol '8'
    37 spaces Symbol '9'
    38 spaces Symbol 'A'
    39 spaces Symbol 'B'
    40 spaces Symbol 'C'
    41 spaces Symbol 'D'
    42 spaces Symbol 'E'
    43 spaces Symbol 'F'
    44 spaces Symbol 'G'
    45 spaces Symbol 'H'
    46 spaces Symbol 'I'
    47 spaces Symbol 'J'
    48 spaces Symbol 'K'
    49 spaces Symbol 'L'
    50 spaces Symbol 'M'
    51 spaces Symbol 'N'
    52 spaces Symbol 'O'
    53 spaces Symbol 'P'
    54 spaces Symbol 'Q'
    55 spaces Symbol 'R'
    56 spaces Symbol 'S'
    57 spaces Symbol 'T'
    58 spaces Symbol 'U'
    59 spaces Symbol 'V'
    60 spaces Symbol 'W'
    61 spaces Symbol 'X'
    62 spaces Symbol 'Y'
    63 spaces Symbol 'Z'
    64 spaces Symbol '~'
    65 spaces Symbol '`'
    66 spaces Symbol '@'
    67 spaces Symbol '"'
    68 spaces Symbol '#'
    69 spaces Symbol '$'
    70 spaces Symbol ';'
    71 spaces Symbol '%'
    72 spaces Symbol '^'
    73 spaces Symbol ':'
    74 spaces Symbol '?'
    75 spaces Symbol '&'
    76 spaces Symbol '*'
    77 spaces Symbol '('
    78 spaces Symbol ')'
    79 spaces Symbol '_'
    80 spaces Symbol '-'
    81 spaces Symbol '+'
    82 spaces Symbol '='
    83 spaces Symbol '['
    84 spaces Symbol ']'
    85 spaces Symbol '{'
    86 spaces Symbol '}'
    87 spaces Symbol '''
    88 spaces Symbol '|'
    89 spaces Symbol '\'
    90 spaces Symbol '/'
    91 spaces Symbol ','
    92 spaces Symbol '.'
    93 spaces Symbol '<'
    94 spaces Symbol '>'

    In HideScript, you can write programs by using a combination of different numbers of spaces to represent each character. For example, a single space represents the space character, two spaces represent the letter 'a', and so on.

    Here's an example of a simple HideScript program and its equivalent JavaScript code:

    HideScript:

        .                .               .                    .                .             .      .                                                                                            .             .                .        .                                                                             .                             .                                                                              .                                                                                                

    JavaScript:

    console.log(1);

    In this example, the HideScript code is translated to JavaScript code, which, when executed, will print the number 1 to the console.

    Quick start

    HideScript is a programming language that can be run in a web browser or in a NodeJS environment. Here is some documentation on how to use HideScript:

    1. Installation: HideScript can be installed via npm using the following command:
    npm install hidescript
    1. Running in a web browser: To run HideScript in a web browser, include the following script tag in your HTML file:
    <script src="https://cdn.jsdelivr.net/npm/hidescript/main.js"></script>

    HideScript will then search for script tags with the attribute language="HideScript" and execute the code inside them.

    1. Running in NodeJS: To run HideScript in a NodeJS environment, follow these steps:
    • Import the Interpreter module:
    const Interpreter = require("hidescript");
    • Run a HideScript script and store the result in a variable:
    const script = Interpreter.run('./index.hs', 'js');
    • Evaluate the HideScript script:
    Interpreter.eval(script);

    Make sure to replace './index.hs' with the path to your HideScript file.

    That's it! You should now be able to run HideScript code in both web browsers and NodeJS environments using the HideScript Interpreter module.