Almenon / AREPL-vscode

Program python in real-time
MIT License
264 stars 33 forks source link

Hijack turtle / matplotlib graphics display to maintain state #237

Open Almenon opened 7 years ago

Almenon commented 7 years ago

Once I implement #51 I still have the problem of the graphics window popping up in-your-face. As a temporary solution I could give users code to make it pop in a certain area of your screen (ex: right half).

But preferably this would be inbuilt functionality, where the window would always appear in the last size and position you left it in. Not sure how to do this, maybe look at this thread for some ideas: https://github.com/donkirkby/live-py-plugin/issues/52

donkirkby commented 6 years ago

You could probably use my MockTurtle or SvgTurtle class to patch the regular turtle. Then use their output to recreate the drawing inside your regular display. Is your display in a browser? I'm going to start working on matplotlib soon, so I might have something helpful there. You're also welcome to use my display of program execution if it's useful. It looks like you're just displaying the final state right now. You can see examples of my display on the getting started page.

Almenon commented 6 years ago

Hey, first person to comment on my repo! 🎉

Looks like I've taken so long to respond that you've already added Matplotlib support XD

My display is in a browser. I could use your MockTurtle implementation - I'd just have to convert your java code that does the drawing to javascript. Or maybe create a simple frame in python for hosting the drawing. The display as a seperate window could be nice for letting users move it around at will.

Another possibility is to switch to Skulpt when the user is using turtle. Skulpt is a JS implementation of python, so there would be no need to send the code to a python script for execution. Skulpt also has some Matplotlib support.

Recently though I've paused development in favor of marketing, which has.... been difficult, to say the least. This entire week I've just been carefully handcrafting replies to various people. How did you market your extension? Any tips?

donkirkby commented 6 years ago

I posted questions and answers on Stack Overflow in the livecoding tag, and I posted a few demo videos. I gave a talk at a local Python user group. Recently, I proposed my project for the PyCascades sprint day, and I got three new contributors.

Mainly, I tried to find places where developers were talking about related topics, and mention my project without being blatant spam. If I'm contributing something useful to the conversation, and I also mention my own project, I think that's acceptable.

Almenon commented 5 years ago

stumbled upon this issue again. Thanks for the marketing tips @donkirkby . What I ended up doing is abandoning my electron-based approach in favor of a vscode extension. Once I put the extension in the marketplace and gave it a good title I got a lot more people using it. Around 100 per day, although the number is increasing at a snail's pace (if at all, kinda hard to tell the overall trend), so I have clearly have some more work to do 🤔 . I also gave lightning talks at pycon and pygotham, both of which were really fun.