Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement namespaces #169

Closed
10 tasks done
borkdude opened this issue Nov 22, 2019 · 0 comments
Closed
10 tasks done

Implement namespaces #169

borkdude opened this issue Nov 22, 2019 · 0 comments

Comments

@borkdude
Copy link
Collaborator

borkdude commented Nov 22, 2019

  • We need to keep track of what is the current namespace.
  • Defining vars will be stored and resolved under the :namespaces key in a mutable atom, since sci can now mutate namespaces
  • The default current namespace will be user like clojure.core.
  • The babashka socket REPL must reflect the current ns
  • Keywords must be autoresolved using the known namespaces, e.g. ::str/foo
  • aliases must be stored per namespace, not globally!
  • We need to implement an ns form. We already support require and import, these need to be ported to it.
    • require
    • import
  • fix JS interop:
$ plk -e "(require '[sci.core :as sci])" -e '(sci/eval-string "(ns foo) (js/Error.)")'
Execution error (ExceptionInfo) at (<cljs repl>:1).
Unable to resolve classname: Error [at line 1, column 11]
@borkdude borkdude transferred this issue from babashka/babashka Nov 22, 2019
borkdude added a commit that referenced this issue Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant