- Tutorial and command overview
- Applications and features
- Implementation tidbits
- Proposal for automation-friendly reflection
- Implications for research and possibilities for future work
- Internal and slightly outdated design summary
Table of contents:
- Applications of reflection
- Getting started
- Using a Docker container
- Supports reflection.
- Equal pointers in a sub-question become separate pointers in the respective sub-workspace. This is taken from Affable.
- Uses Datomic as its database.
Applications of reflection
Removing the following limitations would only be worthwhile if Jursey was going to be used by regular users. So far it looks like this won't be the case.
Jursey is not user-friendly. If your input doesn't follow the rules, the output won't make sense to you. The error messages won't be helpful.
There is no way to escape special symbols in hypertext. You cannot use any of
$in normal text. This is not a fundamental limitation and could be fixed within eight hours.
(This might not work on Windows. If you run into trouble, let me know and we'll figure something out.)
(You can also skip this section and run Jursey in a Docker container.)
Install Leiningen, a build tool for Clojure. If you use Homebrew, you can just do
brew install leiningen.
Get the code and Datomic. Note that with downloading Datomic you agree to the terms of the Datomic Free Edition License, which also comes with the zip archive.
$ git clone https://github.com/rmoehn/jursey.git $ cd jursey $ wget -O datomic-free-0.9.5703.zip https://my.datomic.com/downloads/free/0.9.5703 $ unzip datomic-free-0.9.5703.zip $ mv datomic-free-0.9.5703.zip datomic
Install the Datomic JAR to your local Maven repo. Yes, you need Maven.
$ cd datomic $ ./bin/maven-install
Start the Datomic transactor:
# Still in directory `datomic`. $ ./bin/transactor config/samples/free-transactor-template.properties &
I've only gotten the connection between Jursey and the transactor to work when the transactor runs on Java 8. If on your machine
java -versionprints something about version 11, you have to (temporarily) change your
JAVA_HOME. On my Mac it looks like this:
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/ bin/transactor config/samples/free-transactor-template.properties &
Start a Clojure REPL:
$ cd .. # Back to project root. $ lein repl … jursey.repl-ui=> (set-up) … jursey.repl-ui=> (ask-root "What is your name?") …
You might get a warning about an illegal access operation. You can ignore it or make sure that your
leincommand also runs on Java 8.
Using a Docker container
Note that with running the following commands, you implicitly download Datomic Free and thereby agree to the terms of the Datomic Free Edition License.
$ git clone https://github.com/rmoehn/jursey.git $ cd jursey $ docker build -t jursey . && docker run -ti --rm jursey
This trades leanness and speed for running Jursey with the fewest number of commands. I don't know why, but it can take up to a minute for the REPL prompt to appear. Also, I didn't make the Dockerfile according to best practices, so you end up with a > 900 MB image.
If you want to have a reliable branch (ie. no force-pushes), use
you want to see the newest changes, look at the
dev-X branch with the highest
X. If you want to study history in detail, look at all the
My development process:
- Start task X.
git checkout -b dev-X master(Until task 9.2 I developed everything on branch
- Make snapshot commits, push often, force-push sometimes.
- Review changes:
git difftool master
git co master
git merge dev-X
- Squash and reword as needed.
The commits on
dev-Xare too small and the commits on
masterare too big. None of them are ‘logically separate changesets’. This is the nature of prototyping.
Sometimes I push to
Why do I not do them? YAGNI. I only do what will be useful later. If I expected end users to use Jursey, I would validate inputs. If I expected to add features to the core of Jursey, I would clean up the code more. But I don't expect, so I don't do.
Why are there so many? They are insights that I have while programming and might not have when I revisit the code weeks later. If one of my YAGNI expectations turns out wrong, I will open the file to change something and the TODO will remind me to change something else first. This is also the reason why I leave them littering the code instead of putting them in an issue tracker.
What about those Notes? When I read other people's code, my first thought is often: ‘This is stupid.’ Almost as often I realize a few minutes (or days) later that it was I, who was stupid. When I write a piece of code that I fear to cause a this-is-stupid thought, I add a note to induce the I-was-stupid response quickly. Of course, code that seems stupid is at least slightly stupid. The challenge is to find the level of stupidity that gives optimal long-term productivity.
- Copying hypertext makes equality test for nested structures more complex. With persistent data structures one could just test identity.
Thanks to Andreas Stuhlmüller and Derek Elkins for their advice. And thanks to Paul Christiano for funding this work.