Commit Graph

7 Commits

Author SHA1 Message Date
Sameer Rahmani 3f554445d8 Fix some the linters problems reported by the golang-cli 2021-01-22 20:37:44 +00:00
Sameer Rahmani c2d4273319 [Bootstrap] Fix the order and location on the traceback
In order to fix this issue I had to make many minor tweaks
including reordering the traceback and the way we pass down
nodes.
2021-01-07 19:45:07 +00:00
Sameer Rahmani 9d106d4278 Record the caller details in the stack frame 2020-12-30 17:50:00 +00:00
Sameer Rahmani 0b56906474 [Bootstra] Rethink the eval loop to rewrite evaluation tree
Implement a new algorithm to eliminate TCO while preventing
premature execution exit by rewriting the evaluation tree and
replacing old nodes with new set of forms, for example the result of
some old form's evaluation, a body of a function or anything in
that nature. Couple the new forms with a possible new execution scope.
2020-12-25 01:18:54 +00:00
Sameer Rahmani 699483e249 Add support for printable strings and 'pr', 'prn' functionalities.
Add 'pr' and 'prn' functions to print out the representation of an
string and 'print' and 'println' to print out the string.
2020-12-24 16:28:12 +00:00
Sameer Rahmani 5ee7e93647 Add IHashable and the implementation for all the IExpr types 2020-12-20 18:09:06 +00:00
Sameer Rahmani 42058568c7 Add support for native function, multi ns require fn and 'builtins'
* Implemented Native function as IExprs so we can refer to them
  like any other function. Checkout `NativeFunction`.

* `require` has been implemented as a native functions which
  accepts one or more namespace descriptions and load them.
  A namespace description is either a symbol with the ns name
  or an `IColl` in the following form `(some.ns.name alias).

* A hashmap of strings to native functions has been added to the Runtime
  which is used to resolve builtin functions.
2020-12-15 19:08:51 +00:00