This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-30
Channels
- # aleph (12)
- # beginners (23)
- # boot (12)
- # cider (40)
- # cljs-dev (8)
- # cljsrn (20)
- # clojars (1)
- # clojure (122)
- # clojure-canada (2)
- # clojure-dev (21)
- # clojure-gamedev (2)
- # clojure-italy (3)
- # clojure-nl (12)
- # clojure-norway (1)
- # clojure-sanfrancisco (3)
- # clojure-spec (59)
- # clojure-uk (114)
- # clojurescript (50)
- # clojurex (1)
- # cursive (2)
- # datascript (2)
- # datomic (26)
- # emacs (5)
- # fulcro (19)
- # garden (1)
- # hoplon (54)
- # leiningen (42)
- # luminus (14)
- # off-topic (24)
- # om (5)
- # onyx (7)
- # re-frame (2)
- # reagent (31)
- # reitit (3)
- # ring-swagger (39)
- # shadow-cljs (8)
- # sql (3)
- # tools-deps (13)
is there something like subvec
for hashmaps? as in, (subhash { :a 1 :b 2 :c 3 } :a :b)
that would return { :a 1 :b 2 }
just had to write it down and five minutes more googling led me to the cheatsheet with select-keys
. problem solved. https://clojure.org/api/cheatsheet
How to run two luminus projects at the same time? The first one is launched as lein run
. The second one tried to do lein run -p 8000
but got an error
`[luminus.repl-server] failed to start nREPL
java.net.BindException: Address already in use (Bind failed)`
That's probably the nREPL server which complains that the port it wants to use for its server socket is already used by the nREPL of the other instance.
@lum Maybe this file can help you: https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L376
I managed to do this, but had to grep one of the luminus project and alter the port. Was hoping to have it done though an initialization option. That -p doesn't seem to work.
@vincent.cantin In linux, lsof -i
doesn't seem to show the port used by the REPL. Do you know what command to show it?
I don't know.
Where did you see the documentation for lein run -p 8000
?
For your socket question, try https://stackoverflow.com/a/17523444/378979
@lum @vincent.cantin -p is for lein repl
not lein run
@ghadi @vincent.cantin In the page 5 of the first chapter of the book "Web development in Clojure, 2nd ed" there's this text: Should we want to start the application on a different port then we could pass it the -p flag followed by the port number, as follows. lein run -p 8000
@vincent.cantin lsof
, /proc/net/tcp
or udp
or ss
with | grep 7000
don't show anything open in that port, not even in port 3000 where the dev http service is running for the guestbook example of the book. I'm missing something here...
Do ClojureScript regexs support Unicode character classes? I need to check if a string contains only non-alphabetic (where alphabetic can be from any language, including 'A', '진', 'ת', etc.)
@lum I think the clearest way to put it is that your -main
function decides what $ lein run -p 8000
means - all the args are sent to your main, beyond that we can't generalize
Indeed they are: Regular expressions compile to native JavaScript regular expressions.
Meh, seems like there is a u
modifier in ES6 but a lot of hacks if you can’t target supporting browsers: https://stackoverflow.com/questions/280712/javascript-unicode-regexes