Fork me on GitHub
#off-topic
<
2017-02-02
>
sova-soars-the-sora01:02:18

Haha I just started making a blog @ http://ghost.org and one of the loading texts "Millions of electrons are repositioning themselves."

sveri08:02:34

@qqq I learned om first like two years ago. I found it to be very complex back then and hard to understand. When I finally grasped it and used it for some toy stuff I took a look at reagent. Understanding and using it was like two orders of magnitudes easier. Whereas I would say that one order of magnitude came from the fact I learned the FRP concepts while learning OM.

olivermooney09:02:12

@sveri which would you reach for now, having used both? I’ve mainly used Rum to date but I’m considering trying Om.Next for comparison

arnaud_bos09:02:41

Same experience as @sveri here, learning FRP while learning OM and found reagent easier back then. I'm not doing a lot of Cljs those days but I'd give Om.Next another try should I have some time to experiment, I'd go to reagent for my own productivity at first though.

danielstockton09:02:05

IMO they're not really comparable, it depends what your problems are.

akiroz09:02:09

@sveri Same here too, but the biggest problem I had with Om was that I started with their function DOM syntax and Reagent with Hiccup.

danielstockton09:02:07

Om.next takes ideas from graphql, falcor, datomic... There is nothing comparable in rum, reagent, etc...

danielstockton09:02:06

You'd look to om for the same reasons you'd look to graphql and falcor. There is not much point comparing the two as simple reactjs wrappers.

akiroz09:02:32

I guess the comparison should be Om <-> Reagent and Om.next <-> re-frame?

akiroz09:02:31

I only learned much later that you can use sablono with om to get the same hiccup syntax like reagent.

arnaud_bos09:02:39

but Om had notions of managing the global state from the start, I don't think reagent had that, but I'm not sure

akiroz09:02:33

nope, reagent didn't have global state management.

arnaud_bos09:02:42

about sablono/hiccup, if you're interested, take a look at kioo, it's a templating library for om and reagent inspired by enlive/enfocus

arnaud_bos09:02:22

I love this concept.

sveri09:02:46

@danielstockton From my understanding it was about OM and not OM.next

akiroz09:02:13

@arnaud_bos interesting, but it looks a bit hard to infer dom structure from the code....

arnaud_bos09:02:07

it might yes, and there's a whole section on troubleshooting, but in practice I've never had to troubleshoot

sveri09:02:20

One more concern I have about Om and Om.next is that it is mainly David working on it, which has not that much time in total, so I possibly feature development will suffer, while reagent is very stable and useable since two years. But thats more of a soft concern and not a hard one.

danielstockton09:02:37

Om is pretty stable also, there is more work going into things built on top of it liked compassus and untangled.

roelof14:02:43

Im going to make a custom pagination which displays numbers instead of the prev - next. Is it a good idea to make the current page in the middle or for example as 3 number.

pesterhazy15:02:54

I want to know too roelof

roelof15:02:34

@pesterhazy How do you make the pagination . I think I will use ez-web

wamaral16:02:21

When in doubt, copy the big ones. Google shows the current page in the middle

roelof16:02:46

oke, I can do that. I will not always be possible when im at page 1 or 2

roelof16:02:29

@wamaral thanks, now time to experiment how to make a google layout when Im have this output :

(= (paginate (range 101) 10 5)
   {:prev-seq (4 3 2 1), :next-seq (6 7 8 9 10 11),  

roelof16:02:36

im now at page 5

roelof16:02:27

I could use the bootstrap idea but still I have to think well how to take the right numbers out of the prev-seq and next-seq

roelof16:02:31

I think I need some sort of if then or a case function

bja17:02:17

ugh, just noticed that influxdb is already supported by metrics-clojure (edited). There goes the last hour.

pesterhazy17:02:42

interesting. What do you use it for, if you can explain?

bja18:02:33

metrics-clojure or influxdb?

bja18:02:45

I monitor jvm stats, ring stats, and various app metrics (email sends, messages failed to process, time it takes to talk to various services/databases) using metrics-clojure. It has a nice json output for quick viewing in development, but it's far more useful when I can see a historical view of the metrics via grafana. So I'm sending the metrics to influxdb and viewing them in grafana.

bja18:02:25

I'm only using influxdb for app metrics right now, although considering it for another use case around user analytics for partners

pesterhazy19:02:17

@bja, that sounds quite useful

dominicm20:02:08

@bja we're already using riemann for various application metrics, what does metrics-clojure provide over that? Or is it just a replacement for all the in-house boilerplate we've come up with?

dominicm20:02:22

if it "just" gave us JVM metrics, that would be huge win

bja20:02:30

it does that out of the box

bja20:02:46

(and can report to reimann too)

dominicm20:02:27

@bja yeah I saw the riemann integration & it piqued my interest.

bja20:02:51

as far as app metrics, it doesn't give you much over using riemann or statsd directly. it has a couple handy plugins to gather jvm metrics and ring metrics for you.

dominicm20:02:07

@bja what's the process to start getting some JVM metrics sent to Riemann? (Essentially: what's the overhead for me)

bja20:02:46

3 lines in project.clj and something like

(instrument-jvm)
(def riemann-conn (make-riemann ....))
(def riemann-reporter (reporter riemann-conn metrics.core.default-registry ....))
(.start riemann-reporter)

bja20:02:09

slightly more work if you want to build components for it

dominicm20:02:13

Nice! It looks pretty component-friendly too.

dominicm20:02:42

Oh I just realised that my eyes glossed over the docs

bja20:02:52

there are some other benefits of being integrated with coda hale's metrics library in terms of common JVM library integration

bja20:02:11

for example, my jdbc connection pool will report stats to a metrics registry if I want

dominicm20:02:15

Neat! I like things that are free like this. So much place for repitition in metrics.

bja20:02:00

if you're a more traditional jvm-based shop, metrics also offers JMX-based reporting

bja20:02:02

(I don't contribute to metrics-clojure at all, just a happy user)

dominicm20:02:25

Honestly — it sounds like we should be!

bja20:02:27

and by happy, I mean it hasn't bit me over the few years I've used it.

dominicm20:02:56

That's good to hear. Particularly as it maintains my highly biased view that SJL is awesome (even though he doesn't maintain it anymore)