Code Monkey home page Code Monkey logo

day-of-datomic's People

Contributors

benkamphaus avatar bobby avatar cldwalker avatar redinger avatar stuarthalloway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

day-of-datomic's Issues

A Dependent library needs to upgrade to the latest tools.namespace

I just cloned the latest code from github (commit a60b703, Mon Jul 1 2013). Running lein repl or lein trampoline repl. Gave me the below error. It looks like one of the dependant libraries, nrepl-inspect, is using an older version of tools.namespace (0.2.3).

webkell@ubuntu:~/Projects/trial/day-of-datomic$ lein trampoline repl
:repositories detected in user-level profiles! [:user] 
See https://github.com/technomancy/leiningen/wiki/Repeatability
Exception in thread "main" java.io.FileNotFoundException: Could not locate clojure/tools/namespace/find__init.class or clojure/tools/namespace/find.clj on classpath: 
        at clojure.lang.RT.load(RT.java:443)
        at clojure.lang.RT.load(RT.java:411)
        at clojure.core$load$fn__5018.invoke(core.clj:5530)
        at clojure.core$load.doInvoke(core.clj:5529)
        at clojure.lang.RestFn.invoke(RestFn.java:408)

In the Day-Of-Datomic project configuration, I put in the latest ([org.clojure/tools.namespace "0.2.4"]), and the repl now comes up. I'd make a pull request, but the problem seems to be in a dependent library. So ideally, the change would be made there. But Let me know if you'd like me to fix and make a pull request.

Hth

examples with reader functions don't work for `lein repl` (lein 2)

When using lein 2.0.0-preview8 on social_news.clj:

$ lein repl
user=> (use :reload 'datomic.samples.repl)
nil
user=> (easy!)
:awesome
user=> (def conn (scratch-conn))
#'user/conn
user=> (defpp change-user-name-result
  #_=>   "Demonstrates upsert. Tempid will resolve to existing id to
  #_=>    match specified :user/email."
  #_=>   (d/transact
  #_=>    conn
  #_=>    [{:user/email "[email protected]" ;; this finds the existing entity
  #_=>      :db/id #db/id [:db.part/user]  ;; will be replaced by existing id
#<RuntimeException java.lang.RuntimeException: No reader function for tag db/id>

The same happens for other tutorials that have reader functions.

I found this explanation which pointed me to use lein trampoline repl which does work with lein 2.0.0-preview10. We should update the docs to use trampoline, explain lein repl's limitations or explain which versions work for lein repl.

Error running "Hello World" example through REST API

In the REST API, I've transacted the "Hello World" datom as in hello_world.clj. If I then navigate to /api/query and put in the query

[:find ?e :where [?e :db/doc "Hello world"]]

I get a single result back. But if I add the "dot" for a single scalar binding, as is done on line 29 of hello_world.clj:

[:find ?e . :where [?e :db/doc "Hello world"]]

I get a 500 error from the server. I thought it might be an issue with URL-encoding--the "." stays as a dot rather than going to %2E--but changing that doesn't make a difference. I'm running Datomic 0.9.5344; I imagine this isn't an issue with the tutorial but thought I'd report it here first in case this is a "newbie issue." It's not entirely clear to me from the documentation what the single dot binding achieves.

misplaced close-bracket in schema.edn

misplaced close-bracket in schema.edn in initial "stories" section

user=> (load-file "tutorial/migration.clj")
true
user=> (has-attribute? (d/db conn) :story/title)
true
user=> (has-attribute? (d/db conn) :story/slug)
true
user=> (has-attribute? (d/db conn) :comment/author)
false
user=>

unable to start lein trampoline repl in windows : Unsupported escape character \p

I get this message when running lein trampoline repl in windows

Exception in thread "main" clojure.lang.LispReader$ReaderException: java.lang.Ru
ntimeException: Unsupported escape character: \p
        at clojure.lang.LispReader.read(LispReader.java:220)
        at clojure.core$read.invoke(core.clj:3407)
        at clojure.core$read.invoke(core.clj:3405)
        at clojure.main$eval_opt$fn__6602.invoke(main.clj:306)
        at clojure.main$eval_opt.invoke(main.clj:306)
        at clojure.main$initialize.invoke(main.clj:327)
        at clojure.main$null_opt.invoke(main.clj:362)
        at clojure.main$main.doInvoke(main.clj:440)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:419)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unsupported escape character: \p
        at clojure.lang.Util.runtimeException(Util.java:219)
        at clojure.lang.LispReader$StringReader.invoke(LispReader.java:505)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
        at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1091)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1148)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:982)
        at clojure.lang.LispReader.read(LispReader.java:185)
        ... 12 more

Unable to resolve symbol 'doc' in social_news.clj file

Not sure if this is an issue or I am misunderstanding something.

Looks like the namespace 'clojure.repl' should be required explicitly in social_news.clj file or evaluate (easy!) macro beofre any functions from clojure.repl ns are used.
easy! macro is the one doing the requiring for clojure.repl ns (I am not really familiar with macros but we are doing (use 'datomic.samples.repl). clojure.repl should be loaded when (easy!) is called and not otherwise?)

; CIDER 0.7.0snapshot (package: 20140730.148) (Java 1.7.0_60, Clojure 1.6.0, nREPL 0.2.3, cider-nrepl 0.7.0-snapshot)
user> (use 'datomic.samples.repl)
nil
user> (doc easy!)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(/private/var/folders/0f/4w3qyc8s5vs9bnv6lfh5pg_80000gn/T/form-init7212022613257498497.clj:1:1)
user> (easy!)
:awesome
user> (doc easy!)
datomic.samples.repl/easy!
([])
Macro
Set up a bunch of REPL conveniences. See the source
with (source easy!) for details.
nil
user>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.