Skip to content
linear algebra types
OCaml TypeScript TeX Python GLSL JavaScript Other
Branch: master
Clone or download
Checkmate50 Merge pull request #59 from cucapra/develop
Develop: Added Line Numbers to Type Errors
Latest commit 3c85ab7 Jul 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci update circleci config.yml - only build on master Sep 5, 2018
bin Typescript compiler tests May 23, 2019
examples Fiddling with flat color caiman Jul 16, 2019
harness Fixed the ridiculous line ending problems (I think) Apr 25, 2019
parcel-plugin-lgl Actually compile code Jul 25, 2018
scripts Fixed the ridiculous line ending problems (I think) Apr 25, 2019
semantics Minor updates to gator draft Jul 7, 2019
src Line numbers added to type errors Jul 20, 2019
test-u Fixed the ridiculous line ending problems (I think) Apr 25, 2019
test
.gitignore Updated gitignore with temp files Jun 12, 2019
Makefile Change scripts and docs to use Parcel plugin Jul 25, 2018
README.md Merged with master Nov 9, 2018
dune-project Fix lots of permissions bits Jul 24, 2018
dune-workspace Fix lots of permissions bits Jul 24, 2018
linguine.opam Set up an installable package Jul 24, 2018
modd.conf Rename executable from ex to lingc Jul 24, 2018
package.json Updated test output format Jun 11, 2019
test.py Fixed issues with interpreter testing Jun 21, 2019

README.md

lingl

CircleCI

This is a language with a type system that enforces the correctness of linear algebra operations. There is a compiler, pretty printer, and interpreter.

OCaml 4.04 or higher required

Set Up

We need Dune and Menhir:

$ opam install dune
$ apt-get install m4  # On Debian, for example.
$ opam install menhir

Build by typing:

$ dune build bin/lingc.bc

Now you can use dune exec bin/lingc.bc to run the compiler. Or you can install a lingc executable:

$ dune build && dune install

Now lingc should be available on your path.

Run

To simulate a Linguine-compiled shader on your browser:

$ make run src='example_directory_name'

For example:

$ make run src=phong

You can run the compiler by passing the *.lgl source file as an argument to lingc. For example:

$ lingc example.lgl

To also print interpreter output, include an additional argument v

$ lingc example.lgl v

Tests

There are a bunch of tests under the test directory. Use the test.py script to run them.

Technical Details

The current version of the compiler generates GLSL 1.0 code, which is suitable for use in WebGL 1.0 (i.e., OpenGL 2.0) programs.

You can’t perform that action at this time.