Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #41  
Old 01-23-2010, 06:14 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Not here to argue how much WoW sucks.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #42  
Old 01-23-2010, 06:24 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by coreys View Post
Not here to argue how much *** sucks.
Only to argue that we need to copy its features?
Reply With Quote
  #43  
Old 01-23-2010, 09:14 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by Loriel View Post
Only to argue that we need to copy its features?
Yes, because WoW invented this and was the first to ever, ever use it. Yes, we'll be copying WoW. Make's perfect sense. I see it now. Oh, woe is me, we'll be copying WoW. I should have known, even though I had no idea that WoW had such or feature nor would I care, nor does WoW have anything to do with it. I should have known I'd be trying to copy WoW! You, sir, have slain me!
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #44  
Old 01-24-2010, 12:02 PM
SKJF91 SKJF91 is offline
Registered User
Join Date: Dec 2009
Location: United States of America
Posts: 89
SKJF91 will become famous soon enough
Quote:
Originally Posted by Loriel View Post
Only to argue that we need to copy its features?
why do you keep 'sensoring' the letters 'WoW'..
Reply With Quote
  #45  
Old 01-24-2010, 12:47 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Loriel View Post
Only to argue that we need to copy its features?
Blizzard didn't invent Lua's pattern system.


Quote:
Originally Posted by SKJF91 View Post
why do you keep 'sensoring' the letters 'WoW'..
It's not allowed to discuss other MMORPGs.
Reply With Quote
  #46  
Old 02-03-2010, 10:15 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I ran into my situation with my setguild script where I needed some basic wildcard's for filtering error chat.

For example, "You must way %d seconds to use that command again!" would have bee useful. I ended up just matching the beginning and the end of the chat anyways, however.
Reply With Quote
  #47  
Old 02-03-2010, 10:17 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by DustyPorViva View Post
I ran into my situation with my setguild script where I needed some basic wildcard's for filtering error chat.

For example, "You must way %d seconds to use that command again!" would have bee useful. I ended up just matching the beginning and the end of the chat anyways, however.
I'd like something like that for getstringkeys().
Reply With Quote
  #48  
Old 02-03-2010, 10:58 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Yeah's the kind of things I wanted to be able to do.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #49  
Old 02-09-2010, 07:47 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Hmmm It could be interesting to add support for pcre. You basicly just want one command with a string and a regular expression as parameters and you get back a string?
Reply With Quote
  #50  
Old 02-09-2010, 07:57 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stefan View Post
Hmmm It could be interesting to add support for pcre. You basicly just want one command with a string and a regular expression as parameters and you get back a string?
I'm not sure how it's usually used, but I would assume a function would also be needed to check a string against a regular expression. For example, ensuring that a string is only alphanumeric.
__________________
Reply With Quote
  #51  
Old 02-09-2010, 09:03 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
I imagine people would want both a

string.match(pattern) -> boolean

and a

string.replace(pattern, replacement_string) -> string

Where the replacement_string could include back-references (like $1 or $2) if pattern includes capturing parenthesis.


I still think this is a bad idea though.
Reply With Quote
  #52  
Old 02-09-2010, 11:15 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Yeah, match and replace would be nice. And I still think that the fact that not everyone could use it is not a valid reason for not having it, that's just silly.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #53  
Old 02-09-2010, 11:44 PM
tempandrew tempandrew is offline
Registered User
Join Date: May 2005
Posts: 98
tempandrew is on a distinguished road
Quote:
Originally Posted by WhiteDragon View Post
I imagine people would want both a

string.match(pattern) -> boolean

and a

string.replace(pattern, replacement_string) -> string

Where the replacement_string could include back-references (like $1 or $2) if pattern includes capturing parenthesis.


I still think this is a bad idea though.
This should be implemented ASAP. I can think of a lot of situations where a replace command would be great.
Reply With Quote
  #54  
Old 02-10-2010, 12:22 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by WhiteDragon View Post
I still think this is a bad idea though.
Matching should return or make accessible the part of the string that was actually matched (probably just offset, length) and all the parenthesised groups.

Replacing should optionally take a function instead of a string that is called with the matched part and groups and returns a replacement string.

Reply With Quote
  #55  
Old 02-10-2010, 12:47 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Loriel View Post
Matching should return or make accessible the part of the string that was actually matched (probably just offset, length) and all the parenthesised groups.

Replacing should optionally take a function instead of a string that is called with the matched part and groups and returns a replacement string.

I like the way you are thinking. I wouldn't mind having something that works just as Lua's string.gsub() does.
Reply With Quote
  #56  
Old 02-10-2010, 01:00 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by Stefan View Post
Hmmm It could be interesting to add support for pcre. You basicly just want one command with a string and a regular expression as parameters and you get back a string?
If you do it exactly like WhiteDragon said I will love you forever and ever.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #57  
Old 05-16-2010, 10:02 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Three month bump.

