[REBOL] Latest library loader script
Plus, it uses a dialect (sort-of), and has no infinite loops! Thanks to Anton, Gregg and Volker. [ Rebol [ Name: 'Values Title: "Values" File: %"Values.r" Author: "A J Martin" Owner: "Aztecnology" Rights: "Copyright (c) 2003 A J Martin, Aztecnology." eMail: [EMAIL PROTECTED] Web: http://www.rebol.it/Valley/ Tabs: 4 Purpose: {Loads Values into Rebol. Interprets 'Requires field in header.} Language: 'English Acknowledgements: ["Anton Rolls" "Gregg Irwin" "Volker Nitsch"] Date: 13/November/2003 Version: 4.1.0 ] use [Patches Files Provided Required Do_Script Provides Do_or_Defer_Script Header Requires Script Error Previous] [ do Patches: %Patches.r system/error/user: make system/error/user [ No_Header: [ "The script:" :arg1 "in directory:" :arg2 "doesn't have a script header!" ] Lacks_Content: [ "The script:" :arg1 "in directory:" :arg2 "doesn't have any script content!" ] No_Provider: [ "The scripts:" :arg1 "in directory:" :arg2 "require words which no other script provides!" ] ] Files: exclude read %./ reduce [Rebol/script/header/File Patches] Provided: make block! 100 Required: make block! 100 Do_Script: [ do Script Provides: in Header 'Provides Required: exclude Required to block! Requires if all [ not none? Provides Provides: get Provides any [ word? Provides block? Provides ] ] [ insert tail Provided Provides ] ] Do_or_Defer_Script: func [Script [block!] File [file!]] [ Header: first Script either none? Requires: in Header 'Requires Do_Script [ either empty? exclude Requires: to block! get Requires Provided Do_Script [ Required: union Required Requires insert/only tail Files reduce [Script File] ] ] ] parse Files [ some [ set File file! ( if found? find/last File %.r [ if any [ error? try [ Error: 'No_Header Script: load/header File Error: 'Lacks_Content ] not block? Script ] [ make error! compose [ user (Error) (mold File) (mold system/script/path) ] ] Do_or_Defer_Script Script File ] ) | into [set Script block! set File file!] ( insert tail Files length? Required Do_or_Defer_Script Script File ) | set Previous integer! ( if Previous <= length? Required [ Script: make block! 10 foreach Script_File find Files Previous [ if block? Script_File [ insert tail Script mold last Script_File ] ] make error! compose/deep [ user No_Provider [(Script)] (mold system/script/path) ] ] ) ] end ] ] ] Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.s
[REBOL] Ping!
Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Library loader
Here's my Library loader script: use [Patches Files Provided Do_Script Defer_Script Script Header Requires Provides] [ do Patches: %Patches.r Files: exclude read %./ reduce [Rebol/script/header/File Patches] Provided: make block! 100 Do_Script: [ do Script if all [ not none? Provides Provides: get Provides any [ word? Provides block? Provides ] ] [ insert tail Provided Provides ] true ] foreach File Files [ Defer_Script: [ insert/only tail Files Script ] Script: any [ if block? File [ File ] if all [ file? File found? find/last File %.r ] [ load/header File ] ] if Script [ Header: first Script Requires: in Header 'Requires Provides: in Header 'Provides any [ if none? Requires Do_Script if word? Requires: get Requires [ either found? find Provided Requires Do_Script Defer_Script ] if block? Requires [ either empty? exclude Requires Provided Do_Script Defer_Script ] ] ] ] ] It examines each script's header for the 'Requires and 'Provides fields, like (from my ML.r %script): Requires: [Build-Tag Push Pop] Provides: [ML] It doesn't attempt to do any versioning or downloading, just 'load-s and 'do-es scripts so that scripts that require words defined are 'do-ne after scripts that provide values for those words. For the above example, the files that provide 'Build-Tag, 'Push & 'Pop are 'do-ne before the file containing a value for 'ML. One problem the above script has, it that if a script requires a value for a word that no other script provides, the above function never returns. I haven't figured out a solution for this. Can anyone think of one? Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] DLL Hell = Rebol library script version
Thanks, Anton! You wrote: > > (A) f2 just tries to use whatever version of f1 is currently installed. I'd go for this option as it's the most simple option, in breaking as soon as possible. The other options involve the higher level function "knowing" too much about the lower level function. The scenarios remind me of Windows "DLL Hell" and the solution that MS came up for it for .NET. That solution was basically to not use DLLs. :) Instead, supply all the software (including DLLs) for an application with the application's main .exe. Those DLLs supplied with the application are the ones used by the application. Only if DLLs have the same version are they shared, IIRC. We can use a similar principle. When distributing a Rebol script, include all the functions (words) that the main script requires. Of course, the problem here is that most of us have nice toolkits of functions that we want to use in our main script applications, and it's pointless manually copying and pasting from our toolkit because that just produces multiple copies, with no definitive, authoritive source. So the solution to me, is for the release version of the script/application to have the library/toolkit functions the script requires, automatically inserted into the script just after the Rebol header. That way, the script application will create it's preferred environment, regardless of previously launched library programs. Of course, there can be a problem with what to do, when current and past Rebol interpreters have faults and need patching. Perhaps we should prod Rebol HQ into action? :) It would be nice to have defects fixed, and old versions of Rebol interpreters removed. What do you think about it? Is there something I've missed? Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] DLL Hell = Rebol library script version
Thanks, Anton! You wrote: > > (A) f2 just tries to use whatever version of f1 is currently installed. I'd go for this option as it's the most simple option, in breaking as soon as possible. The other options involve the higher level function "knowing" too much about the lower level function. The scenarios remind me of Windows "DLL Hell" and the solution that MS came up for it for .NET. That solution was basically to not use DLLs. :) Instead, supply all the software (including DLLs) for an application with the application's main .exe. Those DLLs supplied with the application are the ones used by the application. Only if DLLs have the same version are they shared, IIRC. We can use a similar principle. When distributing a Rebol script, include all the functions (words) that the main script requires. Of course, the problem here is that most of us have nice toolkits of functions that we want to use in our main script applications, and it's pointless manually copying and pasting from our toolkit because that just produces multiple copies, with no definitive, authoritive source. So the solution to me, is for the release version of the script/application to have the library/toolkit functions the script requires, automatically inserted into the script just after the Rebol header. That way, the script application will create it's preferred environment, regardless of previously launched library programs. Of course, there can be a problem with what to do, when current and past Rebol interpreters have faults and need patching. Perhaps we should prod Rebol HQ into action? :) It would be nice to have defects fixed, and old versions of Rebol interpreters removed. What do you think about it? Is there something I've missed? Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Looking over the horizon - Rebol 3
> if Temperature < 1.0°C [ > telephone +25-123-4567 rejoin [ > %FrostWarning.wav %At.wav %Location.wav > ] > ] if Temperature < 1.0°C [ telephone +25-123-4567 [ %FrostWarning.wav %At.wav %Location.wav ] ] That 'rejoin shouldn't be in there. :) Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Looking over the horizon - Rebol 3
What would Rebol, version 3 look like? Here's some of my thoughts: * Lots more datatypes! For example, a Telephone! data type, temperature, audio/sound data-type, metric and imperial units like 123.5Km, 50MpH, and so on. I'd like a Rebol script that can ring a cell phone and deliver a spoken message to me. Like: if Temperature < 1.0°C [ telephone +25-123-4567 rejoin [ %FrostWarning.wav %At.wav %Location.wav ] ] * Runs on .Net so one can get a native Windows user interface, and it can run under Linux (using Rotor and other open source .NET initiatives), and capable of working with other languages under the .NET CLR. (This could be done with current version of Rebol if compiled using .NET's free C++ compiler!) * Prefix, infix and postfix evaluation of functions referred to by words. * Rebol can define new infix and postfix operators/functions as well as the standard Prefix functions. Here's a simplistic example: +: :Join * A way to access words outside of the current context. Perhaps extending the refinement! data-type, like: /Foo: 123 ; set the value of 'Foo outside this context to 123. * Regular Expressions as well as parse, which acts much like Perl's regexp. * Printing. :) * Native XML! data-type. Anything else you'd want on your wish list for Rebol 3? Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Script styles
Volker wrote (in another thread): > Hmm, eventually rebol.org could mark RT-style-scripts so people can look up "official" examples when in doubt? Perhaps this could be a declaration in the header? For example: Style: 'Rebol-Official People who prefer different styles could then propose different style standards which they think might be better or just different, like: Style: 'Cobol-Like Style: 'Natural Style: none Style: Andrew ; :) After all, with out variation in style, how can it improve? What do people think? Andrew J Martin Attendance Officer High-Evolutionary. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: serious proposition...WAS: RE: Standards
Hi, Anton. You wrote: > My system also doesn't have a concept of dependencies that the Needs block addresses (yet). It's up to the programmer to write in the header somewhere which words are needed and up to the user to check. I've been planning to add that at some stage but haven't figured out the details of how to handle dependencies with different versions properly yet. There are lots of issues there. Could you describe some of these issues please? Thanks! Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Understanding evaluation
Tim wrote (in another thread): > ...comprehending rebol's multi-level evaluation process which is very different from other (non-lisp) languages. Is there a need for more information here? Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: serious proposition...WAS: RE: Standards
Max wrote: > I'd like an OFFICIAL, community blessed library/module standard. A lot of us are still waiting for Carl's module standard to arrive. I've given up on the idea of waiting, though I can see how useful it would be. Max, can you give an example of your proposed library module, please? Perhaps for a function that depends upon the presence of another function (or word definition)? Here's my example of 'Address and the word ('HTML_Obfuscate) that 'Address relies upon: [ Rebol [ Name: 'Address Title: "Address" File: %"Address.r" Author: "A J Martin" Owner: "Aztecnology" Rights: "Copyright (c) 2003 A J Martin, Aztecnology." eMail: [EMAIL PROTECTED] Web: http://www.rebol.it/Valley/ Needs: [%HTML_Obfuscate.r] Tabs: 4 Purpose: { Writes ML dialect for current script's File, Date & Version, along with the script's Author, email and web address. } Language: 'English Date: 19/July/2003 Version: 2.7.2 ] Address: has [File Date Version] [ File: Rebol/script/header/File Date: Rebol/script/header/Date Version: Rebol/script/header/Version compose/deep [ div/class "Address" [ address [ (rejoin ["Script: " File "; Date: " Date "; Version: " Version "; "]) "Author: " a/href/title ( rejoin [ "mailto:"; HTML_Obfuscate Rebol/script/header/eMail "?subject=" "Script: " replace mold File #"%" "%25" "; Date: " Date "; Version: " Version #"." ] ) "Send email about this script to the author" (Rebol/script/header/Author) "; " "Web: " a/href/title (Rebol/script/header/Web) "Go to the author's web site" (Rebol/script/header/Web) #"." br ] ] ] ] ] [ Rebol [ Name: 'HTML_Obfuscate Title: "HTML_Obfuscate" File: %"HTML_Obfuscate.r" Author: "A J Martin" Owner: "Aztecnology" Rights: "Copyright (c) 2003 A J Martin, Aztecnology." eMail: [EMAIL PROTECTED] Web: http://www.rebol.it/Valley/ Tabs: 4 Purpose: {Obscures text by converting characters into HTML entities.} Language: 'English Acknowledgements: "Brian Hawley" Date: 17/July/2003 Version: 2.0.8 ] HTML_Obfuscate: function [Plain [string! email!]] [Out] [ Out: make string! 6 * length? Plain foreach C Plain [ C: to-integer C Out: insert Out reduce [ "" any [ if C < 10 ["00"] if C < 100 [#"0"] "" ] C #";" ] ] head Out ] ] The nice part is that my library script, %Values.r, loads each script in the library directory, %Values/, and interprets the 'Needs block. If %Values.r finds a file! value, it loads that script (and checks the 'Needs block, recursively), before 'do-ing the first script. This system has the advantage that I can simply copy any library script that I like into the %Values.r directory and it runs when any version of Rebol is launched. (I've got the line: do %/C/Rebol/Values/Values.r in my %User.r file.) I've recently realised that there's some disadvantages in the above system in that it's file-centric, instead of word-centric. That is, the 'Needs field refers to file! values rather than word! values. It also lacks a way of describing what words are given values to by each library/values script; in other words, the above needs a 'Provides (or similar word) name-value in the header. For example, my %Dir.r script has this content: CD: :change-dir LD: :list-dir MD: :make-dir WD: :what-dir There should really be a Provides in the header like: Provides: [CD LD MD WD] And for my first library script: %"Address.r", like: Provides: [Address] Needs: [HTML_Obfuscate] With this change, I can then have my library script automatically check the library directory and create one script file with all the library functions on it, to maximise the OS caching of files and to speed Rebol's interpretation of the startup script by processing only one file instead of dozens of files. If I were to use any other l
[REBOL] Re: syntax across languages
Joel wrote: > As for (2), it doesn't exists! I'm not trying to be pedantic here, but sincerely believe that one of the early steps to "getting" REBOL is to realize that e.g. THERE IS NO "IF" STATEMENT, but merely some functions (IF, IF/ELSE, EITHER) that take an argument of type [LOGIC! NONE!] and one or two arguments of type [BLOCK!] and, if you so choose, YOU CAN WRITE YOUR OWN. I totally agree. It's the step of breaking free from The Matrix of conventional programming languages. The other step is that words (and other values) can mean whatever you want them to mean. Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Standards
Max wrote: > IT would mean people adhering to a standard... What kind of standards are you thinking of? I'd like to know more. Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: lost the case ...
Bryan wrote: > It would be nice to see some group projects. I would like to see a project to put together a real library of xml functionality for Rebol, something which I think might be too much for one or two to accomplish realistically. I'd be interested in this as well. But I'm pretty busy at the moment, working, learning C# and trying to make R#. Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Rebol's function argument specification dialect
Steven wrote (in another thread): > ADD-FILLER: func [ > "Add a specified number of blanks to FORMATTED-LINE" > SPACE-COUNT integer! > ] [ And why didn't Rebol pick up the fact that 'integer! should have been inside square brackets? Because, sometimes, you want a function that takes a data-type! Value, as per below: >> source collect collect: func [ "Collects the results of block evaluations." Block [block!] "The block to 'do." /Only "Inserts the result as a series." /Full "Don't ignore none! values." /Initial Type [series! datatype!] "Specifies the type of the result." ][ use [Break Result Results] [ Break: func [ "Breaks out of the 'Collect." /Return "Forces the loop function to return a Value." Value [any-type!] ] [ system/words/break/return either Return [ Value ] [ Results ] ] Results: any [ all [ datatype? Type make Type 0 ] Type copy [] ] compose/deep [ if not any [ unset? set/any 'Result do [(bind Block 'Break)] (pick [[none? :Result] []] not Full) ] [ (pick [insert insert/only] not Only) tail Results :Result Results ] Results ] ] ] Admittedly this is the first function that uses a data-type as an argument, but I'm sure that Joel can think of many more! :) I wonder if it's a good idea for 'func and it's relatives to insist on some sort of data-type specification for each argument? It also might be an idea for the return argument to be specified as well. Or would this be "too much" for Rebol? In that it doesn't adhere to Rebol's ideal form as perceived by us all? Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Formatting a display line
Tom wrote: > works with this tiny change > > from > ADD-FILLER (10 - length? FORMATTED-LINE) ;; > to > > ADD-FILLER 10 - (length? FORMATTED-LINE) > > > > this is because 10 - length? > > is being asked to happen before length? FORMATTED-LINE > > and is not evaulating to an integer! so ADD-FILLER does not see it's argument Not quite. As shown here: >> 10 - probe length? "123" 3 == 7 >> length? "123" + 3 ** Script Error: Cannot use add on string! value ** Near: length? "123" + 3 >> (length? "123") + 3 == 6 Rebol is "peculiar" like that. Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Formatting a display line
Steve wrote: > Am I losing my mind or what? No, just suffering from an overuse of COBOL... :) :D Try adding square brackets around the "integer!" function argument data-type specifier in 'ADD-FILLER. For example: ADD-FILLER: func [ "Add a specified number of blanks to FORMATTED-LINE" SPACE-COUNT [integer!] ] [ PRINT ["NOW WE WILL ADD " SPACE-COUNT " SPACES"] loop SPACE-COUNT [ append FORMATTED-LINE " " ;; PRINT ["FORMATTED LINE IS " LENGTH? FORMATTED-LINE "BYTES:" FORMATTED-LINE] ] ] Here's how I'd do the job: print map DATA-SELECTED func [Line [block!]] [ rejoin [ map Line func [Item] [ pad form Item 9 ] newline ] ] Of course that does involve using my 'map and 'pad functions, and assumes the same horizontal spacing per item in each line. Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Why I don't need get-word here!
Patrick wrote: > - Do I need the get-word? No. > - Is there a difference in the result? No. > two syntaxes, the same results, what am I missing ? The ":" in the get-word ":face" prevents the Rebol interpreter from doing an extra evaluation step; that is, the evaluation associated with words referring to function! values. For example, try this: A: [] F: does [print "In F" 123] insert tail A F B: [] insert tail B :F Here's one I prepared earlier: >> a == [123] >> b == [func [][print "In F" 123]] Can you see the difference now? Andrew J Martin Attendance Officer Speaking in tongues and performing miracles, in a culinary fashion. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Make URL
John wrote: > When I use this code, everything works: > > data: read/lines %//_2003_08/002s1d0.txt > > But, when I try to pass a variable to that line, while it returns the correct URL -the code fails and reports that it was expecting the correct type URL block: > > data: read/lines rejoin [ %///_2003_08/ f1 "s1d0.txt" ] H, perhaps you really meant to write something like this: >> f1: "002" == "002" >> rejoin [ %//_2003_08/ f1 "s1d0.txt" ] == %//_2003_08/002s1d0.txt Note the number of "/" characters... Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: File writing issue
Matt wrote: > Ok here's one more for everyone to ponder. When you write a file in rebol that is somewhat large (around 1 meg or so) and then immediately after writing it you want to do something with it (email it, etc) I get an error message that the file is not there. > ... > Any suggestions? I get the distinct impression that there's something wrong with your computer's operating system! I've had no trouble writing extremely large files with Rebol and immediately using the file. The only "trouble" that I've had in this area is writing a large number of large files all at once, when the operating system takes a while to show all the icons for the files! But that's not the fault of Rebol. I'd suggest that you look very closely at your computer virus checker, as it could delaying the write of files while it scans for virii. I had this problem with a virus scanner which persistently wanted to scan all files that were being written; eventually I had to remove my virus scanner because it grew incapable of handling the load. Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Euro and German currency
> Is there supposed to be a special symbol here? > (Not just "DM" ?) > I don't see it here in Outlook. There's only "DM" there. Did you see the special Euro character? It's like a curly capital "e". Andrew J Martin Attendance Officer Speaking in tongues and performing miracles Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Building an Associate List from a string
Earlier I wrote: > You need to put the above into a function and make 'Word and 'Value into local words and take out 'probe-s. Something like this: Rebol [] Test: "age^-54^-name^-Tim Johnson^-occupation^-coder^-Salary^-USD$10.00" Parse-List: function [String [string!] /With Delimiter [string! char!]] [Block Word Value] [ Delimiter: any [Delimiter tab] Block: copy [] all [ parse/all String [ some [ copy Word to Delimiter skip (Word: to word! Word) [ copy Value integer^ (Value: to integer! Value) | copy Value money^ (Value: to money! Value) | copy Value [to Delimiter | to end] ] ( insert tail Block reduce [Word Value] ) [Delimiter | end] ] end ] Block ] ] probe parse-list Test halt Which returns: [age 54 name "Tim Johnson" occupation "coder" Salary USD$10.00] Andrew J Martin Bored Attendance Officer Speaking in tongues and performing miracles Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Building an Associate List from a string
Tim wrote: > I would like to employ a strategy that converts any value to the best guess for a rebol datatype. IOWS, "54"[string!] would become 54[integer!] > > It occurs to me that a brute-force method would be to process via a nested attempt[any[]] loop. > > Any more "elegant" ideas? Rebol [] test: "age^-54^-name^-Tim Johnson^-occuptation^-coder^-Salary^-USD$10.00" probe parse/all test [ some [ copy Word to tab skip (probe Word: to word! Word) [ copy Value integer^ (Value: to integer! Value) | copy Value money^ (Value: to money! Value) | copy Value [to tab | to end] ] (probe Value) [tab | end] ] end ] halt You'll need my %Patterns.r script to get values for integer^ and money^ (there's other patterns there as well). You need to put the above into a function and make 'Word and 'Value into local words and take out 'probe-s. I hope that helps! Andrew J Martin Attendance Officer Speaking in tongues and performing miracles Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Cunning use of [], () & {} in R# and in future? Rebol versions?
Earlier I wrote: >> X[2] > == "b" It looks like I'm solving problems which not yet exist. Andrew J Martin Attendance Officer & Grail Jedi, fighting with laser swords... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Q - Update major revision now available...
> (Ad free Q Pro version available with tons of added features) What are the features in this version? Andrew J Martin Attendance Officer & Grail Jedi, and Q straight man. :) Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Memory leak on View faces using "feel"..
Terry wrote: > I've noticed a memory leak when you hover a mouse over any face using the "feel" user interface events. Is this a known bug or ? If you run the example below, and watch the memory usage of the Rebol.exe running it, it will go up when you hover. Same thing with the engage feel. > > view layout [ > [box "A Box" forest feel [ > [over: func [face act pos] [print [act pos]] > [] > [] > > OS: Win2k I get the same thing on Windows 2000. Perhaps it's Rebol's allocation of storage space for printed lines at the console? Every time 'print is evaluated, there's a new entry in the console terminal windows. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Vanilla wont run at my server
Carlos wrote: > After downloaded Vanilla I have followed all the steps of installation described at the site but yet I could not get it to run at the server I already have some REBOL scripts running as CGI. > > Anyone that uses it could give me a hand? I've had a similar experience as well, but thought it must be my abysmal lack of knowledge. I, too, would appreciate a tutorial on this topic. Andrew J Martin Attendance Officer Tasting essence of vanilla... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Cunning use of [], () & {} in R# and in future? Rebol versions?
Volker wrote: > Hum. If this magic-char-thread is serious, could I borrow someone my perl-interpreter? ;) With Rebol, my words mean what I want them to mean. :) :-/ But if I want to be understood and want to understand others, it's best that we all agree on what Rebol or R# words mean to all of us! :) Andrew J Martin Attendance Officer, Grail Jedi, Knight of Lucidity & destroyer of gibberish! Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: holding lit-word! values in a word...
> WOW! > > my brain just clicked . > > now all of a sudden all those lines of code using get-word > notation when it seems its not specifically essential... make sense! Rebol: the Zen learning experience... Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Cunning use of [], () & {} in R# and in future? Rebol versions?
It occurred to me as I was writing Rebol code, that it's possible to re-use these characters [], () & {}, in useful ways. I've noticed that when I'm writing block!, paren! & string values, I leave white space before and after the [], () & {} characters. It would be nice to have: >> X: ["a" "b" "c"] == ["a" "b" "c"] >> X[2] == "b" In other words, by running the block "hard" against the word, it's like: pick X 2 I don't know what use () and {} could have, though. What's your thoughts? Andrew J Martin Attendance Officer & Grail Jedi who is tapping on the dungeon wall with Rebol... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] New dialect
Hi! Here's an example of my latest dialect: Pupil "Lasdv RASDKLNO" Remove A "AStudy" "Vk" Link A "10ICTY" "DT" "CT" Pupil "Advadwv ew Oadva RAREAEVE" Remove E "EStudy" "Vk" Link E "10ENGL" "EP" "K1" Pupil "Vsvasd JSK" Remove F "FStudy" "Vk" Link F "9SCIE" "BR" "E2" "9BR" Pupil "Aav KAONUA" Remove C "CStudy" "Vk" Link C "9SCIE" "BP" "E4" "9WD" It's for work, a dialect to express pupils timetable changes in a report, removing a link for example from: E "Estudy" "Vk" which is E line, the subject "Estudy" with the teacher "Vk". To: E "10ENGL" "EP" "K1" which is E line, the subject "10ENGL" (year 10 English), with the Teacher "EP" in the Room K1. This is a work in progress, used for correcting digital records in the previous term, which are used in reports to parents about their children. (I've gibberished each pupil's name). Andrew J Martin Attendance Officer & Grail Jedi. Getting all esoteric... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: CMS in REBOL?
Hi, Will. You wrote: > try this page: > http://opensourcecms.com/modules.php?name=Content&pa=showpage&pid=6 Sorry, our school's firewall is just to high! :) I suggest HTML email! Andrew J Martin Attendance Officer & Grail Jedi Who's supply of witty taglines seems to have dried up at the moment... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: CMS in REBOL?
Carlos wrote: > I am very used to systems such as e107 (www.e107.org) for instance. Unfortunately, my work's firewall prevents me from accessing this (and my home internet isn't working 'till next week). Can some one summarise or could Carlos send a interesting page from the site please? > I thought it would be a great idea to have something similar to E107 written in REBOL. It could be a good idea? Andrew J Martin Attendance Officer & Grail Jedi: in a deep dungeon peeking out from behind a firewall, & sending emails with the help of herds of friendly electrons...Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: 'ML problem with literal quotation marks
Earlier, I wrote: > My ... Build-Tag dialect should check every string! attribute value and 'escape' any double quote marks inside (so that people don't have to worry about this.) Build-Tag: function [ "Generates a tag from a composed block." Values [block!] "Block of parens to evaluate and other data." ] [ Tag Value_Rule XML? Name Attribute Value ] [ Tag: make string! 7 * length? Values Value_Rule: [ set Value issue! (Value: mold Value) | set Value file! (Value: remove mold Value) | set Value url! (Value: mold Value) | set Value lit-path! | set Value string! (replace/all Value {"} """) | set Value any-type! (Value: form :Value) ] XML?: false parse compose Values [ [ set Name ['?xml (XML?: true) | word! | url! | string!] (insert tail Tag Name) any [ set Attribute [word! | url! | string!] Value_Rule ( repend Tag [#" " Attribute {="} Value {"}] ) | Value_Rule (insert/only tail Tag reduce [#" " Value]) ] end (if XML? [insert tail Tag #"?"]) ] | [set Name refinement! to end (Tag: mold Name)] ] to tag! Tag ] The change is this line: | set Value string! (replace/all Value {"} """) which escapes {"} with the appropriate HTML code. Testing: >> test: {"boo-boo"} ; literal quotes == {"boo-boo"} >> print ml compose/deep[ [html[ [body[ [input/type/name/value "text" "testing" (test) [] [] [] And displays: "boo-boo" in the input field. Enjoy! Andrew J Martin Attendance Officer & Grail Jedi. Successively refining oneself... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: 'ML problem with literal quotation marks
Hi, Tim. > Cc: [EMAIL PROTECTED] That email address no longer exists! Try one of these: [EMAIL PROTECTED] [EMAIL PROTECTED] Or at work: [EMAIL PROTECTED] Tim wrote: > > > > > The content as viewed in the browser does not show {"boo-boo"} (with or without the literal quotes) That's because the browser interprets the "input" tag like this: input type="text" name="testing" value="" In other words, the "value" attribute is an empty string, which is why the browser doesn't show {"boo-boo"}. There's also a fault in my ML dialect, as I never considered that people might want to display text with double quote marks. My ML dialect (or maybe Build-Tag dialect) should check every string! attribute value and 'escape' any double quote marks inside (so that people don't have to worry about this. Andrew J Martin Attendance Officer & Grail Jedi. Chief boo-boo maker! Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: R# or Rebol Sharp on DotNET
Earlier, I wrote: > ..."Number_Units" (I really need a better [name] for these!) Taking a hint from the Core PDF about money data-types, I'm now using "Scalar" to name values like these: 50Km/H 60MpH 99Meters 12.3cm and so on. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Compose on tag! values
What do people think about extending 'compose to work within tag! values? For example: paragraph_colour: "green" compose [ ] which results in: [ ] Comments, criticism, witticisms? :) Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Rebol# or Rebol on DotNET
bryan wrote: > then one can use xml schema to define rebol datatypes, don't much care for xml schema, but the .Net implementation is actually useful, especially as one can do runtime translation between xml schema datatypes and .net datatypes. At the moment, I'm using .NET Regular Expressions to parse out R# (and Rebol) data types, as .NET will compile these regexp is native code upon loading (and I've got a good tutorial on Regexp in the PERL documentation). If you could provide XML schema definitions and a way to map on .NET regexp or some other way to map rebol values into .NET datatypes, I'll happily include them into R#. > One of the things I've thought about is if it were possible to consume a rebol script as an xml provider: > http://msdn.microsoft.com/msdnmag/issues/01/09/xml/default.aspx Hmmm, how would we represent something like: 12.5% or: print or: USD$123.45 or: £12.34 ; British Pounds & Pence. ? Block! values are sort of easy enough: ; Or some other tag name? ; blah blah Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Rebol# or Rebol on DotNET
Volker wrote: > "do it this way. you need a current version of rebol" > specially when non-gurus talk to others. "No, no! You need one of the beta versions of Rebol for your OS." (pre- Core 2.5.6 not so long ago) :) Andrew J Martin Attendance Officer & Grail Jedi. R(H)ash and impetuous... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: CMS in REBOL?
Carlos wrote: > Is there some Content Management System written in REBOL? Perhaps you could elaborate on CMS means to you? What "stuff" would be accomplished by having and using a CMS? Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Multithreading with Rebol
Gabriele wrote: > ...one of the reason why Nenad started the R# project (not to be confused with Andrew's R# :), is to create a multithreaded REBOL clone. Perhaps R# was a r(H)ash choice... :) Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] FW: Re: Bad accent causes problem
Hi Norman, R> What im trying to accomplish is to reverse a bitset! R> Or better.. to extract to complete contence from a bitset! G> I think Brett(?) had a module that did that, but I'm not sure where it G> is. I might have it here somewhere if nobody else knows. Perhaps Romano's email from earlier might be helpful? Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ -Original Message- From: Romano Paolo Tenca [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:04 AM To: [EMAIL PROTECTED] Subject: [REBOL] Re: Bad accent causes problem Hi all, > keys-to-insert: make bitset! #{ > 0100FF7F > } > > Perhaps changing the bitset can be a solution, but it depends if you type the character with one or 2 keys. This bitset excludes only first control chars in the range 0-31 and 127. If you want to see the chars permitted by this View bitset, do monitor ctx-text and then double click on the item keys-to-insert. In this ways you can also see all the chars in the keymap. (you need anamonitor.r from http://www.rebol.it/~romano/) --- Ciao Romano -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject. DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Changing color of text in a button
> I tried to do the following : > > myfunc: func [arg][arg/colors: reduce [red blue] show arg] > view layout [ > "button1" [myfunc face] > "button2" [myfunc face] > ] > > This worked, but _all_ my buttons text colors are changed... I tried something similar, but couldn't get the buttons to change colours. >> myfunc: func [arg][arg/colors: reduce [red blue] show arg print 123] >> view layout [ [button "button1" [myfunc face] [button "button2" [myfunc face] [] Andrew J Martin Attendance Officer & Grail Jedi & View padawan... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] R# or Rebol Sharp on DotNET
Here's what I've got after two or three evenings of work: /* Name: R# Title: "R# (Rebol Sharp)" File: %R#.cs Purpose: "Allows C# to read Rebol and Rebol Sharp data values." Author: "Andrew Martin" Date: 15/October/2003 Version: 0.1.0 */ using System; using System.IO; using System.Windows.Forms; using System.Globalization; using System.Text.RegularExpressions; namespace Aztecnology.Rebol { public class Value { protected String Delimiter; protected String Title; protected Regex Pattern; protected bool IsDebug; public Value () { Delimiter = @"(\s|\[|\]|\z)"; Title = "Value"; Pattern = new Regex (Delimiter); IsDebug = true; } public bool IsValue (String Source, int Index) { return Pattern.IsMatch (Source, Index); } public void Load (String Source, ref int Index) { Match mPattern = Pattern.Match (Source, Index); if (IsDebug) { MessageBox.Show ( Title + ": " + Source.Substring (Index, mPattern.Length), Title ); } Index += mPattern.Length; } } public class White_Space : Value { public White_Space () { Title = "White Space"; Pattern = new Regex (@"\G\s+"); IsDebug = false; } } public class Comment : Value { public Comment () { Title = "Comment"; Pattern = new Regex (@"\G;[^\n]*(\n|\z)"); } } public class Time : Value { public Time () { Title = "Time"; Pattern = new Regex (@"\G\d{1,2}:\d{2}:\d{2}" + Delimiter); } } public class Integer : Value { public Integer () { Title = "Integer"; Pattern = new Regex (@"\G\d{1,3}" + Delimiter); } } public class Signed_Integer : Value { public Signed_Integer () { Title = "Signed Integer"; Pattern = new Regex (@"\G(\+|\-)\d{1,3}" + Delimiter); } } public class Number_Units : Value { public Number_Units () { Title = "Number Units"; Pattern = new Regex (@"\G\d{1,3}[^\s]+" + Delimiter); } } public class Rebol_Sharp { private static string Title = "R#"; private Value vValue = new Value (); private White_Space white_space = new White_Space (); private Comment comment = new Comment (); private Time tTime = new Time (); private Signed_Integer signed_integer = new Signed_Integer (); private Integer iInteger = new Integer (); private Number_Units number_units = new Number_Units (); public void Load (String Source) { int Index = 0; int Length = Source.Length; while (Index < Length) { if (white_space.IsValue (Source, Index)) { white_space.Load (Source, ref Index); continue; } if (comment.IsValue (Source, Index)) { comment.Load (Source, ref Index); continue; } if (tTime.IsValue (Source, Index)) { tTime.Load (Source, ref Index); continue; } if (signed_integer.IsValue (Source, Index)) { signed_integer.Load (Source, ref Index); continue; } if (iInteger.IsValue (Source, Index)) { iInteger.Load (Source, ref Index); continue; } if (number_units.IsValue (Source, Index)) { number_units.Load (Source, ref Index); continue; } Index++; } } public static void Main (string[] args) { Rebol_Sharp r = new Rebol_Sharp (); StreamReader sr = new StreamReader ("Rebol.txt"); r.Load (sr.ReadToEnd ()); MessageBox.Show ("Bye!", Title); } } } /* End. */ And here's the two lines in the .bat (batch) file that I use to compile the above program: csc /target:winexe /out:R#.exe /reference:System.dll /reference:System.Windows.Forms.dll /reference:System.Drawing.dll /win32icon:R#.ico R#.cs pause And here's the contents of %Rebol.txt: +12 -23 123 12:34:56 2:34:56 99% 110% 50Km/H 6' 3" 60MpH 99Meters ; Te
[REBOL] Re: Rebol# or Rebol on DotNET
Further thinking: It'd would be nice to have a rebol value that contains units. Like: 12% 50Km/H 60MPH 99.999% And the parts could be accessed like money! datatypes: >> x: US$123.45 == US$123.45 >> first x == "US" >> second x == 123.45 >> For example: >> x: 50Km/H == 50Km/H >> first x == 50 >> second x == "Km/H" >> Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Rebol# or Rebol on DotNET
Just been thinking through this, while learning how to write a Rebol parser in C# (it's very tricky without using Rebol's 'parse...). Looking at the lexer/parse combination, Rebol only seems to need a lexer, because the tokens are Rebol values. The only trickery is balanced braces {} for long string values, and balanced square brackets for blocks [], which could be handled by a stack in the lexer part. My questions are about the interface to .NET stuff. How would we fit Rebol and DotNET functions together? Internationalisation: is it OK to "expand" Rebol's definition of values? For example, a money! Datatype that allows British pounds symbol or Euro symbol? Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] So where's the German speaking Rebol list?
> Falls es sich um einen einzelnen Irrläufer gehandelt hat, sollte sich das für Sie erledigt haben, falls > nicht, dann sendes Sie bitte eine Email an > >[EMAIL PROTECTED] > > mit dem > >Subject: unsubscribe > > danach sollten Sie aus der Liste wieder ausgetragen sein. Andrew J Martin Attendance Officer & Grail Jedi. No, I don't speak German. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [newbie] Sending prints to std out
> Scite is my text editor of choice, which has an execution option that captures the consoles output. > > The problem is that Rebol's virtual console doesn't seem to send the output to std out. > > Is there something I can do so that it does? You could try invoking Rebol as a CGI and see if that makes a difference. Something like this: C:\Rebol\Core\rebol.exe -cs or (with "q" for quiet): C:\Rebol\Core\rebol.exe -csq You may have to add some command for inserting the file name into the command? I hope that helps! Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] The needs that Rebol answers
bryan wrote (in another thread): > Other people on this list do find Rebol practical for their needs, as well as their aesthetics, can you specify what exactly in your needs Rebol answers? For me, Rebol fills my need (want) to generate HTML from plain text (%eText.r), and generating HTML, XHTML, XML, SVG and other XML related languages (%ML.r). I've found Rebol handy to read .csv files that were generated badly, manipulate them (transpose, tear off columns, add other columns, and so on), and write the correct .CSV back to disk (%CSV.r). I've also found it great to write a Wiki CGI in (%Wiki.r). I've also needed it at work to aid other badly written programs that have no competitor (yet...), so they can do their job properly. I've got other needs that I think Rebol could fill, like reading and parsing XML well (so that I can read XML files written by MS Excel 2002), and native Windows (native OS) user interface (so that I can create "miniature" Windows compatible programs). Basically, playing well with others. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: New Q module - Translate
pekr wrote: > What I miss with Q (otoh I haven't read any docs yet) - is - you run it and ask yourself - how do I use it? Some kind of wizard would help. Perhaps a Help|About and a Help|Wizard menu function would be useful? :) Andrew J Martin Attendance Officer & Grail Jedi & Q Heretic... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Printing Dialect
Hi, Gabriele. You wrote: > AJM> understand for people not used to C#. I've also thought of using PostScript and PDF, but they seem more complex to me. > How should the PDF Maker be simplified? So I can add to the to do list for version 2. Just to clear things up a bit, I don't think that Gabriele's PDF Maker is too complex. I think that PDF is a bit too complex to use by typing it out by hand. I haven't used Gabriele's PDF Maker much. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Multi-lingual scripts
Carlos wrote: > PS: I have added one of yours scripts (along with proper credits) published at REBOL's Cookbook to REBOLBRASIL Forum You're welcome to translate into Portuguese and publish my Rebol scripts on your site. The same applies to French people; they can translate my scripts into French and publish them on French language sites. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: steel... darn life
max wrote: > The only thing I wish to ensure here is that there is no specific "commercial use" license. Would you accept money, if I and Colenso High School made money with your software? :) Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: RES: Re: REBOL in XEMACS
Tim noted: > *note* that 'sub and 'def are not plain vanilla function constructs but are complements of Andrew Martin Note that Rebol has no key words which is why key word highlighting makes no real sense for Rebol, particularly if one is working with dialects of Rebol. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Smart Client
max wrote: > Would a dynamically skinnable and dynamically locale switchable alternative to vid change your mind about using windows ui? Yes, I'd to see Steel. :) Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Smart Client
Michael Weber wrote: > I see you're speechless! :) :D Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Smart Client
Hi, Romana. > Do you want a patch? Yes, please. I'll put it into my %Patch.r script so more people will know about it and can use it. > I used many languages in my life and I have always used external libraries and third party tools, why cannot it happen with Rebol? I agree. At the moment I feel that Rebol is best suited for connecting other bits of software, like smart glue, and for creating X/HTML and XML. I've found that DotNet and C# gives me the best native user interface for Windows. All I need now is to find a way to connect DotNet/C# and Rebol together. I'd like a C# parser for Rebol values that have been 'mold-ed into a text string. Failing that, I could probably make do with XML created by Rebol and my ML script and interpreted by C# using it's XML parser. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Problem with parsing ISO-8859-1 encoded text
DideC wrote: > The 'opt has made the difference and now it works, but I'm not sure to understand why 'opt should be use for paren!. > > I suppose that your last remark (about shorter string after modifying it) was the problem. I believe Romano meant that there's a bug in 'parse that it should keep working through the rule until 'parse comes to a rule that requires content and fail then. 'Parse should not stop just because it's come to the end of the input after processing the parenthesis value. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Smart Client
Volker wrote: > Ah flaming! (whirling torchlight). Hi! (Ouch!) :) > An Andrew Martin on this list needed as much lines with "using" as i would for the whole viewer! ;) I'm no expert, but with my little program in a hour or two, I achieved far more Windows user interface compatibility than I and others have achieved in Rebol in several years... :-/ > > Providing dramatically improved support for localization, printing, layout, and usability. > localisation. hum. i could plug my %translate.r in, but nobody noted it, so i plug it out. Hey! I only speak one language. (I'm just a mono-culturist at the moment.) But at least with my home version of Windows, I can now write Maori (one of NZ's two official languages). :) (Not yet with Colenso's systems as the Windows software to do so hasn't been installed.) But I can't yet type into Rebol and get it show Maori macrons. :-/ > printing, it works with a browser. Yes, I've tried it and it works well (my Wiki and other scripts do/allow this). Unfortunately there's some graphics I can't print using a browser interface. For example a horizontal bar looking a lot like a thermometer on it's side, with a variable position of the "level". Also, I can't change paper size or specify headers and footers on each page. This has to be manually done through the browser's print settings. And then when it's changed, it has to be changed back again afterwards. > btw a spreadsheet uses VB as its storage-format, so it can be generated as text and imported in excel as macro. something similar to file ms-word with letters? Hmmm, I haven't heard of that. I do know that MS Excel 2002 allows using XML as input. This is very neat as one can use this to create multiple sheet work books, which is very nice for generating reports in as an output from a Rebol script (I've got several Rebol scripts which do this now.) > AFAIK one can ask "which smart client applications" quite successfully currently? http://www.microsoft.com/nz/msdn/default.mspx And click on "Case Studies for Developers". The one that I find most interesting is the GeoVector one, where people can use a GPS equipped, pocket PC and find out information about real world places and objects just by pointing the pocket PC! I also didn't realise there was so many developers in NZ! And there's mine. :) But it's not written yet. :( But it'll use Rebol! :) And C#! :-/ But it'll have a native windows user interface! :) Let's shoot Rebol's horse and turn it into glue. :) :) :D Smart glue. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Smart Client
max wrote: > Doesn't IOS do just that!? > > (except for printing, which could be done with html and a pro license)... Except for multi-line text boxes, where cursor movement isn't handled correctly. Here's an example: example line 1 blah blah blah blah example line 2 blah blah Try to down arrow from line 1 to 2 when the cursor is positioned near or at the end of line 1. You'll find that the cursor won't move in Rebol/View. Except for menus in Rebol/View, which there aren't any. Yes, I know that some programs can be written without menus, but a number of programs can't be written for novice and low-skilled users with out menu support. These kind of programs I need to write and have going ASAP. > ...it is a nightmare to actually implement your own xml parser. Agreed. I've found it difficult as well. But I've found that creating XML is remarkably easy now with my ML dialect for Rebol, which allows me to create HTML and XHTML pages really easily and the same with MS Excel spreadsheets. > But if it's like any VB I've done before, it's probably a mess to actually implement and then the next version comes out and it takes a month to get stability back. I don't get that impression for DotNet. Mind you, I've only had a weekend's experience in writing C# programs. I can see that the library stuff is a lot easier to use than the old Win32 API. I've also read something similar in the MS MSDN site, and about the efforts MS went to ensure that this didn't happen again. I'm also impressed by the effort MS went to, to ensure that dynamic and scripting languages weren't left out in the CLR (Common Language Runtime). I'd really like Rebol to have native user interface on all the platforms it runs on. But I can't see it happening. I think it's unrealistic to wait or hope for this to arrive. Instead, what I'm planning on doing is having DotNet and C# for rich clients (Colenso uses Windows), with Rebol as the intermediate layer, which communicates through the DotNet client, via TCP or CGI, or through using Soccer, Rugby, or it's successor (Sorry, can't remember it's name). That way I can have the best of both worlds: compatibility with Windows and the expressive power of Rebol. And I can then avoid the worst of the both worlds, which are things like parsing XML in DotNet & Rebol, non-native user interface in Rebol, and expressive power in C#. Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Smart Client
> > Making it easy for developers to tie XML Web services into their smart client applications. > XML Web services in Microsoft terms is SOAP, a never ending hell which delivers cross-platform compatibility to anyone on a Microsoft platform. > :) I want to create a DotNet program which understands Rebol values, so I can keep the best of Rebol, with the best parts of DotNet (native Windows user interface which is also easy to program). Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Smart Client
> "..the promise of REBOL,.." - my experience with REBOL has taught me things I didn't expect to learn and given me an new tool to explore ideas. I'm sure we all had different expectations of REBOL when we picked it up. My joy with REBOL is to apply it more areas than I expected, my frustration is in being limited to applying REBOL in less number of areas than I increasingly expect! Just a "me too!" email. :) Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: rebol support for sound
Mike wrote: > I assume rebol view will be up to the UI and event model task but what support will Rebol View/Core provide in the way of playing sound files. IIRC there's a tutorial by Carl somewhere in http://www.rebol.com which shows how to use Rebol to play sound files. Andrew J Martin Attendance Officer & Information Systems Trouble Shooter Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: cgi binary data xfer...
max wrote: > Q1: how do I initiate a binary xfer in cgi/html, so that instead of displaying binary data as a lump of text in the browser, I get a file transfer dialog. > Q2: how do I make 'print work like a write/binary so that the read data actually stays binary... Hi, max! Here's what I use in my Wiki script: MIME: make object! [ Extension_MIME: load %"Extension MIME.txt" Type?: func [File [file!]] [ select Extension_MIME Extension? File ] Data: function [File [file!]] [Data] [ Data: read/binary File print [ "Content-Type:" any [ Type? File 'application/octet-stream ] newline ] write-io system/ports/output Data length? Data Data: none quit ] ] View_File: func [Folder [file!] File [file!]] [ File: any [ if exists? Wiki_Files/:Folder/:File [ Wiki_Files/:Folder/:File ] if exists? Folder/:File [ Folder/:File ] if exists? File [ File ] Rebol/script/header/File ] if not found? find Inline_Extensions extension? File [ print rejoin [ "Content-Disposition: attachment; " {filename="} form last split-path File #"^"" ] ] MIME/Data File ] The key part is this line: write-io system/ports/output Data length? Data And these lines: print [ "Content-Type:" any [ Type? File 'application/octet-stream ] newline ] I hope that helps! Andrew J Martin Attendance Officer & Information Systems Trouble Shooter Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: steel latest news.. pretty long... Ignore if you wish..
max wrote: > So... I will build my own license > the SCL - Steel Community License. > -- > > I was about to put it in this mail, then I figured it > would have been too long a mail... so I'll just post the > license with the rest of the new site when its ready. > > The license will be subject to change depending on the > community's comments (if any). > > All comments welcome... happy to be on the list after this > (short) time off. Have you considered using one of many licences at Creative Commons? (It could save a lot of time and effort.) Andrew J Martin Attendance Officer & Information Systems Trouble Shooter Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [EMAIL PROTECTED] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: to/make datatype!
Joel Neely wrote: > So far the most simplest way I've come up with to create a DATATYPE! value from a STRING! value is > > to-datatype: func [s [string!]] [ > first reduce load rejoin [ > "[" s either #"!" = last s ["]"] ["!]"] > ] > ] > > >> type? to-datatype "string" == datatype! > >> make to-datatype "integer" "12"== 12 > > There's *got* to be a better way! Any suggestions? I missed seeing this earlier. Here's my solution: Type: 'string!; with a lit-word! Data: 123 to do Type Data Type: "string!"; and with a string! Data: 123 to do Type Data I hope that helps! Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Field color change on error.
Carl Read wrote: > >> ? attempt > No information on attempt (word has no value) > > Only in the beta REBOLs perhaps? >> source attempt attempt: func [ {Tries to evaluate and returns result or NONE on error.} value ][ if not error? set/any 'value try :value [get/any 'value] ] Perhaps my %Patches.r script may be of use? It's attached and available from my site. Andrew Martin Beta Rebol-er... ICQ: 26227169 http://valley.150m.com/ -><- -- Attached file included as plaintext by Listar -- -- File: Patches.r Rebol [ Name: 'Patches Title: "Patches" File: %Patches.r Author: "Andrew Martin" eMail: [EMAIL PROTECTED] Web: http://valley.150m.com Date: 12/October/2002 Version: 1.1.5 Purpose: {Various patches to Rebol.} Category: [util 5] ] ; Replaces 'days with 'weekdays, to match /weekday refinement for date! values. if none? in rebol/locale 'weekdays [ rebol/Locale: make object! [ Months: rebol/locale/months Weekdays: rebol/locale/days ] ] ; Replacement 'Extract to work with series!, and better initial length. Extract: function [ "Extracts every n-th value from a series." Series [series!] Width [integer!] "Size of each entry (the skip)." /Index "Position to extract from." N [number! logic!] ] [New] [ if not Index [N: 1] New: make Series (length? Series) / Width forskip Series Width [ insert/only tail New pick Series N ] New ] ; Replacement 'Alter. Alter: function [ {If a value is not found in a series, append it; otherwise, remove it.} Series [series! port!] Value [any-type!] ] [Temp] [ either Temp: find/only Series :Value [ remove Temp ] [ insert/only tail Series :Value ] :Series ] ; Replacement 'Append. Append: func [ {Appends a value to the tail of a series and returns the series.} Series [series! port!] Value [any-type!] /Only "Appends a block value as a block." ][ either only [ insert/only tail Series :Value ] [ insert tail Series :Value ] :Series ] ; Replacement 'Repend. Repend: func [ {Appends a reduced value to a series and returns the series.} Series [series! port!] Value [any-type!] /Only "Appends a block value as a block." ][ either only [ insert/only tail :Series reduce :Value ] [ insert tail :Series reduce :Value ] :Series ] ; Needed until very latest versions of Rebol are released. if not value? 'as-pair [ as-pair: func [ "Combine X and Y values into a pair." x [number!] y [number!] ][ to-pair reduce [to-integer x to-integer y] ] ] ; Needed until very latest versions of Rebol are released. decode-cgi: func [ {Converts CGI argument string to a block of set-words and value strings.} args [any-string!] "Starts at first argument word." /local block name value here tmp ][ block: make block! 7 parse/all args [ any [ copy name [to #"=" | to #"&" | to end] skip here: ( if tmp: find name #"&" [ here: skip here (offset? tmp name) - 2 clear tmp ] append block to-set-word name ) :here [ [copy value to #"&" skip | copy value to end] ( append block either none? value [copy ""] [ replace/all dehex replace/all value #"+" #" " crlf newline ] ) ] ] end ] block ] ; Needed until very latest versions of Rebol are released. array: func [ "Makes and initializes a series of a given size." size [integer! block!] "Size or block of sizes for each dimension" /initial "Specify an initial value for all elements" value "Initial value" /local block rest ][ if not initial [value: none] if block? size [ rest: next size if tail? rest [rest: none] size: first size if not integer? size [make error! "Integer size required"] ] block: make block! size either not rest [ either series? value [ loop size [insert/only block copy/deep value] ] [ insert/dup block
[REBOL] Re: 16-Oct-2002/16:48:54+13:00
And it arrived in New Zealand at: 16-Oct-2002/17:38:54+13:00 Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- - Original Message - From: "Andrew Martin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 16, 2002 4:48 PM Subject: [REBOL] 16-Oct-2002/16:48:54+13:00 > 16-Oct-2002/16:48:54+13:00 > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] 16-Oct-2002/16:48:54+13:00
16-Oct-2002/16:48:54+13:00 -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Anchor? - A newbie question
Smeagol asked: > Is there a keyword or flag that allows direct jump into a specific part of Rebol source code? Actually I mean something like anchor in HTML. I probably missed some basic thing in all the beginner's stuff. Do you mean something like BASIC's GOTO statement along with a label? For example (in BASIC): 10 A = A + 1 20 GOTO 10 Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: XML.com Embedded Markup Considered Harmful [Oct. 02, 1997]
Joel wrote: > Adding "length" attribute/value data to the tag is left as an exercise to the reader. [ Rebol [] XML: func [Block [block!]] [ ML Map Block func [Value] [ reduce any [ if block? Value [ ['block/length length? Value XML Value] ] [to-word form type? Value form Value] ] ] ] probe XML reduce [ [25 87 20] 13/Oct/2002 [[1 3 5] [2 4 6]] "That's all, folks!" ] halt ] Which generates: {258720< date>13-Oct-2002135246That's all, folks!} Watch out for line breaks! I didn't worry about nice padding and I haven't checked for "<" and ">" and "&" values. I've left object! values as an exercise for the reader, as this depends more upon the receiver. :) Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: idioms to reduce logic clutter ?
Jason wrote: > ; > ; TEST FOR PASSWORD > ; > > upass: copy "" > loginstatus: false > > either error? try [ > ;condition > upass: cgi-obj/userpass > ][ > ;error > if = upass "" [ > print rejoin [ >{Bad login!} >{no user password provided } >{}{try again}{} >{} > ] > ] > quit > if <> upass "" [ > print rejoin [ >{funny password provided. Please } >{}{try again}{} >{} > ] > ] Notice the duplication here: >{}{try again}{} >{} I'd make this into a small function which takes a error message. > ][ > ; ok user has submitted a name and password > ; check to see if they match > upass: cgi-obj/userpass > either = upass logindict/:uname > [loginstatus: true] > [loginstatus: false] > if not loginstatus [ The above is better written as: if not loginstatus: upass = logindict/:uname [ ; etcetera > ;trouble in paradise - help them out.. > print rejoin [ > {Username and password do not match. Please } > {}{try again}{} > { > Forgot your login or need to register ? > Please enter your email address here: > > > } > ] > quit > ] > ] Just a few suggestions. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: XML.com Embedded Markup Considered Harmful [Oct. 02, 1997]
Dick wrote: > I prefer: > >Average expressionwhichyieldsanarrayofdata >From my box of tricks: Average: func [ "Averages the values in the Block." Block [block!] "Block of values." ] [ divide accumulate 0 Block :+ length? Block ] :) Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: XML.com Embedded Markup Considered Harmful [Oct. 02, 1997]
> Embedded Markup Considered Harmful > by Theodor Holm Nelson > October 02, 1997 > > http://www.xml.com/pub/a/w3j/s3.nelson.html And, if you don't understand ZigZag, have a look at: http://www.ecs.soton.ac.uk/~lac/zigzag/ It's got some demos; which are a _bit_ easier to understand. Don't ask me; I'm still thinking about it! Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Fw: Re: template driven development? Re: Rebol Server Pages
Here's a site that has another take on "high style" design: http://philip.greenspun.com/panda/ Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: template driven development? Re: Rebol Server Pages
YS wrote: > This also reminds me of Enhydra's XMLC ( http://www.enhydra.org ). XMLC is one of the thing that solves the problem with embedding other languages within the HTML codes. > > The clean separation between "UI" and "logic" allows for different teams (UI and logic) to work in parallel once they have agreed on the use of certain naming conventions. > > Perhaps we can learn from XMLC to see how we can incorporate some of the features in one of the frameworks. Here's some HTML copied from the draw poker demo: Welcome to Larry and Daryl's EnhyDraw! poker Welcome to Larry and Daryl's Enhydra Poker! Two head sections in the same page? With two different titles? Here's some more HTML copied from the FormUpload page: Input1: Upload: Submit: They're using presentation markup (H2 tags) for input labels? There's no closing tags for the page; the "" isn't followed by closing tags for the "" and "" tags. Also, they're using uppercase for tag names which isn't XML compatible, and not all attribute values are quoted. But the above is probably because they're using visual web page design tools to create/maintain the pages, and because they've not got all the content from the program (content like title tag content is expressed outside the program). Presumably these problems would be fixed by using a XML-compatible visual web page design tool? pekr might be interested in this page: http://barracuda.enhydra.org/cvs_source/Barracuda/docs/comp/high_level_overv iew.html and looking for: Q: How does the BTemplate work? The concept of using id attributes to tell the parsing program where to get the data from can be easily implemented in Rebol, once one has a adequate HTML parser. :) Except that in the examples, it's changed to using the class attribute instead. :-\ Here's an example: http://www.w3.org/TR/html4/strict.dtd";> [Title] [Title] [Descr] [Nav Header goes here] Here's our third shopping list: 1. Corn (3 cans) 2. Peas (4 bags) 3. Bannanas (1 bunch) ... [Footer goes here] I wonder is pekr would be happier with this? :) The equivalent in Rebol would replace "::" with "/", and "." with "/". Except that I think the example above is faulty. I'm under the impression that the presentation stuff will vanish, as it's replaced? :-\ I could well be wrong. But that's enough rambling from me. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Rebol Server Pages
Doug wrote: > Can you provide some examples of how you use it? At the moment, I'm not using it. :( I just wrote it to show that it's possible to do what pekr needs without having to do the excess work that pekr seems to want to do. :) Here's an example .rsp: {{Test} <%hide [ Data: [ "L1 Foo Stuff" "L1 Bar Stuff" "L2 Foo Stuff" "L2 Bar Stuff" ] ]%> Test <% random/seed now either random true [ %> Have a nice day! <% ] [ %> Have a lousy day! <% ] %> The date and time now is: <% now %>. FooBar <%map Data func [Foo Bar] [reform [%><%Foo%><%Bar%><%]]%> And here's my test script: write %Test.html probe RSP read %Test.rsp browse %Test.html halt Using it with a web server would be specific to that web server. On Xitami, I'd put a line at the top of the .rsp file, like this: #! C:\Rebol\Base\Rebol.exe -cs "RSP Test.rsp" Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Project introduction ... Re: Re: RFC: Rebol Framework
pekr wrote: > I meant something bit different - not real rebol objects, but e.g. earlier mentined accommodation class. System admin (not necessarily rebol programmer) can say to himself one day - hey, this hotel has cinema inside. Where should I put that? So he goes to "object" repository, selects hotel class, and adds/describes "attribute" (field) of 'cinema-inside? type e.g. That was what I meant by ability to extend "object" during the system life-time ...Of course there can be consequences to it, like such field not existing in former records - so ti may cause some difficulcy to query engine e.g. I want and need users to be add or remove fields. A fixed system won't be better than what we've got all ready. > > Because one can alter the block at runtime! For example, adding more fields or removing them. That allows customising each record. > You can do so with object too. Object = template you load from your repository. If you want to extend, you can extend the class (block of set-word and value pairs), and instantiate the object (load block into context) once again :-) Unfortunately, one has to then hunt for the other instances of the object in the net and delete them. It's far more simple and quicker to just clear the block! (if necessary) then add in fields (Name Value pairs) as required. Sure, if you're just storing a tree of objects your system will work, but not if one has network of values. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: template driven development? Re: Rebol Server Pages
Jason wrote: > Personally, I prefer Olivier Auverlot's approach. You may too. I like it because it cleanly separates REBOL code from the html. It just goes cleanly within tags. Be aware when using Magic, that the Rebol expression between the tags must be complete! This can be seen in the 'parse code for magic, quoted below: until [ either found? find m-page "" [ parse m-page [ copy m-code to "" m-mark: ( if not none? m-code [ prin m-code ] m-page: copy m-mark parse m-page [ thru "" copy m-code thru "" m-mark: ( if error? m-err: try [ do m-code ] [ m-error (mold disarm m-err) ] m-page: copy m-mark ) ] ) ] ] [ prin m-page true ] ] Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- - Original Message - From: "Jason Cunliffe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Petr Krenzelok" <[EMAIL PROTECTED]> Sent: Monday, October 07, 2002 8:16 PM Subject: [REBOL] Re: template driven development? Re: Rebol Server Pages > > uhm, well - what's that? :-) Such kind of code it totally unacceptable > > to me :-) I hope build-markup does not work that way??? Do you really > > like the mixture of Rebol code and html that way? What will be the > > result? Your visual editor will show both strings unless you upload your > > page and let it be processed in production environment, where rebol is > > installed. > > hmm.. I tend to agree. > But always people have so many different needs and workflow styles. > To each his/her own tool. The more options exist for REBOL the better I think.. > > Personally, I prefer Olivier Auverlot's approach. You may too. > I like it because it cleanly separates REBOL code from the html. It just goes > cleanly within tags. But, if the progammer wants/needs to mix > code and presentation stuff within, of course they still can. Also there is now > new session handling, a very direct syntax for cgi variables [GET or POST] and > libraries can be loaded securely adn clenly to keep inline code concise and > readable, without sacrificing feature scope.. > http://www.rebolfrance.org/projets/magic/magic110.zip > > ./Jason > > > > > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Rebol Server Pages
Here's a better version with Maarten's suggested change. Rebol [ Name: 'RSP Title: "Rebol Server Pages" File: %RSP.r Author: "Andrew Martin" eMail: [EMAIL PROTECTED] Web: http://valley.150m.com Date: 8/October/2002 Version: 1.1.0 Purpose: {} Category: [util 1] Acknowledgements: ["Maarten Koopmans"] ] Hide: func [Block [block!]] [ do Block return; Deliberately returns unset! value. ] RSP: function [Text [string!]] [RSP] [ RSP: make string! length? Text use [StringScript ScriptString Script String] [ StringScript: "<%" ScriptString: "%>" parse/all Text [ any [ end break | StringScript copy Script to ScriptString ScriptString (append RSP Script) | copy String [to StringScript | to end] (append RSP mold String) ] ] ] form replace/all reduce load RSP unset! "" ] Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: if and parens
Gregg wrote: > The more code I remove, the better things seem to work. :) I agree. I've found exactly the same as well. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Rebol Server Pages
Here's a more up to date version of 'RSP with the 'Hide function: Hide: func [Block [block!]] [ do Block return; Deliberately returns unset! value. ] RSP: function [Text [string!]] [Open Close RSP Script String] [ Open: "<%" Close: "%>" RSP: make string! length? Text parse/all Text [ any [ end break | Open copy Script to Close Close (append RSP Script) | copy String [to Open | to end] (append RSP mold String) ] ] form replace/all reduce load RSP unset! "" ] 'Hide really deserves a better name. Any one got a better name? Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: diff or compare
Graham wrote: > Has anyone written a compare utility that reports where two text files are the same? Also, it would be very nice if it worked with directories and Rebol block! values as well. Andrew Martin I've got my fingers crossed... ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: template driven development? Re: Rebol Server Pages
pekr wrote: > uhm, well - what's that? :-) Such kind of code it totally unacceptable to me :-) I hope build-markup does not work that way??? 'Build-markup works the same way, but doesn't allow block! values to be separated by HTML tags and plain text. It also requires each expression within the "<%" and "%>" to be "complete", not separated likes 'RSP allows. > Do you really like the mixture of Rebol code and html that way? Of course not. That's why I went to eText, ML dialect and naked objects concept. Along the way I was forced to discard the HTML page designer. :) But I didn't miss him. :) > What will be the result? Your visual editor will show both strings unless you upload your page and let it be processed in production environment, where rebol is installed. Some kind of marker will have to be visible to the designer, otherwise they can't see it and move it around? :-/ I'm a bit confused here. > Displaying date or time is a simple task, what I will probably need is to generate some database query results, whatever the database is (initially rebol objects text files). My idea is that my friend does compelete design, including table, where results are displayed. The table will have one example element in it, so my friend will still be able to see, how does result of his code looks like in visual editor, but he will mark sections for me, e.g. , so I will be able to look at my code repository to look, if there is any code named section called "table_1". Oh, you mean something like this, perhaps: {{Test} <%hide [ Data: [; This is like results of query. "L1 Foo Stuff" "L1 Bar Stuff" "L2 Foo Stuff" "L2 Bar Stuff" ] ]%> Test <% random/seed now either random true [ %> Have a nice day! <% ] [ %> Have a lousy day! <% ] %> The date and time now is: <% now %>. FooBar <%map Data func [Foo Bar] [reform [%> <%Foo%><%Bar%> <%]]%> And here's the results: { ^{^{Test^} Test Have a nice day! The date and time now is: 7-Oct-2002/21:36:57+13:00 . FooBar L1 Foo Stuff L1 Bar Stuff L2 Foo Stuff L2 Bar Stuff } Now all your designer has to do is keep this: <%map Data func [Foo Bar] [reform [%> to the left of the first example row, and keep this: <%]]%> to the right of the first example row, and put these: <%Foo%> and: <%Bar%> where the contents of the columns are meant to go. I don't think that would be too hard?! :) The only time your effort needs to change if the number of columns changes, but then that implies that the database is changing as well... Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Parsing bug?
It looks like you've discovered a 'parse bug. I've forwarded this to feedback. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- - Original Message - From: "Franck MARCIA" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 07, 2002 8:48 PM Subject: [REBOL] Parsing bug? Hi all, Is that a bug or is there something I don't understand? >> text: {The|quick "brown"|"fox" jumps|over "the" lazy|dog} == {The|quick "brown"|"fox" jumps|over "the" lazy|dog} >> parse/all text "|" == ["The" {quick "brown"} "fox" " jumps" {over "the" lazy} "dog"] Look at the field which contains {"fox" jumps}! How can I get ["The" {quick "brown"} {"fox" jumps} {over "the" lazy} "dog"]? Franck. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Rebol Server Pages
Here's %Test.rsp, a example Rebol Server Pages file: Test Test <% random/seed now either random true [ %> Have a nice day! <% ] [ %> Have a lousy day! <% ] %> The date and time now is: <% now %> Note that "<%" and "%>" surround sections of Rebol script. It could be created by a HTML editor, I hope! :) I used my ML dialect to generate most of it, then edited by hand. Here's the RSP function: RSP: function [Text [string!]] [Open Close RSP Script String] [ Open: "<%" Close: "%>" RSP: make string! length? Text parse/all Text [ any [ end break | Open copy Script to Close Close (append RSP Script) | copy String [to Open | to end] (append RSP mold String) ] ] form replace/all reduce load RSP unset! "" ] Note that 'RSP is based on Rebol's 'build-markup. Here's the test script: write %Test.html RSP read %Test.rsp browse %Test.html And here's the generated HTML (I viewed the source and cut and pasted to this email: Test Test Have a nice day! The date and time now is: 7-Oct-2002/16:46:25+13:00 Note that the browser discards the extra spaces and line breaks shown here. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Is the list down?
Hi, Timothy. The list has been in operation since then. I've been getting a number of emails every day. I suspect you've become accidently un-subscribed (this has sometimes happened with the list processing software that Rebol HQ has). I'd recommend you send an email to [EMAIL PROTECTED] with Subscribe in the subject line. That should subscribe your email address. eScribe shows how much you've missed out. See: http://www.escribe.com/internet/rebol/index.html I've sent this message both to the list and directly to your email address to make sure it gets to you. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- - Original Message - From: "Timothy Rue" <[EMAIL PROTECTED]> To: "al" <[EMAIL PROTECTED]> Sent: Monday, October 07, 2002 4:18 AM Subject: [REBOL] Is the list down? > Is the List down? I haven't receive even one message sense what appeard to > be Sept 26th. > > --- > Timothy Rue > Email @ mailto:[EMAIL PROTECTED] > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: if and parens
Andrew wrote: > Try this instead: > > foreach elt read %. [if 'file = get in info? to-file elt 'type [print elt]] And this is far more simpler: foreach File read %. [if #"/" <> last File [print File]] Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: if and parens
> While I understand that in some cases parens may be necessary to avoid ambiguities, in the following example I fail to see why they are needed : > > this simply prints the list of files in the current folder and works quite fine : > > >> foreach elt read %. [if (get in info? to-file elt 'type) = 'file [print elt]] > but when removing the parens we get : > > >> foreach elt read %. [if get in info? to-file elt 'type = 'file [print elt]] > ** Script Error: in expected word argument of type: word > ** Where: halt-view > ** Near: if get in info? to-file That's because the '= is infix; it grabs the left and right arguments, as it were. Try this instead: foreach elt read %. [if 'file = get in info? to-file elt 'type [print elt]] Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- - Original Message - From: "Laurent Giroud" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, October 06, 2002 10:30 AM Subject: [REBOL] if and parens > Hi everyone again, > > I have a little "problem" that I encounter quite frequently with 'if : in > certain cases I need to use parens to make sure that the expression tested is > correctly evaluated. > While I understand that in some cases parens may be necessary to avoid > ambiguities, in the following example I fail to see why they are needed : > > this simply prints the list of files in the current folder and works quite fine : > > >> foreach elt read %. [if (get in info? to-file elt 'type) = 'file [print elt]] > ... > > but when removing the parens we get : > > >> foreach elt read %. [if get in info? to-file elt 'type = 'file [print elt]] > ** Script Error: in expected word argument of type: word > ** Where: halt-view > ** Near: if get in info? to-file > > The code looks quite unambiguous to me since all the part beetween the 'if and > the "=" character evaluates without problem if isolated : > > >> elt: %afile ; "afile" being an existing file > >> get in info? to-file elt 'type > == file > > Would anyone have an explanation ? > > Regards, > Laurent > > -- > Laurent Giroud > mailto:[EMAIL PROTECTED] > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Rebol pickling recipes ?
Jason wrote: > ...I am wondering how to 'pickle' Rebol objects? I've got two functions that work with the older Rebol releases, that "flatten" and "restore" an object "sea". They're called 'Freeze and 'Melt. They correctly save and restore cyclic or net-like Rebol data structures. I haven't yet updated them for the latest Rebol beta versions. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- Attached file included as plaintext by Listar -- -- File: Freeze.r Rebol [ Name: 'Freeze Title: "Freeze" File: %"Freeze.r" Author: "Andrew Martin" eMail: [EMAIL PROTECTED] Web: http://valley.150m.com Date: 3/July/2002 Version: 1.0.0 Purpose: {Freezes an object sea.} Category: [util db file 5] Acknowledgements: "Romano Paolo Tenca" ] make object! [ Magic: '. ; This must be the same as the 'Melt function! Find-Same: func [Series [series!] Value [any-type!]] [ while [ all [ found? Series: find/only/case Series :Value not same? first Series :Value ] ][ Series: next Series ] Series ] Freeze-Value: function [Sea [block!] Fish] [Path Value Index] [ if all [ not lit-path? :Fish not path? :Fish any [ function? :Fish object? :Fish series? :Fish ] ] [ Path: make path! reduce [Magic] Value: either series? :Fish [head :Fish] [:Fish] either found? Index: Find-Same Sea :Value [ Index: index? Index ] [ append/only Sea :Value Index: length? Sea ] append :Path Index if all [ series? :Fish 1 < Index: index? Fish ] [ append/only :Path Index ] Fish: :Path ] :Fish ] set 'Freeze function ["Freezes Object Sea" Sea [block!]] [Block Object] [ foreach Fish Sea [ switch type?/word :Fish [ block! [ Block: Fish forall Block [ Block/1: Freeze-Value Sea pick Block 1 ] ] object! [ Object: Fish foreach Word next first Object [ set in Object Word Freeze-Value Sea get in Object Word ] ] ] ] Sea ; At this point, the 'Sea has become ice. :) ] ] -- Attached file included as plaintext by Listar -- -- File: Melt.r Rebol [ Name: 'Melt Title: "Melt" File: %"Melt.r" Author: "Andrew Martin" eMail: [EMAIL PROTECTED] Web: http://valley.150m.com Date: 3/July/2002/21:35 Version: 1.0.1 Purpose: {Melts object ice into fluid Rebol script.} Category: [util script file db 5] Acknowledgements: "Romano Paolo Tenca" ] make object! [ Magic: '. ; This must be the same as the 'Freeze function! Melt-Value: function [Ice [block!] Path] [Value] [ Value: :Path if all [ path? :Path Magic = first :Path 2 <= length? :Path integer? second :Path ] [ Value: pick Ice second :Path if all [ 3 = length? :Path integer? third :Path ] [ Value: at Value third :Path
[REBOL] Re: Newbie Q: Search and delete from a Block
Matt wrote: > How do I go about searching and deleting from a block? > > Ex. > > ["hello" "there" "this" "is" "an" "Example"] > > I want to search for "this" and delete it to result with: > > ["hello" "there" "is" "an" "Example"] >> help remove-each USAGE: REMOVE-EACH 'word data body DESCRIPTION: Removes a value from a series for each block that returns TRUE. REMOVE-EACH is a native value. ARGUMENTS: word -- Word or block of words to set each time (will be local) (Type: get-word word b lock) data -- The series to traverse (Type: series) body -- Block to evaluate. Return TRUE to remove. (Type: block) >> remove-each Item X: ["hello" "there" "this" "is" "an" "Example"] [Item = "this"] == ["hello" "there" "is" "an" "Example"] >> probe X ["hello" "there" "is" "an" "Example"] == ["hello" "there" "is" "an" "Example"] Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: build-markup and Apache set-up?
> >You'll need to write a little script in the above command line. Something > >like: > > > >#! usr/bin/rebol -cs "build-markup %Page.rsp" > > > >Where "%Page.rsp" is the filename of the page the above line is in. > > > > > How will web development environment behave, if I put above line on the first line of the page? Will it break anything? Will my friend need to comment that line while still working upon site design, and uncomment right before he is ready to upload it? Or it does not affect html display at all? I think it won't affect the HTML. Easiest way is to not include in the original HTML source. Write a little Rebol script to insert this line to every HTML page just before it's sent to the server. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: build-markup and Apache set-up?
pekr wrote: > Thanks for any prompt help, now the only part left is to get free implementation of fast-cgi ;-) Be sure to use Rebol/Base, as it's noticably faster than Core or View. > How am I supposed to start rebol now to let my RSPs to be translated (code evaluated)? > > #/usr/bin/rebol -cs build-tag what? How do I specify the input (self?) You'll need to write a little script in the above command line. Something like: #! usr/bin/rebol -cs "build-markup %Page.rsp" Where "%Page.rsp" is the filename of the page the above line is in. I think that should do it. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: RE : Re: RE : MSSQL results
> But if you use something like: > sql: { > select top 1 * from customers > select count(*) nb from customers > } > insert dbport sql > result-rows: copy dbport > You can't retrieve the second set of data. And that's my problem. Have you tried something like a second 'copy? For example: sql: { select top 1 * from customers select count(*) nb from customers } insert dbport sql result-rows: copy dbport result-rows2: copy dbport; Get the second set? I know nothing more, sorry. I hope that helps! Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: array referencing
James Marsden wrote: > ; this dies horribly > bob/4/:n: 2 > > It seems to let a variable be part of an assignment as long as it is not the last entry in the path... > > Is this a bug or a design feature?? It's a defect, I believe. I'm fairly sure it's on Rebol HQ's list of defects to fix. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Wanted: a Libmaster - and a FAQ posse
Ed wrote: > Any REBOLs with a flair for writing/editing documentation who would like to contribute time and expertise,... Can you put it on a Wiki somewhere? That way it will become better edited and rewritten almost automatically, as people use it and say to themselves, "I know the answer to that!" or, "hang on, that's wrong, I'll just change it". Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Introducing REBOL/Base - FAQ
> A: No. But, there will be a similar version of REBOL/View (as of yet unnamed, got any ideas?). Rebol/Light Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Introducing REBOL/Base - FAQ
> A: No. But, there will be a similar version of REBOL/View (as of yet unnamed, got any ideas?). Rebol/Window :) Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Introducing REBOL/Base - FAQ
Carl wrote: > We want to see what developers think of this idea. I think it's a great idea for CGI programs. Just tried it out on my Wiki, and it's noticably quicker to deliver pages to the browser. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Teaching Rebol => was:{Re: Re: Parsing comment}
Tim wrote: > We are going beyond the school district here... I'm disheartened > to report that the Human Services profession here is very anti- > technology and has turned down many opportunities for tekkies to > help them. > Example: We have a very high suicide rate among teen-agers here, > and when several of us local programmers offered to build software > to help crisis line staffers, we got no takers ... just one > sad example > For the local high school where I work in the school term (Y9 - Y13, 13 - 18 year pupils), I'll be installing a "Worry Web Site", which will be my Rebol/Wiki (once I've got it's subdirectories working consistently well). I got the idea from a NZ teenagers book, where the computer literate maths teacher set up a Wiki-like software to assist students by providing a space for anonymous cries for help, with a place for other students and counsellors to respond. I'm lucky to have computer literate principal who can see clear virtues for teachers and students, as well as money making opportunities! One really has to show schools how new software will save them money (or even make them money!) and enable them to meet the legal obligations, and assist teachers, parents, students. Andrew Martin ICQ: 26227169 http://valley.150m.com/ -><- -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.