Fork me on GitHub
#beginners
<
2019-04-19
>
Joel02:04:50

I'm looking for spring boot starter project, but honestly java for controllers and such, but ability to have clojure package to add functionality.

bmaddy02:04:07

@k.i.o I believe spec is closer to being a contracts system (as it borrowed ideas from Racket Contracts). I'm getting that from the author of Practical TLA+. Differentiating between tests, contracts, and types: https://hillelwayne.com/post/why-dont-people-use-formal-methods/ (see the Getting the Spec section) Here he mentions that clojure.spec is a contracts system: https://hillelwayne.com/post/contracts/

Ivan Koz05:04:30

@bmaddy thank you very much, i'll read today

Scott Starkey11:04:08

Hi there, all. Previously I had everything working in a Mac environment with Intellij, but I updated my Mac and I think that broke stuff. I am now getting this error message:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See  for further details.
Exception in thread "main" java.net.ConnectException: Connection refused (Connection refused), compiling:(core.clj:72:3)
	at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3657)
[...]
	at clojure.main.main(main.java:37)
Caused by: java.net.ConnectException: Connection refused (Connection refused)

Scott Starkey11:04:44

The [...] is all of my included modules.

Scott Starkey11:04:19

Does anyone have experience with this sort of foobar? 😩

Scott Starkey11:04:05

Answering my own question… I think it’s a classpath problem after I updated Java. https://stackoverflow.com/questions/5028286/adding-jar-to-classpath-in-mac-os

bertofer14:04:19

Hi, I was trying out schema, and I have a use case I am not sure schema is suited for, or what I should be using in this case. I need to run different functions at runtime depending if they satisfy a schema or not. I was trying to find a valid? function for boolean validation, not exception one. Is there anything, or what other approach could I use in this case? I don’t want to use a :type property because I can have merged maps that satisfy more than one schemas and run all functions if they satisfy more than one, and things like that.

ghadi14:04:39

which schema are you talking about @bertofer?

bertofer14:04:52

plumatic schema

bertofer14:04:36

Was looking for an equivalent of valid? in spec, as I don’t want to use spec yet in this project (although the select part would fit very well in my use case)

ghadi14:04:34

oh. I'm not familiar with that

bertofer14:04:48

I found that I can use check for a checker that doesn’t throw Exceptions

Jamie Rumbelow15:04:59

Hi all! I’ve got a series of functions that I want to pass a map through. I’d like each function to be able to e.g. append something to a nested key. Here’s one example:

(defn enrich-with-parenthetical-definitions [document]
  (merge document
         {:structure {:definitions
                      (map str ((re-seq re-paren-phrase (:text document))))}}))
How can I ‘reach in’ to document and append to document.structure.definitions without overwriting the previous value? Merge seems to overwrite.

ghadi15:04:05

look at update-in @jamie962

ghadi15:04:04

specifically passing in conj as the updating function

Jamie Rumbelow15:04:42

perfect! thank you!

Jamie Rumbelow16:04:57

BTW, #beginners, parinfer is an excellent excellent excellent tool (https://github.com/shaunlebron/parinfer). takes a bit of getting used to, but pays dividends.

Ivan Koz16:04:33

parinfer with paredit is even better

andrew16:04:20

hey y'all seeking some feedback on https://github.com/andharris/pipeline, particularly there are some questions in the Thoughts section of the README that I'd appreciate input on

andrew16:04:56

also would appreciate any input/feedback/suggestions on any of the code

eskemojoe00716:04:00

Love me some parinfer and paredit. I've been using Atom with it all, and I notice some weird proto-repl bugs.

code star 823:04:17

Has the proto repl helped you be more productive? It is on my list of things to try.

tabidots01:04:57

Proto-REPL is amazing, I can’t imagine going back to LightTable even if there were to ever be an update. But yes, I have noticed two annoying things: (1) The font for the output does not change color when you change the Atom theme. I change from light to dark repeatedly depending on where I am, so I always have to edit the stylesheet each time. (2) Often I accidentally run things that trip an infinite loop and I have to do a hard shutdown of Atom (or it crashes). When it reopens, there is a “Console” pane where the Proto-REPL pane was, and when I start the REPL, it opens another pane. Then when I close the “Console” pane, it stops the REPL :man-facepalming::skin-tone-2:

eskemojoe00713:04:31

I have found #2, but never #1. I do have some struggles between it and a hard-core command line terminal on a code I'm looking at. I end up having to run proto-repl with a nrepl to the cmd one.