Monday, August 30, 2010

Gentoo ebuild for Yamdi

Ebuild for Yamdi 1.5 — Yet Another Metadata Injector for FLV

yamdi

Monday, June 28, 2010

Gentoo ebuild for OCaml Batteries

Ebuild for OCaml Batteries 1.2.2 — replacement of OCaml stdlib

batteries

Monday, August 17, 2009

Erlang OTP: Megaco digit map handler

Erlang OTP Megaco (H.248) stack has digit map handler which starts up with given digit map, receives dialing events then returns result of dialing. To better working with digitmap let's wrote wrapper:

start(Pid) ->
start_dm_proc(Pid, "(8|0x|[0-79]xxxxx|8xxxxxxxxxx|[0-9]x|E|F|x.F|[0-9].L)", 0, 2, 3, 100).

start_dm_proc(Pid, DM, St, Sh, Ln, Dr) ->
DMV = #'DigitMapValue'{startTimer = St, shortTimer = Sh, longTimer = Ln, digitMapBody = DM, durationTimer = Dr},
spawn(?MODULE, tde_proc, [Pid, DMV]).

tde_proc(Pid, DMV) ->
Res = megaco:eval_digit_map(DMV),
gen_fsm:send_event(Pid, {dial_result, Res}).


Spawned tde_proc/2 (with parent process ID and digit map) can receive digit-events with function megaco:report_digit_event/2 call with eval process ID and dialed digit symbol:

megaco:report_digit_event(EvalPid, Evt)


When reported digits matches with digit map, megaco:eval_digit_map/1 returns such result as: {ok, {full, Number}} or {ok, {unambiguous, Number}} if '#' pressed (dial event 'F').

gen_fsm:send_event(Pid, {dial_result, Res}) sends this result to parent process.

Wednesday, August 05, 2009

Friday, July 03, 2009

Gentoo ebuild for rst2pdf

Ebuild for rst2pdf — Tool for transforming reStructuredText to PDF using ReportLab

rst2pdf

New gentoo ebuilds for RabbitMQ server and client

RabbitMQ server and client version 1.6.0 ebuild in ngerakines gentoo overlay

rabbitmq-server
rabbitmq-client

Python AMQP-related gentoo ebuilds

Gentoo ebuilds for qpid-python, txAMQP and amqplib — python libraries for AMQP
http://github.com/Zert/zert-portage/tree/master

Friday, June 05, 2009

Paste on showmecode.com is easy now

Simple Python script which pastes code on showmecode.com with support of syntax highlighing: showmecode.py

Friday, May 29, 2009

Dialyzer warning: no local return

When you have analyzing erlang beams with a dialyzer and see that warning:

module.erl:51: Function init/1 has no local return

check out all used records in this function for right type definitions of its items. For example, if record defined as

-record(state, {
name :: string(),
data :: binary()
}

and usage of state is

init([]) ->
{ok, #state{name = "Name", data = "Data"}}

this warning will appears.