Skip to content

Commit

Permalink
Updated dependencies, made it so with-precision could be whitelisted,…
Browse files Browse the repository at this point in the history
… and updated the "about" section a little bit.
  • Loading branch information
Raynes committed Jul 23, 2010
1 parent d478c5a commit a481514
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
8 changes: 3 additions & 5 deletions project.clj
Expand Up @@ -3,12 +3,10 @@
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[net.cgrand/moustache "1.0.0-SNAPSHOT"]
[ring/ring-jetty-adapter "0.2.0"]
[ring "0.2.5"]
[commons-lang/commons-lang "2.5"]
[clj-sandbox "0.3.8"]
[clj-highlight "0.1.1-SNAPSHOT"]
[hiccup "0.2.3"]
[clj-gist "1.0.0-SNAPSHOT"]]
[hiccup "0.2.6"]]
:dev-dependencies [[swank-clojure "1.2.1"]
[lein-search "0.3.0-SNAPSHOT"]
[ring/ring-devel "0.2.0"]])
[ring/ring-devel "0.2.5"]])
19 changes: 17 additions & 2 deletions src/tryclojure/core.clj
Expand Up @@ -16,12 +16,21 @@
(extend-tester secure-tester
(whitelist
(function-matcher 'println 'print 'pr 'prn 'var 'print-doc 'doc 'throw
'def 'def* 'dosync 'alter '.))))
'def 'def* 'dosync 'alter '. 'finally '*math-context*)
(class-matcher java.io.StringWriter String Byte Character StrictMath StringBuffer
java.net.URL java.net.URI java.math.MathContext))))

(def my-obj-tester
(extend-tester default-obj-tester
(whitelist
(class-matcher java.io.StringWriter String Byte Character StrictMath StringBuffer
java.net.URL java.net.URI java.math.MathContext))))

(def state-tester
(new-tester (whitelist (constantly '(true)))
(blacklist (function-matcher 'def 'def*
'ensure 'ref-set 'alter 'commute
'swap! 'compare-and-set! ))))
'swap! 'compare-and-set!))))

(defn has-state? [form]
(not (state-tester form nil)))
Expand Down Expand Up @@ -73,6 +82,12 @@
"This site is still under construction. I can't promise everything will work correctly."
" You can find the site's source and such on it's " (link-to "http://github.com/Raynes/tryclojure" "github")
" page."]
[:p.bottom
"This website is mostly going to be useful for beginners. All of the code that is ran is ran"
" server side. This means it *has* to be sandboxed. This also means that this web REPL is NOT"
" ever going to be as useful as a normal REPL ran on your computer. I'm considering throwing up"
" another site that runs a pretty Clojure REPL through a typical Java applet. That one would be"
" client-side, and would not be sandboxed."]
[:p.bottom
"TryClojure is written in Clojure and JavaScript, powered by "
(link-to "http://github.com/Licenser/clj-sandbox" "clj-sandbox")
Expand Down

0 comments on commit a481514

Please sign in to comment.