The following instructions assume a debian jessie based distribution
Install dependent tools and libraries
$ sudo apt-get update| use "collections" | |
| use "time" | |
| primitive Factorial | |
| """ Factorial | |
| """ | |
| fun fac(n:U64): U64 => | |
| var f : U64 = 1 | |
| var i : U64 = 1 | |
| if n == 0 then |
| root@mylinkit:/tmp/run/mountd/sda2/current/bin# ./ponyc --pic --debug -V=4 foo | |
| Building builtin -> /tmp/run/mountd/sda2/current/packages/builtin | |
| Building foo -> /tmp/run/mountd/sda2/current/bin/foo | |
| Generating | |
| 'generic' is not a recognized processor for this target (ignoring processor) | |
| 'generic' is not a recognized processor for this target (ignoring processor) | |
| 'generic' is not a recognized processor for this target (ignoring processor) | |
| 'generic' is not a recognized processor for this target (ignoring processor) | |
| 'generic' is not a recognized processor for this target (ignoring processor) | |
| 'generic' is not a recognized processor for this target (ignoring processor) |
| // Use Pony struct's, FFI, and Maybe to map native structures to C | |
| // Thanks to sclebsch for a little help with the embedded sa_data | |
| // structure for which details are well hidden in sockaddr_in and sockaddr_in6 | |
| // | |
| struct SockAddr | |
| var sa_len: U8 = 0 | |
| var sa_family: U8 = 0 | |
| var sa_port: U16 = 0 | |
| var sa_data_1: U32 = 0 |
| #-------- | |
| # Dockerfile to configure salt minion | |
| FROM debian:jessie | |
| MAINTAINER [email protected] | |
| RUN apt-get update | |
| RUN apt-get install -y curl | |
| RUN curl -o - https://repo.saltstack.com/apt/debian/8/amd64/latest/SALTSTACK-GPG-KEY.pub | | |
| apt-key add - |
| actor Main | |
| new create(env : Env) => | |
| var a : Array[String] ref = [ "a", "b", "c" ] | |
| var b : Array[String] trn = recover Array[String] end | |
| b.push("foo") ; b.push("bar") ; b.push("baz") | |
| for i in a.values() do | |
| b.push(i) | |
| end | |
| let c : Array[String] val = consume b | |
| for i in c.values() do |
| use "collections" | |
| actor Main | |
| fun pass[A : Any #read](ln: A): List[A] => | |
| List[A].push(consume ln) | |
| new create(env : Env) => | |
| try | |
| env.out.print("Got: " + pass[String]("hello")(0) as String) | |
| end |
| #!/bin/sh | |
| LLVM_HOME=/usr/local/Cellar/llvm/3.6.2/bin | |
| PONY_HOME=/path/to/pony/repo | |
| PONY_LIBS=${PONY_HOME}/build/debug | |
| TARGET_ARCH=x86-64 | |
| OUT_LL="$1.ll" | |
| OUT_BC="$1.bc" | |
| OUT_S="$1.s" |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env escript | |
| %%! -sname hdr_histogram_simple -pa ebin | |
| %% H1 | |
| %% Memory Size 90184 | |
| %% Total Count 100 | |
| %% H2 | |
| %% Memory Size 90184 | |
| %% Total Count 1000 | |
| %% Done! |