Thursday, December 31, 2009

Hurdle

Copperbox revision 1062.

A round of renaming - the PECOFF parser is still pretty unkempt but I've improved it a little. It looks like the the function names in my VC++ test DLL are in the .rdata section, currently I've no idea how the data here is laid out as it isn't in the PECOFF spec.

Hurdle

Copperbox revision 1061.

I've changed the COFF parser to use the do-notation.

I've decided I prefer having intermediate names for the parse results rather than long applicative chains. This is because I'm finding the specifications for binary formats too lax for my taste - for instance the PECOFF spec doesn't mention the IMAGE_DOS_HEADER - it doesn't have to as it isn't strictly part of the format, but the IMAGE_DOS_HEADER is at the start of all DLLs - what documentation actually specifies this? No doubt it exists but I certainly can't easily find it.

Similarly for (ar) archive files, the only full spec I could find was for AIX Unix. It looks like GNU ar uses the same conventions, but where do I get a definitive answer from rather than my own conjecture?

Wednesday, December 30, 2009

Hurdle

Copperbox revisions 1058, 1059 and 1060.

I've renamed the Pecoff source folder to Coff. The object files inside MinGW .a files are in pe-i386 format which is COFF (though without the header of Windows PECOFF files); so I might as well reuse the PECOFF machinery to look inside them.

Hurdle

Copperbox revision 1057.

Hurdle now peeks into ar archive files properly - I was interpreting a document wrongly in the last revision and expecting a symbol table to appear before the archives.

Hurdle

Copperbox revision 1056.

I've started work adding support to peek into ar files - however I'm finding the documentation on them very frustrating.

Tuesday, December 29, 2009

Mullein

Copperbox revision 1055.

A minor round of changes. I wanted to check that Mullein builds with GHC 6.12.1 and I've removed the dependency on Groupoid.

Thursday, December 24, 2009

OpenVG

Copperbox revision 1054.

The VG demo is working again. Next stop is looking at how the OpenGL binding handles enums etc.

OpenVG

Copperbox revision 1051.

OpenVG, the now higher-level package, has been updated to use OpenVGRaw for the actual FFI calls.

Revisions 1052 & 1053 - some repository admin, moving and deleting obsolete code.

OpenVGRaw

Copperbox revision 1050.

More work on the Raw package. All the bits are seemingly in place, so the next move is to change the OpenVG 'high-level' binding to use OpenVGRaw.

OpenVGRaw

Copperbox revision 1049.

I've now added wrapper / export modules corresponding to all the modules in the original binding.

OpenVGRaw

Copperbox revision 1048.

I've added some module that partition the exports provided by Raw.VG.Core101. These correspond to the modules in the old binding Blending, DrawingContext etc.

Wednesday, December 23, 2009

OpenVGRaw

Copperbox revision 1047.

I've started to remake the OpenVG binding to follow Sven Panne's 'Raw' convention - i.e. have one package implement the API 1:1 and a second package to add Haskell types, state vars etc.

Hurdle-0.2.0

Copperbox revision 1046.

A new release of Hurdle. It doesn't fix the problem parsing Visual C++ generated DLLs but it does print an error message acknowledging the problem.

As Hurdle depends on kangaroo, I've had to make a somewhat premature release of kangaroo.

Hurdle

Copperbox revision 1045.

Some work towards preventing the runtime exception that occurs when parsing VC++ generated DLLs. It almost looks like the sample DLL I'm using doesn't have an ".edata" section, but pexports copes fine and produces a .def file.

Tuesday, December 22, 2009

kangaroo

Copperbox revision 1044.

I've sorted a bug in the genericManyTill parser and made the opt parser backtrack on failure.

Hurdle

Copperbox revision 1043.

Hurdle almost working again now it has been changed to use Kangaroo, but it doesn't parse the export names for same reason (and the error on VC++ generated dlls is still present).

Hurdle

Copperbox revision 1042.

