From gcanyon at inspiredlogic.com Mon Apr 1 05:21:00 2002 From: gcanyon at inspiredlogic.com (Geoff Canyon) Date: Mon Apr 1 05:21:00 2002 Subject: Digests, anyone? Message-ID: I'm hoping to assemble a complete archive of the list. I seem to recall that someone has been saving all the archive files. I can make an FTP server available, or just take them through email, whichever is easier. Specifically I'm looking for digests 1 - 178 thanks! -- regards, Geoff Canyon gcanyon at inspiredlogic.com From michael at GreppyDreppies.com Mon Apr 1 08:10:01 2002 From: michael at GreppyDreppies.com (Michael D Mays) Date: Mon Apr 1 08:10:01 2002 Subject: MOD function does not work! So be warned! In-Reply-To: Message-ID: Michael D Mays of michael at greppydreppies.com wrote the following on 3/31/02 3:12 PM > The error does not accumulate. Try summing a million .10. There is no > accumulation. What numbskull posted this?! The round off error accumulates. michael From guzdial at cc.gatech.edu Mon Apr 1 09:25:01 2002 From: guzdial at cc.gatech.edu (Mark Guzdial) Date: Mon Apr 1 09:25:01 2002 Subject: Revolution for CGI Scripts In-Reply-To: Message-ID: How does one get started exploring Revolution for CGI Scripts? I don't see anything in the built-in documentation nor anything on the website. Thanks! Mark From eijkhout at cs.utk.edu Mon Apr 1 12:57:01 2002 From: eijkhout at cs.utk.edu (Victor Eijkhout) Date: Mon Apr 1 12:57:01 2002 Subject: How can I foreground an app? Message-ID: (With my apologies for that case of verbing in the subject :-) I'm writing an alarm clock. When the alarm goes off it would be nice if the app became foremost, so that the user could hit the Any Key to snooze the alarm. So how do I tell an app that's not foremost, or maybe even hidden to become foremost? -- Victor Eijkhout tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F) http://www.cs.utk.edu/~eijkhout/ From steve at messimercomputing.com Mon Apr 1 15:03:01 2002 From: steve at messimercomputing.com (Steve Messimer) Date: Mon Apr 1 15:03:01 2002 Subject: use-revolution digest, Vol 1 #304 - 4 msgs In-Reply-To: <200204011701.MAA05418@www.runrev.com> Message-ID: <4C0E2A23-45AB-11D6-84F5-000A27D75508@messimercomputing.com> On Monday, April 1, 2002, at 12:01 PM, use-revolution- request at lists.runrev.com wrote: > How does one get started exploring Revolution for CGI Scripts? I don't > see anything in the built-in documentation nor anything on the website. > > Thanks! > Mark > I'd be very interested in this topic as well. Thanks Steve From katir at hindu.org Mon Apr 1 15:32:01 2002 From: katir at hindu.org (Sivakatirswami) Date: Mon Apr 1 15:32:01 2002 Subject: Revolution for CGI Scripts In-Reply-To: <200204011701.MAA05409@www.runrev.com> Message-ID: on 4/1/02 7:01 AM, Mark Guzdial wrote: > How does one get started exploring Revolution for CGI Scripts? It's great you will love it... forget PERL. >I don't > see anything in the built-in documentation nor anything on the website. Yes, no documentation released: Here's the quick version.. assumes you have web space on a remote host in a virtual domain (i.e. your ISP/web host...) 1) get a UNIX friend to download and un tar the engine (you might have to get the engine from the Metacard site) you need for the platform you will be one... Solaris or whatever..have them FTP that to you using binary transfer... ( in my case, to our site and then I download to my Mac... be sure to use binary transfer) 2) Now, upload that engine to your cgi-bin on the site, set permissions to CHMOD 755... then take a look in your web master error logs and you will see the path that the server uses to point to files in your public_html directory. This may vary from server to server 3) then you put scripts on the site, in your CGI bin like this: #!/export/vhost/org/g/greatsite/www/public_html/cgi-bin/mc --where the above is the path to files in your home/public_html --and simply points to the MC engine you installed on startup set the directory to "../images" put random(49) into ArtNo put "taka_art_" &ArtNo&".gif" into nextArt put URL ("binfile:header_art/"&nextArt) into URL ("binfile:taka_header_art.gif") put "Done" into theResult put "Content-Type: text/html" & cr put "Content-Length:" && the length of theResult & cr & cr put theResult end startUp now, set the permissions CHMOD 755 for the above script also. fyi the above script takes a random image from a folder (all the same size of course) and copies it to another image... the html file that uses the image then has a different image in that same place. i.e. this is a daily rotation of an image on site. Here is another script that processes a simple subscription on a form and sends email off to subscribe the individual #!/export/vhost/org/g/greatwebsite/www/public_html/cgi-bin/mc on startup read from stdin until empty put urlDecode (it) into tDataIn split tDataIn by "&" and "=" put isWellFormedMailtoScheme (tDataIn ["email"]) into emailCheck switch emailCheck case "False" put badEmail(fixYourEmail) into tResponse break case "True" put tDataIn ["subscribe_mc"] into tRemit put tDataIn ["email"] after tRemit put "---Valid Web Subscription--" & cr before tRemit put "/usr/lib/sendmail -t" into mprocess open process mprocess for write write "From:" && "webmaster at hindu.org" & cr to process mprocess write "To:" && "mylistAdmin at someListServe.org" & cr to process mprocess write "Subject:" && "Subscriber to Master Course" & cr & cr to process mprocess write tRemit to process mprocess close process mprocess wait until the openprocesses is empty ## now we send an acknowledgement to the person by HTTP put url "file:../mc/subscr-mc_thankyou.shtml" into tResponse replace "***Subscriber***" with tDataIn ["email"] in tResponse end switch put "Content-Type: text/html" & cr put "Content-Length:" && the length of tResponse & cr & cr put tResponse end startup ##this function is a bit "hokey" but works ... new regEx expressions ## should make this easier now... but haven't had time to re-write it. function isWellFormedMailtoScheme email # return TRUE if email is a legal email URI, else return FALSE # We are not actually *validating* the email address, only its syntax. # Per address specification rules of RFC822: Standard for ARPA Internet Text Messages # http://www.w3.org/Protocols/rfc822/Overview.html # Basic syntax requires: one or more characters before the @ sign, split email by "@" if extents(email) <> "1,2" then return false # only 1 @-sign is permitted put email[2] into hostanddomain # There are 2 options to check, domain-literal or domain-logical: # domain-literal option: # primitive network host address form, must have [###.###.###.###] where 0 < # < 256 if char 1 of hostanddomain = "[" then if not last char of hostanddomain = "]" then return false delete char 1 of hostanddomain delete last char of hostanddomain set the itemDel to "." if the num of items of hostanddomain <> 4 then return false repeat with x = 1 to 4 if not isNumber(item x of hostanddomain) then return false if item x of hostanddomain > 255 or item x of hostanddomain < 1 then return false end repeat return TRUE end if # domain-logical option: (the "normal" form) # this permits an arbitrary number of strings separated by ".", ending in a domain name set the itemDel to "." put the num of items of hostanddomain into hostanddomainItems if hostanddomainItems = 0 then return false if hostanddomain contains ".." then return false # empty hosts not allowed repeat with x = length(hostanddomain) down to 1 if not ("0123456789.-abcdefghijklmnopqrstuvwxyz_" contains char x of hostanddomain) then return false end repeat return TRUE end isWellFormedMailtoScheme function badEmail put "There is a problem with your email address!"\ & "

