This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-27
Channels
- # aws-lambda (3)
- # beginners (3)
- # boot (327)
- # capetown (2)
- # cider (156)
- # cljs-dev (368)
- # cljsjs (13)
- # cljsrn (53)
- # clojure (403)
- # clojure-czech (5)
- # clojure-dev (4)
- # clojure-greece (2)
- # clojure-russia (72)
- # clojure-spec (12)
- # clojure-uk (129)
- # clojurescript (156)
- # core-async (1)
- # cursive (33)
- # datomic (35)
- # emacs (10)
- # events (1)
- # hoplon (4)
- # jobs-discuss (3)
- # klipse (1)
- # lein-figwheel (14)
- # leiningen (5)
- # luminus (5)
- # off-topic (15)
- # om (69)
- # om-next (2)
- # onyx (2)
- # parinfer (15)
- # perun (12)
- # re-frame (30)
- # reagent (7)
- # ring-swagger (8)
- # spacemacs (10)
- # specter (6)
- # untangled (69)
- # yada (13)
without knowing which talk, I'm gonna guess Cursive
oh whops my bad forgot the link heh https://www.youtube.com/watch?v=Rlu-X5AqWXw
looks like cursive
Given he is using nodejs, it could be atom
Oh okay, maybe its this https://atom.io/packages/proto-repl
Naw, the REPL is an unanchored window and has IntelliJ icons. That's probably Cursive.
but all of the things he's doing can be done in any clojure supporting IDE that allows you to interact with the repl by sending code over: cursive, proto-repl, cider, lighttable, etc
Yep, I think that is one of the things I like about clojure and clojurescript - you are not locked into a specific tool chain. Nearly any editor of choice which supports a subprocess can be setup with a repl and the majority of them also support some form of 'overlay' which can provide temporary eval output in your code window
Ah ok thanks, new to clojure/script having some issues with sublime text and setting up a REPL so looking for an alternative
Which other editors are you familiar with and what is your main target (clojure, clojurescirpt, nodejs etc)?
I mainly just use sublime text for frontend and serverside javascript, looking to try out clojurescript
if you're just playing around with clojurescript to see what it's like, you might try http://nightcoders.net/ ; I've never actually used it before, but it's a web IDE for clojurescript that's all set up for you already
Starting with clojurescript, just went through channel history. Found few libraries to work with, but can someone please share some other resources to get started with better setup, debugging or any other templating library and if possible please pin those resources to this channel, it would be really helpful, thanks
@mj Most people just choose their React wrapper like Reagent,Om,Rum (etc) and then start coding away. In a pretty large SPA I use only 3 libraries: Rum, Bidi, Datascript. Other functionality I need is all taken from Google Closure which ships with CLJS.
@mj fastest way to get started would probably be to use the chestnut template https://github.com/plexus/chestnut It provides you with most of the things that @rauh suggested, and is kept up-to-date by the maintainer
benzap: Thanks! I like chestnut template. I’ve used it before as well, but now I’m using rum instead of Om as @rauh suggested
@U07FP7QJ0 Sure!
I’m deprecating the ClojureScript wiki, please direct all edits to the ClojureScript site, thanks https://github.com/clojure/clojurescript-site
I would like to create a type that behaves exactly like a regular cljs vector but with some additional protocol implementations. What is the best way to go for doing so?
specify
is just like reify
in usage beyond the first argument being the thing you want to extend
And if I want a new concrete type that inherits from vector? is there a straightforward way or am I supposed to do a big deftype?
in clojure I use this function from “programming clojure”
(defn scaffold
"Given an interface, returns a 'hollow' body suitable for use with `deftype`."
[interface]
(doseq [[iface methods]
(->> interface
.getMethods
(map #(vector (.getName (.getDeclaringClass %))
(symbol (.getName %))
(count (.getParameterTypes %))))
(group-by first))]
(println (str " " iface))
(doseq [[_ name argcount] methods]
(println (str " " (list name (into '[this] (take argcount (repeatedly gensym)))))))))
the amount of value to be gained from making it easy doesn’t outweigh the time wasted on doing something few people will ever use
are there any examples out there where published es6 components(those that extend React.Component) have been used in reagent/re-frame. I am having a really difficult time finding one. Without this I'd just be forced into using the traditional javascript to build the app which i really dont want to do.
@rohit_ you can try the #re-frame channel - they are a bit more focused on the specifics of your question
thanks
I’m trying to write a macro that yields different code depending on if it’s called from clj or cljs. how can i do this correctly within a cljc file?
namespaced maps haven’t landed in clojurescript yet have they? I’m getting errors on latest when I try
@uwo please share if you have something minimal to repro your errors
and I get this error adzerk.boot_cljs.util.proxy$clojure.lang.ExceptionInfo$ff19274a: Reader tag must be a symbol
when trying something like #::dropdown-panel{:help-text "hidiho"}
@uwo doesn't seem like a bug
in your example ::dropdown-panel
should be an alias for another namespace
otherwise you should use #:dropdown-panel {:help-text "hidiho"}
oh hrm
@uwo in any case this works for me:
Lumo 1.0.0
ClojureScript 1.9.293
Docs: (doc function-name-here)
Exit: Control+D or :cljs/quit or exit
cljs.user=> (require '[clojure.string :as str])
nil
cljs.user=> #::str{:name "asd"}
{:clojure.string/name "asd"}
cljs.user=>
Given there's no alter-var-root
, is there a way to rebind a var from another namespace?
It's not a great situation, but I'd rather not drop everything to rearchitect our feature flag system right now just to add a devcard 🙂
@peeja hrm... (set! my.ns/foo 42)
?
Looks like a game-changer, especially for newcomers to CLJS ecosystem, awesome way to kick off the new year! Can’t wait to give the CommonJS module support a spin.
( JS module ecosystem craziness doesn’t make the job particularly easy 😛 Have your work cut out for you.)
fortunately once again we mostly get to take advantage of the fact that somebody else had this problem before us
anyone who uses cljs-devtools, when you have a breakpoint (say I placed (js* “debugger;”)
somewhere). it stops. now when I type n Chrome Dev console - intellisense works extremely slow and kinda jittering. Is there a way to fix that? annoying me badly
ClojureScript 1.9.456 is released https://groups.google.com/d/msg/clojurescript/wGJeG36GPTk/e9XCo3a2BgAJ
it takes a while for the JAR to be available in Maven Central, right?
like 30 min or something?
also around JavaScript modules support looking for ideas on how to make it simpler - I’ve implemented the obvious fundamental helpers
@dnolen 1 question I just thought about: can we consume CLJSJS modules just for externs?
I think the answer is "no" given the way they're currently packaged
@anmonteiro the answer is “yes"
oh..!
so we can have a CLJSJS dep in the classpath and just not require it in our code?
awesome. OK I should go RTFM and report back. sorry for the noise
Closure compilation will rename internal dynamic stuff - the only way to prevent that is community maintained externs
in fact some externs aren’t supplied and I had to hand code those + pull in some Node.js stuff
did anything change at all wrt to advance compiling for :target :nodejs
?
@anmonteiro nothing should have changed for advanced compiling :nodejs
@dnolen just saw your es6-demo branch for React
makes sense you got it to work under advanced compilation, but you'll have a much harder time getting Maria's circle project to work
@anmonteiro right but the circle project is harder for now obsolete reasons
in any case, I think some form of these should be added to React externs: https://github.com/anmonteiro/om/blob/2a54bd9e02ea4332530b68bb8cd2107a1ce85c53/src/main/om/externs.js#L1858-L1929
you have the first part in your es6-demo project
with the others I got React to work under advanced
(both Circle + the Om Next devcards worked great with those)
perhaps I shouldn't be lobbying this to you, but to CLJSJS 🙂
exactly
Super excited about this add! Been avoiding a number of js libs that I'd like to use waiting for this!
BTW the CLJS 1.9.456 artifact is now in Maven
@anmonteiro No lobbying necessary, just make PR with a short description about what those are used by
Sure, I didn't mean it like that 🙂
just that it needed to be brought up
hm, i get runtime errors like this with the newest cljs compiler that I don't get with the previous version:
Invalid Om component fn, app$ui$views$root$render_app does not return valid instance
(or (satisfies? IRender x) (satisfies? IRenderProps x) (satisfies? IRenderState x))
Haven't been able to find a minimal repro yet.