Fork me on GitHub
#clojurescript
<
2018-04-17
>
justinlee01:04:25

Specifically, multiple catch blocks don’t seem to be handled properly

justinlee01:04:38

My first example is just to show what I expect out of the second example

blackawa05:04:06

Are there any good ways to use map to result of document.getElementsByClassName or goog.dom.getElementsByClass ?

pesterhazy05:04:45

Try calling array-seq on the result

blackawa06:04:56

Worked! Thank you! @pesterhazy

Denis G10:04:23

Do you have any suggestions with how to start with clojurescript, while already having clojure experience. Books/materials?

valtteri10:04:51

What are you intending to do with cljs?

valtteri10:04:43

The official “Quick Start” guide got revamped a while ago and I’d suggest that as a good general starting point https://clojurescript.org/guides/quick-start

Denis G10:04:42

I was thinking of doing a real-time collaboration editor. Like Google Doc but without the fancy stuff. Wanted to implement the Operational Transformation stuff. So clojure on the backend, clojurescript on the frontend

Denis G10:04:38

’ve heard about reagent but never used it. Anything I’d need to know before i dive in

valtteri10:04:51

I found Re-Frame a nice framework for building single page web apps and it has sweet docs. https://github.com/Day8/re-frame

👍 4
valtteri10:04:08

It uses reagent also.

valtteri10:04:09

https://github.com/Day8/re-frame-template for jump start. There’s also #re-frame channel

Denis G10:04:44

ou, reframe channel. Perfect!

valtteri10:04:46

Anyone using https://material-ui-next.com and found a nice way to use withStyles from reagent?

javi15:04:15

question: is interop with shell.js the best way to do filesystem stuff in cljs/node atm? or are you guys using some nice wrapper? I am basically generating and deploying some webpack projects. I am not using lumo, just a :node-script build in shadow-cljs

gklijs15:04:31

@fj.abanses depends on the environment, I recently read planck had some nice io abstractions.

👍 4
pesterhazy15:04:24

@fj.abanses, I think shell.js or a similar convenience library is a good choice

👍 4
richiardiandrea15:04:03

There is also abio

👍 4
javi15:04:58

ended up using shelljs.. nice little cheatsheet here https://devhints.io/shelljs

miikka17:04:23

Source map generation is known to eat a lot of memory, right?

didibus18:04:48

Anyone ever got data_readers.cljc tagged literal to work with NodeJs target?

didibus18:04:13

I get Attempting to call unbound fn: #'custom-tags/make-js-map error

john21:04:50

I can't seem to get externs generation to work for this file: https://raw.githubusercontent.com/sampotts/plyr/master/dist/plyr.js

john21:04:11

Is the fact that it is wrapped in a closure making it impossible for the generator to read the objects?

dnolen21:04:51

won’t work

dnolen21:04:59

externs have to be top level

juhoteperi21:04:42

Hm, should work. IIFE exports the object to global.Plyr. Problem is that browser can't evaluate JS files from githubusercontent, check browser console for error.

john21:04:20

I was worried about that too. Because off the CDN it works. But the non min version on the CDN is apparently minified

dnolen21:04:01

@juhoteperi I really didn’t think that pattern worked in externs

juhoteperi22:04:45

This was about extern generator, not using the file as extern

dnolen22:04:09

oh sorry, yeah misread

juhoteperi22:04:08

@john Try PlyrInstance = new Plyr("#foo"); on console (select "sandbox" frame) and then get externs for PlyrInstance. Generator is not able to get properties/methods from the class, but seems to work on the instance.

john22:04:54

Wow, learned something new today! Thanks @juhoteperi

juhoteperi22:04:02

I wonder if this was documented anywhere... 😄 I wrote it down now: https://github.com/cljsjs/packages/wiki/Creating-Externs#tricks