[R-pkg-devel] golang based package for R msgpack and websocket work (RMQ)

2015-10-26 Thread Jason E. Aten
Hello r-package-devel,

I've made a package for R that uses Go (golang), the compiled language
created by Rob Pike, Ken Thomson, Robert Griesemer, a team of Google
employees, and thousands of open source volunteer contributors. See
http://golang.org

My package, called RMQ for "R messaging and queuing" provides msgpack
(supporting version 2 of msgpack) serialization and robust web-socket based
RPC.  The existing package for msgpackR in CRAN is for the outdated msgpack
1 standard, and can be very slow for some inputs, crashing on others. RMQ
instead uses a highly optimized and compiled msgpack parsing library. RMQ
also incorporates a hardened and well-tested websocket webserver framework
from the Go world. The details of RMQ can be viewed at
https://github.com/glycerine/rmq

I view this as cutting edge work. It demonstrates for the first time how to
integrate libraries written in Go with R.

Complimenting the great library support in R, there are a quite some number
of high quality libraries in Go; especially the networking, crypto, and
big-integer libraries. Realistic integration between Go and R only became
viable last month, with the release of Go1.5.1 that supports compiling Go
code into shared libraries and simplified package vendoring.

I don't know how viable it is to contribute RMQ (or any Go based package to
CRAN). If it is not too difficult, I would be willing to try.  Go1.5.1
would need to be installed on all build hosts. I would be willing to help
setup an appropriate build environments if need be.

In summary, my question is: is it viable to add RMQ to CRAN?

Thank you for your thoughts!

Jason

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] golang based package for R msgpack and websocket work (RMQ)

2015-10-27 Thread Jason E. Aten
On Mon, Oct 26, 2015 at 6:59 AM, Dirk Eddelbuettel  wrote:

>  Did you know that Google has worked on Go/R integration?  Christoph Best
> talked
> about it at useR! 2015. No code release yet, and it depends on RPC and new
> ProtoBuf.


Cool. Thanks for mentioning that. I'll send him a note.


> Let's the view of package author's of their own package an invariant :)
> Most
> are pretty impressed.


HA! :-)


> You "just" make that
>   a) a SystemRequirements: entry and possibly add a line to say which
>  Debian/Ubuntu and/or Fedora/Yum packages need to be installed
>   b) possibly test for it in configure
>

I'll try to dig into the autotools docs and figure out how to add a
configure test. It's really just running "go version" and checking that the
"go" executalbe exists and the output of "go version" is 1.5.1 or later.

I added a human readable note to the SystemRequirements in the
DESCRIPTION.  It's "apt-get install golang" on ubuntu, and "yum install
golang" on fedora. Should the SystemRequirements field be in some kind of
machine parseable/CRAN build-testable syntax?

Best,
Jason

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] golang based package for R msgpack and websocket work (RMQ)

2015-10-28 Thread Jason E. Aten
Re PPAs: good question.

I did some digging. The ubuntu 14 PPA that I found (
https://launchpad.net/~eugenesan/+ppa-packages) was already out of date
(having go1.5 not go1.5.1) when I tried it on a test cloud box running
ubuntu 14.

I think the best way to get Go on a CRAN build box is to do a simple binary
install with the following two lines. This has the big advantage that it
will work on any flavor of linux on amd64, since the go binaries are
statically linked. i.e. any version of ubuntu, fedora, centos, redhat, etc.
 (Full details: https://golang.org/doc/install  lists the exact
architectures that the binary tarballs support, encompassing FreeBSD,
Linux, Windows, and OSX and which architectures for each.)

*sudo curl https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
<https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz> | su**do
tar xz -C /usr/local/*

*sudo echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile*
NB This will install the "go" binary to /usr/local/go/bin/go. The install
location /usr/local/go is baked into the go1.5.1.linux-amd64.tar.gz binary
as the default GOROOT location, so it can't be moved without setting the
GOROOT env variable as well.


So that's what I would recommend.  Any questions, let me know if know.

Jason


On Mon, Oct 26, 2015 at 9:57 AM, Dirk Eddelbuettel  wrote:

>
> On 26 October 2015 at 09:46, Jason E. Aten wrote:
> | Cool. Thanks for mentioning that. I'll send him a note.
>
> +1 -- I would have CC'ed him had I had his email handy. I'll try to reach
> out too.
>
> | You "just" make that
> |   a) a SystemRequirements: entry and possibly add a line to say which
> |  Debian/Ubuntu and/or Fedora/Yum packages need to be installed
> |   b) possibly test for it in configure
> |
> |
> | I'll try to dig into the autotools docs and figure out how to add a
> configure
>
> If it is "all greek" to you let me know. I helped a few other packages over
> the years with simple configure tasks.
>
> | test. It's really just running "go version" and checking that the "go"
> | executalbe exists and the output of "go version" is 1.5.1 or later.
>
> Pretty much. Here is what I do in RQuantLib:
>
> pkg_version=`quantlib-config --version`
>
> # also test for quantlib version using result from quantlib-config
> --version
> case ${pkg_version} in
> 0.1.*|0.2.*|0.3.*|0.4.*|0.8.*|0.9.*|1.0.*|1.1.*|1.2.*|1.3.*)
> AC_MSG_WARN([RQuantLib requires QuantLib (>= 1.4.0).])
> AC_MSG_ERROR([Please upgrade to a current version.])
> ;;
> esac
>
> autoconf looks complicated, but is mostly just shell scripting ...
>
> | I added a human readable note to the SystemRequirements in the
> DESCRIPTION.
> | It's "apt-get install golang" on ubuntu, and "yum install golang" on
> fedora.
> | Should the SystemRequirements field be in some kind of machine
> parseable/CRAN
> | build-testable syntax?
>
> But I checked with eg
>
>
> http://metadata.ftp-master.debian.org/changelogs//main/g/golang/golang_1.5.1-1_changelog
>
> and few systems will have 1.5.1 yet.  Ie it probably won't Ubuntu before
> 16.04 next year.  Are there PPAs?
>
> Dirk
>
> PS Oh, and I forgot to mention that I like msgPack a lot too :)   and have
> played a little bit with C++ bindings via Rcpp.
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel