Skip to content

Commit 6e7e2f9

Browse files
authored
Merge pull request #456 from yamacir-kit/release-candidate
Release candidate
2 parents c68cf4c + 04e0b2f commit 6e7e2f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+953
-1015
lines changed

CMakeLists.txt

+7-8
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
1717
set(CMAKE_VERBOSE_MAKEFILE OFF)
1818

1919
string(JOIN " " AGGRESSIVE_OPTIMIZATION_OPTIONS
20-
# "-fdata-sections"
21-
# "-ffunction-sections"
2220
# "-flto" # This optimization causes a SEGV when compiling with Clang 10.
2321
# "-fmerge-all-constants" # This optimization is very effective in reducing binary size, but non-standard to the C++ standard.
2422
# "-march=native" # This optimization causes "Illegal instruction" error (is Valgrind's bug) on CI.
@@ -49,9 +47,11 @@ else()
4947
set(${PROJECT_NAME}_BYTE_ORDER "little-endian")
5048
endif()
5149

52-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure/help.txt ${CMAKE_CURRENT_BINARY_DIR}/help.txt)
50+
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/configure/help.txt ${PROJECT_NAME}_HELP_UNCONFIGURED)
5351

54-
file(READ ${CMAKE_CURRENT_BINARY_DIR}/help.txt ${PROJECT_NAME}_HELP_TEXT)
52+
string(CONFIGURE ${${PROJECT_NAME}_HELP_UNCONFIGURED} ${PROJECT_NAME}_HELP)
53+
54+
string(TOLOWER ${CMAKE_SYSTEM_NAME} ${PROJECT_NAME}_SYSTEM_NAME)
5555

5656
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure/version.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/kernel/version.cpp)
5757
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure/README.md ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
@@ -132,15 +132,14 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
132132

133133
# ---- Target package ----------------------------------------------------------
134134

135+
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
136+
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tatsuya Yamasaki")
137+
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
135138
set(CPACK_GENERATOR DEB)
136139
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
137140
set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
138141
set(CPACK_THREADS 0)
139142

140-
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
141-
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tatsuya Yamasaki")
142-
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
143-
144143
include(CPack)
145144

146145
# ---- Target test -------------------------------------------------------------

README.md

+9-31
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,8 @@
11
<p align="center">
2-
<img src="https://github.com/yamacir-kit/meevax/wiki/svg/meevax-logo.v8.png" alt="Meevax Lisp System"/>
2+
<img src="https://github.com/yamacir-kit/meevax/wiki/svg/meevax-logo.v9.png" alt="Meevax Lisp System"/>
33
<br/>
44
<img src="https://github.com/yamacir-kit/meevax/wiki/svg/description.png" alt="A programmable programming lanugage."/>
55
</p>
6-
<hr/>
7-
<p align="center">
8-
<img src="https://github.com/yamacir-kit/meevax/actions/workflows/build.yaml/badge.svg"/>
9-
<img src="https://github.com/yamacir-kit/meevax/actions/workflows/release.yaml/badge.svg"/>
10-
</p>
11-
<p align="center">
12-
<b>
13-
<a href="#Overview">Overview</a>
14-
</b>
15-
&nbsp;|&nbsp;
16-
<b>
17-
<a href="#Installation">Installation</a>
18-
</b>
19-
&nbsp;|&nbsp;
20-
<b>
21-
<a href="#Usage">Usage</a>
22-
</b>
23-
&nbsp;|&nbsp;
24-
<b>
25-
<a href="#License">License</a>
26-
</b>
27-
&nbsp;|&nbsp;
28-
<b>
29-
<a href="#References">References</a>
30-
</b>
31-
</p>
326

337
## Overview
348

@@ -41,6 +15,9 @@ Meevax is an implementation of Lisp-1 programming language, supporting subset of
4115

