-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This is an implementation of the programming langauge R in TypeScript by Hoe Chan Wei Daniel and Chin Synn Khee, Joash.
R is an expression based, vector-oriented, functional language, well suited for scientific programming. It's primitive types are all 1-indexed vectors, making it easy to work with large amounts of data without having to write loops.
R is also a homoiconic language where function calls and entire programs are R objects which can be manipulated. This gives rise to powerful metaprogramming capabilities which allow library authors to write powerful Domain Specific Languages making working with data very convenient. Examples of such DSLs include the entire Tidyverse suite of libraries authored by Hadley Wickham, including the dplyr library for working with data frames and ggplot2 for creating plots.
The purpose of this wiki is to explain how certain types of expressions evaluate in joRdan, and general ideas of how these things are implemented, to aid the reader in understanding the codebase and figuring out the purpose of each module and each function.
Note that this code base, aiming to follow the R implementation as faithfully as possible, also follows R's naming conventions and module structure, thus being unintuitive at times, with the tradeoff being the ease of referencing the original implementation for comparison. The original R implementation source code can be found here.
To run the interpreter yourself, the simplest way is to clone the repository, then run:
npm install # install dependencies
npm run serve # bundles the project with parcel, and deploy it on localhost:1234
To run the tests located in src/tests
, run:
npm test
Created by Joash Chin and Daniel Hoe of the National University of Singapore.
CS4215 Programming Language Implementation Semester 2, AY20/21