[REBOL] Re: more than one pain
That's great solution, thanks, now I can shorten some of my scripts by factor of 2 :-) Hi, It's just a workaround, and you surely know it... a: [x y] == [x y] b: 1x2 == 1x2 c: true == true c': a/:c == x b/:c' == 1 Or pick b c --- Ciao Romano -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes. --- Pøíchozí zpráva neobsahuje viry. Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz). Verze: 6.0.351 / Virová báze: 197 - datum vydání: 19.4.2002 --- Odchozí zpráva neobsahuje viry. Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz). Verze: 6.0.351 / Virová báze: 197 - datum vydání: 19.4.2002 -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Rebsite Anton is back up, at new location
Hi, Yes, I've moved to http://www.lexicon.net/anton/rebol/index.r I have updated the Rebol Desktop link to this as well. Desktop/Rebol.com/Sites/Anton There are some new scripts, some updated scripts and some broken stuff too that I need to clean up. Regards, Anton. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Wiki in Rebol, CGI Xitami
From: Andrew Martin But like every second language learning, the best start is true immersion and for REBOL I am in the bath up to the neck for the moment ... I'm just waiting for the shout of Eureka! :) Or, Ukiah!!! ;-) --Scott Jones -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL]
Hi all, I was very interested to the function launch (I didn't know it). But I didn't find enought documentation about it. Can someone tell me more about launch refiniments? (this function could be used to simulate a multiprocessing system!). thank you! --Alessandro-- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: make-doc-pro: Version 1.0.3 beta update
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Volker Nitsch Sent: Wednesday, June 05, 2002 11:40 PM To: [EMAIL PROTECTED] Subject: [REBOL] Re: make-doc-pro: Version 1.0.3 beta update instead of =url iam thinking about here you get all the nice stuff: http://rebol.com what do you think? Hi, this is OK if you want to include the link directly but how do you specify a text that should appear instead of the link than? Robert -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] percent! - new datatype request
percent! - new datatype request It would be nice to see a percent datatype. It could be based on a combination of the money! and decimal! datatype. percent! datatypes would look like: 100% 1.23% 0.456% I've send a copy to [EMAIL PROTECTED] Andrew Martin ICQ: 26227169 http://valley.150m.com/ -- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: percent! - new datatype request
hi, And with it you could do something like: 100 - 50% == 50 100 + 50% == 150 100 * 50% == 5000 Enjoy!! Ammon A short time ago, Andrew Martin, sent an email stating: percent! - new datatype request It would be nice to see a percent datatype. It could be based on a combination of the money! and decimal! datatype. percent! datatypes would look like: 100% 1.23% 0.456% I've send a copy to [EMAIL PROTECTED] Andrew Martin ICQ: 26227169 http://valley.150m.com/ -- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: percent! - new datatype request
To be consistent, 100 * 50% should give 5000%. Addition and subtraction between integer and percent types is ambiguous. What would you expect from 200 - 50% ? There are four different, but all, depending on your point of view, correct, possibilities. Just remember that % means per cent, or divided by 100. So 100% is not the same as 100. Not a bad idea overall, though. Regards, Anton. hi, And with it you could do something like: 100 - 50% == 50 100 + 50% == 150 100 * 50% == 5000 Enjoy!! Ammon A short time ago, Andrew Martin, sent an email stating: percent! - new datatype request It would be nice to see a percent datatype. It could be based on a combination of the money! and decimal! datatype. percent! datatypes would look like: 100% 1.23% 0.456% I've send a copy to [EMAIL PROTECTED] Andrew Martin -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: percent! - new datatype request
Hi Andrew, percent! - new datatype request It would be nice to see a percent datatype. It could be based on a combination of the money! and decimal! datatype. percent! datatypes would look like: 100% 1.23% 0.456% I've thought about that as well, but the best way I can see using them is in a dialect (add 5% to total). --Gregg -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: percent! - new datatype request
Am Donnerstag, 6. Juni 2002 20:35 schrieb Anton: To be consistent, 100 * 50% should give 5000%. should give 50. to-percent 100 * 50% should give 5000% Addition and subtraction between integer and percent types is ambiguous. What would you expect from 200 - 50% ? with-heavy-rabatt: $1999 - 30 % There are four different, but all, depending on your point of view, correct, possibilities. Just remember that % means per cent, or divided by 100. So 100% is not the same as 100. Not a bad idea overall, though. Regards, Anton. hi, And with it you could do something like: 100 - 50% == 50 100 + 50% == 150 100 * 50% == 5000 Enjoy!! Ammon A short time ago, Andrew Martin, sent an email stating: percent! - new datatype request It would be nice to see a percent datatype. It could be based on a combination of the money! and decimal! datatype. percent! datatypes would look like: 100% 1.23% 0.456% I've send a copy to [EMAIL PROTECTED] Andrew Martin nice idea :) next i want units :) -volker -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: percent! - new datatype request
hi, Thanks for the stimulating thoughts... I would personally expect to see the output data type be the same as the *first* argument. I find that to be more consistent within REBOL (i.e. try appending a path to a block, now a block to a path) so if you have an integer and you subtract, add, divide it should affect the integer not the percent. and if you are dealing with a number besides 100, it should be as you said, per cent example: 200 - 50% == 100 500 + 100% == 1000 100 - 75% == 250 After all, if you don't evaluate it that way, you have lost the advantage that you get from the datatype, or at least the most obvious reason that I can see (what did you have in mind to use it for Andrew?). Give me a point of view that would logically result in a different result than I have given. (I am often too blind to the things around. ;-) and while you are at it, please explain why 100 * 50% would result in a percent! rather than an integer. Thanks!! Ammon A short time ago, Anton, sent an email stating: To be consistent, 100 * 50% should give 5000%. Addition and subtraction between integer and percent types is ambiguous. What would you expect from 200 - 50% ? There are four different, but all, depending on your point of view, correct, possibilities. Just remember that % means per cent, or divided by 100. So 100% is not the same as 100. Not a bad idea overall, though. Regards, Anton. hi, And with it you could do something like: 100 - 50% == 50 100 + 50% == 150 100 * 50% == 5000 Enjoy!! Ammon A short time ago, Andrew Martin, sent an email stating: percent! - new datatype request It would be nice to see a percent datatype. It could be based on a combination of the money! and decimal! datatype. percent! datatypes would look like: 100% 1.23% 0.456% I've send a copy to [EMAIL PROTECTED] Andrew Martin -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] UDP source port while doing broadcast
HIya All.. Had to take cover for some weeks and now im back on the rebol scripting again.. I hope someone had the answer because until now i was unable to set the source-port when doing a broadcast on UDP.. * Does rebol allow to set a source port for tcp/udp ? * If yes.. Does rebol check the availebility of the port? ( i have seen the rebol crew changed server port handling in the beta release of the /core ) Thanks in advance.. (R)egards, Norman -- dinner/conversation: How do you eat your Rebol in the morning? -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] pre 2.6 release information
Hiya All, Is there or has there been some pre-release information on the 2.6 /core version already? I have seen the beta document (forgot the html link :-( (R)egards, Norman -- dinner/conversation: How do you eat your Rebol in the morning? -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: percent! - new datatype request
nice idea :) next i want units :) -volker Units! please do not take this as an insult, but you think like me...;-) Boyles law: 3 bar * 4 liters = 4 bar * 3 liters ;I'll drink to that!! ; need a balanced-equation style, hmmmn? Steve Shireman PS. Cole's law = thinly sliced cabbage -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: pre 2.6 release information
Is there or has there been some pre-release information on the 2.6 /core version already? I have seen the beta document (forgot the html link :-( Here's the link: http://www.rebol.com/beta-versions.html 2.6 hasn't been officially released yet. --Gregg -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: IS REBOL object oriented?
--- Volker Nitsch [EMAIL PROTECTED] wrote: so why should rebol implement a more and more deprecated feature? ;) I wasn't saying it should, just that it might be a difference that someone whose expectations were formed by C++. __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: client script to measure server performance: ideas ?
Hiya... Im not quite sure what your searching for? Server performance on HTML commands? of protocol speed? or even rebol read speed? (R)egards, Norman. I tried it myself, but my results didn`t quite jive. They were much slower than expected. I believe it was because i was reading the pages. I think a better methodology would be to send a request for a page but not to process it. Instead of trying to spawn new processes inside of REBOL I did an shell script to repeatly call REBOL on the command line with a script. I`m willing to work with you to develop a better way. Anyone else got a better idea ? - Original Message - From: jose [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 05, 2002 10:58 AM Subject: [REBOL] client script to measure server performance: ideas ? What I would like to do is to spawn multiple rebol processes that try to read a page from a local Apache server. If I can control the number of processes to spawn using launch and measure the response time of each read then I could measure the server's response time as a function of the number of simultaneous reads. Does anybody have any ideas or experience using launch ? What is the launch/link url for ? Thanks Jose -- dinner/conversation: How do you eat your Rebol in the morning? -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: parsing html : is this correct ?
I thought the bug was in parse, not remove because I tested this without the remove, just checking how 'parse iterates over the text string After looking at your example I'm quite confused, I think more people have to see this before it's a bug. We need to be missing something otherwise this would be a significant bug ! --- Anton [EMAIL PROTECTED] escribió: Jose, Well done, you have discovered a bug in 'parse, I think. (It could also be 'remove ?). The following script shows the problem. Note that html and html2 are different by one character, the 'x' (although it doesn't seem to matter which character it is, just the length of the string.) html: {script --/scriptscriptI should be removed/script} html2: {script ---x---/scriptscriptI should be removed/script} html rule: [ any [ (print ~~~ any block ~~~) to script mark1: (?? mark1) thru /script mark2: ( ?? mark2 remove/part mark1 mark2 ?? mark1 ) :mark1 (?? mark1) ] to end ] parse/all html rule prin ^/ parse/all html2 rule prin ^/ ?? html ?? html2 halt I would like to analyse this further before making a bug report to feedback. Better to have more information. Anybody have any comments about this? Anton. I've checked the HTML manually and the sequence of tags is proper set of 1. script ... /script and then an orphan (unnoticed by browsers) 2. /script and finally 3. script ... /script The parsing stops just before the orphan /script, which I don't understand . The rule should go beyond 2 ! You can check the real html at http://www.abc.es Thanks --- Anton [EMAIL PROTECTED] escribió: Jose, Your parse rule looks fine to me. I tested out your parse rule with long strings of matching script/script pairs, but I didn't see any problems. I would ask you to look at your input more carefully. Maybe there is something in there that tricks this rule. Do this: - Save a copy of your input. - Cut selected pieces out of your input so that it still breaks your rule. Save each time. - When you can't cut any more out, look at what you have left, and if you can't figure it out, post the input here and we can have a look. Anton. I use the following parse code to remove scripting from the html before I do other parsing. This seems to work fine for all pages, but I just found a page with lots of script tags and it only removes the first 86 and leaves the last one. What am I doing wrong ? Thanks Jose --- parse/all html [ any [ to script mark1: thru /script mark2: (remove/part mark1 mark2) :mark1 ] to end ] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes. ___ Copa del Mundo de la FIFA 2002 El único lugar de Internet con vídeos de los 64 partidos. ¡Apúntante ya! en http://fifaworldcup.yahoo.com/fc/es/ -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: utf8-encode
R nobody has utf8-encoder? R probably will have to write one by myself ok... why there is NO native right/left shift function in Rebol?! here is how utf8 works: putwchar(c) { if (c 0x80) { putchar (c); } else if (c 0x800) { putchar (0xC0 | c6); putchar (0x80 | c 0x3F); } else if (c 0x1) { putchar (0xE0 | c12); putchar (0x80 | c6 0x3F); putchar (0x80 | c 0x3F); } else if (c 0x20) { putchar (0xF0 | c18); putchar (0x80 | c12 0x3F); putchar (0x80 | c6 0x3F); putchar (0x80 | c 0x3F); } } and here is my Rebol version: rebol [ title: UTF-8 encode purpose: {Encodes the string data to UTF-8} author: oldeS email: [EMAIL PROTECTED] date: 7-Jun-2002/0:03:27+2:00 usage: { utf8-encode czech chars: ìèøýáíé == czech chars: ìÂèøÂýáÃé} comment: {More info: http://czyborra.com/utf/ } ] shift: func [ Takes a base-2 binary string and shifts bits data [string! binary!] places [integer!] /left /right ][ data: enbase/base data 2 either right [ remove/part tail data negate places data: head insert/dup head data #0 places ][ remove/part data places insert/dup tail data #0 places ] return debase/base data 2 ] utf8-encode: func[ Encodes the string data to UTF-8 str [any-string!] string to encode /local c ][ str: to-binary str forall str [ if #{79} c: to-binary to-char first str [ remove str insert str join (#{c0} or shift/right c 6) (c and #{3F} or #{80}) str: next str ] ] to-string head str ] -- do [send to-email join 'oliva [EMAIL PROTECTED] BESsssT REgArrrD, RebOldes] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: percent! - new datatype request
And with it you could do something like: 100 - 50% == 50 100 + 50% == 150 100 * 50% == 5000 Shouldn't that be 100 - 50% == 50% 100 + 50% == 150% 100 * 50% == 5000% and thus rate: 8.25% == 8.25% price: $100.00 == $100.00 tax: price * rate == $8.25 taxrate: to-percent [$8.25 / $100] == 8.25% ?? ./Jason -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: to block! or to-block
Why are there specific functions for converting datatypes? Isn't 'to good enough? Same deal as make function! I suspect. Common usage patterns (eg. does, has, func, function) have shortcuts. I also think: to-string 1 is inherently less complex than to string! 1 if only because you deal with one less word and don't have to use shift when typing! ;). I also find that word value pairs come more naturally. But hey, use whatever you feel more comfortable with (the old PERL adage of TMTOWTDI - There's More Than One Way To Do It - applies equally well to REBOL!). Regards, Ashley -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: to block! or to-block
Hi Ammon, I think, that to-datatype functions are relics from old times, when the TO function didn't exist. I see no compelling reason for using them. Cheers -L - Original Message - From: Ammon Johnson Hi, Why are there specific functions for converting datatypes? Isn't 'to good enough? are there performance differences, or evaluation differences? Any insight anyone? Joel, could you run some benchmarks to see if there is a difference that way? I generally use 'to block! in my code rather than to-block, and I began to wonder what the reason for making the 'to-datatype functions is. Any thoughts are always helpful to get my poor little mind out of its shelter. ;-) Thanks!! Ammon -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] utf8-encode
Hello rebol-list, nobody has utf8-encoder? probably will have to write one by myself -- do [send to-email join 'oliva [EMAIL PROTECTED] BESsssT REgArrrD, RebOldes] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: parsing html : is this correct ?
Hi Anton, Well done, you have discovered a bug in 'parse, I think. (It could also be 'remove ?). html: {script --/scriptscriptI should be removed/script} html2: {script ---x---/scriptscriptI should be removed/script} html rule: [ any [ (print ~~~ any block ~~~) to script mark1: (?? mark1) thru /script mark2: ( ?? mark2 remove/part mark1 mark2 ?? mark1 ) :mark1 (?? mark1) ] to end ] parse/all html rule prin ^/ parse/all html2 rule prin ^/ ?? html ?? html2 halt The problem is given by the interaction of remove with parse, but it is not a bug. At every match, parse remember the position at which the parsing process arrived, in your example this position is exactly mark2. When you remove at least 1 + length? mark2 chars, starting from mark1, you put mark2 (and the internal parse position index) beyond the end of the string, like happens in this simulation: mark1: 123 mark2: next mark1 remove/part mark1 1 + (length? mark2) mark2 == ** Script Error: Out of range or past end When parse restarts, it check its internal index position and sees it is beyond the end of the string, so it stops and does not execute your :mark1 command. You must be sure that the position of parse is not beyond the end of the string. You can do something like this to fix the problem: html rule: [ any [ (print ~~~ any block ~~~) to script mark1: (?? mark1) thru /script mark2: :mark1 ;go back to mark1 before removing chars ( ?? mark2 remove/part mark1 mark2 ?? mark1 ) (?? mark1) ] to end ] In our example we put the parse internal position index to the mark1 position before removing chars and not after. So we can be sure not to invalidate the internal position index of parse. --- Ciao Romano -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: parsing html : is this correct ?
That is a good explanation, Romano. Rebol's parse holds strong against my doubt. Anton. The problem is given by the interaction of remove with parse, but it is not a bug. At every match, parse remember the position at which the parsing process arrived, in your example this position is exactly mark2. When you remove at least 1 + length? mark2 chars, starting from mark1, you put mark2 (and the internal parse position index) beyond the end of the string, like happens in this simulation: mark1: 123 mark2: next mark1 remove/part mark1 1 + (length? mark2) mark2 == ** Script Error: Out of range or past end When parse restarts, it check its internal index position and sees it is beyond the end of the string, so it stops and does not execute your :mark1 command. You must be sure that the position of parse is not beyond the end of the string. You can do something like this to fix the problem: html rule: [ any [ (print ~~~ any block ~~~) to script mark1: (?? mark1) thru /script mark2: :mark1 ;go back to mark1 before removing chars ( ?? mark2 remove/part mark1 mark2 ?? mark1 ) (?? mark1) ] to end ] In our example we put the parse internal position index to the mark1 position before removing chars and not after. So we can be sure not to invalidate the internal position index of parse. --- Ciao Romano -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: percent! - new datatype request
Yeah, look - we're arguing already. :) But, I remember, to be consistent, shouldn't the second datatype be converted to the first before the operation takes place ? So, 100 - 50% == 50 ; as first stated I suppose 50% - 100 == -50% ; ? or should be illegal? And 50% * 100 == 5000% 100 * 50% == 50 And with it you could do something like: 100 - 50% == 50 100 + 50% == 150 100 * 50% == 5000 Shouldn't that be 100 - 50% == 50% 100 + 50% == 150% 100 * 50% == 5000% and thus rate: 8.25% == 8.25% price: $100.00 == $100.00 tax: price * rate == $8.25 taxrate: to-percent [$8.25 / $100] == 8.25% ?? ./Jason Uh oh, so to-percent involves an implicit multiplication by 100, then? Looks nice, though. Anton. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Fw: percent! - new datatype request
The email I received from Carl. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -- - Original Message - From: Carl Sassenrath [EMAIL PROTECTED] To: Andrew Martin [EMAIL PROTECTED] Sent: Friday, June 07, 2002 9:13 AM Subject: Re: percent! - new datatype request Hi Andrew, Yes, that one has been on the top of my list for a couple years. I noticed that there was room in the REBOL lexicon for the N% form, and I wanted it for use in VID face specifications. What's prevented it so far has been the issue of how to deal with precision on it. I've not had the time to deal with those issues. -Carl At 6/7/02 04:18 AM +1200, you wrote: percent! - new datatype request It would be nice to see a percent datatype. It could be based on a combination of the money! and decimal! datatype. percent! datatypes would look like: 100% 1.23% 0.456% Andrew Martin ICQ: 26227169 http://valley.150m.com/ -- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: make-doc-pro: Version 1.0.3 beta update
Robert wrote: ...this is OK if you want to include the link directly but how do you specify a text that should appear instead of the link than? Something like this: My web site http://valley.150m.com/. which converts to: My [a href=http://valley.150m.com/]web site[/a]. I've changed the tags to square brackets. It works for my eText dialect, which converts plain text to HTML. Have a look at my site where there's lots and lots of examples of it at work. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: I need help...
...to make a simple browser, because I don't know how to parse. here's the basic idea: 1. Parse all HTML tags out of the page 2. Change IMG tags to the REBOL/View version, image. 3. List all links in a menu at the top, with the ability to click on it to go to the link. 4. Possibly an address bar. I had seen something like this a long time ago, but I can't find it now. Is there something wrong with your internet browser? :) You can get them from Microsoft, Netscape and other places. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: percent! - new datatype request
I'm coming in to this discussion a little late, but here's the way I, personally, would see it. 100 - 50% == 50 ; as first stated This, to me, would equate to: 100 - (100 * .50) == 50 Similarly: 200 - 50% == 200 - (200 * .5) == 100 I suppose 50% - 100 == -50% ; ? or should be illegal? I don't think you could really do that, because just what is that 50% *of*? Perhaps 50% - 100% .. And 50% * 100 == 5000% 100 * 50% == 50 An interesting thought. Should 100 + 50% == 100 + (100 * .5) and 100 * 50% == 100 * .5 ? 50% * 100, though.. I can see where that would be believable. :/ Shouldn't that be 100 - 50% == 50% Not necessarily. It'd be 100 minus 50% of 100, which is 50. Otherwise, you should stick with 100% - 50% = 50%.. and thus rate: 8.25% == 8.25% price: $100.00 == $100.00 tax: price * rate == $8.25 Precisely; the datatype of the first value, the value upon which the percent is being acted, should be the returned datatype. No? taxrate: to-percent [$8.25 / $100] == 8.25% to-percent on type block! ? I don't see why. Use parens, perhaps, if you feel the need, but traxrate: to-percent $8.25 / $100 should be fine. Results in (8.25E-2 * 100), more or less. Some related, interesting behavior. You can do money! + money!, money! - money!, money! / money!, but not money! * money!. Heh. money! / money! results in number!. (I like how integer! and decimal! values all fall under the category number! .. workes nicely.) --Charles -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Fw: percent! - new datatype request
There's always the matter that the list can take up a large part of the thought and discussion on this matter, formulate a nice proposal, submit the proposal to the list with RFC, and once people are generally satisfied, submit the final draft to RT. Save Carl some headache ;) The email I received from Carl. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -- - Original Message - From: Carl Sassenrath [EMAIL PROTECTED] To: Andrew Martin [EMAIL PROTECTED] Sent: Friday, June 07, 2002 9:13 AM Subject: Re: percent! - new datatype request Hi Andrew, Yes, that one has been on the top of my list for a couple years. I noticed that there was room in the REBOL lexicon for the N% form, and I wanted it for use in VID face specifications. What's prevented it so far has been the issue of how to deal with precision on it. I've not had the time to deal with those issues. -Carl At 6/7/02 04:18 AM +1200, you wrote: percent! - new datatype request It would be nice to see a percent datatype. It could be based on a combination of the money! and decimal! datatype. percent! datatypes would look like: 100% 1.23% 0.456% Andrew Martin ICQ: 26227169 http://valley.150m.com/ -- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.