Re: [ANN] thi.ng/crypto - GPG/OpenPGP keypair generation, file/stream encryption helpers

2014-10-24 Thread JPH
GPG integration is a requirement for an upcoming project. Glad to have
two options to choose from!

If you end up collaborating, please share your planned path forward so I
know which project to track. :)

On 10/23/2014 03:45 PM, Karsten Schmidt wrote:
 W00t! Thanks for the heads up! That looks far more fully featured
 indeed... bookmarked!

 Btw. I did search GH for clojure gpg and nothing turned up, should
 have searched for PGP instead... oh well! :)

 On 23 October 2014 18:18, Andrey Antukh n...@niwi.be wrote:
 Hi Karsten

 There it already exist that: https://github.com/greglook/clj-pgp
 And not directly related to pgp but reladed with bouncycastle and encryption
 api: https://github.com/niwibe/buddy

 Would be awesome to colaborate!

 Greetings.
 Andrey

 2014-10-23 18:26 GMT+02:00 Karsten Schmidt i...@toxi.co.uk:
 Hi all, just a quick heads up for those who might want to integrate
 some encryption features into their projects and not struggle with a
 complex Java API to do so. This small library provides some utility
 functions atop of Bouncycastle's OpenPGP provider:

 http://thi.ng/crypto

 Example:

 (require '[thi.ng.crypto.core :refer :all])

 ;; generate a new RSA keypair, private w/ identity  passphrase, save
 as armored files
 (- (rsa-keypair 2048)
 (generate-secret-key al...@example.org hello)
 (export-keypair alice.pub.asc alice.sec.asc true))
 ; = nil

 ;; create dummy file
 (spit foo.txt hello world!)
 ; = nil

 ;; note: for files `encrypt-file` can be used alternatively,
 ;; but `encrypt-stream` is more general purpose
 (encrypt-stream foo.txt foo.gpg (public-key alice.pub.asc))
 ; = nil

 ;; decrypt with secret key  passphrase
 (decrypt-stream foo.gpg foo-decrypted.txt (secret-key
 alice.sec.asc) hello)
 ; = #BufferedOutputStream java.io.BufferedOutputStream@5dbe43af

 (slurp foo-decrypted.txt)
 ; = hello world!

 Best, K.
 --
 Karsten Schmidt
 http://postspectacular.com

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



 --
 Andrey Antukh - Андрей Антух - andrei.anto...@kaleidos.net /
 n...@niwi.be
 http://www.niwi.be
 https://github.com/niwibe

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Programmable drones with Clojure/Java support?

2014-10-14 Thread JPH
Thanks for the amazingly detailed response John!

And here's some related news for good timing:
http://www.suasnews.com/2014/10/31767/linux-foundation-and-leading-technology-companies-launch-open-source-dronecode-project/.
I wonder how much of this is accessible via Clojure?


On 10/14/2014 01:08 PM, John Wiseman wrote:
 Hi, JPH.  I'm interested in clojure + drones too.  I'll try to describe the
 relevant parts of the current landscape as I see it.

 Unless you're writing your own firmware, at the moment most higher level
 drone programming is done with libraries that communicate with a remote
 drone, over a comms link:

- clj-drone https://github.com/gigasquid/clj-drone. The Clojure
library by Carin Meier/gigasquid that speaks the AR.Drone protocol.
Includes some computer vision (with OpenCV) and belief-oriented 
 programming.
- turboshrimp https://github.com/wiseman/turboshrimp.  My fork of
clj-drone.  Fewer dependencies (OpenCV is not required) and can run on
Android.  Focuses more on drone control/protocol without mixing in higher
level concepts like belief-oriented programming.  Supports receiving
telemetry data from AR.Drone, like altitude, speed, heading, GPS location,
onboard vision capabilities (marker identification), etc.
- mavjava
https://github.com/geeksville/arduleader/tree/master/thirdparty.  A
Java library that implements the MAVLink protocol, which is the currently
the leader in the open drone communications protocol category.  MAVLink
is spoken by a lot of different drone systems including APM
Autopilot/Arducopter/Arduplane http://ardupilot.com/ by 3D Robotics
and PIXHAWK/PX4 https://pixhawk.ethz.ch/ by ETH.  The AR.Drone
supports a subset of MAVLink.
- Drone API http://dev.ardupilot.com/wiki/droneapi-tutorial/.  This is
a Python library that speaks MAVLink but provides higher-level
functionality for management of waypoints, etc.  It's Python, but is
relevant because MAVLink is a rather low-level, somewhat annoying protocol
and this code will be useful to look at if you want to build higher level
abstractions on top of MAVLink.

 The AR.Drone is a fun platform because the API is easy, the drone itself
 has a lot of functionality (video, wifi, GPS) and can be flown indoors.  It
 usually just works. It has an ARM CPU running Linux and has USB, which
 makes it easy to cross-compile your own code, run it on-board, and
 interface to other hardware.  E.g. see these experiments with connecting a
 software defined radio to the drone so it can pick up aircraft
 transponders: Augmented Reality Display of Air Traffic for Drones
 http://lemondronor.com/blog/indexphp/2013/5/augmented-reality-display-of-air-traffic-for-drones
 and Cheap ADS-B on Amateur Drones
 http://lemondronor.com/blog/indexphp/2013/4/cheap-ads-b-on-amateur-drones.
 The AR.Drone is limited by wifi range and payload capability, and it is
 closed software and hardware.

 APM Autopilot is the current leader of open source drone hacking.  It runs
 on lots of different drone platforms (including the AR.Drone) and is open
 hardware and software.  The comms links are typically 1 km/line of sight,
 and there are a variety of payloads available.  The software is very
 capable, though it's not always stable.  The development process is
 maturing, but it still has a way to go (today's announcement of the
 creation of the Dronecode foundation https://www.dronecode.org/about is a
 good sign).  It uses the NuttX OS on really limited hardware (168 MHz
 Cortex M4F CPU w/ 256 KB RAM, compared to the AR.Drone's 1 GHz ARM Cortex
 A8  w/ 1 GB RAM), which is annoying, though they have just started
 experimenting with a port to Linux on a Beaglebone Black.  An example of
 some awesome hacking using APM is the search  rescue work done by
 CanberraUAV http://canberrauav.org.au/2014-uav-challenge/.

 The PX4FMU autopilot is by the same group that came up with the PX4
 hardware that APM Autopilot currently uses, and while it's probably not as
 mature as APM it seems to have a lot of potential.

 My current project is porting this demo I did last year of voice control of
 an AR.Drone, using Python running on a laptop, to clojure running on an
 Android phone: https://www.youtube.com/watch?v=uhBa11gdbeU


 John





 On Mon, Oct 13, 2014 at 8:20 PM, JPH j...@hackworth.be wrote:

 I watched Carin Meier's great talk last year at OSCon on The Joy of
 flying robots with Clojure
 (http://www.youtube.com/watch?v=Ty9QDqV-_Akhtml5=1), and seen her work
 on clj-drone (https://github.com/gigasquid), and have wanted a hackable
 drone ever since.

 I'm now in a position to purchase one, and was wondering what the
 options were if I wanted a programmable drone (ideally with Clojure).

 The Google namespace for clojure drone is dominated by clj-drone,
 which is designed for AR Parrot (http://ardrone2.parrot.com/), but my
 searches haven't found much else. Are there any / many

Programmable drones with Clojure/Java support?

2014-10-13 Thread JPH
I watched Carin Meier's great talk last year at OSCon on The Joy of
flying robots with Clojure
(http://www.youtube.com/watch?v=Ty9QDqV-_Akhtml5=1), and seen her work
on clj-drone (https://github.com/gigasquid), and have wanted a hackable
drone ever since.

I'm now in a position to purchase one, and was wondering what the
options were if I wanted a programmable drone (ideally with Clojure).

The Google namespace for clojure drone is dominated by clj-drone,
which is designed for AR Parrot (http://ardrone2.parrot.com/), but my
searches haven't found much else. Are there any / many alternatives to
AR Parrot if I want to program one in Clojure/Java?

JPH

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: What's clojure killer app? I don't see any.

2014-04-21 Thread JPH
I think that because of Clojure's resistance to heavy-weight frameworks,
you won't necessarily see a killer app in the way Rails was for Ruby.

I think the killer feature of Clojure is the sum of its parts. At first
glance it's hard to immediately see the value, but once you start
plugging together reliable components, taking advantage of the Java
interop and tooling from Leiningen, the advantages begin to appear.

This doesn't make it easy to advocate until you've first sold your
audience on the value of Clojure principles: functional, simple, immutable.

On 04/20/2014 12:15 AM, Paulo Suzart wrote:
 Hi all, (warning, this is kinda confusing email)

 Been following the list for some time and specially paying attention to
 what could be the killer clojure app as Akka is for Scala.

 I keep seeing small libs (I like libs) popping up like ants, but I don't
 believe none of them (alone at least)  can make clojure explode and become
 main technology in a old school /ordinary company.

 People say clojure is good for data. But where are the cases? And more
 specifically, where are the frameworks and libs to support it? Are they
 talking about wrappers around java for Hadoop? Sigh...

 Pulsar is quite dead, core async isn't clear regarding remoting, and avout?
 And lamina? And aleph? Where are the tools that can make clojure to cover
 from Web to big data and batch?

 Luminous,  caribou, etc, are they going to become the next grails? Huumm..
 Will take lot of time. Clojure Script alone will not go any further than
 the current server side.

 What made me give up scala was Scalaz, and I hope the create thousand
 disconnected libs and publish a post with ANN sufix approach doesn't make
 me give up clojure.

 Sorry guys, I've been posting about Clojure since 2009, and still can't see
 it becoming the main technology even being the CTO of the company.

 What is the killer app for you? Or how do you think we can make clojure
 supporting apps like Facebook or something big like that?


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Writing tests for a live trading API?

2014-03-26 Thread JPH
Hi all. I'm still relatively new to Clojure and I haven't spent much
time on testing before. I've recently written some libraries to talk to
Bitcoin exchanges (clj-havelock, clj-btce, cryptick), and I'd like to
add tests to them.

I'd like some advice around how to test against a live service (there is
not test service available) where there's a financial impact if
something goes wrong (someone buys/sells by accident).

My manual REPL-testing usually involve creating several orders with
price spreads that are unlikely to execute. For instance, selling 1
Litecoin for 1 Bitcoin. Buying 1 Bitcoin for $5 USD.

My concern is if someone runs the tests with bad inputs, resulting in
real orders being executed.

I can write tests that pull in API credentials from a file in my home
directory, and define price ranges for orders outside the normal spread.
These could then be fed into the tests. However, would it be better to
try and mock the trading API responses rather than do it live? Or
perhaps require a flag to run dangerous tests?

Ultimately I want to be able to demonstrate the libraries are mature
with good test coverage, but I'm worried about the right approach. Any
advice would be appreciated.

Thanks in advance,
JPH




-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Woops

2014-03-26 Thread JPH
Sorry all, somehow I hit the send button multiple times while editing.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How did you learn Clojure?

2014-03-21 Thread JPH
The example I use for starting a new language is talking to a remote
JSON API. Plenty to choose from, lets you experiment with libraries
(http, json), and work with data structures.

Also having lein new myapp speeds things along, since you're not
paralyzed on how to begin.

JPH

On 03/21/2014 09:08 AM, Marcus Blankenship wrote:
 Hi Folks,

 I'm a post technical PM who's fascinated by Clojure, and want to learn it, 
 but am having a hard time without a real project to work on. It's actually 
 excited me so much I'm considering hanging up my PM hat and diving back in 
 the programmer pool again!

 My problem appears to be 1) focus, and 2) fear. Focus because I can't (yet) 
 earn a living on a clojure project, so it must be done during off hours. 
 Fear because it's harder and more different than the old OO languages I've 
 used in the past. 

 So I'm curious: how did you learn Clojure well enough to be proficient with 
 it, or how are you working on learning it?

 Anyone else facing the focus + fear dilemma?

 Sent from my iPhone


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I want to get sha1 of a string

2014-03-01 Thread JPH
I've had good experiences with https://github.com/xsc/pandect.

You can also use Java interop like this:
https://gist.github.com/prasincs/827272

JPH


On 03/02/2014 12:26 AM, action wrote:
 do like this:
 (ns clojurewerkz.support.hashing
   (:require [clojurewerkz.support.internal :as i])
   (:import [com.google.common.hash Hashing HashFunction HashCode]))
 but:
 FileNotFoundException Could not locate clojurewerkz/support__init.class or 
 cloju
 rewerkz/support.clj on classpath:   clojure.lang.RT.load (RT.java:443)
 how to set the dependencies, or other solution?

 Think you



-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Latest web framework for clojure

2014-02-25 Thread JPH
On 02/26/2014 09:13 AM, Aravindh S wrote:
 Hi All,
I have been reading clojure for sometime now. I am at a point where I 
 want to learn a web framework. I see many options available for clojure 
 where few are built upon others. So if I am to learn one, which framework 
 does the community recommend? 

 Thanks
 Aravindh.S

I recommend Luminus (www.luminusweb.net), which is an opinionated mix of
popular clojure libraries.

I also wrote a post as a kind of overview of the various Clojure web
components
(https://hackworth.be/2013/12/10/navigating-clojure-web-stack/). That
was written back when I'd first started with Clojure and trying to
understand how all the pieces fit together, compared to my experiences
with Ruby.

Hope that helps,
JPH

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.