This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-26
Channels
- # aleph (2)
- # aws-lambda (18)
- # beginners (81)
- # boot (3)
- # cider (25)
- # cljs-dev (274)
- # cljsjs (10)
- # clojars (25)
- # clojure (65)
- # clojure-austin (1)
- # clojure-brasil (2)
- # clojure-dev (33)
- # clojure-dusseldorf (6)
- # clojure-gamedev (3)
- # clojure-italy (17)
- # clojure-poland (3)
- # clojure-russia (7)
- # clojure-spec (48)
- # clojure-uk (45)
- # clojured (1)
- # clojurescript (26)
- # core-logic (2)
- # data-science (4)
- # datascript (6)
- # datomic (58)
- # defnpodcast (2)
- # docker (1)
- # duct (14)
- # figwheel (2)
- # fulcro (130)
- # graphql (3)
- # leiningen (1)
- # liberator (15)
- # luminus (5)
- # nrepl (1)
- # numerical-computing (1)
- # off-topic (45)
- # onyx (15)
- # re-frame (9)
- # reagent (3)
- # ring (1)
- # shadow-cljs (91)
- # spacemacs (8)
- # sql (23)
- # unrepl (38)
- # videos (2)
- # vim (12)
yes, exactly
so is there another way I can test my code without actually running it on aws? Is planck not the right this for this?
@derpocious I don't have any experience with AWS Lambda, so I don't know what is entailed in running the server. Having said that, Planck and its planck.http
library can make HTTP get calls to any HTTP server.
Yes, you absolutely can make HTTP calls from Lambda.
You might check #aws-lambda, a very quiet forum but there are people over there with direct experience.
There is ring middleware that adapts the inbound AWS events, so you can (if you like) write as if you’re “just” a ring app with compojure routing and so forth.
hmm will planck.http work if I deploy it to aws?
There is a Linux version of Planck available, and if you manage to deploy it there, it can make outbound HTTP calls (presuming AWS Lambda allows that). But, I suspect you need to respond to AWS Lambda events of some sort... I don't know how you would get Planck to respond to those. (Ignorance on my part.)
ok thanks. do I need to change my project.clj to add planck? Or require something special in my core.cljs file which is now using cljs-http?
@derpocious Hmm. I don't think I understand the overall goal you are trying to achieve.
Anyone have a recommendation for learning Java? I feel like most good books would need to be updated to include every new version of java…
Like, remember all that stuff we said in the last book. Forget that, we have steams and lambdas now…
@drewverlee My recommendation? Don't bother 😆
(I have a bunch of Java books lying around -- I try to keep on top of this stuff even tho' I haven't programmed in Java since... maybe Java 5?)
I quite enjoyed Java 8 in Action. Let me dig up what else I have...
Hah, the introduction of lambdas in Java was what finally caused me to decide I couldn't take it any longer and I jumped to Clojure.
Hmm, almost everything else I have is fairly language agnostic or polyglot...
I have a bunch of old Java print books... I'd have to go digging around in the library for those... all the ebooks I keep on my phone, laptop, and desktop.
Even JCiP, which is awesome, becomes a bit irrelevant once you learn how to use Clojure atoms
JCiP?
Ah, right.
Yeah, it's kind of old hat nowadays, with Clojure and even Scala to some extent.
And Kotlin has coroutines now...
Well, assuming working in Clojure is a goal. 1. I believe I have a better chance of moving a team from java to clojure then getting a job in Clojure. I dont know if ppl are aware but “mid level clojure dev” is basically non existent (maybe if your in cali?) 2. convincing ppl usually means trust and trust is typically earned (in part) by demonstrating mastery in an area the target is interested in. So in this case i believe getting better at java is my best chance of working in clojure. This discussion is quickly moving towards job-dicusss though… That being said, I work in java all of a sudden and my someone on my team just made a website to generate objects we use commonly, something about that is really sad and if i have any hope of doing better though, i need to learn more…
Re: 1 -- yup, very aware. It's unfortunate, but understandable with the size of the industry.
Re: 2 -- yup, and a lot of (junior) devs get excited about Language X and try and push for it and either get disappointed that no one listens or else it gets adopted and is a disaster (changing tech is hard).
I don't think anyone could pay me enough to work in Java again. So much Java work is soul-crushingly rote and mindless, with so much needless ceremony around it.
Look at Kotlin or Scala opportunities. Even Groovy. Anything but Java.
hey, is anyone here experienced with aws lambda? I asked a question in the aws-lambda room. trying to use cljs-http or some clojurescript http client that works on aws-lambda. thanks 🙂
What can I do when lein figwheel dev
does not offer the repl? The last line is Prompt will show when Figwheel connects to your application
. But even after browser loads the page, I don’t get the prompt.
@duminda you could double check the browser console to check if it is trying to connect, or some error happened before it could connect
@noisesmith: Yep: Cannot read property 'chan' of undefined
(in async.cljs)
sounds like some deps are out of sync, or some error in the code that would bootstrap figwheel?
haha I guess "lein clean" is the new "turn it off and on again"
What’s the idiomatic way to create a vector from a lazy sequence? i.e. (some-function (take 5))
Is there a ready-made function which would let me traverse a vector along with the indices? i.e.
(traverse-vec (fn [index elem] (println index elem)) [5 2 9 8])
->
0 5
1 2
2 9
3 8
Hi, does anyone using sonarqube with clojure for CI?, Wich plugin are you usinig?
Can anyone point me in the right direction to get this to work (derive MyClass cljs.core.LazySeq)
? It's failing in my repl. Thanks!
I think you can start from documentation) https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/derive second argument (parent) must be a namespace-qualified keyword or keyword but not a class
by the way - what kind of relation you want to make?
I want to build a new type or record that behaves almost exactly the same as inbuilt clojure data structures, and then use multimethods to change some particular behaviour.
From the docs "You can also use a class as the child (but not the parent, the only way to make something the child of a class is via Java inheritance)." Does this mean I can't use derive
with clojure.lang.PersistentVector
and similar as the parent?
i'm getting a pretty strange compilation error, specifically around /
(division). has anyone seen this before?
(/ screen-width 2)
produces the compilation error:
cljs.core//, all arguments must be numbers, got [#{nil clj-nil} number] instead.
yes, however it never has a chance to print. the compiler comes back with that error message when it tries to compile
and yet it's fixable by wrapping screen-width
with js/parseInt
, which is even more confusing because that would return NaN if screen width didn't have a value (as indicated by the error message), and the division would surely fail (which it doesn't).
right, so my assumption is that the compiler can't know what the width
function returns as it's interop with an external js library so it fails pessimistically. however, it would know that js/parseInt returns a number.
the following modification compiles as well when using core javascript functions (getClientWidth), so that must be it
(defn left-or-right [dom-node]
(let [{x :x} (obj->clj (ocall dom-node :getBoundingClientRect))
screen-width (ocall js/window :getClientWidth)]
(> x (/ screen-width 2))))
@joshkh That might be a compiler bug. The intent is that it be fairly conservative if it can't infer the type of something and not emit warnings. But it seems something is making it think screen-width
is nil
... Hrm.
Hey there! I’m pretty new to cljs and clojure, and I’m trying to get codox to work with a project. So far I am able to generate the API documentation, but I’d like to have it generate docs for a certain namespace. I’ve been following along on the GH page, but I am running into this error:
codox: unknown option(s): :namespaces
@joshkh Are you using a ClojureScript compiler prior to 1.9.456? (You might be seeing https://github.com/clojure/clojurescript/commit/0436a318a6e05db3d8d93d74384e374c4781afbf)
@chris879 Are you sure you're using the latest version of Codox? The :namespaces
change was only in 0.9.
(although I figure you're using 0.10.3 per the readme)
@seancorfield Yep, I’m using 0.10.3, I should have mentioned that I’m using boot too. I was able to figure it out by using the -f
flag. Thanks!
I wonder if Codox could be made to read options from a file with Boot, to save having to specify command line options for everything?
So I actually found that I can pass :filter-namespaces through build.boot. Looks like it just acts as a wrapper of sorts here https://github.com/weavejester/codox/blob/master/boot-codox/src/codox/boot.clj#L52
@chris879 Yup, the deftask
defines the command-line arguments in short form and long form and the values are bound to variables with the long form name. https://github.com/weavejester/codox/blob/master/boot-codox/src/codox/boot.clj#L16-L28
And when you're invoking a Boot task from another task, you use named keyword arguments that match the long form name.
Boot's CLI is pretty nice...
Hi all… I’m not exactly a beginner but today I feel like one… Can anyone explain what I’m doing wrong here?
user=> (doseq [s ['doc '+]] (doc s))
nil
What am I missing? Doesn’t doc
expect a symbol? Why can’t I give it a symbol?
Thanks!I want to build a new type or record that behaves almost exactly the same as inbuilt clojure data structures, and then use multimethods to change some particular behaviour.