Hurdle can't seem to parse DLL's created with Visual C++. I've started to look at problem, the first step is I've changed Hurdle to use kangaroo so I can add logging to see where the parse fails.

Monday, December 21, 2009

SFont

Copperbox revision 1041.

I think I can now parse format 4 'cmap' sub tables. I know the cmap data is used match glyphs to code points, but I don't know how so.

kangaroo

Copperbox revision 1040.

I've changed the 'region' parsers - giving them Italian names (hopefully grammatically correct ones). The idea was to use the music terms 'da capo', 'dal segno' but they didn't quite fit my purposes so I contrived my own dalpunto, alfine (there is the musical term 'al fine') and alfermata.

alfermata is a new one - and alfine which was interecto had the wrong behaviour so it has been corrected.

1. dalpunto - 'from the point'
Run the parser within a region and return to where you came from.

2. alfine - 'to the end'
Run the parser within a region and jump to the right-end of the region after the parse.

3. alfermata - 'to the stop'
Run the parser within a region, the cursor remains wherever the parse finished.

SFont

Copperbox revision 1039.

I can parse one cmap subtable (only for type 4 subtables) but parsing many subtables is causing an out of range error (fonts can have many cmap subtables).

Sunday, December 20, 2009

SFont

Copperbox revision 1038.

Work on the cmap table. At this point I feel my interest waning a bit as the specs aren't so explicit as to how various arrays are sized... I'll see if I get much further tomorrow as I could do with spending time on other things (Wumpus, OpenVG binding).

SFont

Copperbox revision 1037.

Compound glyph parsing now implemented. Whether either simple or compound parsing actually works is moot as I don't yet know how to extract particular glyphs.

SFont

Copperbox revision 1036.

I think I can now decode simple glyphs. The new code to do it is a lot sharper than the code in the original SFont, so I must be getting better.

Saturday, December 19, 2009

SFont

Copperbox revision 1035.

I've simplified the syntax tree that represents the font tables. I now consider it a concrete syntax tree so anything like enumerating bit-fields can be done at a post-processing step rather than at parse time.

SFont

Copperbox revision 1034.

Some work on the glyf table.

Friday, December 18, 2009

SFont

Copperbox revision 1033.

I can now get to the text labels inside the 'name' table - I don't think I managed this with the original SFont or OTFont.

SFont and kangaroo

Copperbox revision 1032.

I've removed more old files from SFont so I can start to use Kangaroo as its parser machinery.

kangaroo

Copperbox revision 1031.

The MIDI example is now working with the new combinators. Quite a few of the combinators in the ParseMonad weren't implemented correctly either getting the index wrong or not putting the boundary region in a (virtual) stack.

kangaroo

Copperbox revision 1030.

More work on the example MIDI parser which is currently working (caveat - on well formed files), but doesn't use the runOn and region combinators.

Thursday, December 17, 2009

kangaroo

Copperbox revision 1029.

I've devised quite a few new combinators to golf the MIDI parser - unfortunately the new ones seem to have problems parsing the MIDI track bodies at the moment.

kangaroo

Copperbox revision 1028.

I've added support for IEEE 754 floats to Kangaroo. The code is the same as I posted to the beginners list a few days ago so the effort wasn't wasted.

kangaroo

Copperbox revision 1027.

I've added a Reader-Writer-State top level module to Kangaroo. The implementation uses a triple for (r,w,s) and remains a plain state monad but sections the operations so ask only operates on r, tell on w, and get and put on s.

SFont and kangaroo

Copperbox revision 1026.

I've removed the old files from SFont and added a new error operation to Kangaroo that rewrites a low-level error e.g. a withinRegion failure with a specific message, much like Parsec's (questionMark).

Wednesday, December 16, 2009

kangaroo

Copperbox revision 1025.

Kangaroo is now big enough to replace the parse monad that I developed for SFont, so I now use it there. Unfortunately SFont really has some ugly code that I'm not sure what to do with.

kangaroo

