- Purely functional
- Different versions of packages can coexist
- Each package must have a UUID, so packages with conflicting names can coexist
- Build logic
- Each package's metadata and build logic is written in a central Rust source file,
package.rs
- Each package's metadata and build logic is written in a central Rust source file,
- Dependencies are declared in the package file and will be fetched and installed before
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
/* | |
IMPORTANT!!! DO NOT USE THIS. It works, but you'll probably get it wrong, | |
because it must be keyed with at least 128 bits of entropy, and where | |
do you get this entropy, huh? | |
- In a browser, you get it from window.crypto.getRandomValues(). | |
- In Node, you get it from crypto.randomBytes() | |
Now LOOK AT YOU! You already have secure ways to generate random bytes, |
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
<!doctype html> | |
<html> | |
<script> | |
var Crypto; | |
(function (Crypto) { | |
var SHA256 = (function () { | |
function SHA256() { | |
this.blockLength = 64; | |
this.digestLength = 32; |
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
The service dispatcher within the App Engine app needs to log accounting info | |
for the current request, e.g. `log.Infof("T:%s:queries:%d", user, n)`. This | |
data will later be parsed out and used for quota and billing purposes. | |
------------------------------------------------------------------------------- | |
In order to enable offline log processing, we need to implement a `/_logs` | |
handler on the App Engine app. This should validate against a shared secret | |
`key` and expose the [Log Query API] to callers. |
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
=================== | |
AMPIFY PROTOTYPE | |
=================== | |
LEGEND: | |
[x] - Prefined properties from outer scope | |
{name} [x] - Predefined item | |
------------------- | |
Hub management app |
At the heart of it, the site is very much like Twitter. You type your message, press enter, and boom! It appears in the stream of everyone who is following you.
Well, it's a lot better than Twitter because your messages actually get sent in real-time. No need to click or refresh the page, new messages simply appear like with chat/IM.
There's also a separate "To:" field like with email. Here you can state that the message is to a:
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
currencies: [GBP USD EUR NOK] | |
cache: [] | |
<input id: amount value:: 0 /> | |
<input id: from value:: USD /> | |
<input id: to value:: GBP /> | |
<div> | |
if $from/value not in $currencies or $to/value not in $currencies | |
<span class: error>"Sorry, unknown currency symbol"</span> | |
else | |
if [$from/value $to/value] not in cache |