This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-24
Channels
- # 100-days-of-code (7)
- # announcements (1)
- # bangalore-clj (1)
- # beginners (87)
- # boot (6)
- # cljdoc (16)
- # cljsrn (13)
- # clojure (32)
- # clojure-dev (30)
- # clojure-italy (18)
- # clojure-nl (4)
- # clojure-serbia (1)
- # clojure-uk (48)
- # clojurescript (18)
- # cursive (18)
- # datascript (1)
- # datomic (7)
- # events (9)
- # figwheel-main (28)
- # fulcro (2)
- # hyperfiddle (2)
- # immutant (8)
- # jobs (16)
- # liberator (4)
- # nyc (2)
- # pedestal (15)
- # re-frame (8)
- # reagent (12)
- # reitit (8)
- # remote-jobs (1)
- # ring-swagger (2)
- # robots (1)
- # rum (1)
- # schema (1)
- # shadow-cljs (45)
- # spacemacs (49)
- # sql (13)
- # tools-deps (59)
- # uncomplicate (1)
- # vim (10)
I recently saw someone post about a workflow/library that could save your repl history as tests or something like that. I cant find that link anywhere, does someone here know of something like that?
@kidpollo you're probably thinking of https://github.com/cognitect-labs/transcriptor
After spending the weekend wrapping my head around sente, I have one question which remains:
* As far as I understand it, authentication state is read from the ring map, specifically here: {:session {:uid :some-uid-val}}
* So, e.g. to login a user, the user has to post a rest api request to some endpoint which then sets a key there, i.e. (assoc-in response [:session :uid] :some-uid)
* Then, the client has to reconnect
So far, this works. But this seems to be the only mechanism to differentiate between users. Say I have a not-logged-in (anonymous) user connected. Unsurprisingly, I’ll have:
(:any @connected-uids)
;; => #{taoensso.sente/nil-uid}
Now, another anonymous user connects from a different computer. I still have:
(:any @connected-uids)
;; => #{taoensso.sente/nil-uid}
Where’s the other one? Are both users simply grouped as “nil-uid” users and I can’t sent them specific messages? Say, User 1 wants to subscribe to updates of cat videos while User 2 is more interested in dog videos. Phoenix / Elixir solves this by having some server-side state for each websocket connection, this seems not to be the case here. Am I missing anything?I haven’t used Sente properly, but when I tried it out, I got the impression that it’s maybe trying to handle a bit too much for me.
@olieidel you need to give anonymous users some form of id to distinguish them, such as a UUID
In the session then, right? This will mean that users will have to reconnect after they've been assigned a uuid, is that correct?
Seems a bit clunky to make all users connect twice but I can't think of another solution
have you seen this BTW? https://github.com/ptaoussanis/sente/issues/118#issuecomment-87378277
I’m sure you don’t have to connect twice, but I can’t remember exactly how to do it either, sorry 😕
ahh I think I got it! thanks for that post, I remember having looked at it but I kinda skipped the examples below which are actually way more helpful. I’ll give it a go when I find some time in the next few days. Thanks a lot for your help! 🙂
as I recall from my sente usage, the frontend can specify an id it should use (so as a known user they can know their id and present it and that should implicity be a login flow if they don't have a valid session...)
the code is here: https://github.com/clojure/clojure
I know where source is, thanks for that. I would like to understand how the clojure.main works. Looks difficult to start...
AFAIK noone has written an easy-to-read guide to Clojure’s internals, so if you want to know you’re gonna have to dive right in and spend some time
I suggest starting with the files I mentioned above, if you get stuck on something just ask here 🙂
I found it extremely helpful to use https://github.com/gtrak/no.disassemble and disassemble small functions in the REPL
Hi all, I have a bunch of counters in the form of [#inst "2018-03-23" 3] [#inst "2018-03-27" -1]
, I’d like to generate a rolling sum where for each instant, the sum is the instant’s value plus all values before. I would prefer to use an efficient solution, memoize comes to mind but I’m guessing there’s a smarter way to do it
Has anyone successfully sent email with clojure in a Windows environment? I've been struggling with the Postal library. I'm able to successfully send mail using the same port, smtp server (gmail), and credentials with Powershell.
I'm aware that library says "untested on Windows" in the readme, but it seems to be the main clojure library for sending email. Perhaps I'd have better luck using Java directly.
Usually I get a connection timed out exception, just fyi, but depending on settings (like switching to tls instead of ssl), I've gotten other error messages too.
give this issue some support - Insomnia is an awesome REST client https://github.com/getinsomnia/insomnia/issues/1173