Fork me on GitHub
#off-topic
<
2018-11-20
>
lilactown00:11:32

I think it’s a pretty big deal that both Reason and Flow is just an npm install away

👍 8
lilactown00:11:33

installing the Reason editor integrations is a bit awkward but at least it’s using familiar tools

lilactown00:11:30

and it pretty quickly gets people up and running in an environment they already know (e.g. VS Code & npm)

richiardiandrea01:11:39

Just a data point - I have to say that familiarity is a big deal where I work too. Everybody enjoys how easy it is to use npm for installing stuff.

henrik04:11:46

One of our frontend devs picked up Reagent with no prompting from me. He liked it, and thought it was easier to use than React + Redux. He showed it to one of our fullstack devs, who didn’t like it. Another fullstack didn’t like that HTML was data structures in Reagent, and that JSX was better.

henrik04:11:44

But React as Facebook uses it has slowly been converging with React as it’s used in CLJS for a long time now. Hooks looks a lot like Reagent’s model. I predict that JSX will be thrown out in favour of a data representation of HTML sooner or later.

didibus07:11:34

Can you install arbitrary programs with NPM? Like VS Code?

didibus07:11:46

Hum, interesting how TypeScript second worst quality is Bloated and Complex

didibus07:11:53

Wow though, CLJS salaries, big company use and experience trumps all others... hum

gklijs07:11:33

@didibus most likely because the learning curve is also high, and therefore it's used more often by people with more experience, which earn more because of there experience, and probably not or to e much lesser degree because the know CLJS. It's hard to draw conclusions from such research.

4
didibus07:11:47

Right, though, what is it about experience that draws people to it? Like, more experience could have pushed you away from it, and into something else like TypeScript or Reason

didibus07:11:11

There does seem to maybe be a quality to it that is appealing to experienced folks

didibus07:11:00

I wonder if that's rooted in Java. Like people coming to JavaScript from a pre-web era, which are maybe Java devs already, so ClojureScript is less daunting? But newer devs might only have JavaScript experience, and then the Java aspect is actually an issue?

3Jane08:11:24

Or you have to be very experienced and at a large company (thus redundant/resilient to experimental projects) for someone to let you use it.

3Jane08:11:03

At sample size this low, I think any trends could be accidental.

sb13:11:25

Today 45% off at vmware products, coupon code BF2018.

sb13:11:45

(maybe useful for somebody)

kenran_16:11:13

If I wanted to create something in the browser that would involve pixel display" (in a grid with zoom and such), would it be better to print pixels (as rects e.g.) on a canvas or to use many SVG elements?

kenran_16:11:35

Also, if I wanted to have, say, some hover effects or tooltips, what would then be better? I know I can create handlers for SVG elements, but that would be many, while I could also handle mouse events on the canvas and figure out where I am at by calculations.

jsa-aerial18:11:27

are you trying to do charting/plotting?

kenran_18:11:36

oh sorry, I tend to overlook these replies 😕 no, not really. It's more or less simple image transformation: the user can upload an image, then it is transformed and the result is output on a canvas (so far).

kenran_18:11:23

That means I basically draw one rect/circle (user choice) for each pixel, and offer a limited zoom option

jsa-aerial18:11:14

OK, then I don't have much to offer - svg probably would be 'easier' though

kenran_16:11:59

(Think of the area as having a max size of 200x200 printed pixels/objects)

emccue17:11:39

for the sole reason that I think it will make your code simpler

emccue17:11:18

(depending on what you are using - Im assuming something like reagent in clojure not Jquery in hfil)

emccue17:11:42

since you can describe it declaratively in a straightforward way

emccue17:11:04

that being said, i might be totally wrong and the performance of that would stink

lilactown18:11:41

@henrik I think JSX is here to stay IMHO. React elements are already a data representation of HTML

lilactown18:11:49

just kind of a poor one

kenran_18:11:55

@emccue Yes, the code would most likely be much simpler. I'm using a react wrapper (it does more than wrap) called Reacl though; but that just means the declarative syntax would be even nicer.

kenran_18:11:35

I think another point for SVG is that my images will be more or less static, i.e., they won't change much if at all.

kenran_18:11:22

I'll try SVG then! Thanks.

mseddon20:11:57

@johb.maier the fastest (though probably not the most pleasant to use) would be to fill a Uint8Array with your RGBA data and use putImageData. You can create a Uint32Array view into it's array buffer so you can at least treat each pixel individually without messing with individual colour channels.

mseddon20:11:08

once you have that data, you can scale/zoom either the canvas directly or with drawImage from another canvas. You can move that over to webgl if that's still not enough, or you need nearest-neighbor filtering which only some browsers will give you

kenran_20:11:18

@mseddon I didn't know that was possible, thanks. It's definitely something to think about since I initially parse the data I get as such an array anyway.

mseddon21:11:53

np! I would probably start here + a canvas. Avoid webgl unless you really need the speed 😉 https://developer.mozilla.org/en-US/docs/Web/API/ImageData