Fork me on GitHub
#clojurescript
<
2017-02-16
>
gklijs06:02:52

When drawing a certain state, wich has among others a grid of 40 by 50, will displaying it as a canvas give much better performance then creating the HTML with rows, as I do now? Since I only want to show some things on the grid it seems to make more sense. Probably I will need to detect/set the size of the canvas, and lose a bit in responsiveness

gklijs07:02:28

I already found some awnsers and it seems to offer much better performance, and not being that much more difficult then what I’m using now. It would also seem to be fairly well possible to make it responsive at the same time

pesterhazy08:02:00

Check out react-virtualized

gklijs08:02:16

thanks, I will look into that, although as its for a game, it doesn’t seem a good fit

pesterhazy09:02:26

that's probably true

tomaas13:02:31

Hi, what approach similar to: https://github.com/exponent/react-native-invertible-scroll-view would you take on web?

dnolen13:02:56

@roman01la nice is that in Canary or is that already in Chrome now?

roman01la13:02:20

@dnolen in Canary, not enabled by default

dominicm13:02:45

I'm trying to access *data-readers* in cljs, (specifically lumo), I saw a reference to *cljs-data-readers* in an issue, but this also doesn't resolve. Does this var not exist in cljs for any particular reason?

Aron14:02:04

i have a function that returns a list with two elements and another function that takes two arguments. i would like to apply the list's elements as arguments to the second function? google results that i found for apply are about macros and Java interop, couldn't see an obvious solution

pesterhazy14:02:14

use clojure.core/apply

Aron14:02:25

it was too obvious :))

anmonteiro15:02:18

@dominicm: I still haven't got around to implementing proper tagged literal support in Lumo. Can you open an issue if there isn't one already, please?

tianshu16:02:43

why not compile (.-x y) to y["x"] instead of y.x.

isak16:02:43

@doglooksgood then there would be no way to have closure advanced compilation rename property names

tianshu16:02:52

understood. but this case is quite few, I think.

tianshu16:02:39

when I want to get property from some already defined struct, such as js/Event, I should always use aget?

isak16:02:28

use aget if it is not a standard name closure would know about, or that you don't have an extern for

isak16:02:14

by the way, i think it can make a big difference, and this is why closure gives the smallest size in most tests

isak16:02:27

also, there are some macros and libraries floating around to help with this, for example: https://github.com/reagent-project/reagent/blob/master/src/reagent/interop.clj#L26

matthavener16:02:10

Is there an equivalent of *file* in cljs?

tianshu16:02:01

@isak I haven't use closure compiler before I knew clojurescript. how can I get the list of those names that closure compiler can recognise?

isak16:02:31

also here is a nice place to try things out in advanced mode: https://closure-compiler.appspot.com/home

tianshu16:02:18

cool, it's helpful

dnolen19:02:36

@matthavener there isn’t currently

phil22:02:58

Where's the best place to see a list of known issues?

phil22:02:44

I think 1.9.473 has an issue with desctructured bindings on :keys.

anmonteiro22:02:32

I don’t think anything like what you’re describing has been reported. Do you have a minimal failing example?

dnolen22:02:31

@phil the first thing to do is just report what you are seeing here or in the IRC channel or mailing list

dnolen22:02:39

then if someone confirms the problem - make an issue

phil23:02:26

Ok, thanks.

phil23:02:55

@anmonteiro doesn't have the same issue, so my build might be a mess.

dnolen23:02:54

that conclusion sounds unlikely - I don’t see how your build could affect destructuring

phil23:02:24

(let [{:keys [:city :something]} {:city "London"}] city) => nil

phil23:02:28

That's what I'm seeing.

dnolen23:02:35

@phil is this something you’re seeing under advanced or something?

phil23:02:43

Ah, yes, advanced.

dnolen23:02:54

and you did a clean build? are you using code splitting modules? etc

phil23:02:12

Just trying in a completely fresh build (I'd tried lein clean)

phil23:02:22

I'm coming back to cs after a long break.

dnolen23:02:33

lein clean doesn’t do what you think

dnolen23:02:41

unless you specified :clean-targets

dnolen23:02:21

your bug is most likely a dirty build

dnolen23:02:26

like a bad constants table or something

jr23:02:47

@phil are you using keywords in your :keys vector? should be a vector of symbols

anmonteiro23:02:44

@jr it works regardless