This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-20
Channels
- # arachne (4)
- # bangalore-clj (1)
- # beginners (38)
- # boot (182)
- # cider (21)
- # cljs-dev (9)
- # clojars (5)
- # clojure (229)
- # clojure-austin (1)
- # clojure-berlin (1)
- # clojure-czech (3)
- # clojure-dusseldorf (3)
- # clojure-ireland (5)
- # clojure-italy (4)
- # clojure-russia (33)
- # clojure-spec (73)
- # clojure-taiwan (6)
- # clojure-uk (22)
- # clojure-ukraine (1)
- # clojurescript (80)
- # core-async (26)
- # cursive (3)
- # datascript (20)
- # datomic (9)
- # defnpodcast (8)
- # editors (4)
- # emacs (7)
- # garden (41)
- # hoplon (2)
- # java (1)
- # lambdaisland (2)
- # lein-figwheel (1)
- # leiningen (5)
- # luminus (4)
- # lumo (36)
- # off-topic (4)
- # om (21)
- # onyx (1)
- # pedestal (33)
- # re-frame (33)
- # ring-swagger (70)
- # spacemacs (26)
- # specter (7)
- # sql (6)
- # timbre (2)
- # untangled (12)
- # vim (3)
- # yada (1)
Does lumo/cljs do anything funny with nodejs? require('asciidoctor.js')()
works. ((js/require "asciidoctor.js"))
results in:
TypeError: Cannot assign to read only property 'length' of object '[object String]'
@dominicm hrm, does it work in normal CLJS?
@anmonteiro How do I check? 🙂
compile your code in the JVM compiler
with :target :nodejs
I can try it later, might even be a compiler bug
@anmonteiro Is it okay to use mies?
@dominicm no repo needed
(ns example.core
(:require [cljs.nodejs :as node]))
(node/enable-util-print!)
((node/require "asciidoctor.js"))
^ that should repro it
@anmonteiro it seems to me that Visual Studio 2015 is required to build lumo
on Windows?
might be
that really depends on what Node.js needs
you may wanna check their repo
I did, they need studio or c++ build tools; just wanted to hear your thoughts, maybe I'm doing something wrong
You need to have Microsoft Visual Studio 2013/2015 (Express edition is fine) as well as Python 2.7. Openssl is not required. Make sure that python is in your PATH.
@anmonteiro seems to work with mies & nodejs. Works for both advanced/simple builds.
weird
@dominicm last thing to test out would be the self-hosted compiler
in a CLJS Node REPL
@anmonteiro wanted to dig into the commonjs stuff, but my visual studio is messed up somehow, so can't build my own lumo. However, google-closure-compiler-js seems to support foreign libs the same way the JVM based one does - with a simple processCommonJsModules
flag, so it's probably really simple to port
@anmonteiro 🐦 over my head. I'll do it if you tell me how 🙂
@dominicm something like this (not tested):
(require '[cljs.js :as cljs])
(def st (cljs/empty-state))
(cljs/eval-str st “((js/require \“asciidoctor.js\”))" nil {:eval js/eval} pr-str)
@dominicm just tried it and there seems to be a Lumo problem
can you open an issue?
seems to be related to the fact that asciidoctor is compiled from ruby through opal
Lumo (even more than Node) doesn’t like globals too much 🙂
also you get a different error after:
(def v8 (js/require “v8”))
(.setFlagsFromString v8 "--nouse_strict")
@anmonteiro just gone afk, will try to remember tomorrow