3 ms·
Heh, you edited significantly again while I was replying. It's tough to keep the conversation coherent when you do that. Thank you for the link. I'll give it
by civility 7y ago
Heh, you edited significantly again while I was replying. It's tough to keep the conversation coherent when you do that.
Thank you for the link. I'll give it a look.
> While you're farting bubbles in the bathtub about integrating "bc" into bash, and haven't even proposed how you'll integrate the canvas api yet.
I tend to fart in the shower, and I don't give a crap about bc or bash. As for the canvas api, you must've missed the part where I said you can call gnuplot from bash (or any language which supports fork, dup, and exec, or popen). I'd guess that bash calling gnuplot as a subprocess is on par with Python calling the Tkinter canvas through their hackish hidden-Tcl abomination. You're probably a matplotlib guy though...
Incidentally, I have built command line plotters before, but I can't share the code, so you don't have any reason to believe me on that.
- DonHopkins 7y agoNope, 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. (No I'm not a matplot guy, but I've built command line plotters too and even terminal emulators that accepted escape codes with PostScript commands. ;) And I've done a lot of work with TCL/Tk and canvas both directly and through Tkinter, and also with PyGTK using pycairo, and I've integrated lots of code into Python with SWIG, including Python C extension integrated with PyCairo. Can you integrate C extensions into bash with SWIG, or any other way short or recompiling?) Here are some open source reasons to believe me: (search for "termulate-ps-string"): https://www.donhopkins.com/home/code/term.ps.txt https://www.donhopkins.com/home/code/term.ps.txt https://github.com/SimHacker/micropolis/blob/master/micropolis-activity/res/wscen.tcl https://github.com/SimHacker/micropolis/blob/master/micropol... https://github.com/SimHacker/micropolis/blob/master/micropolis-activity/src/sim/w_tk.c https://github.com/SimHacker/micropolis/blob/master/micropol... https://github.com/SimHacker/micropolis/tree/master/MicropolisCore/src/TileEngine https://github.com/SimHacker/micropolis/tree/master/Micropol... https://github.com/SimHacker/micropolis/tree/master/MicropolisCore/src/pyMicropolis https://github.com/SimHacker/micropolis/tree/master/Micropol... 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. Sure, there is some cost to all the glue code required by something like TCL or SWIG or COM or P/Invoke or any foreign function interface. But that's not even in the ballpark of how long it takes to fork off a Unix process. It's ironic that the strongest argument bash apologists have is that it's convenient, but once you are faced with all that mish-mashed haphazard syntax and kludgy tricks (like testing for an empty string like "x$foo" == "x"), it's actually one of the most inconvenient languages there is!
- 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