This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function noSet(obj) { | |
return new Proxy(obj, { | |
set: function() { | |
throw new TypeError("No set"); | |
} | |
}); | |
}; | |
function readOnlyArrayView(arr) { | |
return new Proxy(noSet(arr), { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let myWorker = { | |
// | |
// Worker initialization | |
// | |
get worker() { | |
if (this._worker) { | |
return this._worker; | |
} | |
// Otherwise, initialize PromiseWorker. | |
// TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server = one_page_server("Hello", -> <>Hello, web!</>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server = Server.simple_dispatch(_ -> | |
html("Hello", <>Hello, web!</>) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* {1 Database and database interaction} | |
*/ | |
/** | |
* Contents of the wiki. | |
* | |
* Pages which do not exist have content "This page is empty". | |
* Note: By definition, pages stored in the database are always well-formed. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add a path called [/storage] to the schema of our graph database. | |
* | |
* This path is is a dictionary indexed by [string]s of values | |
* of type [option(string)], i.e. values that may either be | |
* a string or omitted. To find out whether the value is present, | |
* one should use pattern-matching - case [{some: ...}] if the | |
* value is present, [{none}] if the value is omitted. | |
* | |
* Note: db is a keyword. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*{1 Network infrastructure} | |
*/ | |
/** | |
*The type of messages sent by a client to the chatroom | |
*/ | |
type message: | |
author as string //Arbitrary, untrusted, name | |
text as string //Content entered by the user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add a path called [/storage] to the schema of our graph database. | |
* | |
* This path is is a dictionary indexed by [string]s of values | |
* of type [option(string)], i.e. values that may either be | |
* a string or omitted. To find out whether the value is present, | |
* one should use pattern-matching - case [{some = ...}] if the | |
* value is present, [{none}] if the value is omitted. | |
* | |
* Note: db is a keyword. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* {1 Network infrastructure} | |
*/ | |
/** | |
* The type of messages sent by a client to the chatroom | |
*/ | |
type message = {author: string /**Arbitrary, untrusted, name*/ | |
,text: string} /**Content entered by the user*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# {1 Database and database interaction} | |
# | |
## | |
# Contents of the wiki. | |
# | |
# Pages which do not exist have content "This page is empty". | |
# Note: By definition, pages stored in the database are always well-formed. | |
# |
OlderNewer