This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-15
Channels
- # aws-lambda (3)
- # beginners (37)
- # boot (294)
- # carry (1)
- # cider (38)
- # cljs-dev (37)
- # cljsjs (88)
- # clojure (187)
- # clojure-android (2)
- # clojure-austin (1)
- # clojure-dusseldorf (9)
- # clojure-hk (3)
- # clojure-italy (12)
- # clojure-russia (36)
- # clojure-spec (55)
- # clojure-uk (27)
- # clojurescript (75)
- # community-development (5)
- # conf-proposals (2)
- # copenhagen-clojurians (3)
- # cursive (9)
- # datomic (54)
- # devcards (5)
- # devops (3)
- # dirac (69)
- # emacs (6)
- # ethereum (1)
- # euroclojure (1)
- # events (3)
- # funcool (1)
- # hoplon (20)
- # immutant (4)
- # luminus (14)
- # midje (4)
- # om (178)
- # om-next (2)
- # onyx (47)
- # pedestal (19)
- # protorepl (20)
- # re-frame (14)
- # reagent (54)
- # ring (2)
- # ring-swagger (7)
- # test-check (10)
- # uncomplicate (11)
- # untangled (9)
- # yada (9)
Trying to get some newbee clojurescript traction here — Can somebody expound on step 3 of the DIY here— https://github.com/jpb/aws-lambda-cljs
@fingertoe that would be your :output-to compiler option presumably with :simple opts
if you use advanced opts you need to be sure to ^export your public interface with awslambda so the name is not munged
Hey everyone. I have a function that is returned from an API like so (-> photos first :getUrl)
. How do I invoke the function that is returned?
@jannikko if (-> photos first :getUrl)
is a function, this should invoke it: ((-> photos first :getUrl) arg1 arg2)
ClojureScript functions are JS functions too, so no trouble there
what pipeline-async function returns? a channel?
docs seem to only say what it takes
I have a macro, it calls cljs.analyzer/warning
to issue a compiler warning using &env
, all is good:
https://dl.dropboxusercontent.com/u/559047/cljs-oops-intro-oget.png
but I want to move that warning pointer to point to a specific parameter passed into that macro, (identity “k1”)
in the case above
I guess need something which will update my &env
to correct :line
, :column
after feeding it with tokens from &form
@darwin you’re calling something that’s not public nor intended to be used for this purpose
your time is probably better spent figuring out you need from the public api and suggesting some solution that will cover your use case
ok, this is not that big issue for first version, I just wanted to make it better if possible
I will try to put some effort into this, but I don’t have “full picture” in my head for cljs compiler stuff, I just go and hack some solution for problem at hand
my suspicion is that you could probably take the line & column info from env and then read the form
I have been following repo commits for a while and I have tests, so I will be able to spot breakages quickly
I believe the form should have the source form as metadata (if it doesn’t that’s probably a simple thing to add)
no, the problem is that it is after reader, and stuff like “#js []” is not original code, so I cannot trust its length
a hacky idea is to wrap params in an “indentity” macro and steal the info from its expansion invocation
outer macro would be stateful, it would set a flag “when inner macro expands use its info"
wow, what are you building?
@jasonjckn in the normal way - there’s nothing special here
worked! https://dl.dropboxusercontent.com/u/559047/oops-it-worked.png
but my tests discovered that the meta information might get lost under some circumstances, it might be some problem in cljs.test macros, I’m able to reproduce it in are
macro of cljs.test. not that big issue, it works most of the time, and I can fall back to parent env info if param meta is missing
thanks for that meta
idea, didn’t know macro params have such info attached to them in metas
@darwin yeah I was confused about what you were trying (had tried), should have suggested that sooner
wondering if closure compiler has some special treatment for goog.object/get
, in my tests it leads to better DCE compared to raw aget
:
https://github.com/binaryage/cljs-oops/issues/1
not so surprising - another reason to relegate aget
for the only thing it was ever meant for - arrays
cljs-oops
looks cool
and much needed 😄
@darwin how did you create those transcripts?
and I thought maybe @richiardiandrea was trolling
ah ah no trolling, genuinely was not aware of it
No stars, 7 commits, no activity since Jan 2014
Yeah, I wouldn’t worry about it too much. Just so confused as to why someone wanted oo clojure
well there is OO already 😉
@danielcompton oh, forgot to point you here as well: https://github.com/binaryage/cljs-oops/tree/master/test/src/circus/oops
pretty slick
@danielcompton btw. I have successfully used that console.log inlining trick, as discussed here: https://github.com/Day8/re-frame/issues/164#issuecomment-222579135
Sneaky sneaky
yeah that should be added EVERYWHERE 😄
Wow thank you @darwin everyone should use this library
@mitchelkuijpers thanks, but wait for 0.1 release first 🙂
I will 😞
I will first battle-test it in https://github.com/binaryage/chromex and other projects of mine
have been using poor versions of those macros for a while: https://github.com/binaryage/chromex/blob/c8c326a62a5a4cad1816865a3d6a619246c0081e/src/lib/chromex/support.clj#L5-L27
I will wait