Sorry,"\ & "there was something wrong in the way you entered your email.
"\ & "Please go back and enter it again. Thank you.

" into fixYourEmail return fixYourEmail end badEmail > Thanks! > Mark I also have a REV "gadget" that I keep all my cgi's in and I can upload them to site, set CHMOD automatically and then run them and "catch" and returned data in a field... for fast testing i.e. avoids the FTP Client/browser/Bbedit loop for your dev and testing. Hinduism Today Sivakatirswami Editor's Assistant/Production Manager katir at hindu.org www.HinduismToday.com, www.HimalayanAcademy.com, www.Gurudeva.org, www.hindu.org Read The Master Course Lesson of the Day at http://www.gurudeva.org/lesson.shtml From dsc at swcp.com Mon Apr 1 15:37:01 2002 From: dsc at swcp.com (Dar Scott) Date: Mon Apr 1 15:37:01 2002 Subject: MOD function does not work! So be warned! In-Reply-To: <843EA753-44F3-11D6-8C81-0050E4C0B205@swcp.com> Message-ID: <603C8FEE-45AF-11D6-B120-0050E4C0B205@swcp.com> Ian wrote, > put .1 * adjustment into increment On Sunday, March 31, 2002, at 03:06 PM, Dar Scott wrote: >> The problem is completely avoided. > > In general no. In the special case of mod 550, maybe. I'm wrong. Well, 99%. You are right, Ian. A very large class of computations will work OK by using signed whole numbers (less than 15 digits). You will want to make sure you don't let the error of a fraction sneak in. Revolution numbers represent integers (in the math sense) up to about 15 digits exactly. I apologize for the confusion. (A simple mental exercise: Imagine some arbitrary non-zero decimal number. Imagine that you convert it to binary. Imagine that you shift the binary point to the left, counting the bits you pass. Shift it to just to the right of the left-most bit that is a 1. Imagine that you cut off the portion to the right of the binary point beyond some number of bits corresponding to mantessa of the floating point number. Note that no ones are dropped off.) Y' know, a number improvement based on Ian's idea would be a lot more feasible than my idea of exact numerals (and applying numberFormat to calculations). Sorry about the error. As the great philosopher Michael Mays said, > What numbskull posted this?! Dar Scott From dsc at swcp.com Mon Apr 1 16:28:01 2002 From: dsc at swcp.com (Dar Scott) Date: Mon Apr 1 16:28:01 2002 Subject: Tentative Guidelines for Numbers Message-ID: <87697B0C-45B6-11D6-B120-0050E4C0B205@swcp.com> To make up for any confusion I helped create and to help contribute to easing the confusion about using Revolution numbers in general, I offer these guidelines on using Revolution numbers. This is based on my experience in computer representations of numbers and only a brief exposure to Revolution. Perhaps this can be a starting point that we can hack at to get something appropriate. 1. Signed whole numbers of up to 15 digits are represented exactly. If results of multiplication, addition and subtraction on numbers in this range are in this range, then the results are exact. Many cases of division and exponentiation are exact. Some other functions might give exact results. (This needs more exploration. Stronger statements about subtraction and exponentiation may be appropriate.) Use numbers in this range if exact results are important. Be careful not to corrupt your calculations with values outside this range. 2. Very large numbers (ignoring sign) or numbers with fractional parts might not be represented exactly. Errors in math functions on such numbers can accumulate. Also, adding a small number to a large number can cause information about the small to be lost and in the extreme case will not cause a change in the number. If you are adding a large number of numbers, consider starting with the smallest first. Avoid using = when you can. Use > or < for boundary conditions rather than =. In loops use the "repeat with" form and derive values for each iteration from the loop variable instead of incrementing numbers with fractions. Consider scaling arithmetic into a whole number range. 3. Equality for numbers is tolerant of small differences. Use = for numbers in 2 above only after a couple calculations. Accumulated errors may go outside of what = will consider equal. Use < or < before <= or >=. Use any before =. (Actually, I'm guessing about <= or >=. Some tests need to be run to see if they have the same tolerance as =.) 4. The underlying number representation is carried along in expressions and variables. A value might behave one way when used as a number and other when used as a string (sequence of characters). Not that ( n & empty ) will force representation to a string and apply numberFormat. For some values, ( n & empty) = n is false. If you can see a number (as a numeral), it has been converted to a string. You can use ( n & empty ) to round as defined in numberFormat. Use this, round() and truncate() as need when working with numbers in #2 above. 5. Some fractional numbers are exact, such as 0.5. Take advantage of this. 6. The range for bit functions and base conversion is more restricted than that in #1 above. 7. Very large and very exact numerals can be represented exactly as strings, of course. However, the results of math functions on those will be based on values with the limitations described above. I hope this helps. It needs corrections, additions, clarifications, detailing, wisecracks... Dar Scott From dsc at swcp.com Mon Apr 1 16:47:01 2002 From: dsc at swcp.com (Dar Scott) Date: Mon Apr 1 16:47:01 2002 Subject: Revolution for CGI Scripts In-Reply-To: Message-ID: <217D9178-45B9-11D6-B120-0050E4C0B205@swcp.com> On Monday, April 1, 2002, at 01:30 PM, Sivakatirswami wrote: > It's great you will love it... forget PERL. Cool! I am confused about a couple things, though. 1. Why is there no quit in your examples? 2. I thought put went to the message box. Why this instead of writing to stdout? 3. Does the stack need to be invisible? Other? If I'm really confused about Revolution and CGI, I hope these questions give some indication about where I am confused. Dar Scott From iansummerfield at btconnect.com Mon Apr 1 20:43:01 2002 From: iansummerfield at btconnect.com (Ian Summerfield) Date: Mon Apr 1 20:43:01 2002 Subject: How can I foreground an app? In-Reply-To: Message-ID: For Macintosh using you store the name of your app in the variable "theNameOfMyApp": Do "tell application " & quote & theNameOfMyApp & quote & " to activate" as applescript I don't think they will be a common solution to all platforms, but I could be wrong. I have a revolution program that keeps my FileMaker server in the foreground 24/7, well apart from certain hours where it quits it for backup and launches it again, I do the same thing with Firstclass servers. -i- On 1/4/02 6:56 pm, "Victor Eijkhout" scribed: > (With my apologies for that case of verbing in the subject :-) > > I'm writing an alarm clock. When the alarm goes off it would be nice > if the app became foremost, so that the user could hit the Any Key to > snooze the alarm. > > So how do I tell an app that's not foremost, or maybe even hidden to > become foremost? > -- > Victor Eijkhout > tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F) > http://www.cs.utk.edu/~eijkhout/ > _______________________________________________ > use-revolution mailing list > use-revolution at lists.runrev.com > http://lists.runrev.com/mailman/listinfo/use-revolution From iansummerfield at btconnect.com Mon Apr 1 20:44:00 2002 From: iansummerfield at btconnect.com (Ian Summerfield) Date: Mon Apr 1 20:44:00 2002 Subject: Digests, anyone? In-Reply-To: Message-ID: Try: http://lists.runrev.com/pipermail/use-revolution/ Don't know who's it is! On 1/4/02 11:19 am, "Geoff Canyon" scribed: > I'm hoping to assemble a complete archive of the list. I seem to recall that > someone has been saving all the archive files. I can make an FTP server > available, or just take them through email, whichever is easier. Specifically > I'm looking for digests 1 - 178 > > thanks! > -- > > regards, > > Geoff Canyon > gcanyon at inspiredlogic.com > _______________________________________________ > use-revolution mailing list > use-revolution at lists.runrev.com > http://lists.runrev.com/mailman/listinfo/use-revolution ---------------------------------- Ian Summerfield ICQ: 4378866 ---------------------------------- From iansummerfield at btconnect.com Mon Apr 1 20:48:01 2002 From: iansummerfield at btconnect.com (Ian Summerfield) Date: Mon Apr 1 20:48:01 2002 Subject: pasting objects In-Reply-To: Message-ID: I think it should be just "paste", I wasn't aware of paste having any parameters. "It" will contain the ID of the newly created object. On 29/3/02 3:01 pm, "Steve Messimer" scribed: > Hi, > > I am having problems writing a script that pastes an objects from a plug-in > to any other stack. > > When I do this the target button does get pasted but then an error message > pops up that aborts the remainder of the script. > > the problem code hilited by the debugger is ... > > paste btn bGOName > > here's the pertinent part of the script. > > -- creates new btn in destination stack > copy btn bGOName -- bGOName is a var that holds the name of the bGO > push card > open stack targetStack -- this is the topStack > go to card id targetCard -- the id of the current card of the topStack > paste btn bGOName -- this is the code that always invokes the debugger > -- I'm wondering if this problem is somehow related to the menu bar's > -- status even tho the Paste Objects menu item is active in the plug-in it > -- may not be in the tarrget stack. > >