hello world capsicum ponylang/ponyc#292
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
# fast monte compiler (after fsc fast scala compiler) | |
traceln("fmontec...") | |
def [=> makeHTTPEndpoint] | _ := import("lib/http/server") | |
def [=> strToInt] | _ := import("lib/atoi") | |
def [=> kludgeListDir, => makeFileRead] | _ := import("fun/lafile") | |
def [=> start] | _ := import("fun/fmontec0") |
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
go... | |
jstarget.js:223 KLUDGE: guard??? Object | |
jstarget.js:223 KLUDGE: final (let) Object | |
jstarget.js:223 KLUDGE: final (let) Object | |
jstarget.js:223 KLUDGE: guard??? Object | |
jstarget.js:223 KLUDGE: final (let) Object | |
jstarget.js:223 KLUDGE: slot (guard) Object | |
jstarget.js:223 KLUDGE: slot (guard) Object | |
jstarget.js:223 KLUDGE: ignored param? Object | |
jstarget.js:223 KLUDGE: ignored param? Object |
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
# move all this somewhere? | |
def [=> UTF8] | _ := import("lib/codec/utf8") | |
def decodeContents(r): | |
def bs := r.getContents() | |
def cs := when(bs) -> { escape badText { UTF8.decode(bs, badText) } catch _ { "" } } | |
return cs | |
def kludgeListDir(makeProcess, makeFileResource): |
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
use "net/http" | |
actor Planter | |
let _out: StdStream | |
let _addr: String = "http://missiles/launcher" | |
new create(out: StdStream) => | |
_out = out | |
be plant(flower: String) => |
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
monte/docs/source/tut$ montedo top.mt | |
Importing: /nix/store/k19a26lyj08lrgpzlbzckzc6bzwmvy0r-typhon/mast/prelude.ty | |
Importing: /nix/store/k19a26lyj08lrgpzlbzckzc6bzwmvy0r-typhon/mast/prelude/deepfrozen.ty | |
... | |
Importing: top.ty | |
Taking initial turn in script... | |
Instantiating module... | |
Importing: /nix/store/k19a26lyj08lrgpzlbzckzc6bzwmvy0r-typhon/mast/m1.ty | |
Importing: ./m1.ty | |
Running module... |
https://www.npmjs.com/package/ses doesn't work (@@symptoms) but...
$ node in_node.js
416 Apparently fine
24 Deleted
1 Skipped
initSES succeeded.
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
__author__ = 'Dan Connolly' | |
__contact__ = 'http://www.madmode.com/' | |
__license__ = 'dedicated to the public domain, aka CC0' | |
from base64 import b64encode | |
from hashlib import md5 | |
import re | |
def gp2_generate_passwd(Passwd, Len): | |
''' |
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
from sqlalchemy import Table, Column, text | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.types import INTEGER, VARCHAR, TEXT | |
from sqlalchemy.sql import select, and_, func | |
Base = declarative_base() | |
institutions = ('kuh', 'kupi', 'kumc') | |
redcap_data = Table('redcap_data', Base.metadata, |
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
/** transcription of money example from "Smart Contracts" | |
http://www.erights.org/smart-contracts/index.html | |
http://www.erights.org/elib/capability/ode/ode-capabilities.html | |
*/ | |
abstract class Purse { // should this go inside Mint somehow? | |
def getBalance(): Int // hmm... num type? typeclass trick? | |
def sprout(): Purse | |
def getDecr(): Object | |
def deposit(amount: Int, src: Purse) |