Skip to content

Commit ed77a03

Browse files
authored
Merge pull request #347 from yamacir-kit/environment
Environment
2 parents 2f59b25 + 0c45593 commit ed77a03

36 files changed

+3097
-2732
lines changed

.github/workflows/build.yaml

+2-6
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ jobs:
1919
- uses: actions/checkout@v2
2020
- run: ./script/setup.sh --all
2121
- run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
22-
- run: cmake --build build --parallel $(nproc)
23-
- run: cmake --build build --parallel $(nproc) --target test -- ARGS=-j"$(nproc)"
24-
- run: cmake --build build --parallel $(nproc) --target package
25-
- run: sudo apt install --yes ./build/meevax_$(cat VERSION)_amd64.deb
22+
- run: cmake --build build --target safe-install.deb
2623
- run: cmake -B example/build -S example -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
27-
- run: cmake --build example/build --parallel $(nproc)
28-
- run: cmake --build example/build --parallel $(nproc) --target test -- ARGS=-j"$(nproc)"
24+
- run: cmake --build example/build --target demo

.github/workflows/release.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
- run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
1212
- run: ./script/setup.sh --required
1313
- run: cmake -B build -DCMAKE_BUILD_TYPE=Release
14-
- run: cmake --build build
1514
- run: cmake --build build --target package
1615
- uses: actions/create-release@v1
1716
id: create-release

CMakeLists.txt

+13-5
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ add_library(kernel SHARED "")
8484

8585
add_library(${PROJECT_NAME}::kernel ALIAS kernel)
8686

87-
file(GLOB_RECURSE ${PROJECT_NAME}_KERNEL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*/*.cpp)
87+
file(GLOB_RECURSE ${PROJECT_NAME}_KERNEL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*/*.cpp
88+
${CMAKE_CURRENT_SOURCE_DIR}/src/standard.cpp)
8889

8990
target_sources(kernel PRIVATE ${${PROJECT_NAME}_BASIS}
9091
PRIVATE ${${PROJECT_NAME}_KERNEL_SOURCES})
@@ -193,10 +194,17 @@ foreach(FILEPATH IN LISTS ${PROJECT_NAME}_TEST_CXX)
193194
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/assert-${FILENAME})
194195
endforeach()
195196

196-
# ---- Target all+ -------------------------------------------------------------
197+
# ---- Additional Targets ------------------------------------------------------
197198

198199
execute_process(COMMAND nproc OUTPUT_VARIABLE NPROC)
199200

200-
add_custom_target(all+ COMMAND make all -j ${NPROC}
201-
COMMAND ${CMAKE_CTEST_COMMAND} -j ${NPROC}
202-
COMMAND ${CMAKE_CPACK_COMMAND})
201+
add_custom_target(install.deb
202+
COMMAND make -j ${NPROC}
203+
COMMAND ${CMAKE_CPACK_COMMAND}
204+
COMMAND sudo apt install ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_${PROJECT_VERSION}_amd64.deb)
205+
206+
add_custom_target(safe-install.deb
207+
COMMAND make -j ${NPROC}
208+
COMMAND ${CMAKE_CTEST_COMMAND} -j ${NPROC}
209+
COMMAND ${CMAKE_CPACK_COMMAND}
210+
COMMAND sudo apt install ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_${PROJECT_VERSION}_amd64.deb)

README.md

+97-73
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,45 @@
1-
<h1 align="center">
2-
<a href="https://github.com/yamacir-kit/meevax/">
3-
<img src="https://github.com/yamacir-kit/meevax/wiki/svg/meevax-logo.v8.png" alt="Meevax Lisp System"/>
4-
</a>
5-
</h1>
6-
7-
<h3 align="center">
1+
<p align="center">
2+
<img src="https://github.com/yamacir-kit/meevax/wiki/svg/meevax-logo.v8.png" alt="Meevax Lisp System"/>
3+
<br/>
84
<img src="https://github.com/yamacir-kit/meevax/wiki/svg/description.png" alt="A programmable programming lanugage."/>
9-
</h3>
10-
5+
</p>
6+
<hr color=#c1ab05/>
117
<p align="center">
128
<img src="https://github.com/yamacir-kit/meevax/actions/workflows/build.yaml/badge.svg"/>
139
<img src="https://github.com/yamacir-kit/meevax/actions/workflows/release.yaml/badge.svg"/>
1410
</p>
11+
<p align="center">
12+
<b><a href="#Overview" >Overview</a></b> &nbsp;|&nbsp;
13+
<b><a href="#Requirements">Requirements</a></b> &nbsp;|&nbsp;
14+
<b><a href="#Installation">Installation</a></b> &nbsp;|&nbsp;
15+
<b><a href="#Usage">Usage</a></b> &nbsp;|&nbsp;
16+
<b><a href="#License">License</a></b> &nbsp;|&nbsp;
17+
<b><a href="#References">References</a></b>
18+
</p>
1519

