This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-23
Channels
- # aleph (14)
- # announcements (2)
- # babashka (8)
- # bangalore-clj (2)
- # beginners (66)
- # calva (8)
- # cider (1)
- # clj-kondo (24)
- # cljdoc (3)
- # cljs-dev (3)
- # cljsrn (2)
- # clojure (197)
- # clojure-europe (1)
- # clojure-india (5)
- # clojure-italy (4)
- # clojure-nl (27)
- # clojure-uk (18)
- # clojurescript (56)
- # code-reviews (19)
- # core-async (86)
- # cursive (16)
- # data-science (1)
- # datomic (16)
- # docker (3)
- # events (1)
- # fulcro (101)
- # graalvm (7)
- # graphql (16)
- # jobs (1)
- # jobs-discuss (6)
- # kaocha (4)
- # luminus (1)
- # off-topic (93)
- # onyx (3)
- # pathom (9)
- # planck (2)
- # re-frame (8)
- # reagent (3)
- # reitit (3)
- # remote-jobs (3)
- # shadow-cljs (21)
- # test-check (3)
- # tools-deps (21)
- # vim (16)
Does anyone know good resources and/or open source projects that are implementing payment workflows (e.g dealing with retries, cancelations, etc..)?
@wcalderipe Do you have some specific use-case in mind? ‘Payment workflows’ is quite wide topic, but I guess you’re talking about integrating customer payments into some kind of web-site/service? Or are you building a payment service yourself?
Technical details vary quite a lot depending on what payment method is used (credit card, invoice, PayPal etc…). However usually you use a payment service provider (PSP) who provides a higher-level API to smooth out the differences to some extent.
Stripe has really nice and developer centric docs that describe different workflows and scenarios. You can probably find inspiration there. https://stripe.com/docs
Has anyone tried https://ergodox-ez.com/ as their job keyboard? What has been your experience with it? I am looking for new keyboard and focusing on ergonomic one do you have any recommendations ?
Can really say anything about the products, but https://ultimatehackingkeyboard.com/ looks very similar.
I have an ergodox first generation. I have short fingers, and thus for me it was even worse than a normal keyboard as I couldn't properly easily reach the farthest keys of the thumb cluster. But it might have been fixed in ergodox-ez, which IIRC is an updated version.
Ergodox ez here. Had to swap a key last week after 3 years of use, but that's about it. (Newer models come with a swapping mechanism, so you wouldn't even need to solder things) Can confirm that some keys, specially on the thumb cluster, are definitely a bit too far (and my hands aren't particularly small) Regardless, there's no going back. No more pain + programmable. The sole contender would be keyboardio, but it has a larger footprint.
Co-worker has one and he seems to enjoy it. I thought it was a little awkward when I tried it but I am guessing you get used to it
I saw that there are a lot of keycap types to choose from. Are any of them 'small' or intended for us with smaller hands
Can anyone suggest a simple syntax/language I can embed in strings for doing simple if/switch statements?
I guess I want some kind of string templating
@danielstockton selmer?
Think I want something simpler, the filters might play havoc.
Actually, should be fine as long as I HTML escape it afterwards.
Thanks, that is the closest thing I've seen that accomplishes what I need and no more, TIL too.
It should come to browsers at some point — there’s a few JS libraries that try to support it, but since it’s so huge you might not get all features.
Also very helpful, since I need to parse this out of strings in cljs
not sure if there's a #bikeshed channel or not... but through the years, i've never found a consistent naming style for namespaced keywords.
so, like all good clojurians i like namespaced keywords. however, how do you organize them? when do you use namespaced keywords, and when not ?
take this hypothetical map, identified by the spec acme/user
:
{:acme.user/id #uuid "...."
:acme.user/role :default}
here, :default
is non-namespaced. however, i've also used this:
{:acme.user/id #uuid "...."
:acme.user/role :acme.user.role/default}
both have their advantages and disadvantages.
at this point, i'm mostly concerned with consistency in code i work with, so im looking for some kind of rule of thumb that dictates whether or not to put something in its own namespace... when to use which?> both have their advantages and disadvantages You're definitely right here. At some point, I was fed up with dealing with namespaced keywords. So now I just work with the plain ones, unless there's a really good reason to use the namespaced ones.
So in your example, when using keyword as values I wouldn't namespace them, so it would be :default
Unless the data was to be shared with other apps, but even then, most often you wouldn't comingle it without some other partitioning.
I even dropped the #:user
bit from most of the places.
Suppose you have #:cat {:children [...]}
and #:dog {:children [...]}
.
Well, now you cannot have code that operates on :children
because there are no :children
, there are only :cat/children
and :dog/children
. And passing the ns or the particular kw get ugly real fast.
And I stopped using ::
and all that, as it just creates monster namespaces on the keys which I don't find particularly useful. Also, you cant refactor as easily since it complects the key and the namespace it is in
::
is nice with spec and re-frame, especially given that you can use namespace aliases with it. And for keywords that server as an implementation detail, like ::not-found
or something like that.
Now that I think of it, I'd actually do {:type :dog :children []} for your example, and create a multi-spec over type
With spec I stopped using it, because it coupled my spec with its location in code. Like you can't just move the spec to a different namespace later
atm I'm using a namespaced keyword as a tombstone value in an immutable db to signal a deletion. It means you can't store the value ::tombstone
in the database, though :rolling_on_the_floor_laughing:
With spec - because you no longer need to think of some particular ns that somehow corresponds to the current ns, you just use the current ns. Since you can avoid using ns here altogether for a good reason, ::
makes sense here.
With re-frame - because it makes it much more obvious what ns you need to require to dispatch a particular event or subscribe to a particular subscription. :common-ev/get-updates
can be easily dispatched without requiring the file where the corresponding reg-event-fx
is called. But something like :acme.data/get-updates
will make you think and provably do a (require '[acme.data :as ad])
and dispatch ::ad/get-updates
instead.
Moving a spec or renaming its namespaces doesn't differ from any other refactoring. It's just a bit more places where you have to make the change. NS aliases with ::
make it a bit easier as well.
Ive just been burned by them. As long as they are only local and in memory it works great, but persist any data with them and you're stuck
Its rare I'll rename or move a namespace. But its common I'll move fns out of it into another one
Yeah, but not having a corresponding ns is an issue separate from ::
though. Also, I think there's a ticket to support such aliasing.
And so I find it weird, the namespace doesn't own the data, it all feels so OOP to me
@U064X3EF3 mentioned something in relation to human editing vs computer at some point as rationale for deps.edn
@U09LZR36F I'm struggling to tie something as a rationale for deps.edn to the talk about namespaces, to be honest. :)
Sorry, I meant the rationale for deps.edn not using namespaced keywords. Brain is done for today I think :)
Although deps.edn still uses namespaced keywords... So I guess there were other reasons at play, so to speak.
Someone had asked something I thought was possibly the missing piece, chaining namespaces
Anyways, I'm starting to think like you, do we need all these namespaces? What for? I can just start using :req-un and :opt-un everywhere. Then I'd only use ::
for spec names.
Which by the way, I find strange as well. Why not use symbols for referencing specs? The only reason I can think is because of how the keys are meant to map to their spec
symbols are used for referencing function specs
symbols are annoying to use unresolved because quoting
True, but I've seen many people add back resolution to keywords just to make sure they don't have typos or forgot some spec, etc.
In general, I havn't found myself needing to spec things that depends on spec to be defined later
And I feel in the case you do need too, declare could have been used similarly, like an s/declare
Hum...
user=> (def Int int?)
#'user/Int
user=> (def Foo (s/or :int User :string string?))
#'user/Foo
user=> (s/conform Foo 12)
[:int 12]
Okay, maybe I get it. If specs had used the same registry as var, it would be fine, but given it has its own registry, then all symbols must be quoted
Or they'll be looked up in the namespace symbol->var registry, and you won't find it there
But for FN specs, since there is a symbol of same name in the ns already for the actual function, this problem doesn't exist
Given a domain and range, how would one go about creating a continuous function?
<=5 -> ~3
6 -> ~3
7 -> ~2
8 -> ~1
9 -> ~1
>=10 -> ~0
https://www.d3indepth.com/scales/ these are useful for such problems
https://riotimesonline.com/brazil-news/brazil/business-brazil/nubank-becomes-brazils-sixth-largest-bank-with-20-million-customers/ So that means at least 20 million (indirect) users of Clojure.