Fork me on GitHub
#clojurescript
<
2018-10-04
>
souenzzo02:10:14

how to Uint8ClampedArray into something seq?

souenzzo02:10:24

(persistent! (.reduce uarray (fn [acc v] (conj! acc v)) (transient []))) but now feels right

mfikes02:10:02

@souenzzo Since Uint8ClampedArray instances are Array-like, I'd go with prim-seq

4
mfikes02:10:43

Perhaps Uint8ClampedArray isn't “primitive,” so there might be a more appropriate way.

dnolen14:10:33

@mfikes array-seq, though it just defers to prim-seq

mfikes14:10:00

Ahh, cool. It looked like array-seq may have been just for actual arrays. Speculating based on docstring

mfikes14:10:33

(I know you added those docstrings, so your interpretation matters most 😀)

mfikes14:10:34

I was actually curious what the consequence of replacing array? with goog/isArrayLike in the seq implementation might be.

dnolen14:10:13

@mfikes I might have added the docstring but those fns existed before I was involved 🙂

eval202015:10:54

Bumping this question from yesterday

mfikes15:10:27

Best I can tell, Closure is set up to elide logging. You'd probably have to dig through the source to figure out why.

mfikes15:10:09

Setting the related :closure-defines doesn't seem to affect it.

eval202015:10:06

added some debug locally - found no differences yet:

goog.DEBUG: true
goog.debug.LOGGING_ENABLED: true
goog.debug.Logger.ENABLE_HIERARCHY: true
goog.debug.Logger.ENABLE_PROFILER_LOGGING: nil

eval202016:10:46

it seems goog.debug.Console.console_ is nil for simple optimization

eval202016:10:50

adding (.setConsole goog.debug.Console (.-console goog.global)) ensures it works for both none and simple

eval202017:10:30

Weird, this fix is essentially redoing the initialization: https://github.com/google/closure-library/blob/db35cf1524b36a50d021fb6cf47271687cc2ea33/closure/goog/debug/console.js#L156 That makes it seem like a load order issue: goog.debug.console.js is evalled when goog.global[‘console’] is nil. /cc @mfikes

👍 4
idiomancy19:10:27

eulalie or amazonica for interacting with aws (specifically s3 and lambda)?

idiomancy19:10:06

oh shoot! amazonica is clj 😞

polymeris20:10:18

Yeah, I was asking about the same thing a few days ago

polymeris20:10:02

Eulalie seems abandoned (the github repo is archived)

idiomancy20:10:03

find any good resources? especially on going to s3 😁

polymeris20:10:43

Ended up using the node sdk directly

idiomancy20:10:12

yeah, it seems abandoned, but secretary also hasn't been worked on for 2 years and it's still widely used

polymeris20:10:22

Was wondering how difficult it would be to create a cljs AWS interface via reflection -- i.e. a cljs version of amzonica

idiomancy20:10:33

if you're ever interested in working on that project, I'd be happy to sign on with you

polymeris20:10:21

Cool -- I might research the options over the weekend

idiomancy20:10:41

nice. meantime I'm gonna get interopping

valtteri08:10:08

IMO interop with node.js sdk using Promesa is sweet.

wei19:10:41

how would I translate this into cljs? (using NPM module)

import GraphView from 'react-digraph'