Luca's meaningless thoughts  

OTFF @ CAFF (2011-05-28)

by Leandro Lucarella on 2011- 05- 29 03:55 (updated on 2011- 05- 29 03:55)
tagged 1/15s, 1/20s, 1/30s, 2011-05-29, 24.2 mm, 36.4 mm, 48.0 mm, 49.2 mm, 70.0 mm, 8.6 mm, caff, canon powershot sx210 is, f/4.0, f/5.0, f/5.6, f/5.9, fluorescent, iso1600, live, manual, music, otff, photo, pic, tango - with 0 comment(s)

Orquesta Típica Fernandez Fierro @ Club Atlético Fernandez Fierro

LO MÁS ROCKERO EN LA HISTORIA DEL TANGO
LO MÁS TANGUERO EN LA HISTORIA DEL ROCK

=)

OTFF @ CAFF (2011-05-28) (1)

OTFF @ CAFF (2011-05-28) (1)

2011-05-29 00:35:58 ART
[ 1/15s f/5.0 iso1600 24.2 mm Fluorescent Manual ]
OTFF @ CAFF (2011-05-28) (2)

OTFF @ CAFF (2011-05-28) (2)

2011-05-29 00:36:33 ART
[ 1/15s f/5.9 iso1600 70.0 mm Fluorescent Manual ]
OTFF @ CAFF (2011-05-28) (3)

OTFF @ CAFF (2011-05-28) (3)

2011-05-29 00:40:37 ART
[ 1/20s f/5.6 iso1600 49.2 mm Fluorescent Manual ]
OTFF @ CAFF (2011-05-28) (4)

OTFF @ CAFF (2011-05-28) (4)

2011-05-29 00:46:23 ART
[ 1/30s f/4.0 iso1600 8.6 mm Fluorescent Manual ]
OTFF @ CAFF (2011-05-28) (5)

OTFF @ CAFF (2011-05-28) (5)

2011-05-29 00:49:11 ART
[ 1/20s f/5.6 iso1600 48.0 mm Fluorescent Manual ]
OTFF @ CAFF (2011-05-28) (6)

OTFF @ CAFF (2011-05-28) (6)

2011-05-29 01:10:30 ART
[ 1/20s f/5.0 iso1600 36.4 mm Fluorescent Manual ]

CDGC merged into Tango

by Leandro Lucarella on 2011- 01- 28 19:49 (updated on 2011- 01- 28 19:49)
tagged cdgc, d, dgc, en, gc, merge, patch, tango - with 1 comment(s)

Yai! Finally my CDGC patches has been applied to Tango [1] [2] [3]. CDGC will not be the default Tango GC for now, because it needs some real testing first (and fixing a race when using weak references). So, please, please, do try it, is as simple as compiling from the sources adding a new option to bob: -g=cdgc and then manually installing Tango.

Please, don't forget to report any bugs or problems.

Thanks!

CDGC Tango integration

by Leandro Lucarella on 2010- 10- 20 23:34 (updated on 2010- 10- 20 23:34)
tagged cdgc, d, dgc, en, integration, patch, tango - with 0 comment(s)

I've posted a small set of patches to integrate CDGC into Tango. If you want to try them out, just follow the simple 3 steps described in the ticket.

Please, let me know how it went if you do.

Trying CDGC HOWTO

by Leandro Lucarella on 2010- 10- 10 16:28 (updated on 2010- 10- 10 16:28)
tagged cdgc, d, dgc, dmd, en, gc, howto, makefile, patch, tango - with 0 comment(s)

Here are some details on how to try CDGC, as it needs a very particular setup, specially due to DMD not having precise heap scanning integrated yet.

Here are the steps (in some kind of literate scripting, you can copy&paste to a console ;)

# You probably want to do all this mess in some subdirectory :)
mkdir cdgc-test
cd cdgc-test

# First, checkout the repositories.
git clone git://git.llucax.com.ar/software/dgc/cdgc.git
# If you have problems with git:// URLs, try HTTP:
# git clone https://git.llucax.com.ar/r/software/dgc/cdgc.git
svn co http://svn.dsource.org/projects/tango/tags/releases/0.99.9 tango

# DMD doesn't care much (as usual) about tags, so you have to use -r to
# checkout the 1.063 revision (you might be good with the latest revision
# too).
svn co -r613 http://svn.dsource.org/projects/dmd/branches/dmd-1.x dmd

