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 basic steps are here | |
``` | |
install https://marketplace.visualstudio.com/items?itemName=npruehs.pony <- for syntax colors | |
install https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb <- for debugging | |
#vscode settings should have : | |
"debug.allowBreakpointsEverywhere": true | |
#(for example ) create an ./examples/.vscode/launch.json file under the pony examples directory with: | |
{ |
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 "debug" | |
use "lib:shell32" if windows | |
use "lib:ole32" if windows | |
primitive KnownFolderIds | |
""" | |
Known folder ids as described in: | |
https://docs.microsoft.com/en-ca/windows/desktop/shell/knownfolderid | |
functions return the little endian byte values of the folderid GUIDs |
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 "promises" | |
use "collections" | |
actor _Selector[A: Any #share] | |
var _completed: Bool = false | |
var _outstanding: USize | |
let _promise: Promise[A] | |
new create(promise: Promise[A], expected: USize) => | |
_promise = promise |
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" | |
use "cli" | |
use "debug" | |
actor Main | |
new create(env: Env) => | |
try | |
let spec = CommandSpec.leaf("damn", "", [ | |
OptionSpec.string("addr", | |
"The host:port:name to be advertised to other clustering nodes." |
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
(class:scope | |
(id $1$0) | |
x | |
ref | |
(provides (nominal x (id Getter) x x x)) | |
(members | |
(fvar (id d) (nominal (id $0) (id Bool) x val x x) x) | |
(fvar (id c) (nominal (id $0) (id Bool) x val x x) x) | |
(fvar (id b) (nominal (id $0) (id Bool) x val x x) x) | |
(fvar (id a) (nominal (id $0) (id Bool) x val x x) x) |
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
(program:scope | |
(package:scope | |
(module:scope | |
(use x "builtin" x) | |
(use x "ponytest" x) | |
(actor:scope | |
(id Main) | |
x | |
tag | |
(provides (nominal (id $2) (id TestList) x ref x x)) |
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 ubuntu:xenial¬ | |
¬ | |
ENV LLVM_VERSION 3.9.1¬ | |
¬ | |
RUN apt-get update \¬ | |
&& apt-get install -y \¬ | |
apt-transport-https \¬ | |
g++ \¬ |
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
type MyUnionType is (U32|I32|U8) | |
actor Main | |
new create(env: Env) => | |
let union_array: Array[MyUnionType] = [ | |
as MyUnionType: U32(1) | |
I32(-1) | |
] |
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
actor Main | |
new create(env: Env) => | |
let yep: Array[U32] = [1] | |
let nope: Array[U32] = [1, 2] |
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 regExpMatch(url, pattern) { | |
try { return new RegExp(pattern).test(url); } catch(ex) { return false; } | |
} | |
function FindProxyForURL(url, host) { | |
// Important: replace 172.31 below with the proper prefix for your VPC subnet | |
if (shExpMatch(url, "*172.31.*")) return "SOCKS5 localhost:8157"; | |
if (shExpMatch(url, "*internal-jenkins-nuggad-*.eu-central-1.elb.amazonaws.com*")) return "SOCKS5 localhost:8157"; | |
if (shExpMatch(url, "*ec2*.amazonaws.com*")) return 'SOCKS5 localhost:8157'; | |
if (shExpMatch(url, "*.compute.internal*") || shExpMatch(url, "*://compute.internal*")) return 'SOCKS5 localhost:8157'; |