Fork me on GitHub
#onyx
<
2016-10-25
>
colinhicks02:10:51

@michaeldrogalis, fwiw my optimism about pre-compiling onyx-local-rt for the tutorial is now somewhat tempered. Turns out the approach I thought could significantly reduce the downloaded JS asset size (and yield better perceived UI responsiveness) leads to a catch-22 with cljs compiler optimizations. Will explore the Klipse-based approach next.

michaeldrogalis02:10:42

@colinhicks Thanks for digging in 🙂

lucasbradstreet14:10:22

@colinhicks cool. Looks good, especially because changing the function seems to work nicely 🙂

robert-stuttaford14:10:59

@michaeldrogalis you’ve started something pretty damn cool with this 🙂

michaeldrogalis15:10:08

@colinhicks Wonderful! 🙂

michaeldrogalis15:10:26

@robert-stuttaford I'm very excited to see where this goes.

viebel16:10:27

@colinhicks what is your trick for code evaluation? are you using cljs.js/eval-str?

colinhicks16:10:34

I'm thinking the tutorial will be centered around leveraging Onyx's data-driven API. So, apart from creating/editing user-defined functions, tutorial-takers will mostly be manipulating data structures.

colinhicks16:10:49

For a given data structure, we can run Onyx's validations independently to say for example: "Your workflow has cycles. Currently Onyx supports only directed acyclic graphs."

colinhicks16:10:52

@michaeldrogalis @lucasbradstreet et al. , I'm going to integrate a react lib next. What is your preference between om.next/rum/reagent?

michaeldrogalis16:10:13

We're on Om.next. Pretty happy with it.

michaeldrogalis16:10:23

Happy to use Reagent if you prefer it, though.

colinhicks16:10:17

Cool. Om it is.

michaeldrogalis16:10:29

A good, interactive tutorial will be really big. Im excited.

kingoftheknoll20:10:41

but then hang once it goes back into the inner loop the second time.

michaeldrogalis21:10:23

@kingoftheknoll What is defstate?

kingoftheknoll21:10:22

Mount, lets you do lifecycle stuff like component does

kingoftheknoll21:10:04

Just with vars instead of records.

michaeldrogalis21:10:34

Been a while since I looked at Franzy, but I think you need to commit and acknowledge the records you polled for if you have that turned on

michaeldrogalis21:10:44

Just a guess though

kingoftheknoll21:10:03

I would think that if I didn't commit an offset if would read from the beginning again. I'll give that a try. Not a whole lot of docs around this part just lots of mentions that he uses core.async and manifold but doesn't say how.

kingoftheknoll21:10:18

I'll keep poking around 🤔

yonatanel21:10:53

@kingoftheknoll What exactly is your output?

kingoftheknoll21:10:57

Logs outer, then inner for the 5 records in topic, outer, inner then stops

kingoftheknoll21:10:17

Sorry on mobile for the next few min forgive the formatting.

michaeldrogalis21:10:45

@kingoftheknoll You might want to try Kinsky, we haven't seen the maintainer of Franzy around for a long time, not sure where he went - https://github.com/pyr/kinsky

michaeldrogalis21:10:16

Fortunately we dont have to touch the Kafka code all that much, but if I were using Kafka for application level code, I probably wouldnt use it tbh.

kingoftheknoll21:10:19

oh this is great, I haven’t come across this one in my search.

yonatanel21:10:01

@kingoftheknoll Do you see "Got a value in this loop" at all from the channel consuming loop?

nrako21:10:54

(when (seq records) (>! channel (first records)) (recur (rest records)))) ;;-> will this ever terminate? If it doesn't respond to (seq records), your else clause might be hanging up here?...

kingoftheknoll21:10:58

The records is not a list or vector but it appears it implements ISeq. I’ll have to dig into it more. I’m not hard set on using Franzy so I’ll check out kinsky as well.

kingoftheknoll21:10:32

Thanks for helping out. Onyx is the only library I know of that publicly uses kafka so I really appreciate it. BTW love Onyx and the work you’re doing. I can’t wait to use it for something!

michaeldrogalis21:10:00

@kingoftheknoll 🙂

drewverlee23:10:26

I’m slowly working on adding a “how to write aggregations” lesson for learn-onyx. My hope is to have it culminate in writing a simple anomaly aggregation function similar to what https://flink.apache.org/news/2016/04/06/cep-monitoring.html does. Hopefully the last piece of the puzzle i need in order to create a rough draft of this is to understand what these log functions do

(defn set-value-aggregation-apply-log [window state v]
  ;; Log command is not needed for single transition type
  v)
Any ideas?

michaeldrogalis23:10:42

@drewverlee Yes, the explanation is in that section of the guide.

michaeldrogalis23:10:38

FYI I fixed the colorization of code examples in the User Guide. Forgot a gem install along the way.

michaeldrogalis23:10:44

Sorry about that.