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.

Thursday, August 18, 2011

YAPC::EU 2011 - day 3

The last day started with Jesse Vincent's "Perl 5.16 and Beyond". I was expecting the same talk as in Asheville (YAPC::NA), but it wasn't. He explained his plans for a traditional and minimal Perl. The traditional Perl would be like today (with all the core modules). The minimal one would just contain enough to get CPAN started. That is a great change! Also, some functionality (UNIX process functions, sockets, formats) could get extracted into modules. This would lead to a leaner Perl C source. I absolutely like this decision!

Next was Steven Jenkins (from Venda) with "Modern Perl - getting there from here". The abstract sounded better than the talk actually was. He talked about some problematic areas in the Venda code base and what they did about it. Unfortunately it contained almost no general advice.

After that, I attended Thomas Klausner's talk about text fixtures. He talked about file system and database fixtures and refactoring tests with own modules. For database fixtures he recommended transactions (and rollback).

Before the lunch break Matt S. Trout talked about Data::Query. He started with the history of DBIx::Class and later talked about Data::Query and the future integration into DBIC. There is already a 'dq' branch at SQL::Abstract. He mentioned Booking.com is still using a private Class::DBI fork. And I wrote down this quote: "Monkey patching is completely fair, if the line starts with 'local'." I like it! :)

In "I <3 my community" Mark Keating talked about last years London Perl Workshop and mentioned/thanked members of the Perl community.

Next was Clinton Gormley with "Terms of endearment - the ElasticSearch query language explained". He had a nice demo application we could try on his Laptop (also on GitHub). He compared (and explained) filters and queries.

Last talk before the lightning talks was Abigail with "The Business Aware Programmer". I did not attend this talk in Asheville, but I knew from a blog post that this talk was controversial. So I was looking forward to it (and indeed, Abigail could not finish in time because of upcoming discussions). I wrote down one quote from the audience: "Your crappy code makes smart people not want to work for booking.com", which sums up the disagreement nicely. If I find the tuits I will write a whole blog post about it, as some of his points are valid (but we developers want to believe otherwise).

The lightning talks included MetaCPAN.org, Net::DRI, White Camel Awards and Acme::ASM.

Matt was closing the conference with his "State of the Velociraptor" talk. This time it was almost the same talk as in Asheville. A few attendees brought the WebGUI octopus with them and threw it at mst again. Even Larry landed a shot. :)

Thanks to the organizers for a fantastic conference. Next years YAPC::EU will be in Frankfurt/Main, Germany.