Commit Graph

10 Commits

Author SHA1 Message Date
Sameer Rahmani c30c93442b [Bootstrap] Update the printer functions to enhace the traceback visuals 2021-01-10 17:03:52 +00:00
Sameer Rahmani e4001e3802 [Bootstrap] Add a basic PrintError function to print error messages with the traceback 2021-01-03 23:42:49 +00:00
Sameer Rahmani 9d106d4278 Record the caller details in the stack frame 2020-12-30 17:50:00 +00:00
Sameer Rahmani b0925a527b [Bootstrap] Add a sample shared library to used with ffi api 2020-12-25 21:57:13 +00:00
Sameer Rahmani cb96e15b9c [Bootstrap]: Add some comment explaining the tree rewriting approach 2020-12-25 01:40:13 +00:00
Sameer Rahmani a66245adb0 [Bootstrap]: Fix the error message for mismatch function arguments 2020-12-25 01:18:54 +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 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
Sameer Rahmani 21d15787c9 Add support for loading namespaces via 'require' (symbol only)
At this stage we only supports requiring a namespace via it's name
and only one namespace like `(require 'blah.blah)`. But the support
for name aliases and requiring more namespaces at once would be
easy enough.
2020-12-12 20:33:53 +00:00