Giter Club home page Giter Club logo

IronScheme

IronScheme aims to be a R6RS conforming Scheme-like implementation for all .NET implementations and platforms.

IronScheme implements over 99% of the R6RS specification and specified behavior.

IronScheme's macro system is based on psyntax, and thus behaves similar to other implementations using psyntax, ie Icarus, Vicare, Chez.

Build status

Building

  1. Open the IronSchemeCore.sln file in VS2019/2022
  2. Set startup project as IronScheme.Console

Alternatively, using the build.cmd batchfile in the IronScheme directory.

Note: the VS solution is for an already bootstrapped configuration. It can behave differently to the IronScheme.dll in the release package. This is mostly to just provide debugging and advanced usage of IronScheme.

Running on Windows

Run the IronScheme.Console.exe for the runtime and bitness you want to target.

V2 requires .NET3.5. V4 requires requires .NET4.0 or higher. Pretty much any running Windows should have one or both of those.

You can also run it with .NET Core, which has no persisted compilation functionality. It may load precompiled libraries, but if it fails to load, it will fallback to runtime compilation. A warning will be display in that case.

By default, it will run on the lowest supported .NET Core runtime installed.

To Run it on a specific .NET Core version, use the --fx-version option with dotnet.

Example to run on .NET 6.0 when you have multiple framework versions installed:

dotnet --fx-version 6.0.0 IronScheme.ConsoleCore.dll <args...>

or

IronScheme.ConsoleCore.exe --fx-version 6.0.0 <args...>

To run on the latest installed .NET Core version:

IronScheme.ConsoleCore.exe --roll-forward LatestMajor <args...>

Running on Linux/MacOS

The preferred way to run on non-Windows OS is to use .NET Core. You can also run IronScheme on Mono, but your mileage may vary.

# get .NET Core if you dont have it already
wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
dotnet-install.sh --channel Current --runtime dotnet # v2.1+
export -p PATH="$HOME/.dotnet:$PATH"
# Download 
wget https://github.com/IronScheme/IronScheme/releases/download/<latest release>.zip
unzip <latest release>.zip
cd IronScheme
alias ironscheme="dotnet IronScheme.ConsoleCore.dll"
# if you prefer Mono
# alias ironscheme="mono IronScheme.Console-v4.exe"

ironscheme

Library usage

Reference IronScheme.dll from your project.

using IronScheme;

class Program
{
    static void Main(string[] args)
    {
        "(display 'hello-world)".Eval();
    }
} 

Or with C# 9 and later as:

using IronScheme;

"(display 'hello-world)".Eval();

Running tests

To run the R6RS test suite, call the (ironscheme-test) procedure. There are a few known failure cases (currently 3 for .NET desktop). This can be run from the release package as well to confirm IronScheme runs correctly on a new platform or framework.

After building, you can use NUnit to run IronScheme.Tests.dll in the IronScheme.Console bin folder.

There is also a batch file in the IronScheme directory called test.cmd. You can pass the /verbose to the batch file to see complete output in case of failures.

Note

Make sure that peverify is in your PATH. The test fixtures are designed to execute in a specfic order. The tests will not take less than 6 minutes to complete.

Nuget feed

On Nuget.org and CI-builds on https://ci.appveyor.com/nuget/ironscheme

Issues/PR

Please @leppie in your issues/PR's, else I will probably not know about it. I do not actively monitor Github. If I still dont answer, nag me on Twitter, also @leppie.

ironscheme's Projects

gplex icon gplex

GPLEX is a scanner generator which produces lexical scanners written in C# V2 or higher. The input language is similar to the original LEX specification language, but allows full 21-bit Unicode scanners to be specified.

pfds icon pfds

functional data structures for scheme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.