weblog d’un abbe

20101113

BitlBee 3.0 and SRV lookups

Filed under: Fun, Hacking — Tags: , , , , , , , , — abbe @ 1023

As BitlBee 3.0 is released and has now included OTR support :), I don’t have to maintain bitlbee-otr anymore. For FreeBSD, I noticed, the SRV DNS records lookup support is not compiled in by default, so I submitted a diff to upstream and the maintainer. For users of irc/bitlbee port, who want to try SRV lookup support can try the port diff.

Let me know if you experience any issues or have any questions.

20100706

BitlBee OTR 1.2.8 Released

Filed under: Fun, Hacking — Tags: , , , , , , , — abbe @ 0659

Just finished integrating OTR support code from bitlbee-otr into bitlbee-1.2.8, and is available as bitlbee-otr-1.2.8.tar.bz2 (sha256sum: f09a88be7d995a0cc489ee9bea4ac49dc326c1b2e9396a8e7cc886b3894883a3 , md5sum: 1273e7861f393473c5060f5ec5d6c214). PR for FreeBSD port is not needed anymore. The tarball can be downloaded from:

Thanks to SourceForge and Veniamin (aka zloidemon) for hosting the tarball.

UPDATE: FreeBSD port irc/bitlbee-otr is updated.

20100517

BitlBee OTR 1.2.7 Released

Filed under: Fun, Hacking — Tags: , , , , , , , — abbe @ 1410

Just finished integrating OTR support code from bitlbee-otr into bitlbee-1.2.7, and is available as bitlbee-otr-1.2.7.tar.bz2 (sha256sum: 2cb8817e98e5ac40dda1f3e8c7a76ae1ed421c265c85e2455c4f3080b9e99982, md5sum: 063d849c4011c599c4980eda87f0e0b4). PR for FreeBSD port needs to be submitted. The tarball can be downloaded from:

Thanks to SourceForge and Veniamin (aka zloidemon) for hosting the tarball.

UPDATE: The corresponding FreeBSD PR is ports/146666.

20100421

BitlBee OTR 1.2.6a released

Filed under: Fun, Hacking — Tags: , , , , , , , — abbe @ 1538

Just finished integrating OTR support code from bitlbee-otr into bitlbee-1.2.6, and is available as bitlbee-otr-1.2.6a.tar.bz2 (sha256sum: ab8bb786fcd34f87c4b8056b3786d896ee7aeae7fc21d09a49d3be920891c135, md5sum: 3419f352a8dfc06b1bd1954ddeb9ee34). The corresponding FreeBSD PR is ports/145911. The tarball can be downloaded from:

Thanks to SourceForge and Veniamin (aka zloidemon) for hosting the tarball.

20100323

BitlBee OTR 1.2.5 released

Filed under: Fun, Hacking — Tags: , , , , , , , — abbe @ 1822

Just finished integrating OTR support code from bitlbee-otr into bitlbee-1.2.5, and is available as bitlbee-otr-1.2.5.tar.bz2 (sha256sum: 93d283ff829decf6ee8c89d23f4ad441f3a6c24820bba8ea9580e738865bf605, md5sum: 26c20921ff586fcd5253a324f33bde1b). The corresponding FreeBSD PR is ports/144975. The tarball can be downloaded from:

Thanks to Veniamin (aka zloidemon) for hosting the tarball.

20090309

Pencil on FreeBSD

Filed under: Fun, Hacking — Tags: , , , , , — abbe @ 2028

Someone recently mentioned to me about using a proprietary GUI mockup tool, which reminded me I’ve to port Pencil to FreeBSD. So I’ve submitted a PR for the port. Happy sketching GUIs…;)

20090219

256 colors xterm

Filed under: Fun, Research — Tags: , , , , , , , , — abbe @ 1259

I’m using xterm in 256-color mode since a month. And I noticed that whenever I log in to any of the remote boxen (via ssh) from my xterm, I started getting WARNING: terminal is not fully functional, whenever I use less, screen, etc. curses applications. So this means xterm-256color (xterm in 256 color) terminfo is not available in the remote box. Now in most of the remote boxen, I don’t have superuser access, which means I can’t install this terminfo systemwide. So after going through terminfo(5) I figured out that I need to install this terminfo in my $HOME (at remote end) to get desired functionality. For that I did:

% ssh server mkdir -p .terminfo/x
% scp /usr/share/terminfo/x/xterm-256color server:.terminfo/x/

