Two Random Exercises

here. First, let’s make a function that can turn any die into an unfair coin. Basically, return #t / true if and only if you roll the die twice and get the same result: ; given any random die and a possible outcome ; turn it into an unfair coin (define (die->coin possible die) (lambda () (eq? possible (die)))) From here, use the same idea that I posted about earlier to turn that unfair coin into a fair 50/50 coin:

read more...


Wombat IDE - Two bug fixes

Two quick bug fixes:

  • Issue 196: color-set! now works correctly (previously it wouldn’t actually mutate the color object)
  • Issue 197: Automatically determine the correct semester for the upload button

Wombat IDE - OSX Dock Icon

For the longest time, I’ve been having issues with the Dock Icon on OSX. It isn’t set using the same code that works in Windows and Linux, but I think I’ve finally figured it out.

Using information from this blog post, I can use the com.apple.eawt.Application class to set the Dock Icon. It isn’t set immediately on launch, but shortly thereafter. Not perfect, but close.


Wombat IDE - Another bug fix / feature post

Additional features:

  • Since both the image and turtle libraries need the same color code, I’ve factored that out into it’s own module: [(c211 color)](http://www.cs.indiana.edu/cgi-pub/c211/wombat/docs/c211-color.htm "C211 Color API")
  • Issue 193: Opening a file on top of an empty replaces that document.

Bug fixes:

  • Fixed documentation issues with image->list, list->image,
  • Issue 187: Fixed the direction parameter to hatch to take degrees rather than radians to match the rest of the library.
  • Made links in the about dialog clickable.
  • Issue 186: Fixed the recent document manager on documents with the same name.

read more...


Wombat IDE - Vector of vector functions

Added two functions to the matrix library:

  • (vov->matrix vov) - converts a vector of vectors to a matrix
  • (matrix->vov m) - converts a matrix to a vector of vectors

Quick and simple, but highly useful for testing and display purposes.  


Wombat IDE - Updated syntax, documentation

First, a few bug fixes with the keyword lists and help links: Added a bit of code to differentiate between a normal let and a named let. Fixed for losing the syntax definitions on some systems. Also, I wrote code to generate help files for the C211 libraries. Theoretically, I should just be able to update these with future updates to the APIs: Image API Matrix API Tree API Turtle API Color API (Edit: Added 19 May after re-factoring of colors) As a side note, I’ve added two new functions to the tree API:

read more...


Wombat IDE - Help and image bug fixes

A new feature: any keyword can now have an associated hyperlink that points to the Chez Scheme API reference for that function. Just click on a function that you want help with and hit F1 on your keyboard. The link will open in your systems default browser. So far only the functions built into Petite Chez Scheme work correctly, I’ll be adding the C211 libraries as soon as I write the documentation for it.

read more...