Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Aug 30, 2012
  1. Removed the " )" formatting.

    Zach Kost-Smith authored
  2. New feature: introduced special forms, which allows the user to make …

    Zach Kost-Smith authored
    to Modf without altering the source.
    No external interface yet.
Commits on Aug 28, 2011
  1. Switched the precendence between rewrite rules (now higher probabilit…

    Zach Kost-Smith authored
    …y) and
    normal CL macro expansions.  This is the right thing to do because often Modf
    needs to do something completely different (in fact the complete opposite) of
    what a Lisp form would normally do.  So, rewrite rules now also allow for a way
    to prevent normal macro expansion.
Commits on Aug 8, 2011
  1. Added tests for late structure inversion (the heuristic based method)…

    Zach Kost-Smith authored
    …. It
    appears that structures that include other structures are not handled well with
    Modf.  It seems like either a very ubiquitous CL bug (happens in every Lisp I
    test against) or more likely some odd feature of the standard I still don't get.
  2. A bug in the heuristic based structure accessor inversion.

    Zach Kost-Smith authored
  3. Fixed late inversion of class readers. This has been broken since

    Zach Kost-Smith authored
    implementation for all Lisps except ECL.
  4. Fixed some bugs introduced into the test suite

    Zach Kost-Smith authored
  5. Merge branch 'kisp'

    Zach Kost-Smith authored
  6. Merge branch 'origin-master'

    Zach Kost-Smith authored
  7. Added more in depth tests for class inverters.

    Zach Kost-Smith authored
  8. Merge pull request #2 from kisp/master

    modf patches
  9. Extended the test script to test the case where the library is compil…

    Zach Kost-Smith authored
    …ed and test
    the case where the library is loaded from previously compiled FASL files.
Commits on Aug 7, 2011
  1. Added test RECURSIVE-DEFINITIONS which tests if definitions can recur…

    Zach Kost-Smith authored
    …sively use
  2. Added back in macroexpansion-time side effect which stores the argume…

    Zach Kost-Smith authored
    …nt number
    of the container.  Why is this necessary?
    We want people to be able to recursively define Modf expansion functions and
    methods.  This means that within the body of a Modf expansion function/method,
    the macroexpander will need to know how to invert the accessor you are currently
    defining how to invert.  Luckily, it only needs to know which argument it is
    operating on.  This is important with we were defining an inversion for NTH or
    GETHASH if those inversion functions were recursive (which might be the case
    with NTH).
    Since, as was pointed out, we need this this side effect to happen whether this
    is a file was loaded or compiled then loaded into a fresh Lisp image, and we
    need the side effect as we compile (in case it is recursive), the side effects
    are wrapped in an EVAL-WHEN with all three cases specified.  If we have mutually
    recursive Modf functions, well that is still an open problem.
    Lastly, just to reduce the number of surprises, I have added the same side
    effect explicitly at macroexpand time.  This means that things will work even if
    definition forms don't happen in top-level forms.  See the test suite for an
    example of this (in fact, this was initially motivated because it is difficult
    to write a test of this recursive stuff that can be called more than once and
    actually test this setup).
  3. Added EVAL-WHEN forms to wrap the nth-arg setting. This is necessary …

    Zach Kost-Smith authored
    …as we need to know this in case there is a MODF form inside a MODF expansion (especially if the Modf expander/inverter is recursive).
Commits on Aug 1, 2011
  1. @kisp
  2. @kisp
  3. @kisp

    Ensure that *MODF-NTH-ARG* contains the same entries after loading

    kisp authored
    from fasl files than after initial compile and load.
  4. @kisp

    Small fix for running the test-suite on SBCL.

    kisp authored
    When running the test-suite SBCL complained about #<STANDARD-CLASS
    TEST-PARENT> not finalized.
    Fixed that by explicitly calling FINALIZE-INHERITANCE.
Commits on Jul 7, 2011
  1. Added a bit of documentation.

    Zach Kost-Smith authored
