This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-11
Channels
- # announcements (1)
- # aws (4)
- # beginners (16)
- # cider (9)
- # cljs-dev (3)
- # cljsrn (2)
- # clojure (46)
- # clojure-brasil (1)
- # clojure-spec (3)
- # clojure-uk (4)
- # clojurescript (46)
- # cursive (26)
- # duct (1)
- # emacs (31)
- # figwheel (1)
- # fulcro (9)
- # graalvm (21)
- # kaocha (1)
- # nyc (1)
- # off-topic (4)
- # pathom (6)
- # planck (45)
- # re-frame (2)
- # reagent (11)
- # ring (5)
- # rum (9)
- # spacemacs (2)
- # sql (60)
- # tools-deps (3)
Thanks everyone (@noisesmith, @alex.joseph.whitt, @seancorfield and @michael.e.loughlin) for your comments regarding my configuration hassle question yesterday. After a good night's sleep I realized that the answer is pretty simple: I just need one configuration. I use mount to create me a configuration map when the server starts. In domain layer I create a defprotocol and two defrecords to implement the protocol: single-node and aws. Then I use mount to create either single-node or aws. In server I use domain mount state to give the server a domain entity and server uses it without knowing whether it is using single-node or aws. Let's see if there are any issues implementing that.
Writing some Java-interop code for test.containers, but the clj version keeps on saying: No matching method withExposedPorts found taking 1 args for class org.testcontainers.containers.GenericContainer
. Can anyone spot the error?
java
new GenericContainer("redis:5.0.4-alpine")
.withExposedPorts(6379);
clojure
(defn redis-container []
(-> (GenericContainer. "redis:5.0.4-alpine")
(.withExposedPorts 6379)))
Found the issue. it was how I set the ports.
(defn with-exposed-ports [^GenericContainer container & ports]
(.withExposedPorts container (into-array Integer (map int ports))))
used this function to set my ports.I am somewhat stuck at adding data.json as a dependency to my project. Here is what I did so far:
(defproject archivian "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.10.0"]
[compojure "1.6.1"]
[ring/ring-defaults "0.3.2"]
[org.clojure/java.jdbc "0.7.8"]
[org.xerial/sqlite-jdbc "3.23.1"]
[org.clojure/data.json "0.2.6"]]
:plugins [[lein-ring "0.12.5"]]
:ring {:handler archivian.handler/app}
:profiles
{:dev {:dependencies [[javax.servlet/servlet-api "2.5"]
[ring/ring-mock "0.3.2"]]}})
lein deps
(ns archivian.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.defaults :refer [wrap-defaults api-defaults]]
[ :as io]
[clojure.java.jdbc :refer :all]
[clojure.data.json :as json]))
...
When I evaluate my buffer using cider I get:
1. Caused by java.io.FileNotFoundException
Could not locate clojure/data/json__init.class, clojure/data/json.clj or clojure/data/json.cljc
on classpath.
Any ideas?Nvm, this appears to be a CIDER issue. lein ring server-headless
does the right thing.
Has any one ever used applescript to send forms to a repl from any editor?
Looks like it works quite well, define a quick action like this: https://i.imgur.com/C5Q4fhd.png after saving you'll find it as a service in your keyboard shortcut settings, then select the form you want to send to your repl and press your assigned keybind
@luizedusol rest
always returns a sequence; next
returns nil
if there are no more items.
Oh, I see. Thanks @rakyi and @seancorfield
I'm reading "Clojure for the brave and true", and trying to launch a repl from emacs, and I get an error message saying it can't find /usr/bin/zsh... I used zsh for a brief time, and I'm not using it anymore.
Can't seem to find where emacs is trying to open zsh in order to change the settings
@idanmel Maybe ask in #emacs -- not sure how many experienced Emacs users there are here on a Saturday