Hi Kenny,

Thanks for getting back to me!

While my work is all in Python, I'm very comfortable implementing things
myself if there is no existing solution. But I'd rather do so with full
knowledge of similar interaction paradigms, in any language. I'm not a
clojure developer myself, so maybe you could help me better understand the
clojure workflow?

With regards to your comment about watches, I think they serve an
orthogonal purpose. Watches display the value of an expression, but I don't
recall them letting you pause execution and reassign variables. So even if
the watches have helped you identify a bug, the variables involved have
been flushed from memory by the time the UI bubble renders. Re-running the
code with the bug fixed only works if the surrounding framework is purely
functional and reasonably fast.

The code that I tend to work with is stateful and computation-heavy (one
function runs for minutes to hours), so what I really want to do is place a
conditional breakpoint in the code and drop a REPL in that place. The
problem with debuggers (at least for Python) is that they tend to be
crippled in odd ways. For example, if I use the Python debugger to place a
breakpoint inside a function, there is literally no command that says
"return now, with this value". The only real commands are step and jump,
which don't work if there's no return statement already in the function
that I can jump to. Also running arbitrary code while paused mostly works,
except when it doesn't (e.g. odd issues modifying non-global variables,
caused by the way Python implements closures.)

There's also the question of having a good UI, which is essential for
interactive coding to be worthwhile. I'm not aware of any debugger that
integrates well with live execution. (Maybe you know of one?) A raw CLI
debugger is not the ideal ui. IDE debugger plugins are usually very
well-done, but it would be even better if they were combined with
live-editing into a single plugin. What I was aiming for with xdbg was to
make live-coding and debugging have unified interaction paradigm and
keybindings.

Let me know if what I'm saying makes sense to you.

Best,
~Nikita

On Mon, Jul 11, 2016 at 9:38 AM, Kenny Evitt <[email protected]> wrote:

> Hi Nikita,
>
> Unfortunately, none of the core contributors uses Python so the Python
> plugin hasn't had much attention in a long while. Well, I've started using
> Python for a few things, but they're so simple I haven't yet fired-up
> LightTable for them yet.
>
> Someone recently stepped-up to be the new maintainer of the Python but
> they haven't shared much on the GitHub repo yet.
>
> I watched the video embedded in your demo page but I can't tell what's
> particularly valuable about xdbg. It seems like something like the
> LightTable Clojure plugin and its support for watches would be nicer. Note
> that the core LightTable team has dropped support for the InstaREPL but a
> lot of the interactivity is available without it (which is one reason we
> dropped support).
>
> As for implementing something similar for Python, I'd imagine that
> leveraging the existing code for the LightTable Python plugin would be
> helpful, and looking at how similar features are implemented in the Clojure
> plugin would be really helpful, but beside that I'm not sure the best place
> for you to start.
>
>
> On Thursday, June 23, 2016 at 2:23:50 PM UTC-4, [email protected] wrote:
>>
>> Hi,
>>
>> I'd like to know if Light Table has any features for evaluating code in
>> local scope.
>>
>> I think it's very helpful when writing code to see the values flowing
>> through it, and be able to inspect/modify them interactively. However, last
>> time I tried LightTable with Python there was no way to interactively
>> evaluate code outside of the global scope. To give a sense of one kind of
>> workflow I'm imagining, I put together a short interaction demo at
>> http://kitaev.io/xdbg/html/
>>
>> I imagine that people on this list have put a lot of thought into
>> different ways of increasing interactivity, so I'm curious if this has
>> already been implemented or brainstormed.
>>
>> The only thing in this vein that my searching turned up is the clojure
>> instarepl, which unfortunately seems limited both in terms of language
>> support, and in terms of support for more complicated code with
>> expensive/nondeterministic steps (e.g. something math-heavy, calling out to
>> c, or importing external resources).
>>
>> I'd appreciate any input I could get on this!
>>
>> Thanks,
>> ~Nikita
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Light Table Discussion" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/light-table-discussion/37JgFQV3JTg/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Light Table Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to