This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-26
Channels
- # babashka (16)
- # beginners (38)
- # calva (11)
- # cider (35)
- # clj-kondo (3)
- # clj-otel (3)
- # clojure (28)
- # clojure-europe (11)
- # clojure-gamedev (14)
- # clojure-norway (42)
- # clojure-spec (4)
- # datalevin (10)
- # datomic (2)
- # emacs (8)
- # events (2)
- # fulcro (3)
- # gratitude (5)
- # hyperfiddle (3)
- # kaocha (1)
- # nbb (14)
- # nrepl (12)
- # portal (1)
- # re-frame (5)
- # releases (1)
- # shadow-cljs (36)
- # squint (167)
I am looking to start a clojure project that tracks bills and also balances of bills, however I am trying to figure out if there is a way to connect to all my different bill online portals to fetch the balance, and doing this with authentication. Does anyone have any ideas?
Does anyone have a reference for this?
Not really. Most banks don't have APIs or non password based auth. Even plaid needs your login/password which they will store to access the bank
Have you looked at decentralised ledger technology, That maintains global immutable records with cryptographic security.
The UK has an open banking policy that covers 9 of the major banks. It may provide some insights on the kinds of APIs involved. I don't know of any other initiatives like this though https://www.openbanking.org.uk/
I saw this today, just saying..
rlwrap(23417,0x1e60a5e00) malloc: Incorrect checksum for freed object 0x15200b800: probably modified after being freed.
Corrupt value: 0xc6c60000c600
rlwrap(23417,0x1e60a5e00) malloc: *** set a breakpoint in malloc_error_break to debug
rlwrap: Oops, crashed (caught SIGABRT) - this should not have happened!
If you need a core dump, re-configure with --enable-debug and rebuild
Resetting terminal and cleaning up...
Doesn't seem related to Clojure at all.
The clj
script uses rlwrap
available in your systme, so what that rlwrap
is and what it does is your responsibility.
could be bad RAM. I got weird errors like that last time I had some, used memtest to verify and indeed it was bad.
hello all, what is the best channel to ask something about https://github.com/bobschrag/clolog ?
You might as well ask here, in this thread -- @U65G9MPCK is in this channel (but it's a bit early for him to be online yet).
I want to know how to define a brother
using mom
as they have the same mom
? I saw it using sibiling
, but is there any way to define like in prolog predicate?
Hi, @U0YJJPFRA. This seems consistent with the formulation in core_test.clj
. Lots of ways to do it, of course. 🙂
;;; To include half brothers:
(<- (brother ?brother ?sibling)
(parent ?parent ?brother)
(parent ?parent ?sibling)
(male ?brother))
;;; For only full brothers:
(<- (mother ?mother ?child)
(parent ?mother ?child)
(female ?mother))
(<- (father ?father ?child)
(parent ?father ?child)
(male ?father))
(<- (brother ?brother ?sibling)
(mother ?mother ?brother)
(father ?father ?brother)
(mother ?mother ?sibling)
(father ?father ?sibling)
(male ?brother))
Is there a clojure core function in order to split a sequence / string when a predicate between two elements / characters returns true? (I want to split a "camelCased" string to ["camel" "Cased"])
for sequences, you might be looking for a partition
function, (with the limit
set to 2
)
There should definitely be a clojure.string/split
function, which iirc is looking for some regex
I often do something like:
(->> (repeatedly 100 #(rand-int 2))
(partition-all 2 1)
(map (fn [[x y]] [x (and y (even? x) (even? y))])))
but a regex might be more appropriate for your useRegEx magic:
(str/split "someCamelCaseString" #"(?![a-z])(?=[A-Z])")
=> ["some" "Camel" "Case" "String"]
Yeah agree that the regex solution works fine here. More broadly, libs like medley and flatland have functions that deal with these things. E.g. partition-after
partition-before
and partition-between
https://weavejester.github.io/medley/medley.core.html#var-partition-after
I wrote a blog on why two of these are useful here fwiw: https://www.juxt.pro/blog/new-medley-partition-fns/
Could refer to the source of https://github.com/clj-commons/camel-snake-kebab for techniques
You may also want to use negative lookbehind if you do not want your string to be split on each consecutive Capital letter:
(str/split "someUUUpperCaseString" #"(?<![A-Z])(?=[A-Z])")
=> ["some" "UUUpper" "Case" "String"]