egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dictionary.com script (finished/final)
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Apr 06, 2008 1:51 pm    Post subject: Reply with quote

>> You've embedded unescaped control-codes to handle the bold rather than the proper escape sequence \002. Synonyms and antonyms suffer from this.

Ahh ok.. As I recall, trying to use escape codes in a regsub using the & subs, doesn't work, hence having to use embedded code (which I generally dislike and avoid, however it didn't work for this case, iirc.)

>> This directly stems from using *.tcl.txt to name the script, the browser will display these itself.

Actually, dandy.net has a badly configured webserver, their mime-types is not right, so if I did not use the .txt extension, your browser would get text anyway, but cooked/line-wrapped (their server sends a lot of stuff as text, regardless of extension. Getting them to fix it is an exercise in futility - it took months for them to even add .rar as a compressed archive type to their mime-types, despite many email complaints about the problem from me. Ever have a webserver send binary data as text? It's not pretty and you can't save it.) Browsers depend on the Content-Type string sent by the server, they don't generally rely on file extensions to determine anything. If Apache's default is content-type - ascii, you'll get cooked [edit] content, for every file extension not specifically defined in the sever's mime-types [edit2] which would mean even those embedded control codes (bolds) would be cooked. so if you did try saving it, it would be broken. So, yes, the simple solution is to either download the script by right-clicking the link, or download from the tcl archive.

>> Calling windrop inferior rather than investigate your own code is just silly.

I view tcl & eggdrop as primarily unix based, so any incompatibilities between the scripts I write for linux/tcl/eggdrop, and windrop, are beyond my control. Feel free to adapt the script to suit your platform. I don't think its fair to blame my script, which is written to the best standards of my abilities (which may not be saying much) for platform-specific problems on platforms I don't use or test on (nor for which tcl & eggdrop were designed.)

I always recommend windows users to install cygwin, if they want a genuinely unix-like environment (short of installing linux or bsd.) And that remains my solution to any platform-specifc problems such as this Smile
Back to top
View user's profile Send private message
strikelight
Owner


Joined: 07 Oct 2002
Posts: 708

PostPosted: Sun Apr 06, 2008 5:11 pm    Post subject: Reply with quote

rosc2112 wrote:
>> You've embedded unescaped control-codes to handle the bold rather than the proper escape sequence \002. Synonyms and antonyms suffer from this.

Ahh ok.. As I recall, trying to use escape codes in a regsub using the & subs, doesn't work, hence having to use embedded code (which I generally dislike and avoid, however it didn't work for this case, iirc.)


Despite my better judgement for helping you, most likely your problem stemmed from you trying it with curly braces and not quotes.

Code:

regsub -all -nocase "<b>.*?</b>" $dcsynon "\002&\002" dcsynon


Should work correctly.
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Apr 06, 2008 7:45 pm    Post subject: Reply with quote

strikelight wrote:
Despite my better judgement for helping you, most likely your problem stemmed from you trying it with curly braces and not quotes.


It wasn't my problem, as I said, my script works without error for me. Other people can feel free to implement the fix you posted. When crafting this script, I used the regsub manpage provided with tcl, following the "accepted standard."

If you have a personal problem with offering me help (presumably because I "dared" to fix one of your scripts - and posted it according to the rules of the tcl archive with a name indicating it was a modified version, eg, script-version-rosc) you really don't need to.

In fact, given the apparent rising antagonism toward me here, I'll just take a vacation. I have enough bullshit in real life.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Apr 06, 2008 7:48 pm    Post subject: Reply with quote

strikelight wrote:
Despite my better judgement for helping you, most likely your problem stemmed from you trying it with curly braces and not quotes.


It wasn't my problem, as I said, my script works without error for me. Other people can feel free to implement the fix you posted. When crafting this script, I used the regsub manpage provided with tcl, following the "accepted standard."

If you have a personal problem with offering me help (presumably because I "dared" to fix one of your scripts - and posted it according to the rules of the tcl archive with a name indicating it was a modified version, eg, script-version-rosc) you really don't need to.

In fact, given the apparent rising antagonism toward me here, I'll just take a vacation. I have enough bullshit in real life. 99% of the posts here are either faqs, users who can't be arsed to read documentation, or requests for spam, warez or mirc scripts, so my participation has naturally dwindled anyway.
Back to top
View user's profile Send private message
strikelight
Owner


Joined: 07 Oct 2002
Posts: 708

PostPosted: Sun Apr 06, 2008 11:27 pm    Post subject: Reply with quote

I'm not going to turn this into a thread of flames... But allow me to just make a couple of comments and corrections to your previous post.

rosc2112 wrote:
strikelight wrote:
Despite my better judgement for helping you, most likely your problem stemmed from you trying it with curly braces and not quotes.


It wasn't my problem, as I said, my script works without error for me. Other people can feel free to implement the fix you posted. When crafting this script, I used the regsub manpage provided with tcl, following the "accepted standard."


What you quoted me saying was infact in response to a direct quote of you acknowledging something not working for you (& with escaped codes). Thus, by definition, you had a "problem".

rosc2112 wrote:

If you have a personal problem with offering me help (presumably because I "dared" to fix one of your scripts - and posted it according to the rules of the tcl archive with a name indicating it was a modified version, eg, script-version-rosc) you really don't need to.


Actually, according to the "rules of the land", you must seek permission from the original author first.

That's all I have to say.
Back to top
View user's profile Send private message Visit poster's website
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Apr 08, 2008 5:45 pm    Post subject: Reply with quote

Code:
# above code
regsub -all -nocase {(?:<b>|</b>)} $dcsynon "\002" dcsynon

# below code
regsub -all -nocase {<b>.*?</b>} $dcsynon {*control-code 002 is embedded here*&*control-code 002 is embedded here*} dcsynon

@rosc2122, I've got to wonder, why in all honesty you would use the below code when the above code serves the same purpose? Sometimes when your too used to overcoming obstacles with minimalistic coding in mind, you overlook the most simplistic and rational answer. Not to cause problems but surely even you can see that even the most talented, brilliant scripter would suffer to a degree if they don't constantly heed the advice from those they feel are less apt...right? What that means is even a genius can forget to use a curly brace at times (and shall we all once, or even a gazillion times) and you will get reminded by someone new to the language (a newb) that you simply forgot a brace somewhere. Because of their closeness with the early syntax of tcl, this catches their eye. To someone already adept in tcl, these simple rules can sometimes be easily overlooked and forgotten... These are reminders, not harrassment, don't take advice the wrong way.

While you may prefer linux, someone else may prefer windows. Now where we go from here should be always the same. But the way you script appears always biased for linux (purposely using code that breaks on windrop), and then you tout to others how they should fully install cygwin (pfft). To me I see this as a game for you to attract new users or zealots such as yourself to linux. All this in uneccessary to run a simple eggdrop with some simple tcl scripts, so give these windrop users a break, kthx..
Back to top
View user's profile Send private message
anotheregglover
Voice


Joined: 13 Jan 2005
Posts: 38

PostPosted: Tue Jul 22, 2008 5:43 pm    Post subject: Reply with quote

Erm...hi! Smile


Bit of a problem with this script, when I type .dict blahblah, it just tells me that it's looking it up, and then it says 'no results found for 'blah' in any of the active dictionaries', I've tried specifying dictionaries, etc....Thoughts?
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Jul 22, 2008 8:36 pm    Post subject: Reply with quote

Presumably the website changed again. I'll have a look and post a fix. Might be a while, I don't have a shell to test from right now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber