{"id":13437282,"url":"https://github.com/IoLanguage/io","last_synced_at":"2025-03-19T06:30:59.791Z","repository":{"id":383771,"uuid":"966","full_name":"IoLanguage/io","owner":"IoLanguage","description":"Io programming language. Inspired by Self, Smalltalk and LISP.","archived":false,"fork":false,"pushed_at":"2023-10-19T14:55:48.000Z","size":26588,"stargazers_count":2689,"open_issues_count":62,"forks_count":299,"subscribers_count":125,"default_branch":"master","last_synced_at":"2025-03-16T10:08:51.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://iolanguage.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IoLanguage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2008-02-22T08:41:30.000Z","updated_at":"2025-03-15T13:07:38.000Z","dependencies_parsed_at":"2022-07-07T12:54:54.020Z","dependency_job_id":"f8ad9561-3d79-4577-99dc-b1351ebce8da","html_url":"https://github.com/IoLanguage/io","commit_stats":{"total_commits":2181,"total_committers":201,"mean_commits":"10.850746268656716","dds":0.8844566712517195,"last_synced_commit":"3aabacfcee8ef046b1f3c7d0c4e9a63a1fd4c871"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IoLanguage%2Fio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IoLanguage%2Fio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IoLanguage%2Fio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IoLanguage%2Fio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IoLanguage","download_url":"https://codeload.github.com/IoLanguage/io/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244370939,"owners_count":20442318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:00:55.675Z","updated_at":"2025-03-19T06:30:55.889Z","avatar_url":"https://github.com/IoLanguage.png","language":"C","readme":"# The Io Language\n\n_Note: This document is intended to be used as a reference for setting up and configuring Io. For a guide on how to use the language itself, please visit the website at \u003chttp://iolanguage.org/guide/guide.html\u003e._\n\n# Table of Contents\n\n* [Table of Contents](#table-of-contents)\n* [What is Io?](#what-is-io)\n\t* [Example Code](#example-code)\n\t* [Quick Links](#quick-links)\n* [Installing](#installing)\n\t* [From a Package Manager](#from-a-package-manager)\n\t* [From Source](#from-source)\n\t\t* [Linux Build Instructions](#linux-build-instructions)\n\t\t* [macOS Build Instructions](#macOS-build-instructions)\n\t\t* [Windows Build Instructions](#windows-build-instructions)\n\t\t\t* [Building with MinGW-W64](#building-with-mingw-w64)\n\t\t\t* [Building with MinGW](#building-with-mingw-recommended)\n\t\t\t* [Building with MSVC](#building-with-msvc)\n\t\t\t* [Building with Cygwin](#building-with-cygwin)\n* [Running Tests](#running-tests)\n* [Installing Addons](#installing-addons)\n\nWhat is Io?\n=====\n\nIo is a dynamic prototype-based programming language in the same realm as\nSmalltalk and Self. It revolves around the idea of message passing from object\nto object.\n\nFor further information, the programming guide and reference manual can be found\nin the docs folder.\n\n\nExample Code\n---\nBasic Math\n\n```Io\nIo\u003e 1 + 1\n==\u003e 2\n\nIo\u003e 2 sqrt\n==\u003e 1.4142135623730951\n```\n\nLists\n\n```Io\nIo\u003e d := List clone append(30, 10, 5, 20)\n==\u003e list(30, 10, 5, 20)\n\nIo\u003e d := d sort\n==\u003e list(5, 10, 20, 30)\n\nIo\u003e d select (\u003e10)\n==\u003e list(20, 30)\n```\n\nObjects\n\n```Io\nIo\u003e Contact := Object clone\n==\u003e  Contact_0x7fbc3bc8a6d0:\n  type = \"Contact\"\n\nIo\u003e Contact name ::= nil\n==\u003e nil\n\nIo\u003e Contact address ::= nil\n==\u003e nil\n\nIo\u003e Contact city ::= nil\n==\u003e nil\n\nIo\u003e holmes := Contact clone setName(\"Holmes\") setAddress(\"221B Baker St\") setCity(\"London\")\n==\u003e  Contact_0x7fbc3be2b470:\n  address          = \"221B Baker St\"\n  city             = \"London\"\n  name             = \"Holmes\"\n\nIo\u003e Contact fullAddress := method(list(name, address, city) join(\"\\n\"))\n==\u003e method(\n    list(name, address, city) join(\"\\n\")\n)\n\nIo\u003e holmes fullAddress\n==\u003e Holmes\n221B Baker St\nLondon\n```\n\n\n\n\nQuick Links\n---\n* The Wikipedia page for Io has a good overview and shows a few interesting\n  examples of the language:\n  \u003chttps://en.wikipedia.org/wiki/Io_(programming_language)\u003e.\n* The entry on the c2 wiki has good discussion about the merits of the language:\n  \u003chttp://wiki.c2.com/?IoLanguage\u003e.\n\n\nInstalling\n==========\n\nFrom a Package Manager\n---\n\nIo is currently only packaged for OS X. To install it, open a terminal and type:\n\n```\nbrew install io\n```\n\nNote that this package may not be as updated as the version from the source\nrepository.\n\nTo install via Homebrew on an M1 Mac, first install Homebrew under x86_64, into /usr/local:\n\n```\narch -x86_64 /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)\"\n```\n\nThen install io with this installation of Homebrew:\n\n```\narch -x86_64 /usr/local/Homebrew/bin/brew install io\n```\n\nFollowing that, you can run io under Rosetta 2 with:\n\n```\narch -x86_64 io\n```\n\nFrom Source\n---\n\nFirst, make sure that this repo and all of its submodules have been cloned to\nyour computer by running `git clone` with the `--recursive` flag:\n\n```\ngit clone --recursive https://github.com/IoLanguage/io.git\n```\n\nIo uses the [CMake build system](https://cmake.org/) and supports all of the\nnormal flags and features provided by CMake. \n\nIn a production environment, pass the flag `-DCMAKE_BUILD_TYPE=release` to the\n`cmake` command to ensure that the C compiler does the proper optimizations.\nWithout this flag, Io is built in debug mode without standard C optimizations.\n\nTo install to a specific folder, pass the flag\n`-DCMAKE_INSTALL_PREFIX=/path/to/your/folder/` to the `cmake` command.\n\n### Linux Build Instructions\n\nTo prepare the project for building, run the following commands:\n\n```\ncd io/           # To get into the cloned folder\nmkdir build      # To contain the CMake data\ncd build/\ncmake ..         # This populates the build folder with a Makefile and all of the related things necessary to begin building\n```\n\nIn a production environment, pass the flag `-DCMAKE_BUILD_TYPE=release` to the\n`cmake` command to ensure that the C compiler does the proper optimizations.\nWithout this flag, Io is built in debug mode without standard C optimizations.\n\nTo install to a different folder than `/usr/local/bin/`, pass the flag\n`-DCMAKE_INSTALL_PREFIX=/path/to/your/folder/` to the `cmake` command.\n\nTo build without Eerie, the Io package manager, pass the flag\n`-DWITHOUT_EERIE=1` to the `cmake` command.\n\nOnce CMake has finished preparing the build environment, ensure you are inside\nthe build folder, and run:\n\n```\nmake\nsudo make install\n```\n\nFinally, install [Eerie](https://github.com/IoLanguage/eerie), the Io package\nmanager (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation\noptions):\n\n```\nexport PATH=$PATH:_build/binaries/; . ./install_unix.sh\n```\n\nIo can then be run with the `io` command and Eerie can be run with the `eerie`\ncommand.\n\n\n### macOS Build Instructions\n\nSee the [Linux build instructions](#linux-build-instructions).\n\nNote: Building Io for arm64-based macOS machines is unsupported. To build and run\non an M1 or newer, build Io for x86_64 by adding\n`-DCMAKE_OSX_ARCHITECTURES=\"x86_64\"` to your CMake invocation.\n\n### Windows Build Instructions\n\nYou need CMake or CMake Cygwin (at least v2.8), depending on the building method\nyou choose.\n\nFor the `make install` command, if you are on Windows 7/Vista you will need to\nrun your command prompts as Administrator: right-click on the command prompt\nlauncher-\u003e\"Run as administrator\" or something similar.\n\nYou will also need to add `\u003cinstall_drive\u003e:\\\u003cinstall_directory\u003e\\bin` and\n`\u003cinstall_drive\u003e:\\\u003cinstall_directory\u003e\\lib` to your `PATH` environment variable.\n\n\n#### Building with MinGW-W64 (Recommended)\n\nWe use this method in our CI, so this should be considered an official/supported\nmethod of building on Windows.\n\n1. `cd` to your Io root folder\n2. We want to do an out-of-source build, so: `mkdir buildroot` and `cd buildroot`\n3. a) `cmake -G\"MinGW Makefiles\" ..`\n\n\tor\n\n\tb) `cmake -G\"MinGW Makefiles\" -DCMAKE_INSTALL_PREFIX=\u003cinstall_drive\u003e:/\u003cinstall_directory\u003e ..` (eg: `cmake -G\"MinGW Makefiles\" -DCMAKE_INSTALL_PREFIX=C:/Io ..`)\n4. `mingw32-make`\n5. `mingw32-make install` (if you use cmd.exe, you should run it as\n   Administrator)\n6. Install [Eerie](https://github.com/IoLanguage/eerie), the Io package manager\n   (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation\n   options): `_build\\binaries\\io_static setup.io`.\n\n\n#### Building with MinGW\n\nFor automatic MinGW install:\n\u003chttp://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer\u003e\n\nFor non-automatic MinGW install and detailed instructions refer to:\n\u003chttp://www.mingw.org/wiki/InstallationHOWTOforMinGW\u003e\n\n1. `cd` to your Io root folder\n2. We want to do an out-of-source build, so: `mkdir buildroot` and `cd buildroot`\n3. a) `cmake -G\"MSYS Makefiles\" ..`\n\n\tor\n\n\tb) `cmake -G\"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=\u003cinstall_drive\u003e:/\u003cinstall_directory\u003e ..` (eg: `cmake -G\"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=C:/Io ..`)\n4. `make`\n5. `make install`\n6. Install [Eerie](https://github.com/IoLanguage/eerie), the Io package manager\n   (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation\n   options): `./_build/binaries/io_static setup.io`.\n   \n   \n#### Building with MSVC\n\n1. Install Microsoft Visual C++ 2008 Express (should work with other versions).\n2. Install Microsoft Windows SDK 7.0 (or newer).\n3. Install CMake (v2.8 at least)\n4. Run \"Visual Studio 2008 Command Prompt\" from the \"Microsoft Visual Studio\n   2008\" start menu.\n5. `cd` to `\u003cinstall_drive\u003e:\\Microsoft SDKs\\Windows\\v7.0\\Setup` then run:\n   `WindowsSdkVer.exe -version:v7.0`\n6. Close the command prompt window and run step 4 again\n7. Ensure CMake bin path is in the `PATH` environment variable (eg: `echo\n   %PATH%` and see that the folder is there) if not you will have to add it to\n   your `PATH`.\n8. `cd` to your Io root folder\n9. We want to do an out-of-source build, so: `mkdir buildroot` and `cd buildroot`\n10. a) `cmake ..`\n\n\tor\n\n\tb) `cmake -DCMAKE_INSTALL_PREFIX=\u003cinstall_drive\u003e:\\\u003cinstall_directory\u003e ..` (eg: `cmake -DCMAKE_INSTALL_PREFIX=C:\\Io ..`)\n11. `nmake`\n12. `nmake install`\n13. Install [Eerie](https://github.com/IoLanguage/eerie), the Io package manager\n    (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation\n    options): `./_build/binaries/io_static setup.io`.\n\n\n#### Building with Cygwin\n\nInstall Cygwin from: \u003chttp://www.cygwin.com/\u003e\n\n1. `cd` to your Io root folder\n2. We want to do an out-of-source build, so: `mkdir buildroot` and `cd buildroot`\n3. a) `cmake ..`\n\n\tor\n\n    b) `cmake -DCMAKE_INSTALL_PREFIX=\u003cinstall_drive\u003e:/\u003cinstall_directory\u003e ..`\n    (eg: `cmake -DCMAKE_INSTALL_PREFIX=C:/Io ..`)\n4. `make`\n5. `make install`\n6. Install [Eerie](https://github.com/IoLanguage/eerie), the Io package manager\n    (see Eerie [repo](https://github.com/IoLanguage/eerie) for installation\n    options): `./_build/binaries/io_static setup.io`.\n\nNote: If you also have CMake 2.8 for Windows installed (apart from CMake for\nCygwin) check your `PATH` environment variable so you won't be running CMake for\nWindows instead of Cygwin version.\n\n\nRunning Tests\n===\n\nYou should be inside your out-of-source build dir. The vm tests can be run with\nthe command:\n\n\tio ../libs/iovm/tests/correctness/run.io\n\nInstalling Addons\n===\n\nMany of the common features provided by the Io language aren't prepackaged in\nthe Io core. Instead, these features are contained in addons that get loaded\nwhen launching the Io VM. In the past, these addons were automatically installed\nby the build process, but now they must be installed through\n[Eerie](https://github.com/IoLanguage/eerie), the Io package manager.\n\nMost of these addons are housed under the IoLanguage group on GitHub:\nhttps://github.com/IoLanguage.\n\nTo install an addon, ensure both Io and Eerie are installed correctly, then run:\n\n```\neerie install \u003clink to the git repository\u003e\n```\n\nFor example, to build and install the `Range` addon, run the command:\n\n```\neerie install https://github.com/IoLanguage/Range.git\n```\n\nTo ensure that an addon installed correctly, pull up an Io interpreter and type\nthe name of the object provided by the addon. It should load dynamically and\nautomatically into the interpreter session, populating a slot in `Lobby Protos\nAddons`.\n","funding_links":[],"categories":["C","Uncategorized","Other"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIoLanguage%2Fio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIoLanguage%2Fio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIoLanguage%2Fio/lists"}