dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
denisj 2016-02-18T03:05:18.000053Z

@darwin: apologies for my tardy response: regarding devtools sources. I'm just confirming on latest Chrome unstable v50.0.2652.0 dev (64-bit) on Ubutnu 14.04 Dirac devtools does NOT show cljs, only js and normal devtools does. I have not tried release Chrome but will report when I get a chance.

2016-02-18T16:44:59.000055Z

wow, dirac is really cool!

2016-02-18T16:46:21.000056Z

I think I am running in to one or two bugs but I really love the tool :simple_smile:

👍 1
2016-02-18T16:46:56.000057Z

yeah, dirac has still some rough edges

2016-02-18T16:47:04.000058Z

pretty young project

2016-02-18T16:47:27.000059Z

as for the issue on go channel debugging, that would be really awesome. I had been thinking how cool it would be to have go consumers and producers as nodes and channels as edges in a graph

2016-02-18T16:47:31.000060Z

I’m a bit worried to keep it up to date with devtools evolution, the official devtools moves quite fast

2016-02-18T16:48:28.000061Z

yeah I bet that is hard to keep merged

2016-02-18T16:48:42.000062Z

especially since you are adding to existing tabs

2016-02-18T16:49:28.000063Z

I wondered if you need to fork the core-async though, couldn't a bootstrapped compiler work as well for this kind of tools?

2016-02-18T16:50:06.000064Z

that debugging support for core.async would definitely need support from core async

2016-02-18T16:50:44.000065Z

IMO bootstrapped is not applicable here

2016-02-18T16:51:27.000066Z

core.async would need to keep track of all channels and go blocks, so I could expose it in the UI

2016-02-18T16:51:33.000067Z

hmm yeah maybe since you can't touch the compiler

2016-02-18T16:51:47.000068Z

I was thinking of making some stuff for devcards that do that graph thing

2016-02-18T16:51:58.000069Z

but got a bit overwhelmed digging in to the compiler

2016-02-18T16:52:20.000070Z

that graph thing is not doable, in general case IMO

2016-02-18T16:52:37.000071Z

how do you know what code does in general cases?

2016-02-18T16:52:43.000072Z

I can take from one channel and put into another

2016-02-18T16:52:53.000073Z

use variety of functions for that

2016-02-18T16:52:59.000074Z

dynamically

2016-02-18T16:53:59.000075Z

well I thought you'd build an index of all occurences of puts takes and channels and then put them in a proxy channel to tunnel them so you can inpect the values

2016-02-18T16:54:25.000076Z

mostly just a thought experiment so not sure how hard it would be

2016-02-18T16:54:52.000077Z

I can imagine some library on top of core.async, which would track that information and then expose it in some form for debugging

2016-02-18T16:55:15.000078Z

hmm yeah that would be easier I guess

2016-02-18T16:55:35.000079Z

but it is hard to imagine some analyser for general clojure(script) code using core.async without changes

2016-02-18T16:56:25.000080Z

in that library you would need primitives for connecting channels, basically building that graph via some kind of api

2016-02-18T16:57:14.000081Z

in my issue, I had in mind more low level view of core.async. it would just list pending go blocks and state of all existing channels

2016-02-18T16:57:32.000082Z

yeah, that would be great too

2016-02-18T16:57:36.000083Z

no info about flow of values between channels and their relation

2016-02-18T17:00:22.000084Z

any idea what could be wrong with "Use of undeclared Var projectname.core/variable at line 1 <dirac repl>" ?

2016-02-18T17:00:32.000085Z

It does evaluate properly

2016-02-18T17:00:41.000086Z

but just gives that warning

2016-02-18T17:01:13.000087Z

I barely remember someone else had this question before

2016-02-18T17:01:26.000088Z

it was expected REPL behaviour

2016-02-18T17:01:36.000089Z

he didn’t do require or something like that

2016-02-18T17:02:11.000090Z

can you test the same thing in normal repl?

2016-02-18T17:04:09.000091Z

Hmm if I manually require the NS the warnings go away

2016-02-18T17:14:47.000093Z

(require ‘productivity.core) ?

2016-02-18T17:15:33.000094Z

this is standard REPL behaviour, it does not know about your vars until you require the namespace (aka eval it in the context of REPL)

2016-02-18T17:16:25.000095Z

if you don’t have evaluated the code, it warns you, but it compiles down to correct matching js just by coincidence

2016-02-18T17:16:51.000096Z

ah yes, makes sense

2016-02-18T17:17:59.000097Z

if I do it in a figwheel repl I don't need to, but that might already have required it or so

2016-02-18T17:18:48.000098Z

hm, maybe figwheel is smarter about it and evals your code in REPL context

2016-02-18T17:18:54.000099Z

I should look into that

2016-02-18T17:25:33.000100Z

the only other thing I've run in to so far is no having the same focus behaviour as regular dev tools. Sometimes input loses focus and I need to manually click the input line (which is really small for some reason in canary, might be my high dpi setting.)

2016-02-18T17:26:34.000101Z

hmm

2016-02-18T17:26:57.000102Z

in next version I would like to describe how to bind a global system keyboard shortcut to focus dirac prompt

2016-02-18T17:27:14.000103Z

so one can have system-wide quick access to it

2016-02-18T17:27:33.000104Z

system wide? cool.

2016-02-18T17:27:53.000105Z

yes, chrome allows that, but it is a bit secret setting

2016-02-18T17:28:49.000106Z

I try to not use the mouse at all, and the devtools are pretty bad for that. It took me a long time to find out that if you detach the dock you can tab between the page and devtools.

2016-02-18T17:29:04.000107Z

I use vimium besides that so hardly need to interact by mouse anymore :simple_smile:

2016-02-18T17:29:18.000108Z

speaking of, what is the hotkey for dirac devtools?

2016-02-18T17:29:31.000109Z

you mentioned in the read me but not which one it was 😄

2016-02-18T17:30:54.000112Z

command keys can be also global, just need to look it up how to do that

2016-02-18T17:31:05.000113Z

I will add a new one for dirac prompt focus

2016-02-18T17:31:21.000114Z

so you one could bind it to some global shortcut

2016-02-18T17:31:26.000115Z

great :simple_smile:

2016-02-18T17:32:26.000116Z

thanks a bunch

2016-02-18T17:32:35.000117Z

calling it a night, cheers

2016-02-18T17:32:48.000119Z

bye