Blog Closed

This blog has moved to Github. This page will not be updated and is not open for comments. Please go to the new site for updated content.

Sunday, March 30, 2008

Assorted Stuff

So it turns out that my computer isn't in the bad shape that I thought it was. There was a problem with the Parrot SVN repository where two directories had the same name, but with different letter cases. This isn't a problem on Linux, but it causes a conflict on Windows. One of the committers fixed the problem, and now everything works as expected. I also went in and removed some old software, including an old version of Norton Antivirus. I had actually forgotten that I even had it, it's been on my computer for years now. Removing that has had a noticeable positive effect on system performance.

I still want to reformat my computer, but I'm not under the gun about it yet. I want to do it around the end of the semester, so I have some time to research it first. I do want to switch over to Linux for the work computer. It's an IBM laptop, and I hear there is good support for those now. I am also going to price out a solid-state HDD, since I'm worried about the health of my current drive.

I've been working to implement some of the basics of the Octave language, and trying to teach myself how to use the Parrot Compiler Tools in the process. However, I've reached the critical juncture where I need to add two of the most important components: matrices and subroutines. The problem is that in MATLAB/Octave, both subroutine calls and matrix indices use the same syntax: ident(args). This means we need to determine whether we are calling a subroutine or indexing a matrix when we see this construct. Here are the rules I've worked out for it so far:
  • If the index is an lvalue, like "x(a) = b", it must be a matrix. MATLAB/Octave does not support lvalue function calls, that I know of
  • Functions, as I've mentioned before, are located in similarly named files. That means that my interpreter isn't going to maintain a list of all defined functions, but will instead search the filesystem when a function is called. So, I can't test a list of defined functions when trying to differentiate between the two.
  • I will need to maintain a list of variables. When I see an rvalue with parenthesis, I check the list of variables to see if it is one, and then start searching the filesystem for a file/function with that name. If this fails, throw an exception.
Once I get these things set up properly, however, i will be in great shape.

1 comment:

  1. Sorry, I think it was me, that was creating chaos by renaming 'languages/hq9plus'.

    Also, please feel free to send in a patch
    for LANGUAGES_STATUS.pod, giving details on your Octave port.

    ReplyDelete

Note: Only a member of this blog may post a comment.