Fork me on GitHub
#clojurescript
<
2017-11-24
>
mfikes00:11:15

Perhaps you really want something like a JavaScript typed array. I've never messed around with those to try to deal directly with primitives that are held contiguously in memory.

qqq00:11:40

I think Float32Array is what I want, but I'm not sure.

nakiya02:11:55

Is this a good place to ask a beginner clojurescript related question? Or some other channel/irc?

danielcompton02:11:08

@duminda there is #beginners if you'd like

carocad16:11:56

is this new? http://cljs.github.io/api/ It looks really cool 🙂

carocad16:11:17

simply wow !

mfikes21:11:06

@radomski If you get no response here, there is an Om-specific channel, #om

Ryan Radomski21:11:47

I obviously didn't scroll down enough, I'll just remove the comment here since it doesn't seem to belong

johnj22:11:37

what's the most stable/mature way to use javascript libs?

noisesmith22:11:37

@lockdown- as in adding the dependency to your project, or calling the code?

johnj22:11:00

@noisesmith both I guess, what's the difference?

noisesmith22:11:54

to use javascript code, use host interop, it's quite simple. To add js libs as deps to your project, there's a few approaches, including cljsjs and npm. I assume using npm deps directly from cljs will be the most robust solution in the future but the impression I get right now is that it is fairly new

noisesmith22:11:23

to be honest, in my own production app we just grabbed versions of the js libs we wanted and put them in our repo

noisesmith22:11:46

(but this dates toa few years ago and there are much better options when making a new project now)

johnj22:11:16

@noisesmith ok, so an extern file with the JS lib is the most mature way?

noisesmith22:11:47

yeah - I'd welcome input from someone who has tried using the new npm integration though

johnj22:11:42

ok, does the JS has lib has to be in its final form without module code right? this is for the browser

noisesmith22:11:54

there's js module support, supposedly in alpha (but with clojure that can sometimes mean something is perfectly usable and just new) https://clojurescript.org/guides/javascript-modules

noisesmith22:11:10

that document also describes using npm to manage your deps with cljs

johnj22:11:55

yeah, I was skimming through those and saw various methods, was wondering which is the most mature one

noisesmith22:11:08

everything in that page is alpha, none of it is mature

noisesmith22:11:59

cljs itself isn't especially mature, - it's been working for a while but a lot of things change regularly and it isn't on clojure's level

noisesmith22:11:23

that could just reflect a difference between the java and javascript ecosystems too

johnj22:11:28

ok, I'll give a more harder look at the docs, thanks.

hmaurer23:11:45

Hi! Newbie question here. I would like to write a library n clojurescript exposing an API that I will then use from a javascript project. How can I do this, and which build tool should I use (lein or boot)? I have a preferenc for boot