This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-24
Channels
- # architecture (4)
- # aws (1)
- # beginners (76)
- # boot (172)
- # cider (17)
- # cljs-dev (10)
- # cljs-experience (24)
- # cljsrn (45)
- # clojure (129)
- # clojure-berlin (1)
- # clojure-finland (1)
- # clojure-italy (8)
- # clojure-seattle-old (1)
- # clojure-sg (1)
- # clojure-spec (31)
- # clojure-uk (28)
- # clojurescript (88)
- # cursive (11)
- # data-science (1)
- # datomic (44)
- # fulcro (48)
- # hoplon (5)
- # jobs (3)
- # jobs-discuss (1)
- # leiningen (6)
- # luminus (42)
- # lumo (17)
- # off-topic (9)
- # om (29)
- # onyx (15)
- # pedestal (7)
- # protorepl (20)
- # re-frame (24)
- # reagent (46)
- # ring-swagger (2)
- # specter (2)
- # sql (3)
- # uncomplicate (58)
- # unrepl (29)
- # yada (5)
I get this error:
#object[TypeError TypeError: goog.net.jsloader.load is not a function]
TypeError: goog.net.jsloader.load is not a function
at adzerk.boot_reload.client.patch_goog_base_BANG_.goog.global.CLOSURE_IMPORT_SCRIPT ()
at Object.goog.importScript_ ()
at Object.goog.writeScripts_ ()
at Object.goog.require [as require__] ()
at Object.clojure.browser.repl.bootstrap.goog.require ()
at eval (eval at <anonymous> (), <anonymous>:1:6)
at
at
at cljs.core.MultiFn.G__12138__2 ()
at cljs.core.MultiFn.G__12138 [as call] (
I'm thinking of adding clojure to my repertoire of languages and was wondering if anyone had a good suggestion for beg/mid level project to. Hold.
@coetry hmm.... that doesn't look like a problem specific to garden, can you require other libraries in your repl?
@akiroz We tracked it down to goog.net.jsloader.load
being removed in the latest Google closure library but couldn't figure out what to do to the dependencies to make everything work together...
(in the #boot channel if your interesting in my fumbling attempts to figure it out!)
@phinneas Are you looking for an existing project to contribute to, or are you asking about what sort of projects to use to learn Clojure?
I would say: work through Clojure for the Brave and True and then have a go at the Clojure Koans, and maybe some of the http://4clojure.com puzzles. Also Living Clojure (book) and then maybe Clojure Applied and/or the 3rd Ed of Programming Clojure (book, currently in beta).
also http://codefights.com has some clojure challenges
@phinneas I started out about 2 days ago and would enjoy teaming up for the struggle ahead
@phinneas I'm trying to write a talk about learning clojure by doing fun things. since you're just learning for the sake of learning you might be a good case study for my talk. message me if you're interested
@gdeer81 You should get together with @yogidevbear since he's writing a talk about learning Clojure too!
@gdeer81 I'd be happy to have a chat some time if you want 👍
Wow, just seen the news. Good luck!
I'm a beginner and a hard learner, so if you guys need someone to experiment on, just PM me. 🙂
:profiles {:uberjar {:aot :all
:cljsbuild {:jar true
:builds {:app {:compiler
Hi everyone, is there a way to add a customer build step right after "compiler" and before jar packing? In my case I would like to touch some of the output file after they are compiled.yes, you can set :uberjar {:prep-tasks [...]}
- just remember to add “compile” and “javac” if you need them because you end up replacing the exiting list of steps
@U051SS2EU thank you! let me give it a try
the output of lein help sample
should have something about this if you scroll through it
prep-tasks, not pre-tasks
https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L253 there is only a brief description, not actual sample. let me do some google search see if there is a sample how to use it to invoke some custom function or shell script. if you have a sample, that would be great 🙂
the sample shows it
:prep-tasks [["protobuf" "compile"] "javac" "compile"]
you can add shell commands via the lein-shell plugin
to do arbitrary code, you’ll probably want to make a small lein plugin (there might be some hack for making project.clj load an run code from a namespace though)
maybe i am just too new to this. currently i have below task
:profiles {:uberjar {:aot :all
:cljsbuild {:jar true
:builds {:app {:compiler
I was thinking i can update it to be something like this
some how define a task that do
{:aot :all
:cljsbuild {:jar true
:builds {:app {:compiler
:profiles {:uberjar {:prep-tasks [ "above task", "my custom task"]}}
what is “above task”
some how define a task that for
{:aot :all
:cljsbuild {:jar true
:builds {:app {:compiler
those are not actions, those are configs
:profiles {:uberjar {:prep-tasks [["cljsbuild" "once" "app"] "compile"]}}
invokes the tasks that use those configs
thanks for the detail explanation, so does it mean I will have to define "cljsbuild" somewhere before :profiles {:uberjar {:prep-tasks [["cljsbuild" "once" "app"] "compile"]}}
like
:cljsbuild {: jar true
: builds {:app {: compiler ... }}}
:profiles {:uberjar {:prep-tasks [["cljsbuild" "once" "app"] "compile"]}}
no - the prep tasks should all be valid lein commands
the :cljsbuild key in your project defines config that the cljsbuild plugin uses, it doesn’t define the task itself or make it run
unless by define you mean configure
i read more about it, seems like these are tasks before code compiling. What I want is i would like to do something after code is compiled
compile is one of the steps
you decide the order
you can even leave compile out altogether if you want
but all the sample i saw from internet are have "compile" at the end like your sample :profiles {:uberjar {:prep-tasks [["cljsbuild" "once" "app"] "compile"]}}
i don't see how can I modify the compiled file right after compile but before packing the jar.
if you don't mind, can you create a sample project?
if the thing you want done isn’t a lein plugin task, you need to either use lein-shell
to launch a program that can do it, or make a plugin
you would do this after “compile”
Hi! I have a small problem on an app I am working on which I am not sure how to solve. Could someone experienced guide me through how they would approach it?
@U051SS2EU maybe?
sure, what’s going on?
@U051SS2EU hi! I’ll try to explain it briefly:
The outline is that I am taking a JSON payload through an API which I need to convert in a form suitable to be transacted to Datomic
for every attribute in a list of namespaced attributes, e.g. :person/first-name
, :person/last-name
, :thing/id
, extract the relevant field from the input JSON object (which you can assume is a map here). In the JSON object the field names are not namespaced, and are in camelCase
(you can assume the field names will never collide, even if they belong to different namespaces in clojure keywords)
furthermore, I need to transform the values based on some properties linked to the namespaced attribute
e.g., one of the namespaced attributes might be :person/address
, which holds a reference (here, a Datomic ID) to an Address entity
my approach would be to make a hash-map from the key that goes into the datomic object, to a function taking N args (including the namespaced keyword itself, and the json payload at least)
exactly
so then it’s trivial to create the data you need, given the list of keys wanted
@U051SS2EU I have got an extra requirement: some keys may not be present in the input (e.g. for an “update” scenario), but I need to differentiate between a key that is not present and a key that is null
right not if the key is not present I return a dummy :not-found
value, which I filter after
you can make (find m k)
one of the args
find returns nil if not found, [k v]
if k is found
To be clear, I could solve it in “dumb” ways, but I feel there might be a clean approach which I am unaware of
Hi Experts, with Leiningen, can we pass clojure compiler options, e.g renamePrefixNamespace https://github.com/google/closure-compiler-js/blob/master/usage.txt