Wednesday, October 29, 2008

More on Latex tables

More issues with latex tables. I don't always agree with the placement algorithm that latex is using for my document. As a result, my tables are often placed away from related content. This is despite me using h! as a specifier. Any options?

Technorati Tags:

Tuesday, October 28, 2008

Latex Tables

Latex makes things easy if you are working on a large document. Plus, since everything is plain text, I can easily diff, merge, patch etc.. In general, I prefer latex to any WYSIWYG word processor, even though I end up running pdflatex quick often on the source.

However,  there is one item that's a real sour point. Tables. Its just not inituitive enough with Latex. Getting a nice spreadsheet view of things is a real plus point with word processors but with latex that just doesn't fly. You can use table and tabular environments, but they are still quick clumsy.

Assuming that you writing your document with emacs, the ideal scenario would be for a combination of org-tbl-mode and auctex. org-tbl-mode is really cool for tabular representation of data but just does not work with tex.

Technorati Tags:

Sunday, October 26, 2008

Uclibc vs. Glibc

I'm not sure about the differences. Lots of embedded linux products seem to use uclibc. The way I understand it, uclibc serves a particular market - embedded linux by cutting down on features that are not required. The question then is what do we lose?

We had to support both glibc and uclibc in a project sometime back. The project is still ongoing, but I seem to have forgotten what were the changes we had to make and test for.

If I have a threaded application, will it compile against uclibc? It will, but I don't know about all the differences. Will keep updating this post with differences as I come across them.

Saturday, October 25, 2008

A Stack in Erlang

I have been playing around with Erlang for a couple of weeks now. Its a really cool language and here's my first attempt at implementing a stack in it.

The basic design is to have process that gets different commands as messages, and updates the stack accordingly. Erlang being a functional language, implies that we cannot use an imperative approach. So, here's what the process looks like.

stack(S) ->
io:format("Stack:~p~n", [S]),
receive
{push, PID, Data} ->
PID ! success,
stack([Data|S]);
{pop, PID} ->
if
S == [] ->
PID ! failed,
stack(S);
true ->
[H|T] = S,
PID ! {success, H},
stack(T)
end

end.

Its pretty simple actually, but I did have a lot a trouble with push. Each push would create a list within a list, which meant that there could be only 2 pops. However, if we spawn stack with [] as that input parameter, then it works fine.

Next steps -> Get some more stack operations going. I'm going to implement a couple of functions - dup, swap, rot.

Technorati Tags:

A whole new world

This blog is about my thoughts on software, programming, project management etc.. In short, anything that related to my professional interests. What are my interests? I like different programming languages, productivity tools, documentation tools, and in general just coding. Who am I? I'm a software architect in India and this is my blog on technically, anything.