profile
viewpoint
Andrew Cann canndrew Perth, Australia

create barnchcanndrew/lightning

branch : master

created branch time in 5 days

created repositorycanndrew/lightning

Rust /tokio bitcoin lightning implementation

created time in 5 days

push eventcanndrew/canndrews-misc-ext-traits

Andrew Cann

commit sha 402dbfaad8433ab957c513c2753f6ba1c2608f36

Add CursorExt

view details

push time in 6 days

pull request commentnblockchain/TcpEchoSharp

Make tcp connections timeout after 1sec

Right, of course. Fixed.

canndrew

comment created time in 18 days

push eventcanndrew/TcpEchoSharp

Andrew Cann

commit sha 08be1aff8d4baed049eb2280dc204236b13cc578

make tcp timeout asynchronous

view details

push time in 18 days

push eventcanndrew/TcpEchoSharp

Andrew Cann

commit sha 1ef94a89ea67d85704c0e6db8dc06cb7ec5db3d7

Add tcp timeout constant Put tcp timeout in a constant and use it for the receive timeout aswell.

view details

push time in 19 days

pull request commentnblockchain/TcpEchoSharp

Make tcp connections timeout after 1sec

Ping @c410-f3r

canndrew

comment created time in 19 days

pull request commentnblockchain/TcpEchoSharp

Make tcp connections timeout after 1sec

For the test, it make sense to connect to an address we know won't respond. Is there some way in C# we can open a TCP listening socket but not send back a SYN-ACK when our socket tries to connect? The only way I can think of is (on linux) to use network namespaces and tun/tap, since raw sockets require root/admin privileges.

canndrew

comment created time in 19 days

PR opened nblockchain/TcpEchoSharp

Make tcp connections timeout after 1sec

Fixes https://github.com/nblockchain/TcpEchoSharp/issues/7

+32 -2

0 comment

2 changed files

pr created time in 19 days

create barnchcanndrew/TcpEchoSharp

branch : tcp-timeout-fix

created branch time in 19 days

issue commentrust-bitcoin/rust-lightning

Use spaces instead of tabs

I know tabs-vs-spaces is an age-old religious war but I'm pretty sure the war ended years ago and spaces won. I wasn't being completely petty opening this either - no other Rust projects have forced me to configure my editor or get used to an annoying-slightly-different way of moving around in code.

But whatevs. You're right that this isn't worth fighting over.

canndrew

comment created time in 19 days

pull request commentrust-bitcoin/rust-lightning

Fix deprecation warnings for missing `dyn`s

