Thursday, September 22, 2011

Back into Java for a while

OK, decided to fix a bushel of nagging bugs in the Java part of the system. I started by finishing the SORT function. Well, that led me into doing some serious problems with vectors such that I could sort them. And to use the Java sort system, I had to add about 15 methods in each most of the vector classes (the Java Collections system). Now I can sort vectors, but (there is always one or more of those...) there are fence post problems with bit vectors, strings, and lists. I'm pretty sure that I can make them work by the end of the weekend. Here is the prior thought.

And to add to the work, none of the Character functions have a Function2 interface - needed for Sort. And that will bring out ideas of updating the Unicode tables. They're about 4 years old now, and it would be good to update it.

I have a new student working for me on some new ideas for handling subtyping. It's built similarly with the Factory classes for creating new instances of types. For other of you don't know, types in CLforJava are reified with Java interfaces and map the CL type system. Many of these interfaces also house one or more nested static classes. For example, to get a Lisp Integer, you go to lisp.common.type.Integer.Factory.newInstance("57890978450503857"). In subtyping, many of the interfaces would also have another nested factory that can reify a subtype (for example, (integer 4 15)) as a function that can detect that a value or set of values that fit the type or not. Since this is a function (Java/Lisp), it can be used by the compiler with safe checking.

No comments:

Post a Comment