I'm finding myself wanting this more and more
Even Javascript has support built into the language (it's literally in the syntax) for Regular Expressions, come on now.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #58  
Old 08-21-2010, 03:24 PM
MrDunne MrDunne is offline
Registered User
Join Date: Aug 2010
Posts: 38
MrDunne is on a distinguished road
Bump.
Reply With Quote
  #59  
Old 08-21-2010, 04:53 PM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
Do it.
__________________
Trying to be nice now...
Reply With Quote
  #60  
Old 08-12-2011, 06:10 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Bumping because I'd really like this
Reply With Quote
  #61  
Old 08-14-2011, 06:09 AM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
I would like this because it would allow people like Crow to make amazing things even more easily to entertain me.

Oh and people like Crow are amazing and deserve this kind of stuff.
Reply With Quote
  #62  
Old 08-14-2011, 12:03 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by MattKan View Post
I would like this because it would allow people like Crow to make amazing things even more easily to entertain me.

Oh and people like Crow are amazing and deserve this kind of stuff.
Doh, what the..

Regular expressions are not the key to those super awesome things you'd like, but damn, they are useful.
Reply With Quote
  #63  
Old 08-14-2011, 12:06 PM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by MattKan View Post
I would like this because it would allow people like Crow to make amazing things even more easily to entertain me.

Oh and people like Crow are amazing and deserve this kind of stuff.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #64  
Old 08-14-2011, 08:43 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
specific example of when this would be necessary? I cannot think of any situation where a simpler solution wouldn't work.
__________________
Reply With Quote
  #65  
Old 08-14-2011, 08:51 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by salesman View Post
specific example of when this would be necessary? I cannot think of any situation where a simpler solution wouldn't work.
Advanced chat filters. Replacing something in a string. Other stuff.
Reply With Quote
  #66  
Old 08-14-2011, 09:34 PM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Quote:
Originally Posted by salesman View Post
specific example of when this would be necessary? I cannot think of any situation where a simpler solution wouldn't work.
The point isn't what they can do that other solutions can't.
The point is that they might be the better solution.

Thats how scripting languages evolve and become better. If we didn't improve on what we already have, we would still have gs1.

And in a lot of ways, regular expressions can be simpler than other solutions.
It could be the difference of writing a pretty large chunk of code, and comparing a simple regular expression.
__________________

Reply With Quote
  #67  
Old 08-14-2011, 09:40 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
I have never run into a problem where RegEx was needed on Graal and could personally care less whether or not it's added. I'm just asking the people in this thread who have "been in situations where RegEx would have useful" to support their arguments by stating what those situations were.
__________________
Reply With Quote
  #68  
Old 08-14-2011, 09:42 PM
Bubble13 Bubble13 is offline
Registered User
Join Date: Sep 2010
Location: USA
Posts: 172
Bubble13 is on a distinguished road
Quote:
Originally Posted by salesman View Post
I have never run into a problem where RegEx was needed on Graal and could personally care less whether or not it's added. I'm just asking the people in this thread who have "been in situations where RegEx would have useful" to support their arguments by stating what those situations were.
There don't have to be any situations. It can be said that a scripting language really isn't complete without regular expressions.
Reply With Quote
  #69  
Old 08-15-2011, 12:42 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Bubble13 View Post
There don't have to be any situations. It can be said that a scripting language really isn't complete without regular expressions.
No. Changes should only be made because those changes will be useful. If there are no solutions where regular expressions would be useful, why add them to the language?
__________________
Reply With Quote
  #70  
Old 08-15-2011, 12:56 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I've only needed this maybe... once or twice. I really wanted regular expressions those one or two times, but otherwise couldn't care less. It sounds awesome those few times you really want it, but other than that I can't see it being that useful.
Reply With Quote
  #71  
Old 08-15-2011, 05:56 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Making a RegEx parser isn't difficult, but it be would be more effective to have it as an in-built one if it ever was added.

RegEx could easily be used for more advanced systems dealing with a lot of information that change over time, instead of searching by wildcards for example, regex would be more effective finding specific and advanced patterns. It would also be good for e.g. fixing typos, validate input, transform parts of strings into something else and more.

"Changes should only be made because those changes will be useful." That's really productive, right... Who or what determines if changes are useful or not then?
__________________
Reply With Quote
  #72  
Old 08-15-2011, 06:11 PM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
I believe Chompy just won this thread.

/thread
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #73  
Old 08-15-2011, 10:50 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Chompy View Post
"Changes should only be made because those changes will be useful." That's really productive, right...
Yes, it is productive. If you add changes that aren't useful then by definition they'll seldom be used, and the time used to add them is wasted.

I'm guessing we agree and I just wasn't very clear in making my point. You wouldn't advocate adding feature X to GScript just because language Y has it, right?

The post I was replying to said exactly that:

Quote:
Originally Posted by Bubble13 View Post
There don't have to be any situations. It can be said that a scripting language really isn't complete without regular expressions.
In other words, "even if nobody would ever use them, they should still be added because lots of other languages support them."
__________________
Reply With Quote
  #74  
Old 08-16-2011, 12:05 AM
Bubble13 Bubble13 is offline
Registered User
Join Date: Sep 2010
Location: USA
Posts: 172
Bubble13 is on a distinguished road
Quote:
Originally Posted by cbk1994 View Post
In other words, "even if nobody would ever use them, they should still be added because lots of other languages support them."
Sorry, I wasn't very clear. I guess I meant to say that people shouldn't have to list situations. I'm pretty sure that there would be situations that would be made easier with RegEx even if the situations weren't listed.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.