It's possible that I like python more than ruby. Python seems to emphasize higher order functions more than ruby does; I mean, it's possible to do functional-ish programming in ruby, but not idiomatic. In python it might just be idiomatic. At least I have found it more natural to do functional-type-things in python than I did in ruby; and maybe that's just because I was using ruby 6 months ago, before I had touched Haskell or Clojure, and therefore didn't have a mind for composing functions, and making functions that return other functions, etc. I'll have to go back to ruby after this, and see if my new understandings make any difference.
Project Update: my MIPs interpreter, written in python, is working. It supports all the standard op codes (that I am aware of) along with the typical pseudo-instructions. The remaining issues with it are overflows and byte vs. word memory. Right now I'm just treating everything as words, no individual bytes, which is incorrect. And I'm not dealing with overflows correctly. In signed operations, I detect overflows and throw an exception, but in unsigned operations I don't do anything, just keep adding. That's a problem because, according to the bits, when I overflow an add I should go negative, but because python can handle arbitrary precision numbers, I have to build in that un-functionality myself. And it's a bummer man!
Instead of engineering my interpreter to maximum compliance, I'm starting the web portion of the project; wherein I create a web-gui in Django for the interpreter so I can put it up on Google App Engine, and show it off to everybody. Now, I don't know anything about Django; just that it's in Python and it is of the Rails Generation of web frameworks. Hopefully that means I'll be able to pick it up by analogy, but maybe not. I think I might do a significant portion of the UI in Javascript, and just serve up the interpretation functionality from the server-side. I've been wanting to give the EXT framework a serious go-round for awhile now, and this just might be my opportunity to do that. Though I do caution myself against trying to make a desktop app on the internet: I hear that is bad form, cause the web is supposed to look like the web not the desktop. If that is the case, then EXT is a bad influence: it's whole purpose seems to be bringing desktopishness to websites. Is it evil?
In any case, I'll just have to see what works. But you mark my words, I'm incorporating javascript somewhere into my application. Aside from the UI, the other big opportunity looks to be Ajax. Obviously the server-side interpreter code is going to have to communicate with the client somewhere, and why not in real-time, with no pesky click-refresh cycle to ruin the flow?
Anyway, hurricane Ike interrupted my school, so I have more to time waste on coding, hurray!
Thursday, September 18, 2008
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment