Updated Rakefile for dealing with mercurial subrepos

Previously I have described my solution for subrepos in Mercurial. It was working nicely but, a little painfully, because you had to add every single Mercurial command you like to use as Rake task. After little googleing and scratching head I have come with a much nicer and general solution: desc "Invokes any hg command on every repo." task "hg:command" rule /^hg:/ do |t| # rule selecting task starting with hg: on_repos("hg #{t.name.sub(/^hg:/, "")}") # 'hg:' is in task name so we have to erase it end # and that's all folks :D It is shorter and any command may...

Shifting bytes left in different languages

Recently I must have had a really bad day, because I wrote a very stupid line of code in java: int x = 2 << (s - 1); when I wanted something a little simpler: int x = 1 << s; It gave unexpected (for me) behavior for shifting negative number of bits. I was having hope that shifting -1 place left would be equal to shifting 1 place right. But I was wrong, and the result was always zero, no matter what number I would try to shift. After a little search I have found: Bitwise and Bit Shift...

Rakefile for dealing with mercurial subrepos

Subrepositories are quite an important things if you have any bigger project, where you can extract some libraries, modules, parts or any other such things. We have chosen Mercurial for version control, because it distributed (svn suxx ass), easy to use, and have good cross-platform support. Until version 1.3 it did not have any support for subrepositories, now it has one. It is far from perfect, but still much better than nothing. And I am sure it will get better, or eventually great. But for the time I have made quite simple Rakefile to help with subrepos. It works fine...

WYSIWYG in LaTeX with Rakefile

First tools to work with text I have learned where WYSIWYG and everywhere I looked they were praised. I really did not know the alternative and could not think a reason for it to exist in time of fast computers. But when I was exposed to LaTex I have instantly fell in love. Compared to Word it produces astonishingly beautiful output, takes whole of issues away (numbering, chapters, pages with one sentence on it, positioning pictures and many, many more) and lets you focus on content (and structure) not on the final look (just like WriteBoard, I am using right...
[Valid Atom 1.0]
Fork me on GitHub