Permalink
Commits on Mar 4, 2016
  1. opening paren as delimiter

    jfo committed Mar 4, 2016
  2. inlining substring length

    jfo committed Mar 4, 2016
  3. passing pointer reference to substring reader

    jfo committed Mar 4, 2016
    also typedeffing the union to 'V' to make things look cleaner
  4. naming the enum brings benefits.

    jfo committed Mar 4, 2016
    the compiler can now tell me if I have forgotten to handle a case in the
    switch statement. this isn't a big deal now, but could become the source
    of subtle bugs later on when I'm trying to eval things.
    
    notice the neccesary `break;` statements at the end of each case.
    Without break (or, alternately, as in the lower example in the read
    switch,  a return statement), a switch will simply continue executing
    the code in the following cases. it's really shorthand for `goto`
    and the exit needs to be handled separately.
Commits on Mar 3, 2016
  1. refactor debug list inner

    jfo committed Mar 3, 2016
  2. it will, in fact, always be 3

    jfo committed Mar 3, 2016
  3. collapsing debug a little

    jfo committed Mar 3, 2016
  4. passing around a reference to a pointer

    jfo committed Mar 3, 2016
    and incrementing it in place eliminates the need to count list length
    nothice also that I have to create a scope in the switch statement in
    order to initialize a var there.
  5. inner reads for nested list

    jfo committed Mar 3, 2016
  6. inner reads for a list

    jfo committed Mar 3, 2016
  7. debugging lists with indents

    jfo committed Mar 3, 2016
  8. sublist counter

    jfo committed Mar 3, 2016
  9. introducing 'nil'

    jfo committed Mar 3, 2016
    nil is a special bit of memory that we allocate in the global space. It
    is a wrapper around the null pointer, essentially, but it let's us treat
    a nil cell as a cell and lets us not check for null always everywhere.
  10. addint union to struct

    jfo committed Mar 3, 2016
  11. adding union for values

    jfo committed Mar 3, 2016
  12. making constants from enum

    jfo committed Mar 3, 2016
  13. defining type constants

    jfo committed Mar 3, 2016
  14. debugging lists appropriately

    jfo committed Mar 3, 2016
  15. adding a type to each makecell

    jfo committed Mar 3, 2016
  16. List structure works

    jfo committed Mar 3, 2016
  17. trying to really read a list in

    jfo committed Mar 3, 2016
  18. reading strings instead of chars

    jfo committed Mar 3, 2016
    But, things are getting messy. We have to read in substrings a lot and
    iterate through them to malloc the right amount and to know how far to
    jump ahead because we're looking at local copies of pointers. This is
    less than ideal.
    
    We've seen this pattern before- when you have too much stuff going on
    because of making local copies, you can simplify things by passing
    around a reference to the thing you're interested in, instead. So, a
    pointer to a pointer OMG.
  19. Chars alone are insufficient to parse words

    jfo committed Mar 3, 2016
    I need a way to read in a whole word.
  20. Introducing: debugging lists by peeking at their malloc'd addr

    jfo committed Mar 3, 2016
    We see how we can make a list, it looks like what we expect,
    but '(' and ')' shouldn't show up as values right now, they are
    special symbols that demarcate a list, so we have to handle them
    differently.
Commits on Mar 2, 2016
  1. Making the read function tighter

    jfo committed Mar 2, 2016