Python, REPL 'n stuff

Started by Yacine, May 31, 2022, 10:16:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yacine

Python is a fine thing, but what I really enjoy is using it as REPL.
(What a REPL is:  https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop and https://codewith.mu/en/tutorials/1.0/repl)


I wouldn't use Python that much if I had to write full programs, with all the stuff involved: writing a complete program, user interface (either GUI or CLI - Command Line Interface).


Having a REPL, in my case Jupyterlab, lets me just initialize my notebook by connecting to Visio, then step by step elaborating what needs to be done.


Working with Visual Studio Code (or any other IDE) would be by no means as fast as this REPL tool.


Nikolay presented some time ago the typescript interface that shall become standard for the MS office products. Very similar and I'm looking forward to get to try it. MS is just so slow.


Meanwhile there is that one tool that is available right now and I would really like to see our community start to use it.

Why am I doing this? Python and Jupyter Lab used by a wider community would help getting out of the lethargy and stagnation I see for this remarkable piece of software that Visio is.


A REPL of any kind will never be a tool for John Q. Public (dict.leo.org for Otto Normalverbraucher), but this mustn't be a limiting argument.


----

In the past conversations I had with forum fellows, I noticed two main hurdles for adopting the technique - the installation and getting started with python.

Python itself shall not be a real problem. One can start by copying less than 10 lines of code, then continue witch code "almost" identical to VBA.
Further improvements and optimizations can be done later, they are not needed right away.


The installation however could be frustrating and that's where I finally come to my point.

What if a good soul would setup a miniconda installation "on a stick"?

Having a Jupyter Lab running from a stick would help catch the "hesitants", the ones "brave enough" to write some or more lines of VBA, but reluctant to switch to Python.

- - - Seeking this one good soul - - -
    (sorry for the blind call into the herd ;) )
Yacine

vojo

IMHO, I dont think the idea of a "miniconda on a stick" solves very much.  I dont think visio users would want to set up some sort special environment for some python especially one needs to do that for a more traditional approach of python installed in system and use that.

Moreover, if a drawing is to be shared, then would need to share this miniconda or make some sort of pyexe.  Either way, the
user would have to fully embrace to use this.  (if the idea here is create a python environment to create some slick recipies for same exotic content like python tool to replicate a shape spirally out from the center of the drawing...ok that might have merit...but to have a "connector" between visio and SQL to dynamically populate shapes would only help the author...otherwise, would need to convince the users to set up the environment)

I admit I dont fully understand REPL, but your link talks about LISP....but that is so 1980s, I dont think anybody under 40 understands it in the context of LISP.  Its almost like talking about ADA which is dead except for VHDL for chip design.

Perhaps you could elaborate more on the problem(s) you are trying to solve??

Surrogate

Quote from: vojo on May 31, 2022, 12:46:10 PM
I admit I dont fully understand REPL, but your link talks about LISP....but that is so 1980s, I dont think anybody under 40 understands it in the context of LISP.
LISP dialect is still used in AutoCAD!
Quote from: Yacine on May 31, 2022, 10:16:15 AMWhat if a good soul would setup a miniconda installation "on a stick"?
I have already installed Anaconda, where Jupiter Notebook/Jupyter Lab and so on was preinstalled along with it. sometimes for fun I try to translate code in VBA into Python. Unfortunately, I don't have a lot of free time, and I'm also very lazy.
Quote from: Yacine on May 31, 2022, 10:16:15 AMHaving a Jupyter Lab running from a stick would help catch the "hesitants", the ones "brave enough" to write some or more lines of VBA, but reluctant to switch to Python.
I discovered the other day that the Jupyter Lab has the ability to track variables !