This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-28
Channels
- # announcements (1)
- # beginners (205)
- # calva (30)
- # cider (5)
- # cljdoc (25)
- # cljs-dev (2)
- # clojure (119)
- # clojure-brasil (5)
- # clojure-conj (7)
- # clojure-europe (2)
- # clojure-hamburg (7)
- # clojure-italy (14)
- # clojure-nl (2)
- # clojure-russia (13)
- # clojure-spec (79)
- # clojure-uk (58)
- # clojurescript (54)
- # core-logic (2)
- # core-matrix (2)
- # cursive (40)
- # datascript (2)
- # datomic (18)
- # duct (2)
- # emacs (14)
- # figwheel (3)
- # figwheel-main (7)
- # fulcro (30)
- # funcool (1)
- # graphql (10)
- # jobs (1)
- # juxt (13)
- # lumo (1)
- # mount (1)
- # off-topic (56)
- # other-languages (2)
- # pedestal (17)
- # powderkeg (2)
- # protorepl (2)
- # re-frame (10)
- # reagent (1)
- # reitit (7)
- # ring-swagger (10)
- # schema (2)
- # shadow-cljs (70)
- # spacemacs (13)
- # specter (4)
- # sql (9)
- # tools-deps (26)
this intro here is quite clear @thomas https://wiki.haskell.org/Monoid
thank you @mccraigmccraig
@danieleneal cljsrn question - what's your android-app cold-start time like ? i'm considering what the next step with our app is, and whether cljsrn (which would be a relatively straightforward evolution) would give us the <1s cold-start times that many apps on android seem to achieve
@mccraigmccraig we are evaluating cordova, any major complaints?
@mccraigmccraig hmm the android version of the app is actually not working at the moment 😬 I did something incompatible at some point and we've been focusing on launching the iOS version so I haven't had the time to dedicate to get the android version up and running again. From memory, cold start time didn't seem too bad but I don't think it was sub second , but then I do have a video that needs to load on the very first screen.
very happy with the re-frame/react-native development experience though
@dominicm it's ok - build is straightforward-ish, and it's easy enough to target ios+android+web - cold-start time is kinda slow and some things are niggly - scrolling is hard to deal with and css transitions can be a bit janky
if RN had been viable when i started yapster i would probably have gone with it - but it only had an ios target at the time - now it has ios,android,web and even windows targets
you are always going to have to run osx for xcode to package an ios app aren't you ?
@dominicm if you use expo you can run a 'build' command which will build on their servers which is great for CI. And the projects only contain js, no iOS or Android so you don't need xcode/mac for development
@danieleneal every time we revisit an app we made with expo, it doesn't work anymore
oh no!
I think microsoft has something too for building but I'm not sure
that's pretty cool
Bore da pawb
morning morning
hey hey, do people think this is a crime?
(defn vectorize [rf]
(fn
([] [(rf) (rf)])
([[x y]] [(rf x) (rf y)])
([[x y] [a b]] [(rf x a) (rf y b)])))
(transduce (comp (map (juxt inc dec)) vectorize) + [0 0] (range 5))
[15 5]
Vectorize modifies the types over which the reducing function works and the map juxt bit ensures the range is of the right type.I’m uncomfortable with modifying the type signatures….is vectorize really a transducer?
@mattford to be a transducer the 0 and 1 arity should propagate correctly downstream (for potential other transducers to pick up). See here for more info https://labs.uswitch.com/transducers-from-the-ground-up-the-practice/#customtransducers
@mattford: Not sure what you’re trying to do but it seems a bit weird, possibly complected to me. When you see +
as the reducing function you expect it to be working on types of number, but the starting value is not a number [0 0]
… Then there’s a dependency in the xform on vectorize knowing how to apply the rf
, so there’s a lot of coupling here.
I’d be tempted to move that stuff into the reducing function itself… and possibly extract a vectorizing reducing function builder that takes +
…
This said I don’t know what you’re trying to do / abstract etc… so take with a pinch of salt.
@maleghast are you there for the conj?
I'll be there in about 11 hours!
Er, make that eight hours. I can't timezone. Well, seven now I guess. See you in the bar of the Marriott this evening @maleghast?
Hey @seancorfield - I am not staying at the Marriott, but I may pop by to see you 🙂
Cool. I'm delayed in SFO -- equipment problems -- still hoping to get in early enough for 🍻
I'm not envious in the least 😉 Enjoy it!
@alex.lynham - Indeed!
oh cool!
have fun!
@seancorfield - Looking forward to saying Hi!
@alex.lynham - Thanks 🙂
@rickmoynihan Hi. I was actually seeing if I could do the first example from the redux library in a transducer only fashion..https://github.com/henrygarner/redux
(transduce identity (facet + [dec inc]) (range 5))
;; => [5 15]
that seems much cleaner to my eyes
as xform and rf don’t depend on each other
I wonder how much donut a man can eat w/o dying https://photos.app.goo.gl/hKm3h1HJKqRjTotG9
it is cleaner to me to, but I couldn't' help feel that we had all the machinery in transducers to not have to do it
@mattford I’m no expert but I think some operations are mapping ops (one at time), and some are reducing ops (folding multiple values into one). It seems like you’re trying to make mapping ops more like reducing ops… which you can of course do (because mapping is just another reduction with transducers), but it seems to do so you’re losing the separation of concerns which transducers bring… and I’m not sure what the benefit you’re getting is.
The redux example is cleanly separated because you can have an arbitrary xform on the sequence of ints. With yours, as far as I understand it, you can’t.
I think your feeling is right though… but I think the feeling is because mapping is reducing with transducers… so yes you certainly do have the machinery to move the reduction about.
It is interesting… and yes you certainly can mess with the semantics in transducers; and have them still be valid as they’re allowed to do a lot of things.