Thanks! I read your blog, very useful. I shall explore more. It would be great if you can send some code examples for 1. Using s/conform and s/explain-data to return user friendly error messages 2. Some tutorial on generative test generation using test.check library
Hi everyone,
does deref
ing a promise inside a go block a bad practice and result in its thread to b be blocked?
I am not directly doing that but writing a function which may be called inside a go
block
Thanks @noisesmith
Yes
You can just deref in an async/thread and <! from the channel tho
Thanks @jeroen.dejong
Is there a way to get the logging in the cider repl?
[org.apache.logging.log4j/log4j-api "2.14.1"] [org.apache.logging.log4j/log4j-core "2.14.1"] [org.apache.logging.log4j/log4j-jcl "2.14.1"] [org.apache.logging.log4j/log4j-jul "2.14.1"] [org.apache.logging.log4j/log4j-slf4j18-impl "2.14.1"]
I see the logging in nrepl-server buffer but not on the repl
:jvm-opts ["-Dclojure.compiler.direct-linking=true" "-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory"]
If you log to stdout it should be visible in the REPL
@jumar Thanks.
status = warn
monitorInterval = 5
appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %date %level %logger %message%n%throwable
rootLogger.level = info
rootLogger.appenderRef.stdout.ref = STDOUT
that is what I have.
Hi team, need your help. If there are several maps in lazy seq for example 4 maps how can I get the map for the given index (for example third map)? when I print my data this is the shape: ( { :first "map1" } { :second "map2" } { :third "map3" } { :fourth "map4"} ) is it possible to transfer this into vector? [ { :first "map1" } { :second "map2" } { :third "map3" } { :fourth "map4"} ]. thanks
nth
function can be used to get the… nth element
(nth '(:a :b :c) 1)
:b
You can transform list to vector in several ways. One way is to use (into [] '(1 2 3))
vec
nth or vec are what I need. thanks
you can also call realized?
to check if a promise is ready
or use a promise-chan