This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws-lambda (1)
- # bangalore-clj (3)
- # beginners (80)
- # boot (8)
- # clojars (1)
- # clojure (200)
- # clojure-dev (37)
- # clojure-greece (26)
- # clojure-italy (11)
- # clojure-norway (3)
- # clojure-russia (14)
- # clojure-spec (21)
- # clojure-uk (30)
- # clojurescript (50)
- # core-logic (10)
- # core-matrix (1)
- # cursive (15)
- # data-science (21)
- # datomic (45)
- # devcards (2)
- # emacs (4)
- # fulcro (12)
- # garden (2)
- # jobs (5)
- # juxt (1)
- # lambdaisland (1)
- # leiningen (4)
- # luminus (20)
- # lumo (26)
- # off-topic (33)
- # onyx (27)
- # parinfer (1)
- # pedestal (3)
- # perun (5)
- # re-frame (20)
- # reagent (27)
- # ring (1)
- # ring-swagger (21)
- # shadow-cljs (259)
- # spacemacs (14)
- # yada (3)
@rcustodio I can't recall having seen that particular error, but offhand my guesses are that either 1) you don't have a
gen-class in your main ns, and/or 2) that ns doesn't have a fn named
-main, and/or 3) you've failed to declare a main class in
You can find info about all of those at http://www.flyingmachinestudios.com/programming/how-clojure-babies-are-made-lein-run/
(see especially the section
How to Build and Run a Clojure Program Without Leiningen)
gen-class and aot fits with service to execute
-main then, otherwise it not necessary to use gen-class
You don't need gen-class/aot. You can specify
clojure.main as your
:main and then run the uberjar with
-m your.namespace and it will run
-main and then that will run
The other thing, i get this message
Warning: specified :main without including it in :aot. Implicit AOT of :main will be removed in Leiningen 3.0.0. If you only need AOT for your uberjar, consider adding :aot :all into your :uberjar profile instead.
The comments show the three changes I made (changed
:aot :all from the
:uberjar profile there, removed
AOT causes a lot of problems, partly because it also compiles transitive dependencies (i.e., more than just your main namespace).
It's unfortunate that it became the default because that's how Leiningen's templates worked.
Boot also doesn't force you to deal with GPG like Leiningen (when you get to deploying libraries).
Boot also lets you run your newly created app directly:
(! 1221)-> boot -s src call -f quux.core/-main Hello, World!
I just ran this in that Leiningen project:
(! 1240)-> boot -d org.clojure/clojure -r src uber jar -m clojure.main target Adding uberjar entries... Writing project.jar... Writing target dir(s)... Sun Oct 22 17:50:22 (sean)-(jobs:0)-(~/clojure/quux) (! 1241)-> java -jar target/project.jar -m quux.core Hello, World!
Didn't even need to create a
build.boot file (which would just serve to provide defaults for that).
@ashnur I haven't used it myself, but it looks like it's basically just a stylesheet. You should be able to just include it in your index.html (or possibly use
:npm-deps to get it from npm).
i am trying, but nothing works. i decided to start over from scratch yet again. just need a coffee break before 🙂
Exception in thread "main" clojure.lang.ExceptionInfo: Call to clojure.core/ns did not conform to spec: In:  val: ((require [clojure.pprint :as pp] [clojure.string :as str] [clj-time.core :as time] [clj-time.format :as fmt])) fails at: [:args] predicate: (cat :attr-map (? map?) :clauses :clojure.core.specs.alpha/ns-clauses), Extra input ...
hey @seancorfield, what is the problem of AOT transitive dependencies, is related with time/slow to compile ? > AOT causes a lot of problems, partly because it also compiles transitive dependencies (i.e., more than just your main namespace).
( feel free if you know the answer ( asked to sean because he talked about that and I’m curious about that ^^ )
(fn  false) throws if you pass any args while
@U5WDMBTUJ that was my suspicion. What’s interesting to me is that
((fn  false) 1 2 3 4) works but
(let [func (fn  false)] (func 1 2 3 4)) does not…
is this supposed to be 404 http://clojure.github.io/clojure/clojure.spec-api.html ?
probably needs to be updated to this: https://clojure.github.io/clojure/branch-master/clojure.spec-api.html
i just wanted to generate the alphabet using that generator from test.check or how it is called, but it's not as easy as one might wish
@oliv @rcustodio if a dependency you use uses AOT, they override your control of all their transitive dependencies, because AOT is contagious and effects all namespaces used by the AOT compiled code. At the time the lib is compiled, (on the provider’s build machine) they decide which version of every lib you will be forced to use.
which means you can maybe use one library that does AOT - but using two is pretty much guaranteed to break things unless they take extreme measures to avoid using dependencies directly in their code
core.matrix, is there a way to populate a matrix in rows when I define it using
matrix? Basically, I'm looking to make
[ ] instead of
[[1 2]] . I realise I can use
(transpose [[1 2]]) for what I'm looking for, but I was wondering if it's possible to define a matrix this way to begin with?
You'll probably get an answer much faster if you post this in #core-matrix . Good luck!
I am trying to use https://github.com/mzabriskie/react-draggable library in my cljs app (pretty new to web dev)
the usage instruction on cljsjs tell me to use
how do i figure out what the global name of the library is?
i’ve already tried
@dhruv1 you might get better luck in clojurescript, but based on the Readme I would expect something like
(def draggable (js/require "react-draggable")) and then calling methods on
draggable after that
(def draggable (js/require "react-draggable"))
#object[ReferenceError ReferenceError: require is not defined]
what if you add
react-draggable to your
:require form in your ns declaration, and then use
react-draggable after that?
something like this?
(:require [cljsjs.react-draggable :as draggable] [reagent.core :as reagent])
things with dots vs. slashes get a little messy in interop, especially on the cljs side because it’s more flexible (and thus it’s easier to form bad intuitions about how it works)
looks like my environment is messed.
i now get
#object[ReferenceError ReferenceError: cljsjs is not defined]
yeah- I’d ask on #clojurescript I’m doing my best to help but not the most qualified at this point 😄
Is it ok to use
*agent* inside an agent update function to re-enqueue an update on an agent?
My agent is a Java
ServerSocket, and my update function is basically: accept a client, put it somewhere and repeat.
My two thoughts were: a) the described above; b) an infinite loop
What’s the most beginner-friendly way to write a desktop GUI app with clojure? Is one of the java frameworks recommended or is there a clojure library for this
for is a list-comprehension and not a loop, sadly there is
while but that doesn't bind its condition, and there is
loop but that doesn't allow you to say "stop recurring when this binding is nil"