Fork me on GitHub
#beginners
<
2015-06-16
>
trybeee00:06:01

@yusup: what about adding this as arguments to java execution command?

java -server -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -Djava.rmi.server.hostname= -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmiserver.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false 
/path/to/my.jar
also, you might be interested in Flight Recorder for remote profiling http://www.oracle.com/technetwork/java/javaseproducts/mission-control/java-mission-control-1998576.html

yusup11:06:30

@trybeee: thanks. My problem solved. I was using fab to sync my project on remote machine, and it kinda failed for some reason. After being able to sync the project, everything worked. I am trying out Yourkit and it is great.

chris16:06:10

In terms of Om, what does reify actually mean?

meow17:06:09

@chris: I'm new to Om and clojure so I can't give any kind of definitive answer, but I'll take a bit of a stab. What reify means in Om is what it means in clojurescript in general, which is also what it means in clojure. Om uses reify to construct things that satisfy the requirements of React for protocols and interfaces and so forth. Beyond that it is a rabbit hole that I haven't yet gone down, so I'll anxiously await more knowledgeable answers than mine. simple_smile

markstang17:06:52

@chris @meow As I understand it, it takes the function and the name and implements the protocol. "make (something abstract) more concrete or real."

teslanick17:06:51

More or less that. It's saying, "I'm making a thing that implements these protocols" which is another way of saying, "You can call the protocol fns on the thing that is returned"

meow17:06:18

@chris: The other impression I get is that Om exposes the use of reify and such to allow one to get "close to the metal" of React, whereas other tools like Reagent and Quiescent hide those details under more functional/familiar code. Hence the criticism that Om is more OO and not as Clojure-ish but that is a known tradeoff that @dnolen has taken and will likely remain even in Om.next (I'm channeling @dnolen so hopefully he will correct me where I am wrong). So while om.next will be different than om and "simpler", it won't be radically different because it has the design intent of adhering rather closely to React and allowing exposure to all that React offers. This makes it easy for Om to stay in sync with React and allows others to build additional abstractions on top of Om.

dnolen17:06:06

that's right

dnolen17:06:19

and reify is a Clojure thing, not specific to Om

meow17:06:10

I'm really most familiar with Interfaces from the Python world where some projects like Zope adopted them in a big way. I get the impression that React uses Interfaces and therefore Om and other wrappers need to use them as well and reify is how one does that in cljs.

dnolen17:06:42

@meow: in the next version Om components will literally just be React components, so the protocols are going away. You just implement React lifecycle methods directly.

chris17:06:05

ok, thanks for your help everyone

meow18:06:13

@dnolen: Cool. I can't wait to see what om.next brings to the table. These are very exciting times for cljs. Thank you for your awesome efforts, David - you rock!

meow18:06:53

At what point does channel fragmentation become a detriment?

devn18:06:52

i wouldn't worry about it

devn18:06:02

it sorts itself out naturally

devn18:06:33

i worked for a company where we had 3x more channels than people

meow18:06:14

@devn: good points

devn18:06:29

they're like git branches

devn18:06:46

people prune them when they see fit

devn18:06:56

and if there's a dupe, the one with more people wins over time

meow18:06:14

Well, now there is an om channel. simple_smile

andrea.crotti18:06:00

hi there, suppose I have a function defined like that

andrea.crotti18:06:14

(defn func [x y] (+ x y))

andrea.crotti18:06:32

is there a way to define my input as map instead, for example {:x 10 :y 20}

andrea.crotti18:06:52

and pass that in? I can't rely on the order being maintained I suppose?

andrea.crotti18:06:08

if I assume the order is kept it seems to work actually

andrea.crotti18:06:34

doing (apply func (vals {:x 10 :y 20}))

akiva18:06:20

A map doesn’t maintain its order unless it’s a sorted-map.

akiva18:06:11

(defn fn [{:keys [x y]}] (+ x y)) allows you to demand a map as a parameter, however.

andrea.crotti18:06:57

@akiva: ah ok nice, yes well these functions are already defined

andrea.crotti18:06:07

playing around with Qil

alejandro18:06:45

@andrea.crotti: also look at prismatic/pluming defnk

meow18:06:44

I'm confused that cljs docs say

The :as prefix selector is required in :require-macros.
while in the wild I'm not always seeing an :as prefix being used.

meow18:06:30

For example:

(:require-macros [garden.def :refer [defrule defkeyframes]])

dnolen18:06:43

where does it say that?

meow18:06:14

@dnolen: ^

dnolen18:06:45

@meow: fixed