Git Product home page Git Product logo

lazyk-collection's Introduction

Lazy K Collection

Writing Lazy K interpreters in various languages

tested compiler / interpreter versions

language compiler / interpreter version
Common Lisp sbcl (Steel Bank Common Lisp) 2.11.1
C# Visual Studio 2022, .NET SDK 7.0 for linux
Go Go 1.21.3
OCaml OCaml native-compiler (ocamlopt) 4.14.1
Python Python 3.12.0, PyPy 7.3.13
Ruby Ruby 3.2.2
Scheme Gauche 0.9.12
TypeScript deno 1.38.0

build binaries

Run make at the root directory of this repository, then following files will be generated.

  • bin/cslazyk (C#)
  • bin/golazyk (Go)
  • bin/mllazyk (OCaml)
  • commonlisp/lazyk.fasl

run tests

unit test

$ make test-unit-(language-name)

You need external libraries or support program to run unit tests in some languages.

common test cases

$ make test-(language-name)

runs tests using test data in test directory.

usage of each implementations

Common Lisp

$ sbcl --script commonlisp/run-lazyk.lisp
usage: sbcl --script run-lazyk.lisp <command> [arg]

commands:
  run FILENAME  : run Lazy K program file
  make          : make lazyk.fasl
  test          : run tests for lazyk.lisp (requires quicklisp)

C#

compile with VisualStudio 2022

  1. Open csharp/lazyk-cs/lazyk-cs.sln
  2. Select "Publish" from the context menu of the "lazyk-cs" project.

compile with dotnet-sdk-7.0 on linux

Use Makefile in the root directory of this repository.

$ make csharp

makes csharp/publish/cslazyk and copies it to bin/cslazyk.

usage

$ bin/cslazyk -h
Usage: lazyk-cs.exe [options] [programfile]
Options:
  -t   text input mode (read CRLF as LF)
  -h   show this help
  If no program file is specified, the program is read from the standard input.

Go

compile

$ make go

makes go/golazyk and copies it to bin/golazyk

usage

$ bin/golazyk
Usage: golazyk [-t] srcfile.lazy
Options
   -t  : read CRLF as LF

OCaml

compile

$ make ocaml

makes ocaml/mllazyk and copies it ot bin/mllazyk

usage

$ bin/mllazyk
usage: mllazyk <source.lazy>

Python

$ python3 python/lazyk.py
Usage: python lazyk.py [-t] srcfile
Option
   -t : text mode (read crlf as lf)

Ruby

$ ruby ruby/lazyk.rb
Usage: ruby [-t] lazyk.rb prog.rb
Options
  -t : text mode (read crlf as lf)

Scheme (Gauche)

$ gosh scheme/lazyk.scm
usage: gosh scheme/lazyk.scm src.lazyk

TypeScript (Deno)

$ deno run --allow-read typescript/lazyk.ts
usage: deno run --allow-read lazyk.ts <source.lazy>

lazyk-collection's People

Contributors

youz avatar

Watchers

 avatar

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.