This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws-lambda (5)
- # beginners (38)
- # boot (197)
- # carry (7)
- # clara (3)
- # cljs-dev (7)
- # cljsjs (6)
- # cljsrn (24)
- # clojure (39)
- # clojure-art (10)
- # clojure-austin (7)
- # clojure-dusseldorf (1)
- # clojure-italy (8)
- # clojure-russia (89)
- # clojure-spec (119)
- # clojure-taiwan (1)
- # clojure-uk (19)
- # clojurescript (104)
- # community-development (2)
- # conf-proposals (22)
- # copenhagen-clojurians (8)
- # cursive (2)
- # datomic (35)
- # devcards (4)
- # dirac (79)
- # euroclojure (2)
- # immutant (35)
- # om (138)
- # om-next (2)
- # onyx (172)
- # proton (4)
- # protorepl (1)
- # re-frame (36)
- # reagent (34)
- # spacemacs (1)
- # specter (7)
- # untangled (89)
- # yada (2)
@tiensonqin Awesome! Thanks for sharing!!!
Thanks Mike, there are still some bad styles, also some works need to do with Android.
For now, about 85% code can be share between Ios and Android.
(let [r (go (alts! (make-request url))] ;make-request returns a channel with that will eventually have the response (println (poll! r))
@stbgz you can use
<! inside a go block to park the go block until a channel returns a value
I am using om.next to render a portion of a page. The page contains fragment links to other parts of the page, when the fragment links are clicked, the browser navigates correctly. However, when the back button is pressed after a fragment link was clicked, the browser does not navigate and only the address bar is updated. I have not imported or instantiated either goog.History or goog.history.Html5History. Has anyone experienced this issue and know how to get the default browser navigation behavior to occur when back is pressed after a jump using a fragment link?
Using the chrome debugger and putting a breakpoint on the hashchange event shows that the following closure function is invoked (although I still can't tell why the default browser navigation is not occurring): https://github.com/google/closure-library/blob/79c9a275b36636870e09f2874427849728eae474/closure/goog/events/events.js#L273
Hi! After putting together a webapp manually, I’m starting to use luminus… but I’m confused about where the stylesheets are getting loaded from. In my browser I see
<link href="/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css”> and indeed I can load that file. But I can’t find bootstrap in my project directory anywhere.
~/dev/cavalry-admin # tree | grep bootstrap ~/dev/cavalry-admin # tree | grep css │ │ ├── css │ │ │ └── screen.css ~/dev/cavalry-admin #
@credulous: It looks like they are loaded using webjars - in the project.clj it requires
[org.webjars/bootstrap "4.0.0-alpha.3"], and according to http://www.webjars.org/documentation you can reference boostrap as
/assets/lib/bootstrap/css/bootstrap.css - hope that helps.
@shaun-mahood Perfect, thanks!
Reading the docs… why do it when I can get helpful strangers to do it for me? (Reading more completely now.)
I've read through docs and missed things like that, never hurts to ask. If it weren't for a combination of google and getting other people to google for me I think I'd be unemployed 🙂
@dnolen Yes, I checked in Safari (9.1.2), Firefox (48.0.2), Chrome (52.0.2743.116) and mobile Safari (iOS 9.3.2) . They all had the same behavior.
I’m trying to figure out where to place an extern for a method in Pdfjs that’s on a prototype that I can’t seem to access from the top level. This is my first extern rodeo. Any advice?
@uwo try it even if it’s not technically available at the top level - it should work anyway
@symfrog to be honest, it doesn’t sound like something that browsers do w/o JS to help - but I could be wrong here
what would one have to do to connect this browser terminal to a remote cljs figwheel repl? http://clojurescript.net/
@meta-meta that is bootstrapped clojurescript, it does not make sense to connect it to a remote REPL (e.g. nREPL)
@darwin well, the terminal part is connected to the bootstrapped REPL, right? Is it possible to instead connect the terminal to nREPL? I'm still trying to wrap my head around it.
nREPL uses TCP sockets, a web page can only talk over websockets, that is first huge problem, second, there is no implementation of nREPL client protocol in cljs, you would have to re-implement it, to wire it to UI component showing actual input box and terminal output is trivial compared to the previous two tasks
in general you could use kanaka’s websockify to mitigate the first problem: https://github.com/kanaka/websockify actually some past versions of his clojurescript REPL were not boostrapped but talked ot a server
in dirac I took another approach, I didn’t write general TCP->websocket bridge, but specific nREPL proxy, just covering my needs: https://github.com/binaryage/dirac/blob/master/src/lib/dirac/lib/nrepl_tunnel.clj#L13
this way Dirac REPL (in browser) can connect to Dirac Agent (proxy) which tunnels nREPL messages to a connected nREPL server
My end goal here is just to send messages to Figwheel, which already has a websockets connection to the page.
sounds like a deja-vu: https://github.com/bhauman/lein-figwheel/pull/309
AFAIK normal figwheel REPL is not an nREPL, is it just classic in-process REPL implementation
but figwheel has another mode which can connect to an existing nREPL server or start it on your behalf and (optionally) connect to it
what I did in that pull request, I simply hijacked input routine for figwheel’s REPL and automated typing into it (pasting there content incoming over websocket connection from browser)
it was pretty hard to hijack repl input mechanism, here is some info: https://github.com/bhauman/lein-figwheel/pull/309/files#diff-829034d1c074bb8308ff61d26dbf398eR202
or to put it in better words, terminal connection has another nREPL session, it is independent
another hard problem is intercepting all side-effecting output and presenting it to remote REPL as output
Is it possible to embed the dirac devtool on a page or is that too intertwined with chrome?
you would have to rebuild the UI from scratch, but the intercom/protocol stuff should be portable
here is the root intercom file: https://github.com/binaryage/dirac/blob/master/src/implant/dirac/implant/intercom.cljs
would https://github.com/replit/jq-console suffice for a UI?
https://github.com/binaryage/dirac/blob/master/src/implant/dirac/implant/intercom.cljs#L334 https://github.com/binaryage/dirac/blob/master/src/implant/dirac/implant/intercom.cljs#L267 https://github.com/binaryage/dirac/blob/master/src/implant/dirac/implant/intercom.cljs#L222
if I just want to send/receive messages? I don't need any fancy dev tools expand/collapse/sourcemap/etc
what is your end goal? you could in theory run chrome devtools as a web app, hide everything except dirac and inject your UI there
I'm doing some work with A-Frame. It will only be dev for the foreseeable future so something dangerous is fine with me.
do you want random people to have REPL to your live server or what? if it is just for dev on a single machine, you could do with devtools+dirac
actually page talks to dirac indirectly, it tunnels its requests through console API: https://github.com/binaryage/dirac/blob/master/src/runtime/dirac/runtime/repl.cljs#L10
also we could introduce hooks for various kinds of repl outputs so it can be redirected to you
that is doable, go ahead and open an issue here: https://github.com/binaryage/dirac/issues
but obviously, your people will still have to install dirac, configure it, open it and connect to some nREPL before having the service available in-page