# Now we have to do some patching, let's start with Tango (only patch 3 is
# *really* necessary, but the others won't hurt).
cd tango
for p in 0001-Fixes-to-be-able-to-parse-the-code-with-Dil.patch \
         0002-Use-the-mutexattr-when-initializing-the-mutex.patch \
         0003-Add-precise-heap-scanning-support.patch \
         0004-Use-the-right-attributes-when-appending-to-an-empty-.patch
do
   wget -O- "https://www.llucax.com.ar:443/blog/posts/2010/10/10-trying-cdgc-howto/$p" |
         patch -p1
done
cd ..

# Now let's go to DMD
cd dmd
p=0001-Create-pointer-map-bitmask-to-allow-precise-heap-sca.patch
wget -O- "https://www.llucax.com.ar:443/blog/posts/2010/10/10-trying-cdgc-howto/$p" |
      patch -p1

# Since we are in the DMD repo, let's compile it (you may want to add -jN if
# you have N CPUs to speed up things a little).
make -C src -f linux.mak
cd ..

# Good, now we have to wire Tango and CDGC together, just create a symbolic
# link:
cd tango
ln -s ../../../../../cdgc/rt/gc/cdgc tango/core/rt/gc/

# Since I don't know very well the Tango build system, I did a Makefile of my
# own to compile it, so just grab it and compile Tango with it. It will use
# the DMD you just compiled and will compile CDGC by default (you can change
# it via the GC Make variable, for example: make GC=basic to compile Tango
# with the basic GC). The library will be written to obj/libtango-$GC.a, so
# you can have both CDGB and the basic collector easily at hand):
wget https://www.llucax.com.ar:443/blog/posts/2010/10/10-trying-cdgc-howto/Makefile
make # Again add -jN if you have N CPUs to make a little faster

# Now all you need now is a decent dmd.conf to put it all together:
cd ..
echo "[Environment]" > dmd/src/dmd.conf
echo -n "DFLAGS=-I$PWD/tango -L-L$PWD/tango/obj " >> dmd/src/dmd.conf
echo -n "-defaultlib=tango-cdgc " >> dmd/src/dmd.conf
echo "-debuglib=tango-cdgc -version=Tango" >> dmd/src/dmd.conf

# Finally, try a Hello World:
cat <<EOT > hello.d
import  tango.io.Console;

void main()
{
   Cout("Hello, World").newline;
}
EOT
dmd/src/dmd -run hello.d

# If you don't trust me and you want to be completely sure you have CDGC
# running, try the collect_stats_file option to generate a log of the
# collections:
D_GC_OPTS=collect_stats_file=log dmd/src/dmd -run hello.d
cat log

Done!

If you want to make this DMD the default, just add dmd/src to the PATH environment variable or do a proper installation ;)

Let me know if you hit any problem...

Bicentenario

by Leandro Lucarella on 2010- 05- 26 02:00 (updated on 2010- 05- 26 18:00)
tagged 1/100s, 1/20s, 1/320s, 1/400s, 1/40s, 1/800s, 11.5 mm, 16.1 mm, 2010-05-26, 22.4 mm, 34.9 mm, 60.0 mm, 8.2 mm, auto, bandera, bicentenario, canon powershot sx120 is, daylight, dicky james, dictadura, dragón, f/3.2, f/3.5, f/4.0, f/4.3, folclore, fuerzabruta, iso160, iso1600, iso400, iso640, madres, obelisco, photo, pic, program ae, revolución de mayo, tango - with 0 comment(s)

200 years from the Revolución de Mayo, the main parade in charge of Dicky James, creator of De La Guarda and Fuerzabruta.

More (and better) photos here.

Obelisco

Obelisco

2010-05-26 20:48:19 ART
[ 1/40s f/3.5 iso400 16.1 mm Daylight Program AE ]
Folclore

Folclore

2010-05-26 21:05:29 ART
[ 1/40s f/3.2 iso160 8.2 mm Daylight Program AE ]
Bandera

Bandera

2010-05-26 21:25:58 ART
[ 1/20s f/4.0 iso640 22.4 mm Auto Program AE ]
Dragón

Dragón

