[REBOL] Bug in Rebol/Core font selection under Win2000
Hello, I've finally uncovered a bug in Rebol/Core. When I start Rebol from the initial state (standard font, not fullscreen), I see the standard Win2000 system font (the bold one). If I set the font to Courier New 9, and close Rebol, it does not remember this next time I start Rebol. If I select the font, then maximise the Rebol console, and then quit, it does register my changes and starts with Courier New 9, the next time (maximised of course). If I then 'de-maximise' the console to its original dimensions and quit, Courier New 9 is retained. I guess it has something to do with the new Opentype standard? Regards, Rachid
[REBOL] Did anyone notice yet?
Hey everyone, I'm behind on my mails again (1200 or so to go), and came accross this one... Indeed, there are no more 'unsubsribe' messages anymore! ;o) Thanks! Rachid - Original Message - From: [EMAIL PROTECTED] To All List Users, The user lists will be taken offline for maintenance today. Please excuse this interruption, we will have them operational again shortly. We are adding some features to the lists that will prevent some of the issues we have experienced in the past, including filtering out those pesky "unsubscibe" emails.
[REBOL] Andrew, you beast! - GC too tidy? Re:(8)
> b> By the way, there is nothing about REBOL's GC problem that is > b> inherent in its execution model. It can be fixed, and it can > b> be avoided easily until it is fixed. As GC bugs go, I've seen > b> much worse than that. I'd still like it fixed, though :( > > Yup. I assume they have a very good reason for not fixing it > (perhaps the new features promised by Carl?). I've been informed by Bo, that the GC bug is one of the top ten bugs to fix in Rebol. Andrew, Thanks for pointing out the problem with USE values getting recycled. This is already in our bug database and has been reported as one of our Top 10 bugs to development. I really appreciate that you took the time to submit this! Thanks for helping to make REBOL products better! REBOL Support Andrew Martin ICQ: 26227169 http://members.xoom.com/AndrewMartin/ -><-
[REBOL] using tcp:// with an unknown port Re:(4)
As an addition to this message, how would one do the following? When one connects to a remote IP address, we get a local port number as well as a remote port number. How do I find out what the local port number is? For example: >> z: open tcp://192.168.0.1:21 >> probe z make object! [ scheme: tcp host: 192.168.0.1 port-id: 21 user: none pass: none target: none path: none proxy: none access: none allow: none buffer-size: none limit: none handler: none status: none size: none date: none url: none sub-port: none locals: none state: make object! [ flags: 524819 misc: 80 tail: 0 num: 0 with: "^M^/" custom: none index: 0 func: 3 fpos: 0 inBuffer: none outBuffer: none ] timeout: none ] We know we are connected to remote port 21, and we know by my netstat that: Active Connections Proto Local Address Foreign AddressState ...stuff... TCPdavids:4403server:ftp ESTABLISHED ...stuff... How would I know what my local port is? z/port-id appears to be the remote port when you open one, or the local port if you specify "tcp://". David Logan > [EMAIL PROTECTED] wrote: > > Hi Deryk, > > > > Not sure if this is what you mean or not.. > > > > If no port-id is specified, an available port will be allocated > > (This example works in Rebol/View) > > > > my-conn: open tcp:// > > my-conn/port-id > > ==2664 > > >> my-conn2: open/lines tcp:// > > >> my-conn2/port-id > > == 2665 > > Allen, > > Yeah, that's exactly what I was hunting for. Perhaps this should be > documented. :) http://www.rebol.com/howto.html#tcp.html It is in the "how-to", under "Opening an Listen Port" but I didn't see it mentioned in the other docs. Cheers, Allen K
[REBOL] making a big file
Goal, Mt. GigaJunk, a gigabyte of junk. just as before, having given up on open/binary/direct followed by insert tail, I am using write/append now to avoid buffer problems and not being able to jump to the tail of the file to append with the open command. Now I got another problem. I had %waste2, now an 11 meg file of junk. I have %waste, now about 143 meg and growing. when I do this, it works: x: read %waste2 write/append %waste x so far so good, but if I do this, it fails out of mem: for i 1 50 1 [write/append %waste x] so, I did what any fool with memory problems does: for i 1 50 1 [write/append %waste x recycle/on] and at least now it is still running. of course, this was /Core. Still haven't had time to try /View. Can Rebol reach the peak? That is the question! -galt
[REBOL] teeny-bits-of-time/2 Re:(2)
Unfortunately, neither the daytime (RFC 867) or time (RFC 868) protocols appear to handle subsecond times. The Network Time Protocol (RFC 958) does, but someone would have to write that protocol for Rebol. In any case, you really want to be able to access subsecond times locally. Rodney -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 5:28 PM To: [EMAIL PROTECTED] Subject: [REBOL] teeny-bits-of-time/2 Re: >Any suggestions on how this might be implemented? Can you make an use of 'read daytime://129.6.15.29? That IP gives me the fastest response from Gaithersburg Maryland north of Pittsburgh PA. You'd probably get better response from a server close to you.
[REBOL] open/direct not working right?
Hi, I tried to do this: %waste2 is just about 3 megs of junk data. I want to build %waste, a file with about a gigabyte of junk. x: read %waste2 o: open/binary/direct %waste for i 1 300 1 [ insert tail o x ] close o when I do this, the file doesn't usually grow. If it does, it always starts from the beginning as if the "tail o" part were ignored. Is this just how /direct works? Why can't I seek to the end of the file and just append some data without some buffering getting in the way? If I don't say direct then rebol tries to buffer the whole file as a series, and needless to say crashes or says out of mem, etc. on large data like this. I finally discovered write/append but why can't I work with the file as a series properly? My OS is NT and it certainly has random access to any part of the file, just as any part of the series, so you should have no trouble mapping the rebol series operations to the OS file operations. Has anybody reported this problem? I discovered it using /Core, have not tested /View yet. Thanks, -galt
[REBOL] teeny-bits-of-time/2 Re:
>Any suggestions on how this might be implemented? Can you make an use of 'read daytime://129.6.15.29? That IP gives me the fastest response from Gaithersburg Maryland north of Pittsburgh PA. You'd probably get better response from a server close to you.
[REBOL] teeny-bits-of-time/2 Re:
I would think that /Core really needs to return the known subsecond value when now/time is called. RT obviously recognized the need because they allow you to represent times down to the nanosecond (look at the time! datatype description in users guide) and it seems restrictive to me to not allow now/time to return the nanoseconds part of the time. The only issue here is that every OS is different and some don't allow subsecond timing and most only allow millisecond timing. Plus the time functions for each OS are different if you want this subsecond info. But it is possible to handle it. Once /Command comes out you will be able to write your own function to do this - but then you'll be stuck with the OS you choose to write it for so I really hope RT puts this in /Core. There really is no good way to hack around it. Rodney Snell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 4:26 PM To: [EMAIL PROTECTED] Subject: [REBOL] teeny-bits-of-time/2 In my quest to count teeny bits of time in REBOL, I created the following counting expression which makes note of how high REBOL can count in increments of 1 within a single second. forever [ t: now c: 1 while [ now = t ][ c: c + 1 ] print c append b c c: copy [] ] Of course, the results are entirely dependent upon the computer system you are using and how many other tasks the computer may be processing at the moment. Here are the results of running the expression on an Intel Celeron 333MHz workstation running Windows NT 4 (bear in mind the first number returned is the remaining number of times the expression can count from 1 within the second the expression begins): 2498 37594 37261 37103 37313 37555 37551 37274 37472 37563 37195 37539 37556 37496 37579 37386 37540 37108 >> I guess this is a REBOL benchmarking expression of sorts. If you could run this expression continuously while running other REBOL scripts--and if you could call the count from within the expression using another REBOL script running in parallel--you could create a fraction of a second based on the average count total during a specified period of time. For example, you call 'c from the expression when 'c = 2000. Perhaps the average number of counts during the previous 10 seconds was 37,501 counts per second. Then the fraction would be .053331 seconds. REBOL could return a special 'now of >> now == 19-Jun-2000/18:20:44.053331-5:00 or >> current-time: now/time == 18:20:44.053331-5:00 Then you have your milliseconds, microseconds, and nanoseconds as follows: >> print current-time/second 44 >> print current-time/millisecond 5 >> print current-time/microsecond 33 >> print current-time/nanosecond 31 Of course, this is a very imprecise way of measuring sub-second intervals in REBOL. Any suggestions on how this might be implemented? -Ryan
[REBOL] teeny-bits-of-time/2 Re:
Oops. My example should read... >>current-time: now/time == 18:20:44.053331911-5:00 Then you have your milliseconds, microseconds, and nanoseconds as follows: >>print current-time/second 44 >>print current-time/millisecond 53 >>print current-time/microsecond 331 >>print current-time/nanosecond 911 > For example, you call 'c from the expression when 'c = 2000. Perhaps the > average number of counts during the previous 10 seconds was 37,501 counts > per second. Then the fraction would be .053331 seconds. REBOL could return > a special 'now of > > >> now > == 19-Jun-2000/18:20:44.053331-5:00 > > or > > >> current-time: now/time > == 18:20:44.053331-5:00 > > Then you have your milliseconds, microseconds, and nanoseconds as > follows: > > >> print current-time/second > 44 > >> print current-time/millisecond > 5 > >> print current-time/microsecond > 33 > >> print current-time/nanosecond > 31 > > Of course, this is a very imprecise way of measuring sub-second intervals > in REBOL. > > Any suggestions on how this might be implemented? > > -Ryan >
[REBOL] A data inconsistency Re:(6)
Time for bed, lost head: change copy [element] head insert/only copy [] get/any 'value
[REBOL] teeny-bits-of-time/2
In my quest to count teeny bits of time in REBOL, I created the following counting expression which makes note of how high REBOL can count in increments of 1 within a single second. forever [ t: now c: 1 while [ now = t ][ c: c + 1 ] print c append b c c: copy [] ] Of course, the results are entirely dependent upon the computer system you are using and how many other tasks the computer may be processing at the moment. Here are the results of running the expression on an Intel Celeron 333MHz workstation running Windows NT 4 (bear in mind the first number returned is the remaining number of times the expression can count from 1 within the second the expression begins): 2498 37594 37261 37103 37313 37555 37551 37274 37472 37563 37195 37539 37556 37496 37579 37386 37540 37108 >> I guess this is a REBOL benchmarking expression of sorts. If you could run this expression continuously while running other REBOL scripts--and if you could call the count from within the expression using another REBOL script running in parallel--you could create a fraction of a second based on the average count total during a specified period of time. For example, you call 'c from the expression when 'c = 2000. Perhaps the average number of counts during the previous 10 seconds was 37,501 counts per second. Then the fraction would be .053331 seconds. REBOL could return a special 'now of >> now == 19-Jun-2000/18:20:44.053331-5:00 or >> current-time: now/time == 18:20:44.053331-5:00 Then you have your milliseconds, microseconds, and nanoseconds as follows: >> print current-time/second 44 >> print current-time/millisecond 5 >> print current-time/microsecond 33 >> print current-time/nanosecond 31 Of course, this is a very imprecise way of measuring sub-second intervals in REBOL. Any suggestions on how this might be implemented? -Ryan
[REBOL] A data inconsistency Re:(5)
Correcting myself: really working method how to change an element of a block to any Rebol value is: change copy [element] insert/only copy [] get/any 'value the previous method didn't work for errors. > Hi, > > {8^D > > although it looked useless at a first glance, it really is a way, > how to change an element of a block to any value: > > change copy [element] reduce [get/any 'value] >
[REBOL] layout/style ? Re:
[EMAIL PROTECTED] wrote: > in /view i tried > > view layout/style [ ... ] [ cust-feel: make feel [ ..some-feel.. ] > ] > you can create your own styles: my-styles: stylize [txt24 text [font/size: 24]] view layout [styles my-styles txt24 "ahoy"] as for feel - it's just object, and so you can pass it to any face view layout [styles my-styles txt24 "ahoy" [print "ahoy"]] - if you add action block to VID dialect, 'layout func parser recognises it, and 'text object has assigned a a feel, and for the text it is 'hot IIRC. You can change it via setting in your own style using 'stylize... ... not sure if it will work that way though ... :-) -pekr- > > and i got > > ** Script Error: layout has no refinement called style. > > what am i suppose to do if (possible?) to adjust feel through layout? > appreciate help. > > -z > > __ > Do You Yahoo!? > Send instant messages with Yahoo! Messenger. > http://im.yahoo.com/
[REBOL] A data inconsistency Re:(4)
Hi, {8^D although it looked useless at a first glance, it really is a way, how to change an element of a block to any value: change copy [element] reduce [get/any 'value] thanks! > [EMAIL PROTECTED] wrote: > >I really wanted to have an unset value in a block. (my apologies, > >if the code looked too cryptic). > > [skipping cryptic code :) ] > > Try this > >> reduce [()] > == [unset] > > Brian Hawley > >
[REBOL] layout/style ? Re:
Hi z Try >> view layout/parent .. The name was changed from style to parent in Viewbeta 4.1. -Larry - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 19, 2000 1:55 PM Subject: [REBOL] layout/style ? > in /view i tried > > view layout/style [ ... ] [ cust-feel: make feel [ ..some-feel.. ] > ] > > and i got > > ** Script Error: layout has no refinement called style. > > > what am i suppose to do if (possible?) to adjust feel through layout? > appreciate help. > > > -z > > __ > Do You Yahoo!? > Send instant messages with Yahoo! Messenger. > http://im.yahoo.com/ >
[REBOL] A data inconsistency Re:(4)
Hi, it emerged from a practical program. I had to construct a block containing any possible set of rebol values, including Unset and modify it somehow. Then I discovered that changing values to Unset was not possible. My opinion is: as long as Unset is a legal Rebol value (very arguable subject), there should be a method to store it into blocks and, moreover, to change elements of a block to Unset. Allow me to tell you why the legality of Unset is questionable (don't take my words too seriously, please): Unset should be a value usable for the test, if a word has been initialized (that is its raison d' etre, IMHO). That means, that: if unset? get/any 'a [print "'a has not been initialized"] this looks perfectly logical. But, it is not, because if we previously did: a: 1 set/any 'a () the 'a has surely been set previously (twice!), although Rebol claims the opposite. Such things make Rebol more complicated than necessary, which influences Rebol interpreter and programs too. The most general way to set a 'word is: set/any 'word get/any 'value Without Unset the previous expression could have been simpler: word: :value and, moreover, if you write a program handling any legal Rebol value, the unset? protection is not allowed to find your bugs related to the use of unitialized words - when you consider Unset a legal value, every word becomes initialized. So, in the case of Unset less could mean more - less legal datatypes could mean more protection and simplicity for programs. Ladislav > > > > > Ladislav wrote: > > = > > did anyone report The following? > > > > >> head insert copy [] () > > == [unset] > > >> change copy [1] () > > ** Script Error: change is missing its value argument. > > ** Where: change copy [1] () > > > > = > > > > >> () > >> type? () > == unset! > >> copy [()] > == [()] > >> compose copy [()] > == [] > >> first compose copy [()] > ** Script Error: Out of range or past end. > ** Where: first compose copy [()] > > well, compose seems to turn () in a block into literally nothing, not unset!, > so which do you think is right, the insert that sticks an unset value into the > block, > or the copy which refuses to change 1 to nothing at all? > > Is there some great use to having unset in a block ? > > Or were you just saying the two should behave consistently but don't? > > -galt > > >
[REBOL] NT/CGI... interesting discovery re: Program I/O with Perl (read REBOL) script
Could this be the answer to some of the NT CGI mail/file bugs? (only one prob, doesn't seem to work) Unable to Use Standard Program I/O in PERL Script The information in this article applies to: Microsoft Internet Information Server version 2.0 SYMPTOMS You are unable to use standard programming I/O methods to pass arguments and/or data to and from external command or separate PERL Scripts that are spawned from a parent script. CAUSE When you spawn a script or external command from a CGI application, it is created in a separate process. By default Microsoft Internet Information Server (IIS) 2.0 does not create a console and does not support standard I/O redirection between processes. RESOLUTION To resolve the problem, edit the registry as described below. WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows NT to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk. Start Registry Editor (Regedt32.exe) and locate the following registry subkey in the HKEY_LOCAL_MACHINE subtree: \SYSTEM\CurrentControlSet\Services\W3SVC\Parameters Click Add Value on the Edit menu. Type the following: Value Name: CreateProcessWithNewConsole Data Type: REG_DWORD DateValue = 1 NOTE: Creating a new console for each CGI script has serious performance implications and should not be done unless slower performance is acceptable. MORE INFORMATION For additional information about supported registry parameters, please see the Online documentation for IIS 2.0. Go to the product documentation link and choose Chapter 10 from the contents page then Service Specific Registry Entries with Common Names. Search on CreateProcessWithNewConsole. Keywords : kbenv iisscript Version : 2.0 Platform : NT WINDOWS Issue type : Technology : __ Do You Yahoo!? Send instant messages with Yahoo! Messenger. http://im.yahoo.com/
[REBOL] layout/style ?
in /view i tried view layout/style [ ... ] [ cust-feel: make feel [ ..some-feel.. ] ] and i got ** Script Error: layout has no refinement called style. what am i suppose to do if (possible?) to adjust feel through layout? appreciate help. -z __ Do You Yahoo!? Send instant messages with Yahoo! Messenger. http://im.yahoo.com/
[REBOL] A data inconsistency Re:(3)
[EMAIL PROTECTED] wrote: >I really wanted to have an unset value in a block. (my apologies, >if the code looked too cryptic). [skipping cryptic code :) ] Try this >> reduce [()] == [unset] Brian Hawley
[REBOL] A data inconsistency Re:(3)
> Ladislav wrote: > = > did anyone report The following? > > >> head insert copy [] () > == [unset] > >> change copy [1] () > ** Script Error: change is missing its value argument. > ** Where: change copy [1] () > > = > >> () >> type? () == unset! >> copy [()] == [()] >> compose copy [()] == [] >> first compose copy [()] ** Script Error: Out of range or past end. ** Where: first compose copy [()] well, compose seems to turn () in a block into literally nothing, not unset!, so which do you think is right, the insert that sticks an unset value into the block, or the copy which refuses to change 1 to nothing at all? Is there some great use to having unset in a block ? Or were you just saying the two should behave consistently but don't? -galt
[REBOL] A data inconsistency Re:(2)
Hi, I really wanted to have an unset value in a block. (my apologies, if the code looked too cryptic). My problem was, that the Change approach didn't work. If I would like to have empty parens, I would write: >> head insert/only copy [] to paren! [] == [()] > > Ladislav wrote: > = > did anyone report The following? > > >> head insert copy [] () > == [unset] > >> change copy [1] () > ** Script Error: change is missing its value argument. > ** Where: change copy [1] () > > = > > well, anything in parentheses () will be evaluated immediately > before any function receives the parameter. > If you just type () at the prompt, it returns nothing. > Bu if you do type? () it says unset! > > >> () > >> type? () > == unset! > >> > > So, you are trying to insert an unset! value into your copy [], an empty block. > > I assume the same thing is happening to the change example. > If you are trying to create an empty parenthesis block, then I don't > know off the top of my head how that would look of if it would work. > > -Galt > > >
[REBOL] tcp-stream
dear rebels, i would like to try and get the following working: 1) establish a connection with a server 2) send requests to the server and 3) parse whenever i receive some data problem is, the server send XML i have been playing with %little-bell.r which does at least part of what i want does anyone have a good pointer for me, or is just willing to lend a helping hand greetings, Hendrik-Jan Bosch
[REBOL] A data inconsistency Re:
Probably by now somebody has already answered this, but I will share what I discovered. Ladislav wrote: = did anyone report The following? >> head insert copy [] () == [unset] >> change copy [1] () ** Script Error: change is missing its value argument. ** Where: change copy [1] () = well, anything in parentheses () will be evaluated immediately before any function receives the parameter. If you just type () at the prompt, it returns nothing. Bu if you do type? () it says unset! >> () >> type? () == unset! >> So, you are trying to insert an unset! value into your copy [], an empty block. I assume the same thing is happening to the change example. If you are trying to create an empty parenthesis block, then I don't know off the top of my head how that would look of if it would work. -Galt
[REBOL] Re: Andrew, you beast! - GC too tidy? Re:(6)
Hello [EMAIL PROTECTED]! On 18-Giu-00, you wrote: b> As for unified, formal approaches, well Scheme wins there. b> REBOL is easily as unified as Scheme, but Scheme has been b> formalized to death - no contest. Hey Gabriele, do you want to b> help turn our context argument into a formal paper, tutorial b> or something? Any one else up for papers? If I had some free time... :-/ Anyway, if someone is going to write it, I'd like to read it and give comments. :-) (So at least I'll feel a little collaborative... ;) b> By the way, there is nothing about REBOL's GC problem that is b> inherent in its execution model. It can be fixed, and it can b> be avoided easily until it is fixed. As GC bugs go, I've seen b> much worse than that. I'd still like it fixed, though :( Yup. I assume they have a very good reason for not fixing it (perhaps the new features promised by Carl?). Regards, Gabriele. -- Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
[REBOL] teeny bits of time Re:(2)
I'm using /Core 2.2 on both Windows NT and BeOS 5 x86 and nope, such a feature doesn't exist. I'm sure there are hurdles in getting exact measurements of time in less than seconds. If it would be possible to run a continuous REBOL routine in the background while continuing to execute REBOL scripts in the foreground, then I suppose you could call upon a word that returns an approximate sub-second length of time (most likely represented as an estimated fraction of a second instead of an exact measurement in milliseconds.) Depending on the workload of the cpu at any given time, this estimated fraction of a second may be based on a different denominator. Any other thoughts on this? I REALLY would like to be able to call upon fractions of a second in REBOL. -Ryan > Ryan, > Have you tried the view version ... maybe its there. > -Larry > > [EMAIL PROTECTED] wrote: > > > Wouldn't this be cool? > > > > >> > > >> current-time: now/time > > == 20:37:33 > > >> print current-time/hour > > 20 > > >> print current-time/minute > > 37 > > >> print current-time/second > > 33 > > >> print current-time/millisecond > > 14 > > >> print current-time/microsecond > > 57 > > >> print current-time/nanosecond > > 98 > > > > Any idea if this would even be possible? > > > > -Ryan >
[REBOL] Hidden object values? Re:(2)
This is a very cool technique. Is it documented, or are we in the realm of "oral tradition"? -- Tim Lesher [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 16, 2000 17:21 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [REBOL] Hidden object values? Re: Tim Lesher: > Some of the Rebol documentation mentions "hidden" object values, and says to see the Rebol user's guide for more information. However, looking at the /core user's guide (2.2.0), I can't find any mention of how to make a hidden object value. Is this possible, and if so, how? Here's some stuff you might not know about objects: >> o: make object! [ [A: 1 [B: 2 [C: 3 [] >> first o == [self A B C] >> second o == [ make object! [ A: 1 B: 2 C: 3 ] 1 2 3] By using 'first and 'second, you can access parts of the object. For hiding stuff in objects, you can use a technique like this: >> oh/f ** Script Error: Invalid path value: f. ** Where: oh/f >> oh: make object! [ [F: none [use [A B] [ [A: "" [B: "" [set 'F func [] [print [A B]] [] [] >> probe oh make object! [ F: func [][print [A B]] ] >> oh/f BUT! The first use of 'recycle (or allowing the Rebol Garbage Collector to function) and then issuing: >> oh/f crashes Rebol. Which is annoying. :-( Andrew Martin Environmentally sound Rebol... ICQ: 26227169 http://members.xoom.com/AndrewMartin/ -><-
[REBOL] Andrew, you beast! - GC too tidy? Re:(6)
Hi all! [EMAIL PROTECTED] wrote: >The current discussions of weirdnesses, idiosyncracies, and so forth >related to >scope, garbage collection, protection via USE, etc. are all verging around the >same space. With no disrespect intended to Carl or anyone on the Rebol team >(they're certainly tracing historical mistakes, Cf. McCarthy's early probs. >nailing the scope issue in Lisp) there is at lease one good system, very >similar >in many ways to Rebol, from which they could steal liberally: Scheme. It's >lexically scoped, has first-class closures which are in essence a >stronger, more >formal block, a fundamental symbol / object distinction, and GC... *very* >similar to Rebol indeed, but with a unified formal approach to scope, GC, >and so >on. It's a beautiful, simple, and powerful language that has never really >gone >mainstream due to its Lisp-like legacy and syntax, which most folks don't >grok. >IMO, Rebol could easily be the Scheme for the masses... but every little >idiosyncracy and gotcha -w- scope, GC, and so on will create adoption >friction. JB, you may not be familiar with REBOL history, but the 1.x versions of REBOL were based on Scheme semantics. REBOL was much slower back then, and had a larger executable, both the result of using the Scheme model. I've got a copy of 1.0.3 for Windows if you're curious. I have been using Scheme for about 8 years now and have done my own Scheme compiler/interpreter, so I know what you mean when you sing its praises. REBOL and Scheme are more similar than you realize, though. For the most part you can simply translate from Scheme to REBOL with no loss of functionality, and more speed too. For example: First-class closures: - Scheme: (set f (lambda (x) x + 1)) or (define (f x) x + 1) - REBOL: f: func [x] [x + 1] Symbol/Object distinction: - Both: 'symbol object Lexical scoping (other than in functions): - Scheme: (let ((x 1) (y 2)) x + y) - REBOL: use [x y] [x: 1 y: 2 x + y] The "main" REBOL dialect implements lexical scoping as its default behavior, just in a different way than Scheme does. Scheme (interpreted) has dynamic binding, so all variables are mapped to values in a lexical context, but symbols are bound to variables at runtime, at every reference. With REBOL the symbols are bound to variables once, before the code is executed. Direct binding makes REBOL more similar to compiled Scheme, even when it is interpreted. Fluid variables: Scheme needs this as a hack to get around the limitations of lexical scoping. REBOL doesn't need them because direct binding is much more powerful. Macros: With Scheme, code only looks like data, so it needs a macro mechanism. With REBOL, code IS data, so there is no distinction needed between macros and other functions. The REBOL functions for code-building are more powerful too. Language and execution model: - Scheme: Lisp-like lexically scoped language (conceptually) built on a continuation engine - pretends to be stack-based for implementation efficiency, at least if you avoid call/cc. - REBOL: Unique, two-level language (dialects on data language) built on a Forth-like stack engine for efficiency that Scheme only gets after heavy optimization (sometimes not even then). Tail-recursion: Scheme has it (side effect of the continuation engine, hacked when stacks are used); REBOL dropped it when it switched to 2.x for efficiency reasons (whoops!). I guess you have to use REBOL's extensive iterative functions instead. Continuations: Scheme has them (base of its execution model); REBOL dropped these too when it switched to a stack engine. Continuations don't make much sense with a stack engine - they only work well when the execution model is continuation-based. If you can't refactor your code to use callbacks or some such, you probably don't understand it well enough to be programming with continuations. Take a look at Icon - its goal-directed evaluation beats continuations any day of the week. Numerics: REBOL is comparable to most Schemes, but that is only because most Schemes don't implement the entire capabilities of the Scheme standard. Most people don't do much numerics in an interpreted language anyway, but I miss bignums :( List manipulation and data structures: REBOL does all of what Scheme does, and usually does it faster. The map functions are missing, but easily replaced, like replacing this: (set y (map (lamda (x) x + 1) '(1 2 3))) with this: y: copy [1 2 3] forall y [change y (first y) + 1] y: head y or if you really want map, you can make it easily yourself. Other changes (mostly to factor out some recursion) are just as easy to do. Most data manipulations are easier in REBOL. String manipulation and parsing: Throw your Scheme code away - you'll never regret it. The incredible REBOL parse dialect gets better every day - you'll wonder how you got by without it in primitive languages like Scheme :) As for unified, formal approaches, well Scheme wins there. REBO
[REBOL] Andrew, you beast! - GC too tidy? Re:(6)
Scheme is a great language. It inspired me more than 16 years ago, influenced my early designs... and got me into denotational semantics. But, Scheme was first invented in 1975... so now 25 years later, I suggest that there is a good reason why it is not in widespread use today. REBOL 1.0 was "Scheme". So we've been there, done that. For us, it was a disaster. REBOL 2.0 (non Scheme based) is smaller and 30 times faster. Yes there are some cool things you can do in Scheme. But they cost you too much. Unfortunately, history has also proven the success of a language has nothing to do with the merits of good language design. Look at C++, BASIC, or even HTML as examples. -Carl PS: the scoping rules for REBOL are very simple. Also, the issues around object scoping have not been solved by any language that I know. Not even Scheme. At 6/16/00 03:30 PM -0500, you wrote: > >Good thoughts, Chaz. I think, though, dialects would not be a particularly >helpful. Scoping rules are deeply intrinsic to programming languages and their >implementations. I doubt the problem could be fixed while preserving backwards >semantic compatibility. However, the world of Rebol scripts still to write is >much larger than the world of scripts already written, so now would be the time >to make any fundamental changes. > >The current discussions of weirdnesses, idiosyncracies, and so forth related to >scope, garbage collection, protection via USE, etc. are all verging around the >same space. With no disrespect intended to Carl or anyone on the Rebol team >(they're certainly tracing historical mistakes, Cf. McCarthy's early probs. >nailing the scope issue in Lisp) there is at lease one good system, very similar >in many ways to Rebol, from which they could steal liberally: Scheme. It's >lexically scoped, has first-class closures which are in essence a stronger, more >formal block, a fundamental symbol / object distinction, and GC... *very* >similar to Rebol indeed, but with a unified formal approach to scope, GC, and so >on. It's a beautiful, simple, and powerful language that has never really gone >mainstream due to its Lisp-like legacy and syntax, which most folks don't grok. >IMO, Rebol could easily be the Scheme for the masses... but every little >idiosyncracy and gotcha -w- scope, GC, and so on will create adoption friction. > >Unsolicited $0.02, > >jb > >[EMAIL PROTECTED] wrote: > >> At 07:34 AM 6/16/00 +0200, you wrote: >> > >> > >> >[EMAIL PROTECTED] wrote: >> > >> >> Just a thought most of the "philosophical" questions / discussions >> here >> >> about i.e. object lifecycle, scope, bindings, etc. would be simply, >> >> formally, and workably solved if Rebol had a true lexical scoping model. >> As >> >> it is, it's sort of the worst of both worlds: it's semi-fluid scope with >> >> explicit manipulation coupled with a sort of hybrid object / object >> >> lifecycle model that is never really formally elaborated. Without knowing >> >> the internal nitty gritty of the implementation, it's hard to say if >> this is >> >> endemic to Rebol or not, but looking at i.e. the potential solutions to >> >> similar problems in early Lisps vs. Scheme, I'd say there's a whole lot of >> >> good reasons for solving the problem now. >> > >> >Just a note - isn't it too late, if two book on REBOL are already finished? >> >Elan, Ralph? :-) >> > >> >-pekr- >> >> Not too late, if solution is implemented correctly. Since the strength of >> Rebol is dialecting, then we should maintain backward compatibility through >> dialects. Rebol/Core 2.x scripts would not break if there was a "2.0 >> dialect" included with Rebol/Core 3.x. >> >> RT needs more staff and money, so Core team can focus on philosophical >> issues, and special task forces can focus on integrating Core with other >> technologies (Graphics = /View, OS and Databases = /Command, WebServer = >> /Apache). >> >> By overcoming implementation challenges, the task forces gain knowledge >> that they can bring back to /Core that will empower RT to overcome new >> challenges when integrating into other technologies (imagine >> multiprocessing = /Beowulf, Home Automation = /Base, streaming media and >> telephony = /Yell) >> >> But the real money may be in business-to-business. Imagine your company has >> developed an incredible software product whose functionality can be >> extended through use of a C API. Users would much rather have an easier >> means than going through a write-compile-test cycle to extend the product's >> functionality. If Rebol was integrated into the product, then user >> productivity would skyrocket. >> Case in point, Remedy Corporation has a workflow product called Action >> Request System (ARS). The 2 means of accessing its power are through a GUI >> and the ARS C API. At the State University of New York at Buffalo, users >> created ARSPerl, a perl module that encapsulates the function of the Remedy >> ARS C API. To my way of thinking, they tu
[REBOL] can't delete email?? Re:
clear mailbox > HI, > > Can anyone tell me where > I should add the command > "remove mailbox" in this > script. > > while [not tail? mailbox] [ > msg: import-email first mailbox > print [ >"From: " first msg/from >"Subject: " msg/subject > ] > remove mailbox > mailbox: next mailbox > ] > > No matter where I put it in my script, > it won't delete all my messages. ?? > > I sent myself 3 emails and only > one was deleted. And no matter > how many times I re-ran the script, > I can't delete the other two.?? > > thanks timmy >
[REBOL] using tcp:// with an unknown port Re:(3)
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 19, 2000 11:00 PM Subject: [REBOL] using tcp:// with an unknown port Re:(2) > [EMAIL PROTECTED] wrote: > > Hi Deryk, > > > > Not sure if this is what you mean or not.. > > > > If no port-id is specified, an available port will be allocated > > (This example works in Rebol/View) > > > > my-conn: open tcp:// > > my-conn/port-id > > ==2664 > > >> my-conn2: open/lines tcp:// > > >> my-conn2/port-id > > == 2665 > > Allen, > > Yeah, that's exactly what I was hunting for. Perhaps this should be > documented. :) http://www.rebol.com/howto.html#tcp.html It is in the "how-to", under "Opening an Listen Port" but I didn't see it mentioned in the other docs. Cheers, Allen K
[REBOL] using tcp:// with an unknown port Re:(2)
[EMAIL PROTECTED] wrote: > Hi Deryk, > > Not sure if this is what you mean or not.. > > If no port-id is specified, an available port will be allocated > (This example works in Rebol/View) > > my-conn: open tcp:// > my-conn/port-id > ==2664 > >> my-conn2: open/lines tcp:// > >> my-conn2/port-id > == 2665 Allen, Yeah, that's exactly what I was hunting for. Perhaps this should be documented. :) Thanks! Regards, Deryk
[REBOL] using tcp:// with an unknown port Re:
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 19, 2000 6:55 PM Subject: [REBOL] using tcp:// with an unknown port > I am not able to locate anything in regards to how to make Rebol open a > port with no known number. > > For example, we have a known port: my-conn: open/lines tcp://:4321 > > So far, so good, but, how do we do this with an unknown port number? In C, > we just call socket(), bind(), then listen() on our socket and the stack > will have a port allocated in this process for us. > > Regards, > Deryk > > Hi Deryk, Not sure if this is what you mean or not.. If no port-id is specified, an available port will be allocated (This example works in Rebol/View) my-conn: open tcp:// my-conn/port-id ==2664 >> my-conn2: open/lines tcp:// >> my-conn2/port-id == 2665 Cheers, Allen K
[REBOL] using tcp:// with an unknown port
I am not able to locate anything in regards to how to make Rebol open a port with no known number. For example, we have a known port: my-conn: open/lines tcp://:4321 So far, so good, but, how do we do this with an unknown port number? In C, we just call socket(), bind(), then listen() on our socket and the stack will have a port allocated in this process for us. Regards, Deryk