This is a command-line tool-kit for EO programming languages, allowing you to compile EO programs, test, dataize, and check for errors.
First, you install npm and Java SE.
Then, you install eolang package, using npm:
npm install -g eolang@0.35.1You can also use Homebrew (on macOS):
brew tap objectionary/eoc https://github.com/objectionary/eoc
brew install objectionary/eoc/eolang@0.35.1Or install it via Nix flakes:
nix run github:objectionary/eocYou can also include EOLANG in your own flake
{
inputs = {
eoc.url = "github:objectionary/eoc";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
};
outputs = { self, nixpkgs, eoc, ... }: {
nixConfigurations.<hostname> = nixpkgs.lib.nixosSystem {
modules = [
{
nixpkgs.config.packageOverrides = pkgs: {
eoc = eoc.packages.${system}.default;
};
}
];
}
};
}After that, select one of the methods for installing the package:
#configuration.nix (Global)
{
environment.systemPackages = with pkgs; [
eoc
];
}#configuration.nix (For user)
{
users.users.<your-user-name>.packages = with pkgs; [
eoc
];
}#home.nix (For home-manager)
{
home.packages = with pkgs; [
eoc
];
}Then, you write a simple EO program in hello.eo file
in the current directory:
# My first object in EO!
[args] > hello
io.stdout > @
"Hello, world!\n"
Then, you run it:
eoc --easy dataize helloThat's it.
You can also do many other things with eoc commands
(the flow is explained in this blog post):
auditInspect all packages and report their statusforeignInspect and print the list of foreign objectscleanDelete all temporary filesregisterRegister all visible EO source filesparseParse EO files into XMIRassembleParse EO files into XMIR and join them with required dependenciesprintGenerate EO files from XMIR fileslintLint XMIR files and fail if any issues insideresolveResolve all the dependencies required for compilationtranspileConvert EO files into target languagecompileCompile target language sources into binarieslinkLink together all binaries into a single executable binarydataizeRun the single executable binary and dataize an objecttestRun all visible unit testsdocsGenerate documentation from XMIR filesgenerate_commentsGenerate documentation with LLMjeo:disassembleDisassemble .class files to .xmir filesjeo:assembleAssemble .xmir files to .class fileslatexGenerate LaTeX files from EO sourcesnormalizeNormalize EO files using phi-calculus normalization via phinofmtFormat EO files in the source directory
This command line toolkit simply integrates other tools available in the @objectionary GitHub organization.
There are two ways to work with linting. The --easy option enables linting
but ignores warnings, while the --blind option completely disables linting.
To execute the project tests, use the following command:
npx gruntThis command will run all the testing steps, including tests, linting, coverage, and more. If you only need to run the tests, use:
npm testTo run a specific test based on its description, use the following command:
npm test -- --grep="<test-description>"For example, to run a test with the description "formats EO files according to expected patterns," execute:
npm test -- --grep="formats EO files according to expected patterns"You can also run a specific test file using npx grunt:
npx grunt --file=test/commands/test_fmt.jsFirst, run npm install.
Make your changes, run tests and then
make
a pull request.