Fork me on GitHub
#unrepl
<
2017-06-27
>
cgrand14:06:18

Tangentially related to unrepl but this could benefit from machine printing and elision:

pesterhazy14:06:45

yeah, anything tree like really

pesterhazy14:06:55

but tracing is a great example of that

richiardiandrea14:06:30

I wonder if it works in cljs as well

cgrand14:06:13

nah I use the java debugging ifrastructure to have this level of tracing

cgrand14:06:19

in fact it’s a JVM tracer

cgrand14:06:18

do V8 or JSCore have a public debug API?

richiardiandrea14:06:03

That JVM tracer is cool, how do you hook it up?

richiardiandrea14:06:28

I guess it is in clojure.tools.trace ?

cgrand14:06:52

no it’s a new development, tools.trace works by redefining vars

cgrand14:06:33

In my case the JVM has to be started with -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n (no explicit port required)

cgrand14:06:58

and then I have code to connect the JVM to itself as a debugger

richiardiandrea15:06:03

Well that is great, node has a debugging/inspecting layer, not an expert however and it looks very limited: https://nodejs.org/dist/latest-v8.x/docs/api/debugger.html

cgrand15:06:39

A bit rudimentary indeed

pesterhazy15:06:40

@cgrand debugging/tracing/repl-driven development could be a killer feature of nrepl

cgrand15:06:10

next step is to open a new repl when an exception is thrown

dominicm15:06:51

@richiardiandrea you can attach chrome to a running nodejs instance for a full blown debugger

richiardiandrea15:06:50

Yeah I have recently enabled boot to work with Dirac for a Repl in there for my colleagues 😀

richiardiandrea15:06:10

But it is not the same thing 😀

richiardiandrea15:06:17

And I don't personally use it, at some point I will help porting unrepl to cljs just don't have enough time now and when I have time, it is too little and I prefer to tackle smaller problems

cgrand15:06:49

re: cljs port, dynamic ns are not seen by require (self-hosted) so: • either add workarounds in the blob • fix cljs. What’s the best course of procrastination? 🎵

richiardiandrea15:06:13

@cgrand I guess you spoke with D. Nolen already? What did he say? Usually patches to self host are more likely to happen, especially because you have very active projects/maintainers behind it

cgrand15:06:32

@richiardiandrea facepalm I forgot you opened the issue for that

cgrand15:06:54

the fix should cover both slef-host and regular 😕 to not create yet another divergence

richiardiandrea16:06:41

Ok yeah that is tougher then, Darwin already proposed something and got bounced 😀

richiardiandrea16:06:29

(don't remember the details now)

pesterhazy16:06:27

🎶 procrastination isn't good for me 🎶