Copperbox revision 1024.

I've now added the withinRegion operation - this is the important one as it enables random access. I've decided to allow it to only access regions within the current region rather than regions anywhere in the file. This is so that the nesting in the program reflects the region movement - i.e. the top level parser sees the whole file (array) and nesting within the parser nests the accessible regions with the array.

kangaroo

Copperbox revision 1023.

I've changed the parse state so it tracks both current position and 'end'. End isn't end-of-file per-se but end of region, which coupled with a function like local in the Reader monad will allow me to jump around the file.

kangaroo

Copperbox revision 1022.

More work on kangaroo. The MIDI example compiles again but doesn't work. I'd taken this out of run function of the Kangaroo monad, because I didn't need the result, but it I still need to perform the action.


; _rsz <- hGetArray handle arr (fromIntegral sz)


I'll put this line back in on the next commit.

kangaroo

Copperbox revision 1021.

I've made the parse monad parametric on user state rather than a transformer. IO is at the bottom of the Kangaroo so it can't be a 'proper' transformer. I tried to make it parametric with a transformer t that's obliged to be an instance of MonadIO but this was complicating things and I didn't really want a dependency on mtl anyway.

Tuesday, December 15, 2009

kangaroo

Copperbox revision 1020.

A bit of work on kangaroo. I think I'm going to have to turn the monad into a transformer, so I'm check-pointing the work now.

Monday, December 14, 2009

OpenVG binding

Copperbox revision 1019.

I've moved the Utils - Color and PathCommands out of the library proper and into the examples. Also started work improving the VG.Paths module.

Sunday, December 13, 2009

Hurdle-0.1.0

Copperbox revision 1017.

Hurdle now can extract the dll name, so it can generate a correct .def file for dlltool. It can print ordinals or other things that pexports can. Maybe I'll add them sometime.

Copperbox revision 1018.

I've changed the cabal file to put Hurdle in System, previously it was in Graphics as I had copied pasted the initial text from elsewhere.

Hurdle

Copperbox revision 1016.

DLLexports is now called Hurdle - (H)askell (U)tility (R)egarding (DL)l (E)xports.

I've just to find the dll name in the binary before its ready for release. The dll name is visible in the binary file just before the function name exports, but I haven't worked out which RVA (relative virtual address) actually points to it yet.

OpenVG 0.4.0

Copperbox revision 1014.

Release archive for Hackage.


Copperbox revision 1015.

Deleted files NEWS as it is now called Changes.

OpenVG binding

Copperbox revision 1013.

unbits utility function now sorted out and renamed unbits32.

Paths remain...

Saturday, December 12, 2009

OpenVG binding

Copperbox revision 1012.

More haddocking and error handling in VGU sorted out. Regrettably, I'd copied a large chunk of Sven Panne's HOpenGL code into the ErrorsInternal module in VG while I got my binding up and running. I had forgotten I was using this and hadn't attributed it either - I've now removed all Sven's code. Sincerest apologies to Sven.

The only outstanding work now is to rewrite bitwiseOr in Utils and sort out the Path.hs module.

OpenVG binding

Copperbox revision 1011.

More work on Haddock docs. Also the a couple of the matrix functions don't look very good in retrospect - bad type signatures, and the Paths module looks dodgy too.

OpenVG binding

Copperbox revision 1010.

Yet more haddock. I've now done Paint which I think was the largest remaining module.

OpenVG binding

Copperbox revision 1009.

More improvement to the haddock docs - alphabetically I'm up to Images.hs so there is still a lot to do.

Friday, December 11, 2009

OpenVG binding

Copperbox revision 1008.

Another round of point-free golf.

OpenVG binding

Copperbox revision 1007.

I've removed the Marshal and Unmarshal type classes that were only used internally and "tidied" some functions with a bit of point-free golf to keep things interesting.

OpenVG binding

Copperbox revision 1006.

A round of Haddock improvements, some modules done, plenty left to do though...

