This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-11
Channels
- # aleph (38)
- # announcements (6)
- # aws (1)
- # beginners (47)
- # calva (21)
- # cider (47)
- # cljs-dev (18)
- # clojure (40)
- # clojure-europe (7)
- # clojure-india (2)
- # clojure-italy (9)
- # clojure-nl (11)
- # clojure-norway (2)
- # clojure-sanfrancisco (1)
- # clojure-spec (17)
- # clojure-sweden (2)
- # clojure-uk (73)
- # clojurescript (10)
- # cursive (6)
- # datascript (12)
- # datavis (2)
- # defnpodcast (1)
- # duct (5)
- # emacs (36)
- # figwheel (2)
- # figwheel-main (10)
- # juxt (12)
- # leiningen (1)
- # midje (1)
- # nrepl (9)
- # off-topic (25)
- # pedestal (3)
- # portkey (3)
- # quil (2)
- # re-frame (45)
- # reagent (1)
- # ring (3)
- # ring-swagger (36)
- # rum (1)
- # shadow-cljs (48)
- # spacemacs (1)
- # speculative (50)
- # testing (2)
- # tools-deps (27)
- # yada (4)
for projects with many namespaces that share a set of defrecords, is the convention to place the record definitions in their own namespace to avoid circular references amongst namespaces?
I think that generally signals poor organization, but let’s assume (I believe this is true) there are some valid situations where it’s a problem
it’s been a looong time since I’ve used ring, but I imagine they’re referring to is processing of requests and responses is abstracted as a pipeline of functions
for example, there is ring-jetty-adapter, which takes jetty's interface and adapts it to ring, so it can response to an http request by invoking a clojure function
you could also use jetty's interface directly, or servlets (which is sort of a java standard interface to http servers)
You can have a look at http-kit. It works as both client and server: http://www.http-kit.org/
in so much as the "web" is a concrete thing and not just a buzzword, it is a bunch of servers serving http to clients
Is there a library equivalent to Selmer which is also working in Clojurescript?
hey guys, i am trying to deref a variable from another namespace domain/@variable
. Is this possible?
@domain/variable
Because the symbol is domain/variable
and @
is shorthand for (deref …)
is there a way to re-load the project level deps.edn
without having to restart the REPL?
generally, no
that’s used to build the classpath that the JVM is started with
and you can’t change the classpath dynamically
(classloaders can be made to do this though and some tools like boot can do so via pods)
thanks @alexmiller
for the more specific case of just adding a library, that’s something we have prototyped with deps.edn and I expect it will eventually be “in the box”
Luminus has generated code as follows for a new project, which doesn't compile:
(defstate ^:dynamic *db*
:start (conman/connect! {:jdbc-url (env :database-url)})
:stop (conman/disconnect! *db*))
What should this look like?what's the specific error?
Syntax error compiling at (form-init14274565493373859375.clj:1:1).
oops that's huge
https://pastebin.com/KQDrDuHm if you'd like to see the offending code in context
the full stack trace is likely more useful than the code here - you can use *e
in a repl to get the trace if it was hidden
user=> *e
#error {
:cause "Unable to resolve symbol: defstate in this context"
:via
[{:type clojure.lang.Compiler$CompilerException
:message "Syntax error compiling at (/tmp/form-init14274565493373859375.clj:1:1)."
:data #:clojure.error{:phase :compile-syntax-check, :line 1, :column 1, :source "/tmp/form-init14274565493373859375.clj"}
:at [clojure.lang.Compiler analyze "Compiler.java" 6808]}
{:type java.lang.RuntimeException
:message "Unable to resolve symbol: defstate in this context"
:at [clojure.lang.Util runtimeException "Util.java" 221]}]
Well, I guess that's pretty obvious. Thanks for the tip, didn't know about that!