This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-19
Channels
- # announcements (12)
- # aws (17)
- # babashka (6)
- # beginners (40)
- # cider (14)
- # cljs-dev (14)
- # cljsrn (8)
- # clojure (110)
- # clojure-europe (46)
- # clojure-italy (1)
- # clojure-nl (4)
- # clojure-spec (14)
- # clojure-sweden (3)
- # clojure-uk (29)
- # clojurescript (52)
- # conjure (68)
- # cursive (33)
- # datomic (9)
- # figwheel-main (11)
- # fulcro (97)
- # ghostwheel (1)
- # graalvm (2)
- # helix (53)
- # hoplon (13)
- # joker (6)
- # kaocha (1)
- # leiningen (2)
- # meander (28)
- # mid-cities-meetup (1)
- # observability (1)
- # off-topic (112)
- # pathom (6)
- # pedestal (3)
- # re-frame (16)
- # reagent (16)
- # reitit (2)
- # shadow-cljs (27)
- # spacemacs (2)
- # sql (26)
- # testing (3)
- # utah-clojurians (3)
- # vim (2)
- # xtdb (32)
So if you code with immutable objects without methods and use functions on them, do you code in OO?
Sorry, just for clarity, I was joking around with Bryan earlier (we know each other). IMO, re-frame is not OO in any way whatsoever. And, in an earlier life, I wrote commercial grade courseware on OO design and OO languages. And I programmed professionally in Smalltalk. And Eiffel. And C++. Etc. So I feel confident making this assessment.
Haha ok.
@mikethompson @neo2551 lol, i was just trying to continue the joke. shoulda added a smiley — my b
Ah I see, so mikethomspon would like to learn more about OO, using the OOP language re-frame. I think its all cleared up for me guys
Is there some library / solution that supports getting unhandled exceptions, writing the re-frame call stack to a file, uploading it to S3 and allowing an admin to “replay it” in development mode? Like a combination of Sentry/Fullstory powered by the immutable data structures of CLJS/re-frame ?
I guess the first part of the question would be, is it possible to export a user journey and replay it in re-frame ?
i saw a talk on this at euroclojure one year, https://www.zimpler.com/zimplers-developer-jean-louis-giordano-will-present-at-euroclojure-2016 this was the talk where they presented exactly this
i had a quick look on their github and couldn't find anything that looked like it, but you might be able to find jean louis and ask him
@jdkealy
There's no library that I'm aware of. But you can roll your own solution reasonably easily.
The most modern technique might be to:
• Write a global interceptor which captures events
and app-db
state (global interceptors is a new feature and no docs yet)
• Hook window.onerror
to catch exceptions and, in your handler, do the logging you want to do (to S3?)
• Come up with a way to replay events (this part has some subtleties)
Global Interceptor
---------------------
The Global Interceptor would:
1. Capture each event into a collection
2. Checkpoint app-db after each event has run (and save that too into a collection)
So imagine this Global Interceptor accumulating into a vector of maps which each element looking like this:
{:event [:whatevers "dad joke"]
:new-app-db <...>}
Because of structural sharing, keeping "previous" app-db around is normally very little overhead (assuming that app-db doesn't change too much with each event).
Logging On Exception
--------------------------
??? it varies depending on your target
Replay
--------
You have to obtain:
1. A snapshot of the state of app-db at a point in time
2. Start to feed events through (by just dispatching them) Now, the subtlety with replaying events is that you probably don't want to reply all of them.
This is really useful. it’s a shame it will not be captured for long by slack. I need both of these features and was looking into goog.ErrorReporter instead of a re-frame level solution
Or you might want to reply them, but turn off effect handlers
For example, if an event handler triggers an HTTP get, which will later cause an success event ... you either want:
1. The original success
event replayed OR
2. The success
event caused by the replayed GET
But not both
So, in such cases, you have to filter out one of these events: 1. stub out the effect handler so the GET doesn't actually happen 2. Not replay the success event, and instead somehow wait for the new success to hit, before then continuing on with the rest of the event replay