Changed the status from highly unstable to just unstable.

Thursday, December 10, 2009

OpenVG 0.2.1 and 0.3.0

Copperbox revisions 1004 and 1005.

New revisions of the OpenVG bindings. One works with the OpenGL in the platform, the other uses the new split OpenGL packages.

Wednesday, December 9, 2009

kangaroo

Copperbox revision 1003.

I've extracted the Parser monad from DLLexports into a new library - kangaroo. Thus named because it supports jumping around (random access) during the parse.

DLLexports

Copperbox revision 1002

Finally I can get a list of exported function names from the .DLL.

Tuesday, December 8, 2009

DLLexports

Copperbox revision 1001.

Improvements to the random access parse monad.

DLLexports

Copperbox revision 1000.

Hardly a milestone commit for the 1000, but DLLexports now uses a random access monad over an array rather than a bytestring. This is so it can jump about following RVA's - relative virtual addresses.

Monday, December 7, 2009

DLLexports

Copperbox revision 999.

More work on the pretty printer in DLLexports. Actually getting to the function names is taking some doing...

Sunday, December 6, 2009

DLLexports

Copperbox revision 998.

I've started a new tool to extract DLL signatures vis pexports. I hoped it was going to be a one day job (at least to get something working), but its going to be a bit more than that.

Saturday, December 5, 2009

Wumpus

Copperbox revision 997.

Wumpus-extra examples are now working with the latest data-aviary and wumpus-core.

lhs2TeX on Windows

I used lhs2TeX for the first time in ages today.

One thing I had forgotten was that pdflatex prefers files with Unix end-of-line[1] and was throwing this error:


! Undefined control sequence.
l.30 }\SkipToFmtEnd

? q
OK, entering \batchmode


A solution is to run dos2unix on the generated .tex file after running lhs2TeX:

 
$ lhs2TeX -o HelloWorld.tex HelloWorld.lhs
$ dos2unix HelloWorld.tex
$ pdflatex HelloWorld.tex



[1] Generally I use LaTeX and dvips, pvipdfm on Windows which seem agnostic about linefeed format.

Wumpus

Copperbox revision 996.

I've changed the argument orders for the ellipse and zellipse functions in Wumpus.Core.Picture.

It seems a bit tardy to upload this to Hackage, so work on wumpus-extra for the time being won't be compatible will the latest proper release of wumpus-core. Work on wumpus-extra will be compatible with wumpus-core-0.13.90 source - the revision currently heading the Subversion repository.

Friday, December 4, 2009

data-aviary-0.2.1

Copperbox revision 995.

A new release of data-aviary - some new combinators dup and the "combiners". Plus I've finally inter-defined the Data.Function function on.

Wumpus

Copperbox revision 994.

I've changed arrowheads to use the new Mark type class.

Wumpus

Copperbox revision 993.

I've made a new type class for drawing marks Mark that makes sizing dots via the "current" stroke width more convenient (of course there is no graphics state in Wumpus so the notion of current is a bit wonky).

Wumpus

Copperbox revision 992.

All the examples in wumpus-extra are working again. Plus tiny bit of work for drawing grids.

Thursday, December 3, 2009

Wumpus

Copperbox revision 991.

More work on dots - I've been imitating TikZ's plot marks with a new drawing DotPic.hs.

Wumpus

Copperbox revision 990.

I've separated the coordinate generating functions into their own module in wumpus-extra and added a simple new one to generate calendar grids.

Wednesday, December 2, 2009

Wumpus

Copperbox revision 989.

Some work on backgrounds and an underwhelming new picture on Flickr:

http://www.flickr.com/photos/44929957@N03/

Wumpus

Copperbox revision 988.

More work on arrowheads - I've improved the bend function to make curves, but the curved arrow tip still isn't right.

Tuesday, December 1, 2009

Wumpus

Copperbox revision 987.

More work on arrowheads, though I'm still just tinkering as the way I'm constructing them doesn't feel right.

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.