3 ms·
> Nope, Python's Tkinter canvas calls into TCL/Tk directly. It doesn't run it as a separate process. There is no comparison: Another false equivalence. Python'
by civility 7y ago
> Nope, Python's Tkinter canvas calls into TCL/Tk directly. It doesn't run it as a separate process. There is no comparison: Another false equivalence.
Python's Tkinter converts all calls into strings which are parsed and executed by the hidden Tcl interpreter in there. It's really pretty hackish. I didn't say it ran in a separate process, I said it was probably on par performance-wise as bash calling gnuplot through a separate process.
> Can you integrate C extensions into bash with SWIG, or any other way short or recompiling?
Yuck. Why would I want to do that? I don't like SWIG or bash. SWIG generates an awful mess. When needed, I prefer to write Python extensions by hand.
However, I suspect the only reason bash doesn't support plugins/extensions has more to do with some GPL ideology.
> You keep going back to this mistaken belief that forking off separate processes is incredibly cheap. Or even convenient. You really should rid yourself of that misconception.
You should really stick to things I've actually written. I'm starting to think you're having an argument with some imaginary bash and fork advocate in your head and pretending I'm him.
- DonHopkins 7y agoNo it's not on par with bash calling gnu plot as a separate process, because bash and gnuplot ALSO have to convert back and forth between text and binary floating point numbers, and more importantly, as I keep repeating and you refuse to acknowledge, the cost of forking a Unix process is way more expensive than converting between text and binary strings. Not comparable. False equivalence. And then on top of that, you still have to convert just as many numbers and strings back and forth -- if not more! It's not just the calling and conversion overhead of gnuplot: bash also has to fork off many more "bc" processes that themselves convert text numbers to binary, evaluate expression, then convert binary numbers back to text (and there could be hundreds or thousands of expressions). While Python with pycairo can draw a pie chart without once converting numbers between text and binary, reading and writing text to a pipe, context switching, or forking off thousands of processes. The only thing I was imagining about you was that you were listening to what I was saying, but I keep finding I need to repeat myself.
- civility 7y ago> I keep finding I need to repeat myself Communicating with people is hard, especially when you only really want to repeat yourself and not try to understand what anyone else is saying. I get your point - fork is slow. Now what do you think my point was? Please don't bother repeating yourself again.