This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-19
Channels
- # admin-announcements (14)
- # architecture (1)
- # beginners (21)
- # boot (301)
- # clojure (93)
- # clojure-brasil (56)
- # clojure-india (4)
- # clojure-italy (11)
- # clojure-japan (25)
- # clojure-russia (16)
- # clojure-sg (1)
- # clojure-uk (5)
- # clojurescript (64)
- # clojurex (4)
- # clojutre (7)
- # cursive (18)
- # datascript (35)
- # datomic (212)
- # editors (27)
- # emacs (38)
- # events (9)
- # funcool (21)
- # hoplon (105)
- # jobs (2)
- # ldnclj (41)
- # ldnproclodo (4)
- # liberator (89)
- # luminus (5)
- # off-topic (32)
- # om (39)
- # onyx (1)
- # re-frame (9)
- # reactive (1)
- # reagent (34)
- # testing (42)
- # yada (4)
anyone know of a good article contrasting es6 modules with closure lib modules/namespaces?
i’d like to better understand the design differences
Any ideas why I would get the following error when trying to use cljs.reader/read-string
in planck?
cljs.user=> (cljs.reader/read-string "{:keyword :value}")
undefined is not a function (evaluating 'sb.toString$()')
paradoxquine: good starting point here https://github.com/clojure/clojurescript/wiki/Google-Summer-of-Code-2015
thanks @nullptr!
@jmmk: This is probably the same root cause as http://dev.clojure.org/jira/browse/CLJS-1330. With Planck 1.5, one way to work around it is to not (require ‘cljs.reader)
and just ignore the analysis warnings. It is working in Planck master (owing to the use of the cljs.js
capability to load pre-compiled namespaces.
@jmmk: Planck master is trivial to build, if you have things like Xcode already on your box.
git clone
cd planck
script/build
@jmmk: A proposed patch to the sb.toString$()
issue is in http://dev.clojure.org/jira/browse/CLJS-1430
has any have a clean example on how to setup reagent with material-ui? I've cloned this repo: https://github.com/tuhlmann/reagent-material and gotten it to work. Then tried to start my own project but getting stuck with an error:
Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.
react.inc.js:19588 Warning: AppCanvas(...): No `render` method found on the returned component instance: you may have forgotten to define `render` in your component or you may have accidentally tried to render an element whose type is a function that isn't a React component.
But I have modified my secretary mount point to render with reagent/render-component
but still get the errorI have clojurescript project, starting from the reagent template (https://github.com/pupeno/proclodo-spa-server-rendering). I commented out all clojurescript code but in the compiled code I still get this line: if(typeof goog == "undefined") document.write('<script src="js/out/goog/base.js"></script>’); I’m trying to get rid of it to attempt running my cljs code in nashorn, which doesn’t implement document. Any ideas where that line is coming from?
I am a bit confused with npm clojurescript and how to use a module, has someone an idea how to translate the following into cljs: https://gist.github.com/pxlpnk/80a9f3e6c236f7b40999 ?
(def Alpine (cljs.nodejs/require 'alpine'))
(let [alpine (Alpine. "%h %s %B")
data (.parseLine alpine " 403 4321")])
@pxlpnk: this is a good resource https://kanaka.github.io/clojurescript/web/synonym.html
What’s currently the best way of doing “isomorphic” ClojureScript … I’ve been looking into Nashhorn and I was kinda impressed (don’t really want to introduce the NodeJS dependency) … are there currently some libraries you would recommend?
@joelgluth: @pupeno mentioned https://github.com/DomKM/omelette recently, don’t know how good it is, looks solid
joelkuiper: omelette does it and you can clone it and run it on your machine, very straightforward but the way it does it is not compatible with figwheel. I have an idea on how to fix that, which I’m going to try soon.
@joelkuiper: I was also pointed to: https://github.com/pandeiro/agua
and I intend to have a proof of concept here soon: https://github.com/pupeno/proclodo-spa-server-rendering
Ah cool, Figwheel is currently a major selling point for using ClojureScript for me so would be lovely to have that support
and I’ll probably write a blog post about it as well.
Thanks, I’ll take a look and keep an eye out on the updates/blog post as well
Anyway, food, brb
Have a good one
can't seem to render this reagent component:
(defn about-page []
[:div [:h2 "About peaktime-ui-reagent"]
[:div [:a {:href "#/"} "go to the home page"]
[:div.action-icons
[ui/IconButton {:iconClassName "mdfi_navigation_more_vert"}]
[ui/IconButton {:iconClassName "mdfi_action_favorite_outline"}]
[ui/IconButton {:iconClassName "mdfi_action_search"}] ]
]] )
it tells me that :Warning: IconButton(...): No `render` method found on the returned component instance: you may have forgotten to define `render` in your component or you may have accidentally tried to render an element whose type is a function that isn't a React component.
Uncaught TypeError: inst.render is not a function
`
any clues as to what's going on? or how I should debug this?@darwin: guessing it’s the one demonstrated here - https://github.com/tuhlmann/reagent-material/blob/master/src/cljs/reagent_ui/layout.cljs#L102
usage looks correct to me..
definition: https://github.com/tuhlmann/reagent-material/blob/master/src/clj/material_ui/macros.clj
does anyone here understand ref cursors in Om? I'm having one of those experiences where what I thought I knew is diverging from what i'm actually experiencing...
does something like this exist for cljs? https://github.com/clojure/core.memoize
arohner: oh! cool. Looking forward to it.
@jellea: In Planck you can now pass -j foo.jar -j bar.jar
to have it consume JAR deps.
arohner: can I ask you, what approach did you take?
good stuff — i’m using planck all the time for tiny hacking sessions, this will be very useful
I was so excited to install planck when it came out, but then...
~ brew install planck
planck: OS X Mavericks or newer is required.
arohner: what was your approach?
@bostonaholic: Planck could probably be made to work on earlier versions of OS X. (It is currently using the Objective-C bindings to JavaScriptCore, which isn’t necessary.)
@bostonaholic: I’ll try turning off JSC_OBJC_API_ENABLED
and see if it is a goat or yak.
@darwin: @crisptrutski is right I just copied the example from tuhlmann/reagent-material repo but I started with a fresh lein new reagent <project name>
as the readme states that not all libs included in the project were necessary because this is pulled from a bigger code base.
I can create a normal reagent component and render it, the lein template works, but as soon as I try Material-ui components I get those render errors
You can just download planck and run it http://planck.fikesfarm.com/download.html
@pupeno: finally got it up: https://rasterize.io/blog/server-side-om-rendering.html
Problem is, I don’t have any pre-Mavericks hosts to test upon. If anyone wants to see if it actually works, I put a 10.6 beta 1 at http://planck.fikesfarm.com/download.html (Some things are currently disabled in that version, but the basic REPL functionality is there.)
@danvingo: Even though you can download Planck (without using Homebrew), Planck 1.5 requires Mavericks owing to the fact that it uses the Objective-C bindings to JavaScriptCore.
I see, I never memorised apples marketing os names, so wasn't sure which version is what
Anyone using CIDER with figwheel’s sidecar repl and cider’s test running? It can’t seem to find test namespaces, even though they’re definitely compiling...
ANN: Garden is now on Clj 1.7 and Cljs 1.7.28, after migrating 3000 lines from cljx to cljc. The new Cljs repl and tests provide the fastest builds ever seen for running 245 tests using the built-in cljs.test. All this speed—thanks to @dnolen. Try a local snapshot of Garden, and let us know what you think! https://github.com/noprompt/garden
Is there a reference anywhere of the correspondences between clojure types and clojurescript types
e.g. if I’m writing instances for a protocol that ought to apply to most Js and Clojure types
Best I can do is look through https://github.com/cljsinfo/cljs-api-docs/blob/catalog/INDEX.md#library-api for type I think?