[REBOL] When? Re:(2)
Command, Beta 1.1 released last week. View, Beta 4 released last week. View, Beta 5 this week. Core, 2.3 Beta 1 this week (I hope) -Carl At 5/20/00 10:06 PM +1200, you wrote: Could we know when RT plans to release the next products, with all the approximations, warnings, disclaimers and plain don't-trust-this-dates-too-much granted? Have a look on the Ally and Command lists. More details from Carl have been published there. Andrew Martin Submerging... ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --
[REBOL] probe object
I have a set of functions which turn the contents of an e-mail message object into a different object (called "article.") article: make object! [ headline: subject-pieces/1 subheadline: subject-pieces/2 body: content-pieces ] I'm trying to figure out how to probe the object and then write the result of the probe out to a file for inclusion at a later date. Here is a session... breakdown-email msg probe article make object! [ headline: "headlineokay" subheadline: "subheadlineokay" body: ["by golly" "" "by gumby" ""] ] write %bygolly.txt probe article make object! [ headline: "headlineokay" subheadline: "subheadlineokay" body: ["by golly" "" "by gumby" ""] ] REBOL - Security Check: Script requests permission to open a port for read/write on: /boot/home /bygolly.txt Yes, allow all, no, or quit? (Y/A/N/Q) Y uberall: read %bygolly.txt == "?object?" print uberall ?object? As you can see, the probe object only writes "?object?" to the %file. What do I need to do to write the actual contents of the object? The functions follow: ; -- BREAKDOWN-SUBJECT -- breakdown-subject: func [ "breakdown an e-mail subject field into its parts" msg [object!] "e-mail message" ][ subject-info: msg/subject subject-parts: [] foreach part parse/all subject-info ":" [ append subject-parts part ] ] ; -- BREAKDOWN-CONTENT -- breakdown-content: func [ "breakdown an e-mail content field into its parts" msg [object!] "e-mail message" ][ article-info: msg/content end-of-paragraph: rejoin [{.} newline] content-parts: [] foreach part parse/all article-info end-of-paragraph [ append content-parts part ] ] ; -- BREAKDOWN-EMAIL -- breakdown-email: func [ "breakdown an e-mail message object and convert it to an article object" msg [object!] "e-mail message" ][ subject-pieces: breakdown-subject msg content-pieces: breakdown-content msg article: make object! [ headline: subject-pieces/1 subheadline: subject-pieces/2 body: content-pieces ] ]
[REBOL] Re: When? Re:(2)
On 21-kvë-00, [EMAIL PROTECTED] wrote: Command, Beta 1.1 released last week. View, Beta 4 released last week. View, Beta 5 this week. Core, 2.3 Beta 1 this week (I hope) -Carl This week ends today (at least in my country :)) Just kidding... ...but! Bolek P.S.: Anyone interested in REBOL virtual synthesizer? I did not touch the sources for more than half a year, because it eat my memory as mad ( 6MB for 8kB sample), then I lost sources but I fortunally found them last week and the bug magically dissapeared under REBOL/Core/2.2.0 . It has my FEVO- Free Elastic Vector Oscillator (VERY modular), simple LP filter with resonancy, but it is NOT user-friendly and 1sec sound (with filters and morphing osc.) takes aprox. 6mins on my SLOWSLOWSLOW Amiga 68030/50MHz. So if anybody (with faster machine, of course) is interested...(I do not want to mess everybody's mailbox with _huge_ ;) 7kB source full of stupidities and mistakes). And now that's all.
[REBOL] Calling external functions Re:(2)
I can't take credit for this function, but I've used it to "include" several different scripts and use their functions: include: func [files] [ either block? files [ forall files [do first files] ] [ do files ] ] include %whatever.r Many thanks to the author of this function! :-) Thank you, thank you. ::Bows:: Andrew Martin Include self ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --
[REBOL] installing Rebol as CGI application under PWS/Win32
Hello, I am having a problem installing Rebol under PWS. In the registry, I added a key ".r" under HKLM/System/CurrentControlSet/Services/W3SVC/Parameters/Scriptmap with the value "c:\rebol\rebol.exe -cs %s %s" Now when I place a .r file into my cgi-bin directory and try to call it, I always get the message that the script returned incomplete headers. I also tried to output "Content-type: text/html" manually, but this didn't change the result. Any pointers? Regards Christian
[REBOL] probe object Re:(2)
Thanks. save %article.r article saves the following in %article.r make object! [ headline: "headlineokay" subheadline: "subheadlineokay" body: ["by golly" "" "by gumby" ""] ] -Ryan Why don't you use save? save article will write the object to a file. Later you can read or load it back. In either case you will have to either do the result of reading the file, to convert the string (read) or block (load) to an object: retrieved-article: do read %article.txt retrieved-article: do load %article.txt
[REBOL] installing Rebol as CGI application under PWS/Win32 Re:
Hi Christian, PWS is a little weird. I don't recall that anyone was able to successfully install REBOL as a CGI client under PWS (may have missed it), whereas I do recall periodically seeing messages that complain about PWS. My recommendation: use Apache. You can download your free copy of Apache from http://www.apache.org. If you have problems getting Apache to run, let me know. I have an old email that describes Apache configuration under MS Windows. At 04:36 PM 5/21/00 +0200, you wrote: Hello, I am having a problem installing Rebol under PWS. In the registry, I added a key ".r" under HKLM/System/CurrentControlSet/Services/W3SVC/Parameters/Scriptmap with the value "c:\rebol\rebol.exe -cs %s %s" Now when I place a .r file into my cgi-bin directory and try to call it, I always get the message that the script returned incomplete headers. I also tried to output "Content-type: text/html" manually, but this didn't change the result. Any pointers? Regards Christian ;- Elan [: - )]
[REBOL] installing Rebol as CGI application under PWS/Win32 Re:(2)
Hello, I am using Apache on most of my Win32 machines, but I always try new stuff on the PWS first (it's easier to configure, and easier to remove). Pity that it doesn't seem to work. Maybe any official word from the developer if something is planned there? Regards Christian - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, May 21, 2000 6:52 PM Subject: [REBOL] installing Rebol as CGI application under PWS/Win32 Re: Hi Christian, PWS is a little weird. I don't recall that anyone was able to successfully install REBOL as a CGI client under PWS (may have missed it), whereas I do recall periodically seeing messages that complain about PWS. My recommendation: use Apache. You can download your free copy of Apache from http://www.apache.org. If you have problems getting Apache to run, let me know. I have an old email that describes Apache configuration under MS Windows. At 04:36 PM 5/21/00 +0200, you wrote: Hello, I am having a problem installing Rebol under PWS. In the registry, I added a key ".r" under HKLM/System/CurrentControlSet/Services/W3SVC/Parameters/Scriptmap with the value "c:\rebol\rebol.exe -cs %s %s" Now when I place a .r file into my cgi-bin directory and try to call it, I always get the message that the script returned incomplete headers. I also tried to output "Content-type: text/html" manually, but this didn't change the result. Any pointers?
[REBOL] higher order functions Re:(3)
Hi, I've considered adding apply to REBOL for many years. Every few months I write a script that could use it. Also, here is another way to do nargs: nargs: func [f [any-function!]] [ -1 + index? any [find first :f refinement! tail first :f] ] -Carl didn't know, that Find can search for datatypes. Is there a plan to control the Find behaviour with any refinements wrt. datatypes? (See example) find compose [1 2 (integer!) 3 (datatype!) 4] datatype! == [datatype! 4] I tried a simpler implementation of Apply and it looks that it is about ten times faster, than the previous one. Rebol [ Title: "Apply" Date: 21/5/2000 File: %apply.r Author: "Ladislav Mecir" Email: [EMAIL PROTECTED] Purpose: { Apply a function to its arguments stored in a block } Comment: { much simpler/faster implementation, compatible with zero-agument functions, as opposed to the previous version } ] apply: func [ {Apply a function to its arguments} f [any-function!] blkargs [block!] {Argument values} /local length statement result ] [ statement: make block! (length: length? blkargs) * 3 + 3 insert statement [set/any 'result f] repeat i length [ append statement [pick blkargs] append statement i ] do statement get/any 'result ] { Example: apply :subtract [2 1] apply :type? reduce [()] } Ladislav