Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: [OT] Thoughts on Ruby's new absent operator?

by LanX (Saint)
on Mar 24, 2017 at 11:50 UTC ( [id://1185768]=note: print w/replies, xml ) Need Help??


in reply to [OT] Thoughts on Ruby's new absent operator?

Well, here "my thoughts"

How do I post a question effectively?

my problems:

  • First of all this should be a meditation
  • Then you are linking to another discussion instead to a definition.
  • After digging out the article I'm confronted with a lot of rubyisms I don't understand.

Why don't you try to explain to us the advantages of this construct over negativ look (ahead|behinds) in (pseudo) Perl code?

That's the way to initiate a decent discussion here.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re: [OT] Thoughts on Ruby's new absent operator?

Replies are listed 'Best First'.
Re^2: [OT] Thoughts on Ruby's new absent operator?
by perlancar (Hermit) on Mar 25, 2017 at 02:53 UTC

    I admit spending too little time on the post, while waiting to go into a class and on a rather fickle wifi connection, so I guess I kind of deserve your reply. That said: 1) I did consider Meditations, but picked Seekers of Perl Wisdom instead; 2) I assume at least some of the monks here are fans of regular expressions and have read about the absent operator, so I need not present much introductory materials.

    I have no strong opinion yet on the feature, perhaps will only do so after finding some practical use-case for it and seeing its performance characteristics.

      Sorry but the sources I found are frustratingly obscure, and installing the latest ruby to understand a badly documented experimental feature is not an option.

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

Re^2: [OT] Thoughts on Ruby's new absent operator?
by Anonymous Monk on Mar 24, 2017 at 18:30 UTC
    Was it really that hard to follow?

    "The negative look-behind essentially looks to see if the specified expression is present and then fails if so. The absence operator, however, ensures that anything that isn’t the specified expression will match."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1185768]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found