Fork me on GitHub
#reagent
<
2016-10-05
>
mudphone00:10:33

Does anyone happen to remember seeing a Re-Frame http-fx xhrio post example in code?

johanatan00:10:44

@gerred there are some pretty severe flaws with that "unscientific" study: I'm not sure if you can take anything away from it honestly.

johanatan00:10:07

@gerred This definitely lines up with my experience: (with significant recent time spent at the center of both sides [Clojure & Scala]):

What was most interesting was that he tracked how much time was spent debugging type errors. In other words errors that the statically typed language would have caught.
What he found was it took less time to find those errors than it did to write the type safe code in the first place.
And there's no doubt that Clojure is more succinct without all of the type annotations (some of which are only inserted to satisfy the compiler).

johanatan00:10:13

The fact that you can't really do structural editing in any of the mainstream [multi]-typed FP languages to the same degree that you can in Clojure is another major win.

johanatan00:10:33

However if I were writing a smart contracts system or a control system for a Mars rover or human-transport, I probably would reach for some formal verification.

gerred06:10:03

@johanatan of course. I took that much more as an opinion piece (maybe a little self-validating ;)) than anything else. 100% agree with your last sentence

gerred06:10:48

@reefersleep if you do dive into Elm, I’d check out PureScript after that. Pux is the primary React binding over on that side of the fence.

reefersleep06:10:13

@johanatan: Structural editing is good, but is it great enough to be an argument on its own? I don't know. I'm not that proficient in it yet. Mostly just use barf forwards, slurp forwards and raise. I don't necessarily feel that it makes me faster or more efficient in the small. The regularity of sexprs is neat in that not having to remember a bunch of syntax is nice, but I find myself argument orders of functions a lot, which was never a problem when coding Java, with the IDE helping out. And sometimes I put things on the wrong side of the parens. Which structural editing moves do you use when coding Clojure?

reefersleep06:10:14

@gerred thanks for the tip 🙂

gamecubate09:10:06

Hello. I’ve run into a problem with reagent-driven svgs on my iOS10 device (iPhone SE). Not sure it’s OS10 specific nor a reagent (which I barely use for this code; only to mount the component to render) problem. The problem: circle strokes are rendered as rectangles rather than following the shape of the circle. I created this fiddle to demonstrate: http://escherize.com/cljsfiddle/#gist=0492e16941646009a43ba4c3e33f19a4. Running on the desktop works fine. It’s only on my (and other people’s ?) phone that the problem occurs. Phone screenshot follows.

gamecubate09:10:57

Here’s the code:

[:div
  [:p "with viewbox"]
  [:svg {:width 200 :height 100 :viewBox [0 0 2 1]}
    [:g
      [:circle {:cx 0.5 :cy 0.5 :r 0.4
                :style {:fill "#FFF” :stroke "#000” :stroke-width 0.02}}]
      [:circle {:cx 1.5 :cy 0.5 :r 0.4
                :style {:fill "#000” :stroke "#000” :stroke-width 0.02}}]]]
  
  [:hr]

  [:div
    [:p "without"]
    [:svg {:width 200 :height 100}
      [:g
        [:circle {:cx 50  :cy 50 :r 40
                  :style {:fill "#FFF” :stroke "#000” :stroke-width 2}}]
        [:circle {:cx 150 :cy 50 :r 40
                  :style {:fill "#000” :stroke "#000” :stroke-width 2}}]]]]]

gamecubate10:10:11

Going away shortly. Will be back to check for responses in a few hours.

gamecubate14:10:43

More tests done. Nothing to do with reagent. It’s a iOS10 safari problem. Please ignore.