Commits on Jul 6, 2011
  1. Cut down the README file. A bit cleaner and to the point.

    Zach Kost-Smith authored
  2. Added some tests for the late inverter. I have it test whether it can…

    Zach Kost-Smith authored
    … look up
    the proper CLOS slot via the accessor and object.
  3. Made sure Lisps without Closer-MOP will load Modf.

    Zach Kost-Smith authored
  4. Modf-def now properly builds class accessors given a class definition…

    Zach Kost-Smith authored
    … or the name of a class.
  5. Changed the conditional compilation so that the straight forward meth…

    Zach Kost-Smith authored
    …od is only
    used by ECL.  Every other Lisp I test with behaves like SBCL (i.e. only
    direct-slot-descriptors know their readers, not effective-slot-descriptors)
  6. Fixed the reader/writer with different names issue. Longer, but more …

    Zach Kost-Smith authored
  7. Okay, pretty big rewrite. Still a bit unstable:

    Zach Kost-Smith authored
     1. Modf will assume that the data container is in position 1 of the expression
     list (adjusting for applys) if it doesn't know the function.  This is what you
     want most of the time, but not all the time.
     2. MODF-EXPAND is much simpler now.  It takes three arguments: NEW-VAL EXPR and
     ENCLOSED-OBJ-SYM.  NEW-VAL is what you want EXPR to evaluate to with the new
     data structure.  ENCLOSED-OBJ-SYM is the symbol that we assumed (in the
     previous call) would hold the value we are working with.  It is part of the
     current recursion level's job to ensure that that value is set to the proper
     data (i.e. object that we are accessing at this level).
     3. I introduced LATE-INVERT which is a function that will be placed in the
     expansion if we have no idea what to do.  This shows up if we have functions
     that we have not defined Modf expansions for.  This is common for class methods
     not defined using our DEFCLASS or grovelled out of the def form, and ditto for
     structures.  It uses some smarts to make guesses as to whether an
     Method/Function is a slot accessor or not.  I actually just realized that I
     messed up the case where we have a reader and writer with different names.
     Have to fix that later.
    All in all, it kind of works.
  8. Moved the meat of the slot-value expander to it's own function, copy-…

    Zach Kost-Smith authored
    Gone full circle on that one.
Commits on Jul 4, 2011
  1. Basically have accessor finding workig. As long as the class is final…

    Zach Kost-Smith authored
    …ized and
    the mop is powerful enough, we should be able to find the proper (SETF
    SLOT-VALUE) form for any given slot reader.
    In order for this to work, we are treating this as the default case.  If a Modf
    function/method is not defined, we assume we are dealing with a class accessor.
    This might break the previous work I did making modf accept recursive builder
    I also have to treat the default container argument as 1.  This is not always
    Still doesn't work as it produces actual function objects in the expansion.
    This means that several prominent Lisps can't compile files with Modf
    expressions anymore.  This will have to be fixed.
Commits on Jun 30, 2011
  1. The test script now clears out old fasls

    Zach Kost-Smith authored
  2. Added macro FSETF which acts like SETF except that functionally modif…

    Zach Kost-Smith authored
    …ies the
    object and sets the symbol to the new value (thus leaving old instances intact).
Commits on Jun 29, 2011
  1. Simplified the MODF-EXPAND function. Modified the documentation a bit…

    Zach Kost-Smith authored
    …, but not
    in a necessarily good way.
  2. I thought I fixed MODF-EVAL, but I actually broke it much more. Rever…

    Zach Kost-Smith authored
    …ted that
    change.  What this means, however, is that you might get no meaningful error at
    all if you try modf with something without a defined expansion.
  3. Expands MODF-EVAL forms more correctly. I think there was a bug befor…

    Zach Kost-Smith authored
    …e but it
    is fixed now.  I need to expand the test suite to test for modf-eval cases.
    Changed the way modf expands.  Now we try rewrites, then expansions, then
    A big difference is that it no longer checks to see if there is a
    function/method defined and the expansions of the definer macros have the side
    effect of setting what argument position to check next.  These two changes allow
    functions to be recursive.  However, Instead of getting an error stating, "I don't know
    how to deal with blah", you get "value NO-NTH-ARG" isn't a real.
Something went wrong with that request. Please try again.