npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

algo-compiler

v1.0.9

Published

Algo is a compiler designed to translate pseudo code written in a custom language to JavaScript. Currently, it's in its budding stage and supports limited conversion to JavaScript.

Downloads

2

Readme

Algo

Algo is a compiler designed to translate pseudo code written in a custom language to JavaScript. Currently, it's in its budding stage and supports limited conversion to JavaScript.

Features

  • Converts pseudo code written in .alg files to JavaScript.
  • Simple and easy-to-understand syntax for writing pseudo code.
  • Intuitive and minimalistic interface.

Prerequisites

Before using Algo, ensure you have Node.js installed on your system. You can download and install Node.js from the official website: Node.js

Getting Started

To get started with Algo, follow these steps:

For users, simply install the algo-compiler package via npm globally and start using it:

npm i -g algo-compiler

or

npm install -g algo-compiler

For developers,

  1. Clone the repository to your local machine:

    git clone https://github.com/Naveen2070/algo-compiler.git
  2. Install the required dependencies:

    npm install -g
  3. Start using Algo to convert your pseudo code to JavaScript!

Happy coding!

Configuration

The algo reads configuration from a config.lang file in the project directory. If no config file is found, default values are used. Configuration options include:

  • Language: The target language for conversion (e.g., JavaScript).
  • Format: The target language format for file creation (e.g., js for JavaScript).
  • Version: The version of the target language (optional) (Exprimental & Under-Development).
  • OutFolder: Specifies the output folder name for converted files.
  • EntryPoint: Specifies the root path for converting or running files using the run and convert commands.
  • Mode: Specifies the mode of operation (e.g., Development).

Note: The EntryPoint file must always be at the root of the project directory. This configuration option Mode is only for developers who clone and use the algo for development.

Usage

  1. Write your pseudo code in a .alg file.

  2. Run the Algo compiler with the following command:

    algo your_file.alg
  3. Follow the prompts:

    • Select the mode:
      • Convert: Only convert pseudo code to JavaScript.
      • Run: Immediately execute the code.
    • If Convert mode is selected, optionally provide a custom output file name.
    • If no custom output file name is provided, the default name (output.js) is used.
  4. The compiled JavaScript code will be generated according to your selections.

Usage: algo [options] <file>

Options:
  -v, --version  output the version number
  -h, --help     display usage information

Commands:
  run            Compile and execute the .alg files.
  convert        Compile and convert the .alg files.
  clean          clean log and temp folders in compilers directory

Examples:
  algo your_file.alg        Compile and execute the .alg file
  algo clean                Clean log and temp folders in compilers directory
  algo --version            To get the algo version
  algo -h                   To get help

Example

Pseudo Code (example.alg):

Start greet(name)
Print ("Hello, " + name + "!")
End

Compiled JavaScript (example.js):

function greet(name) {
  console.log('Hello, ' + name + '!');
}

License

Algo is licensed under the BSD 3-Clause License. See LICENSE for more details.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

Documentation

For detailed syntax guidelines, refer to Documentation.md.

Disclaimer

Please note that Algo is still in its early stages of development, and the conversion capabilities are limited. There might be breaking changes in future updates. Use it with caution and report any bugs or issues you encounter.

Contact

For any inquiries or support, feel free to contact the project maintainer at Gmail.


Algo - Short for algorithm.

For a detailed list of changes, see changelog.md.