Ruby: Remove instances of a method

Here’s an “old school” style jig. I first attempted this in Haskell, but I needed Perl-compatible regular expressions (Posix can’t handle the negative lookahead needed for correctly identifying C-style comments), and installing the PCRE library for Haskell on Windows is painful, though I’ll get around to it one of these days.   require ‘find’   [...]

Posted on September 3, 2009 at 9:24 am by Jason Felice · Permalink · Comments Closed
In: Jigs · Tagged with: , ,

Haskell: Filter C++ Classes

I’ve needed a jig to separate a C++ class’s declaration and implementation for quite some time. Compile with “ghc -O2 –make classfilt.hs” and invoke with “classfilt –impl” or “classfilt –decl”, piping in the class source with inline methods. It certainly doesn’t handle all the corners of the C++ language, but it does most of the [...]

Posted on August 18, 2009 at 9:59 pm by Jason Felice · Permalink · Comments Closed
In: Jigs · Tagged with: ,

Erlang: Remove #include directives from all cpp files

I’m certain this can be done better and with fewer lines of code, but it’s my first Erlang jig.

Posted on August 3, 2009 at 3:54 pm by Jason Felice · Permalink · Comments Closed
In: Jigs · Tagged with: ,

Scheme: Translate static data from C++ to XML


Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

The C++ was extracted and munged with vim to make nice Scheme syntax elements before running this script. "das.cpp""<isofield id=\"~a\" length=\"~a\" name=\"~a\" pad=\"true\" class=\"org.jpos.iso.~a\"/>~n"

Posted on June 23, 2009 at 9:13 am by Jason Felice · Permalink · Comments Closed
In: Jigs · Tagged with: , , ,

Scheme: Save preprocessor output for all compiled files


Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

Warning: preg_replace_callback() [function.preg-replace-callback]: Unknown modifier 'c' in /usr/local/www/sites/jigcode.com/wp-content/plugins/wp-syntax/geshi/geshi.php on line 3324

This is a wrapper for the MSVC compiler (cl.exe) to generate a .i file as well as a .obj. Compiled with Bigloo. """ \"""\""; Run cl.exe to compile "cl"; Run cl.exe to produce preprocessed .i "cl /P"; /P puts the file in the current directory, so we need to move it to the ; same [...]

Posted on June 7, 2009 at 10:11 am by Jason Felice · Permalink · Comments Closed
In: Jigs · Tagged with: , , , ,