Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to mainline ponyc 0.19.next_release #1615

Merged
merged 30 commits into from
Oct 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b1e3828
Update arrays to use sequence notation
jtfmumm Sep 18, 2017
817aac8
Rename instances of IPAddress to NetAddress
jtfmumm Sep 18, 2017
2ce8d62
Add AsioEventHelper
jtfmumm Sep 18, 2017
bda5e99
Update code to use new approach to chaining
jtfmumm Sep 18, 2017
6e4ab8e
Update TCPConnectNotifiers to implement connect_failed
jtfmumm Sep 18, 2017
e2766c7
Update machida to use new approach to chaining
jtfmumm Sep 18, 2017
2accfe4
Use direct calls instead of AsioEventHelper
jtfmumm Sep 18, 2017
1d215e4
Update to use new explicit partial calls
jtfmumm Sep 21, 2017
40e9766
Remove outdated use of Iter
jtfmumm Sep 19, 2017
a296a68
Update OSX event handling to follow Linux approach
jtfmumm Sep 19, 2017
ed6378c
Update installation docs and .travis.yml
jtfmumm Sep 20, 2017
ccef9dd
Update cluster shutdown tool for ponyc 0.19.1
jtfmumm Sep 20, 2017
a4f27f4
Update Giles to compile with ponyc 0.19.1
jtfmumm Sep 20, 2017
80ffc41
Fix FFI incompatibilities
jtfmumm Sep 20, 2017
d4671b0
Remove llvm install instructions from docs
jtfmumm Sep 20, 2017
bc78b89
Disable C++ builds for CI
jtfmumm Sep 21, 2017
7072afc
Update gen.pony to build with ponyc 0.19.1
jtfmumm Sep 22, 2017
6ffbcf3
Update helper Pony apps to compile with 0.19.2
jtfmumm Sep 25, 2017
f302b9a
Update apps to use pony-kafka 0.2.0
jtfmumm Sep 25, 2017
3e6a57f
Update README to explain new C++ API status
jtfmumm Sep 26, 2017
068a999
Improve ClusterInitializer messages
jtfmumm Sep 26, 2017
05f006b
Add ControlConnection wrapper for TCPConnection
jtfmumm Sep 26, 2017
28c090b
Update WallarooLabs libs to compile with 0.19.2
jtfmumm Sep 26, 2017
c7514bc
Update testing tools to compile with 0.19.2
jtfmumm Sep 26, 2017
2939bde
Update topology_layout programs for 0.19.2
jtfmumm Sep 27, 2017
62caed7
Upgrade Wesley tests to 0.19.2
jtfmumm Sep 27, 2017
34d192c
Backport ponylang/ponyc#1578 and ponylang/ponyc#1626 to net actors
dipinhora Sep 28, 2017
a54320e
Undo `val` to `iso` changes for `recovery`
dipinhora Oct 5, 2017
9fe46ea
Remove `_wb.reserve` calls from Runner
dipinhora Oct 9, 2017
4ae7990
Update travis yml file
JONBRWN Oct 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 19 additions & 37 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,55 +48,37 @@ install:
# return to our starting directory, then our `script` step will fail because
# its in the wrong directory.
- export INSTALL_STARTED_AT=`pwd`
- echo "Installing ponyc";
- if [ "${TRAVIS_OS_NAME}" = "osx" ];
then
brew update;
brew install gmp; brew link --overwrite gmp;
brew install pcre2 libressl;
brew install llvm@3.9;
brew link --overwrite --force llvm@3.9;
mkdir llvmsym;
ln -s `which llvm-config` llvmsym/llvm-config-3.9;
ln -s `which clang++` llvmsym/clang++-3.9;
export PATH=llvmsym/:$PATH;
brew install ponyc;
fi;
- if [ "${TRAVIS_OS_NAME}" = "linux" ];
then
sudo apt-get -fy install cpuset;
sudo apt-get install libc++-dev;
mkdir /tmp/dl;
cd /tmp/dl;
wget "http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-debian8.tar.xz";
tar -xvf clang+llvm*;
cd clang+llvm* && sudo mkdir /tmp/llvm && sudo cp -r * /tmp/llvm/;
sudo ln -s /tmp/llvm/bin/llvm-config /usr/local/bin/${LLVM_CONFIG};
export PATH=/tmp/llvm/bin:$PATH;
cd /tmp/dl;
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.21.tar.bz2;
tar -xjvf pcre2-10.21.tar.bz2;
cd pcre2-10.21 && ./configure --prefix=/usr && make && sudo make install;
cd /tmp/dl;
wget https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz;
tar zxvf cmake-3.5.2-Linux-x86_64.tar.gz;
export PATH=/tmp/dl/cmake-3.5.2-Linux-x86_64/bin:$PATH;
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "8756 C4F7 65C9 AC3C B6B8 5D62 379C E192 D401 AB61";
echo "deb https://dl.bintray.com/pony-language/ponyc-debian pony-language main" | sudo tee -a /etc/apt/sources.list;
sudo apt-get update;
sudo apt-get -V install ponyc;
fi;
- echo "Installing WallarooLabs/ponyc";
cd /tmp;
git clone https://github.com/WallarooLabs/ponyc.git;
cd ponyc;
make CC=$CC1 CXX=$CXX1;
sudo make install;
- echo "Installing pony-stable";
cd /tmp;
git clone https://github.com/ponylang/pony-stable;
cd pony-stable;
git checkout 0054b429a54818d187100ed40f5525ec7931b31b;
sudo make install;
- if [ "${TRAVIS_OS_NAME}" = "linux" ];
then
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "D401AB61 DBE1D0A2";
echo "deb https://dl.bintray.com/pony-language/pony-stable-debian /" | sudo tee -a /etc/apt/sources.list;
sudo apt-get update;
sudo apt-get -V install pony-stable;
fi;
- if [ "${TRAVIS_OS_NAME}" = "osx" ];
then
brew install pony-stable;
fi;
- echo "Installing snappy and lz4";
- if [ "${TRAVIS_OS_NAME}" = "osx" ];
then
brew install snappy lz4;
fi
fi;
- if [ "${TRAVIS_OS_NAME}" = "linux" ];
then
sudo apt-get install libsnappy-dev;
Expand All @@ -105,7 +87,7 @@ install:
tar zxvf liblz4-1.7.5.tar.gz;
cd lz4-1.7.5;
sudo make install;
fi
fi;
- cd $INSTALL_STARTED_AT
- if [ "${TRAVIS_OS_NAME}" = "osx" ];
then
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ We are currently working with a client who needs Python 3 bindings. We plan to i

- C++

C++ was our first non-Pony API. Since that time we have learned a lot about writing Wallaroo language bindings. We plan on revisiting the C++ API in the near future to improve its ergonomics. If you are interested in using Wallaroo with C++, you should [contact us][contact us email]. We're happy to work with you.
C++ is currently unsupported and apps created with the C++ API will not build unless you checkout the `last-working-C++-commit` tag. If you are interested in using Wallaroo with C++, you should [contact us][contact us email]. We're happy to work with you.

C++ was our first non-Pony API. Since that time we have learned a lot about writing Wallaroo language bindings. We plan on revisiting the C++ API in the future to improve its ergonomics. New functionality added to Wallaroo is not currently being implemented in the C++ API.

- Go

Expand Down
96 changes: 11 additions & 85 deletions book/getting-started/linux-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,11 @@ If you do not already have Git installed, install it:
sudo apt-get install git
```

## Install LLVM 3.9

Visit [http://apt.llvm.org](http://apt.llvm.org) and select the correct apt mirror for you version of Ubuntu.

### Xenial Ubuntu: Add the LLVM apt repos to /etc/apt/sources.list

Open `/etc/apt/sources.list` and add the following lines to the end of
the file:

```
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main
```

### Trusty Ubuntu: Add the LLVM apt repos to /etc/apt/sources.list

Open `/etc/apt/sources.list` and add the following lines to the end of
the file:

```
deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main
deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main
```

### Add the LLVM repo as a trusted source

```bash
cd ~/
wget -O llvm-snapshot.gpg.key http://apt.llvm.org/llvm-snapshot.gpg.key
sudo apt-key add llvm-snapshot.gpg.key
```

### Install
## Install make

```bash
sudo apt-get update
sudo apt-get install -y llvm-3.9
```

## Install Pony compiler dependencies

```bash
sudo apt-get install -y build-essential zlib1g-dev \
libncurses5-dev libssl-dev
sudo apt-get install -y build-essential
```

### Install GCC 5 or Higher
Expand Down Expand Up @@ -90,61 +51,26 @@ sudo update-alternatives --install /usr/bin/gcc gcc \
/usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
```

### Install prce2

#### Xenial Ubuntu:

```bash
sudo apt-get install -y libpcre2-dev
```

#### Trusty Ubuntu:

*Note:* some older versions of Ubuntu do not supply a prce2
package. If you get an error that no package exists (`E: Package
'libpcre2-dev' has no installation candidate`) then you will need to
install from source like this:

```bash
cd ~/
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.21.tar.bz2
tar xjvf pcre2-10.21.tar.bz2
cd pcre2-10.21
./configure --prefix=/usr
make
sudo make install
```

