[REBOL] recommend a REB friendly host Re:(4)
I know much more things than you about the server that host my site (thor.prohosting.com) because I wrote a CGI script that let me browse the filesystem of the server, and view the error log file of the server. But this didn't helped me. REBOL returns an error code of 1 or 2 when I remotely run it. I checked 3 times that I uploaded the BSDI version ("uname -a" says "BSD/OS thor.prohosting.com 3.1 BSDI BSD/OS 3.1 Kernel #0: Thu Jan 28 00:02:17 MST 1999 [EMAIL PROTECTED]:/usr/src/sys/compile/THOR i386"). It seems to me that thor.prohosting.com has a different configuration than your server :( (my home directory is in /usr/home where yours is in /usr/home2, for example). Olivier. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 04, 2000 1:03 PM Subject: [REBOL] recommend a REB friendly host Re:(3) Hi Olivier, login at http://freeadmin.prohosting.com/ then you'll get info on where exactly your pages are located. The following script works for me ... #!/usr/home2/tobeone/html/rebol/rebol -cs REBOL [ Title: "CGI Test Script" ] print "Content-Type: text/html^/" print compose [ HTML TITLE "CGI Info" /TITLE BODY pre (mold system/options/cgi) /pre /BODY /HTML ] I hope this helps, Ingo Those were the words of [EMAIL PROTECTED]: I'm interested in how you did it because I already have a Prohosting free account on thor.prohosting.com. I tried to upload rebol and a CGI script but it didn't work. Could you tell me in which directory you installed it, and send me a script that work ? Are you using a user.r file ? Olivier -- _ ._ ingo@)|_ /| _| _ We ARE all ONE www._|_o _ _ ._ _ www./_|_) |o(_|(/_ We ARE all FREE ingo@| |(_|o(_)| (_| http://www.2b1.de/Rebol/ ._| ._|
[REBOL] recommend a REB friendly host Re:(2)
I'm interested in how you did it because I already have a Prohosting free account on thor.prohosting.com. I tried to upload rebol and a CGI script but it didn't work. Could you tell me in which directory you installed it, and send me a script that work ? Are you using a user.r file ? Olivier - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 01, 2000 2:08 PM Subject: [REBOL] recommend a REB friendly host Re: Hi, it is possible to use the free web hosting service free.prohosting.com, you can run REBOL for BSDI there, though you have to upload it yourself. If you like the service, you can upgrade to their paid prohosting.com. Look at my test script at http://hammer.prohosting.com/~rebol/cgi-bin/cgitest.cgi -- Michal Kracik [EMAIL PROTECTED] wrote: recommend a REB friendly host Howdy Guys, Can someone point me to someone reliable who can host my domain? I think I remember some mention of Dreamhost.. I'd like it inexpensive, with cgi capabilities (of course) and, another of course, support the big bad REBOL. What do you guys use? thanks! -t
[REBOL] rebol and SSL Re:
The problem with REBOL and SSL is that REBOL can not yet download files using the HTTPS protocol (URLs that begin with https://). This is a problem if you want to develop a web client script that need to talk with a securised web server. But in your case you don't care because you are developping CGI scripts. This the job of the web server that hosts your CGI to do the SSL encryption/decryption to talk with the browser of the customer. Olivier. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 11, 2000 9:57 PM Subject: [REBOL] rebol and SSL Hi Folks, I've been developing a shopping basket system using several rebol scripts (partly based on the sid and cart scripts on rebol.org) but now it is partly working I came to the matter of sending a secure order with credit card numbers. Since rebol doesn't currently support SSL I'm not entirely sure about how it could be used for securely sending credit card details. I don't have a lot of knowledge about SSL servers so anyone got suggestions about how this can be implemented (without dropping it and having credit details sent seperately by e-mail/phone) ? All the best, Ed. -- _ \___ \ /\ / ___// ICQ: 34895924 | \ \\_/\_// __// TWF Home : http://www.worldfoundry.com/ |_ /__\/_// CEG Home : http://www.worldfoundry.com/ceg/ = The World Foundry LLC - Amiga PPC - Explorer 2260 - Maim Mangle SNH, SNH, SNH. -- (Terry Pratchett, Soul Music)
[REBOL] Money Trouble? Re:
Thanks for defending my cause ! I already posted some messages on this subject but I didn't found a so obvious sample to show the error of using binary when dealing with money. I'm lobbying for a decimal internal format for money! values, as in COBOL: REBOL and COBOL should have more than three letter in common ! Olivier. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, March 06, 2000 7:15 PM Subject: [REBOL] Money Trouble? Hi folks, Over the weekend I was playing with the REBOL money! datatype and discovered some problems. Using the REBOL/Core console: x: $10 == $10.00 y: x + .01 == $10.01 y - x == $0.00 ;surprising result, displayed value is not correctly rounded We can check what is happening by retreiving the decimal value from the money values: dx: second x == 10 dy: second y == 10.01 dy - dx == 9.79E-3 ;this is the actual numeric value of y - x, it should round to .01 The problem seems to be incorrect or absent rounding of the difference: to-money dy - dx == $0.00 Checking when to-money will return .01 vs .00: a: to-money "9.99934E-3" == $0.00 b: to-money "9.99935E-3" == $0.01 Clearly both of these values should round to $.01. There some other anomalies also: (y - x) * 1.01 == $0.00 (y - x) * 1.1 == $0.01 (y - x) * 10;displayed result is wrong by a factor of ten == $0.01 (y - x) * 100 ;displayed result is correct == $1.00 These problems are not due to the round-off intrinsic to decimal values. Even in the worst case we have 15 significant digits of precision. The example shows incorrect rounding in the 4th significant digit. I wonder whether others have noticed this problem? Note: this has been CC'd to feedback as a bug. Cheers Larry
[REBOL] REBOL international Re:(4)
What would be really interesting is to be able to do REBOL right to left in Arabic, Urdu or Sindhi. [l'empreinte Druck stampa impressão impresión] is all very well for all you LtoR types but what about the rest of the known world? Bruce. Ummm... all we are doing here is redefining the 'print' function word... I would think left to right has nothing to do with printing, only about how it is read after being printed. Actually, next I want to look at translating REBOL functions into Japanese Kanjii characters. Now THAT should be interesting. --Ralph Roberts Ummm... all we are doing here is redefining the words or the charaters of the language. What about parsing an other language (I mean grammar) ? ;) In fact it is one of the features of REBOL : parsing dialects. Olivier.
[REBOL] REBOL international Re:
- Original Message - From: [EMAIL PROTECTED] It does not necessarily take a lot to amuse me on a lonely Saturday afternoon. The following code is interesting. It shows a technique that lets you "internationalize" REBOL, allowing you to at least code the word "print" in six languages. Respectively: French, German, Italian, Portuguese, Spanish, and you should already realize that 'print' means, well, print in English.g set [l'empreinte Druck stampa impressão impresión] :print This would be better (I'm french) : set [ imprime Druck stampa impressão impresión] :print I don't know other languages. Not sure about the uppercase of the german word. In german uppercase at the beginning is for nouns. Remember that the words must be imperative form of verbs. Be sure to put the colon in front of the defined word you are translating so that it will not be evaluated. Have fun. --Ralph Roberts Olivier.
[REBOL] Rebol/Command and the kitchen sink Re:(2)
If I remember, MySQL has a TCP/IP interface. So it would be possible to create a mysql protocol scheme for REBOL. Olivier - Original Message - From: [EMAIL PROTECTED] [EMAIL PROTECTED] writes Personally, I'd like to do all of my web development in Rebol/Core, but it's looking like I'm going to need to create and access some MySQL databases. Now I can do that with PHP, but not Rebol/Core, and I have no idea when Rebol/Command is going to actually show up. Er, can you use PHP to gateway between Rebol and MySql? ( a Rebol script to read a PHP page, and post to a PHP form?
[REBOL] new proxy server and related problems ... Re:
Did you tried to delete %user.r and relaunch REBOL ? The setup will ask you the proxy settings. Olivier - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 03, 2000 10:54 AM Subject: [REBOL] new proxy server and related problems ... Hi, our company has new proxy server installed and I can't get trhu it with REBOL My Netscape settings are: http: proxy.sec.trz.cz port: 3128 No socks hosts setting is applied. how should I set my http scheme to let it work? The only one way of how to get thru is: port: open/lines tcp://proxy.sec.trz.cz:3128 con: insert port "GET http://www.rebol.com/ HTTP/1.0^M^J^M^J" wait con while [data: pick con 1][print data] close con This small test works, but read http://www.rebol.com hangs, and I can't find it combination of setting to make it work. Any help, please? Thanks, -pekr-
[REBOL] [BUG] unset! (and help function lie!) Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 28, 2000 3:41 AM Subject: [REBOL] [BUG] unset! (and "help" function lie!) Hi Olivier, you wrote: So unset! seems to be a datatype. Lets verify if unset! is a datatype : type? file! == datatype! type? unset! ** Script Error: unset! has no value. ** Where: type? unset! One of REBOL's most confusing issues is that representations of some values look exactly like the words they are assigned to. These values cannot be directly parsed by REBOL - first they are parsed to words, and then the word is evaluated. When you did: type? file! == datatype! REBOL first parsed the string you typed, "file!", to the word file!, and then when that word is used as the argument of TYPE? it is evaluated. The word FILE! is preset to the datatype! file!, which is the value that the function TYPE? sees. I had no problem with that. My point was that unset! is not preset to any value. [...] Now the problem with unset! is that there is no word set to the value unset! . This is easily fixed: unset: (type?) == unset! type? unset! == datatype! Of course. I should have thought to this. I put the paren around type? because if you do this in a script TYPE? will take the value of whatever is next, but the paren prevents TYPE? from seeing anything else. You also wrote: type? file! == datatype! help file! file! is word of value: file This not ok! It seems inconsistent, but this is the result of a REBOL trick. HELP has a special way of specifying its argument: I'm writing this kind of messages to [EMAIL PROTECTED] not to get a work-around, but for them to make it consistent while REBOL is still not widely spread. help: func [ "Prints information about words and values." 'word [any-type!] /local value args item refmode types ][ snip ] The argument is specified as a lit-word! (by using the ' ). This specifies that if the argument is actually a word, that word is to be unevaluated. Thanks for this explanation. Passing parameters as lit-word! is a very cool feature. That is, HELP wants to see the word itself, not what the word is set to. This way you can use HELP to test if a word is set to a value: help grog No information on grog (word has no value) Otherwise, trying to evaluate the word grog would result in an error before HELP even had a chance to see it. So, if you want to get help on the value that the word is set to, try this: help (file!) file! is datatype help file! file! is word of value: file Putting the word file! in a paren prevents HELP from seeing it as a word. So the paren is evaluated, the datatype! file! comes out, and HELP tells you that the datatype! file! is a datatype. We also get the same result with the following the ':' operator : help :file! file! is datatype This is what I expected from help file! (without using :) I just wanted that they modify the 'help' function to be more informative about datatypes. One other little issue here is that there are two ways of representing a value, forming and molding. Molding is better in that it gives you a string that REBOL can use to get back the original value, but forming is supposed to be easier on the eye. HELP forms the values, which is why you lose the ! 's. See you, Eric With all those good explanations on the heart of the language, it's now time for me to re-read the REBOL user guide from the beginning, to understand every feature. Thanks Eric.
[REBOL] Split-path correction Re:
From: [EMAIL PROTECTED] Hi, after having some problems with split-path, here is my version: (Andrew, it may be nice to have it in your %patch.r) Not yet, Andrew ! split-path: func [ { Splits a file or URL. Returns a block containing path and target. Not always. It has other bugs than the original. It breaks the splitting of URLs (I called your version split-path2) : split-path http://fgdfgdfg.Fgdfg/fgdfgdfg/dfgdfg == [http://fgdfgdfg.Fgdfg/fgdfgdfg/ %dfgdfg] split-path2 http://fgdfgdfg.Fgdfg/fgdfgdfg/dfgdfg == [http://fgdfgdfg.Fgdfg/fgdfgdfg/ dfgdfg] Overcomes some limitations of the Core split-path like strange results for: split-path %file.r split-path %dir/ split-path to file! "" The last expression can also be written like that : split-path %"" Moreover, the identity: file = (append copy first r: split-path file second r) is always preserved. Remember that you can have a look to the source of the original split-path to improve it : source split-path Olivier.
[REBOL] Split-path correction Re:(2)
Andrew Martin wrote: [EMAIL PROTECTED] wrote: split-path %file.r split-path %dir/ These ones, I feel, aren't a problem. The existing implementation of split-path is correct, I believe. There is a problem. Look at the type of the second element of the result : split-path %fdgd/file.r == [%fdgd/ %file.r] split-path %file.r == [%./ "file.r"] In one case it is a string!, in the other it is a file!. There is also others problems with the original split-path: split-path http://www.rebol.com == [http:// %www.rebol.com] split-path http://www.rebol.com/ == [http:// %www.rebol.com/] I would prefer to get == [http://www.rebol.com/ none] in both cases, as in the following: split-path %/ == [%/ none] To summarize, split-path is so inconsistent that I will never use the current version for real work. clean-path is as buggy (even more) : clean-path http://www/dfhfgh/../fghfgh == http://www/dfhfgh/../fghfgh (doesn't remove . and .. in URLs) clean-path %"" ** Script Error: Out of range or past end. ** Where: first target-copy What would be cool, in fact would be a reference test suite for every function of REBOL. Every Perl module provide such tests to assure consistence between platforms. It seems that Rebol (the company) doesn't use such methods to assure code quality. But it's not too late to take another way than Microsoft's. Olivier.
[REBOL] [BUG] unset!
Look at that : type? %f == file! type? == unset! So unset! seems to be a datatype. Lets verify if unset! is a datatype : type? file! == datatype! type? unset! ** Script Error: unset! has no value. ** Where: type? unset! But : type? type? %f == datatype! type? type? == datatype! So, is unset! a datatype! or not ? This also has an impact when using "mold" and "do" : do mold type? %f == file! do mold type? ** Script Error: unset! has no value. ** Where: unset! Olivier.
[REBOL] [BUG] help function lie!
Look at this : type? 'afgfgh == word! help 'afgfgh afgfgh is word This is ok. type? file! == datatype! help file! file! is word of value: file This not ok! Olivier.
[REBOL] .r to html monthly calendar prelude Re:(3)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 22, 2000 6:34 AM Subject: [REBOL] .r to html monthly calendar prelude Re:(2) Here is something more efficient : firstOfNextMonth: firstOfMonth/month: firstOfMonth/month + 1 == 1-Mar-2000 daysInMonth: firstOfNextMonth - firstOfMonth == 29 print [" There are " daysInMonth " days in " currentMonth now/year] Olivier Thanks for the elegant code above... run the following... an oddity occurs... You're right. There is something wrong in REBOL with the /month refinement of date values. Here is my test : d: now/date == 26-Feb-2000 d/day: 1 == 1-Feb-2000 d/day: 2 == 2-Feb-2000 d/day: 0 == 31-Jan-2000 d/day: -1 == 30-Jan-2000 d/month: 1 == 26-Jan-2000 d/month: 0 == 26-Apr-23845 d/month: -1 == 26-Mar-23845 Olivier.
[REBOL] WOW a rebol HTML calendar, please do % and criticize Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 22, 2000 3:59 AM Subject: [REBOL] WOW a rebol HTML calendar, please do % and criticize ; please run this and comment as you will :-) [...] Comment: { Thanks to bpaddock, olivier doleman, Donald Dalley, karin, rryost especially Olivier doleman for the slick date coding, and Donald Dalley and others on list who replied to my initial 'prelude to HTML post'. [...] I'm not "Olivier Doleman". My name name is "Olivier Mengué". And my nick name is "Dolmen". Olivier
[REBOL] .r to html monthly calendar prelude Re:(2)
The simple way, in REBOL, to convert the day-of-week integers, 0 to 6, to the corresponding strings, Sunday, Monday, etc is to create the block dowdb: [0 "Sunday" 1 "Monday" 2 "Tuesday" 3 "Wednesday" 4 "Thursday" 5 "Friday" 6 "Saturday"] then select dowdb 1 returns "Monday", etc. now/weekday returns a number in range 1 to 7 So here is the code to retrive the name of today : select [1 "Monday" 2 "Tuesday" 3 "Wednesday" 4 "Thursday" 5 "Friday" 6 "Saturday" 7 "Sunda y" ] now/weekday == "Sunday" Talking about dates, I posted yesterday to-gmt.r on rebol.org (it seems it is not yet published). Olivier
[REBOL] .r to html monthly calendar prelude Re:
REBOL [ Title: "day of the Week" Date: 18-Feb--2000 Author: "J B" Version: 1.0.0 Purpose: "Shows day of the week and number of days in months, it's a prelude to an HTML monthly calendar" ] This hader is wrong : remark the double '-' before the year. When I exec it the date displayed is : do %tmp.r Script: "day of the Week" (18-Feb-63536) Is it an y2k bug ? :^) print "The ify way to show today is " if now/weekday = 1 [print "Monday"] if now/weekday = 2 [print "Tuesday"] if now/weekday = 3 [print "Wednesday"] if now/weekday = 4 [print "Thursday"] if now/weekday = 5 [print "Friday"] if now/weekday = 6 [print "Saturday"] if now/Weekday = 7 [print "Sunday"] This is not the more efficient way to do that. print [" The switch way to show today is " switch now/weekday 1 ["Monday"] 2 ["Tuesday"] 3 ["Wednesday"] 4 ["Thursday"] 5 ["Friday"] 6 ["Saturday"] 7 ["Sunday"] ]; ends switch ]; ends print That is better. ; QUESTION there's go to be more elegant ways of getting the named day than this? print [newline "QUESTION there's go to be more elegant ways of getting the named day than the two ways I've shown here?" newline] Try this : print [" The switch way to show today is" select [ 1 "Monday" 2 "Tuesday" 3 "Wednesday" 4 "Thursday" 5 "Friday" 6 "Saturday" 7 "Sunday" ] now/weekday ]; ends print And this is the best : print [" The switch way to show today is" pick [ "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday" ] now/weekday ]; ends print ; convert the current month to words, save it. switch now/month [ 1 [currentMonth: "January"] 2 [currentMonth: "February"] 3 [currentMonth: "March"] 4 [currentMonth: "April"] 5 [currentMonth: "Mayo"] 6 [currentMonth: "June"] 7 [currentMonth: "Julio"] 8 [currentMonth: "Augusta"] 9 [currentMonth: "September"] 10 [currentMonth: "Octopus"] 11 [currentMonth: "Novice"] 12 [currentMonth: "Decent"] ] ; end switch of month currentMonth: pick [ "January" "February" "March" "April" "Mayo" "June" "Julio" "Augusta" "September" "Octopus" "Novice" "Decent" ] now/month firstOfMonth: now - now/day + 1 Here is an other way: firstOfMonth: now/date == 20-Feb-2000 firstOfMonth: firstOfMonth/day: 1 == 1-Feb-2000 ;figure out the number of days in this month and print monthInQeustion: now/month EOMtest: firstOfMonth + 27 [...] month: monthInQuestion while [month = monthInQuestion] [ EOMtest: EOMtest + 1 daysInMonth: EOMtest/day month: EOMtest/month ] ; ends code of while block ; go back one day for last day in month EOMtest: EOMtest - 1 daysInMonth: EOMtest/day Here is something more efficient : firstOfNextMonth: firstOfMonth/month: firstOfMonth/month + 1 == 1-Mar-2000 daysInMonth: firstOfNextMonth - firstOfMonth == 29 print [" There are " daysInMonth " days in " currentMonth now/year] Olivier
[REBOL] Precision in fractionnal numbers
I wrote before on the mailing list ([EMAIL PROTECTED]) about the importance of precision when manipulating money values. Money values are currently handled with floating point values stored in base 2. I'm trying to produce a sample of how this internal design might result in wrong results. I didn't found one yet with money values, but here is one with date values : d: now == 19-Feb-2000/18:43:56+1:00 d/time/second: 29.456 == 18:43:29.45599 This test was running on the Win32 platform. As you can see, the output is not the same as the input. This is due to the fact that the input (29.456) is converted from decimal to binary for storage, then from binary to decimal for output. One thing that too many programmers ignore is that conversion of fractionnal numbers may result in losing precision when converting from decimal to binary or from binary to decimal. For date value, I don't care because I don't plan to use so small values of time. But I repeat that precision is the most important thing when dealing with money values. Olivier Mengué
[REBOL] Computer date? Re:
Is there a way to get the date in -mm-dd format, without parsing the basic date? -- The following code may help to find the way... a: now == 15-Feb-2000/0:03:17+1:00 a/year == 2000 print join a/year [ "-" a/month "-" a/day ] 2000-2-15
[REBOL] problem with sort a file Re:(3)
When you read a line with read/lines, the result is a block of string!. So you are sorting string! "objects". What you have to do in fact is to split the string and convert the first member to date: Here is a sample : a: parse "1-Feb-2000 bla bla bla" none reduce [ to-date first a second a third a fourth a] I doesn't master Rebol enough yet to help you with the conversion of all the lines of the files and for sorting. Olivier. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 10, 2000 11:44 PM Subject: [REBOL] problem with sort a file Re:(2) Hi, Mike Thanks for your reply. I use /skip because I thought it is for sectional sorting. in my file, each record has 4 sections(e.g, 1-Feb-2000 bla bla bla). I just tried without skip, it gave me the same result though. I guess this is might because of I read it from a file? I use the following script and sample file, file: read/lines %foo.txt blk: make block! 100 blk: to-block file file2: sort blk write/lines %foo2.txt file2 which foo.txt is: 2-Feb-2000 1 2 1-Feb-2000 2 1 6-Feb-2000 3 5 24-Feb-2000 4 6 the result foo2.txt is: 1-Feb-2000 2 1 2-Feb-2000 1 2 24-Feb-2000 4 6 6-Feb-2000 3 5 It can't tell 24-Feb-2000 is larger than 6-Feb-2000. Why is it?
[REBOL] WebCam CGI script Re:(8)
I'm afraid that no free hosting service allows user CGI. If you find any, please let me know. free.prohosting.com. If you success in running Rebol cgi there, tell me how... Olivier