why is the new version of pymate written in ruby?
I don't know jack about ruby -- why should I learn it in order to hack on a tool I use daily while writing python code? come on, we don't want no stinking ruby here!
On Nov 6, 2006, at 8:28 AM, domenico.carbotta@fastwebnet.it wrote:
why is the new version of pymate written in ruby?
Because the existing pymate was broken and whoever was kind enough to donate their time to fixing it happened to know ruby better?
I don't know jack about ruby -- why should I learn it in order to hack on a tool I use daily while writing python code? come on, we don't want no stinking ruby here!
Ruby and python are effectively interchangeable. Each has a handful of advantages and disadvantages, but they otherwise solve the same set of problems in nearly the same way. I have been a Python programmer since 1992 or so and find Ruby to be nothing more than a syntactic perversion of Python (whereas I found Python to be a [very nice] syntactic perversion of Perl when I learned Python). If I had learned Ruby first, I'm sure I would find Python to be a syntactic perversion of Ruby.
So, get over it. If pymate works for you, then you shouldn't care. If it doesn't and you need to fix a bug, then learn a little bit of ruby. It'll make you a stronger person.
b.bum
On 11/6/06, domenico.carbotta@fastwebnet.it domenico.carbotta@fastwebnet.it wrote:
why is the new version of pymate written in ruby?
I don't know jack about ruby -- why should I learn it in order to hack on a tool I use daily while writing python code? come on, we don't want no stinking ruby here!
And we don't want no stinking language war here.
But if you ask it, it's because ruby totally owns python. ;)
More seriously, if you like to hack pymate, why don't you rewrite it before someone else had to do it? Or are you proposing to do it now? If your religion is against using a better tool written in ruby, use the old one. And if you're so picky about the tools you use, I have a bad news for you: TextMate is not written in python.
P.S: Why are you posting all those answers to mails no sent to the list?
On Nov 6, 2006, at 12:33 PM, Fred B wrote:
On 11/6/06, domenico.carbotta@fastwebnet.it domenico.carbotta@fastwebnet.it wrote:
why is the new version of pymate written in ruby?
I don't know jack about ruby -- why should I learn it in order to hack on a tool I use daily while writing python code? come on, we don't want no stinking ruby here!
And we don't want no stinking language war here.
But if you ask it, it's because ruby totally owns python. ;)
Think of it as a young Boy Scout helping a doddering old lady across the street ;-).
More seriously, if you like to hack pymate, why don't you rewrite it before someone else had to do it? Or are you proposing to do it now? If your religion is against using a better tool written in ruby, use the old one. And if you're so picky about the tools you use, I have a bad news for you: TextMate is not written in python.
Oh my God! I thought it was written in all languages and that's what made it so good. You mean it uses some languages to *support* others. Gasp!
;-)
S
I think you guys are turning this into something that it is not.
It *was* a joke .. perhaps since everywhere else on the net you see people saying how much better Ruby is than Python, Python is than Ruby ... my anonymous block can kick your lambda's ass, etc. Really -- who cares?
It *wasn't* a serious jab at a language, or its fitness as a tool w.r.t another language ... just a joke mixed w/ an observation/ comment about the choice of implementation.
I've never actually used PyMate, so I'm not sure I see its utility, but Domenico's point sort of rings true in that .. if you run PyMate, you're most likely hacking on some Python (duh, ok) .. if there's something small you want to tweak and you dive into the code, you're in for a world of hurt. Ruby does look a lot like Python, Python looks a lot like Ruby, but you use different idioms to program in every language, including these two, so looks are only skin deep.
And about the benefits of learning Ruby ... I don't disagree with them at all, really. However, you can certainly reach over your shoulder to scratch your ass, but you really wouldn't want to, would you? You'll no doubt benefit from the extra flexibility you'll gain by doing this exercise and you'll be a stronger person from it ... however if someone were to suggest you to do that, I'd imagine most of us wouldn't take it to hear, even though it makes good sense. When it really itches, you just want to take care of it ... you know what I mean?
Fritz Anderson:
You apparently believe that having gotten an improved version for free, you are entitled to ask the volunteer to dump his work and restart to your specification — but still for free.
Well .. I might be mistaken, but I'm pretty sure Domenico wrote the original PyMate, so I think he would appreciate someone taking the time to do something for others ... so I wouldn't feel slighted if I were you (or whoever wrote it) ...
Perhaps since a solution already existed, some discussion on what could be done to improve or rework what was there might not have been the worst idea to start off with.
Fred:
More seriously, if you like to hack pymate, why don't you rewrite it before someone else had to do it? Or are you proposing to do it now?
See above :-)
P.S: Why are you posting all those answers to mails no sent to the list?
Huh?
Anyway .. I think we all appreciate it when people put work into TextMate that we all benefit from. Thanks for that.
-steve
On 11/6/06, Steve Lianoglou lists@arachnedesign.net wrote:
Fred: See above :-) (...I'm pretty sure Domenico wrote the original PyMate...)
As much as I love TM, I still don't know all the contributor's name by heart, sorry. ;)
P.S: Why are you posting all those answers to mails no sent to the list?
Huh?
I mean I see three threads started by domenico
- PyMate in RUBY?!?!? - Re: my webmail client is broken so I cannot reply... - [...]
As they seem to be answers to messages I don't see, I guess there is a problem. Maybe the thread is ruined for me + Some posts are missing...
I am the one responsible for the new PyMate. It in Ruby because we are moving towards a unified script runner for TextMate which will allow all of the various scripting languages to benefit from an enhanced html output window, while reducing the amount of maintenance required to keep everything working. pymate.rb will eventually be a subclass of a more generalized script runner which will be language indepedent. It will perhaps be in another language, but that doesn't especially matter.
Ruby does not run your python code. Instead, a python subprocess is launched, the code is piped in, and the output is piped to HTML preview. The custom exception handling is done using a special sitecustomize.py Python.bundle/Support/PyMate/, that bit if code is in Python, and is quite nice. To modify PyMate, the sitecustomize.py should be all that you really need to touch.
I actually spent a few hours trying to reimplement pymate.rb in Python, but then realized I was wasting my time after a simple copy-paste from RubyMate had things working in 10 minutes flat.
I think it is a testament to the power of both Python and Ruby that they are so easily melded into a working PyMate.
Anyway, I hope you'll give the new version of PyMate a chance, and report any issues that you have. I really would like it to work for you, regardless of the implementation language.
- Alex
On 11/6/06, Andy Armstrong andy@hexten.net wrote:
On 6 Nov 2006, at 17:33, Fred B wrote:
And if you're so picky about the tools you use, I have a bad news for you: TextMate is not written in python.
And neither is Python (or Perl, or Ruby :)
-- Andy Armstrong, hexten.net
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Nov 6, 2006, at 10:43 AM, Alexander Ross wrote:
I think it is a testament to the power of both Python and Ruby that they are so easily melded into a working PyMate.
First -- Alex: Thank you. Repeat: THANK YOU! Your work fixes an output bug that was messing with my world.
Now, tongue in cheek: I find it to be more of a testament that the two languages are pretty much identical in all but syntax ;-)
On Nov 6, 2006, at 11:28 AM, Bill Bumgarner wrote:
On Nov 6, 2006, at 10:43 AM, Alexander Ross wrote:
I think it is a testament to the power of both Python and Ruby that they are so easily melded into a working PyMate.
First -- Alex: Thank you. Repeat: THANK YOU! Your work fixes an output bug that was messing with my world.
Yes, but this program could be written in any language and it would function in the exactly the same way. pymate.rb doesn't actually know anything about Python. It just runs the python source through cpython, and pipes the output back.
But you're right, they are basically the same. I think Ruby is a little more handy for quick shell scripts… It's nice to not have to `from os import environ` to get at the env. also, you can just `echo 'write shell commands'` and get strings back. that's pretty neato.
But don't get me wrong, I love python! :)
Now, tongue in cheek: I find it to be more of a testament that the two languages are pretty much identical in all but syntax ;-)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
No, I'm saying that that is one of the nice features of ruby.
in python, you have to do something like:
python -c "import os; print os.popen('echo "Hello from the shell"').read()"
On 11/6/06, James Edward Gray II james@grayproductions.net wrote:
On Nov 6, 2006, at 1:38 PM, Alex Ross wrote:
also, you can just `echo 'write shell commands'` and get strings back.
Are you saying you don't know how to do this in Ruby?
$ ruby -e 'p `echo "Hello from the shell!"`' "Hello from the shell!\n"
James Edward Gray II
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Nov 6, 2006, at 1:43 PM, Alexander Ross wrote:
I am the one responsible for the new PyMate. It in Ruby because we are moving towards a unified script runner for TextMate which will allow all of the various scripting languages to benefit from an enhanced html output window, while reducing the amount of maintenance required to keep everything working. pymate.rb will eventually be a subclass of a more generalized script runner which will be language indepedent. It will perhaps be in another language, but that doesn't especially matter.
Ruby does not run your python code. Instead, a python subprocess is launched, the code is piped in, and the output is piped to HTML preview. The custom exception handling is done using a special sitecustomize.py Python.bundle/Support/PyMate/, that bit if code is in Python, and is quite nice. To modify PyMate, the sitecustomize.py should be all that you really need to touch.
I actually spent a few hours trying to reimplement pymate.rb in Python, but then realized I was wasting my time after a simple copy-paste from RubyMate had things working in 10 minutes flat.
I think it is a testament to the power of both Python and Ruby that they are so easily melded into a working PyMate.
Anyway, I hope you'll give the new version of PyMate a chance, and report any issues that you have. I really would like it to work for you, regardless of the implementation language.
Alex,
Thank you for this work. On a related note, I'm the author of pycheckmate (what runs when you syntax-check a python script from the Python bundle). Is this impacted by the script runner changes? (Sorry, just haven't had a chance to look...). I guess I'm asking if I should try to make some time available to update pycheckmate to work with the new script runner framework.
Thanks,
j.
Jay,
I haven't touched PyCheckMate and it should still work as advertised. Feel free to look at how pymate.rb does it's thing. All you should really have to do is modify the scrip to take advantage of soryu's code. Look at webpreview.rb in TextMate support.
- Alex
On Nov 6, 2006, at 5:04 PM, Jay Soffian wrote:
On Nov 6, 2006, at 1:43 PM, Alexander Ross wrote:
I am the one responsible for the new PyMate. It in Ruby because we are moving towards a unified script runner for TextMate which will allow all of the various scripting languages to benefit from an enhanced html output window, while reducing the amount of maintenance required to keep everything working. pymate.rb will eventually be a subclass of a more generalized script runner which will be language indepedent. It will perhaps be in another language, but that doesn't especially matter.
Ruby does not run your python code. Instead, a python subprocess is launched, the code is piped in, and the output is piped to HTML preview. The custom exception handling is done using a special sitecustomize.py Python.bundle/Support/PyMate/, that bit if code is in Python, and is quite nice. To modify PyMate, the sitecustomize.py should be all that you really need to touch.
I actually spent a few hours trying to reimplement pymate.rb in Python, but then realized I was wasting my time after a simple copy-paste from RubyMate had things working in 10 minutes flat.
I think it is a testament to the power of both Python and Ruby that they are so easily melded into a working PyMate.
Anyway, I hope you'll give the new version of PyMate a chance, and report any issues that you have. I really would like it to work for you, regardless of the implementation language.
Alex,
Thank you for this work. On a related note, I'm the author of pycheckmate (what runs when you syntax-check a python script from the Python bundle). Is this impacted by the script runner changes? (Sorry, just haven't had a chance to look...). I guess I'm asking if I should try to make some time available to update pycheckmate to work with the new script runner framework.
Thanks,
j.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 6. Nov 2006, at 17:28, domenico.carbotta@fastwebnet.it domenico.carbotta@fastwebnet.it wrote:
why is the new version of pymate written in ruby?
Didn’t the original version have to call out to perl, because that was the simplest way to fetch the encoding from the users script? ;)