16-
Meevax is a programming language classified as Lisp-1.
17-
This language inherits the minimalism of Scheme, which is summarized in the following sentence:
20+
## Overview
1821

1922
> Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary.
20-
> <p align="right"> --
21-
> <a href="https://bitbucket.org/cowan/r7rs/raw/tip/rnrs/r7rs.pdf"> Revised<sup>7</sup> Report on the Algorithmic Language Scheme [1] </a>
22-
> </p>
23-
24-
Meevax provides
23+
> <div align="right">
24+
> Revised<sup>7</sup> Report on the Algorithmic Language Scheme [1]
25+
> </div>
2526
26-
* not "**ad-hoc informally-specified**",
27-
* not "**bug-ridden**",
28-
* ~~not "**slow**"~~
27+
Meevax is an implementation of Lisp-1 programming language, supporting subset of the [Scheme](http://www.scheme-reports.org/) (R7RS) and [SRFI](https://srfi.schemers.org/)s.
2928

30-
subset of **R7RS Scheme** implementation.
31-
32-
<br/>
33-
34-
35-
## Contents
36-
37-
0. [Overview](#Overview)
38-
1. [Requirements](#Requirements)
39-
2. [Installation](#Installation)
40-
3. [References](#References)
41-
4. [Resources](#Resources)
42-
43-
<br/>
44-
45-
46-
## Overview
29+
### Releases
4730

48-
There is no stable version.
31+
Latest release is [here](https://github.com/yamacir-kit/meevax/releases).
4932

50-
Development HEAD: 0.3.545.
33+
### Features
5134

52-
### Characteristic Features
53-
54-
- **Architecture** - TR-SECD virtual machine.
55-
- **Modern C++ compatible dynamic typing** - Meevax provides RTTI-based language runtime library.
35+
- Architecture - TR-SECD virtual machine.
36+
- Modern C++ compatible dynamic typing - Meevax provides RTTI-based language runtime library.
5637

5738
### Standards
5839

59-
An subset of R7RS-small.
40+
Subset of R7RS-small.
6041

61-
### SRFI
42+
### SRFIs
6243

6344
| Number | Name | Import from | Note |
6445
|------------------------------------------------------:|:---------------------------------------------------------|:------------|:-----------|
@@ -74,59 +55,102 @@ An subset of R7RS-small.
7455
| [78](https://srfi.schemers.org/srfi-78/srfi-78.html) | Lightweight testing | built-in | Except `check-ec`
7556
| [87](https://srfi.schemers.org/srfi-87/srfi-87.html) | => in case clauses | built-in | R7RS 4.2.1 |
7657

77-
<br/>
78-
79-
8058
## Requirements
8159

82-
### System
60+
### Software
8361

84-
- Ubuntu 18.04 or later
62+
- [GCC](https://gcc.gnu.org/) (>= 7.5.0) or [Clang](https://clang.llvm.org/) (>= 9.0.0)
63+
- [CMake](https://cmake.org/) (>= 3.10.2)
64+
- [GNU Make](http://savannah.gnu.org/projects/make)
65+
- [GNU Binutils](https://www.gnu.org/software/binutils/)
66+
- [GNU Multiple Precision Arithmetic Library (GMP)](https://gmplib.org/)
8567

86-
### Tools
68+
To install the above software, it is easy to use the following script.
8769

88-
- Compiler with C++17 support (GCC >= 7.5.0, Clang >= 6.0.0)
89-
- CMake (>= 3.10.2) <!-- Ubuntu 18.04 LTS default CMake version -->
90-
- GNU Make
91-
- GNU Binutils
92-
- [**GNU Multiple Precision Arithmetic Library** (GMP)](https://gmplib.org/)
70+
``` bash
71+
$ ./script/setup.sh --required
72+
```
9373

94-
<br/>
74+
## Installation
9575

76+
### Install
9677

97-
## Installation
78+
``` bash
79+
$ cmake -B build -DCMAKE_BUILD_TYPE=Release
80+
$ cd build
81+
$ make install.deb
82+
```
9883

99-
### Install from source
84+
### Uninstall
10085

10186
``` bash
102-
git clone https://github.com/yamacir-kit/meevax.git ~/.meevax && cd $_
103-
./script/setup.sh --all
104-
./script/install.sh
87+
$ sudo apt remove meevax
88+
```
89+
<!--
90+
or
91+
``` bash
92+
sudo rm -rf /usr/local/bin/meevax
93+
sudo rm -rf /usr/local/include/meevax
94+
sudo rm -rf /usr/local/lib/libmeevax*
95+
sudo rm -rf /usr/local/share/meevax
10596
```
97+
-->
10698

107-
<br/>
99+
### CMake targets
108100

101+
| Target Name | Description
102+
|:-------------------|:--
103+
| `all` (default) | Build shared-library `libmeevax.0.3.597.so` and executable `meevax`.
104+
| `test` | Test executable `meevax`.
105+
| `package` | Generate debian package `meevax_0.3.597_amd64.deb`.
106+
| `install` | Copy files into `/usr/local` __(1)__.
107+
| `install.deb` | `all` + `package` + `sudo apt install <meevax>.deb`
108+
| `safe-install.deb` | `all` + `test` + `package` + `sudo apt install <meevax>.deb`
109109

110-
## Liscence
110+
__(1)__ Meevax installed by `make install` cannot be uninstalled by the system's package manager (for example, `apt remove meevax`). You need to manually delete the following files to uninstall:
111111

112-
See [LICENSE](./LICENSE)
112+
- `/usr/local/bin/meevax`
113+
- `/usr/local/include/meevax`
114+
- `/usr/local/lib/libmeevax*`
115+
- `/usr/local/share/meevax`
113116

114-
| Name | License |
115-
|:--------------------|:-----------------------------------------|
116-
| Boost C++ Libraries | Boost Software License |
117-
| GNU MP | GNU Lesser General Public License (LGPL) |
117+
## Usage
118118

119-
<br/>
119+
```
120+
Meevax Lisp System, version 0.3.597
121+
122+
Usage: meevax [OPTION...] [FILE...]
123+
124+
Options:
125+
-b, --batch Suppress any system output.
126+
-d, --debug Display detailed informations for developers.
127+
-e, --evaluate=STRING Read and evaluate given STRING at configuration step.
128+
-h, --help Display this help text and exit.
129+
-i, --interactive Take over control of root syntactic-continuation.
130+
-l, --load=FILENAME Same as -e '(load FILENAME)'
131+
--prompt=STRING Same as -e '(set-prompt! STRING)'
132+
-t, --trace Display stacks of virtual machine for each steps.
133+
-v, --version Display version information and exit.
134+
--verbose Display detailed informations.
135+
-w, --write=OBJECT Same as -e '(write OBJECT)'
136+
```
120137

138+
| Example | Effects |
139+
|:-------------------------------------------|:--|
140+
| `$ meevax -i` | Start interactive session. You can exit the session by input `(exit)` or Ctrl+C or Ctrl+D.
141+
| `$ meevax foo.ss` | Evaluate a script `foo.ss`. |
142+
| `$ meevax -e '(+ 1 2 3)'` | Display `6`.
143+
| `$ meevax -e "(define home \"$HOME\")" -i` | Define value of shell-environment variable `$HOME` as string typed Scheme variable `home`, and then start interactive session on environment includes the variable `home`.
121144

122-
## References
145+
## License
123146

124-
- [1] A.shinn, J.Cowan, A. A. Greckler, editors, "<cite><a href="https://bitbucket.org/cowan/r7rs/raw/tip/rnrs/r7rs.pdf">Revised<sup>7</sup> Report on the Algorithmic Language Scheme</a></cite>", Technical report, 2013.
147+
See [LICENSE](./LICENSE).
125148

126-
<br/>
149+
## References
127150

151+
- [1] A.shinn, J.Cowan, A. A. Greckler, editors, "[Revised<sup>7</sup> Report on the Algorithmic Language Scheme](https://bitbucket.org/cowan/r7rs/raw/tip/rnrs/r7rs.pdf)", Technical report, 2013.
128152

129-
## Resources
153+
### Resources
130154

131155
* [TinyScheme](http://tinyscheme.sourceforge.net/)
132156
* [SECDR-Scheme](http://www.maroon.dti.ne.jp/nagar17/mulasame/)

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.545
1+
0.3.597

0 commit comments

Comments
 (0)