Tag: D

data.d – unmanaged memory wrapper for D

by on Jul.15, 2010, under Code

I have written a module containing classes to manage raw data in external memory. It provides semantics similar to built-in void[] arrays, but has the following advantages:

  • Faster allocation and deallocation, since memory is requested from the OS directly as whole pages
  • Greatly reduced chance of memory leaks due to stray pointers
  • Overall improved GC performance due to reduced size of managed heap
  • Memory is immediately returned to the OS when data is deallocated

Source and more info here: http://github.com/CyberShadow/data.d

Leave a Comment :, more...

Import Wikipedia page history to git

by on Jun.16, 2010, under Code

I’ve written a small tool which downloads the history of a Wikipedia article, converts it and imports it into a new git repository. The main motivation behind writing it is being able to perform a per-line blame of the article’s history. I had tried levitation, but that tool seemed to be oriented towards large imports (or it might just be buggy), as it attempted to create huge binary files and ran longer than my patience would allow when I gave it the history of just one article. Also, I wanted the tool to take care of the downloading and importing part – so I could be one command away from a git repository of any WP article.

The tool can be made faster (all the XML and string management stuff adds an overhead), but right now it’s fast enough for me. One thing that can be optimized is making it not load the entire input XML into memory – it’s possible to do the conversion by “streaming” the XML. Another current limitation is that it’s currently hard-wired to the English Wikipedia.

Requires curl and (obviously) git. You’ll need a D1 compiler to compile the code.

Get it here: http://github.com/CyberShadow/wp2git

Leave a Comment :, , , , more...

Announcing: RABCDAsm

by on May.05, 2010, under Code

RABCDAsm (Robust ABC (ActionScript Bytecode) [Dis-]Assembler) is a collection of utilities including an ActionScript 3 assembler/disassembler, and a few tools to manipulate SWF files.

This package was created due to lack of similar software out there.
Particularly, I needed an utility which would allow me to edit ActionScript 3 bytecode (used in Flash 9 and newer) with the following properties:

  • Speed. Less waiting means more productivity. rabcasm can assemble large projects (>200000 LOC) in under a second on modern machines.
  • Comfortably-editable output. Each class is decompiled to its own file, with files arranged in subdirectories representing the package hierarchy. Class files are #included from the main file.
  • Most importantly – robustness! If the Adobe AVM can load and run the file, then it must be editable – no matter if the file is obfuscated or otherwise mutilated to prevent reverse-engineering. RABCDAsm achieves this by using a textual representation closer to the ABC file format, rather than to what an ActionScript compiler would generate.

Read more on the project’s homepage on GitHub.

33 Comments :, , , , , more...

TimeTracker – minimalistic time-tracking

by on Apr.21, 2010, under Code

Starting with a new hourly-paid freelancing job, I needed some software to track the amount of time I spend working. I tried a few time tracking programs out there, but they all turned out to be bloated and clumsy (not to mention not open-source), so I decided to roll my own. (continue reading…)

1 Comment :, , , more...

ColorCalc – command-line calculator for colors

by on Apr.04, 2010, under Code

If you’re one of the few crazies like me who prefer doing web development using command-line tools, you might appreciate this simple command-line calculator which can operate on RGB colors. It supports the 4 basic arithmetic operations and grouping using parens. (continue reading…)

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the blog: