This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-13
Channels
- # beginners (14)
- # boot (108)
- # carry (6)
- # cider (28)
- # cljs-dev (107)
- # cljsrn (32)
- # clojars (4)
- # clojure (62)
- # clojure-austin (15)
- # clojure-berlin (1)
- # clojure-brasil (3)
- # clojure-chicago (1)
- # clojure-dev (9)
- # clojure-greece (2)
- # clojure-italy (4)
- # clojure-nl (1)
- # clojure-poland (2)
- # clojure-portugal (1)
- # clojure-russia (24)
- # clojure-spec (63)
- # clojure-uk (30)
- # clojurescript (123)
- # cursive (13)
- # data-science (1)
- # datascript (1)
- # datomic (27)
- # devcards (11)
- # dirac (1)
- # emacs (5)
- # events (4)
- # hoplon (27)
- # jobs (3)
- # juxt (3)
- # leiningen (11)
- # off-topic (18)
- # om (46)
- # om-next (7)
- # onyx (50)
- # pedestal (6)
- # portland-or (8)
- # proton (16)
- # re-frame (38)
- # reagent (21)
- # ring-swagger (14)
- # specter (46)
- # untangled (116)
- # vim (46)
- # yada (22)
@danielcompton thanks for sharing
searching fora some advice to use clojure.spec for web form validation and on-webpage error reporting
form validation is a breeze with clojure.spec, but attaching error messages to the various failed specs is not clear to me
you’ll need to write a translation layer; spec errors are for system / developer consumption
@robert-stuttaford right. So the trick could be to def specs and use their namespaced keyword as a key in a map of user readable errors
@robert-stuttaford I need to understand which spec helper function to use to get the keywords for the failing specs for a validation check
have a look at the output of explain-data
. you should be able to leverage stuff in there to create the messaging behaviour you need
@robert-stuttaford oh, thanks, will do that
@robert-stuttaford thank you
good luck 🙂
@yogthos Do you have a particular plan for when you'll next release markdown-clj? We're also quite excited for the inhibition feature 🙂
I was going to try find some time to fix a few issues, but I could release a version now with the current ones
@yogthos There's no real rush. Any issues in particular that you want fixed for .90?
this is the main outstanding one https://github.com/yogthos/markdown-clj/issues/107
I've noticed that some things don't work multi-line with markdown-clj. Bold/italics is another one.
Do you have any clues at where to start with this issue? I think I know, but confirmation is better than guessing.
unfortunately, I haven’t had any time to dig into it, if you have an idea then I definitely appreciate you taking a look
the parser reads line by line, so any tags that are split between lines will not be parsed
it might make sense to do a bit of preprocessing to aggregate text in paragraphs into a single string before parsing
What’s the best channel to ask about clojure.java.jdbc (cc @seancorfield )?
@dominicm but yeah, let me know if you'd like me to push the current version out, and I can push an update with the fix later
@yogthos I'll ask if it turns out to be too difficult, but I have train time in the evening to work on things like this 🙂. I'd rather get things fixed, I know if I let you release it I won't get round to it nearly as quickly.
Anyway: http://stackoverflow.com/questions/40022429/transactions-in-clojure-java-jdbc
There is a #sql channel fwiw
You may be interested in the postgresql savepoint feature depending on what you’re looking for out of your nested transactions: https://www.postgresql.org/docs/current/static/sql-savepoint.html
On the topic of clojure/jdbc... I'm doing some research on implementing a system that reads from a stream (eg: like Kafka) and writes to a RDBMS. Currently, I'm constrained to not be able to use the new Kafka Connect, so will need to implement something myself. I have two concerns: 1) how to make the updates efficient: currently I'm thinking of using some kind of windowing to "batch" my update operations, and 2) best way to implement "upsert" functionality in a db-agnostic way. Anyone done anything like this before?
Is there a way to set the frequency at which carmine pub subs poll for a message?
@gary the talk selection emails went out this last tuesday. I suspect they’ll put the speakers up once everyone confirms
@anmonteiro did you get selected?
nope, perhaps next time 🙂
@borkdude Happy to field java.jdbc
questions here — but I see you also found the mailing list, which is good for longer / in-depth questions.
@gary Lynn will be posting it soon, still waiting on some responses
Is it possible to run a leiningen plugin as a task ends? I'd like to log error stack traces and want to capture stderr when they occur (such as when there's an error in the source code)
Is there any way to get
a key from a map in a way that disregards namespace qualifiers? In other words, given
(def foom #:foo {:a 1 :b 2}
(def barm #:bar {:a 10 :b 20}
Can I get something like :*/a
that will return 1
or 10
?@nathanmarz thanks immensely for specter, only needed to watch 9 mins of your youtube vid and you just saved me a huge headache already
@naomarik you're welcome!
user=> (edn/read-string (str {:foo identity}))
java.lang.RuntimeException: No reader function for tag object
user=> (edn/read-string (str {:foo {:bar :baz}}))
{:foo {:bar :baz}}
nested objects seem fine, i meant to illustrate that if your map contains a function then edn/read-string will choke[i don’t know much about the edn library, there might be other examples of situations where (str a-map) breaks edn/read-string, this is just the only one that’s come to my mind so far]
perhaps also if you’ve got e.g. a java class in there that clojure doesn’t know how to serialize into an edn-parseable format (i just tried java.util.Date and java.util.HashMap, they both work fine)
You should use pr and it's variants to print data to a string
Like pr-str