You can add `#![allow(bare_trait_objects)] to the top of the crate to silence the warning. How are we going to remember to remove it again when the minimum version gets bumped though?

canndrew

comment created time in 19 days

issue openednix-rust/nix

exec family functions take CString instead of &CStr

For example, the signature of execve is:

pub fn execve(path: &CString, args: &[CString], env: &[CString]) -> Result<Void>

Surely there's no point in taking a &CString as opposed to a &CStr, right? And couldn't the slices just contain &CStrs since it's not possible to move out of a slice anyway?

created time in 19 days

PR opened rust-bitcoin/rust-lightning

Fix deprecation warnings for missing `dyn`s

Referring to trait objects as TraitName instead of dyn TraitName is deprecated.

+57 -57

0 comment

9 changed files

pr created time in 21 days

create barnchcanndrew/rust-lightning

branch : silence-dyn-trait-warnings

created branch time in 21 days

issue openedrust-bitcoin/rust-lightning

Use spaces instead of tabs

I want to start contributing to this project but having to configure my editor to use tabs just when I'm in this project's directory is kind of annoying. No other rust projects use tabs, including rust-bitcoin. In fact no other projects use tabs these days. I haven't had to edit code with tabs in it for like, 10 years. Can this project just be normal?

created time in 21 days

fork canndrew/rust-lightning

Rust-Lightning, not Rusty's Lightning

fork in 21 days

PR opened knocte/gwallet

configure.sh: more detailed error messages.

Adds more information to the error messages produced by configure.sh when working versions of fsharpi and fsx can't be found.

+2 -2

0 comment

1 changed file

pr created time in 21 days

create barnchcanndrew/gwallet

branch : configure-error-messages

created branch time in 21 days

fork canndrew/gwallet

GWallet is a minimalistic and pragmatist opensource crossplatform lightweight brainwallet for people that want to hold the most important cryptocurrencies in the same application with ease and peace of mind

fork in 21 days

push eventcanndrew/emoji-quickpick

Andrew Cann

commit sha e8dd68586c26df0aab6775f9f8adca28c8a6e3a0

Add readme, license and cargo metadata

view details

push time in a month

create barnchcanndrew/emoji-quickpick

branch : master

created branch time in a month

created repositorycanndrew/emoji-quickpick

Emoji picking app for Linux

created time in a month

pull request commentnblockchain/TcpEchoSharp

Solution for #2

I've pushed a commit with the requested changes.

canndrew

comment created time in a month

push eventcanndrew/TcpEchoSharp

Andrew Cann

commit sha 20e9818e8007b7d7c8e9621d0145f090f145f850

fixes based on feedback

view details

push time in a month

Pull request review commentnblockchain/TcpEchoSharp

Solution for #2

 public class StratumClient : Client {         public StratumClient (string _endpoint, int _port) : base (_endpoint, _port) { }          public async Task<BlockchainTransactionGet> BlockchainTransactionGet (int id, string transactionId) {-            var json = "{ \"id\": " + id + ", " +-                "\"method\": \"blockchain.transaction.get\", " +-                "\"params\": [\"" + transactionId + "\"] }";+            var stringBuilder = new StringBuilder();+            var stringWriter = new StringWriter(stringBuilder);+            var jsonWriter = new JsonTextWriter(stringWriter);+            jsonWriter.WriteStartObject();+            jsonWriter.WritePropertyName("id");+            jsonWriter.WriteValue(id);+            jsonWriter.WritePropertyName("method");+            jsonWriter.WriteValue("blockchain.transaction.get");+            jsonWriter.WritePropertyName("params");+            jsonWriter.WriteStartArray();+            jsonWriter.WriteValue(transactionId);+            jsonWriter.WriteEnd();+            jsonWriter.WriteEndObject();+            var json = stringBuilder.ToString();

Ah, this is what I was asking about in my comment :)

Though it was dumb of me to ask about it when I had an example already sitting there in the code.

canndrew

comment created time in a month

Pull request review commentnblockchain/TcpEchoSharp

Solution for #2

+namespace TcpEcho++open System.IO+open System.Text+open Newtonsoft.Json++type BlockchainTransactionGet = {+    [<JsonProperty(PropertyName = "id")>]+    mutable Id: int+    [<JsonProperty(PropertyName = "result")>]+    mutable Result: string

The C# class is public and has getters and setters. I don't know whether the setters are actually intended to be used anywhere, but I was trying to replicate the C# code faithfully.

canndrew

comment created time in a month

PR opened nblockchain/TcpEchoSharp

Solution for #2
+124 -35

0 comment

8 changed files

pr created time in a month

push eventcanndrew/TcpEchoSharp

push time in a month

create barnchcanndrew/TcpEchoSharp

branch : issue-2

created branch time in a month

push eventcanndrew/TcpEchoSharp

Andrew Cann

commit sha 3bd0414fbdad5d0e122a0e87d6b42bbd78a1f966

Task 1 complete

view details

Andrew Cann

commit sha b4210a48660391e0c9750d803a24d540c43abd06

Task 2 complete

view details

Andrew Cann

commit sha 31eef63c6e3e9a3411e5ab45c6f04818580a6d6e

Task 3 complete

view details

push time in a month

fork canndrew/TcpEchoSharp

Basic TCP client that uses System.IO.Pipelines to parse line based messages

fork in a month

push eventcanndrew/malk-2018

Andrew Cann

commit sha fbde77aa76a38f530df0d549e1bb250a112fc8d0

remove self-implemented lsp types

view details

Andrew Cann

commit sha 95e8c9bd02b77fb2d96fa0f4dccc6b3b4fefd931

some wasm support works about to re-implement the parser again

view details

Andrew Cann

commit sha 10624e9230f095f72bcc13aaa30af5d76972f986

can interactively normalise terms

view details

Andrew Cann

commit sha a5dabc209885e321239044b1c315d359fcf96657

split into core2+syntax modules

view details

Andrew Cann

commit sha 49fe7dddfaf30eb89535cdcdf5fa3195a5c745b7

using new core impl

view details

Andrew Cann

commit sha d04982720fe77affd6b1e603c1718012f6ca65da

more typechecking written

view details

Andrew Cann

commit sha 39bf90b56ec6b123c235a217b824a81d46c553a5

add Hash impls in core

view details

Andrew Cann

commit sha 6f210468188352183026477e9276dc02d80b2eab

make terms/types always normalised

view details

Andrew Cann

commit sha dcf726d4e6ea26fd85a8b24cdc59d9fe616a694a

add core operation caching + more unification logic

view details

Andrew Cann

commit sha 88e8a54af661be75a688a32b7afc646cb313096d

add String type to core

view details

Andrew Cann

commit sha af7fe0d96ca653129d64e31a505b49b088b01dc6

make idents reflected strings

view details

push time in 2 months

push eventcanndrew/package_statistics

Andrew Cann

commit sha 54d5b089cd91ec14b0d6a7c9e66bb21489b51031

Hackily avoid potential race condition in test

view details

push time in 2 months

push eventcanndrew/package_statistics

Andrew Cann

commit sha 2121c80c61e4f17af4bad2e4bb9496b41154bfdf

Fix bug in contents file parsing

view details

push time in 2 months

create barnchcanndrew/package_statistics

branch : master

created branch time in 2 months

created repositorycanndrew/package_statistics

Debian package statistics calculator in python (exercise for Canonical interview).

created time in 2 months

push eventcanndrew/netsim

Andrew Cann

commit sha 5ad23d277201ac22943e1bacae0f0ac0d7a950d0

port to tokio-0.2

view details

Andrew Cann

commit sha 6f877d5329363ccd87262320a70eb8181201fc74

Fix tokio-0.2 port

view details

Andrew Cann

commit sha 2b9895a3a529b37fc19b28a632a69c6f27a57f04

bugfix: enter tokio event loop earlier

view details

Povilas Balciunas

commit sha 15bd0df38c1e7cf965a046b3f9f8578c6e37b05c

Fix examples and tests Make sure Network is not dropped before we actually finish running our final future. Before Network object was moved into future::lazy() closure which would then drop the Network before we actually we finished which resulting in panicking.

view details

Povilas Balciunas

commit sha bb1fc7d9b1c636ae09d98b15f17989f4aa40f2a5

Update tokio related crates

view details

Povilas Balciunas

commit sha ad05d0d58db5893de1ba202d332c6577e31b3d0d

Update to Rust 2018 edition 1. Ran `cargo fix --edition` 2. Updated Cargo.toml

view details

Povilas Balciunas

commit sha c6860e03d0aa049996c6455ff03fbff5995b69fd

Update travis CI script Build only on latest Rust stable. That simplifies the build script, removes MaidSafe installation scripts, etc.

view details

Andrew Cann

commit sha 1ac347f2e08cc60046a1ce7be0a63828e17c8e96

Merge pull request #26 from povilasb/update-rust Update rust to 2018 edition

view details

push time in 2 months

PR merged canndrew/netsim

resolves #24: update tokio

Adopted netsim code to latest tokio API changes.

+705 -514

2 comments

35 changed files

povilasb

pr closed time in 2 months

PR merged canndrew/netsim

Update rust to 2018 edition

Makes builds simpler cause we don't have to track the Rust versions netsim builds on. Now it's supposed to build on all latest stable Rust 2018 edition versions.

+835 -656

2 comments

81 changed files

povilasb

pr closed time in 2 months

pull request commentcanndrew/netsim

Update rust to 2018 edition

I left one small nit on this PR, but it otherwise looks good.

povilasb

comment created time in 2 months

Pull request review commentcanndrew/netsim

Update rust to 2018 edition

 impl IpLog {         const VERSION_MINOR: u16 = 4;         const LINKTYPE_RAW: u32 = 101; -        let try = || -> io::Result<_> {+        let r#try = || -> io::Result<_> {

This should probably just be called something else.

povilasb

comment created time in 2 months

pull request commentcanndrew/netsim

resolves #24: update tokio

Awesome man. Good job :D

povilasb

comment created time in 2 months

push eventcanndrew/patchall

Andrew Cann

commit sha 42a705c47ce724bb23b656f0e0b4d11fd89ac109

initial commit

view details

push time in 3 months

create barnchcanndrew/patchall

branch : master

created branch time in 3 months

created repositorycanndrew/patchall

NixOS tool for finding and patching executables

created time in 3 months

more