This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-26
Channels
- # aatree (6)
- # admin-announcements (2)
- # aws (1)
- # beginners (46)
- # boot (341)
- # braid-chat (3)
- # cider (20)
- # clara (1)
- # cljs-dev (3)
- # cljsjs (7)
- # cljsrn (73)
- # clojure (63)
- # clojure-art (4)
- # clojure-dev (3)
- # clojure-russia (83)
- # clojurescript (77)
- # core-async (12)
- # core-matrix (2)
- # cursive (9)
- # data-science (1)
- # datomic (14)
- # dirac (3)
- # emacs (9)
- # hoplon (3)
- # immutant (8)
- # ldnclj (80)
- # luminus (13)
- # mount (7)
- # off-topic (4)
- # om (288)
- # onyx (20)
- # overtone (5)
- # pedestal (10)
- # perun (3)
- # proton (103)
- # quil (1)
- # re-frame (3)
- # reagent (13)
- # ring-swagger (7)
- # yada (43)
Added to http://cljsrn.org (pending @mfikes build/deploy) : https://github.com/cljsrn/cljsrn-org/commit/d519ebbf596dcc4472331d7a5f789f761caf1d66
@donmullen: Updated the site!
Do all om-next ui components have to be declared in the same namespace? Iāve been trying to move components to separate namespaces and they just produce errors. Maybe because in the other namepace I require om-next and thatās overwriting something?
@seantempesta: No, you dont need to declare all components in the same namespace.
Iām just starting to use Natal, Om.Next for first test app. I want to use Firebase. How do I include Firebase dependency? Should I install it using npm install firebase āsave
or should I add it to the project.clj
like [cljsjs/firebase "2.2.3-0ā]
? Any quick tips?
@podviaznikov: Hm, firebase is a remote storage isnāt it? So basically you can try then to use cljsjs/firebase. It will make XMLHttpRequest which is fully available on RN environments
Even you can do npm install for RN, not all of the libraries can be installed - itās not a NodeJS environment at the end after all
@alwx: Thanks a lot for this awesome example app!!!
Hm, itās interesting. I think I have everything setup, but I cannot read or write so far from/to Firebase. And I see no errors so far in a repl. So itās hard to figure out what I did wrong
Try to debug in Chrome and check all the network requests
if there is any
offtopic: https://github.com/galdolber/clojure-objc Just wow, didnāt know about that. Basically in case there is a need to write a native plugin for RN - we can still use Clojure, omg š
@drapanjanas: @donmullen: You're welcome. Hope it will help people to start writing mobile applications in cljs
any idea what the reason might be?
@podviaznikov: the library you are using probably does something with the document
if itās just saving variables into the document and doesnāt do DOM actions, you could fake it by manually setting js/document
before initialising firebase but not sure that will work
-> https://github.com/crisptrutski/matchbox hereās one for example
@dvcrn: thanks. I tried https://github.com/crisptrutski/matchbox yesterday also without luck of reading/writing to firebase. I used this library both from Clojure(server-side) and ClojureScript(frontend) before. But Iām having trouble making it work with React native
matchbox performs the same function call (js/Firebase. url): https://github.com/crisptrutski/matchbox/blob/master/src/matchbox/core.cljx#L169
Yeah, it seems like firebase should just work out of the box. That is why I assume Iām doing something completely stupid. But I canāt figure out what
imports from project.clj
[cljsjs/firebase "2.2.3-0"]
[matchbox "0.0.8-SNAPSHOTā]
my requires
(:require [om.next :as om :refer-macros [defui]]
[cljsjs.firebase :as firebase]
[matchbox.core :as m])
(set! js/React (js/require "react-native/Libraries/react-native/react-native.jsā))
(def firebase-ref (js/Firebase. "ā))
(def firebase-ref (js/Firebase. "))
then why are you using it through js/Firebase? couldnāt you just use the imported firebase
?no, I tried 1)
(def fb (js/require "firebaseā))
2) I tried cljsjs version and I tried 3) matchbox which is wrapper. All 3 times I had no successCurrent version of firebase in npm is 2.4.0 while cljsjs version is 2.3.1 maybe older version does not work with react native? So probably you have to use latest npm version. But not sure how to properly require that in natal
@seantempesta: What are you using? natal/renatal, reagent?
re-natal + om-next
Hm, React ref initialised here https://github.com/omcljs/om/blob/master/src/main/om/next.cljs#L341, not sure that you can affect it spoil it from the code anyhow
make sure that you have latest om, just in case
no, Iām wrong, you can use :ref in many cases actually
I posted the following to the cljs mailing list but then realized I should have inquired here first... any thoughts? I'm prototyping a native version of an existing webapp that uses a Canvas element to display video (raw RGBA frames @ ~20fps) obtained via a websocket. The native version is built using re-natal (kudos!) and I'm able to connect to the websocket and obtain the ArrayBuffer. So far so good... unfortunately, the RN Image component only provides a source/URL property for the image source that it will use to download/decode images. But I already have the data. Of course I could transform my image data to a base64 encoding and use a data url but, eeewww. I just need a surface I can draw the raw image data onto. How hard can that be? Does anyone have an alternate suggestion for displaying a series of images quickly and efficiently. I'm looking over some of the RN opengl components - does anyone have experience using any of them? Suggested libraries? Flipboard has some components that look ok... I'm still evaluating them. Is there another RN component I'm overlooking? A different technique altogether? My next step is to create my own RN component to do this. I was just hoping to avoid that by using existing libraries/components.
@kahunamoore: There is a thing called arc, donāt know where the docs, but here example usage from the issue https://github.com/facebook/react-native/issues/5456
not sure that it can be used for video, but I guess this is a canvas alternative
not sure that I follow, can you show.. am, video?
Iāve seen a demo by David Nolen himself using Ejecta w/ Ambly: https://www.youtube.com/watch?v=ByNs9TG30E8&feature=youtu.be&t=35m30s
Not sure if thatās the integration youāre looking for, but looks very promising
Cool - thanks! I'll take a look. I remember him mentioning RN and opengl/cljs working prototype in one of his talks but was unable to find the reference.
Just to clarify the use case. The websocket is sending video frames (raw RGBA data) one after the other and the original webapp displays each frame on a canvas one after the other as fast as they come in. Just trying to do the same thing with RN/cljs
Sounds weird, I know. The source is an embedded system that doesn't have the CPU to encode the video and use normal video protocols... this was a hack that worked for our limited use.
Sounds interesting. I definitely donāt have the immediate knowledge on how to draw raw RGBa data to a canvas using opengl in CLJS, but it seems possible
In the browser based webapp it boils down to ctx.putImageData(clampedArrayView,0,0); where ctx is the canvas drawing context.
Ah neato
Thanks for the link!
No problem
Hey guys. I know, if you use Frappe to shake Android devices, you may be tired of clicking "Reload JS" or "Debug JS" using React Native context menu. I've forked Frappe and solved this problem. It is much easier to reload JS or start debugging now. https://github.com/alwx/milkshake
Nice!
@alwx thanks for sharing. I've been looking around for more examples. sadly I can't get this working in xcode simulator ... luno-react-native/ios/luno.xcodeproj Applications using launch screen files and targeting iOS 7.1 and earlier need to also include a launch image in an asset catalog.
in case you have any idea how to fix that please inform.
@jurgen_photek: I guess if you have just checked out the repo you need to run npm install
first to download all deps
thanks, I gave that a go but getting an error on running.... but poking about I realise I have problems that are not specific to this luno proj. re-natal init Mynextproj
creates a new project and looks to be fine. then open it in xcode, then running, I get
2016-01-26 22:52:20.026 [error][tid:main] {"type":"InternalError","message":"react-packager has encountered an internal error, please check your terminal error output for more details"}
now i installed re-natal for the first time a few days ago and created and ran a new project in xcode fine.... I guess I upgraded it since then so perhaps a new version has caused me problems. I'll try downgrading and see if that worksYou can try avoiding re-natal stuff, by doing lein prod-build
this will compile āfatā index.ios.js and index.android.js which you should be able to just run
but for developing luno with figwheel try using [email protected].
One more thing you have to do to make it run now is in registerRunnable
call you need to change āLunoā to ālunoā. Author knows about this so it will be fixed soon.
At least I had to do it to make it run and it did
ok I'll try that. just to be sure i just created a brand new project via re-natal init
, did lein prod-build, which worked, then running in xcode get the same react packager error as above.. re-natal is version 0.2.19
. I'll try other versions and if I find anything helpful I'll let you know.
despite this... great effort on re-natal. looking fwd to developing with it. gotta get some sleep now