Thats it. Now I don’t get that warning anymore and I can use Emacs/vim in 256-colors :) . What more do you want from 256-colors life…:)

20090131

This posting may harm your computer

Filed under: Experiences, Fun — Tags: , , — abbe @ 2036

Google goes mad

20090125

Instantaneous fortune

Filed under: Fun — Tags: , — abbe @ 1419
XVI:
        In the year 2054, the entire defense budget will purchase just one
        aircraft.  This aircraft will have to be shared by the Air Force and
        Navy 3-1/2 days each per week except for leap year, when it will be
        made available to the Marines for the extra day.
XVII:
        Software is like entropy.  It is difficult to grasp, weighs nothing,
        and obeys the Second Law of Thermodynamics, i.e., it always increases.
XVIII:
        It is very expensive to achieve high unreliability.  It is not uncommon
        to increase the cost of an item by a factor of ten for each factor of
        ten degradation accomplished.
XIX:
        Although most products will soon be too costly to purchase, there will
        be a thriving market in the sale of books on how to fix them.
XX:
        In any given year, Congress will appropriate the amount of funding
        approved the prior year plus three-fourths of whatever change the
        administration requests -- minus 4-percent tax.
                -- Norman Augustine

20081216

Hacking a codegen

Filed under: Experiences, Fun, Hacking, Yippee!! — Tags: , , , , , , — abbe @ 0456

So, finally I’ve hacked a basic AMD64 code generator, after so many tries. This code generator is hacked in Common Lisp, and is currently generating a code for a very simple toy like language. I’ve not written any grammar specification for it. It is a LISP like language. This piece of code generator is dedicated to one of my cool friend Edwin Jose, and is thus named as louzer. Following is an example of the language for which louzer generates code.

(source
	 (let principal rate time amount x)
	 (= principal 1000)
	 (= rate 10)
	 (= time 100)
	 (= x 100)
	 (= amount
		(/ (* principal (* rate time))
		 100))
	 (print "Amount (%d) - %d is %d.\\n"  amount x (- amount x))
	 (print "Hello World, louzer\\n"))

The language code is also embedded along with the source code in the LISP file. Following is how I’m using it with GNU clisp implementation:

% clisp louzer.lisp |tee test.S
.section .text
.extern printf
.type main,@function
.globl main
main:
 pushq %rbp
 movq %rsp, %rbp
 subq $40, %rsp
 movq $1000, %rbx
 movq %rbx, -8(%rbp)
 movq $10, %rbx
 movq %rbx, -16(%rbp)
 movq $100, %rbx
 movq %rbx, -24(%rbp)
 movq $100, %rbx
 movq %rbx, -40(%rbp)
 movq -16(%rbp), %rbx
 imul -24(%rbp), %rbx
 imul -8(%rbp), %rbx
 movq %rbx, %rax
 movq $100, %rbx
 xorq %rdx,%rdx
 idiv %rbx
 movq %rax, -32(%rbp)
 leaq __string_0,%rdi
 movq -32(%rbp), %rsi
 movq -40(%rbp), %rdx
 movq -32(%rbp), %rbx
 subq -40(%rbp), %rbx
 movq %rbx, %rcx
 xorq %rax,%rax
 call printf
 leaq __string_1,%rdi
 xorq %rax,%rax
 call printf
 xorq %rax, %rax
 movq %rbp, %rsp
 popq %rbp
 ret
.section .rodata
__string_1: .string "Hello, louzer World\n"
__string_0: .string "Amount (%d) - %d is %d.\n"
/* Generated by louzer :) */

Above is the piece of AMD64 assembly code emitted by the louzer. So, now time to assemble and link the above assembly code and generate the output of the above code.

% cc -o test test.S
% ./test
Amount (10000) - 100 is 9900.
Hello, louzer World

Voila. Oh, sorry to keep you waiting, now you can download the louzer.lisp and have fun. BtW, code is not perfect and has couple of limitations, which I’ve not fixed due to lack of time, as I’ve an exam day after tomorrow. So, I’ll be able to work on it only after 20081219. Happy hacking codegens…;)

NOTE (for Grammar Nazis): Forgive me for any grammatical mistakes you encounter above, and ofcourse point out the mistake :).

P.S. Forgot to mention, you’ll need an AMD64 architecture CPU, toolchain and POSIX OS to test out above stuff.

Older Posts »

Blog at WordPress.com.