From 901aecfc096ecc9820a889d46f4be49f1bd2be2b Mon Sep 17 00:00:00 2001 From: Dmitrii Kosarev Date: Mon, 14 Feb 2022 20:42:26 +0000 Subject: [PATCH 1/5] Update README.md: repair build badge (s/lama-devel/lama) --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 419075f59..651c7d81a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ -| Branch 1.10 | +| Lama, branch 1.10 | | ------------------------------- | | [![Lama 1.10][1]][2] | -[1]: https://github.com/JetBrains-Research/Lama-devel/workflows/Build/badge.svg?branch=1.10 -[2]: https://github.com/JetBrains-Research/Lama-devel/actions - +[1]: https://github.com/JetBrains-Research/Lama/workflows/Build/badge.svg?branch=1.10 +[2]: https://github.com/JetBrains-Research/Lama/actions # Lama From 07a131a31d23584edbeaae567c219595d94a4ba4 Mon Sep 17 00:00:00 2001 From: Dmitrii Kosarev Date: Mon, 14 Feb 2022 21:03:35 +0000 Subject: [PATCH 2/5] Readme: add badges for Lama-devel --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 651c7d81a..5056d5efb 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ -| Lama, branch 1.10 | -| ------------------------------- | -| [![Lama 1.10][1]][2] | +| Lama 1.10 | Lama-devel 1.10 | +| -------------------- | -------------------------- | +| [![Lama 1.10][1]][2] | [![Lama-devel 1.10][3]][4] | [1]: https://github.com/JetBrains-Research/Lama/workflows/Build/badge.svg?branch=1.10 [2]: https://github.com/JetBrains-Research/Lama/actions +[3]: https://github.com/JetBrains-Research/Lama-devel/workflows/Build/badge.svg?branch=1.10 +[4]: https://github.com/JetBrains-Research/Lama-devel/actions + # Lama From 137207a6d9d58adfc942c8ae1645cf6fe35e50e5 Mon Sep 17 00:00:00 2001 From: Kakadu Date: Tue, 15 Feb 2022 00:36:00 +0300 Subject: [PATCH 3/5] Use SVG LaMa icon instead of PNG Because PNG is not scalable and looks ugly. The actual SVG was generated using https://viereck.ch/latex-to-svg/ from the following LaTeX code: \lambda\kern -.1667em\lower -.5ex\hbox{$a$}\kern -.1000em\lower .2ex\hbox{$\mathcal M$}\kern -.1000em\lower -.5ex\hbox{$a$} Signed-off-by: Kakadu --- README.md | 18 ++++++++---------- lama.svg | 2 ++ 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 lama.svg diff --git a/README.md b/README.md index 5056d5efb..8eefe2c67 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,9 @@ [3]: https://github.com/JetBrains-Research/Lama-devel/workflows/Build/badge.svg?branch=1.10 [4]: https://github.com/JetBrains-Research/Lama-devel/actions - - # Lama -![lama](lama.png) is a programming language developed by JetBrains Research for educational purposes as an exemplary language to introduce +![lama](lama.svg) is a programming language developed by JetBrains Research for educational purposes as an exemplary language to introduce the domain of programming languages, compilers and tools. Its general characteristics are: * procedural with first-class functions - functions can be passed as arguments, placed in data structures, @@ -24,11 +22,11 @@ the domain of programming languages, compilers and tools. Its general characteri * with user-defined infix operators, including those defined in local scopes; * with automatic memory management (garbage collection). -The name ![lama](lama.png) is an acronym for *Lambda-Algol* since the language has borrowed the syntactic shape of +The name ![lama](lama.svg) is an acronym for *Lambda-Algol* since the language has borrowed the syntactic shape of operators from **Algol-68**; [**Haskell**](http://www.haskell.org) and [**OCaml**](http://ocaml.org) can be mentioned as other languages of inspiration. -The main purpose of ![lama](lama.png) is to present a repertoire of constructs with certain runtime behavior and +The main purpose of ![lama](lama.svg) is to present a repertoire of constructs with certain runtime behavior and relevant implementation techniques. The lack of a type system (a vital feature for a real-word language for software engineering) is an intensional decision which allows to show the unchained diversity of runtime behaviors, including those which a typical type system is called to prevent. On the other hand @@ -37,7 +35,7 @@ type systems) on. The current implementation contains a native code compiler for **x86-32**, written in **OCaml**, a runtime library with garbage-collection support, written in **C**, and a small -standard library, written in ![lama](lama.png) itself. The native code compiler uses **gcc** as a toolchain. +standard library, written in ![lama](lama.svg) itself. The native code compiler uses **gcc** as a toolchain. In addition, a source-level reference interpreter is implemented as well as a compiler to a small stack machine. The stack machine code can in turn be either interpreted on a stack machine interpreter, or @@ -54,11 +52,11 @@ Windows users should get Windows Subsystem for Linux a.k.a WSL (recommended) or * System-wide prerequisites: - `sudo apt install gcc-multilib` (in Debian-based GNU/Linux) - - On some versions you need to install additional package `lib32gcc-9-dev` in case of errors like - ``` + + On some versions you need to install additional package `lib32gcc-9-dev` in case of errors like + ``` /usr/bin/ld: cannot find -lgcc - /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a when searching for -lgcc + /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a when searching for -lgcc ``` - [opam](http://opam.ocaml.org) (>= 2.0.4) - [OCaml](http://ocaml.org) (>= 4.10.1). *Optional* because it can be easily installed through opam. Compiler variant with `flambda` switch is recommended diff --git a/lama.svg b/lama.svg new file mode 100644 index 000000000..7e0b42a5e --- /dev/null +++ b/lama.svg @@ -0,0 +1,2 @@ + + From a9e97ed957e50c6955bbf29d15e88cd99125ee84 Mon Sep 17 00:00:00 2001 From: Kakadu Date: Tue, 15 Feb 2022 01:25:10 +0300 Subject: [PATCH 4/5] README.md: Fix installation instructions Mention Lama instead of Lama-devel Signed-off-by: Kakadu --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8eefe2c67..c31353071 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,12 @@ Windows users should get Windows Subsystem for Linux a.k.a WSL (recommended) or * Install right [switch](https://opam.ocaml.org/doc/Manual.html#Switches) for OCaml compiler - `opam switch create lama ocaml-variants.4.10.1+fp+flambda` + `opam switch create lama ocaml-variants.4.10.1+flambda` In above command: - `opam switch create` is a subcommand to create a new switch - - `ocaml-variants.4.10.1+fp+flambda` is name of a standart template for the switch + - `ocaml-variants.4.10.1+flambda` is name of a standart template for the switch - `lama` is an alias for the switch being created; on success a directory `$(HOME)/.opam/lama` should be created * Update PATH variable for the fresh switch. (You can add these commands to your `~/.bashrc` for convenience but they should be added by `opam`) @@ -89,7 +89,9 @@ Windows users should get Windows Subsystem for Linux a.k.a WSL (recommended) or * Pin Lama package using `opam` and right URL (remember of "#" being a comment character in various shells) - `opam pin add Lama https://github.com/JetBrains-Research/Lama-devel.git\#1.10+ocaml4.10 --no-action` + `opam pin add Lama https://github.com/JetBrains-Research/Lama.git\#1.10 --no-action` + + The extra '#' sign is added because in various Shells it is a start of comment * Install *dep*endencies on system-wide *ext*ernal packages and `lama` itself after that. From 42018ebf0a6d7b91a690cdf965251e6b0c6c64d6 Mon Sep 17 00:00:00 2001 From: Kakadu Date: Tue, 15 Feb 2022 01:25:47 +0300 Subject: [PATCH 5/5] Tutorial: fix compilation with locally compiled LaMa Signed-off-by: Kakadu --- tutorial/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial/Makefile b/tutorial/Makefile index 9f879e826..b669dab81 100644 --- a/tutorial/Makefile +++ b/tutorial/Makefile @@ -3,8 +3,8 @@ ALL=$(sort $(FILES:.lama=)) EXTRA_TARGETS = ifeq ($(LAMAC),) - LAMAC := ../src/lamac - EXTRA_TARGETS += $(LAMAC) + LAMAC := LAMA=../runtime ../src/lamac -I ../stdlib + EXTRA_TARGETS += ../src/lamac endif all: $(EXTRA_TARGETS) $(ALL)