This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-30
Channels
- # admin-announcements (10)
- # beginners (17)
- # boot (14)
- # braveandtrue (4)
- # cider (6)
- # cljsrn (38)
- # clojure (232)
- # clojure-austin (1)
- # clojure-belgium (2)
- # clojure-dev (20)
- # clojure-greece (20)
- # clojure-japan (3)
- # clojure-poland (39)
- # clojure-russia (76)
- # clojure-sanfrancisco (6)
- # clojure-uk (4)
- # clojurescript (90)
- # cursive (2)
- # data-science (10)
- # datomic (18)
- # garden (16)
- # hoplon (244)
- # immutant (3)
- # jobs (6)
- # jobs-discuss (2)
- # juxt (1)
- # off-topic (3)
- # om (50)
- # onyx (23)
- # re-frame (5)
- # reagent (36)
- # remote-jobs (11)
- # slack-help (6)
- # spacemacs (2)
- # untangled (46)
I'm looking at http-kit's websocket example at http://www.http-kit.org/channel.html#websocket, which shows how one puts one request handler inside a http-kit with-channel
macro, and in the macro's body one interacts with the channel. This channel is an http-kit channel and not a core.async channel, interestingly enough. My question is, doesn't this architecture prevent me from sending websocket data to the client from outside the request handler? I.e., if I have a plain REST API or something else happens in my Clojure app, and I want to send it to the websocket, there doesn't seem to be a way to access the channel.
is there a library, or best practice for storing things in the browser's localStorage
?
@josh.freckleton: you may want to look at https://github.com/hoplon/hoplon/blob/master/src/hoplon/storage_atom.cljs
@fasiha: https://github.com/bhauman/lein-figwheel/blob/master/sidecar/src/figwheel_sidecar/components/figwheel_server.clj#L63-L78
I'm trying to create a watcher for this HTML watcher example https://github.com/bhauman/lein-figwheel/wiki/HTML-watcher-including-browser-reloading. It all works out, but I have a question: is there a way that figwheel.client
can trigger a call to :on-jsload
instead of doing a (.reload ...)
?
hey guys, I’m looking for a cljs dev (game development experience a plus) for a reagent based ux project. We're a startup based in China and so initially it’ll be remote/project based work. Please ping me if you’re interested (<mailto:[email protected]|[email protected]>) with your resume and previous creations.
@zcaudate: Have you tried the #C05006WDW channel? I think you'd have a better chance of success there.
Hi, does anyone know of a sample Om.next <-> datascript <-> datomic example I could study?
@jennifermorgan2001: You could go to #C06DT2YSY and/or #C0PULSD25 channels. There are examples - for instance in Untangled there's something like that (there's a ToDoMVC application), but its short the datascript part. I'll look it up...
I think you would be on your own a bit if you wanted to use Datascript - Untangled is with the default database format.
I probably missed it did @mfikes already make a demo with this? https://github.com/ptmt/react-native-desktop
I think there was also a video
I can dig it up if you're interested
I think that repo you linked was in the front page of HN today
but I suppose it's a few months old already
Interesting. Yes. The demo is linked down in this blog post http://blog.fikesfarm.com/posts/2015-11-19-clojurescript-react-native-desktop.html
i added a file-system-watcher for a less directory, and it is kicking off a rebuild of the clojurescript also for some reason
@isak: that really shouldn't happen, the only explanation is that you less path or less output path is on a directory path that is watched by figwheel.
@jvtrigueros: you can call the same function that on-jsload is calling.
Is there any way to port cljs app into nw.js desktop app (or similar technology offering native-ish app programming with clojurescript).
@hlolli: the answer is probably yes, but your question should be more specific. what kind of cljs app? nw.js or electron are wrapping browser technologies so porting a standard web app there should be quite easy.
Well yes, I kinda asked without doing much research on this topic. Porting a standard web app yes, without the user needing to install much himself, npm package for example, just requireing nodejs. I've read that LightTable is hosted on chromium, is that correct? Because that could offer a possibility of using nacl offered by google chrome.
last time I checked LT it was using nw.js, but they had a branch with electron as well
AFAIK, node is bundled in electron itself, so user does not need to install anything extra
Allright, I guess it should work then using nw.js with cljs. Would LT work without java installed (only install LT with java preinstalled).
there is no problem using cljs with nw.js or electron, cljs can do anything javascript can and cljs transpilation is transparent to the underlying platform
just checked out this folder and it looks that LT is using electron these days: https://github.com/LightTable/LightTable/tree/master/deploy
Ok, LightTable is wonderfully easy to install, so I will look into electron. Well, my mind has changed after reading this: http://tangiblejs.com/posts/nw-js-and-electron-compared-2016-edition NW.js supports NACL and pepper.
question: I am trying to use an external javascript library in my clojurescript project. https://github.com/jxnblk/watch I have no idea how to use it though. Can anyone point me in the right direction
https://github.com/clojure/clojurescript/wiki/Dependencies read: Bundling "Foreign" JavaScript Code
Otherwise you would just add an :externs to cljsbuild in profiles.clj I don't see the use of creating a seperate build.clj file like is suggested in this manual.
rlwrap
for lein repl
and lein figwheel
seem to be acting differently, when in figwheel I can’t repeat last command with up-arrow key. Someone help?
upd: seem to be this https://github.com/bhauman/lein-figwheel/issues/228
using socat
helped
but the payload isn't what i was expecting - it looks like ["^ ","~:username","hello","~:password","123"]
looks like you're sending transit (request content-type should confirm that), probably have to tweak a param to get pure json
random thought, sometimes I wish there was a "backward" comment:
this is a comment ;;< fs-n1 (hl-n1 fs-n0)] <- this is still valid code
ah right thanks! now I need to tweak emacs to show that as comment
yes the second works
except in aggressive-indent-mode
but these are details I can rework
Specifically, I'd like to try to use react-a11y: https://github.com/reactjs/react-a11y
:foreign-libs [{:provides ["react-a11y"]
:file "node_modules/react-a11y/dist/index.js"
:module-type :commonjs}]}}
Now I assume I want to require react-a11y
, but then I'm not sure how to get at its exports
object
@peeja Sorry, regarding the lack of documentation. Here is a small sample project I made a while ago: https://github.com/mneise/circle-color. You should be able to access the exports object in a similar way as accessing objects of a “normal” google closure module, e.g. react-a11y/foo
.
ERROR: JSC_ES6_MODULE_LOAD_ERROR. Failed to load module "object.assign" at node_modules/react-a11y/dist/index.js line 3 : 13
ERROR: JSC_ES6_MODULE_LOAD_ERROR. Failed to load module "./assertions" at node_modules/react-a11y/dist/index.js line 4 : 17
ERROR: JSC_ES6_MODULE_LOAD_ERROR. Failed to load module "./after" at node_modules/react-a11y/dist/index.js line 5 : 12
@peeja Regarding the errors, if your module depends on other modules, you also need to include them in the build config.
@peeja There is also a little bit more information on this topic on my blog that I wrote during the gsoc project: http://mneise.github.io/archives.html 😉
Oh, what do I have to do to include them in the build config so that require()
finds them correctly?
Here, index.js
is having trouble finding ./assertions
, but assertions.js
is next to index.js
[{:provides ["react-a11y"]
:file "node_modules/react-a11y/dist/index.js"
:module-type :commonjs}
{:file "node_modules/react-a11y/dist/assertions.js"
:module-type :commonjs}
{:file "node_modules/react-a11y/dist/after.js"
:module-type :commonjs}]
@bhauman: on unrelated note: can you sir record a video and teach us how to use figweel with CIDER. Everything is so confusing. I was able to connect to cljs repl using awesome instructions from here: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl but sending stuff into it doesn't seem to work as I thought it would… 😕