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

Worksheet-centred features and file export similar to Gorilla REPL #43

Open
silasdavis opened this issue May 1, 2014 · 3 comments
Open

Comments

@silasdavis
Copy link

The architecture for session seems really nice. I'm interested in creating a living report that collects benchmarks, example usages of clojure prototypes, and plots of result data. With Gorilla I can:

  • Create a rich document with embedded Clojure an visual renderings of data
  • Save that 'worksheet' (from the web interface) as plain a plain text Clojure file with output and metadata embedded in comments
  • Work in the context of a project.clj
  • Put the worksheet under version control with the project that contains it
  • Embed markdown and latex formulae

It seems like the core functionality in Session exists to do much of the above. Are they things you intend to support more directly? Does session already support this in a different way? Am I better to think of Session as being optimised as live coding environment rather than executable document?

In particular, how can I share my worksheets; can I store them as plan EDN/Clojure somehow or do I need to export from Datomic? I'd like to be able to put them under version control with the underlying code because they would be an integral part of the project in my context.

Thanks for the project!

@kovasb
Copy link
Owner

kovasb commented May 4, 2014

Hi,

Stuff like latex is something we want, just need some Om widgets to make it happen.

I'd like to support better interop with existing projects, just not there yet.

Exporting the inputs of a session is pretty easy, just run a datomic query and write the file. I'll make this a built-in function at some point. I'd recommend against putting the output in the file though.

How to put the db into source control is an open question; exporting the db into a file works for small sessions but will run into trouble with serious usage. However it is possible to backup the databases to s3.

Working within the context of an existing project is a somewhat tricky, but should be possible modulo classloader quirks.

One thing we would want is to import the contents of the project.clj into the session db, so we know which version of the project was used for which loops.

@silasdavis
Copy link
Author

Perhaps trying to source control when we have datomic is duplicative. I have no experience with datomic so I'm not sure what query to make to export. I could probably find out, but I'd welcome a built-in.

What would be the best way to share a particular session with other people with the inputs and outputs?

@kovasb
Copy link
Owner

kovasb commented May 15, 2014

Hi,

We definitely need some built-ins to make it easy.

The underlying mechanism is datomic's backup and restore functionality:

bin/datomic backup-db from-db-uri to-backup-uri

bin/datomic restore-db from-backup-uri to-db-uri

However this won't add the session to the index page because that is in a
separate db.

I've been busy with the next major iteration of session but will take a
look at this soon.

On Thu, May 15, 2014 at 9:54 AM, Silas Davis [email protected]:

Perhaps trying to source control when we have datomic is duplicative. I
have no experience with datomic so I'm not sure what query to make to
export. I could probably find out, but I'd welcome a built-in.

What would be the best way to share a particular session with other people
with the inputs and outputs?


Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-43211961
.

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