You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I concluded dynamic typing isn't worth the effort when it comes to
prolonged maintenance of a web application. Initially I chose scheme
just in case someone else would want to contribute to the project, but
that hadn't happened. My chosen previous stack of kawa + my own library
wrappers feels unreliable. Kawa maintainer isn't interested in
communicating with potential volunteers regarding improving the
language. My own wrappers are one person effort. Although scala and
angular might be foreign to typical scheme programmer, they are very
reliable and future-proof choices.
And ultimately, I feel the programming part of this project isn't that
important, ultimately I decided it didn't matter much what the index
site is written in. Most of the value lies in definition data files in
types/*.scm. Writing a service / ui layer against it is relatively easy.
Additionally:
* remove "parameterized_by" (felt useless in practice)
* remove supertypes construct (felt gimmicky and ultimately unclear)
* remove "spec-values" (use description instead)
* remove "syntax-param-signature" (use value subsignature)
* change filtersets to return a list of code + name, not just code
@@ -49,10 +49,6 @@ Selecting multiple tags, will return results that contain *all* of the given tag
49
49
50
50
Selecting multiple parameter types will return results that match *all* of the given types.
51
51
52
-
Some types contain logical "parent" / more general types, eg. *number?* is a parent of *integer?*. When searching by parameter type, the procedures that take parent type will be matched. However, the results with more precise "child" type are weight more heavily and should appear at the start of the search.
53
-
54
-
Some types are defined as a union of other types; for example *list?* is a union of *pair?* and *null?*. If loose parameter filtering is enabled under settings, the composing parts will be treated as parent of union type; ie searching for *list?* you'd be also presented with procedures applicable to *pair?*. On one hand this presents extra results you might be interested, on the other hand those results might not be applicable in general case.
55
-
56
52
Selecting multiple return types will return results that match *all* of the given types. As and in case filter by parameter type, when filtering by return type the type hierarchy is taken into consideration. Searching by a "parent" return type will also yield procedures returning more precise "child" types.
57
53
58
54
The text query is parsed by edismax parser (read more about it https://solr.apache.org/guide/6_6/the-dismax-query-parser.html#the-dismax-query-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.
@@ -62,63 +58,34 @@ The text query is parsed by edismax parser (read more about it https://solr.apac
62
58
63
59
=== Download
64
60
65
-
Prebuilt versions are available at https://github.com/arvyy/r7rs-index-site/releases
61
+
Select prebuilt versions are available at https://github.com/arvyy/r7rs-index-site/releases
66
62
67
63
Docker image (always corresponding to latest deployed version) may be pulled from `arvyy/scheme-index:master`.
Make sure kawa-web-collection submodule is initialized
168
-
169
-
Run with
170
-
171
-
```
172
-
docker-compose -f docker/docker-compose.dev.yml up app sass nginx
173
-
```
174
-
175
-
Execute unit tests using
176
-
177
-
```
178
-
docker-compose -f docker/docker-compose.dev.yml up test
179
-
```
180
-
181
105
== Configuration
182
106
183
107
=== configuration.scm
@@ -212,33 +136,13 @@ The following is exhaustive list of valid properties
212
136
| Which port to use. Relevant only if enable-web is `#t`
213
137
| 8080
214
138
215
-
| cache-templates
216
-
| Whether templates should be cached (ie compiled once and remembered). Use `#f` in development, so that you don't need to restart the app to see changes
217
-
| #t
218
-
219
-
| serve-static
220
-
| Whether application should serve static resources from ./static folder. Use `#f` if you have some other web server (eg nginx in front) serving the content.
221
-
| #t
222
-
223
139
| spec-index
224
140
| Index of definitions to load (see Identifiers definitions section)
225
141
| "./types/index.scm"
226
142
227
143
| filterset-index
228
144
| Index of filtersets to load (see Filterset definitions section)
229
145
| "filters/index.scm"
230
-
231
-
| sqlite-data
232
-
| File to use for sqlite data
233
-
| "sqlitedb"
234
-
235
-
| enable-user-settings
236
-
| Allow user to save certain settings in cookies and show settings page
237
-
| #t
238
-
239
-
| downloads
240
-
| Location of downloads config file, listing available CLI app downloads. The file should be a list, where each item is an alist with symbol keys name, checksum, and url and string values. It's not an error if file doesn't exist.
241
-
| "config/downloads.scm"
242
146
|===
243
147
244
148
=== Identifiers definitions
@@ -325,16 +229,6 @@ one of as described in `signature` section, as well as additionally:
325
229
326
230
* `(vector <element>)` - describes an list datastrucutre, where `<element>` has same format as function parameter definition;
327
231
328
-
| syntax-param-signatures
329
-
| Applicable only to syntax type. The value is a list, where each element is itself a 2 element list. First element is a symbol, matching one of the symbols in the signature.
330
-
Second argument is parameter type definition, as described under functions. This allows annotating syntax when it expects to receive values of certain types for specific places in the pattern.
331
-
332
-
| parameterized-by
333
-
| List of strings, denoting parameters created by `make-parameter` that influence behavior of this entry
334
-
335
-
| spec-values
336
-
| Sometimes procedures have very limited input set for specific parameter (eg. using symbols as a union). Sometimes procedures handle values with specific logic when it detects specific format in it (eg. printf format specifier). In both cases it's sensible to list these special handlings, and this is what this field is for. The value of spec-values is an alist, where car corresponds to parameter name, and cdr is a list. Each element in said list is also a list - where first element corresponds to specific value (written as a string), and cadr corresponds to the value's description (also a string).
337
-
338
232
|===
339
233
340
234
=== Filterset definitions
@@ -366,21 +260,26 @@ Consult logback documentation for details.
366
260
367
261
== REST API
368
262
369
-
All of the following endpoints accept `wt` query parameter.
370
-
If the parameter's value is `sexpr`, the results are returned as if with `write`, using scheme-json convention
371
-
as defined in srfi 180. Otherwise, results are returned as json.
372
263
373
264
=== `/rest/filterset`
374
265
375
-
List of filtersets as strings. For all endpoints below, `{filterset name}` must correspond to one of the values returned here.
266
+
List of filtersets as strings. For all endpoints below, `{filterset name}` must correspond to one of the code here.
Dynamic parameters (ie., ones created with `make-parameter`) that affect procedures in the index.
461
-
462
-
JSON schema
463
-
[source,json]
464
-
----
465
-
{
466
-
"type": "array",
467
-
"items": {
468
-
"type": "string"
469
-
}
470
-
}
471
-
----
472
-
473
-
'''
474
-
475
357
=== `/rest/filterset/{filterset name}/search`
476
358
477
359
Returns found identifiers and faceting meta data.
@@ -498,15 +380,9 @@ Query parameters
498
380
| param
499
381
| param type filter. Possible values returned in `/rest/params`. The parameter can appear multiple times, and the result will include procedures which contain all given parameter types.
500
382
501
-
| filter_loose
502
-
| whether enable loose filtering as described in <<Filtering logic>>
503
-
504
383
| return
505
384
| return type filter. Possible values returned in `/rest/returns`. The parameter can appear multiple times, and the result will include procedures which contain all given return types.
506
385
507
-
| parameterized
508
-
| return parameterization filter. Possible values returned in `/rest/parameterized`. The parameter can appear multiple times, and the result will include procedures which are parameterized by all values.
509
-
510
386
| facet
511
387
| whether to return facet information of the query. Defaults to "true"
0 commit comments