[REBOL] Big number calculations
Ok obviously REBOL has limitation with very big numbers. However, with the kind of calculations I want to make alot of software will have limitations. I'm looking to pick some brains for an alternative to scientific notation. I like scientific notation as it represents large numbers in a compact manner however; in my case, I have large numbers and want to represent a very large number in the smallest footprint possible. Scientific Notation doesnt acheive that with the type of numbers I will be calculating. Any mathmatics gurus have any ideas? References to where I can find out about the notations would be helpful also. Paul Tretter -- Pop3Now Personal, Manage 5 Email Accounts From 1 Secure Window Sign Up Today! Visit http://www.pop3now.com/personal -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: /View as a Product
Elan, I agree, that is why in a later email in regard to responses like yours I thought it would be nice to separate the functionality of /Core and /View maybe via a switch that could unset most of the /View components (bear with me) so that /View is started with for example "rebol.exe -c" which would basically be /Core functionality for cgi applications. Either way I was just trying to express what I still feel is the future of /View. Hi Paul, Chris, Chris wrote: Paul Tretter wrote: /View that way RT makes profits off of /View scripts that customers want to distribute. After all /View is the product that most users will want to distribute their scripts in the Runtime format. And what of those who just use Rebol for ci-scripting and the like? It is important to keep the overhead of the interpreter for such scripts to a minimum or the delay while loading, decompressing and starting the interpreter will affect response times. 1. Can /View start up without XWindows libraries being present on the hosting machine? 2. Can it reasonably be assumed that most Linux (xxxBSD) Web hosting machines on the net will have XWindows libs installed (what for?). If the answers to 1. and 2. are both "No" then in IMHO it is not feasible to use /View as a CGI interpreter. /View would have to be able to determine if the required XWindows libs are available, and, if not, start up in /Core mode without attempting to load XWin libs, to be useful as a CGI Interpreter. Take Care, Elan -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes. -- Pop3Now Personal, Manage 5 Email Accounts From 1 Secure Window Sign Up Today! Visit http://www.pop3now.com/personal -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] HEX to-binary!
I am trying to do some cool stuff with file data. However I am have troubles :( What I want to do take data that was extracted from binary for example - file1: read/binary %somefile.??? file2: reform file1 which is now in a string format so that I have the hex data. I want to manipulate the data and put it back into binary so that I see the same hex again when I read the file. How do I do that? It seems I keep trying things and not getting the original look of the original file1 with my changes. Any help? Paul Tretter -- Pop3Now Personal, Manage 5 Email Accounts From 1 Secure Window Sign Up Today! Visit http://www.pop3now.com/personal -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Undocumented function
Hi fellow REBOLers!, I was looking at the functions included with REBOL/view and possibly /Core as well. One function that was particularly interesting was the GET-NET-INFO function. The help for the function says undocumented. Clearly the source of the function seems to indicated that its setting some values based on data gathered from the windows registry. Of particular interest was the get-value function which was being used to get values from registry keys. Does anyone have more information on this function? Paul Tretter -- Is your email secure? http://www.pop3now.com (c) 1998-2001 secureFront Technologies, Inc. All rights reserved. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] objects without overhead Re:(4)
Once an object is made you can use "make (ancestor oject)!" on that new object to create your new objects. At least if I remember correctly from the RTOG. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 18, 2000 7:23 AM To: [EMAIL PROTECTED] Subject: [REBOL] objects without overhead Re:(3) Hi, Rishi, [EMAIL PROTECTED] wrote: state: make object! [ new: func [ puzzle [block!] ][ return make object! [ puz: copy reduce puzzle get-puzzle: :get_puzz ] ] get_puzz: does [return copy puz] test-obj: new [1 2 3 4 0 5 6 7 8] print test-obj/get-puzzle ] [snip] I don't understand why get-puzzle cannot access word 'puz. Look at the following (awful ASCII art) diagram, which shows the contexts and references of the various names involved: (global) | +--...--+ | | state==(object!) (etc) | ++---+ || | new |test-obj==(object!) || | puzzle |+--+ || | get_puzz==get-puzzle puz As the above code is being evaluated, look at the contexts that are established, and the words they contain. Context for...Contains words - (REBOL global)'state (along with whatever else was there) STATE 'new 'get_puzz 'test-obj (the object's "members") NEW 'puzzle (the function's argument) Now, the next-to-last line inside STATE makes 'test-obj (in the context of STATE) refer to a newly-created object which has the following context: TEST-OBJ 'get-puzzle 'puz Here's the critical issue: TEST-OBJ refers to an object whose component GET-PUZZLE refers to the *value* of GET_PUZZ, which contains words defined *in the context of its own definition* and in that context, *there is no 'puz*. Remember that 'puz is defined in the context of the object to which TEST-OBJ now refers, but *not* in the context of STATE. If you'll pardon the anthropomorphism, TEST-OBJ knows both GET-PUZZLE and PUZ, and introduced GET-PUZZLE to GET_PUZZ, but nobody ever introduced GET_PUZZ to PUZ. What you were trying to do would only have succeeded if REBOL used "dynamic scoping" such as Lisp or xBase use, in which new variables are added to the global "environment" and are visible to everyone after (chronologically!!!) the point of definition. REBOL contexts don't behave that way. Hope this helps! -jn-
[REBOL] Dispatch
Allen, I looked at Dispatch but have some questions regarding it. Is this a replacement for wait or used in conjunction with wait. If used also with wait then I have a question on the wait command. Take for example the following from the docs concerning wait on multiple ports: The wait function will return the port that is ready or none if the timeout occurred. ready: wait [port1 port2 10] if ready [data: copy ready] The above example will read data from the first ready port if a timeout did not occur. In this case how would you get data for a RESPECTIVE port. I may want to distinguish between data coming from port1 apart from port2. In the case above the word "ready" will contain data from either port and I want be able to determine which port the data came from. The help for dispatch is: help dispatch USAGE: DISPATCH port-block DESCRIPTION: Wait for a block of ports. As events happen, dispatch p ort handler blocks. DISPATCH is a function value. ARGUMENTS: port-block -- Block of port handler pairs (port can be timeout too). (Type: block) It would appear by the description for dispatch that it replaces the wait command. Also the souce for dispatch includes the wait command which further makes me suspect that is the case - source: dispatch: func [ {Wait for a block of ports. As events happen, dispatch port handler blocks.} port-block [block!] {Block of port handler pairs (port can be timeout too).} /local ports awake timeblk result ][ ports: copy [] foreach [port job] port-block: reduce port-block [ if any [number? port time? port] [if none? timeblk [timeblk: :job]] append ports port ] forever [ either awake: wait/all ports [ if foreach item awake [ set/any 'result do select port-block item item if all [value? 'result 'break = :result] [break/return true] ] [break] ] [do :timeblk] ] ] The only data on dispatch from the new /core docs is: You can also use the dispatch function to evaluate a block or function based on the results of a wait on multiple ports. dispatch [ port1 [print "port1 awake"] port2 [print "port2 awake"] 10 [print "timeout!"] ] Obviously this leaves me scratching my head waiting for the "?" to appear above my head. Any clarification you can provide. I have successfully implemented client and server but now wish to use one script to open different ports and monitor for different data on those ports. Paul Tretter
[REBOL] Port probing Re:(2)
Thanks Holger for the great feedback. I am gonna test this shortley to see if it accomplishes what I'm trying to do. I will post to the list what I find. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, October 16, 2000 10:42 PM To: [EMAIL PROTECTED] Subject: [REBOL] Port probing Re: On Mon, Oct 16, 2000 at 10:12:13PM -0500, [EMAIL PROTECTED] wrote: If I have to ports that I wait for data on how can I put them in a while or forever loop without locking up the console. If I had a if statement testing data received. That depends on the type of port and the version of REBOL you use. Assuming tcp, udp or serial ports opened with /direct, you can wait for multiple ports with wait [port1 port2] which returns one of the ports if it has data, none otherwise. To get a block of all ports returned instead of just a single port use wait/all (latest experimental version only). To just poll ports without blocking add a timeout of zero, i.e. try wait [port1 port2 0] Using a timeout of zero to poll only works with some old (pre-2.3) versions of REBOL (on some platforms) and with the latest experimental versions (on all platforms), but not with REBOL 2.3. Other types of ports currently do not support 'wait. Higher-level network ports (HTTP etc.) will probably support it in one of the next experimental versions, when opened with /direct. You may also want to look at the no-wait refinement for 'open. It guarantees that 'copy on a port never blocks, even if there is no data available on it (latest experimental version only). -- Holger Kruse [EMAIL PROTECTED]
[REBOL] Port probing Re:(2)
How do you open a console as a port? Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, October 16, 2000 11:41 PM To: [EMAIL PROTECTED] Subject: [REBOL] Port probing Re: If I have two ports that I wait for data on how can I put them in a while or forever loop without locking up the console. If I had a if statement testing data received. How about opening the console as a port and include it in your wait? You'll need to check after the 'wait, to see if the event was a key or stuff from your other ports. Andrew Martin Turning it all inside out... ICQ: 26227169 http://members.nbci.com/AndrewMartin/ --
[REBOL] Port probing Re:(2)
I tried play with this with this script while opening another console and inserting to those ports. I got no expected output. The core docs need to be updated to explain listening on more than one port. REBOL[] port1: open tcp://:55 port2: open tcp://:56 while [true][ wait [port1 port2 0] buffer1: first port1 buffer2: first port2 print buffer1 print buffer2 ] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, October 16, 2000 10:42 PM To: [EMAIL PROTECTED] Subject: [REBOL] Port probing Re: On Mon, Oct 16, 2000 at 10:12:13PM -0500, [EMAIL PROTECTED] wrote: If I have to ports that I wait for data on how can I put them in a while or forever loop without locking up the console. If I had a if statement testing data received. That depends on the type of port and the version of REBOL you use. Assuming tcp, udp or serial ports opened with /direct, you can wait for multiple ports with wait [port1 port2] which returns one of the ports if it has data, none otherwise. To get a block of all ports returned instead of just a single port use wait/all (latest experimental version only). To just poll ports without blocking add a timeout of zero, i.e. try wait [port1 port2 0] Using a timeout of zero to poll only works with some old (pre-2.3) versions of REBOL (on some platforms) and with the latest experimental versions (on all platforms), but not with REBOL 2.3. Other types of ports currently do not support 'wait. Higher-level network ports (HTTP etc.) will probably support it in one of the next experimental versions, when opened with /direct. You may also want to look at the no-wait refinement for 'open. It guarantees that 'copy on a port never blocks, even if there is no data available on it (latest experimental version only). -- Holger Kruse [EMAIL PROTECTED]
[REBOL] Ports and system scaling ... Re:
Could someone post a sample script of two ports listening as with all do respect to Holger I just dont get it. I tried different ideas and can't seem to understand how. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 17, 2000 1:27 PM To: [EMAIL PROTECTED] Subject: [REBOL] Ports and system scaling ... Hi, I would like to ask about possibility of REBOL system scalling. Let's assume following scenario: ... main rebol session running script similar to Sterling's reb-proxy.r. The script is storing connections in the block, running in loop and serving new connection. But - current aproach doesn't scale - how much connections is REBOL able to handle in one session? Maybe better question is - how much connection is effective to be handled by one task? Now probably the most fundamental question comes - is ti possible to launch new REBOL session (it is currently possible with 'launch function and will be possible in future by planned rebol multitasking capabilities) and send new session the connection to handle? E.g. - start new rebol session for each incoming 10 connections. Just curious, Thanks, -pekr-
[REBOL] Multiple Ports
How do you listen on multiple ports and get data from them both. I tried wait [port1 port2] but it freezes up.
[REBOL] Parsing hostnames
How do you parse a hostname only to return the first portion. For example: hoststring: rebol.dyndns.org I would only want to return the portion up to the first "." which would be "rebol" in this case. Paul Tretter
[REBOL] Parsing hostnames Re:(2)
Very cool. I didnt know you could use first in that manner. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, October 16, 2000 10:14 AM To: [EMAIL PROTECTED] Subject: [REBOL] Parsing hostnames Re: At 01:33 PM 14/10/00 -0500, you wrote: Try this: hoststring: "rebol.dyndns.org" == "rebol.dyndns.org" first parse hoststring "." == "rebol" How do you parse a hostname only to return the first portion. For example: hoststring: rebol.dyndns.org I would only want to return the portion up to the first "." which would be "rebol" in this case. Paul Tretter Mike Yaunish [EMAIL PROTECTED]
[REBOL] Port probing
If I have to ports that I wait for data on how can I put them in a while or forever loop without locking up the console. If I had a if statement testing data received.
[REBOL] Wait Port
Thanks for the previous responses to the thread as they all help to fully understand ports a little better. My next question is does anyone have or know where to find a simple example of using Wait port for more than one port. I tried using Wait [port1 port2] but simply got the script to hang. The script worked fine on one port. Your comments are appreciated. Paul Tretter
[REBOL] Port timeout
How do I manipulate the timeout on ports to ensure I dont get a network timeout error? Also, anyone know the default timeout value. Paul Tretter
[REBOL] Port timeout Re:(2)
exactly what I was looking for and it worked. Got rid of the timeout message. Really cool! thanks Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, October 02, 2000 9:31 PM To: [EMAIL PROTECTED] Subject: [REBOL] Port timeout Re: On Tue, 03 Oct 2000, you wrote: How do I manipulate the timeout on ports to ensure I dont get a network timeout error? system/schemes/default/timeout: 7200 Also, anyone know the default timeout value. system/schemes/default/timeout == 30 Regards Jochen
[REBOL] Console monitoring from port
If I have a REBOL client connected to a port and want to connect to that client and see the console output - how would I do it from another REBOL client? Both clients would be connected to a server but I would want to directly open a port to the console somehow on the other client. Paul Tretter
[REBOL] Find problem from ports Re:(4)
Very cool. Im interested in the maintenance port idea. Not sure how to go about doing that. I also want a feature to crawl irc for information. That way the bot would just be "out there". Lets start a channel to exchange information somewhere. The bot can play a role in that. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 30, 2000 11:38 PM To: [EMAIL PROTECTED] Subject: [REBOL] Find problem from ports Re:(3) On Sun, 01 Oct 2000, you wrote: Your absolutely right - I made my ircparser very simple for the bots messages it recieves in the input-buffer based on what I am trying to achieve. I do intend to make a full fledged ircparser soon for my script but more importantly as a full irc compliant client in accorance with RFC 1459. I will also include ident server also when I am done. I did find that it wasnt a problem with find it was that I had received a message that didnt contain the "!" in the parse. It presented the problem. I fixed it with an if function to check for "!" before ircparsing. I have been very selective on the which incoming messages I use this ircparser function as I have other functions for different messages. I appreciate your input. Very helpful. Why not join forces to create a IRC-Bot that simply blasts all eggdrop-trash away? REBOL/Core is small enough to run on Shell-Accounts - it also supports eough platforms - so it seems to be the perfect language for an IRC-Bot. I plan following features: - Maintenance-port that gives a REBOL-Prompt to extend/bugfix the bot at runtime (Password authenticated with encrypted passwords) - Several in-IRC commands (KICK,JOIN,SEEN,PART,PASS...) - Different categories of users with configurable rights - Inter-Bot-Communications (to work togehter when something happens) - multiple server-connections from one REBOL process - and more to come... I've some experience in writing IRC-Bots. I've written a Bot with C++ and another with Commn Lisp (fully runtime extensible through maintenance-port) This bots run for several years now. Regards, Jochen
[REBOL] System/?
Where can I find all the refinements or path values and what is the best way to probe them. Paul Tretter
[REBOL] Find problem from ports
I was creating a script for IRC when I noticed that the find command doesn't seem to work right from reading the port and parsing the data but does when reading from the console with the same functions. I am reading in a typical message string into iput-buffer for example (Port is opening a port to irc): ircparser: func [/local a b c][ a: parse/all copy input-buffer "!" sendnick: pick a 1 b: pick a 2 print b sendmsg: find b ":" print sendmsg c: parse copy input-buffer senduser: pick c 2 sendcmd: pick c 3 sendchan: pick c 4 ] while [true][ wait port input-buffer: copy first port if find/part input-buffer ":" 1 [ input-buffer: remove head input-buffer ircparser ] _ Console Windows ___ NOTICE AUTH :*** Looking up your hostname... NOTICE AUTH :*** Found your hostname, cached NOTICE AUTH :*** Checking Ident NOTICE AUTH :*** No Ident response none ** Script Error: find expected series argument of type: series port bitset. ** Where: sendmsg: find b ":" print Anyone know what the problem is? Seems to work ok if I recreate the issue from the console.
[REBOL] Find problem from ports Re:(2)
Your absolutely right - I made my ircparser very simple for the bots messages it recieves in the input-buffer based on what I am trying to achieve. I do intend to make a full fledged ircparser soon for my script but more importantly as a full irc compliant client in accorance with RFC 1459. I will also include ident server also when I am done. I did find that it wasnt a problem with find it was that I had received a message that didnt contain the "!" in the parse. It presented the problem. I fixed it with an if function to check for "!" before ircparsing. I have been very selective on the which incoming messages I use this ircparser function as I have other functions for different messages. I appreciate your input. Very helpful. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 30, 2000 6:32 PM To: [EMAIL PROTECTED] Subject: [REBOL] Find problem from ports Re: IMHO you make too much assumptions on the IRC-protocoll in your parser. Here's the more complete irc-parsing-function of my IRC-Bot: parse-msg: func [str [string!] /local _sender _par_tk _nick_tk _usr_tk _svr_tk _tpar_tk _trl_tk _cmd_tk _white _nonwhite _parch _space _middle _params _message] [ _white: charset [#" " #"^-" #"^@" #0 #"^M" #"^/"] _nonwhite: complement _white _parch: complement charset " ^-^@^M^/:" _space: [some _white] _middle: [_parch any _nonwhite] _params: [_space [ copy _tpar_tk _middle (append _par_tk _tpar_tk) _params | [#":" copy _trl_tk to end ]]] _message: [opt [#":" [[copy _nick_tk to "!" skip copy _usr_tk to "@" skip copy _svr_tk to " " skip] |copy _nick_tk to " " skip]] copy _cmd_tk to " " _params] clear _par_tk: [] set [_nick_tk _usr_tk _svr_tk _tpar_tk _trl_tk _cmd_tk] none parse/all str _message _sender: either _usr_tk [reduce ['nick _nick_tk 'user _usr_tk 'host _svr_tk]] [_nick_tk] make object! [ sender: _sender command: _cmd_tk parameters: copy _par_tk trailing-arg: _trl_tk ] ] It's not absolutely ready yet, but it works for all IRC-messages On Sat, 30 Sep 2000, you wrote: I was creating a script for IRC when I noticed that the find command doesn't seem to work right from reading the port and parsing the data but does when reading from the console with the same functions. I am reading in a typical message string into iput-buffer for example (Port is opening a port to irc): ircparser: func [/local a b c][ a: parse/all copy input-buffer "!" sendnick: pick a 1 b: pick a 2 print b sendmsg: find b ":" print sendmsg c: parse copy input-buffer senduser: pick c 2 sendcmd: pick c 3 sendchan: pick c 4 ] while [true][ wait port input-buffer: copy first port if find/part input-buffer ":" 1 [ input-buffer: remove head input-buffer ircparser ] _ Console Windows ___ NOTICE AUTH :*** Looking up your hostname... NOTICE AUTH :*** Found your hostname, cached NOTICE AUTH :*** Checking Ident NOTICE AUTH :*** No Ident response none ** Script Error: find expected series argument of type: series port bitset. ** Where: sendmsg: find b ":" print Anyone know what the problem is? Seems to work ok if I recreate the issue from the console.
[REBOL] a GC bug of the second kind Re:(7)
I see. However, on WIN2k Advanced server it just disappears with not even the rebol.exe process running. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 27, 2000 10:16 PM To: [EMAIL PROTECTED] Subject: [REBOL] a GC bug of the second kind Re:(6) Hi, example code: word: use [a] [a: 11 'a] get word recycle get word CRASH! Ladislav - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 28, 2000 12:31 AM Subject: [REBOL] a GC bug of the second kind Re:(5) ptretter wrote: Just what is the GC bug? A bug that Rebol crew haven't fixed yet. :-) Unfortunately I've forgotten the example code that made Rebol crash. :-( Anyone? Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/ http://members.xoom.com/AndrewMartin/ --
[REBOL] Reading encrypted pages with REBOL??? Re:(2)
I am very interested in this subject as I to prefer some functions with HTTPS. Until then I use my IIS server for all HTTPS fucntions. Anybody got the scoop on this as its important in my opinion for RT overall stradegy. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 28, 2000 10:02 AM To: [EMAIL PROTECTED] Subject: [REBOL] Reading encrypted pages with REBOL??? Re: No, we use https:// all the time for many EDS web sites but No, rebol cannot use read on https:// or you cannot use load/markup https:// Also, https:// can be used for all types of html data, not just e-commerce credit-card entry forms. However, you can use: read or load/markup http:// which is very useful for "re-purposing data" Holger has commented on this before, and it sounds like it will "be-a-while" before rebol/core has the ability to read https:// (secure pages). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 28, 2000 10:30 AM To: [EMAIL PROTECTED] Subject: [REBOL] Reading encrypted pages with REBOL??? One of our customers using the /Command order forms I wrote (https://abooks.safeserver.com/orders/command.html), wanted to read the form into REBOL, i.e.: a: read https://abooks.safeserver.com/orders/command.html It never occurred to me that anyone would want to (since the forms were designed for browsers) and, of course, it doesn't work since REBOL evidently cannot read encrypted web pages yet. Or can it? Is there a way to access the https format? Thanks, --Ralph Roberts
[REBOL] Compiler for Rebol ? Re:(7)
I believe the best option for the masses would be to just be able to make native! those functions that expose the performance or characteristic of the finished script. Seems the easiest approach and should accomplish the goal. Maybe the make native! function would have some algorithm that unlock the code that the programmer only knows. Do I sounds out of my mind here? Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 24, 2000 11:08 AM To: [EMAIL PROTECTED] Subject: [REBOL] Compiler for Rebol ? Re:(6) As long as his support for As long as his support for that environment doesn't that approach doesn't FORCE ME to use it when IFORCE ME to use it when I choose not to. choose not to. Right, thats my opinion too, but by using compile to hide the source we would loose the ability to acces code at runtime of compiled code. Coming from CommonLisp I think this would be very bad - we would give away a really important feature! Carl's support for MS operating systems doesn't keep me from using any of several varieties of Unix/Linux (except Debian, but that's another issue!), MacOS, etc. I never said something against this fact. I hope this explaines a little bit more what I wanted to say. And, of course, all of the above discussion ignores other quite legitimate reasons for wanting some sort of pre-processed form of code: performance (which you mentioned in an earlier post), reduced run-time overhead (no need to parse/translate/compile, potentially fewer moving parts in the distributed product, potentially simpler set up, etc.), simpler/faster distribution ("object" is typically smaller than "source", making it faster to download/copy/install, etc.) Yes that's the point! _I_ would prefer using compilation (native, bytecode or whatever) for making the code more efficient and smaller. But I do _not_ want to loose runtime accessibility to the code. Regards, Jochen Schmidt
[REBOL] a GC bug of the second kind Re:(4)
Just what is the GC bug? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 26, 2000 3:36 PM To: [EMAIL PROTECTED] Subject: [REBOL] a GC bug of the second kind Re:(3) Blaz wrote: No crash here =] ... looks like a problem with the memory handling of Windoze? It was a problem with a older version of Rebol being distributed. The very latest version fixes this problem. Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/ http://members.xoom.com/AndrewMartin/ --
[REBOL] Standards based NET apps
I am getting ready to start making a full blown IRC client with REBOL/View and will most likely create other net applications/clients in compliance with their respective RFC's. If anyone would like to participate send me an email and we can make a collaborative effort. Paul Tretter
[REBOL] possible dir? bug Re:
Check the event log security log and see what credentials were passed. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 13, 2000 5:32 PM To: [EMAIL PROTECTED] Cc: '[EMAIL PROTECTED]' Subject: [REBOL] possible dir? bug Under NT4, I have a mapped drive u: that contains some directories that I have no permission to view the contents of - but can see that they are there and view properties about the directory from a file manager. Problem: dir? %/u/employees/ksmith/ ** Access Error: Cannot open /u/employees/ksmith/. ** Where: dir? %/u/employees/ksmith/ Because of the way dir? works, I guess. This kind of seems like a bug (and I have CC'd feedback) since the fact is that %/u/employees/ksmith/ IS a valid directory. Of course, a 'read or 'open on this directory should give an access error. I believe that in my case a workaround is to just check for a trailing slash since I am iterating through a list of files obtained from 'read. Even if RT does not view this as a bug, the documentation should state this side effect and recommend workarounds. Not sure if the behavior is the same under *NIX. Thanks, Rodney
[REBOL] Read-io bug Re:(2)
Holger thanks for the reply. Excellent information on Read-IO. I would like to use your comments for my REBOL website Im currently working on. I want to go indepth on this subject. As for Read-io and sending responses - If data is captured in buffers do you still have the risk of receiving partial packet information? Also, what difference does COPY PORT provide in that respect? Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 13, 2000 7:18 PM To: [EMAIL PROTECTED] Subject: [REBOL] Read-io bug Re: On Wed, Sep 13, 2000 at 09:00:01AM -0500, [EMAIL PROTECTED] wrote: I finally realized it must be a bug in read-io that causes the Network Timeout error message. Read-io is working fine as long as the server is sending data to the client. Yes, that is intended behavior. Read-io, like all functions to read data from ports, has a timeout, configurable in system/schemes/default/timeout. The default is 30 seconds. If no data is received during that time then read-io returns a timeout error. You can increase the timeout if 30 seconds is not enough for your purpose. For IRC you probably want to increase it, because servers sometimes tend to be slow to respond... As for read-io not receiving data from the server, chances are the way you check for it is incorrect. Keep in mind that read-io is a low-level function that returns contents from TCP packets as they arrive, it does not attempt to recombine data in any way. An example: let's say the "pong" response from the server is broken up into two TCP packets in transit. In that case read-io will return two separate pieces of data, e.g. one with "po" and the other one with "ng". If you only check for "pong" in a single reply you received in read-io then you won't find the response. This is only one of many reasons why using read-io is not recommended. IRC is a line-oriented protocol, and for line-oriented protocols REBOL's copy/insert functions work just fine (even in older versions of REBOL), so you should use those. Here is an example of how pieces of the network request/response mechanism in an IRC client could be written. This particular example is intended to be used with current experimental versions of REBOL. To use it with older versions you may have to tweak it a little... REBOL [] system/schemes/default/timeout: 7200; two hours server: "us.dal.net" mynick: "q52hw2" myname: "joe" mygroup: "#test3636" scan-input: func [ /local response ] [ if not found? response: copy port [ quit ] if not empty? response [ forall response [ rp: first response handle-server-string rp ] ] ] handle-server-string: func [ str [string!] /local res ret ] [ space: charset " " nonspace: complement space prefix: [":" any nonspace some space] rules: [0 1 prefix res: any [space | nonspace]] if parse/all str rules [ ret: parse res " " if not error? try [to-integer first ret] [ print res return none ] switch first ret [ "PING" [ print "[responding to ping from server]" insert port rejoin ["PONG" rejoin at ret 2] return none ] "NOTICE" [ print rejoin [at ret 2] ] ] return ret ] none ] wait-response: func [ expected [string! word!] /local result rp response ] [ result: none while [not found? result] [ wait port if not found? response: copy port [ quit ] if not empty? response [ forall response [ rp: first response rp: handle-server-string rp if all [found? rp not found? result] [ result: find first rp expected ] ] ] ] ] send-cmd: func [ data [string!] resp [string!] ] [ insert port data wait-response resp ] irc-port: [ scheme: 'tcp host: server port-id: 6667 ] port: open/direct/lines/no-wait irc-port insert port rejoin ["NICK " mynick] insert port rejoin ["USER " mynick " 0 * " myname] insert port rejoin ["JOIN " mygroup] insert port rejoin ["WHOIS " mynick] send-cmd rejoin ["PING " server] "PONG" forever [ wait port scan-input ] -- Holger Kruse [EMAIL PROTECTED]
[REBOL] Read-io bug
I finally realized it must be a bug in read-io that causes the Network Timeout error message. Read-io is working fine as long as the server is sending data to the client. The timeout occurs before any ping command is sent from the server. I can detect from the read-io on the port when a ping is sent from the server. There is nothing to explain the problem. To test this I connected to IRC via Mirc and joined a channel called #rebolgods. Then I activated the script to connect and join the same channel. The result is a success and joins the channel. I can then query the nick and send data to it and see the output in the REBOL console. However, after a small amount of inactivity and before IRC send a ping the Network Timeout error occurs. I have looked at the help and determined that I have utilized the function correctly including the open function. It appears that some other timing algorithim is not properly accounted for in the read-io function. This also happend with the copy function on the ports data. Since read-io is native I assume that it is using copy as an internal function. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 12, 2000 6:21 PM To: [EMAIL PROTECTED] Subject: [REBOL] New network Document The new network document needs to better reflect the buffers and the open port object! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 12, 2000 7:52 AM To: [EMAIL PROTECTED] Subject: [REBOL] Any Port Pros available Can someone explain why read-io cannot receive the ping reply from the server. It seems to time out. I havenet received a good reason for this and it has now brought me to a standstill. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 10, 2000 8:59 PM To: [EMAIL PROTECTED] Subject: [REBOL] ACCESS ERROR I get an Access Error message with this script and I am not sure why. Can anyone help. I have pasted inline and attached. I just want it to connect and join a channel and stay in the channel at this point. Thanks for your help. Paul Tretter -- REBOL[] size: 1000 input-buffer: make string! size output-buffer: make string! size irc-port: [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] port: open/direct irc-port insert port "NICK tret^/" insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" insert port "JOIN #REBOLGODS^/" forever [ if 0 length? input-buffer [clear input-buffer] read-io port input-buffer size if find input-buffer "PING" [ insert output-buffer "PONG irc.mindspring.com^/" write-io port output-buffer size ] print input-buffer ] halt rebol[] size: 1000 input-buffer: make string! size output-buffer: make string! size irc-port: [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] port: open/direct irc-port insert port "NICK tret^/" insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" insert port "JOIN #REBOLGODS^/" forever [ if 0 length? input-buffer [clear input-buffer] read-io port input-buffer size if find input-buffer "PING" [ insert output-buffer "PONG irc.mindspring.com^/" write-io port output-buffer size ] print input-buffer ] halt
[REBOL] Read-io bug Re:(2)
I forwarded it to [EMAIL PROTECTED] I didnt want to kill myself tyring much longer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 13, 2000 12:20 PM To: [EMAIL PROTECTED] Subject: [REBOL] Read-io bug Re: Paul Yes that´s it! Maybe someone at RT could say something about this Lorenz - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 13, 2000 11:00 AM Subject: [REBOL] Read-io bug I finally realized it must be a bug in read-io that causes the Network Timeout error message. Read-io is working fine as long as the server is sending data to the client. The timeout occurs before any ping command is sent from the server. I can detect from the read-io on the port when a ping is sent from the server. There is nothing to explain the problem. To test this I connected to IRC via Mirc and joined a channel called #rebolgods. Then I activated the script to connect and join the same channel. The result is a success and joins the channel. I can then query the nick and send data to it and see the output in the REBOL console. However, after a small amount of inactivity and before IRC send a ping the Network Timeout error occurs. I have looked at the help and determined that I have utilized the function correctly including the open function. It appears that some other timing algorithim is not properly accounted for in the read-io function. This also happend with the copy function on the ports data. Since read-io is native I assume that it is using copy as an internal function. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 12, 2000 6:21 PM To: [EMAIL PROTECTED] Subject: [REBOL] New network Document The new network document needs to better reflect the buffers and the open port object! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 12, 2000 7:52 AM To: [EMAIL PROTECTED] Subject: [REBOL] Any Port Pros available Can someone explain why read-io cannot receive the ping reply from the server. It seems to time out. I havenet received a good reason for this and it has now brought me to a standstill. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 10, 2000 8:59 PM To: [EMAIL PROTECTED] Subject: [REBOL] ACCESS ERROR I get an Access Error message with this script and I am not sure why. Can anyone help. I have pasted inline and attached. I just want it to connect and join a channel and stay in the channel at this point. Thanks for your help. Paul Tretter -- REBOL[] size: 1000 input-buffer: make string! size output-buffer: make string! size irc-port: [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] port: open/direct irc-port insert port "NICK tret^/" insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" insert port "JOIN #REBOLGODS^/" forever [ if 0 length? input-buffer [clear input-buffer] read-io port input-buffer size if find input-buffer "PING" [ insert output-buffer "PONG irc.mindspring.com^/" write-io port output-buffer size ] print input-buffer ] halt
[REBOL] Any Port Pros available Re:(2)
The access error is the problem. I get the same results. I dont think the rebol.dyndns.org is an issue. I cant seem to find the problem. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 12, 2000 10:28 AM To: [EMAIL PROTECTED] Subject: [REBOL] Any Port Pros available Re: Hi Paul, That´s what I got using your script against "irc.libnet.com.br" Should I change "rebol.dyndns.org" at line below to something else? " insert port "USER tret rebol.dyndns.org irc.libnet.com.br tret^/"" Lorenz _ :client.libnet.com.br NOTICE AUTH :*** Looking up your hostname... :client.libnet.com.br NOTICE AUTH :*** Found your hostname (cached) :client.libnet.com.br NOTICE AUTH :*** Checking ident... :client.libnet.com.br NOTICE AUTH :*** No ident response; username prefixed with ~ NOTICE tret :*** If you are having problems connecting due to ping timeouts, please type /notice A DAE4412 nospoof now. PING :ADAE4412 :client.libnet.com.br NOTICE tret :*** If you need assistance with a connection problem, please em ail [EMAIL PROTECTED] with the name and version of the client you are using, and the server you tried to connect to: client.libnet.com.br :client.libnet.com.br 451 * :You have not registered :[EMAIL PROTECTED] PRIVMSG tret :VERSION ** Access Error: Network timeout. ** Where: read-io port input-buffer size if - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 12, 2000 9:52 AM Subject: [REBOL] Any Port Pros available Can someone explain why read-io cannot receive the ping reply from the server. It seems to time out. I havenet received a good reason for this and it has now brought me to a standstill. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 10, 2000 8:59 PM To: [EMAIL PROTECTED] Subject: [REBOL] ACCESS ERROR I get an Access Error message with this script and I am not sure why. Can anyone help. I have pasted inline and attached. I just want it to connect and join a channel and stay in the channel at this point. Thanks for your help. Paul Tretter -- REBOL[] size: 1000 input-buffer: make string! size output-buffer: make string! size irc-port: [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] port: open/direct irc-port insert port "NICK tret^/" insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" insert port "JOIN #REBOLGODS^/" forever [ if 0 length? input-buffer [clear input-buffer] read-io port input-buffer size if find input-buffer "PING" [ insert output-buffer "PONG irc.mindspring.com^/" write-io port output-buffer size ] print input-buffer ] halt
[REBOL] New network Document
The new network document needs to better reflect the buffers and the open port object! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 12, 2000 7:52 AM To: [EMAIL PROTECTED] Subject: [REBOL] Any Port Pros available Can someone explain why read-io cannot receive the ping reply from the server. It seems to time out. I havenet received a good reason for this and it has now brought me to a standstill. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 10, 2000 8:59 PM To: [EMAIL PROTECTED] Subject: [REBOL] ACCESS ERROR I get an Access Error message with this script and I am not sure why. Can anyone help. I have pasted inline and attached. I just want it to connect and join a channel and stay in the channel at this point. Thanks for your help. Paul Tretter -- REBOL[] size: 1000 input-buffer: make string! size output-buffer: make string! size irc-port: [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] port: open/direct irc-port insert port "NICK tret^/" insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" insert port "JOIN #REBOLGODS^/" forever [ if 0 length? input-buffer [clear input-buffer] read-io port input-buffer size if find input-buffer "PING" [ insert output-buffer "PONG irc.mindspring.com^/" write-io port output-buffer size ] print input-buffer ] halt rebol[] size: 1000 input-buffer: make string! size output-buffer: make string! size irc-port: [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] port: open/direct irc-port insert port "NICK tret^/" insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" insert port "JOIN #REBOLGODS^/" forever [ if 0 length? input-buffer [clear input-buffer] read-io port input-buffer size if find input-buffer "PING" [ insert output-buffer "PONG irc.mindspring.com^/" write-io port output-buffer size ] print input-buffer ] halt
[REBOL] Buffers
I noticed that tcp ports have a refinement of buffer-size. How do we use that option and how do we manipulate buffers. I am confused why we have to create buffers with i.e. make string! 1024 etc... We do we find more information on these capabilities. I discovered a util referenced in the book called net-util and net-install that was used to implement new schemes. Has anyone had success using these utils as I never see them used in scripts on the list. Paul
[REBOL] ACCESS ERROR
I get an Access Error message with this script and I am not sure why. Can anyone help. I have pasted inline and attached. I just want it to connect and join a channel and stay in the channel at this point. Thanks for your help. Paul Tretter -- REBOL[] size: 1000 input-buffer: make string! size output-buffer: make string! size irc-port: [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] port: open/direct irc-port insert port "NICK tret^/" insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" insert port "JOIN #REBOLGODS^/" forever [ if 0 length? input-buffer [clear input-buffer] read-io port input-buffer size if find input-buffer "PING" [ insert output-buffer "PONG irc.mindspring.com^/" write-io port output-buffer size ] print input-buffer ] halt rebol[] size: 1000 input-buffer: make string! size output-buffer: make string! size irc-port: [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] port: open/direct irc-port insert port "NICK tret^/" insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" insert port "JOIN #REBOLGODS^/" forever [ if 0 length? input-buffer [clear input-buffer] read-io port input-buffer size if find input-buffer "PING" [ insert output-buffer "PONG irc.mindspring.com^/" write-io port output-buffer size ] print input-buffer ] halt
[REBOL] I give up Re:(4)
Thanks Russ. I am already hard at work on this and getting good results. I thank you for your help. For anyone that wants to deal with ports this thread should help everyone. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 09, 2000 6:49 AM To: [EMAIL PROTECTED] Subject: [REBOL] I give up Re:(3) Paul, "b" is just what comes in from the port. As you can see by the second line of code, 'b is simply a string. You see it's contents when this program runs, as all this does is print 'b over and over as the data arrives. Check out the docs/examples on 'parse... it's very powerful and exactly what you're gonna need to do the work here. Russ --- At 04:50 PM 9/8/2000 -0500, you wrote: If I were to parse the "b" from the read-io what type does read-io deliver is it type port?. If so how do you parse port datatypes? Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 08, 2000 12:02 PM To: [EMAIL PROTECTED] Subject: [REBOL] I give up Re: Perhaps the following (keeping as close to your code as possible) will help... it's very basic but at least you see responses from the IRC server, on the basis of which you'll be able to add more to do what you desire. REBOL[] size: 1 b: make string! size snip
[REBOL] Closing ports
If I open a port to an IRC server doesnt closing the port each time I want to send data effectively kill the connection at the same time? Paul
[REBOL] Network error message
Is this a network error message generated from REBOL? ** Access Error: Network timeout. If so, What does it actually mean or what would cause it? Paul
[REBOL] rebol weak points (i think) Re:
You might want to look at the definitions for "bind" and "use". Also, look at the /local refinement by doing HELP FUNCTION. Paul Tretter -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Sent: Saturday, September 09, 2000 2:41 PMTo: [EMAIL PROTECTED]Subject: [REBOL] rebol weak points (i think) I've just started to play around with rebol. It definately has it's =advantages for the beginner progammer but it seems shows some weakness =for advanced, modular based programming. For example, all user/system =defined variables are either global (or local to a function). Since all =variables are global in rebol and there is no way to associate a =variable with a class, this would probably lead to collisions when you =are using lot's of scripts.=20imagine someone wrote a utility script with a bunch of reusable =functions. Let's say you want to use those functions in your script. If =the original script uses a global variable with the same name as a =global var you used in your script, it would cause a collision.=20Or let's say that the programmer of a utility script reimplemented a =rebol defined function such as "print." Now when you add his utility =script to your script, the function print get's all screwed up in either =your script or his script.=20Java and javascript have a much less chance of these collisions since =the programmer can create static variable and functions that are =associated with a class. These vars and functions can be accessed =globally, but must have the name of the class in front of the variable. =for example,Math.pi=20could be a variable pi defined in class Math that can be accessed =globally.it is not an instance variable, it is a static variable. =Outside of the class Math, you have to use "Math" before it in order to =access it.Perhaps I haven't studied the language in enough detail yet, but =wouldn't you all agree that this is a weakness in rebol? It doesn't seem =that well suited for modular based programming as is. Maybe I'm missing =something but I don't see why the author did it this way...Rishi
[REBOL] I give up
I cant figure it out - doc after doc port after port - its killin me. How do you join an irc channel? I did the open port stuff I can do it with telnet but not with REBOL. Look at my script below and tell me whats wrong. I understand I havent accounted for everything that IRC RFC states but should I think have enough to contact the server and join the channel but doesnt work. Any ideas? Paul Tretter -- REBOL[] irc-port: open/direct/string/no-wait [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] while [data: copy irc-port] [prin data] insert irc-port "NICK tret^/" close irc-port irc-port: open/direct/string/no-wait [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] insert irc-port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" close irc-port irc-port: open/direct/string/no-wait [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] insert irc-port reform "JOIN #REBOLGODS^/" close irc-port
[REBOL] I give up Re:(2)
This helps greatly. Now i need to master pong response to server pings. Im curious why you didnt have to close the port every time you made a send. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 08, 2000 12:02 PM To: [EMAIL PROTECTED] Subject: [REBOL] I give up Re: Perhaps the following (keeping as close to your code as possible) will help... it's very basic but at least you see responses from the IRC server, on the basis of which you'll be able to add more to do what you desire. REBOL[] size: 1 b: make string! size irc-port: [ scheme: 'tcp host: "us.dal.net" port-id: 7000 ] port: open irc-port insert port "NICK tret^/" insert port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" insert port "JOIN #REBOLGODS^/" insert port "WHOIS tret^/" forever [ if 0 length? b [print b clear b]; display replies and clear buffer read-io port b size ; get next replies from server ] ; use ESC to stop program and then manually enter "close port" ; or just wait for port to time out and close itself on error Russ At 09:46 AM 9/8/2000 -0500, you wrote: I cant figure it out - doc after doc port after port - its killin me. How do you join an irc channel? I did the open port stuff I can do it with telnet but not with REBOL. Look at my script below and tell me whats wrong. I understand I havent accounted for everything that IRC RFC states but should I think have enough to contact the server and join the channel but doesnt work. Any ideas? Paul Tretter -- REBOL[] irc-port: open/direct/string/no-wait [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] while [data: copy irc-port] [prin data] insert irc-port "NICK tret^/" close irc-port irc-port: open/direct/string/no-wait [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] insert irc-port "USER tret rebol.dyndns.org irc.mindspring.com tret^/" close irc-port irc-port: open/direct/string/no-wait [ scheme: 'tcp host: "irc.mindspring.com" port-id: 6667 ] insert irc-port reform "JOIN #REBOLGODS^/" close irc-port
[REBOL] I give up Re:(5)
Is this line "prefix: make object! [full: nick: user: host: string!]" supposed to be replaced with the actual nick user and host portions or is this proper syntax! Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 08, 2000 3:47 PM To: [EMAIL PROTECTED] Subject: [REBOL] I give up Re:(4) I've done a client too, it is available at http://www.algonet.se/~peoyli/RebIRC, but its code needs some more work.. I mostly wrote this to learn Rebol and the IRC protocol, and it was meant to be a bot that jumps into a channel and gets the userlist and leaves again (to make the channel's people's page more interesting).. My solution to the PING/PONG stuff was something like.. handle-irc-cmd: func [] [ switch/default/case irc/command reduce[ "PING" [ insert irc-port rejoin ["PONG " (first irc/params) newline] prin #"^G" ] ... with "irc" being an object which consists of irc-obj: make object! [ prefix: make object! [full: nick: user: host: string!] command: string! params: block! ] (as described in the RFC) /PeO I've done a whole IRC client in REBOL, but not in position to release it in total. It was quite a while ago, so I need lots of head scratching to go back and figure things out... but will help if you're REALLY stuck. Russ
[REBOL] Console port
How can I open the console port from the script so that I can see what is happening.
[REBOL] Example ports
Can someone provide an example of sending something to a port and how to know if you are getting a response. Paul Tretter
[REBOL] Network Port Reading Problem Re:
Im having the same problem. Need more information in the documentation about actively exchange data as in telnet type connection. Instead the docs seem to just state how to insert and open a port or exchange a bit of information. I want to keep the active session and I cant see the data coming from my connection. I can see it with telnet and know its coming. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 07, 2000 5:19 PM To: [EMAIL PROTECTED] Subject: [REBOL] Network Port Reading Problem I need to implement a telnet client in Rebol for a fixed task (that is, I don't want a terminal type thing - all client commands are fixed and will be run with no user interaction). Anyway, so I open up a telnet connection to the box of interest: c: open tcp://192.168.15.233:23 Cool. Now in this particular case, the telnet server returns an IAC packet asking me to DO (telnet parlance) some option stuff. My question is - how do I get the data that the server has sent me? I try: print copy c . finally get network timeout or print first c . finally get network timeout In my sniffer I see that there IS definitely data sent to me over the open telnet socket and the telnet server is waiting for me to get it and respond. If I sniff the Win32 built-in telnet client I see that the client do the right thing and respond to this packet. What am I not doing correct here to get this data? TIA, Rodney
[REBOL] Example ports Re:(2)
Elan, This is fantastic information. This is exactly the kind of information that should go in the docs. Anyone second the motion? Makes it much plainer to understand. I didnt know about the close after each send from the client. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 07, 2000 6:36 PM To: [EMAIL PROTECTED] Subject: [REBOL] Example ports Re: Hi Paul, Assume two REBOL processes (i.e. you launch REBOL twice on the same machine, or on two different machines connected by TCP/IP. I assume same machine here and use local host setting, 127.0.01 for the client.) REBOL process 1: will be indicated by prompt 1 REBOL process 2: will be indicated by prompt 2 Simple Session: 1 server: open/lines tcp://:8000 2 client: open/lines tcp://127.0.0.1:8000 2 insert client "Hi, there." 2 close client 1 port: first server 1 print first port Hi, there. BETTER use copy to prevent data loss on server side: 1 port: first server 1 print copy port Hi, there. Complex (Bi-directional) Session: 1 server: open tcp://:8000 1 input-buffer: make string! 1024 1 while [true] [ 1 server-port: first server 1 while [true] [ 1 wait server-port 1 read-io server-port input-buffer 1024 1 break 1 ] 1 print input-buffer 1 insert server-port join input-buffer [" from server."] 1 clear input-buffer 1 close server-port 1 ] 2 message:" Client here. " 2 client: open tcp://127.0.0.1:8000 2 insert client message 2 print copy client 2 close client Note that once you have sent something on a client port, you must close the client port and open it again, before you can send more stuff out that port. At 05:27 PM 9/7/00 -0500, you wrote: Can someone provide an example of sending something to a port and how to know if you are getting a response. Paul Tretter ;- Elan [ : - ) ] author of REBOL: THE OFFICIAL GUIDE REBOL Press: The Official Source for REBOL Books http://www.REBOLpress.com visit me at http://www.TechScribe.com
[REBOL] P-Port
I did a help on P-Port. Not sure what it is but doesnt seem to function correctly. Paul Tretter
[REBOL] System object
Where can we learn more about system and the options available? Paul
[REBOL] P-Port Re:(2)
I dont know what it is exactly. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 06, 2000 5:02 PM To: [EMAIL PROTECTED] Subject: [REBOL] P-Port Re: Hey Paul, I must be missing some mail here, could you explain more about P-Port? Could this be the parrallel port support I wished for on my birthday? --Ryan [EMAIL PROTECTED] wrote: I did a help on P-Port. Not sure what it is but doesnt seem to function correctly. Paul Tretter -- * Ryan Cole * Programmer Analyst www.iesco-dms.com 707-468-5400 ;Fortuneately escape will cancel this endless loop... Forever [ buy microsoft version: version + 1 ]
[REBOL] Don't by lazy dogzz! ;-) Marketing Re:(5)
My suggestions are this: 1. Find programmers and tell them about REBOL. You will be surprised how many dont know about this language. 2. There are many occasional programmers that need a script to perform some form of task. For example, I belong to a Cisco study group and many network engineers were very interested in REBOL. 3. Join discussion list and subscribe to newsgroups that would be interested in REBOL discussion but where there is little to no exposure. 4. My areas lately have been in the Perl and Python camps. Many have not heard of REBOL. Hope this helps Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, September 04, 2000 6:19 PM To: [EMAIL PROTECTED] Subject: [REBOL] Don't by lazy dogzz! ;-) Marketing Re:(4) What kind of actions do you suggest? Lorenz - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Segunda-feira, 4 de Setembro de 2000 13:08 Subject: [REBOL] Don't by lazy dogzz! ;-) Marketing Re:(3) Great to here my remarks were appreciated. But without marketing REBOL will have a tough time. Even a good website doesnt get used unless there is marketing. I appreciate the response. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, September 04, 2000 6:14 AM To: [EMAIL PROTECTED] Subject: [REBOL] Don't by lazy dogzz! ;-) Marketing Re:(2) Petr Good Idea ... we should spread the word ... I first found out about REBOL on the Perl Mailing List. So get to work everyone and plant the seeds. Larry [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I have decided to do some marketing for REBOL. Although, I dont work for them I feel it necessary to get the word out. We have all been very actively learning and using REBOL products for some time. Time for REBOL to move to the next level. I hope everyone actively tells someone about this wonderful new language and we get on with making Carl richer than he already is and enrich our lives along the way. To do both we need marketing. Everyone pitch in and do you part. Tell them about REBOL Press and the REBOL website and about your new admiration for this language. I guess I am feeling just a bit enthusiastic tonight. GO REBOL GREAT! At least someone ;-) So many folks here and so few of interest for discussing the topic. Maybe if more ppl would be interested in REBOL promotion, we could start separate ml? I already reported REBOL news to Czech Amiga News - some 1500 readers daily. I also contacted four sites today asking them for possibility of the review. Everyone can help, as everyone of us knows some interesting computer related site. The question is - if we should/shouldn't coordinate the effort? As for me personally - I will continue - I will also cover local computing media and introduce REBOL to them We all knows how the world works - no REBOL coverage = no interest in REBOL = no money for RT = no REBOL at all ;-) So folks - we all use that great tool called REBOL and are enjoying making our lives easier, while lazy enough in helping Carl co spread the word? ;-) Cheers, -pekr- Paul Tretter
[REBOL] Why cant mutually exclusive refinements have the same argument name Re:
Looks like you will have to use a differnet argument for either /put or /get refinements. Then possibiy incorporate the Copy function into the body of the function if necessary. You may want to perform some logical operators on the /put or /get refinements and just pass the filename as a separate argument or as a seperate /refinement argument. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 05, 2000 10:04 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [REBOL] Why cant mutually exclusive refinements have the same argument name I have a function that will either get or put a filename... of course I want to use the same name for the file regardless, and this will not pose a problem because the arguments are mutually exclusive. However, REBOL is complaining about me using the same name for 2 mutually exclusive arguments REBOL [ Title: "Main script" ] main: func [ "Performs order file transfer" /name-product product-name [string!] "The product name" /index-upfile upfile-index [integer!] "The index to be used for the upfile. Useful when you have many upfiles and don't want to overwrite a previous one." /put orderfile-name [string!] "Put an orderfile on our server" /get orderfile-name [string!] "Put an orderfile on our server" /date-upfile upfile-date [date!] "The date to be encoded into the upfile name" /create-upfile upfile-name [string!] "This automatically creates and upfile. The argument to this option is the word 'cancel' or 'nocancel', specifying whether you want the upfile to contain a cancel or nocancel command" /wait-on-controlfile controlfile-wait-time [time!] "Specifies the localtime that the script will continue to try to look for the control file until. This option can only be used with the /get option" ] [ ] Get your FREE Email and Voicemail at Lycos Communications at http://comm.lycos.com
[REBOL] Proxy Problems (Was: Fixes View: 0.10.29 ) Re:(5)
Maybe this is why I cant connect with MSPROXY. Has anyone had any luck getting /View or /Core to work with MSPROXY. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 05, 2000 11:31 AM To: [EMAIL PROTECTED] Subject: [REBOL] Re: Proxy Problems (Was: Re: Fixes View: 0.10.29 Re:(2)) I think the error you report is secondary to the atypical proxy configuration architecture REBOL has adopted. You'll notice that the error you received indicates it's using the tcp scheme. It used to be that the REBOL sites for view were accessed with http, and while the http scheme relies to some degree on the tcp scheme to do it's thing, I think you'll find like me that the following will work correctly: read http://www.rebol.com/index.r The problem I believe comes down to REBOL's association of proxy use with scheme rather than port and transport protocol (tcp, udp), the more typical manner in which firewalls restrict access to network resources. The deviation from this proxy configuration architecture by the nature of their using tcp rather than http to read resources for the View interface gives a glimpse of other proxy related issues that will inevitably arise secondary to this approach. I'm sure many of us can appreciate the implications of this, i.e. we now have to configure REBOL to also direct tcp scheme connections through the proxy to handle "built-in" View connections but tcp scheme connections to server ports not used for http will no longer work because the proxy won't handle them. Soon we'll find ourselves rewriting the proxy settings in the system in our code to accomodate connections based on connection port. This I'm sure is not what was intended by the design. In my report to feedback on this and the other side effects of this you haven't mentioned, I hope to suggest that they revisit the approach to proxy configuration/handling. This is clearly a challenging issue for such a highly versatile product and I'm sure our friends at REBOL Technologies will strive to provide a solution that is loyal not only to it's commitment to be portable across platforms but also to network security architectures. Sincerely, Stephen Sayer On Mon, 4 Sep 2000 [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I made the mistake of replacing the previous file view031.zip with the new Sept 3 one, but the new one seems to contain only rebol.exe. I seem to need the other components, even if they weren't changed. for Win98. New version doesn't find its way thru firewall too ... reported it to feedback ... ** Access Error: Cannot connect to www.rebol.com. ** Where: port: open/direct/binary/no-wait [scheme: 'tcp host: host-name port-id: 80] if none? -pekr- Russell [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 03, 2000 4:23 PM Subject: [REBOL] Fixes View: 0.10.29 Hmmm. Seems like a lot broke recently in REBOL/View experimental. Just posted a newer one that works better... more reliable for http, email, graphics, etc. Give it a try. Looks like I'm spending too much time this weekend writing tests and fix'n bugs. And I wanted to work on REBOL/Express! -Carl
[REBOL] IRC
Has anyone made a client for IRC or know the handshaking involved. Is it possible to create an IRC client with REBOL?
[REBOL] Advanced String Encryption Re:(2)
Great information. I have the desire as many ecommerce folks also do. Would be nice to see an ftp server/client that uses this encryption. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, September 05, 2000 5:23 AM To: [EMAIL PROTECTED] Subject: [REBOL] Advanced String Encryption Re: If by "create a ... function" you mean that you'd like REBOL Technologies to add a well-known, well-tested, high-security algorithm (e.g., blowfish, twofish, or whatever wins the AES competition sponsored by NIST) to REBOL as a primitive (for performance reasons) then I'm happy to second the request. This would be a valuable feature, and could be a critical part of the support for no-human-readable-source distribution of REBOL programs (also a valuable feature, IMHO). If by "create a ... function" you mean that you'd like for a group of volunteers to try to invent an en/de-cryption scheme and implement it in REBOL, I'll be strongly of the opposite persuasion: 1) REBOL should support relevant industry standards wherever feasible. As NIST is the appropriate agency, I suggest that their guidelines be followed. Please see http://csrc.nist.gov/encryption/aes/ for more information on the Advanced Encryption Standard Development Effort. 2) Cryptography is SEVERELY non-trivial. The only way that I would begin to trust a cryptographic algorithm (including some designs which I've created for fun) is for it to be a published design which has been kicked around for YEARS in the crypto community. Open source (including intensive expert peer review) is the only way to achieve reliable cryptographic security. Please see http://www.counterpane.com/ and http://www.wired.com/news/technology/0,1282,38240-2,00.html for more information on this. 3) Strong crypto is usually computationally intensive. While I strongly advocate reserving performance optimization for those critical parts of a system where there's really a need for it (development/testing/maintenance time are usually much more expensive than run time for the majority portion of the majority of computer programs), an en/de-cryption function is one such hot spot, IMHO. 4) If the whole point of crypto is security, then en/de-cryption functions should be embedded into the language in a way that minimizes the possibilities for a running piece of code to change or replace them (or otherwise interfere with their function). We all know that user-defined and official mezzanine functions are vulnerable to modification (intentional or otherwise). Please let me be clear that I am NOT trying to discourage or look askance at any efforts toward experimentation or research into cryptography, nor am I suggesting that REBOL is a bad choice for such efforts. But I AM saying that amateur/experimental/research efforts by the REBOL community should not be the basis for "official" (in any sense of the word) support for crypto in the REBOL language. -jn- [EMAIL PROTECTED] wrote: All, I call for the need to create a highly advanced string encryption/decription function volunteers will be appreciated aden.
[REBOL] Don't by lazy dogzz! ;-) Marketing Re:(3)
Great to here my remarks were appreciated. But without marketing REBOL will have a tough time. Even a good website doesnt get used unless there is marketing. I appreciate the response. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, September 04, 2000 6:14 AM To: [EMAIL PROTECTED] Subject: [REBOL] Don't by lazy dogzz! ;-) Marketing Re:(2) Petr Good Idea ... we should spread the word ... I first found out about REBOL on the Perl Mailing List. So get to work everyone and plant the seeds. Larry [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I have decided to do some marketing for REBOL. Although, I dont work for them I feel it necessary to get the word out. We have all been very actively learning and using REBOL products for some time. Time for REBOL to move to the next level. I hope everyone actively tells someone about this wonderful new language and we get on with making Carl richer than he already is and enrich our lives along the way. To do both we need marketing. Everyone pitch in and do you part. Tell them about REBOL Press and the REBOL website and about your new admiration for this language. I guess I am feeling just a bit enthusiastic tonight. GO REBOL GREAT! At least someone ;-) So many folks here and so few of interest for discussing the topic. Maybe if more ppl would be interested in REBOL promotion, we could start separate ml? I already reported REBOL news to Czech Amiga News - some 1500 readers daily. I also contacted four sites today asking them for possibility of the review. Everyone can help, as everyone of us knows some interesting computer related site. The question is - if we should/shouldn't coordinate the effort? As for me personally - I will continue - I will also cover local computing media and introduce REBOL to them We all knows how the world works - no REBOL coverage = no interest in REBOL = no money for RT = no REBOL at all ;-) So folks - we all use that great tool called REBOL and are enjoying making our lives easier, while lazy enough in helping Carl co spread the word? ;-) Cheers, -pekr- Paul Tretter
[REBOL] Fixes View: 0.10.29 Re:
I just ran a few scripts checking the latest Sept 3 posting. Looks something may have happened. I tried to run the entry-form.r script (inserted below). It gives me an error. Use to work with previous /View. Paul Tretter REBOL [ ] form-styles: stylize [ txt12 text [font: [color: black shadow: none]] txt16 txt12 [font: [size: 16]] name txt12 [size: 100x24 font: [align: 'right]] namv txt12 [size: none] inp field [size: 240x24] ] address-form: layout [ styles form-styles backdrop 200.190.170 txt16 bold "Address Book Entry" box 460x4 168.168.168 across name "First Name:" fn: inp 80x24 namv "Last Name:" ln: inp 165x24 return name "Street Address:" sa: inp 330x24 return name "City:" ci: inp 100x24 namv "State:" st: inp 60x24 namv "Zip:" zip: inp 79x24 return box 460x4 168.168.168 return name "Home Phone:" hp: inp return name "Work Phone:" wp: inp return name "Email Address:" ea: inp return name "Web Site:" ws: inp return box 460x4 168.168.168 return indent 110 button "Enter" [save-data] button "Cancel" [quit] ] save-data: does [ data: reduce [ fn/text ln/text sa/text ci/text st/text zip/text hp/text wp/text ea/text ws/text ] print data ] view address-form -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 03, 2000 6:23 PM To: [EMAIL PROTECTED] Subject: [REBOL] Fixes View: 0.10.29 Hmmm. Seems like a lot broke recently in REBOL/View experimental. Just posted a newer one that works better... more reliable for http, email, graphics, etc. Give it a try. Looks like I'm spending too much time this weekend writing tests and fix'n bugs. And I wanted to work on REBOL/Express! -Carl
[REBOL] Marketing
I have decided to do some marketing for REBOL. Although, I dont work for them I feel it necessary to get the word out. We have all been very actively learning and using REBOL products for some time. Time for REBOL to move to the next level. I hope everyone actively tells someone about this wonderful new language and we get on with making Carl richer than he already is and enrich our lives along the way. To do both we need marketing. Everyone pitch in and do you part. Tell them about REBOL Press and the REBOL website and about your new admiration for this language. I guess I am feeling just a bit enthusiastic tonight. GO REBOL Paul Tretter
[REBOL] Index?
Is there an alternative for: a: "101" foreach item a [print index? item] 1 2 3 Obvious to you REBOL gurus this generates an error. But it illustrates clearly what I want to do. Damn, index? is native! :) Anyone have some helpful alternatives. Paul Tretter
[REBOL] Binary to Decimal Function
Here is a useful function for anyone needing to convert binary digits to decimal. Took me awhile but here it is: bnfunc: func [ "Convert Binary digits to Decimal equivalent" bn [string!] "The binary representation" /local holder count][ holder: make integer! 0 reverse bn count: length? bn for x 1 count 1 [ if (to-string (pick bn x)) = "1" [ holder: (2 ** (x - 1)) + holder ] ] return holder ] Let me know what you think. I am gonna create some refinements to enhance it a bit. Paul Tretter
[REBOL] recent experimental core builds Re:
Will these enhancements be posted somewhere consolidated or perhaps a new user guide. For those of us that bought the book we may want to get a better more concise view of the changes since alot of us are new to REBOL. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 22, 2000 6:52 PM To: [EMAIL PROTECTED] Subject: [REBOL] recent experimental core builds Brief notes on items found in the latest experimental versions: Serial port support under windows and unix (others are being added as we go along..) Tcp ports are now asynchronous. If you want the "old" behavior, you need to do OPEN/wait, ie: tcp-port: open/lines/wait tcp://example.com:80 (Jim said he'll come along and say more about some changes to ports...) LOAD has a new refinement: /ALL -- this will ignore REBOL headers when loading. The current and previous experimental versions use the new command line argument passing scheme. There have been a number of bug fixes here and there as well. See if *your* favorite bug is still in there! :-) For lack of any better current documentation on these new features, below are our REPs for the new serial ports, the change in command line passing, and the new LOAD/all refinement. I did not make them into attachments. Hope you all don't mind. -jeff -- REBOL SERIAL PORT SPECIFICATION REBOL Enhancement Proposal: REP004 Version: 1.0.1 Author: Jim Goodnow II ===PURPOSE This specification describes the creation and operation of serial communication ports within REBOL. ===CREATION Serial ports are created in the same manner as other ports within REBOL. The scheme name for serial ports is "serial:". The specification of a serial port may include the device number, the communication speed, the number of data bits, the parity and number of stop bits. The specification information can be specified directly by setting the appropriate fields within the port specification object or by creating a URL which contains the same information. Any field not specified will be given a default value. The default values are: device: port1 speed: 9600 data bits: 8 parity: none stop bits: 1 URL's are encoded with the different fields separated by slashes. For example, serial://port1/9600/8/none/1 The order of fields is not significant, as the type of field can be determined by the content. Within a port specification, the various parameters are stored in the following object fields: host: device speed: speed data-bits: data bits parity: parity stop-bits: stop bits The portN specification is an indirect reference to the communication device. It refers to the Nth device defined in the System/ports/serial block. This block is initialized by default depending on the system being used and can be modified in user.r to reflect any local requirements. For example, on Windows the block might be defined as: System/ports/serial: [ com1 com2 ] or if COM1 is being used by the mouse, it might just be: System/ports/serial: [ com2 ] On unix-style systems, the block might be defined as: System/ports/serial: [ ttyS0 ttyS1 ] or if the first device should correspond to COM2: System/ports/serial: [ ttyS1 ttyS0 ] Thus, the ports can be specified in a machine indpendent manner while the machine specific definition can be controlled using the serial definition block in System/ports/serial. ===OPERATION Serial ports are always opened as direct ports in much the same way as console and network ports. They may be opened as either /STRING or /BINARY with the default being /STRING. They are opened by default as asynchronous, but may be made synchronous by using the /WAIT refinement. When operating asynchronously, any attempts to copy data from the port will return NONE if no data is present. When operating synchronously, the copy will block until data is available. Data can be written to the port using the INSERT native. Data can be read from the port using the PICK, FIRST or COPY natives with the usual ramifications. As usual with direct ports, the REMOVE, CLEAR, CHANGE and FIND functions are not supported. The UPDATE function can be used to change port parameters. For example, to change the speed after an initial connection has been established, you could just do: ser-port: open serial://9600 ser-port/speed: 2400 update ser-port Changing the device number or the System/ports/serial and calling UPDATE will have no effect. Once the port has been opened with a particular device, the device can't be changed. There are two additional port fields that can't be set with a URL, but can be set in a port specification block or by manually changing them. The RTS-CTS field specifies whether hardware handshaking should be used on the
[REBOL] Enhancement Request - Range! datatype Re:(7)
I dont think we need a range datatype. Ranges can be quite complex for different and complex values inviting more and more source manipulation for every new type of value. Besides it seems evident that REBOL is more than powerful enough will little code to get the results desired. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, August 21, 2000 2:23 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [REBOL] Enhancement Request - Range! datatype Re:(6) AllenK wrote: I like the use of "-" but I feel it will cause confusion if a negative is used in the range. -1--10 Actually, the lesser value should be first. So this should be: -10--1 It does look a bit odd for negative numbers. Perhaps both ".." and "-" could be allowed? Then: -10..-1 looks better. ".." does indicate in English text that something has not been left out. But it is confusing if a decimal is used in the range. .1...10 It does look odd. Though it does look slightly clearer if leading zeroes are added: 0.1..0.12 It's better looking with "-": 0.1-0.12 So what other suggestions could we have for the operator? how about? 1to10 -1to-10 .1to.10 Is using n"to"n that different from using n"x"n for pairs? It is immediately obvious that it is a range, ( in English at least). Other ideas? I quite like the "to" as a range! datatype indicator. Thanks for the suggestion, Allen. I've CC-ed this to [EMAIL PROTECTED] For range! datatype, use one or more of the following: - ; The dash. ..; Two full stops. to; The letters to, meaning "to". to indicate a range! datatype. I'd like the ability to have all three as alternatives. But if I'm forced to have only one, I'd prefer "to" as the range! datatype indicator. This shouldn't preclude the use of 'to as a word, just as the pair! datatype doesn't preclude the use of 'x as a word. Andrew Martin ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --
[REBOL] problems with local vars??? Re:(11)
Thanks for this information. Helps. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, August 21, 2000 12:53 PM To: [EMAIL PROTECTED] Subject: [REBOL] problems with local vars??? Re:(10) Hi, you can do: print read http://www.geocities.com/lmecir.geo/evaluation.txt to read my "Rebol Values vs. Human Values" and print read http://www.geocities.com/lmecir.geo/contexts.txt to read "Words, Bindings and Contexts" Regards Ladislav The result is not what I expect. How do we account for this behavior. probe :a "a" I thought the output would be "" Please explain this in more detail. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 20, 2000 4:58 PM To: [EMAIL PROTECTED] Subject: [REBOL] problems with local vars??? Re:(8) Hi, no "Dialect" notion can help you with your problem. (My personal preferences are, that Rebol functions aren't "Rebol dialect", because I think that there is a difference between a Rebol code in a block and a Rebol function, which has got more attributes, than Rebol code - see my Rebol function model in Words, Bindings and Contexts thread.) Back to your problem. The difference you see can be visualised here: probe :a "a" a: 0 b: :a add :b 1 probe :a The results show, that there are differences between integers and strings in Rebol, Rebol strings are mutable (you can change them), while integers are immutable (you cannot change them). More can be found eg. in: www.rebol.org/advanced/mutable.r or in the Evaluation thread. Regards Ladislav second :f is different. It returns a "live" block of code (the body) with the contained words bound to the local frame of the function f. This block of code can be modified with and extended (with append etc. using 'bind if necessary) after the function is created. It seems clear that the interpreter executes the function by 'do-ing this body block. The original reason I originally questioned the relationship between functions and dialects in this thread was due to this "'do-ing the body block" concept. To make the question specific define a function f like this: f: func[/local x][x: {} append x "a" print x] My question then is, how are the first two values (x: {}) of the body block treated when the interpreter executes the function? In terms of purely executing the block, logically it seems, the first two values could be considered redundant, correct? A related issue (maybe), I don't know if it is been asked before. If I now use f, I get: f a f aa Compare this with another function g and its results: g: func[/local x][x: 0 x: add x 1 print x] g 1 g 1 Are these results related to the execution of a function or the interpretation of datatypes? Any enlightenment please? Brett.
[REBOL] REBOL installation
I discovered something interesting today with regard to REBOL installations on Windows 2000 Advance Server. I demoted a Domain Controller using the dcpromo utility and discovered that my REBOL scripts wouldnt launch instead I got the REBOL setup routine as if it wanted to setup again. A quick fix was to simply rename the original directory to c:\program files\rebol2 and then continue to let it setup again and replace or modify REBOL to fit your needs. In case anyone has this issue. Paul Tretter
[REBOL] problems with local vars??? Re:(9)
The result is not what I expect. How do we account for this behavior. probe :a "a" I thought the output would be "" Please explain this in more detail. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 20, 2000 4:58 PM To: [EMAIL PROTECTED] Subject: [REBOL] problems with local vars??? Re:(8) Hi, no "Dialect" notion can help you with your problem. (My personal preferences are, that Rebol functions aren't "Rebol dialect", because I think that there is a difference between a Rebol code in a block and a Rebol function, which has got more attributes, than Rebol code - see my Rebol function model in Words, Bindings and Contexts thread.) Back to your problem. The difference you see can be visualised here: probe :a "a" a: 0 b: :a add :b 1 probe :a The results show, that there are differences between integers and strings in Rebol, Rebol strings are mutable (you can change them), while integers are immutable (you cannot change them). More can be found eg. in: www.rebol.org/advanced/mutable.r or in the Evaluation thread. Regards Ladislav second :f is different. It returns a "live" block of code (the body) with the contained words bound to the local frame of the function f. This block of code can be modified with and extended (with append etc. using 'bind if necessary) after the function is created. It seems clear that the interpreter executes the function by 'do-ing this body block. The original reason I originally questioned the relationship between functions and dialects in this thread was due to this "'do-ing the body block" concept. To make the question specific define a function f like this: f: func[/local x][x: {} append x "a" print x] My question then is, how are the first two values (x: {}) of the body block treated when the interpreter executes the function? In terms of purely executing the block, logically it seems, the first two values could be considered redundant, correct? A related issue (maybe), I don't know if it is been asked before. If I now use f, I get: f a f aa Compare this with another function g and its results: g: func[/local x][x: 0 x: add x 1 print x] g 1 g 1 Are these results related to the execution of a function or the interpretation of datatypes? Any enlightenment please? Brett.
[REBOL] A small security hole REBOL, and a huge one! Re:(2)
Ladislav, Can you provide some example code that demonstrates this security hole. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 20, 2000 5:43 PM To: [EMAIL PROTECTED] Subject: [REBOL] A small security hole REBOL, and a huge one! Re: Hi Brian, the problem is, that even the natives are mutable, as can be seen in Mutable natives thread. Regards Ladislav I hate to be the bearer of bad tidings... First, the small security hole: I just found out that second returns the original code block when applied to a function value. This code block can then be changed, which changes the function without recreating it and reassigning it. This kind of change is invisible to the query and protect functions. This means that a script can add code to any of the mezzanine functions without you being able to tell. I don't know any easy way to protect the REBOL interpreter session from this kind of attack. I know that you should read untrusted code before you execute it on your system, but the WWReb is based on executing distributed code. The first and second functions were changed before to return a copy of the blocks when applied to object values. Is there some reason that second and third applied to function values returns the original? Memory efficiency, perhaps? Avoidance of deep-copying possibly cyclic structures? Can we count on this behavior in the future, or is it subject to change? It enables self-modifying code, for example. If we could count on this trick it would make things more interesting for advanced REBOL programmers. I don't see how adding modules will change this in any way. I don't see how you could prohibit changes in the inner blocks and parens referenced by the code without too much overhead. I guess the best way to secure REBOL is to use the launch function and run the script in a separate, secure interpreter environment. This brings me to my next discovery though... The big security hole: The new launch native! Right now, the launch native launches a new REBOL process with the command line arguments you pass as a parameter. Command line arguments just like those accepted on the command line of REBOL. This command line can include REBOL options, including "--nowindow --quiet --secure none", with no kind of security warning! Launch should be rewritten so that the command line options normally accepted by REBOL are passed as refinements to the launch native. The /secure refinement then needs to have the same restrictions that the secure native would have if called at the same point in the code. Any command line options in the argument any-string! should be ignored by the new REBOL process. This hole is such a major issue that I have Bcc'd this message to Feedback. Fortunately the launch native is only implemented in the experimental releases. Until this is fixed, don't ever run any untrusted code with an experimental REBOL if it has a working launch native (only /View so far)! Don't kill the messenger, please! :( Brian Hawley
[REBOL] Objects Re:(2)
Brett your a blessing to this list. Thanks for the great explanation. I have the Official Guide and hope to cover that topic more as progress. I didnt want to get ahead of myself in the book. Thanks again. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 20, 2000 8:16 PM To: [EMAIL PROTECTED] Subject: [REBOL] Objects Re: "Objects provide a way to group a set of values into a context that can be passed around as a whole and treated as a single value. This is useful for dealing with structures that are more complex in nature, as they allow the data and code to be kept together (encapsulated). Once created, an object can be treated as a single value. It can be passed to a function as an argument, returned from a function as a result, or set to a word. The values within the object are accessed by name. " That was from the user guide. Objects help to structure scripts. Think of how useful local variables are in functions. You create a local variable, use it and know that it will not clash with words outside of the function*. Objects give you local variables and local functions packaged together into one blob. Now that is useful. The local functions can see the local variables and the other local functions and be like a mini-program embedded inside a bigger one. Before I get clouted for using confusing terminology - the guide refers to these as "fields" or "instance variables" and "object functions". Here's an example, when I've been programming using the parse function, I can end up with quite a few parse rules and other variables related to parsing. It might be that I want my parsing functionality to be part of a bigger script - so it would be good to put everything related to parsing (rules, flags, functions) in one spot - an object. Doing this makes my overall script more readable since I know that everything in that particular object relates to the parsing functionality. Also, it simplifies the my naming of words and prevents naming clashes with global words. It sort of like having work areas of a factory floor painted with coloured safety lines in order to separate hazardous machines or processes. As the guide mentions another use for objects is for structuring your data. You can create a special data structure with functions to manipulate it and put these in an object. So you can have object functions that add and remove values from your data structure and be comforted to know that the object is making sure the structure is always mainted properly. Brett. * Unless you have done something quite tricky - but let's leave that for now. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 21, 2000 7:05 AM Subject: [REBOL] Objects What benefit is there to make object!. I have not discovered the usefulness of this yet unless its just to access, thru refinements, the individual values within. Is there a bigger picture that I am missing? Paul Tretter
[REBOL] Refinement Help output
I got the following function which I enhanced from a previous posting with some help from members of this list. How do you get help to display the comments for the refinements. Paul Tretter dec2bin: func[ "Converts Based 10 Integers to Binary" dn [integer!] "Base 10 Integer" /local holder neghold /pad+ zr+ [string!] "Add String to beginning of Output value" /pad- zr- [string!] "Add String to tail of Output value" /rev "Reverses the normal output of the value"][ holder: make string! "" if dn = 0 [holder: "0"] if negative? dn [ dn: absolute dn neghold: 1] while [dn / 2 0][ either dn // 2 0 [insert holder 1][insert holder 0] dn: to-integer dn / 2 ] if rev [reverse holder] if pad+ [insert head holder zr+] if pad- [insert tail holder zr-] if neghold = 1 [return join "-" holder] return holder ]
[REBOL] Refinement Help output Re:(2)
Thanks. That works. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 20, 2000 10:43 PM To: [EMAIL PROTECTED] Subject: [REBOL] Refinement Help output Re: Hi Paul, /local should always be the last refinement. (Because everything from "/local" to "]" is local, which allows multiple lines of locals to be declared.) Change the order so /local is the last refinement, and it will work as expected. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 21, 2000 1:09 PM Subject: [REBOL] Refinement Help output I got the following function which I enhanced from a previous posting with some help from members of this list. How do you get help to display the comments for the refinements. Paul Tretter dec2bin: func[ "Converts Based 10 Integers to Binary" dn [integer!] "Base 10 Integer" /local holder neghold /pad+ zr+ [string!] "Add String to beginning of Output value" /pad- zr- [string!] "Add String to tail of Output value" /rev "Reverses the normal output of the value"][ holder: make string! "" if dn = 0 [holder: "0"] if negative? dn [ dn: absolute dn neghold: 1] while [dn / 2 0][ either dn // 2 0 [insert holder 1][insert holder 0] dn: to-integer dn / 2 ] if rev [reverse holder] if pad+ [insert head holder zr+] if pad- [insert tail holder zr-] if neghold = 1 [return join "-" holder] return holder ]
[REBOL] context of a function Re:(2)
Your killin me. Just when I started to think I was getting this stuff down. :) I need a beer and then I will get to thinking about this one. Time for REBtris. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, August 18, 2000 8:55 PM To: [EMAIL PROTECTED] Subject: [REBOL] context of a function Re: Frank Sievert ([EMAIL PROTECTED]) wrote: Is there a way to get the words of the context of a function? Not directly. Example: f: func [a] [] g: func [a] [print a] Does anyone know a way to change function f AFTER its definition in that way, that it will work like function g? f: :g The following does not work: insert second :f reduce ['print first first :f] Because the first (and third) of a function is not bound to the functions context. I think there is no direct way to get the word with binding, I could only get the words out of functions body :( During the REBOL 2 development process REBOL was changed to specifically prohibit that kind of access. This was done to keep the interpreter from crashing. It's a bad idea to do this kind of thing, as it leads to completely unstable code. I am working at a serialize script, which also serializes contexts etc. The contexts of functions are not properly persistent. While REBOL does save a context for each function, it only does so for the purpose of reuse. The values of the words in that context are trounced with every call to the function. If you want to write solid code in REBOL, you should pretend that the function contexts are completely volatile between calls, even if the current implementation makes this not so on some occasions. The only persistent contexts you need to concern yourself with are object contexts. If you serialize any more contexts than that, people who use your code might try to depend on persistence of contexts between sessions that aren't even persistent within the same session. If you want to use persistent values within the context of a function (like static variables in C), use the technique of embedding series or object values in the code block of the function. Do you remember the recurring discussions that begin with someone new to REBOL getting tripped up because they did a: [] in function code, expecting it to behave like a: copy [] instead? Someone always calls this a bug in the language design, but used properly it can be one of REBOL's most powerful features. For example, try this: f: func [x /local a] [ a: [] append/only a x foreach x a [print x] ] This code depends on the block embedded in the function being modified by the function, and having those changes be persistent. All you would need to save here would be the spec and code blocks of the function to be saved - it doesn't depend on the context being persistent, which is good because function contexts effectively aren't. This same technique can be used with values that aren't directly representable as literals, such as hashes, lists, bitsets, functions and objects, if you create the function code block with some function like compose. For example, in this function: alphanum?: func [s /local alphanum] compose [ alphanum: ( charset [#"a" - #"z" #"A" - #"Z" #"0" - #"9"] ) parse/all s [some alphanum] ] ..., the function charset is only called once, before the function alphanum? is created. The local variable alphanum is assigned to the now literal bitset value embedded in the code of the function, rather than being recreated every time the function is called, an expensive process. You can use this technique to speed up functions that parse using local character sets, to index using local hashes, to create local functions without having to recreate them at each call - basically anywhere you need to hide persistent values from uncontrolled modification. If you are used to programming in the functional style, with closures, this is how to have persistent data. Of course, none of this will be needed when Carl gets done with REBOL modules. When that happens you will be able to use modules for all of your information-control needs and you won't need to do these more arcane closure-type hacks. Brian Hawley
[REBOL] Selma
How do I get the source for selma.
[REBOL] Pauls REBOL Page
Does anyone recall my search engine I used to have and does anyone think I should put it back online along with examples code so that others can reference a command or funtion from the dictionary and view an example to further understand the language. I have been tossing around the idea but want it exclusively done in REBOL this time. I also have some projects I have been working on that I will most likely post since they will be very useful to many including my FTP client and Subnet Calculator along with others. Pauls REBOL Page Coming BACK Soon! Special Thanks to Carl and the REBOL staff for a wonderful language! Even PHP and Perl couldnt convince me otherwise. Paul Tretter
[REBOL] word Re:
How about: block: ["a" "b" "c"] foreach member block [print member] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 13, 2000 10:39 AM To: [EMAIL PROTECTED] Subject: [REBOL] word I am confused. Consider this small script: REBOL [] block: ["a" "b" "c"] code: [print member] foreach member block [do code] Upon execution, I get : ** Script Error: member has no value. ** Where: print member I guess I have to use 'bind or 'use somewhere, but I'm not sure which and how. Thanks for your help -- Fantam
[REBOL] curiosity killed the code-generator Re:(3)
what -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 06, 2000 8:20 PM To: [EMAIL PROTECTED] Subject: [REBOL] curiosity killed the code-generator Re:(2) I know that there is a way to get a list of all rebol words, and have used it before, but have forgotten. How do I do that again? Thanks Tim
[REBOL] REBOL the Official Guide Re:(2)
I got my book today and wow is it packed. Totally awesome! Much better than I expected. By the way Carl thanks us all for our participation in this great list. Get the Book - you will be glad you did. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, August 04, 2000 4:26 PM To: [EMAIL PROTECTED] Subject: [REBOL] REBOL the Official Guide Re: Hi, I want to make your words mine. I think Rebol just a great product and an excelent language to start programming. Carl and his team have done a real great job! I ordered my copy of REBOL Official Guide just yesterday at Amazon books by less than US$ 28 and I'm anxious to put my hands on it! Unfortunatelly in my country, Brazil, I have not found yet other people that program with REBOL to exchange some experience. I also would like to make an invitation to the people in this group that speaks Portuguese :-) to join me and help me build a Portuguese web site dedicated to REBOL. Greetings Carlos Lorenz - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Quinta-feira, 3 de Agosto de 2000 18:03 Subject: [REBOL] REBOL the Official Guide I just want to urge everyone who is serious about learning REBOL to buy the book "REBOL - The Official Guide". I dont work for REBOL or anyway profit from this book. However, I know many people on these lists have had great benefits from RT products whether beta or not. Carl and his staff have worked very hard to create a great product and I have heard great things about the book. I myself have already ordered and await anxiously for arrival. I also want to thank all of you for your help and contribution to the lists. Amazon, is asking for reviews so if you have recieved the book Im sure you will post great things about the book. Have fun everyone! Paul
[REBOL] REBOL the Official Guide
I just want to urge everyone who is serious about learning REBOL to buy the book "REBOL - The Official Guide". I dont work for REBOL or anyway profit from this book. However, I know many people on these lists have had great benefits from RT products whether beta or not. Carl and his staff have worked very hard to create a great product and I have heard great things about the book. I myself have already ordered and await anxiously for arrival. I also want to thank all of you for your help and contribution to the lists. Amazon, is asking for reviews so if you have recieved the book Im sure you will post great things about the book. Have fun everyone! Paul
[REBOL] Context Stuff Re:(2)
Excellent, That solved the problem. I will post the function to the list. Its a function to convert decimal to binary and works with integers larger than 255. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 31, 2000 8:05 PM To: [EMAIL PROTECTED] Subject: [REBOL] Context Stuff Re: Hi Paul Just guessing about your problem, if this is not the answer, you will need to show us some code. I guess you have something like: f: func [arg /local str][ ... str: "" ... do something that appends something to string ... ] If so, the problem is not really contexts, but the nature of series literals in REBOL. If you want an empty string each time the function f is entered, replace str: "" with str: copy "" ;creates a new empty string each time HTH -Larry - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 31, 2000 5:39 PM Subject: [REBOL] Context Stuff Ok, I have been trying to understand this context stuff. I know have a reason to. I created a function and have a "word" within a while function embedded within. The problem is that the function does everything I want the first time. However the "word" within the while function continues to hold the last value. I can do a source on the function and see the last value within. How can I have the function return the string value to nothing at the end of exection.
[REBOL] Decimal to Binary Script Re:(2)
This is excellent stuff and I will be absorbing everything you have done. I knew it didnt correctly handle negative integers and I also knew that it would clobber "holder". Your suggestions are excellent and I appreciate your comments. I originally made this to supplement a Subnet Calculator that I was working on which my function was sufficient. I like your modifications and explaination. Thanks for all the feedback. Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 01, 2000 10:52 AM To: [EMAIL PROTECTED] Subject: [REBOL] Decimal to Binary Script Re: [EMAIL PROTECTED] wrote: Ok, I created my first useful function. Congratulations! Good feeling, isn't it? I always get psyched when I get my head around a tool well enough to actually do something with it. I created the following function because enbase/base value 2 gave me a limitation. So add this script to your %user.r file. Wish this could be added to /Core as it really needs a simple function for this. I hope to post a view based Subnet Calculator soon. Let me know if it helps. Paul Tretter dec-to-bin: func[ "Converts Based 10 Integers to Binary" dn [integer!] "Base 10 Integer"][ holder: copy "" while [dn / 2 0][ either dn // 2 0 [insert holder 1][insert holder 0] dn: to-integer dn / 2 ] print holder ] Can I make a couple of suggestions? 1) As written, the function doesn't convert "integers", but only positive integers. For example: dec-to-bin -1 0 dec-to-bin -10 dec-to-bin 0 Handling these cases will make the function more general. 2) Since "holder" is not declared local, it shows up in the global context. This is A Bad Idea. If there was already a variable or function named "holder", invoking dec-to-bin would clobber it! 3) Instead of printing the result, why not simply return it? If the result is returned to an interactive session, it will be printed anyway. However, making the result available for further processing allows for more general use. For example, how many bits does it take to hold 4508321? (see below) 4) Avoid unnecessary tests whenever possible. In the line of code either dn // 2 0 [insert holder 1][insert holder 0] notice that the expression dn // 2 returns 0 or 1 (for natural dn, but see below), therefore this line can be shortened to insert holder dn // 2 With all of these suggestions implemented, the function looks like this (the name change was simply so that I could have both defined at once...) dec2bin: func[ "Converts Based 10 Integers to Binary" dn [integer!] "Base 10 Integer" /local holder "accumulate non-zero results" ][ either dn = 0 [ "0" ][ either dn 0 [ holder: next copy "-" dn: - dn ][ holder: copy "" ] while [dn 0][ insert holder dn // 2 dn: to-integer dn / 2 ] head holder ] ] And, to check the suggestions... dec2bin 0 == "0" dec2bin -1 == "-1" dec2bin -10 == "-1010" dec2bin 4508321 == "1000100110010101011" This last case (from point 3) reminds me to do length? dec2bin 4508321 == 23 About the open issue from point 4, don't bother to read the rest of this if you don't care about the mathematics -- the suggested implementation in dec2bin avoids signed integer arithmetic and is therefore immune from the problem discussed below. -jn- REBOL (unfortunately, in my opinion) interprets "to-integer" as "the integer part as written out in text", rather than the more mathematically correct "largest integer not exceeding" (and REBOL is not alone in this). What this means is that we get -5 // 2 == -2.5 to-integer -5 / 2 == -2 Now, based on the definition of remainder, / and // MUST satisfy (for integral a and b) a = b * (to-integer a / b) + (a // b) which backs us into the weird case that -5 // 2 == -1 Why is this weird? There's lots of useful mathematics (and several useful programming techniques, as well) based on the idea that the modulus (remainder after division) is ALWAYS bounded between zero and (divisor - 1). For example, think about "clock arithmetic" using a 24-hour clock (in which the hours run from 0 to 23). To get the hour that is thirteen hours after four in the afternoon, just evaluate (4 + 12 + 13) // 24 == 5 that is, 4 (o'clock) + 12 (i.e. PM) + 13 (elapsed time). BUT... If I want to find out what hour is seventeen hours before three in the morning, I get a problem... (3 - 17) // 24 == -14 which ISN'T on the clock. We can sidestep this ugliness by either 1) making sure
[REBOL] Decimal to Binary Script Re:(2)
I believe the one your referring to used the enbase function which is limited in handling "0-255" to binary. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 01, 2000 10:56 AM To: [EMAIL PROTECTED] Subject: [REBOL] Decimal to Binary Script Re: That's cool Paul. BTW: If you check out the user's guide, you'll see the function print-binary in the section on logical operators. It does the same thing, but I as a relative newbie find yours more readable. Might be fun to compare benchmarks. hmmm! -Tim At 07:48 AM 8/1/00 -0500, you wrote: Ok, I created my first useful function. I created the following function because enbase/base value 2 gave me a limitation. So add this script to your %user.r file. Wish this could be added to /Core as it really needs a simple function for this. I hope to post a view based Subnet Calculator soon. Let me know if it helps. Paul Tretter dec-to-bin: func[ "Converts Based 10 Integers to Binary" dn [integer!] "Base 10 Integer"][ holder: copy "" while [dn / 2 0][ either dn // 2 0 [insert holder 1][insert holder 0] dn: to-integer dn / 2 ] print holder ]
[REBOL] input a bunch? Re:
How about: something: ask "Type Something " -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 25, 2000 5:38 PM To: [EMAIL PROTECTED] Subject: [REBOL] input a bunch? hey list guys, I have something like this: print "type something" input: somthingtyped this works like a champ when I type stuff in at the console. but I'd prefer to get it in some other way, and pasting mucks stuff up. how can I get, say, a paragraph into input? I'm typing in stuff that I don't know beforehand... thanks, -- Spend less time composing sigs. -tom
[REBOL] ENBASE bug
Does anyone know if enbase/base refinement has a bug. When I do the following: a: "2" enbase/base a 2 I get: "00110010" This must be a bug or I need more understanding. -- Is your email secure? http://www.pop3now.com (c) 1998-2000 secureFront Technologies, Inc. All rights reserved.
[REBOL] FXP Site to Site transfers
Does anyone know if REBOL/Core support FXP capabilities such as like the flashfxp ftp client at www.flashfxp.com. I have not seen any information on how to do this.
[REBOL] Error explanation Re:(2)
Thanks for all your help. In the last few days I have had several questions about problems I have had and the answers have been great which shows this list is very much alive and well. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 15, 2000 9:23 PM To: [EMAIL PROTECTED] Subject: [REBOL] Error explanation Re: [EMAIL PROTECTED] wrote: Please explain this error I get: ** Script Error: val needs a value. ** Where: val: first params switch/default type?/word Do this - val: print "" You get the same error, because print doesn't return a value, and Rebol needs a value to set val with. type? print "" == unset! So when layout parses your code, when it reaches 'area print data', it sees that 'print data' is a function, tries to evaluate it and get the result. But print returns no result, so it bombs. The second problem is that the data variable is a block, and you want it in string form. So replace print with form - view layout [ text "Directory contents:" area form data ] That's very basic, and puts everything on one line. So lets use a function that will put each entry in the block on a seperate line, and this is what you end up with - REBOL [] block-to-lines: func [blk /local result] [ result: copy "" foreach line blk [ repend result [line newline] ] result ] ftpaccess: layout [ backdrop 0.128.0 title "Pauls FTP Access" 255.255.0 text "Enter Host Address/Directory" hr: field "127.0.0.1" text "Login Name" ln: field "administrator" text "Password" Pw: field "testpwd" button "FTP Access" [ ftpurl: join ftp:// [ln/text ":" pw/text "@" hr/text] data: read ftpurl view layout [ text "Directory contents:" area block-to-lines data ] ] ] view ftpaccess If you ever do need to set a value as unset, do this - set/any 'val print "" value? 'val == false Julian Kinraid I get the above error when executing this script I created: REBOL [] ftpaccess: layout [ backdrop 0.128.0 title "Pauls FTP Access" 255.255.0 text "Enter Host Address/Directory" hr: field "127.0.0.1" text "Login Name" ln: field "administrator" text "Password" Pw: field "testpwd" button "FTP Access" [ ftpurl: join ftp:// [ln/text ":" pw/text "@" hr/text] data: read ftpurl view layout [ text "Directory contents:" area print data ] ] view ftpaccess
[REBOL] DOES Re:(2)
excellent thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 15, 2000 10:37 AM To: [EMAIL PROTECTED] Subject: [REBOL] DOES Re: - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 1:56 AM Subject: [REBOL] DOES Does anyone know where to find the documentation for the DOES command. Use does when your function does not require arguments or locals. e.g instead of using func with a an empty arg block print-hello: func [][print "Hello"] use print-hello: does [print "Hello"] ? does USAGE: DOES body DESCRIPTION: Defines a function that has no arguments or locals. DOES is a function value. ARGUMENTS: body -- The body block of the function (Type: block) (SPECIAL ATTRIBUTES) catch It is also documented in notes.html for core 2.3 Does Use does to create functions with out arguments or locally defined words. For example: get-script-dir: does [probe system/options/path] probe get-script-dir %/usr/local/rebol/ Cheers, Allen K
[REBOL] Error explanation
Please explain this error I get: ** Script Error: val needs a value. ** Where: val: first params switch/default type?/word I get the above error when executing this script I created: REBOL [] ftpaccess: layout [ backdrop 0.128.0 title "Pauls FTP Access" 255.255.0 text "Enter Host Address/Directory" hr: field "127.0.0.1" text "Login Name" ln: field "administrator" text "Password" Pw: field "testpwd" button "FTP Access" [ ftpurl: join ftp:// [ln/text ":" pw/text "@" hr/text] data: read ftpurl view layout [ text "Directory contents:" area print data ] ] view ftpaccess
[REBOL] FW: Object
I have a field that returns an object datatype. How do I convert the object datatype to a string datatype? I also had a thought about the REBOL documentation - it would be an added benefit to new users such as myself if the site had a techsupport page with error message descriptions as I have not found any descriptions on the REBOL site.
[REBOL] FW: Object Re:(2)
thanks it worked -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 14, 2000 9:39 AM To: [EMAIL PROTECTED] Subject: [REBOL] FW: Object Re: I have a field that returns an object datatype. How do I convert the object datatype to a string datatype? Simply ask the object to return a string describing itself. Or you could try: to string! Your_Object_Here or similar, depending on what you're trying to do with it. I also had a thought about the REBOL documentation - it would be an added benefit to new users such as myself if the site had a techsupport page with error message descriptions as I have not found any descriptions on the REBOL site. Send a message into [EMAIL PROTECTED] asking about it. The more people who ask, the more it's likely to get done, I think. :-) I hope that helps! Andrew Martin Up too early and too late... ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --
[REBOL] Block to string
here is my sample script. The problem is that he script continues evaluate the block as objects instead of strings. Someone tell me how to get the correct URL out of this instead of ftp://?object?:?object?@?object? which should be ftp://administrator:[EMAIL PROTECTED] -- REBOL [] view layout [ backdrop 0.128.0 title "Pauls FTP Access" 255.255.0 host-addr: text "Enter Host Address" field "127.0.0.1" login-name: text "Enter Login Name" field "administrator" Pass-word: text "Enter Password" field "whatever" button "Convert to string" [ host-addr2: to string! host-addr login-name2: to string! login-name Pass-word2: to string! Pass-word ] button "test" [ print type? host-addr2 print type? login-name2 print type? Pass-word2 ]
[REBOL] Block to string Re:(2)
Still doesnt work - I now get: string string string ftp://Enter Login Name:Enter Password@Enter Host Address Paul Tretter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 14, 2000 12:59 PM To: [EMAIL PROTECTED] Subject: [REBOL] Block to string Re: don't do this: button "Convert to string" [ host-addr2: to string! host-addr login-name2: to string! login-name Pass-word2: to string! Pass-word ] but this might work: button "Convert to string" [ host-addr2: host-addr/text login-name2: login-name/text Pass-word2: Pass-word/text ] -galt (I don't know much about /View yet.)
[REBOL] Take the Vote! Re:(2)
Charter Communications is working on the problem. They have asked me to provide monitoring for them which I currently am. Please be patient. If anyone wants to provide free hosting let me know. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 02, 2000 02:29 PM Subject: [REBOL] Take the Vote! Re: I can't even see the page, the browser just times out. [EMAIL PROTECTED] wrote: I received only 9 Project Submissions for the Rebol Collaboration project. Today is the first day of voting. Check it out at Paul's Rebol Page - http://p1-110.charter-stl.com/rebolsearch Yes - the Voting Form is powered by Rebol. Paul Tretter Paul's Rebol Page -- Michal Kracik
[REBOL] Project Submissions
I have only 7 projects to date. The deadline for Project submissions is March 1st. If you have any good ideas we liked to here them. Follow the project submission links at http://p1-110.charter-stl.com/rebolsearch. Paul Tretter Paul's Rebol Page
[REBOL] Project Submissions
Please continue to submit projects. We need more submissions. Currently only 6 projects have been submitted. Im sure we have more ideas than those submitted. Remember, you can submit more than one project. Paul Tretter Paul's Rebol Page http://p1-110.charter-stl.com/rebolsearch The Rebol Docs Index
[REBOL] Project Submissions Re:(2)
Just join on the newsgroup from the main page at http://p1-110.charter-stl.com/rebolsearch. or news://p1-110.charter-stl.com/rebol.discuss I hope this helps. Paul Tretter Paul's Rebol Page - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 15, 2000 07:36 PM Subject: [REBOL] Project Submissions Re: How do you review what has already been submitted on the site? Dave. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 15, 2000 5:02 PM Subject: [REBOL] Project Submissions Please continue to submit projects. We need more submissions. Currently only 6 projects have been submitted. Im sure we have more ideas than those submitted. Remember, you can submit more than one project. Paul Tretter Paul's Rebol Page http://p1-110.charter-stl.com/rebolsearch The Rebol Docs Index
[REBOL] Rebol Project Submission Form
Lets Collaborate! I have made a new submission form for submitting your favorite idea for a Rebol project. This will allow for an orderly way to allow all users to jointly make robust Rebol applications. This effort is dependent on group participation. Submit your projects at Paul's Rebol Page. Paul Tretter Paul's Rebol Page http://p1-110.charter-stl.com/rebolsearch
[REBOL] Search Engine
The Rebol search engine at Paul's Rebol Page has now been submitted to several of the large search engines, ie. Altavista, Hotbot, etc... Hopefully you will have any easier way of finding it in the future. As always enjoy. Paul Tretter Paul's Rebol Page http://p1-110.charter-stl.com/rebolsearch
[REBOL] Rebol Search Engine updated!
Paul's Rebol Page has been updated. The index now includes catagorical searches based on selection criteria. This makes it much easier to find what your looking for. Check it out. Maybe in the future I will get Rebol/View docs indexed as well. I will let Carl decide that. Paul Tretter Paul's Rebol Page http://p1-110.charter-stl.com/rebolsearch/
[REBOL] Rebol Projects
Soon I will be setting up Paul's Rebol Page to allow users to submit project ideas and have the vistors to the site vote on the projects to decide what projects should be implemented. After that, everyone will be allowed to collaborate on the "project" and create very professional applications. At least that is the goal. This will allow and facilitate continued improvement with some of the best programmers interacting with others to develop their Rebol skills as well. This idea is open for comment, so please post your ideas. Paul Tretter Paul's Rebol Page http://p1-110.charter-stl.com/rebolsearch/ news://p1-110.charter-stl.com/rebol.discuss
[REBOL] How do you access the windows registry with Rebol
Anyone know how to access the windows registry with Rebol. I seem some very good cases where I may want to do some file manipulation and installations and pass onto the registry some entries based on logical arguments.
[REBOL] New Rebol Newsgroup
I have started a Rebol Newsgroup. Please join in and start the posts! Have fun. Here are the details. nntp server: private.charter-stl.com newsgroup: rebol.discuss I have setup the server to allow other servers to pull the newsgroups. Enjoy and let me know your recommendations. Paul Tretter Paul's Rebol Page (Rebol Search Engine) http://24.217.20.110/rebolsearch/rebol.htm
[REBOL] Announcing: REBOL/View Re:
I will definately do my part in testing Rebol/View and doing some marketing as well. Looks great so far. Paul Tretter Paul's Rebol Page http://24.217.20.110/rebolsearch/rebol.htm - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 29, 2000 06:54 AM Subject: [REBOL] Announcing: REBOL/View The official announcement: 4AM PST, REBOL/View beta has "shipped". Thanks so much to the entire REBOL team for cranking on this release so many sleepless nights over the last few weeks. So much has come together in such a short period of time... We are very excited, as a dream of 18 years becomes a reality. Sure, there is more we'd like to add to it. There are more gadgets to add to CID, and many other GUI dialects yet to be written. But we think this is a great beginning... a way to put computing power back into the hands of its owners. I very much hope you enjoy REBOL/View, and if you do, please be sure to tell five other people about it... We can use all the help you can give us in getting the word out. Have a great rebollious weekend, -Carl
[REBOL] Search Engine for Rebol Docs Re:
Let me know if you still have problems. I have removed the Cascaded style sheets reference from the HTML. I also added a few keywords to the search index. http://24.217.20.110/rebolsearch/rebol.htm enjoy! - Original Message - From: Dan Stevens To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Wednesday, January 26, 2000 10:49 AM Subject: Re: [REBOL] Search Engine for Rebol Docs Hey Paul, Really cool...a couple of us have tried it out and it's a great addition for the community. Some comments...First, I'm running Windows NT...some terms like "do" and "get" result in errors (possibly because they turn up to many results?). Also, when clicking on the tips, I get an error message, which then locks up my browser (Netscape 4.7). Even after killing my browser and re-opening, it is still locked up. I have to manually go into the task manager and kill a remaining open netscape.exe in order to run my browser again. I believe this problem is due to use of cascading style sheets, but I'm no expert (not even an amateur), so I'll let you track it down. FWIW, we duplicated the same problems on other machines in the office.Regards,Danp.s. you can share this message and a reply with the list if you think there would be added value. I figured I'd leave it to your discretion in case these comments are useless. At 08:45 AM 1/26/00 -0600, you wrote: Check out my search engine at http://24.217.20.110/rebolsearch/rebol.htm