Fork me on GitHub
#clojurescript
<
2017-08-25
>
stvnmllr203:08:27

pretty sure there is no way easy around it, but I'm implementing a facebook login page. Using hiccup to output the [:div.fb-login-button] which needs an onlogin attribute to call once logged in. But hiccup seems to not allow this according to the console since it is a non-standard attribute. Any ideas?

lepistane06:08:46

@dnolen is there a reason why we(as community) use slack instead of discord or some other platform? Posts on reddit keep popping up these past few months so i wanted to check is there particular reason why you(personally) are active here and not on other platforms?

mikeb08:08:38

@lepistane reddit might be a great spot to try to move questions and answers to. It would open things up to lots of other communities.

danielstockton08:08:05

Is there any built in method of compressing strings in closure?

danielstockton08:08:35

I'm looking for a way to compress a large json string with a lot of repeating ints (or partially repeating).

rauh08:08:02

@danielstockton If you turn your number into symbols, transit will cache them. (I do that with UUIDs that repeat often).

danielstockton08:08:47

@rauh I'm actually using closure closure in this case (not cljs), just felt i'd ask here.

danielstockton08:08:21

i.e. transit isn't really an option

danielstockton11:08:56

I am aware but it still means converting back and forth between keywords and strings and including a fairly large dependency. I'm trying to keep it as lean as possible.

sundarj11:08:37

ah, fair enough.

qqq10:08:17

if the goal is to compress strings, why not use https://github.com/cscott/compressjs ? I heard bzip2 is pretty darn good

danielstockton11:08:14

@qqq I did look at that, ideally I'd like it to be closure compatible to get rid of all the dead weight. It's important to keep file size down to a minimum.

danielstockton11:08:53

I often find closure has little hidden gems, thought there might be something there.

andreasrein11:08:11

Hello. 馃榾 I have a problem with foreign libs not packaging correctly. They are not included in the jar.. Have tried pretty much everything, but no luck so far. Here is a gist to the build.boot file: https://gist.github.com/kleinrein/0bec5f822e9c6e34a39d69bb9ba5f310 . Any ideas?

Roman Liutikov12:08:51

basically put foreign-libs data into deps.cljs and put the file itself into resources folder

Roman Liutikov12:08:23

the same goes to externs

Roman Liutikov12:08:33

everything that is in :cljsbuild is used only by lein-cljsbuild plugin

frzn13:08:35

Hey guys good morning. I'm trying to follow this implementation but using figwheel/cljsbuild without success: https://clojurescript.org/news/2017-07-12-clojurescript-is-not-an-island-integrating-node-modules

frzn13:08:58

Assert failed: cljs.analyzer/foreign-dep? expected symbol got "react-dom/server"

frzn13:08:26

the cljs compiler doesnt recognize this syntax in the :require block: ["react-dom/server" :as ReactDOMServer :refer [renderToString]]

frzn13:08:44

it only accepts symbols, but with a symbol it tries react_dom, not react-dom 馃槙

ingesol10:08:10

Did you find a solution?

ingesol10:08:33

I did see something about this, can't find the link right now. It COULD be that you need to express react-dom/server as a string, not a symbol

john13:08:43

@au-phiware I may be having the same problem. Not sure. Did you ever work around it?

au-phiware03:09:34

sorry for the extended delay... I must have missed your mention... my work-around was to npm install "@cljs-oss/module-deps"...

deadghost14:08:19

taking another shot at using :npm-deps

deadghost14:08:49

left pad example works

deadghost14:08:47

tried it with rc-slider and got no such namespace: rc-slider

deadghost14:08:21

package is there in node_modules/

deadghost14:08:31

I require it with (:require [rc-slider])

deadghost15:08:41

suppose I want to use a cljsjs package but it's missing some of the externs

deadghost15:08:03

can I just write the addition externs in a file and tack it on in :externs?

steven_t15:08:21

hi, I have recently started using Cursive for CLJ / CLJS development and I would like to start the repl from here.

steven_t15:08:53

For my leiningen project this works with a script/figwheel.clj but I started a test project which uses boot.

steven_t15:08:16

What is needed to run a boot task for this?

lxsameer15:08:51

hey folks, I'm not using timbre in my cljs , but I'm keep getting this error Uncaught ReferenceError: taoensso is not defined. any idea ?

theeternalpulse16:08:12

is there a slack for re-frame?

john16:08:55

@anmonteiro I made a more minimal version of the repro: https://github.com/johnmn3/modrepro

john16:08:40

I'm not getting the aforementioned EvaluateCodeEvent yet on this repro. I'm back to the Cannot read property 'instrument_btn' of undefined error. Previously, after I resolved this error I ended up with the EvaluatedCodeEvent.

anmonteiro16:08:00

@john thanks will take a look soon!

lepistane16:08:06

Hi! not clojurescript question or post more of community kinda a thing

lepistane16:08:31

i'd appreciate if you voted. i think something needs to be done and best way to make decisions is to see where people stand

rampal17:08:04

Hello. Has anyone got figwheel working on an online IDE like http://cloud9.io? If so please could you send the link.

samueldev18:08:13

anyone use an ajax library that's compatible with both node & browsers?

samueldev18:08:16

@U1CUUKHDL haven't imported an npm package as of yet: what's a good resource to learn how to get those dependencies?

theeternalpulse18:08:55

I see, I thought you were working in a node environment. I haven't used npm packages with clojurescript myself, but I know clojurescript compatibility with npm is in alpha though. https://clojurescript.org/guides/javascript-modules

mrg18:08:53

Has anyone a good way of interacting with a postgres db using cljs/node ?

mrg18:08:23

And I suppose I could use pg/pg-native directly

anmonteiro19:08:38

@john your example doesn鈥檛 make sense

anmonteiro19:08:11

you鈥檙e trying to load :widgets at the top level

anmonteiro19:08:16

before the current module is set-loaded

john19:08:01

@anmonteiro so, if :core depends on :widgets, then :core must be set-loaded! before it can load :widgets?

john19:08:19

Should (l/set-loaded! :core) simply come before (l/load :widgets ... in the submodrepro.core namespace?

anmonteiro20:08:37

there might still be a bug in there, because of the undefined button error

anmonteiro20:08:44

I鈥檒l have a closer look later

john20:08:50

Let me know if you need me to run any tests over here.

briantrice21:08:30

@mrg I鈥檓 interested but don鈥檛 know. that looks decent at least