Earlier quoted context omitted.
As an aside, pyparsing is based strongly on the excellent "Parsec" library for Haskell. A number of other languages have similar parser combinator libraries. If you're looking for Ruby libraries specifically, check out: http://treetop.rubyforge.org/ (Treetop uses PEGs rather than parser combinators, but like pyparsing it integrates very well with its host language.)
Good call on Parsec. Unfortunately, I haven't found Haskell nearly as practical as Python for day-to-day work. Treetop I had not heard of. It looks interesting.
What Pythonistas Think of Ruby
11–20 of 247 posts
Re: What Pythonistas Think of Ruby
#12Can anyone explain why?
Re: What Pythonistas Think of Ruby
#13Re: What Pythonistas Think of Ruby
#14Neither python nor ruby are lisp. Python is not cool because of generators, list comprehensions, decorators or any other feature. Ruby is not cool because of blocks or monkey patching(im suspicions of anything called MONKEY patching). Ruby and python are cool because of really cool libraries and the way people use these languages, not because they have especially well designed syntax.
Instead of arguing about how cool your crappy syntax is, argue about which has the better libraries, which implementation is better, which is used for cooler projects. Non of these languages can top lisp when it comes to expressiveness and flexibility.
Re: What Pythonistas Think of Ruby
#15"Without powerful blocks and lambdas, you can’t have Rake. You can’t have RSpec. You can’t have Sinatra’s clear REST syntax." Can anyone explain why?
task :name do |t|
# do stuff
end
I'm not sure what's the closest equivalent syntax you could create in python.Re: What Pythonistas Think of Ruby
#16Definition or reference, anyone? Although I can probably guess where this is leading....
Re: What Pythonistas Think of Ruby
#17"Without powerful blocks and lambdas, you can’t have Rake. You can’t have RSpec. You can’t have Sinatra’s clear REST syntax." Can anyone explain why?
Sinatra:
get '/hi' do
"Hello World!"
end
Python 2: @get('/hi')
def hello():
return "Hello World"
Python 3: def hello() -> "/hi":
return "Hello World"Re: What Pythonistas Think of Ruby
#18"Without powerful blocks and lambdas, you can’t have Rake. You can’t have RSpec. You can’t have Sinatra’s clear REST syntax." Can anyone explain why?
Python doesn't have multiline lambdas, so there is no way to create an api similar to rake's: task :name do |t| # do stuff end I'm not sure what's the closest equivalent syntax you could create in python.
with task('name') as t:
# do stuff with t
It's not really the same; the task object doesn't have control over whether the block is actually run, but sometimes it is sufficient.Re: What Pythonistas Think of Ruby
#19Re: What Pythonistas Think of Ruby
#20"Without powerful blocks and lambdas, you can’t have Rake. You can’t have RSpec. You can’t have Sinatra’s clear REST syntax." Can anyone explain why?