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

Save to disk / gist #122

Open
lilactown opened this issue Nov 8, 2018 · 2 comments
Open

Save to disk / gist #122

lilactown opened this issue Nov 8, 2018 · 2 comments

Comments

@lilactown
Copy link

Playing around with replete on my new iPad Pro, I'm very pleased! Glad to know I haven't completely lost the ability to write a quick snippet of code.

I think that adding support for saving a REPL session to disk / gist, along with #110, could allow Replete to be an interesting code notebook for small automation tasks (e.g. grabbing data from an API and doing some munging).

@kwccoin
Copy link

kwccoin commented Apr 22, 2019

More basic is just let one copy all dialogue so we can experiment and edit later those useful part elsewhere and cut it back to replete ...

The current copy only one line at a time. Hard to use as notebook

*** yours after that

*** more advance

With iTunes export and import or if not allowed something like pythonista ... not sure too much to ask for but have a way

@kwccoin
Copy link

kwccoin commented May 10, 2019

Finally get to a stage where you can use iTune sync doc and even self generation code to have code file stored, loaded and possibly amened. Not exactly pythonista but usable:

;; must use do to have more than 1 command 
(do
  (spit \"testdo-split1.clj\" \"(do (def x 333) (def y 444) (def z (str x))\") 
  (eval (reader/read-string (slurp \"testdo-split1.clj\"))) 
  (println x y z)
) 

This is a fuller example:

    (do ;; 
    ;; need to use quote not single quote for using require
    (require (quote [cljs.reader :as reader]) (quote [replete.core :refer [slurp spit]]) (quote [replete.io :as io])) 
    (spit "testdo-split1.clj" "(do (def x 333) (def y 444) (def z (str x)))") 
    (eval (reader/read-string (slurp "testdo-split1.clj"))) 
    (println x y z)
    

) ; x y z is in the env

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

2 participants