Tenth Post
I started work on the assignment again today. I have had lots of funky ideas about where I could take the project but I have realized that I don't have enough time and I am this close to finishing school so I'm going to stick to the original plan and finish it quickly. All the wack stuff I've been thinking about can be done in like the 5 month holiday I have before uni starts, and presumably then as well.
So I did this and got the lexer, parser and executer done to handle ml algebraic data types. The only thing I have to finish is the semantics checking stuff which I imagine might be a bit of a hassle but that's pretty much it.
Although I do want to keep it simple I do have some ideas for optional stuff that I can do if I have the time before the presentation.
That logic programming thing non-deterministic programming idea I had makes more sense the longer I think about it.
I have simplified the type definitions a fair bit so it would be good to enforce recursive types. Like data list = cons[a, list] | end; only allowing a list type to be added in the second half of the cons would be good. Although this isn't strictly necessary for what I am doing right now. This is probably the first thing I will add if I have the time.
I have also thought about more advanced type theories still which would be neat. I also think it would be really impressive to have written my own type theory and be able to wack up a slide with like the sequent definitions or something. I have also thought of how I could build to it in the talk. Like I could be all "something this language is glaringly missing is higher-order functions. This isn't a practical problem, chucking functions on the data stack wouldn't be a problem at all in fact. The real issue is guaranteeing termination of the higher-order functions. As we can see from you know, the y-combinator (and the halting problem as a whole) we have to be very careful about constructing stuff. Also, allowing higher-order functions would allow us to use church encoded values, leaving behind the primitive data constructors used here (primitive is sarcastic). Something nifty about this is I just so happened to have written my own type theory for church encodings. I have not implemented it just yet because it's a little complicated (flip-up my sick maths slide here) and it doesn't *guarantee* termination just yet but I am working on it.". I just think that moment would be incredibly satisfying to me. I feel I haven't really had a chance to show off all the cool stuff I've been doing lately and this feels like the perfect opportunity.
Building out stdlib would be cool. I think one of the most fun things to do with a programming language I made is to write a sorting algorithm. so doing this would be quite nice.
That also brings me to the other thing I really need to do. Which is to implement if in the stdlib. The problem with the if function is that it takes booleans (which I didn't have until now) and that it requires some form of modified evaluation to not recurse infinitely (although this might not be a problem with the primitive recursion? I haven't really thought about it until now).
Anyway, those are the ideas I have about where to go with this project right now and what needs to be done. I am optimistic about the future and am having a great time with the assigmment.
Comments
Post a Comment