Fork me on GitHub
#dirac
<
2017-02-18
>
qqq13:02:02

@pepe: using tenzing, are you able to replicate the screen shot of: https://camo.githubusercontent.com/ebbe18501d26873485014d421285aa4de062a3f2/68747470733a2f2f646c2e64726f70626f7875736572636f6e74656e742e636f6d2f752f3535393034372f64697261632d6d61696e2d30312e706e67 ? In particular, for showing the three varaibles count/numbers/number inline in the source code, it shows numbers as (1 2 3) -- which is amazing, since it shows it as the CLJS form rather than the JS data structure I can't get this part to work in tenzing --- are you able to get this to work in tenzing ?

darwin13:02:15

@qqq you have to properly install cljs-devtools into your project

darwin13:02:25

dirac has custom formatters enabled by default

darwin13:02:41

under normal stock chrome you would have to enable it in devtools preferences

qqq13:02:20

@darwin: I have tried the following in both latest Chrome and Canary 1) I have enabled "custom formatters" under settings 2) the rest of the docs seems to be stuff configured inside of boot (which tenzing should already do)

qqq13:02:30

@darwin: do you have these "custom formatters" working ?

darwin13:02:40

I cannot really help you with boot/tenzing, but https://github.com/binaryage/cljs-devtools-sample has properly configured example project which should work for you

darwin13:02:34

in your devtools console, when you visit your project page - you should see “Installing CLJS DevTools…" message

qqq13:02:51

no, I don't see that msgs, I only see the installing Dirac msg

qqq13:02:07

That project is lein and I use boot, but I'm so despearte I'm going to try it

darwin13:02:13

what version of clojurescript do you use? maybe tenzing uses :preloads feature, which is pretty recent and silently “does not work” in older clojurescript versions

darwin13:02:02

ok, that is good one, anyways, you can always manually call devtools/install!: https://github.com/binaryage/cljs-devtools/blob/master/docs/installation.md#install-it-manually

qqq13:02:19

I thikn I'm going to do the following

qqq13:02:25

(1) I'm going to clone taht repo and get it working

qqq13:02:32

(2) onceI hae something working, I can start converting it to boot

qqq13:02:41

until I have something working, I'm just stabbing in the dark

qqq13:02:30

it works now 🙂

qqq13:02:22

by some miracle, got it working in boot too

qqq13:02:29

I have no idea how it works or why it works, but it works 🙂

richiardiandrea17:02:56

@qqq for boot in general there is powerlaces/oot-cljs-devtools works out of the box (unless there is a new bug that it would be great to have reported). The lib provides two tasks. One is for Dirac standalone.

qqq20:02:36

@richiardiandrea : no longer convinced there was actually a bug -- just I was doing alot of things wrong since this was first time getting dirac to actually work

richiardiandrea20:02:26

Cool yes that is a setup hard to get right the first but fortunately Darwin has a lot of patience 😀

qqq23:02:14

dirac repl is the most amazing thing ever

qqq23:02:16

this is insane

qqq23:02:11

@darwin: sure, moved

qqq23:02:25

1) thanks for your time for discussion and 2) thanks for writing dirac

qqq23:02:28

it's an amazing piece of software

darwin23:02:53

thanks, I’m glad you like it

qqq23:02:54

what ide/editor do you use for cljs dev ?

qqq23:02:54

I guess what I really want isn't even an dirac issue.

qqq23:02:02

It's more a "get chrome to use emacs when opening *.cljs files" issue

qqq23:02:54

yeah, https://github.com/szarsti/chrome-emacsclient would agree that it's a issue seprate from dirac

darwin23:02:42

interesting

qqq23:02:32

if I were greedy, the optimal work flow would be: 1) write code in emacs 2) on save, boot recompiles + reloads 3) we hit some (assert false) in the browser 4) dirac/cljs dev tools already know fname / line number ===== 5) this gets passed back to emacs, which jumps me to file / line #google-cloud 6) I continue being able to explore stack farmes / local variables in the dirac dev tools and basically all that's missing is step 5

darwin23:02:40

yes, I see your point. I used to have something like this working back in old times when working on windows with firebug 🙂

darwin23:02:13

figwheel supports something like this as well (clicking file links in their HUD display)

qqq23:02:42

the really insane solution (which is far fare removed from dirac) would be to hack devtools / emacs so that emacas renders INSIDE devtools 🙂

qqq23:02:05

so whatever devtools uses to show source files would be repalced with an emacsclient embedded

darwin23:02:05

I can definitely add some resource handlers into dirac, it looks simple: https://github.com/szarsti/chrome-emacsclient/blob/master/devtools.js

darwin23:02:39

but the problem is that I’m not going to maintain/support emacs side of the functionality

qqq23:02:51

kind of hard if you're using cursive if I were to write the emacs side, what would I have to do? I would have to (1) get elisp to run a http server with a REST end point, then (2) when the user clicks, dirac sends me a REST request, which (3) I then parse and load the right file / line in emacs ?

darwin23:02:05

and also maybe implement fuzzy mapping of urls to filesystem paths

qqq23:02:48

actually, all the code is written

qqq23:02:07

I just have to fork that project, then hack on the part which is "diff between how (1) that project tells emacs to open files and (2) how dirac tells emacs to open files" ?

qqq23:02:39

okay, let me look at this some more and get back to you; I think I'm wasting your time as I'm missing some fundamentals

qqq23:02:00

but in short, if I can get the emacs side working, it's like 5-min job for you to setup the dirac side right?

darwin23:02:20

just be aware that you will get resource urls + line numbers, you have to somehow map them back to filesystem

darwin23:02:41

in complex scenario this could require some kind of user-definned mapping, to resolve correctly

qqq23:02:57

oh this is fine, the user is required to specify "active project"

qqq23:02:09

no fuzzy matching required, user is required to specify the location of /src

qqq23:02:20

then I just map module name of foo.bar.dog to src/foo/bar/dog.cljs

darwin23:02:50

ok, but you assume something about user’s project structure