NOTE The Rhombus proposal is not stable. This example should be considered a point in time example. I may or may not update this to reflect newer versions of the proposal.
This is a translation of a kind of scraping script I've written in Racket.
Some notes:
- I'm avoiding making new syntax, some things (
with-handlers*,with-disposable) could look nicer with special syntax. I'm not quite up to speed on the macro system, and I wanted to get something working. shim.rktavoids the problem where requiringracket/basewill shadow the rhombus names and then Bad Things(TM) start happening. Like none of the infix operators work and syntax likeifanddefineget shadowed.- Racket identifiers are not the same as Rhombus identifiers so a lot has to be renamed.
- Based on update to the implementation changed:
- Name changes:
value->valdefine->deffunction->funrequire->import
- Imports places names into a namespace object so now
imported names are dotted. - Made a shim like module for each
importfrom Racket code. - Wrote a mostly automatic renaming function to use with
filtered-outfrom the shim modules.
- Name changes: