Skip to content

Commit ad89c1b

Browse files
committed
rename r7rs -> scheme
1 parent 556ef64 commit ad89c1b

File tree

14 files changed

+121
-70
lines changed

14 files changed

+121
-70
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
git submodule update --init
2727
cd ..
2828
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
29-
docker build -t arvyy/r7rs-index:$CIRCLE_BRANCH -f docker/Dockerfile .
29+
docker build -t arvyy/scheme-index:$CIRCLE_BRANCH -f docker/Dockerfile .
3030
31-
- run: docker push arvyy/r7rs-index:$CIRCLE_BRANCH
31+
- run: docker push arvyy/scheme-index:$CIRCLE_BRANCH
3232

3333
deploy:
3434
machine: true

README.adoc

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
= R7RS index
1+
= Scheme index
22
:toc: left
33

4-
R7RS index is a tool for indexing and searching through procedures and syntax from R7RS-small and R7RS-large libraries.
5-
R7RS index can be used in 3 ways - as a site (https://r7rsindex.com), through REST API, or through stdio API
4+
Scheme index is a tool for indexing and searching through procedures and syntax from R7RS-small, R7RS-large, select SRFI libraries.
5+
The index may be used through a site (https://index.scheme.org), through REST API, or through stdio API.
66

77
== Userguide for site visitors
88

9-
R7RS index search consists of control pane on the left, and result list in the center.
9+
Scheme index search consists of control pane on the left, and result list in the center.
1010

1111
=== Control pane
1212

1313
In the control pane, optionally select values from the filter list, optionally enter search query in the text field, and press either enter or button with magnifying glass to display the results. If you have javascript enabled, typing in the search query field should give you auto suggestions for identifier names, although those suggestions are not filtered by current selection. If you have javascript enabled and have checked apropriate option in settings, you can use control + f to quickly focus to the query text field.
1414

1515
=== Result list
1616

17-
Each result item can be either a procedure, a macro, or a value. At the top it shows a library it is exported from. Note, that some identifiers are exported from multiple libraries. The library name can be pressed, which will result in starting new search using said library as a filter. On the right side top, associated list of tags with the result is shown. Like with library, tags are also clickable, and start a search using the clicked tag as a filter.
17+
Each result item is one of procedure, a macro, or a value. At the top it shows a library it is exported from. Note, that some identifiers are exported from multiple libraries. The library name can be clicked, which will result in starting new search using said library as a filter. On the right side top, associated list of tags with the result is shown. Like with library, tags are also clickable, and start a search using the clicked tag as a filter.
1818

19-
Procedure, procedure-like macros and value names are rendered in *red*. Procedures are distinguished by being surrounded with parenthesis, as if being called. Following the name until the "=>" sign are parameters. If parameter is just a name, it means it has an unspecified type. Otherwise, parameter may be a list of type and name. Types are represented as predicate procedures. After the "=>" sign is the return type. The return can be one of:
19+
Procedures and value names are rendered in *red*. Procedures are distinguished by being surrounded with parenthesis, as if being called. Following the name until the "=>" sign are parameters. If parameter is just a name, it means it has an unspecified type. Otherwise, parameter may be a list of type and name. Types are usually represented as predicate procedures (sometimes a type may be opaque or logical, and without a disjoint predicate function to distinguish it). It can also be a logical "or" of multiple types, separated by `/`. Due to its pervasiveness as a `NULL`, `#f` literal is also used as a type sometimes, usually as a part of the "or".
2020

21-
* predicate procedure name (just like parameter type);
21+
After the "=>" sign is the return type. The return type is same as parameter type, and additionally may contain:
2222

2323
* a "*" symbol (meaning it returns a value of unknown type);
2424

2525
* a word "undefined" (meaning it returns a value which shouldn't be used in portable code);
2626

2727
* a list with "values" word in car position (meaning it has a multivalue return);
2828

29-
* a list with "or" word in car position (meaning the return type is a union between given types).
30-
3129
Types expressed as predicates in *blue* are links. Pressing on a type in parameter position will search using that type as *return value* filter; pressing on a type in return value position will search using that type as *parameter* filter.
3230

33-
Scheme is a functional language and thus it'd be useful to specify taken / returned procedure values. Therefore, if one of parameters is *procedure?*, it's signature is defined below the main procedure's signature, using parameter's name in car position. Likewise same is done if return value is a procedure; but in that case word "return" is used as a name.
31+
If one of parameters is *procedure?*, it's signature is defined below the main procedure's signature, using parameter's name in car position. Likewise same is done if return value is a procedure; but in that case word "return" is used as a name.
3432

3533
Procedures can have more than one entry, even from same library. This occurs, if the procedures is has optional parameters and therefore can be called in multiple ways; or if the result type can be determined more precisely under more specific input parameters.
3634

3735
Macros are rendered in *green*. If macro is complex, some parts of it are grouped, and the syntax of those groups shown below the syntax of whole macro. Macro literals are also rendered in green. To make parenthesis more obvious, auxiliary parenthesis coloring is used, however this coloring doesn't signify any information.
3836

37+
Macros may also contain typing definition, signifying expected type during macro expansion or runtime. Unlike with procedures though, such definitions are shown in separate block as to not confuse which parenthesis are part of macro syntax, and which are used for type grouping.
38+
3939
=== Tags
4040

4141
Result items might have one or more of following tags
@@ -62,51 +62,64 @@ Selecting multiple return types will return results that match *all* of the give
6262
The text query is parsed by edismax parser, and is used to filter by name and parameter / subsyntax names. This means it supports and interprets common searching syntax, such as using "-" in front of the word to exclude results containing said word. This has its disadvantages; eg. if you tried to search for coercion functions and typed "->string" (without quotes) into the search input field, you wouldn't find anything interesting, because the leading minus was interpreted specially. Instead, you'd have to search using "exact phrase", by putting double quotes around the search.
6363

6464

65-
== Building and running
65+
== Obtaining and running index locally
66+
67+
=== Download
6668

67-
=== Natively
69+
Prebuilt versions are available at https://github.com/arvyy/r7rs-index-site/releases
6870

69-
You can build R7RS index by running `ant` from the root of the source directory. Note that the build process required following executables to be on path
71+
Docker image (corresponding to latest deployed version) may be pulled from `arvyy/scheme-index:master`.
72+
73+
=== Building native
74+
75+
Build processes requires executables on path:
7076

7177
* `ant` - Apache Ant build tool
7278

7379
* `mvn` - Apache maven project tool
7480

7581
* `asciidoctor` - Asciidoctor documentation compiler
7682

77-
After the build successfully completes, you should find everything R7RS index needs in `dist` directory.
83+
You can build scheme index by running `ant` from the root of the source directory.
84+
85+
After the build successfully completes, you should find everything scheme index needs in `dist` directory.
7886

79-
Alternatively, you may find release zip available for downloads at https://github.com/arvyy/r7rs-index-site/releases.
87+
=== Running native
8088

81-
Once you have the built version, you can run it using:
89+
Once you have obtained a built version, you can run it using:
8290

8391
```
84-
java -jar r7rs-index.jar
92+
java -jar scheme-index.jar
8593
```
8694

95+
Note that working directory is important; type files, configuration are resolved relative to the working dir, not relative to jar file.
96+
8797
See <<Configuration>> section for configuring the application behavior.
8898

89-
=== Using docker
99+
=== Building docker
90100

91-
If you prefer using docker, you can build a docker image using
101+
Build a docker image using
92102

93103
```
94-
docker build -t r7rs-index -f docker/Dockerfile .
104+
docker build -t scheme-index -f docker/Dockerfile .
95105
```
96106

97-
which can the be run with
107+
The built image has same structure as a native build, under path `/app` inside the image.
108+
109+
=== Running with docker
110+
111+
To run with docker, execute
98112

99113
```
100-
docker run -p 8080:8080 --init r7rs-index
114+
docker run -p 8080:8080 --init scheme-index
101115
```
102116

103-
The built image has same structure as a native build inside the `/app` path.
104-
105-
Alternatively, you can pull latest version deployted to the web from docker hub `arvyy/r7rs-index:master`.
117+
The application resides in `/app` location. Consult rest of the documentation for details, but in particular you might want to mount a volume
118+
to `/app/logs` to catch log files, or a volume file to `/app/config/configuration.scm` to overwrite index config.
106119

107120
=== Running for development
108121

109-
First, install dependencies under kawa-web-collection submodule
122+
First, install dependencies under kawa-web-collection submodule (make sure the git submodule is initialized / updated)
110123

111124
```
112125
cd kawa-web-collection
@@ -258,11 +271,11 @@ Second argument is parameter type definition, as described under functions. This
258271

259272
=== Logging
260273

261-
R7RS index uses logback for logging. By default (as defined in `src/main/resources/logback.xml`) it only does rolling file logging into `./logs` directory, and not into standard output.
274+
Scheme index uses logback for logging. By default (as defined in `src/main/resources/logback.xml`) it only does rolling file logging into `./logs` directory, and not into standard output.
262275
You can provide custom logging configuration by running
263276

264277
```
265-
java -Dlogback.configurationFile=/path/to/config.xml -jar r7rs-index.jar
278+
java -Dlogback.configurationFile=/path/to/config.xml -jar scheme-index.jar
266279
```
267280

268281
Consult logback documentation for details.
@@ -452,7 +465,7 @@ JSON schema
452465
"super_types": {
453466
"type": "array",
454467
"items": { "type": "string" }
455-
}
468+
},
456469
"parameterized_by": {
457470
"type": "array",
458471
"items": { "type": "string" }

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<fileset dir="templates"/>
5959
</copy>
6060
<copy file="config/configuration-dist.scm" tofile="dist/config/configuration.scm"/>
61-
<copy file="target/r7rs-index-0.0.1.jar" tofile="dist/r7rs-index.jar"/>
61+
<copy file="target/scheme-index.jar" tofile="dist/scheme-index.jar"/>
6262
<copy file="README.adoc" tofile="dist/README.adoc"/>
6363
<copy file="README.html" tofile="dist/README.html"/>
6464
<copy file="README.html" tofile="dist/static/README.html"/>

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ RUN ant
1313
FROM openjdk:11
1414
WORKDIR app
1515
COPY --from=0 /app/dist .
16-
CMD java -jar r7rs-index.jar
16+
CMD java -jar scheme-index.jar

docker/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ http {
4343
location /js {
4444
}
4545

46-
location /scmindex.png {
46+
location /favicon.ico {
4747
}
4848

4949
location /502.html {

pom.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>com.github.arvyy</groupId>
8-
<artifactId>r7rs-index</artifactId>
9-
<version>0.0.1</version>
8+
<artifactId>scheme-index</artifactId>
9+
<version>0.0.2</version>
1010

11-
<name>R7RS Index</name>
12-
<description>
13-
Index of scheme procedures
14-
</description>
11+
<name>Scheme Index</name>
1512

1613
<licenses>
1714
<license>
@@ -158,6 +155,7 @@
158155
<mainClass>main</mainClass>
159156
</transformer>
160157
</transformers>
158+
<finalName>scheme-index</finalName>
161159
</configuration>
162160
<executions>
163161
<execution>

static/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<head>
3-
<title>R7RS index | 404 error</title>
3+
<title>Scheme index | 404 error</title>
44
<link href="/css/lighttheme.css" rel="stylesheet">
55
<link href="/fonts/Roboto/style.css" rel="stylesheet">
66
<style>

static/500.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<head>
3-
<title>R7RS index | 500 error</title>
3+
<title>Scheme index | 500 error</title>
44
<link href="/css/lighttheme.css" rel="stylesheet">
55
<link href="/fonts/Roboto/style.css" rel="stylesheet">
66
<style>

static/502.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<head>
3-
<title>R7RS index | 502 error</title>
3+
<title>Scheme index | 502 error</title>
44
<link href="/css/lighttheme.css" rel="stylesheet">
55
<link href="/fonts/Roboto/style.css" rel="stylesheet">
66
<style>
@@ -28,8 +28,8 @@
2828
</style>
2929
</head>
3030
<body>
31-
<h1>R7RS index is being updated</h1>
32-
<p class="explanation">If you see this, the R7RS index service is being restarted, please try again in a couple of minutes.
31+
<h1>Scheme index is being updated</h1>
32+
<p class="explanation">If you see this, the Scheme index service is being restarted, please try again in a couple of minutes.
3333
If this error persists longer than that, please <a href="https://github.com/arvyy/r7rs-index-site/issues">open an issue</a>
3434
<p class="status-code">502 Bad Gateway
3535
</body>

static/css/scmindex.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ fieldset {
605605
color: var(--text-color-muted);
606606
}
607607

608-
609608
.examples-tip {
610609
color: var(--text-color-muted);
611610
}

0 commit comments

Comments
 (0)