2010-05-26 21:31:03 ART
[ 1/320s f/4.0 iso1600 34.9 mm Auto Program AE ]
Tango

Tango

2010-05-26 21:44:26 ART
[ 1/400s f/4.0 iso1600 22.4 mm Auto Program AE ]
Madres

Madres

2010-05-26 22:36:32 ART
[ 1/800s f/4.3 iso1600 60.0 mm Auto Program AE ]
Dictadura (constitución y justicia en llamas)

Dictadura (constitución y justicia en llamas)

2010-05-26 22:40:10 ART
[ 1/400s f/4.3 iso1600 60.0 mm Auto Program AE ]
90's

90's

2010-05-26 22:50:45 ART
[ 1/100s f/4.0 iso1600 11.5 mm Auto Program AE ]

Naive GC fixes

by Leandro Lucarella on 2009- 05- 17 19:09 (updated on 2009- 05- 17 19:09)
tagged d, dgc, en, gc, ldc, naive, patch, statistics, tango - with 0 comment(s)

I haven't been posting very often lately because I decided to spend some time writing my thesis document (in Spanish), which was way behind my current status, encouraged by my code-wise bad weekend =P.

Alberto Bertogli was kind enough to review my Naive GC implementation and sent me some patches, improving the documentation (amending my tarzanesque English =) and fixing a couple of (nasty) bugs [1] [2].

I'm starting to go back to the code, being that LDC is very close to a new release and things are starting to settle a little, so I hope I can finish the statistics gathering soon.

Debug is hell

by Leandro Lucarella on 2009- 05- 04 00:24 (updated on 2009- 05- 04 00:24)
tagged d, debug, dgc, dmd, en, gold, ldc, parental advisory, rant, tango - with 8 comment(s)

Warning

Rant ahead.

If Matt Groeing would ever written a garbage collector I'm sure he would made a book in the Life in Hell series called Debug is Hell.

You can't rely on anything: unit tests are useless, they depend on your code to run and you can't get a decent backtrace ever using a debugger (the runtime calls seems to hidden to the debugger). I don't know if the last one is a compiler issue (I'm using DMD right now because my LDC copy broken =( ).

Add that to the fact that GNU Gold doesn't work, DMD doesn't work, Tango doesn't work [*] and LDC doesn't work, and that it's already hard to debug in D because most of the mainstream tools (gdb, binutils, valgrind) don't support the language (can't demangle D symbols for instance) and you end up with a very hostile environment to work with.

Anyway, it was a very unproductive weekend, my statistics gathering code seems to have some nasty bug and I'm not being able to find it.

PS: I want to apologize in advance to the developers of GNU Gold, DMD, Tango and LDC because they make great software, much less crappier than mine (well, to be honest I'm not so sure about DMD ;-P), it's just a bad weekend. Thank you for your hard work, guys =)

[*]Tango trunk is supposed to be broken for Linux

Naive Garbage Collector

by Leandro Lucarella on 2009- 04- 26 22:49 (updated on 2009- 04- 26 22:49)
tagged d, dgc, en, gc, howto, mark-sweep, naive, tango - with 2 comment(s)

I was working in a naive garbage collector implementation for D, as a way to document the process of writing a GC for D.

From the Naive Garbage Collector documentation:

The idea behind this implementation is to document all the bookkeeping and considerations that has to be taken in order to implement a garbage collector for D.

The garbage collector algorithm itself is extremely simple so focus can be held in the specifics of D, and not the algorithm. A completely naive mark and sweep algorithm is used, with a recursive mark phase. The code is extremely inefficient in order to keep the code clean and easy to read and understand.

Performance is, as expected, horrible, horrible, horrible (2 orders of magnitude slower than the basic GC for the simple Tango GC Benchmark) but I think it's pretty good as documentation =)

I have submitted the implementation to Tango in the hope that it gets accepted. A git repository is up too.

If you want to try it out with LDC, you have to put the files into the naive directory in tango/lib/gc and edit the file runtime/CMakeLists.txt and search/replace "basic" for "naive". Then you have to search for the line:

file(GLOB GC_D ${RUNTIME_GC_DIR}/*.d)

And replace it with:

file(GLOB GC_D ${RUNTIME_GC_DIR}/gc/*.d)

Comments and reviews are welcome, and please let me know if you try it =)