Discovering a New Language, CSC430, Spring 2023
1 Goal
Work with a team to re-do as much of assignment 5 as possible in 5 hours per person using a host language we choose for you randomly, and present the results in class.
2 Teams
You should probably collaborate using ... TikTok! No, no, I’m just kidding. You should probably use some kind of repository. If you all use github, that’s fine—there’s no need to make the code you write for this project private—but you can also collaborate in other ways.
NB: Except please please please please don’t put your code from earlier assignments in there. You knew that, right?
3 What to Implement
Your goal is to implement assignment 5 in the language that you’ve been assigned, and to learn about the language you’ve been assigned.
3.1 Parsing
Some languages are better-suited for parsing than others. For this reason, I strongly suggest doing the parser last, or (more likely) not doing it at all.
Specifically, most languages don’t have s-expressions, or anything terribly similar. In dynamic languages like JavaScript, Python, and Ruby, you can model these using arrays. So, for instance, in JavaScript you might write
['var', [['z','=',14]], ['+', 'z', 'z']] |
which is a heck of a lot longer than
{var {z = 14} {+ z z}} |
3.2 Interpretation
The interpreter is the important part of the assignment. You should focus on developing a representation of an AST, and writing the interp function.
Please note that you do absolutely have to write some kind of test cases.
4 Time Limit
No person may spend more than five hours implementing this project. This does not include time spent downloading and installing an IDE or compiler, but it does include time spent on "hello world" tutorials and such.
Please note: You are not going to get very far in five hours!
That’s okay. It’s not about completion. It’s about having a good time, getting to know a bit about another language, and thinking a bit about why you might (or might not) choose the language for a project.
It’s also an interesting "sprint" exercise in making the most of a short period of time.
After you’re done implementing, you may spend up to half an hour per person assembling your presentation.
5 Presentation
Rather than handing anything in, you will be making a five-minute presentation of your work in class. You may bring a laptop to make your presentation, or you can just put your presentation on the web (for instance, using google’s presentation documents for google drive).
Start with an overview of the language: who designed it, how old is it, how popular is it, what is it good for?
Very briefly, summarize how much of the interpreter you were able to implement. This will vary dramatically, depending on your implementation language.
Your code. Begin with the test cases, starting with small ones. Present them in a large enough font to be readable from the back of the room. This will help your audience to understand how your code is structured. Then show your data definitions, and finally your functions. This should take about two minutes. You’re not going to get through all the code, so you’ll want to focus on one or two specific tests, a very brief overview of the data definitions, and then a look at the heart of the interpreter. Do not spend more than two minutes on your own code; this will take timed practice. You must keep this section under control so you will have time to finish your presentation before your time runs out.
A description of the language’s values: does it have objects? closures? strings? symbols? numbers? Other weird things? Highlight things that are interesting or unusual.
A description of the language’s syntax and scoping: are there statements, distinct from expressions? How does the scoping of variables, functions, classes, and methods work? Again, highlight things that are interesting or unusual.
If you have any insight into the language’s type system, you’re welcome to share that.
Finally, would you consider taking a job involving writing code in this language?
Your presentation is the only deliverable for this project.
6 Scoring
10: Your effort score assigned by your teammates
10: The quality of your code (not its completeness), and your observations
10: Your presentation, including finishing within the 5 minute time limit