Skip to content

read-line function, and print function #40

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

Merged
merged 7 commits into from
May 13, 2020

Conversation

erkkikeranen
Copy link
Member

@erkkikeranen erkkikeranen commented May 7, 2020

user=> (do (print "What is your name? ") (let [s (read-line)] (println "Hello, " s)))
What is your name? Erkki
Hello, Erkki
nil
user=>

includes "compatible interface" to clojure core

  • flush
  • new-line
  • pr
  • prn
  • print
  • println

variables (required if & truthiness and some other glue to work, but is prepared for pr, prn, print and println)
flush-on-newline
print-readable

Also:

  • changed nanotime -> nanoTime to match clojure symbol name
  • System/getenv to get env variables the same way as in clojure
  • fixed name space for Thread and System
  • fix broken unit test for divide

Copy link
Member

@Tko1 Tko1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Summary:

Rewrite println purely in Clojure, rather than creating a new rust wrapper -- or, as always, explain if there's more to it

@erkkikeranen erkkikeranen requested a review from Tko1 May 10, 2020 20:31
@Tko1 Tko1 merged commit d82ca34 into clojure-rs:master May 13, 2020
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

Successfully merging this pull request may close these issues.

2 participants