This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-23
Channels
- # aatree (72)
- # aws (12)
- # beginners (34)
- # boot (256)
- # braid-chat (12)
- # cider (20)
- # clara (8)
- # cljs-dev (1)
- # cljsjs (1)
- # cljsrn (38)
- # clojure (61)
- # clojure-dev (10)
- # clojure-ireland (1)
- # clojure-japan (1)
- # clojure-sg (2)
- # clojurescript (48)
- # community-development (3)
- # conf-proposals (3)
- # core-async (6)
- # cursive (8)
- # datomic (4)
- # emacs (9)
- # hoplon (1)
- # leiningen (1)
- # mount (9)
- # off-topic (4)
- # om (109)
- # parinfer (26)
- # perun (4)
- # proton (5)
- # reagent (14)
- # vim (3)
I've updated nvim-parinfer.js to use the new javascript lib. https://github.com/snoe/nvim-parinfer.js It's significantly faster (and has very little code) now, nice job @shaunlebron
@snoe sweet
I didn’t know you could use a js lib like that from cljs. I guess that’s what the new module-type
option in foreign-libs
is for
I was actually going to release a new version some time tonight, with a cljs wrapper to publish on clojars
I wonder if you still need externs
Yeah, it was actually pretty painful as I was trying the cljsjs version, and the wrapper etc and getting nowhere. Lots of interacting systems and it was hard to know what was causing my problems.
@snoe I wonder what problems you were getting
First, it took me awhile to figure out the :module-type
and that cljsjs wasn't/didn't have the capability to set it. Basically, I'd see parinfer on js/module.exports
but using multiple js libs would overwrite it. This was exacerbated by things seemingly working fine with :optimizations :none
but not working with :simple
.
So, I tried for to get the plugin working with :none
however both cljs and neovim-host are replacing node's require(...)
and I suspect neovim-host is doing something bad with sandboxing modules. I ended up dropping that line since I couldn't get to the root of the problem. I went on to writing my own :foreign-libs
and I found the :module-type
option.
That seemed to get me further with :simple
but closure was throwing an error about redefining a const but not when using :none
. I remembered looking at the :closure-warnings
map previously and on a whim tried to :const :off
and it finally compiled.
So... I think cljsjs could improve with support for :module-type
, I think either node-host or cljs w/node has a bug in their patched require
, and I think cljs or closure should have that warning turned off with optimized compiles (or be able to catch the error when it's caused by the UMD rewriting).
@snoe: I also ran into the “cannot redefine const” error in closure, and posted it to the mailing list last week
It has to do with UMD style not recognizing that module.export can be defined inside an IIFE
@snoe, also parinfer-cljs
(the cljs wrapper of parinfer.js I’m trying put out), I’ve confirmed it doesn’t work on Node
you were probably trying that
it’s interesting because requiring the cljsjs/parinfer
library in cljs has different behavior depending on the environment
it seems useless in a Node environment, because I need to use require
, but I don’t know how to “node require" a file that was prepended to the compiled output of the source that I’m inside of
@meow: @snoe: filed an issue here: https://github.com/cljsjs/boot-cljsjs/issues/29
@shaunlebron: cool, thanks
hmm, that’d be neat, hadn’t heard of that
oh, I didn’t know it was integrated, neat!
@chrisoakman: have you heard of Proton? it’s using your plugin: https://github.com/dvcrn/proton/blob/master/src/cljs/proton/layers/lang/clojure/README.md