-
-
Notifications
You must be signed in to change notification settings - Fork 1
Fgh museum mode #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fgh museum mode #64
Changes from 167 commits
134662b
80bec28
6cf61ae
f02e6cc
b04276c
75b4baa
a186c79
0e4191d
47b4fbd
928b207
7cd2126
3d49391
9d36aa2
63c5b61
991999b
9115104
cca61e6
5e398b8
6b78411
6c5faf3
ae08c15
040eb4d
7839dac
43bee9e
8d0b6e6
826768a
43d785e
d9d797b
48fb93b
67ee9ae
72b293c
958349c
3906ca4
2299b53
73bd1b9
cedf381
08f5e50
e7b0bb6
b1ef52c
fb52628
4c13770
d891c83
2557e31
4402053
8ded780
24f502b
b9a2f03
d9bade1
83c2c37
a93e0f5
44f024a
539bf6d
c3b4f40
f83ab09
a113f19
42e2d5a
d2f3ea3
9cb9517
2c7fef8
4d5de1b
fb0eec9
a4055bf
d0cc9e7
73e4c8e
dee8a0e
9f8c602
fa8d462
38194a6
a4ec07d
3971f5f
f11a42a
3d5a247
c3c2f96
d9e4744
8627d45
93ffbf7
77bc972
e3d033f
3141b01
48a57a7
ff027c6
f8e05ce
47f3290
6721ed5
568c7c0
4371d1b
795ed2d
bd3e86d
871d12b
85b1497
169157d
1c801ae
aff0e04
f9a0fc8
3eacb70
4b71c88
ebfa996
1a6c8cd
f5458c7
eebc768
c15a7f9
d2b9d61
e36ea7c
44dd9a1
bb95e0b
b33fdd4
d0842b9
d5e1ae0
f274beb
e14b0e9
a86ae00
299cf51
ddd3fcb
6ebe691
2021f2f
4c09969
9254cc9
4bfa2a0
3d476b9
ad4b661
0fbfbc0
4b00ac4
eac6ead
21b0381
7dd8415
dc7aa07
4e4df7b
1fd4253
9aa52f3
4e0c4fc
0cce787
d305152
6a6a8f9
1f3c575
b5a9daf
06b4717
4cbfd0b
569f939
3d03e78
041963b
716f6e3
71c80cd
3cbc376
683b661
e1ddc31
9552f6f
fb54578
c7b1f10
ec7cba2
6e31ec2
917fa95
db969ff
e428528
300a720
43ca818
49886cf
f69e7aa
013ba8b
6365187
bc47f1a
e84db58
d0c873d
3980661
21aa5bc
2f0f711
bf6beb6
5b9d524
244cadb
063c292
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
|
|
||
| # Online.Interlisp.Org: Demo mode (aka Museum Mode) | ||
| ## Overview | ||
|
|
||
| When accessing online.interlisp.org (OIO) using Demo Mode, Online Medley will LOAD a Lisp file called a *start script*. The start script is specified by a query parameter in the URL through which OIO was accessed. Before the Online Medley run starts, the start script file is downloaded using ```wget```into a known file in the Medley file system. It is then LOADed as the last step in the ONLINE-INIT initialization. The intent is that upon LOAD the start script will run a demo by defining and/or LOADing additional Lisp code and then starting up that demo, e.g., via a P file package command. | ||
|
|
||
| An addition aspect of Demo Mode is that login processing can (optionally) be skipped, the user automatically logged in as guest, and the Online Medley session started with no user interaction required. Alternatively, the login process can remain but the standard "Run Medley" page will be skipped and the user will go directly from login to the running Medley without having to set all the run parameters in the Run Medley page. Automatic guest login is sufficient for most demos. But requiring login allows demos to save files and context between runs of Online Medley, which is not possible with guest login. | ||
|
|
||
| ## Demo mode URLs | ||
| To access Demo mode, use the following URLs: | ||
|
|
||
| ```https://online.interlisp.og/demo?start=\<START-SCRIPT>``` for automatic guest login. | ||
|
|
||
| ```https://online.interlisp.og/demo/login?start=\<START-SCRIPT>``` to require logins | ||
|
|
||
| ```<START-SCRIPT>``` is a URL pointing to a start-script lisp file that can be wget'd by the OIO server. **This URL must be encoded using the equivalent of Javascript's *encodeURIComponent*.** The easiest way to do this is via one of the many websites that offer this service such as https://meyerweb.com/eric/tools/dencoder/. | ||
|
|
||
| In addition to the *start* query parameter, Demo mode supports the *notecards=1* and *rooms=1* query parameters. If these query parameters are included in the Demo mode URL, then NoteCards and/or Rooms will be automatically started when Online Medley runs, in addition to the start-script. | ||
|
|
||
| Any of the query parameters (start, notecards, rooms) can be left off, with the expected change of function. For example, https://online.interlisp.org/demo?notecards=1 will automatically login as guest and start notecards - but not run any start script. | ||
|
|
||
| Example Demo mode URL: https://online.interlisp.org/demo?start=https%3A%2F%2Fgithub.com%2FInterlisp%2Fonline%2Fraw%2Frefs%2Fheads%2Ffgh_museum-mode%2Fstart-scripts%2FSTART-INSPHEX.LCOM¬ecards=1. This URL will automatically login as guest, wget and LOAD the file START-INSPHEX.LCOM from the Interlisp/Online repo on github and start Notecards. | ||
|
|
||
| ## Start scripts | ||
|
|
||
| Any LOADable Lisp file (source or compiled, Interlisp or Medley CommonLisp) can serve as a start script. | ||
|
|
||
| Sample start scripts can be found in the Interlisp/Online Github repo in the start-scripts directory. | ||
|
|
||
| Most demos will require Lisp (or other) files that are not included in the standard Online Medley image. One very handy function to be used in start scripts for these demos is ```(ShellWget URL OUTFILE)```. This function will download (using wget) the file specified by URL and store it in the versioned Online Medley file system under the name OUTFILE. OUTFILE can then be LOADed by the start script. | ||
|
|
||
| Below is the start script for a demo of Pamoroso's INSPHEX utility The start script defines and then runs a function called START-INSPHEX. The START-INPHEX function in turn uses ShellWget to download the source code to INSPHEX from Github, compiles it, loads the compiled file and then uses ADD.PROCESS to run the main HEXDUMP function. There is some additional complication in the call to ADD.PROCESS to ensure that packages are handled correctly. But most existing Interlisp demos will not need this complexity since they don't use packages. | ||
|
||
|
|
||
| ``` | ||
| (DEFINE-FILE-INFO ^^PACKAGE "INTERLISP" ^^READTABLE "INTERLISP" ^^BASE 10) | ||
|
|
||
| (FILECREATED "16-Nov-2025 21:15:14" {DSK}<home>frank>il>START-INSPHEX.;1 1641) | ||
|
|
||
| (PRETTYCOMPRINT START-INSPHEXCOMS) | ||
|
|
||
| (RPAQQ START-INSPHEXCOMS ((FNS START-INSPHEX) | ||
| (P (START-INSPHEX)))) | ||
| (DEFINEQ | ||
|
|
||
| (START-INSPHEX | ||
| [LAMBDA NIL | ||
| (LET* ((INSPHEX.FILE (OUTFILEP "{CORE}INSPHEX")) | ||
| INSPHEX.DFASL) | ||
| (ShellWget "https://raw.githubusercontent.com/pamoroso/insphex/refs/heads/main/INSPHEX" | ||
| INSPHEX.FILE) | ||
| (SETQ INSPHEX.DFASL (CL:COMPILE-FILE INSPHEX.FILE)) | ||
| (LOAD INSPHEX.DFASL) | ||
| (ADD.PROCESS (LIST (CL:FIND-SYMBOL "HEXDUMP" "INSPHEX") | ||
| (KWOTE INSPHEX.DFASL) | ||
| '(CREATEW (CREATEREGION (FIX (TIMES 0.35 SCREENWIDTH)) | ||
| (FIX (TIMES 0.25 SCREENHEIGHT)) | ||
| (FIX (TIMES 0.5 SCREENWIDTH)) | ||
| (FIX (TIMES 0.5 SCREENHEIGHT]) | ||
| ) | ||
| (START-INSPHEX) | ||
| STOP | ||
|
|
||
| ``` | ||
|
|
||
| ## Start scripts outside of Demo mode | ||
|
|
||
| Start scripts can also be used outside of Demo mode. In the normal OIO workflow, the user will be taken to the "Run Medley" page. On the Run Medley page, if you enable *Show advanced options* there will be a field into which you can enter the URL for a start-script (in either original or URI encoded forms). When Online Medley starts up, the specified start script will be wget'd and LOADed as in Demo mode. | ||
|
|
||
| Additionally, if a ```start=<encoded start-script URL>``` query parameter is included in the URL used to access OIO (outside of Demo mode), then the specified URL (decoded) will be prepopulated into the Advanced Options/Start URL field on the Run Medley page. | ||
|
|
||
| ## Synonyms for *https::online.interlisp.org/demo* | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the double colon
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pamoroso No the double colons are a typo. Fixed. |
||
|
|
||
| For legacy reasons, ```https:://online.interlisp.org/demo/guest``` and ```https:://online.interlisp.org/guest``` are synonyms for ```https::online.interlisp.org/demo```. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) | ||
|
|
||
| (FILECREATED "11-Nov-2025 23:54:22" {DSK}<home>frank>il>online>start-scripts>START-INSPHEX.;18 2203 | ||
|
|
||
| :EDIT-BY "FGH" | ||
|
|
||
| :CHANGES-TO (FNS START-INSPHEX) | ||
| (FUNCTIONS TmpShellWget) | ||
| (VARS START-INSPHEXCOMS) | ||
|
|
||
| :PREVIOUS-DATE "11-Nov-2025 23:50:23" {DSK}<home>frank>il>online>start-scripts>START-INSPHEX.;17 | ||
| ) | ||
|
|
||
|
|
||
| (PRETTYCOMPRINT START-INSPHEXCOMS) | ||
|
|
||
| (RPAQQ START-INSPHEXCOMS ((FUNCTIONS TmpShellWget) | ||
| (FNS START-INSPHEX) | ||
| (P (START-INSPHEX)))) | ||
|
|
||
| (CL:DEFUN TmpShellWget (URL OUTFILENAME) (* ; "Edited 11-Nov-2025 23:50 by FGH") | ||
| (LET* ((WGET (ShellWhich "wget")) | ||
| (OUTNAME (OUTFILEP OUTFILENAME)) | ||
| (TMPFILE (CONCAT "/tmp/wget" (CLOCK))) | ||
| (UNIXFILE (CONCAT "{UNIX}" TMPFILE)) | ||
| (CMD (CONCAT WGET " " URL " -O " TMPFILE))) | ||
| (if (NULL WGET) | ||
| then (ERROR "ShellWget - wget not available")) | ||
| (ShellCommand CMD) | ||
| (COPYFILE UNIXFILE OUTNAME) | ||
| (DELFILE UNIXFILE) | ||
| OUTNAME)) | ||
| (DEFINEQ | ||
|
|
||
| (START-INSPHEX | ||
| [LAMBDA NIL (* ; "Edited 11-Nov-2025 23:54 by FGH") | ||
| (* ; "Edited 7-Nov-2025 10:43 by FGH") | ||
| (LET* ((INSPHEX.FILE (OUTFILEP "{CORE}INSPHEX")) | ||
| INSPHEX.DFASL) | ||
| (TmpShellWget "https://raw.githubusercontent.com/pamoroso/insphex/refs/heads/main/INSPHEX" | ||
| INSPHEX.FILE) | ||
| (SETQ INSPHEX.DFASL (CL:COMPILE-FILE INSPHEX.FILE)) | ||
| (LOAD INSPHEX.DFASL) | ||
| (ADD.PROCESS (LIST (CL:FIND-SYMBOL "HEXDUMP" "INSPHEX") | ||
| (KWOTE INSPHEX.DFASL) | ||
| '(CREATEW (CREATEREGION (FIX (TIMES 0.35 SCREENWIDTH)) | ||
| (FIX (TIMES 0.25 SCREENHEIGHT)) | ||
| (FIX (TIMES 0.5 SCREENWIDTH)) | ||
| (FIX (TIMES 0.5 SCREENHEIGHT]) | ||
| ) | ||
|
|
||
| (START-INSPHEX) | ||
| (DECLARE%: DONTCOPY | ||
| (FILEMAP (NIL (623 1170 (TmpShellWget 623 . 1170)) (1171 2159 (START-INSPHEX 1181 . 2157))))) | ||
| STOP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| https://online.interlisp.org:8081/demo?start=https%3A%2F%2Fgithub.com%2FInterlisp%2Fonline%2Fraw%2Frefs%2Fheads%2Ffgh_museum-mode%2Fstart-scripts%2FSTART-INSPHEX.LCOM | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) | ||
|
|
||
| (FILECREATED " 1-Nov-2025 13:41:38" {DSK}<home>frank>il>medley>START-KINETIC.;2 1112 | ||
|
|
||
| :EDIT-BY "FGH" | ||
|
|
||
| :CHANGES-TO (FNS START-KINETIC) | ||
|
|
||
| :PREVIOUS-DATE " 1-Nov-2025 13:21:22" {DSK}<home>frank>il>medley>START-KINETIC.;1) | ||
|
|
||
|
|
||
| (PRETTYCOMPRINT START-KINETICCOMS) | ||
|
|
||
| (RPAQQ START-KINETICCOMS ((FILES KINETIC) | ||
| (FNS START-KINETIC) | ||
| (P (START-KINETIC)))) | ||
|
|
||
| (FILESLOAD KINETIC) | ||
| (DEFINEQ | ||
|
|
||
| (START-KINETIC | ||
| [LAMBDA NIL (* ; "Edited 1-Nov-2025 13:41 by FGH") | ||
| (* ; "Edited 1-Nov-2025 13:15 by FGH") | ||
| (ADD.PROCESS '(KINETIC (CREATEW (CREATEREGION (FIX (TIMES 0.25 SCREENWIDTH)) | ||
| (FIX (TIMES 0.25 SCREENHEIGHT)) | ||
| (FIX (TIMES 0.5 SCREENWIDTH)) | ||
| (FIX (TIMES 0.5 SCREENHEIGHT]) | ||
| ) | ||
|
|
||
| (START-KINETIC) | ||
| (DECLARE%: DONTCOPY | ||
| (FILEMAP (NIL (517 1068 (START-KINETIC 527 . 1066))))) | ||
| STOP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| https://online.interlisp.org:8081/demo?start=https%3A%2F%2Fgithub.com%2FInterlisp%2Fonline%2Fraw%2Frefs%2Fheads%2Ffgh_museum-mode%2Fstart-scripts%2FSTART-KINETIC |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| !#/bin/bash | ||
| wget -qO - https://www.mongodb.org/static/pgp/server-8.0.asc | sudo apt-key add - | ||
| echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list | ||
| sudo apt update | ||
| sudo apt install -y mongodb-org | ||
| sudo systemctl start mongod | ||
| sudo systemctl enable mongod | ||
| sudo systemctl status mongod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When visiting the example demo URL I get this error in Firefox and Chrome on Linux:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected. The URL in the documentation points to production OIO But demo-mode is not yet running on production, only on the development OIO. To test the URL at this point, you will need to manually add the :8081. This should go away once we deploy demo-mode PR to production.