4216
Latest release is [here](https://github.com/yamacir-kit/meevax/releases).
4317

18+
<img src="https://github.com/yamacir-kit/meevax/actions/workflows/build.yaml/badge.svg"/>
19+
<img src="https://github.com/yamacir-kit/meevax/actions/workflows/release.yaml/badge.svg"/>
20+
4421
### Features
4522

4623
- Architecture - SECD machine.
@@ -56,12 +33,13 @@ Subset of R7RS-small.
5633
|--------------------------------------------------------:|:-------------------------------------------------------|:------------------------------------|:------------------|
5734
| [ 0](https://srfi.schemers.org/srfi-0/srfi-0.html) | Feature-based conditional expansion construct | [`(srfi 0)`](./basis/srfi-0.ss) | R7RS 4.2.1 |
5835
| [ 1](https://srfi.schemers.org/srfi-1/srfi-1.html) | List Library | [`(srfi 1)`](./basis/srfi-1.ss) | |
59-
| [ 6](https://srfi.schemers.org/srfi-6/srfi-6.html) | Basic String Ports | [`(srfi 6)`](./basis/srfi-6.ss) | R7RS 6.13 |
6036
| [ 4](https://srfi.schemers.org/srfi-4/srfi-4.html) | Homogeneous numeric vector datatypes | [`(srfi 4)`](./basis/srfi-4.ss) | R7RS 6.9 |
37+
| [ 6](https://srfi.schemers.org/srfi-6/srfi-6.html) | Basic String Ports | [`(srfi 6)`](./basis/srfi-6.ss) | R7RS 6.13 |
6138
| [ 8](https://srfi.schemers.org/srfi-8/srfi-8.html) | receive: Binding to multiple values | [`(srfi 8)`](./basis/srfi-8.ss) | |
6239
| [ 9](https://srfi.schemers.org/srfi-9/srfi-9.html) | Defining Record Types | [`(srfi 9)`](./basis/srfi-9.ss) | R7RS 5.5 |
6340
| [ 10](https://srfi.schemers.org/srfi-10/srfi-10.html) | #, external form | | |
6441
| [ 11](https://srfi.schemers.org/srfi-11/srfi-11.html) | Syntax for receiving multiple values | [`(srfi 11)`](./basis/srfi-11.ss) | R7RS 4.2.2 |
42+
| [ 16](https://srfi.schemers.org/srfi-16/srfi-16.html) | Syntax for procedures of variable arity | [`(srfi 16)`](./basis/srfi-16.ss) | R7RS 4.2.9 |
6543
| [ 23](https://srfi.schemers.org/srfi-23/srfi-23.html) | Error reporting mechanism | [`(srfi 23)`](./basis/srfi-23.ss) | R7RS 6.11 |
6644
| [ 30](https://srfi.schemers.org/srfi-30/srfi-30.html) | Nested Multi-line Comments | | R7RS 2.2 |
6745
| [ 31](https://srfi.schemers.org/srfi-31/srfi-31.html) | A special form rec for recursive evaluation | [`(srfi 31)`](./basis/srfi-31.ss) | |
@@ -122,16 +100,16 @@ sudo rm -rf /usr/local/share/meevax
122100

123101
| Target Name | Description
124102
|--------------------|---
125-
| `all` (default) | Build shared-library `libmeevax.0.4.724.so` and executable `meevax`
103+
| `all` (default) | Build shared-library `libmeevax.0.4.752.so` and executable `meevax`
126104
| `test` | Test executable `meevax`
127-
| `package` | Generate debian package `meevax_0.4.724_amd64.deb`
105+
| `package` | Generate debian package `meevax_0.4.752_amd64.deb`
128106
| `install` | Copy files into `/usr/local`
129107
| `install.deb` | `all` + `package` + `sudo apt install <meevax>.deb`
130108

131109
## Usage
132110

133111
```
134-
Meevax Lisp 0.4.724
112+
Meevax Lisp 0.4.752
135113
136114
Usage:
137115
meevax [option...] [file...]

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.724
1+
0.4.752

basis/meevax.ss

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
(import (only (meevax comparator) eq? eqv?)
33
(only (meevax core) begin define if lambda quote set!)
44
(only (meevax list) null?)
5-
(only (meevax macro) identifier? syntactic-closure? make-syntactic-closure)
6-
(only (meevax pair) cons car cdr caar cdar))
5+
(only (meevax pair) cons car cdr caar cdar)
6+
(only (meevax syntactic-closure) identifier? syntactic-closure? make-syntactic-closure))
77

88
(export make-syntactic-closure
99
identifier?

basis/r4rs.ss

+12-10
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,24 @@
8484
(else (inexact (denominator (exact x))))))
8585

8686
(define (rationalize x e) ; from Chibi-Scheme lib/scheme/extras.scm (https://ml.cddddr.org/scheme/msg01498.html)
87-
(define (sr x y return)
87+
(define (simplest-rational x y return)
8888
(let ((fx (floor x))
8989
(fy (floor y)))
90-
(cond ((>= fx x) (return fx 1))
91-
((= fx fy) (sr (/ (- y fy))
92-
(/ (- x fx))
93-
(lambda (n d)
94-
(return (+ d (* fx n)) n))))
90+
(cond ((>= fx x)
91+
(return fx 1))
92+
((= fx fy)
93+
(simplest-rational (/ (- y fy))
94+
(/ (- x fx))
95+
(lambda (n d)
96+
(return (+ d (* fx n)) n))))
9597
(else (return (+ fx 1) 1)))))
9698
(let ((return (if (negative? x)
9799
(lambda (num den)
98100
(/ (- num) den))
99101
/))
100102
(x (abs x))
101103
(e (abs e)))
102-
(sr (- x e) (+ x e) return)))
104+
(simplest-rational (- x e) (+ x e) return)))
103105

104106
(define (make-rectangular x y)
105107
(+ x (* y (sqrt -1))))
@@ -159,7 +161,7 @@
159161
(thunk)
160162
(set! %current-output-port previous-output-port)))
161163

162-
(define (char-ready? . port)
163-
(%get-char-ready? (if (pair? port)
164-
(car port)
164+
(define (char-ready? . xs)
165+
(%get-char-ready? (if (pair? xs)
166+
(car xs)
165167
(current-input-port))))))

0 commit comments

Comments
 (0)