i like drscheme in general. there is one problem with it that made it simply unusable by me. when you hit run in drscheme to reevaluate your definitions, it obliterates my entire history in the REPL. i need to have that stuff around to retry expressions.
I would be more concerned, but there is not really a way to fix this without changing the semantics of set. Set doesn't eval it's first argument, so it expects an unquoted symbol. Get an operator that does the same thing, but evaluates its arguments, and you will be fine.
yes it is. i didn't realize that table was different in anarki. well, there is always listtab, but seriously, table should work like the anarki version.
complement only works with functions. behind the scenes, it uses apply to call the original function. at first glance, i don't really see a reason that it couldn't just do the same as (compose no _)
I know compose works on macros... but I'm not sure you are straight on, because compose uses apply as well. And the macro expansions look exactly the same.
arc> (macex '(compose no litmatch))
(fn gs1639 (no (apply litmatch gs1639)))
arc> (macex '(complement litmatch))
(fn gs1641 (no (apply litmatch gs1641)))
arc> ((compose no litmatch) "a" "aston")
nil
arc> ((complement litmatch) "a" "aston")
Error: "vector-ref: expects type <non-negative exact integer> as 2nd argument,
given: \"a\"; other arguments were: #3(tagged mac #<procedure>)"
except calls to compose are optimized away in the interpreter. they are treated specially. look in the `ac' function in ac.scm. i'm guessing this is the reason.
Now, what to do about the other case... there's still no reason it should bug out, it seems to me. Or rather, it should be implementable in such a way that it shouldn't.
Yes, we do. But if I recall (and I can't test, because the git "wiki" broke for later mzschemes again), apply does work for macros, except it evaluates all the arguments first, which breaks things like and. Someone should test that, though; as I noted, I can't.
I saw, that's how I was able to test. Thank you for setting it up, by the way! And if you fixed it, thank you for that; if someone else did, thank them for that.
Additionally, I'd like to see the link macro replaced by something that doesn't... uh, conflict with the <link> tag (which is forcing us to use ugly (pr)s right now instead of (tag)).
(attribute link type opstring)
(attribute link href opstring)
(attribute link rel opstring)
(gentag type "text/css" rel "stylesheet" href "styles.css")