Tuesday, October 16, 2012

Strange 3 year CPAN cycle

I was just uploading a dev version of Protocol::TWS when I saw that my CPAN files are either from 2003, 2006 or 2009 (and now 2012). That is a strange coincidence.

Time to break this cycle, my goal for 2013: uploading something to CPAN :)

Saturday, May 5, 2012

Perl Finance - announcing AnyEvent::TWS and Protocol::TWS

I know there are already two CPAN modules to access InteractiveBrokers Traders Workstation (IB TWS) API:
And both of them work, I used them successfully.

But the API is just \0 terminated lines over a socket, so I always wanted to write a pure Perl API for it.

The data structures, request and response messages are in Protocol::TWS (which later also could generate suitable objects for the two native APIs). And AnyEvent::TWS is an asynchronous pure Perl implemenation of the TWS API.

It is still in the early stages, but you can already play around with it. For example with contract.pl (in AnyEvent::TWS). Just correct the include path and the IP (localhost is default).

$ perl contract.pl -s IBM -t OPT -st 150 -r PUT
conId:  78782644
symbol: IBM
expiry: 20130118
strike: 150
right:  P

conId:  94203928
symbol: IBM
expiry: 20140117
strike: 150
right:  P

conId:  97819043
symbol: IBM
expiry: 20120720
strike: 150
right:  P

conId:  102789332
symbol: IBM
expiry: 20121019
strike: 150
right:  P

conId:  104498834
symbol: IBM
expiry: 20120518
strike: 150
right:  P

conId:  106288439
symbol: IBM
expiry: 20120615
strike: 150
right:  P

The parameters are -s (symbol), -t (security type), -st (strike), -r (right PUT/CALL) and some more (just look in the source code).

You can also request historical or current market data and place trades. But do not use it with your real money account, for sure there are lots of bugs in it.

Saturday, April 28, 2012

I registered a talk for YAPC::EU in Frankfurt

Last year I gave the same presentation (HTML5::Sanitizer) on GPW, YAPC::NA and YAPC::EU. This year I will give a different talk on every conference I attend (GPW and YAPC::EU).

I just registered "Hunting segfaults (for beginners)". This is the abstract:
Segfaults are nasty, sometimes they are hard to detect or hard to narrow down.
This beginner level talk (in regard to segfaults) will show two ways to narrow them down: Devel::Trace and core dumps plus gdb.

Thanks to my colleague plu for the idea (and research).

Saturday, February 4, 2012

Next Perlmongers Hamburg meeting - 20.02.2012

It is a little bit on short notice, but on the first Monday of February (our usual date) there won't be a meeting. Neither on the first Monday of March (because of the German Perlworkshop in Erlangen).

The next meeting will instead take place on the third Monday, 20th of February at 6 p. m. at XING, Gaensemarkt 43. I will give a preview of my German Perlworkshop talks:

  • Mojo::UserAgent (covering parallel requests and the mojo command line tool)
  • memory consumption of perl modules (Devel::Loading + Memory::Usage) (lightning talk)
Both talks will be in German. And in April we will return to our usual schedule (first Monday of the month).

Thursday, February 2, 2012

Review of our Mojolicious workshop

Our Mojolicious workshop took place at Sathurday, 28st of January. We were 10 participants.

I did not choose the example projects wise enough, so a lot of time was spent with installing necessary stuff. Next time I have to better prepare it. (I'm thinking about sample tasks and a test suite for it - so everybody can work in his own pace.)

Next time? Yes, there will be a successor, in the second half of the year Stefan Hornburg will give an introduction to Dancer!

We would like to do it again in the rooms of Attraktor e.V. - thanks a lot, guys (especially Jens, Elmar and Robert).

Update: slides

Saturday, January 7, 2012

Mojolicious workshop

The Hamburg Perlmongers will be doing an Mojolicios workshop. Introduction is by Marcos Rebelo.

Save the date: Sathurday 28th of January 2012, 10:00 a.m.