### Installing ponyc

Now you need to install the Wallaroo Labs fork of the Pony compiler `ponyc`. Run:

```bash
cd ~/
wget https://github.com/WallarooLabs/ponyc/archive/wallaroolabs-19.2.14.tar.gz
tar xzfv wallaroolabs-19.2.14.tar.gz
cd ponyc-wallaroolabs-19.2.14
sudo make config=release install
```

You can check that the installation was successful by running:
Now you need to install Pony compiler `ponyc`. Run:

```bash
ponyc examples/helloworld
./helloworld
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "8756 C4F7 65C9 AC3C B6B8 5D62 379C E192 D401 AB61"
echo "deb https://dl.bintray.com/pony-language/ponyc-debian pony-language main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get -V install ponyc
```

## Installing pony-stable

Next, you need to install `pony-stable`, a Pony dependency management library. Navigate to a directory where you will put the `pony-stable` repo and execute the following commands:

```bash
cd ~/
git clone https://github.com/ponylang/pony-stable
cd pony-stable
git checkout 0054b429a54818d187100ed40f5525ec7931b31b
make
sudo make install
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "D401AB61 DBE1D0A2"
echo "deb https://dl.bintray.com/pony-language/pony-stable-debian /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get -V install pony-stable
```

## Install Compression Development Libraries
Expand Down
35 changes: 4 additions & 31 deletions book/getting-started/macos-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,49 +32,22 @@ brew install git

## Installing the Pony Compiler

### Installing Pony Compiler Dependencies

You'll need LLVM 3.9.1, LibreSSL, and the pcre2 library to build Pony and compile Wallaroo apps. Also, the next section will use the `wget` utility to help install the Pony language compiler.

Use the following commands to install via [Homebrew](http://brew.sh):

```bash
brew update
brew install llvm@3.9
brew link --overwrite --force llvm@3.9
brew install pcre2 libressl wget
```

### Installing ponyc

Now you need to install the Wallaroo Labs fork of the Pony compiler `ponyc`.

```bash
cd ~/
wget https://github.com/WallarooLabs/ponyc/archive/wallaroolabs-19.2.14.tar.gz
tar xzfv wallaroolabs-19.2.14.tar.gz
cd ponyc-wallaroolabs-19.2.14
sudo make config=release install
```

You can check that the installation was successful by running:

```bash
ponyc examples/helloworld
./helloworld
brew update
brew install ponyc
```

## Installing pony-stable

Next, you need to install `pony-stable`, a Pony dependency management library:

```bash
cd ~/
git clone https://github.com/ponylang/pony-stable
cd pony-stable
git checkout 0054b429a54818d187100ed40f5525ec7931b31b
make
sudo make install
brew update
brew install pony-stable
```

## Install Compression Development Libraries
Expand Down
26 changes: 13 additions & 13 deletions cpp_api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $(abspath $(lastword $(MAKEFILE_LIST)))_DOCKER_TARGET := true

# `true`/`false` to enable/disable recursing into Makefiles of subdirectories if they exist
# (and by recursion every makefile in the tree that is referenced)
$(abspath $(lastword $(MAKEFILE_LIST)))_RECURSE_SUBMAKEFILES := true
$(abspath $(lastword $(MAKEFILE_LIST)))_RECURSE_SUBMAKEFILES := false


# standard rules generation makefile
Expand All @@ -42,21 +42,21 @@ include $(rules_mk_path)
CPPAPI_PATH = $(wallaroo_path)/cpp_api/cpp/cppapi
CPPAPI_BUILD_PATH = $(CPPAPI_PATH)/build

build-cpp_api: cpp_api_clean cpp_api_build
unit-tests-cpp_api: build-cpp_api
clean-cpp_api: cpp_api_clean
#build-cpp_api: cpp_api_clean cpp_api_build
#unit-tests-cpp_api: build-cpp_api
#clean-cpp_api: cpp_api_clean

cpp_api_build:
$(QUIET)mkdir -p $(CPPAPI_BUILD_PATH)
$(QUIET)cd $(CPPAPI_BUILD_PATH) && cmake -DCMAKE_INSTALL_PREFIX=/tmp/cpp_api ..
$(QUIET)cd $(CPPAPI_BUILD_PATH) && make
$(QUIET)cd $(CPPAPI_BUILD_PATH) && make install/local
#cpp_api_build:
# $(QUIET)mkdir -p $(CPPAPI_BUILD_PATH)
# $(QUIET)cd $(CPPAPI_BUILD_PATH) && cmake -DCMAKE_INSTALL_PREFIX=/tmp/cpp_api ..
# $(QUIET)cd $(CPPAPI_BUILD_PATH) && make
# $(QUIET)cd $(CPPAPI_BUILD_PATH) && make install/local

cpp_api_clean:
$(QUIET)rm -rf $(CPPAPI_BUILD_PATH)
#cpp_api_clean:
# $(QUIET)rm -rf $(CPPAPI_BUILD_PATH)

cpp_api_test:
$(QUIET)echo "cpp_api tests"
# cpp_api_test:
# $(QUIET)echo "cpp_api tests"

# end of prevent rules from being evaluated/included multiple times
endif
2 changes: 1 addition & 1 deletion examples/cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $(abspath $(lastword $(MAKEFILE_LIST)))_DOCKER_TARGET := true

# `true`/`false` to enable/disable recursing into Makefiles of subdirectories if they exist
# (and by recursion every makefile in the tree that is referenced)
$(abspath $(lastword $(MAKEFILE_LIST)))_RECURSE_SUBMAKEFILES := true
$(abspath $(lastword $(MAKEFILE_LIST)))_RECURSE_SUBMAKEFILES := false


# standard rules generation makefile
Expand Down
15 changes: 8 additions & 7 deletions examples/pony/alphabet/alphabet.pony
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ actor Main
Application("Alphabet Popularity Contest")
.new_pipeline[Votes val, LetterTotal val]("Alphabet Votes",
TCPSourceConfig[Votes val].from_options(VotesDecoder,
TCPSourceConfigCLIParser(env.args)(0)))
TCPSourceConfigCLIParser(env.args)?(0)?))
.to_state_partition[Votes val, String, LetterTotal val,
LetterState](AddVotes, LetterStateBuilder, "letter-state",
letter_partition where multi_worker = true)
.to_sink(TCPSinkConfig[LetterTotal val].from_options(
LetterTotalEncoder,
TCPSinkConfigCLIParser(env.args)(0)))
TCPSinkConfigCLIParser(env.args)?(0)?))?
end
Startup(env, application, "alphabet-contest")
else
Expand Down Expand Up @@ -84,9 +84,9 @@ class AddVotesStateChange is StateChange[LetterState]
out_writer.u64_be(_votes.count)

fun ref read_log_entry(in_reader: Reader) ? =>
let letter_size = in_reader.u32_be().usize()
let letter = String.from_array(in_reader.block(letter_size))
let count = in_reader.u64_be()
let letter_size = in_reader.u32_be()?.usize()
let letter = String.from_array(in_reader.block(letter_size)?)
let count = in_reader.u64_be()?
_votes = Votes(letter, count)

class AddVotesStateChangeBuilder is StateChangeBuilder[LetterState]
Expand All @@ -102,7 +102,7 @@ primitive AddVotes is StateComputation[Votes val, LetterTotal val, LetterState]
=>
let state_change: AddVotesStateChange ref =
try
sc_repo.lookup_by_name("AddVotes") as AddVotesStateChange
sc_repo.lookup_by_name("AddVotes")? as AddVotesStateChange
else
AddVotesStateChange(0)
end
Expand All @@ -117,6 +117,7 @@ primitive AddVotes is StateComputation[Votes val, LetterTotal val, LetterState]
recover val
let scbs = Array[StateChangeBuilder[LetterState]]
scbs.push(recover val AddVotesStateChangeBuilder end)
scbs
end

primitive VotesDecoder is FramedSourceHandler[Votes val]
Expand All @@ -129,7 +130,7 @@ primitive VotesDecoder is FramedSourceHandler[Votes val]
fun decode(data: Array[U8] val): Votes val ? =>
// Assumption: 1 byte for letter
let letter = String.from_array(data.trim(0, 1))
let count = Bytes.to_u32(data(1), data(2), data(3), data(4))
let count = Bytes.to_u32(data(1)?, data(2)?, data(3)?, data(4)?)
Votes(letter, count.u64())

primitive LetterPartitionFunction
Expand Down
4 changes: 2 additions & 2 deletions examples/pony/alphabet/data_gen/gen.pony
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ actor Main

let rand = MT(Time.nanos())

let file = File(FilePath(auth, file_path))
let file = File(FilePath(auth, file_path)?)

if message_count == 0 then
@printf[I32](("Please specify a message count " +
Expand All @@ -62,7 +62,7 @@ actor Main
for idx in Range[I32](0, message_count) do
let next_vote = rand.int(100).u32()
let next_letter = try
letters(rand.int(letters.size().u64()).usize())
letters(rand.int(letters.size().u64()).usize())?
else
"."
end
Expand Down
Loading