Nemerle
Nemerle is a wonderful .NET programming language that combines powers of functional, object oriented and imperative languages plus has a really impressive macro facility. Below you can find some programs/libraries I've written for/in Nemerle [not many though].
- NBuild - a very simple build system I use for my own projects [rewritten in Tcl]
- Kitsu.LateBinding - a macro that lets you use late binding in Nemerle. [now part of nemerle]
- nemerle-encoding-detection.patch - patch against r6449 that lets you specify source file encoding, mostly the same as what I wrote for Boo. [rejected]
- nemerle-backports-0.9.3.patch - some of my patches backported to 0.9.3, includes: fix for upcast, fix for empty struct, improvement when no static constructor, no immutable attribute for literal fields, fix/improvement for regexp match, fix for cs2n Makefile (to compile using mingw), support for Nemerle.Late (as of 2006/07/27).
- Kitsu.Excel.zip - a library I wrote to simplify most of my tasks with Excel transformations.
- Kitsu.ExcelWatcher.zip - a simple utility to watch over Excel files. Checks each file each specified interval and pops up balloon telling how many changes there were since you last saved that Excel files. Works on shared Excel files only, actually.
Boo
Boo is another great .NET programming language that is wrist friendly and has a lot of interesting features (duck typing, for example, has native explicit support in Boo), but after I discovered Nemerle I decided to move my projects to it, so there's not much I'm doing for Boo now. Below are patches that might be useful for people interested in Boo (features/bug fixes which have not yet got in trunk, and which may never do).
- boo-encoding-detection.patch - patch against r2300 that lets you specify python-style source file encoding (might be useful if your favourite editor does not support unicode [by default boo treats source files as UTF-8 if there's no BOM] but you want national strings embedded).
Tcl
Oh my, Tool Command Language is a bless I discovered long ago! :) There even were times when I was using it for almost all of my tasks at work, and it indeed is a powerful beast. =^_^= Not that I do much with it these days, though (since I discovered .NET I mainly program my utilities in .NET languages), but there are some things others might find useful. :)
ChangeLog:
- 2006/11/17
- fix copyrights to include my real name
- df-dirmtime rewritten in python
- turn df-common into a package
- change line endings to unix
- release an all in one package
- 2006/07/26
- fix typo in svn-brush
- get rid of tabs in sources
- new tool: cvs-relocate
- fix api change in df-filetool
- fix another old error in df-filetool
- fix nbuild incorrect comment behaviour
- 2006/07/23
- indentation change in sources (cosmetic, so that editing in emacs is easier)
- API change/new in df-common, exceptions are now part of it (used in some projects from now on)
- some minor source changes due to API changes
- new program: svn-brush
- new program: nbuild
Stuff:
- df-tcl.tar.bz2 - an all in one package (copy of my local svn repository).
- df-tcl-stub.c - a small stub, compilable with any windows compiler (I hope) that lets you execute your scripts like executables. So if you have, for instance, your tool mytool.tcl, just compile this stub into mytool.exe and then when you want to execute it, just type mytool in command prompt (provided stub is in the PATH). Can be used for .tcl, .kit and files without extensions. Runs scripts with either tclsh (prefered) or tclkitsh (when tclsh not found), which need to be in your PATH.
- df-common.tcl - a small sourceable library with some useful functions I found I often use. :) Didn't make it into a package because I don't want it to be a package, just source it and voila. Most my tools expect it to be in df-lib subdirectory relative to where they are.
- df-filetool.tcl - one of really general purpose tools I wrote. Basically it scans directories using regex patterns and applies commands to files that match/don't match. A most likely usage scenario is some kind of transformation, like this simple one that converts all bitmap files in current directory to jpegs:
- df-filetool -s -i "\.bmp$" -o ".jpg" -- "C:\Program Files\ImageMagick-6.1.5-Q8\convert.exe" -quality 90 -sampling-factor 1x1 $input $output
- df-syncdirs.tcl - tool which was used by me to synchronize/compare two directories and (needed it a lot of times) copy all changes to some third directory (like when you need to send a delta only to some third party).
- df-dirmtime.tcl - tool that makes directories mtime reflect its contents on fat32. If you don't know, windows just plainly forgets to update directory mtime when something within a directory changes: this sometimes makes it impossible to know which directories were recently modified, and this tool comes to the rescue, making them right. :) But watch out, this will not work on your general ActiveState (and other) precompiled binaries! (because of a really stupid bug, which is present even in mscruntime) Before doing so, you need to apply this patch. Or even easier (if you use ActiveState binaries, like I do, and can't recompile), locate TclpUtime export with any hex editor and change push 0x00000080 to push 0x02000000. I really reported this as a bug and suggested a fix (didn't post patch back them though), but it seems like it was just forgotten/ignored as it's still not in mainline. :( Reposted it as a patch, so we'll see if it gets fixed. :)
- df-tar-symlinks-cleanup.tcl - a tool useful to cleanup after tar fails to create symlinks on win32 (i.e. when symlink is extracted before the file it points to). Not always required, but sometimes useful, for instance when unpacking openssl (although it compiles even if you don't cleanup, because its batch files work around this ^_^):
- tar -xzvf openssl-0.9.8b.tar.gz 2>&1 >con | df-tar-symlinks-cleanup
- svn-brush.tcl - a silly tool for svn. Primarily useful when you need to synchronize your local svn repository with something else that is not svn and arrives to you in form of 'releases', so this tool works a lot like syncdirs, but also issues svn commands to track additions/deletions. The intended use is as follows:
- unpack new-release to some folder
- $ svn co <your-local-repository>/<old-version-tag>
- $ svn-brush <new-release> <old-version-tag-working-copy>
- $ svn copy <old-version-tag-working-copy> <your-local-repository>/<new-version-tag>
- optionally, if you are working on the project locally:
- $ svn merge <your-local-repository>/<old-version-tag> <your-local-repository>/<new-version-tag> <your-version-working-copy>
- NBuild - I rewritten this tool to tcl because otherwise if didn't allow me to use it with different nemerle versions (it depended on Nemerle.dll and when it was already loaded it prefered executing its version, not freshly compiled for example). And as a side effect new features were added. :)
- cvs-relocate.tcl - have you ever had a situation when cvsroot moved and you can update anymore? Very weird: I couldn't seem to find a standard way to do this via cvs tool. It just relocates dir tree in current directory from old cvsroot to new one.
- dqkit - a small guide on compiling dqkit.
Python
Language unappreciated by me in the past (for some reason I made myself believe that it has the same show stopper Unicode problems as Perl, which at least Python 2.4 doesn't), and rediscovered again not so long ago. But who knows, maybe that's for the best, as if I started using Python two years ago, maybe I'd never get enough experience in .NET. :)
ChangeLog:
- 2006/11/17:
- for a complete list of changes please use `bzr log'
- initial all-in-one release
Stuff:
- df-python.tar.bz2 - an all in one package (my Bazaar-NG branch).
- df/deepfind.py - has deepfind() function, a kind of unicode friendly recursive glob.
- df/encoding.py - a bunch of stuff so that my windows programs know which encoding to use for IO.
- df/filetime.py - getfiletime() and setfiletime() that use Windows native API on Windows and don't have bugs/limitations of Python's os.stat and os.utime (the former is fixed in Python 2.5, the latter is fixed only in Python 2.6).
- df/spawnp.py - implementation of os.spawn*p*() functions that are not originally implemented on Windows (not really used since I now prefer subprocess module).
- ClipboardInterceptor-wx2.7.pyw - a program that watches clipboard for changes and gathers everything into one big edit box. Also has autofixing functionality to for example transform urls before adding them to the box. Works with Python 2.4 and wxPython 2.7.
- df-dirmtime.py - a rewrite of my older Tcl tool.
- df-line2dos.py and df-line2unix.py - quick and dirty utilities to fix line endings.
- df-pyclean.py - recursively deletes all *.pyc and *.pyo starting from current directory.
- wget-checklist.py - a rewritted !list file checker that I use in conjunction with Clipboard Interceptor and wget -i !list. Basically just checks which files have already been downloaded and removes them from !list file.
Three-D :)
Ever since my childhood I was always fascinated by game development. When I was Scorpion 256k (it was a very advanced ZXSpectrum machine) user I tried to understand how games (especially 3D ones!) work and spent a lot of time in debugger trying to understand Elite. Not that I found really much, but still was fun trying to write some little programs of my own. ;) Not much survived hdd failure that happened long ago, but at least one piece of my early days in university did:
- demo.zip - a really small "demo" that I wrote back then. Was more of a way to understand matrix mathematics, and in particular was to demonstrate solved equation for rotation matrix around an arbitrary vector. Doesn't use any graphics libraries, just switches to 320x200 and draws straight on screen. Can only plot dots, so draws a rotating dotted cube. :) Oh, and it's compiled with djgpp so it's an old DOS application. :)
Later I stopped writing for DOS and was using svgalib on Linux and even tried some OpenGL and DirectX, but none of that survived and for some reason after moving to Moscow I haven't wrote anything new...
Some of my projects
During my work at SoftClub I had wrote some snippets that might be interesting for others, plus there are some of my other projects:
- SCPM.zip - Was an acronym for SoftClub Project Manager, an ambitious project that I started but never finished. Has some interesting concepts, like UI templating using Internet Explorer to display program content, template classes for dealing with SQL database and tables (MSAccess database via OleDb, creating tables when needed plus table versioning), which seemed like excellent idea at the beginning, but turned out to be not so good in the end. Never finished it because nobody liked it (nobody really told me what they wanted though) and I have architected it badly (it was unmaintainable as a result, writing that UI classes turned to be a nightmare). If you are interested, take a look, but only for educational purposes. :) [requires .NET Framework 2.0]
- ULib.zip - Was a library I slowly growed during my work at SoftClub. Mostly was a place where I dumped every repeating code piece I had, after some generalization work. Mostly has code for dealing with unreal packages and unreal related graphics, but also has some code for working with audio and .bmp/.tga/.dds graphics, binary files and text files, plus for constructing Excel xml sheets (so that my programs could dump results in Excel). It's really a mess, so if you really want to take a look (for educational blah blah blah purposes), go on. :)
- VectorEditor.tar.bz2 - Was a test task for one of job opportunities. The task was to write a simplistic vector editor with saving and loading into custom xml files. That's how it ended up. :) Source code is released under GPL. You can also download binaries (VectorEditor-bin.zip), but they are not always updates along with sources. [requires .NET Framework 2.0]
