Fork me on GitHub
#clojurescript
<
2017-04-08
>
john01:04:48

I asked this over on the figwheel channel but there doesn't appear to be much traffic over there ATM. Does anyone know if there is a figwheel connect-like function that can be used from anywhere in the source? Similar to brepl or weasel? I couldn't find any reference to one in the source.

john01:04:34

interestingly, (= (str (constantly "aaa")) (str (constantly "bbb"))) returns true.

john02:04:19

I was able to use weasel to repl into a webworker yesterday, but I only got in once. Every other time, the repl hangs after a websocket connection is made.

john03:04:43

But now it's doing the same thing on the main thread. Weasel's getting long in the tooth, compared to figwheel. 😕

john03:04:01

hmm. Came back after switching off advanced compilation. If I find a minimal case I'll submit an issue to weasel

emccue04:04:39

Does there exist yet a markdown to Hiccup translator?

emccue04:04:24

Because that could help with making sites in reagent

mikeb04:04:07

Might anyone have a working example of funcool/bide routing between a couple pages with figwheel?

john05:04:13

chrome has horrible support for web workers

thheller07:04:46

@john you don't give up do you? 🙂 ... no REPL will ever work in advanced compilation ... not weasel not figwheel not anything

fernandohur14:04:11

Any recommendations on clojurescript libraries for making http requests ( on nodejs) ?

fernandohur14:04:10

As far as I know xhrio uses XMLHttpRequest which is not available on node.

fernandohur14:04:32

Is there a way to configure xhrio for node?

pesterhazy14:04:50

why not use node's api directly?

fernandohur14:04:08

Definitely an option, but I was wondering if there was something better.

pesterhazy14:04:55

we need more documentation on how to use node APIs from cljs

pesterhazy14:04:25

although it's usually pretty obvious how to translate the node docs to cljs

Geoffrey Gaillard14:04:48

Hello everybody ! I'm trying to split my clojurescript app in Closure modules. I have some cljsjs dependencies and I would like to make them go into a specific module but it seems that the closure compiler can't find anything related to cljsjs when referenced in the :entries set. Did some of you managed to do it ?

thheller15:04:19

it is a different :modules implementation from the one in core. I think the one in core doesn't do post processing to the modules and cljsjs files do not go through the closure compiler at all

thheller15:04:04

I also have a {:bundle-foreign :separate} setting that will take each module

thheller15:04:28

and create an additional file that just includes every foreign dependency

thheller15:04:43

basically to automate what you are trying to do

Geoffrey Gaillard15:04:07

Awesome thank you ! I'll look at it !

john17:04:47

@thheller hah. I have a problem not giving up 🙂

john17:04:27

I wasn't talking about a self-hosted instance, btw. Just repling into an :advanced compiled environment. Could have sworn I've done that before.

thheller18:04:19

@john yes connecting is possible

thheller18:04:29

BUT you cannot do anything

thheller18:04:37

:advanced mode renames all variables, so when the REPL generates code for (assoc {} :x 1) it will generate normal code that isn't callable

john19:04:19

@thheller Understood. I just figured both the repl and the browser shared the same compiled codebase.

john23:04:00

So in order to import scripts in a webworker, I had to slightly modify @thheller's suggestion:

john23:04:32

Everything from string/string.js to ../cljs/spec.js loads.

john23:04:15

But it appears as though datatypes aren't being populated in some way with their functions

john23:04:55

in the repl, I get:

john23:04:57

and in the console I get:

john23:04:14

So, I suspect datatypes are using find-and-cache-best-method to look up protocol methods, but resolution is not happening correctly

john23:04:24

But if these words tingle anyone's spidey senses, let me know what you're thinking.