Ruby is a really cool language but I'm dying for an update where features are removed .
Ruby 3.0 Preview 1
151–160 of 207 posts
Re: Ruby 3.0 Preview 1
#152Earlier quoted context omitted.
I have also strayed away from Ruby so I'm out of touch too. The arbitrariness helped get me into Ruby and helped get me out. It's cool if that's your sort of thing but as I get older I'm starting to dislike arbitrary things more and more. Anyway, I didn't realize who I was replying to when I replied to your first comment. I've seen a few of your presentations and read a lot of your work and I'm a fan.
I think we're all really great in cherry-picking something lacking in a language and then describing the whole eco-system as bad. What language are you using now? Were there seriously no bad design decisions made in said language?
Re: Ruby 3.0 Preview 1
#153Much as I would love to believe Ruby 3.0 delivers some kind of speed bump my simple test of doing what Ruby supposedly does best - parsing a log file with a regex - shows Ruby 16% slower than the Python equivalent. Ruby puts IO.foreach('logs1.txt').grep /\b\w{15}\b/ Python from re import compile with open('logs1.txt', 'r') as fh: regex = compile(r'\b\w{15}\b') for line in fh: if regex.search(line): print(line, end=''…
That's not really surprising since regex in most languages is PCRE and not really indicative of actual interpreter performance.
Re: Ruby 3.0 Preview 1
#154Earlier quoted context omitted.
That's not really surprising since regex in most languages is PCRE and not really indicative of actual interpreter performance.
If that's the case why is Ruby slower?
Re: Ruby 3.0 Preview 1
#155Much as I would love to believe Ruby 3.0 delivers some kind of speed bump my simple test of doing what Ruby supposedly does best - parsing a log file with a regex - shows Ruby 16% slower than the Python equivalent. Ruby puts IO.foreach('logs1.txt').grep /\b\w{15}\b/ Python from re import compile with open('logs1.txt', 'r') as fh: regex = compile(r'\b\w{15}\b') for line in fh: if regex.search(line): print(line, end=''…
The programs aren't doing the same things. The Ruby one seems to buffer the matches into a huge string then print. Don't know how different it would be but better to compare apples.
Re: Ruby 3.0 Preview 1
#156Much as I would love to believe Ruby 3.0 delivers some kind of speed bump my simple test of doing what Ruby supposedly does best - parsing a log file with a regex - shows Ruby 16% slower than the Python equivalent. Ruby puts IO.foreach('logs1.txt').grep /\b\w{15}\b/ Python from re import compile with open('logs1.txt', 'r') as fh: regex = compile(r'\b\w{15}\b') for line in fh: if regex.search(line): print(line, end=''…
The programs aren't doing the same things. The Ruby one seems to buffer the matches into a huge string then print. Don't know how different it would be but better to compare apples.
Re: Ruby 3.0 Preview 1
#157Earlier quoted context omitted.
If that's the case why is Ruby slower?
Because what you’re really measuring is something like how well the block size the interpreter uses for IO matches the underlying os/hardware
Re: Ruby 3.0 Preview 1
#158Re: Ruby 3.0 Preview 1
#159Earlier quoted context omitted.
Metaprogramming is an important part of ruby, so method_missing stays.
No, metaprogramming is a stain on software engineering that all ecosystems are moving away from. Except Ruby.