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

@rekarel/cli

v2.0.1

Published

CLI tool for karel

Downloads

178

Readme

NPM Version

This is the command line interface for a Karel compiler.

Install

npm install -g @rekarel/cli

Commands

Versioning

rekarel [-V]

Shows the version of the rekarel command.

Run

rekarel run <filename> [-i world.in] [-o world.out]

Runs a filename (if it has extension .kx it runs it directly, otherwise it compiles it first) and outputs the world.out to stdout

Arguments

  • -i If a world.in is not supplied, it reads the world from stdin, but if specified, then it reads the file.

  • -o If a world.out is not supplied, it prints the output to stdout, but if specidied, then it writes to the path provided.

Behaviour

Depending on how the execution ends, the console returns a exit signal and may print to stderr based on the follow table:

| Status | Exit signal | Stderr | Description | |-------------------------|-------------|---------------------------------------|--------------------------------------------------------------------| | OK | 0 | ---- | No error, execution succeeded. | | WALL | 16 | MOVIMIENTO INVALIDO | Karel tried to move into a wall. | | WORLDUNDERFLOW | 17 | ZUMBADOR INVALIDO MUNDO | Karel tried to take a beeper on an empty cell. | | BAGUNDERFLOW | 18 | ZUMBADOR INVALIDO MOCHILA | Karel tried to leave a beeper with an empty bag. | | STACK | 19 | STACK OVERFLOW | Karel suffered a stack overflow. | | STACKMEMORY | 20 | LIMITE DE MEMORIA DEL STACK | Karel exceeded the stack memory limits. | | CALLSIZE | 21 | LIMITE DE LONGITUD DE LLAMADA | Karel exceeded the number of parameters permitted in a call. | | INSTRUCTION | 48 | LIMITE DE INSTRUCCIONES GENERAL | Karel exceeded the general number of allowed instructions. | | INSTRUCTION_LEFT | 49 | LIMITE DE INSTRUCCIONES IZQUIERDA | Karel exceeded the number of allowed turnleft. | | INSTRUCTION_FORWARD | 50 | LIMITE DE INSTRUCCIONES AVANZA | Karel exceeded the number of allowed move. | | INSTRUCTION_PICKBUZZER | 51 | LIMITE DE INSTRUCCIONES COGE_ZUMBADOR | Karel exceeded the number of allowed pickbeeper. | | INSTRUCTION_LEAVEBUZZER | 52 | LIMITE DE INSTRUCCIONES DEJA_ZUMBADOR | Karel exceeded the number of allowed putbeeper. |

Notice that what is usually considered RTE has only 16 bit on, while errors that are considered TLE or Instruction limit exceeded (ILE) have both the 16 and 32 bit on.

Compile

rekarel compile <filename> [-l java|pascal] [-o output]

Compiles a source code into a .kx file, Karel's bytecode

Arguments

  • -l --language If set, it tries to compile to the specified target language. If not, the compiler attempts to detect the language.
  • -o --output If set, it compiles to the target file, if not, it generates a file named a.kp