-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathAmpleforth.ns
32 lines (28 loc) · 1.6 KB
/
Ampleforth.ns
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Newspeak3
'Root'
class Ampleforth packageUsing: manifest = (
(* Ampleforth is designed to support live literate programming. It supports embedding Newspeak code inside the text of a normal web page. This class relates to an older version of Ampleforth. It has different properties than the latest one. It relies on AmpleforthEmbedder to process a web page once and for all, inserting Hopscotch widgets from a limited set into the page at startup.
It does not support live editing of the HTML, and any extension of the set of widgets would require changing AmpleforthEmbedder.
The pages so created are not self contained. They are effectively read-only, which can be an advantage in some cases. It also relies on a arguably simpler conventions in the HTML.
Ampleforth documents can be produced by editing HTML in any tool. Use this application to run such pages stand alone. One can also interactively edit and run such documents in the Newspeak IDE (see the HopscotchWebIDE module).
Ampleforth is a character in 1984 whose role is to convert works of Oldspeak literature into Newspeak. He's a literary editor conversant in Newspeak.
Copyright 2014-2017 Google Inc.
Copyright 2022-2024 Gilad Bracha.
*)
|
private AmpleforthEmbedder = manifest AmpleforthEmbedder.
private HopscotchIDE = manifest HopscotchWebIDE packageUsing: manifest.
|
) (
public main: platform args: args = (
|
namespace embedder ide
|
ide:: HopscotchIDE ideUsingPlatform: platform.
namespace:: ide namespacing Root.
namespace at: #Ampleforth put: self class.
embedder:: AmpleforthEmbedder usingPlatform: platform ide: ide.
embedder start.
)
) : (
)