Skip to content

Commit

Permalink
om's spaghetti; wip
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhicks committed Oct 26, 2016
1 parent 39fb715 commit c1af567
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 16,726 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ pom.xml
.lein-plugins/
.repl
.nrepl-port
.cljs_rhino_repl/
3 changes: 2 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.293"]
[org.onyxplatform/onyx-local-rt "0.9.11.0"]
[org.omcljs/om "1.0.0-alpha47"]
[cljsjs/codemirror "5.19.0-0"]]

:plugins [[lein-figwheel "0.5.8"]
Expand Down Expand Up @@ -100,7 +101,7 @@
;; need to add dev source path here to get user.clj loaded
:source-paths ["src" "dev"]
;; for CIDER
:plugins [[cider/cider-nrepl "0.12.0"]]
;;:plugins [[cider/cider-nrepl "0.12.0"]]
:repl-options {; for nREPL dev you really need to limit output
:init (set! *print-length* 50)
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}}
Expand Down
42 changes: 3 additions & 39 deletions resources/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,8 @@
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<form id="app">
<h2>Onyx tutorial scratchpad</h2>

<h4>Function</h4>
<textarea rows="5" cols="80" id="fn">
(defn ^:export my-inc [segment]
(update-in segment [:n] inc))
</textarea>

<h4>Job</h4>
<textarea rows="10" cols="80" id="job">
{:workflow [[:in :inc] [:inc :out]]
:catalog [{:onyx/name :in
:onyx/type :input
:onyx/batch-size 20}
{:onyx/name :inc
:onyx/type :function
:onyx/fn ::my-inc
:onyx/batch-size 20}
{:onyx/name :out
:onyx/type :output
:onyx/batch-size 20}]
:lifecycles []}
</textarea>

<h4>Evaluation</h4>
<pre>
(-> (api/init job)
(api/new-segment :in {:n 41})
(api/new-segment :in {:n 84})
(api/drain)
(api/stop)
(api/env-summary))
</pre>
<input type="submit" value="Run"/>
<h4>Result</h4>
<textarea rows="10" cols="80" id="result"></textarea>
</form>
<script src="js/compiled/onyx_tutorial.js" type="text/javascript"></script>
<h2>Onyx tutorial scratchpad</h2>
<div id="app"></div>
<script src="js/compiled/onyx_tutorial.js" type="text/javascript"></script>
</body>
</html>
Loading

0 comments on commit c1af567

Please sign in to comment.