[REBOL] Re: REBOL [REBOL.org] Packages announcement and competition
Hi Sunanda, it works here REBOL/View 1.2.8.4.2 3-Aug-2002 (on Debian/Gnu Linux). The UI could do with a bit of a cleanup, as already mentioned, though ;^) Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Help With Query
Hi Ron, welcome to the fun of rebol :-) and the headache with its documentation :-( but I didn't say that ;-) Actually, the core guide is not 100% up to date, and you stumbled over one of its shortcomings. Your code worked in core 2.5.0, but since then evaluation of paths has changed, so you have to use the trick Sunanda has shown now. BTW, could someone on the /View 1.3 world _please_ add a bug that do 'a/lit/path still doesn't work? That was what Carl promised to reduce those paths now. Kind regards, Ingo [EMAIL PROTECTED] wrote: Hello, I am a complete newbie with Rebol having just recently downloaded Rebol/Core and started playing with it. According to the rebolcore online book, given the following code root: [sub1 [sub2 [ word a word at the end of the path num 55 ] ] ] path: 'root/sub1/sub2/word then entering probe path should yield a word at the end of the path but when I enter it I get instead is root/sub1/sub2/word as shown below probe path root/sub1/sub2/word == root/sub1/sub2/word Have I misunderstood what should be happening? Many thanks in advance Ron Bywater -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Help With Query
Hi Ron, it's not you, but Rebol docs, which aren't able to cope with rebols pace :-) (See my other post I just sent). Just one more thing about the change to less aggressive evaluation: before the change it was not possible to hand over a path to another function, because it always was reduced and the _value_ that path was pointing to was handed over (the way the docs describe it, and it feels natural), now it is a little headache to get to the value (though this should be temporarily), but handing a path a by itself is possible too. All in all, it seems like a win if you need it (and the times will surely come ;-) Kind regards, Ingo [EMAIL PROTECTED] wrote: Hello, Thank you for the responses. I'm still confused however (that's nothing new!). If a variable is of type path! should it not display what it is pointing to? The documentation that I have looked at certainly indicates that so I am suprised to have to issue do reduce [path] to get the string a word at the end of the path I apologise if I seem a bit dense. Perhaps I am trying to run before I can walk. Kind regards Ron -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: I want time!, not string!
Hi Hallvard, I haven't seen this exact error before, but some that have been alike ... my guess is that somehow s gets set somewhere else in [...]. Did you try to protect 's directly after setting it? If you still get the same error, there must be a bug in now/time/precise I hope that helps, Ingo Hallvard Ystad wrote: Hello I have a funny problem. I have this: s: now/time/precise [...] print join Took (now/time - s) But sometimes, 's turns out to be a string! How can that happen?? The script is too long for me to pass on the full context. But has anyone seen this (is it a?) bug before? Thanks for any help, HY Prætera censeo Carthaginem esse delendam -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: auto id's for vid objects
Hi iNetW3, maybe the following does what you want, but beware: it's not elegant, I just parse the whole string for all buttons first, and then restart to find all texts. x: {button one button two text browser} ;x: {button one text browser button two} button_count: 0 txt_count: 0 btn: to-string reduce [ to-set-word 'id : to-set-word 'btn] txt: to-string reduce [ to-set-word 'id : to-set-word 'txt] parse x [ home-mark: any [ to button mark:( remove/part mark 6 insert mark reduce [btn button_count: button_count + 1 :{ }button]) :mark 12 skip ] :home-mark any [ to text mark:( remove/part mark 4 insert mark reduce [txt txt_count: txt_count + 1 :{ }text]) :mark 12 skip ] ] I hope that helps, Ingo iNetW3 wrote: Hey ML, I spoke too soon. If any know how to make this code work, or demo some code that does the same thing, it would be well appreciated. code: --- x: {button one button two text browser} {then try this: button one text browser button two} button_count: 0 txt_count: 0 btn: to-string reduce [ to-set-word 'id : to-set-word 'btn] txt: to-string reduce [ to-set-word 'id : to-set-word 'txt] parse x [any [ to button mark:( remove/part mark 6 insert mark reduce [btn button_count: button_count + 1 :{ }button]) :mark to text mark:( remove/part mark 4 insert mark reduce [txt txt_count: txt_count + 1 :{ }text]) :mark ] ] - Original Message - From: iNetW3 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 16, 2004 1:15 AM Subject: [REBOL] Re: auto id's for vid objects -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] [OT] DNS problems?
Hi Rebolers, this is a highly offtopic message, but I think my got some DNS Server problems here, last week I wasn't able to reach some sites available before (and now again), but some sites still can't be found (for example http://www.payingfast.com/ ) does anyone know the IP address of a ameserver off the top of his head? I'd like to add it to my DNS servers and see if it works. Thanks, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [OT] DNS problems?
Hi bry, actually the info on that site tells nought to me ;-) _But_ I was able to confirm that it must be a DNS problem, I was able to reach some of the pages through http://proxify.com/ (Anonymizer proxy). Kind regards, Ingo [EMAIL PROTECTED] wrote: no, but an tertiary topic to your off-topic, the following resource: http://dnsmon.ripe.net Hi Rebolers, this is a highly offtopic message, but I think my got some DNS Server problems here, last week I wasn't able to reach some sites available before (and now again), but some sites still can't be found .. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: POP3 username issues
Hi Chris, Chris White wrote: All, I know that the form for pop3 access is [ pop3://username:[EMAIL PROTECTED] ], but my problem is that the username is in the form [EMAIL PROTECTED] (ie. [EMAIL PROTECTED] ). The problem with that is I now have 2 @'s in my string, and I believe that rebol is incorrectly parsing them. Any quick solutions or maybe I just read something wrong. Thank you in advance for your help! in Rebol, there mostly is a quick and dirty way to do things, which works most of the time, and a more elaborate way for the remaining cases. In your case you should open the port directly, like this: p: open [ scheme: 'pop user: your username pass: your password host: your mail-host ] length? p == 22 first p == {Return-path: Envelope-to: [EMAIL PROTECTED] Received: from localhost ([127.0.0.1] ident=ingo) ^-by smrgol.2b1.de with esmtp (Ex... close p I hope that helps, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Is Rebol OO?
Hi Jason, just a quickie ... Jason Cunliffe wrote: Hi Gerard ... For example I find it so annoying to me to completely rewrite my complete paths (switching the / for the \ plus adding the at both ends and stripping the : after the Drive name) each time I have to type some copied file name and path from my Windows Explorer to the console prompt - I mnow ther must exist some script to help somewhere but this could be useful to have defined a dialect for managing files any time it would be needed to express for example the listing of the files contained in E:/DOCUMENTS/Gerard/credit card Orders/Alibris/ Well yeah it is annoying. Rebol and Python both have their own consistent intenal syntax. But it strikes me they shoul dbe smart enough to just check for the path syntax of the platform being used and then accept and convert to the internal. . I imagine such functions have been written many times over already by people. help -file to-local-file Converts a REBOL file path to the local system fil... to-rebol-file Converts a local system file path to a REBOL file ... Of course, having it automatically detect the right file notation would be nice. Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: How to remove words from objects?
Hi Luke, Luke wrote: Dear list I'm trying to dynamically add and remove words from an object. So far I can do the add words as follows: obj: make object! [a: 1 b: 2] probe obj make object! [ a: 1 b: 2 ] obj: make obj [c: 3] probe obj make object! [ a: 1 b: 2 c: 3 ] now I want to remove c from obj. obj: make object! remove/part find third obj to set-word! 'c 2 probe obj make object! [ a: 1 b: 2 ] The main part in this expression is third obj, which returns the object as a block, like this: third obj == [a: 1 b: 2] After that it boils down to removing the part that constructs the element you want to remove, and use the new block to construct your object. BUT BEWARE: you are always constructing NEW OBJECTS! This means, that references still point to the old object, e.g. obj: make object! [a: 1 b: 2] a: [] == [] insert a obj == [] probe a/1 make object! [ a: 1 b: 2 ] obj: make obj [c: 3] probe obj make object! [ a: 1 b: 2 c: 3 ] probe a/1 make object! [ a: 1 b: 2 ] ; !!! a contains a reference to the old 'obj So, it works well if you have only well defined references to your objects, otherwise just use block!s for very dynamic entities. The downside is that lookup in a block is not as fast as in an object. I hope that helps, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Merry Christmas
Merry Christmas, to all Rebolers near and far! Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Error trapping
Hi Carl, depends on how you define simpler ... error? set/any 'err try [1 / 0] == true error? set/any 'err try [print ] == false I just assume that using set/any fits for your definition ;-) Kind regards, Ingo Carl Read wrote: To capture an error object you can use something like this... error? err: try [1 / 0] == true probe disarm err make object! [ code: 400 type: 'math id: 'zero-divide arg1: none arg2: none arg3: none near: [1 / 0] where: none ] but if the TRY block returns nothing it doesn't work... error? err: try [] ** Script Error: err needs a value ** Near: error? err: try [] To get around this you can ensure your TRY blocks always return NONE or FALSE when they otherwise wouldn't return a value, but is there a simplier way? -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Hashes in Rebol
Hi Konstantin, I guess you suffer from too much object oriented programming ;-) h: make hash! [3 three 1 one 2 two ] == make hash! [3 three 1 one 2 two] select h 1 == one (pay especially close attention to the order in which select, h, and 1 stay on this line ... ) And btw, please do ask all the questions you have, it's not uncommon for even seasoned Rebolers to find something new in the answers to seemeingly easy questions (as just happened to me with the usage of find/tail) Kind regards, Ingo Konstantin Knizhnik wrote: Hello Gregg, Thank you very much for explanation. Certainly it is very universal approach to treat everything as series. But as all universal solutions is is not always convenient to use:). If I remove exactly one element from the hash - what will be result of such operation... But actually I need hash table with integer key (object OID). And here once again Rebol rules are not compatible with my expectations: == make hash! [1 one 2 two] h select 1 ** Script Error: select expected series argument of type: series port Is it possible to have hash table with integer key? Or I should first convert it to string? ... -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: How to handle Return-Path
Hi Sabu, Sabu Francis wrote: .. I hope this is of use. I have tested this only using qmail. Maybe Ingo Hohmann can integrate this patch into the patched send function he is developing. .. Just to mention it, mine is not the only one, just the most aggressively advertized ;-) I will definitely have a look at it for the next round of updates. Thank you, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] vim again
Hi Vimmers out there, I have a beta version of my rebol.vim so far ... goto http://www.h-o-h.org/rebol-vim.tgz (Sorry, not yet linked, and it seems I desperately need to update my page ;-) Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [patch][help] Additional function information
Right, so far it hasn't been possible to use it, make function! does not allow it, and the original 'func does not work around this (like my patched version does). Ingo Anton Rolls wrote: That's very interesting! As this code shows, however, the return: has not been used in any global functions as yet: foreach word first system/words [ if all [ v: attempt [get in system/words word] function? :v find third :v first [return:] ][print [word mold third :v]] ] ;== none Anton. ... -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [patch][help] Additional function information
Hi Volker, Volker Nitsch wrote: How about using /return to mark return-values, like we do with /local? demo: func[a b /return the result of this demo-function /local c d e][] Well, return: [] is already used (for routine!s, as Gabriele pointed out, and /return would make /return unavailable as a refinement. Kind regards, Ingo -Volker ... -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [Editor] any Vim users out there?
Hi Maarten, at the moment I'm in the grab everything, to find out what's best state ;-) so if you don't mind, I would like to recieve your rtags. Kind regards, Ingo Maarten Koopmans wrote: No, but I'm happy yo get a copy. I also have a rtags.r script from a friend of mine, works like ctags but then for REBOL. Let me know if you want that. --Maarten -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [Editor] any Vim users out there?
Hi Tim, I _thought_ I answered that mail as well, ... OK, I got rebol.vim (and am just now trying to find the differences to my version), and the tags file, and have downloaded most of the plugins you told me about (minus the ones neither vim.org nor google were able to find). Give me some time to get accustomed, please ;-) Kind regards, Ingo Tim Johnson wrote: * Ingo Hohmann [EMAIL PROTECTED] [031120 08:42]: Hi Maarten, at the moment I'm in the grab everything, to find out what's best state ;-) so if you don't mind, I would like to recieve your rtags. Kind regards, Ingo http://www.reboltech.com/library/html/rtags.html And did you gentleman get the other stuff I emailed to you? tj -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [Editor] any Vim users out there?
Hi Tim, actually up until now I used to use emacs, too. But then startup times degraded so much (with all those added elisp packages which are so damn easy to install with apt-get), that I found myself to use vim more often for those quick edits. After some time I decided to go all the way :-) Kind regards, Ingo Tim Johnson wrote: * Ingo Hohmann [EMAIL PROTECTED] [031120 12:43]: Hi Tim, I _thought_ I answered that mail as well, ... glad you got it. :-) I might have deleted your response along with all the ads for viagra and related products. (how *did* they know?) OK, I got rebol.vim (and am just now trying to find the differences to my version), and the tags file, and have downloaded most of the plugins you told me about (minus the ones neither vim.org nor google were able to find). all on that list were downloaded from vim.org to the best of my memory or from Dr. Chip's site http://users.erols.com/astronaut/ Give me some time to get accustomed, please ;-) It may take some time, if you're not used to vim, but it's well worth the effort. I find emacs of interest also, in fact the emacs paradigm with elisp being kind of similar to rebol promises a good fit - Volker is using emacs with rebol, last I heard from him. tim -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] [patch][help] Additional function information
Hi All, while looking into the vim syntx file for rebol, I thought ... Wouldn't it be nice to autogenerate this?. But to do this efficiently, I need some more info within the function, so I started to look at 'help and was amazed to find the following code snippets: if rtype [print [^/RETURNS:^/^- rtype]] and all [set-word? :item :item = first [return:] block? first args rtype: first args] Well, this is the result of what happened later ;-) help help USAGE: HELP 'word DESCRIPTION: Prints information about words and values. *PATCHED* iho Returns additional info on functions HELP is a function value. ARGUMENTS: word -- (Type: any-type) RETURNS: does not return a value CATEGORIES: help Any comments appreciated! Ingo -- Attached file included as plaintext by Ecartis -- -- File: help-system.r REBOL [ Title: Help Patch Author: Ingo Hohmann Version: 0.0.1 File: %help-system.r library: [ level: 'intermediate platform: 'all type: [ tool patch ] domain: [patch] tested-under: [view linux] support: none license: none ] TODO: { add todo and date fields? } ] func: func [ {Defines a user function with given spec and body. *PATCHED* iho Allows in the spec the following additional info: return: [list of types] category: [list of categories] author: [author info] these additiona are purely informational } [catch] spec [block!] {Help string (opt) followed by arg words (and opt type and string)} body [block!] The body block of the function /local returns categories author fun pos ][ if all [pos: find spec first [return:] block? next pos] [ returns: pos/2 remove/part pos 2 ] if all [pos: find spec first [category:] block? next pos] [ categories: pos/2 remove/part pos 2 ] if all [pos: find spec first [author:] block? next pos] [ author: pos/2 remove/part pos 2 ] fun: throw-on-error [make function! spec body] pos: any [find third :fun /local tail third :fun ] if returns [insert pos compose/only [return: (returns)]] if categories [insert pos compose/only [category: (categories)]] if author [insert pos compose/only [author: (author)]] :fun ] add-function-info: func [ {Add additional info to an already defined function} [catch] :fun [function! native! action!] The function to add info to info [block!] block of info blocks return: [none] category: [help] author: [Ingo Hohmann] /local pos ][ either parse info [ some [ set-word! block! ] ][ insert any [find third :fun /local tail third :fun] info ][ throw make error! info block has wrong contents ] ] add-function-info func [ return: [function!] category: [development] Author: [RT Ingo Hohmann] ] help: func [ {Prints information about words and values. *PATCHED* iho Returns additional info on functions } 'word [any-type!] return: [Does not return a value] category: [help] author: [RT Ingo Hohmann] /local value args item name refmode types attrs rtype categorized author ][ if unset? get/any 'word [ print trim/auto { ^-^-^-^-To use HELP, supply a word or value as its ^-^-^-^-argument: ^-^-^-^- ^-^-^-^-^-help insert ^-^-^-^-^-help system ^-^-^-^-^-help system/script ^-^-^-^-To view all words that match a pattern use a ^-^-^-^-string or partial word: ^-^-^-^-^-help path ^-^-^-^-^-help to- ^-^-^-^-To see words with values of a specific datatype: ^-^-^-^-^-help native! ^-^-^-^-^-help datatype! ^-^-^-^-Word completion: ^-^-^-^-^-The command line can perform word ^-^-^-^-^-completion. Type a few chars and press TAB ^-^-^-^-^-to complete the word. If nothing happens, ^-^-^-^-^-there may be more than one word that ^-^-^-^-^-matches. Press TAB again to see choices. ^-^-^-^-^-Local filenames can also be completed. ^-^-^-^-^-Begin the filename with a %. ^-^-^-^-Other useful functions: ^-^-^-^-^-about - see general product info ^-^-^-^-^-usage - view program options ^-^-^-^-^-license - show terms of user license ^-^-^-^-^-source func - view source of a function ^-^-^-^-^-upgrade - updates your copy of REBOL ^-^-^-^- ^-^-^-^-More information: http://www.rebol.com/docs.html ^-^-^-} exit ] if all [word? :word not value? :word] [word: mold :word] if any [string? :word all [word? :word datatype? get :word]] [ types: dump-obj/match system/words :word sort types if not empty? types [ print [Found these words: newline types] exit ] print [No information on word (word has no value)] exit ] type-name: func [value] [ value: mold type? :value clear back tail value join either find aeiou first value [an ] [a ] value
[REBOL] [Editor] any Vim users out there?
Hi, are there any vim users out there, do you have some more advanced rebol.vim files than those shipped with vim? (for syntax, compiler, folding, indent, color, ... ;-) I am just now adding to the syntax file some things I found missing (and removing some, which do not really belong there ... but if someone has it done already ... Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] [View] text: strike-thru / rotate
Hi All, I feel like I asked this queestion before, but at the moment I can't find neither the question, nor the answer, so here it goes. I seem to remember that it is possible to write strik-thru text, but I don't find a way how to do it ... And then, is the only way to create rotated text, to use to-image, and rotate the image? Thanks for your help, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] [View] invisible background
Hi /Viewers, I just wrote the following script to create a batch of buttons for teaching website creation, but how do I set an invisible background on these buttons? [REBOL [ Title: Button Creator Author: Ingo Hohmann ] colours: [ red green blue yellow water white forest snow coffee gold] texts: [ Home About Us Info Contact ] repeat c colours [ repeat t texts [ save/png to-file rejoin [ c - trim/all t .png] to-image layout compose [ btn (reduce c) t ] ] ] ] Thanks for your help! Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: json
Hi Gabriele, ... Gabriele Santilli wrote: Hi bry, On Wednesday, November 12, 2003, 7:09:24 PM, you wrote: bic http://www.crockford.com/JSON/index.html ... Writing a JSON emitter in REBOL is trivial; writing a parser is mainly a matter of translating the BNF grammar in that web page into PARSE rules; if noone does this earlier, I'll try to write an example PARSE rule during lunch break. Just imagine a C-programmer to tell you something like this ;-D -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: rebol headers when sending mail have no textual user name
Hi MAx, AFAK standard Rebol is not able to do this, but you can get my http://www.h-o-h.org/mail-patches-255.r which adds the ability to send [Ingo Hohmann [EMAIL PROTECTED] {mailtext} furthermore your username (from set-user-name) is added to the From: header. Kind regards, Ingo [EMAIL PROTECTED] wrote: hi, something is nagging me about the way rebol builds the header when sending mail. we can't seem to add a label to the from: mail address here are two valid headers: From: Maxim Olivier-Adlhoch [EMAIL PROTECTED] To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] note that the first one contains a string-based name to itself, so that all the tools like a mailer, can properly identify the sender, by something others than a cryptic mail address... is there a way to construct a mail header is such a way that the name is always included like in the first example? thanks! -MAx -- 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
Hi Steven, Steven White wrote: Andrew Martin Anything else you'd want on your wish list for Rebol 3? I would like my script to be able to obtain a list of all the words that I created when I wrote the script. ... Do you mean something like this? query/clear system/words == [end! unset! error! datatype! context! native! action! routine! op! function! object! struct! library! port! any-type! any-word!... a: 2 == 2 set 'b hi == hi c: func[][print 'done] query system/words == [c a b] Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Hitting the learning curve
Hi Bo, Max, as much as I hate posts like my following ... I just _have_ to say it! Maxim Olivier-Adlhoch wrote: WOW, that lifts the spirit... btw, I USED to say to other programmers that rebol had fantastic support... I miss the days when you where there to answer all our questions... it rarely took more than a day, and sometimes those where hard questions... Me too! Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: lost the case ...
Hi Will, Will Arp wrote: Hi Pekr, On 4-nov-03, at 00:34, Petr Krenzelok wrote: ... Now read those and look into the dates: November 2002: Monthly State of the REBOLion updates - Starting as of this message we remember being very happy about that, how many month did it go? Well, it DID state monthly, and exactly one month it DID go! :-( -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Gregg's Article in OnLamp
Hi Andrew, A J Martin wrote: rebOldes wrote: YES... I would appreciate it as well.. and #, character as a word as well so I could use it in my dialect. It would be good to send it to the feedback again. And what would you use comma (,) for? For not having this error? a: [ eggs, bananas] ** Syntax Error: Invalid word -- eggs, ** Near: (line 1) a: [ eggs, bananas] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: reduce/deep
Robert M. Münch wrote: On Mon, 20 Oct 2003 12:33:29 +1000, Anton Rolls [EMAIL PROTECTED] wrote: Use SAME? a: b: [123] same? a b ;== true Hi, ahhh forgot about this one. Rebol just has to many words to remember ;-) But this doesn't seem to work for nested blocks: a: [a 1 b 2] == [a 1 b 2] b: [a 1 b 2] == [a 1 b 2] same? a b == false d: reduce [a b] == [[a 1 b 2] [a 1 b 2]] e: reduce [a b] == [[a 1 b 2] [a 1 b 2]] same? d e == false So I tink for nested structures we would need something like a same?/deep. Robert But it _works_ those two blocks are not the same ... append d 1 == [[a 1 b 2] [a 1 b 2] 1] e == [[a 1 b 2] [a 1 b 2]] on the other hand ... same? d/1 e/1 == true append d/1 1 == [a 1 b 2 1] d == [[a 1 b 2 1] [a 1 b 2] 1] e == [[a 1 b 2 1] [a 1 b 2]] Kind regards, Ingo -- 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?
Hi Maxim, Maxim Olivier-Adlhoch wrote: ... advanced features get used by advanced users... a lot of the code I see from the guru is hard to read for me, simply because it uses tricks I have not stumbled on yet... The words are all similar, but when looking at them, they seem to have no meaning. Yup, been there, done that, but didn't even get the T-Shirt ;-) have you tried going through all the view code... there is much to learn, but darn some of it is almost impossible to grasp. Right again. ... excerpt: func [ [...] ] cool func !! don't want to look picky but a: 1 b: 5 excerpt b [a to b] ... It's no problem to write the dialect to understand this (at least, once you understand how the 'layout dialect works (which, incidentally, I don't)). Any takers? Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: paths lookups change
Hi Robert, Robert M. Münch wrote: Hi, I seem to be stucked here: test == [Bug Report 1] key == Bug Report type? select test key == integer! add select test key + 1 ** Script Error: Cannot use add on string! value ** Near: add select test key + Hmm... Ok, maybe a priority problem: add (select test key) + 1 ** Script Error: add expected value2 argument of type: number pair char money date time tuple ** Near: add (select test key) + 1 Strange. Shouldn't this be possible? Have a look at these to statements, please add select test key 1 == 2 (select test key) + 1 == 2 You're doing both of the above in one line, so the '+ eats away one of 'add s arguments I would like to write something like this, to increment the integer in the block: test/:key: test/:key + 1 I'd like that, too ;-) But until then, this works: change next pos: find test key pos/2 + 1 == [] test == [Bug Report 2] Though I'm sure, someone will come up with a better idea ... How can I do such a thing? Using to-set-path? I tried but failed. Robert I wouldn't know how to do it, either, anyone else? Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [View] dirty?
Thanks to all who answered, Volker Nitsch wrote: my most robust approach is: keep a copy of the last content and compare. rebol has a culture of changing variables directly (face/text: Hello) and then calling a general process-function (like show face - face/feel/redraw) with keeping old version you can change face/text with no need for some [face/dirty: true] -Volker The problem in my case is, that I don't have a special edit mode, I display the information, and it can at the same time be altered by the user. Furthermore, it is a dynamically created layout with no _single_ point of exit. It had been so nice, if the dirty flag would have been accurate, and promoted through the hierarchy - a face get dirty, whenever one of its subfaces gets dirty, if a parent face gets the dirty bit cleared, all subfaces get it cleared, too. Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Liquid Project : connection with datas...
Hi Gregg, and all, Gregg Irwin wrote: Hi Robert, RMM Hi, maybe a bit off-topic but Max, you should pick other words. Even your RMM words are quite creative, there is no hint for someone with IT background RMM what it's all about. Further I think it makes talking about this stuff RMM unnecessary complicated. I agree. I know that when I sit down to look at Steel, the first thing I'll have to do is learn what valve means and such. out of the 4 page output of dict valve: From WordNet (r) 2.0 [wn]: valve n 1: a structure in a hollow organ (like the heart) with a flap to insure one-way flow of fluid through it 2: device in a brass wind instrument for varying the length of the air column to alter the pitch of a tone 3: control consisting of a mechanical device for controlling the flow of a fluid I hope that helps ;-) Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Newbie: need help with COMPOSE
Hi Arie, this doesn't look like the most elegant way to do it to me, but it works ... ;--- start script --- [REBOL [] ; ; This function extends a 2nd level object with a function ; add-affix-func: func [ /local fxn don't know, wether you need fxname to be a string ... ] [ fxn: to-word fxname do compose/deep [ (to-set-path compose [rules (fxn)]) make (to-path compose [rules (fxn)]) [ (to-set-word join 'rule fxcount) func [ inword [string!] ][ print 200 ] ] ] ] ; ; Main program starts here ; fxname: A ; name of 2nd level object fxcount: 1 ; counter rules: make object! [] ; create 1st level object do probe compose/deep [ rules: make rules [; create 2nd level object (to-set-word fxname) make object! [ x: 100 ]] ] probe rules ; show intermediate result ;input ; pause console add-affix-func ; extend 2nd level object probe rules ; show final result ;input ; pause console ] Arie van Wingerden wrote: Hi list, below a extracted piece of program containing 2 times a do rejoin. I tried hard to not use rejoin, but compose instead, but it did'nt work out properly. Could you show me how to rewrite the code in both cases? Thanks in advance, Arie van Wingerden http://home.zonnet.nl/rebolution ;;; = Code follows here REBOL [] ; ; This function extends a 2nd level object with a function ; add-affix-func: does [ do rejoin [ rules/ fxname : make rules/ fxname [ ; Extend 2nd level object rule fxcount : func ; Function name [ inword [ string! ] ] ; Function spec block [ print 200 ] ] ] ] ; ; Main program starts here ; fxname: A ; name of 2nd level object fxcount: 1 ; counter rules: make object! [] ; create 1st level object do rejoin [ rules: make rules [; create 2nd level object fxname : make object! [ x: 100 ]] ] probe rules ; show intermediate result input ; pause console add-affix-func ; extend 2nd level object probe rules ; show final result input ; pause console -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Bad accent causes problem
Hi Carlos, Carlos Lorenz wrote: Ingo other hand, german special characters öäü, which are on their special keys work fine. ... you mean german special characters work fine in REBOL/View? Carlos Yup, I can type german special characters (which have there own keys), but no other accented characters (which I type using composing). On the other hand, copying special characters over the clipboard, works. Guess we'll have to find one of the /View gurus to drill into the keyboard handling stuff ;-) Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Distribution
Hi Steven, Steven White wrote: JN If application is created with the SDK, Can it be commercially JN distributed? That is, can that application be sold? Two related questions, if I may: 1 of 2: If a person creates an application that requires only the free version of REBOL/VIEW, and would like to sell the application, is it OK to include with the application the free version of REBOL/VIEW itself as a separate item, just to save the customer the trouble of downloading and installing it himself? Long, long ago Carl stated that, if you want to distribute the free Version of /View, that's fine, but you would have to send your script RT to be included in the library. I'm not sure this info is still valid, though. 2 of 2: If a person sees something in the script library that sparks an idea, and develops an application based on it, would it be illegal and/or tasteless to sell that application when some of the key work was done by someone else who posted it to the script library? The legal aspect would depend on the scripts copyright. And I expect on the locality of all involved. Morally I'd say it's best to ask, or tell the other, if he already gave permission. Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Storing a logical condition
Hi Tim and Tom, Tom Conlin wrote: either do reduce b [][] or first reduce b [][] Which is faster, around 2 tenths of a second in 100 iterations. (Even _if_ you care, you possibly won't care _that_ much ;-) Kind regards, Ingo On Mon, 13 Oct 2003, Tim Johnson wrote: Hello rebols: I'd like to store a logical condition in a block to evaluate at a later time by 'if or 'either Example code: a: 1 == 1 b: [a = 0] == [a = 0] either b[print b evaluates to 'true'][print b evaluates to 'false'] -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Bad accent causes problem
Hi Carlos, Carlos Lorenz wrote: Hi Sunanda e others, This thread reminded me that some time ago I have asked some help with foreign characters that are not echoed in REBOL/View fields and up to know I have not find any solution. I have also put some feedback to RT but it seems they are with lots of other things to do I use Debian Linux and KDE 3.1 e everything works fine but REBOL/View Do you think REBOL uses it own keyboard character maps? Is there any hack to be made? I can't enter words Portuguese words in text fields such as coração (heart) or pé (foot) they are echoed as coraç~ao and p'e :( Not that I can be of much help, but for me it seems, that the keyboard handling is the culprit, I can copy á and à into an area, but I can't type it in during the keyboard (I'd have to use keyboard composition). On the other hand, german special characters öäü, which are on their special keys work fine. Don't know if this'll help, though, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: newbie text-list questions
Hi Kai, Carl Read wrote: On 11-Oct-03, Kai Peters wrote: ... button Clear [ clear t/data show t ] ... One thing you should be aware of: you should only _change_the_series_, e.g. if you'd use t/data: copy [] ; ATTENTION: That's most surely not what you want the text-list would still hold on to the original series, but you would never be able to access it again ... to see what I mean, just play around with this ... view layout [ tl: text-list 1 2 3 button add [append tl/data form now show tl] button Falsely clear [tl/data: [a b c] show tl] ] Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: So where's the German speaking Rebol list?
Hi Andrew, Maxim, and others, I admit I was just too lazy to write two emails, and too much in a hurry to translate the part that was mostly meant for Mr. Kalka ... I was just telling him that he shouldn't be too surprised getting english mail from an english language mailing list, and how to get off again. And as noone able to understand english would ever want to leave this list, I figured it wouldn't be too interesting for the lot of you ;-) Kind regards, Ingo Maxim Olivier-Adlhoch wrote: I can understand some written dialects of german if I read it over and over... but babel fish is my best friend in understanding the complete discussion here... ;-) -MAx - Original Message - From: Andrew Martin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 09, 2003 7:43 PM 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. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [Fwd: Accessing a variable's method]
Hi Arnoux, Arnoux Vincent wrote: A few anti-slashes have been added (dunno know why...) : Hi List, I have a list of objects: l: copy [] obj: make object! [ a: none calc: does [self/a: (self/a + 1)]] append l make obj [a: 1] append l make obj [a: 2] I would like to write a function like: inc-obj: func [arg][ arg/calc ] That would allow me to do: foreach o l [ inc-obj o ] Up to here, no problem. (though I don't know why you don't want to use foreach o l [ o/calc ] And output: probe (first l)/a 2 probe (second l)/a 3 But this won't work, because parens!s are not allowed in paths ... however you can do any of the following ... probe l/1/a == 2 probe l/2/a == 3 num: 1 probe l/:num/a == 2 and becoming somewhat esoteric ... probe get in first l 'a == 2 I hope that's enough for now ... Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] [OT] 10 Million dollar DMCA case ....
Sorry, this is off topic, but got me rolling on the floor ... According to the german PC-Magazin the sunncomm is evaluating to sue student John Haldermann on the basis of the DMCA, because he published information on how to bypass sunncomms CD copy protection scheme. It will be a 10 million dollar case. The published means to bypass copy protection: hold down the shift key when putting the disc into the drive, so that windows autostart is suppressed ... More info, e.g. http://vigilant.tv/article/3362 Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Tail end recursion
This is for the list ... Dipl.Ing.Henryk Kalka wrote: Es tut mir sehr leid ich verstehe kein Englich Mit freundlichen Grüßen H.Kalka Translation: I'm sorry, but I don't understand english. Kind regards, H. Kalka And for Mr. Kalka ... Hallo Herr Kalka, Irgendwie haben Sie eine Email erhalten, die an eine englischsprachige Email-Liste gerichtet war. 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. Mit freundlichen Grüßen, Ingo Hohmann -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Parse limitation ?
Hi Patrick, patrick à la poste wrote: Hi List, I'd like to parse a string searching for two things at the same time. it seems to me that this is impossible. One trick is, to find something that is equal between the two strings, and work from there ... REBOL [] myText: {A HREF=#section1IMG SRC=foobar.gifA HREF=#section2} parse/all myText [ any [ to = here: (there: at here -4) :there [ [ HREF= | SRC= ] copy target to (print target) | thru = ] ] ] ; parse In this example I used the = which is common to both strings, checked whether what I have _before_ this sign is one of the two strings I'm interested in, and then start to copy, or just go thru the = to start again ... I hope that helps, Ingo -- 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
Hi Ged, this is a shot into the blue, but try Scite to call Rebol with the -c option. This puts Rebol in cgi mode, in which its output should be sent to standard-out. I hope that helps, Ingo Ged Byrne wrote: 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? I'm running on Windows XP Pro. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Another newbie VID question
Hi Gabreiele, Gabriele Santilli wrote: Hi Ingo, On Saturday, October 4, 2003, 9:55:53 PM, you wrote: IH This is the answer ... Shoulda have said, this _one_ possible answer ... Actually, he just needs: Toggle 60 Start Stop Which only goes to show, that there's _always_ an easier way in Rebol ... Weeell, I guess that's what you get for wanting to show off ;-) Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: url or file ?
Hi Patrick, how are you? patrick wrote: Hi List, I already know how to test url and file. url? http://www.rebol.net == true file? %index.html == true But what if these came as strings test: [http://www.rebol.net; index.html] The problem here (apart from the 'load problems already discussed), is that rebol won't understand a file that is written in non Rebol format (that is, without the leading % sign). A function that will do the trick, as long as you are certain there will only be urls and files in your data, is this: string-to-url-or-file: func [s [string!] /local uf][ either url? uf: attempt[load s ] [uf][to file! s]] ] When your data is a url, load should always succeed, so attempt returns either a url, or somthing else, or none (e.g., if load failed) in the latter cases we just convert it to a file. test: [http://www.rebol.net; index.html] == [http://www.rebol.net; index.html] repeat d test [ print [ f dtype? f d ]] http://www.rebol.neturl index.htmlfile Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Another newbie VID question
Hi Kai, Kai Peters wrote: Hi all ~ am wondering why my code below doesn't work toggle_start: toggle 60 Start [ flash we get here toggle_start/text: Stop show toggle_start ] What do I need to make a toggle switch between Start and Stop every time I press it? Where do I need to look to find which refinements a toggle has? Does it have a 'down' or 'pressed' ? This is the answer ... REBOL[] view layout [toggle_start: toggle 60 Start [ ;help face face/text: pick [Stop Start] face/data show face ] ] And here comes the explanation ... Those vid action blocks are turned into functions with the face itself as an argument, named face (be careful, sometimes it's only 'f, IIRC). Now, the commented out help face gave me a quick look at what the face contains, among a lot of other things, I found that there's face/data, a boolean value, so I decided that's it. your toggle_start/text: part was already ok (I just decided to use the word 'face, because it's shorter, and dag'n'droppable ;-) , now we just have to toggle the text depending on face/data (this feature of 'pick has been the source of many long and lively discussions, but it makes for nice short code). I hope that helps, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Another newbie VID question
Kai Peters wrote: Thanks for your very elaborate help, Ingo. It all makes good sense, yet there still is a problem: When I cut paste your code to my console, the toggle caption does not change on my machine?? Any ideas? After some checks, yes, this has changed between the last official version (1.2.1) and my beta (1.2.8) use texts/1:!, like Sunanda said. Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Rebol parsing 101
Hi Mike, Mike Weber wrote: im brand new to Rebol and not getting the hang of string parsing for example: assume i have string fcontents == {09/29/03 ATM/POS ACTIVITY $28.68 (pending) 09/29/03 ATM/POS ACTIVITY $11.41 09/29/03 ATM/POS ACTIVITY $ 21.71 ... i would like to convert this string into a set of blocks where each block has 4 elements of the types [date string money string] (the 4th element is optional [09/29/03 ATM/POS ACTIVITY $28.68 (pending)] [09/29/03 ATM/POS ACTIVITY $11.41] [09/29/03 ATM/POS ACTIVITY $21.71] the following works with your example string, but it may choke on embedded newlines (at the any ). ;--- start s: {09/29/03 ATM/POS ACTIVITY $28.68 (pending) 09/29/03 ATM/POS ACTIVITY $11.41 09/29/03 ATM/POS ACTIVITY $2.11} ; create a charset, matching non numbers non-number: complement charset 0123456789 ; create an empty block for the resutl b: copy [] ; parse/all so that parse doesn't eat spaces ... parse/all s [ ; we want the folloowing more than once some [ ; get the date (for some reason, rebol does not understand this ; dateformat, so we have to get the individual date parts seperatly copy dm 2 skip / copy dd 2 skip / copy dy 2 skip skip ; the string ends at the start of the money copy s1 to $ ; money either ends with a space, or it may be the last element in the ; string copy m [thru | to end] ; there may some or no space now (maybe newlines? if your string gets ; dynamically created ... any ; now append what we found so far to the result block, rebuild the date, ; so that rebol understands it (append/only b compose [(to-date rejoin [dd / dm / dy] ) (s1) (load m) ]) ; there MAY be a string now, this will start with any character, NO ; number, otherwise you're in trouble here ... anyway, if there's the ; optional string, append it to the last block in your result block ; if there's no string to be found here, we may even have reached the end, ; and be done opt [copy s2 any non-number (if not none? s2 [append last b s2]) | end] ] ] ; end I hope that gets you going, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: REBOL in XEMACS
I have just now downloaded this version and found out that this version doesn't do automatic indentation, so I must be using a different version, it seems. If anyone is interested ... Kind regards, Ingo Ingo Hohmann wrote: Hi Marcelo, Marcelo Fontes Castellani wrote: Someone have an mode REBOL to XEMACS to share with me ? Have a look at this ;-) http://www.rebol.com/tools/rebol.el Should work in both Emacses, IIRC. Hope that helps, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Newbie questions
Welcome, Kai, Kai Peters wrote: ... How do I typecast the URL below for use with banner or any other word expecting a string? REBOL [] ftpserver: ftp://server.somedomain.net view layout [ banner to-string ftpserver ] Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Smart Client
Hi Romano, Romano Paolo Tenca wrote: Hi Andrew, .. What I do not understand well is that people often seems to wait everything from RT. I used many languages in my life and I have always used external libraries and third party tools, why cannot it happen with Rebol? There is some obscure reason? RT cannot make everything and Rebol should be a very limited language if only RT could release additional features. ... as I see it, there are two main obstacles to the adoption of third party libs/tool in Rebol 1) I guess, in all those languages using a third party lib doesn't increase the number of files to be installed in any significant way, whereas in Rebol - in the simplest case - it's an increase by 33% (of my maths serve me well) (Rebol executable, your script, AND the third party lib ... ;-) There are at least 3 menu styles around. 2) Where? Or in other words, a central repositry where you'll be sure to find everything is still missing in the mindset of most Rebolers, though I hope rebol.org will get there. Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: SMTP Server
Hi Matt, Matt MacDonald wrote: Would anyone tell me if this is possible? I'm trying to make a script that acts like an SMTP server. Basically, what I want it to do is recieve messages sent to it from an email client, then distribute the different portions (to-address, subject, content, etc.) into a database. Basically all I need to know is how to set it up so I can listen for SMTP sends. Have a look at http://www.h-o-h.org/simtpop.r a little script that acts like a look-a-like of an smtp and pop server to Outlook 97 (doesn't like later versions, because they use not implemented behaviour, but it should get you going). I hoppe that helps, Ingo P.S. soon to be found on www.rebol.org the world famous Rebol library server! -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: REBOL in XEMACS
Hi Marcelo, Marcelo Fontes Castellani wrote: Someone have an mode REBOL to XEMACS to share with me ? Have a look at this ;-) http://www.rebol.com/tools/rebol.el Should work in both Emacses, IIRC. Hope that helps, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: REBOL for business apps?
Hi All, Gregg Irwin wrote: Hi Robert, RMM Hi (to the community), this printing stuff is showin up more and more. I'm RMM not an expert WRT printing on windows but shouldn't a good dialect do the RMM work for us? With /Pro Win32 printing functions should be available. What RMM do you think? Yes, we can wrap up the printing APIs inside a dialect (at least nothing comes to mind that strikes me as impossible). One reason *I* haven't done this is that won't be cross-platform .. -- Gregg I was just printing using cups, so there was this wild idea running through my head ... anyone had a look at IPP (Internet Printing Protocol)? AFAIK it is http based, so it should be possible to make an ipp:// protocol in Rebol, which would work cross platform with any IPP capable printing system ... Just a thought - (at the moment I don't have the resources to make it a project, but you are free to do it ;-) Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Error, bug or mis-use on my part?
Hi Karl Lewin, Karl E wrote: (This may be unclear, if so please ask questions so I can clarify) I am observing some interesting behavior using SAVE and LOAD [text on different whitespaces in a molded object snipped] To me this looks like a bug in mold, the following seems to work, though (at least on your sample data and /Core 2.5.6.4.2 ). checksum trim/lines mold objA == 2341746 (I tried mold/flat first, but this gives inconsistent behaviour like plain mold.) Kind regards, Ingo -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: cyclic values
Hi Patrick, Am Son, 2002-09-29 um 10.50 schrieb pat665: ... colors: [red green blue] ; I want color to be red, then green, then blue, then red again forever ; the first value is duplicated color: first colors append colors color ; then forever color: select colors color That looks like a pretty clever use of select to me. My ideas would have been: for i 1 10 1 [ print colors/1 colors: next colors if tail? colors [colors: head colors] ] or i: 1 for j 1 10 1 [ print pick colors i i: i // (length? colors) + 1 ] But I like your version much more. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Dialects (any plan is better than no plan) - Baneor Blessing?
Hi Gregg, and all, Am Fre, 2002-09-27 um 23.41 schrieb Gregg Irwin: Hi Tim, et al Many other programmers have told me that rebol looks very promising, but shy away because of the lack of a standard library or API. And frankly I think rebol is old enough to have that now. I was thinking about this because some time ago I put out a feeler message to see if people were interested in organizing a set of function libraries. I think what hinders the conception of a rebol standard library the most, is the missing of a module system. As long as Rebol doesn't include a module system, it will be hard to handle library. Or, we should decide to use one of the many module handlers floating around (or create one), and decide that this one will have to be used by all library scripts. Kind regards, Ingo -- 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 - no pay, but glory
Hi Carl, what happened to the Libmaster position? We've had at least one person begging to be it on-list, and a few who promised to help out, but as there's been no new information on it ... I guess noone answered you directly, am I right? Well, this isn't a job application, but I'd volunteer to ask again, filter the answers, and send them on to you to decide. And if there's noone appropriate to be found: I don't have much time, don't feel fluent in Rebol, but would like to grow into the position. Kind regards, Ingo Am Son, 2002-09-15 um 00.28 schrieb Carl at REBOL: Wanted: We need a Libmaster for the REBOL on-line library. ... -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Parsing comment
Hi Jason, this comment is not directed at the rebol parse word, but at the internal parser which parses a script to execute it. So what he weans is the following: fee fie foe fum may be a valid line in a Rebol script. But you don't know from first view what happens here: are these 4 functions, run one after another? Is it one function with 3 arguments? Is it a function with 2 arguments, where the second argument is first calculated by another function with one argument? Or what? Only the parser knows at execution time, or the one who knows the words by heart. In Python the line might look like: fee( fie foe( fum)) where you can instantly see, that fee is a function of 2 arguments, and where the second argument is computed by foe, a function with one argument. Now in Rebol, due to it's LISPy nature, you could write it like: (fee fie (foe fum)) to give you the same visual feedback, but you aren't forced to use the parentheses, so most people don't most of the time, except when the expression becomes too complicated. I hope that sheds a little light on the subject. Kind regards, Ingo Am Mon, 2002-09-23 um 06.03 schrieb Jason Cunliffe: Today I read a comment about REBOL which I don't understand. I am NOT seeking to start a language flamewar. Just curious and hoping someone here can explain more about parsers. I barely know how to use REBOL's parse, but I like what I know about it, and it has a strong reputation in these waters. On Rebol (which to my ears rhymes more with Cobol than with rebel :-), I've not looked much at it personally, but I trust a close colleague who has, and who finds it hard to use because the parser cannot know the end of a function's parameter list -- that's only known at run time, once the function is called. Sounds like dead on arrival to me, as far as language design goes. So if we want to learn from Rebol, we must try to learn from other ideas in it, not from the core language design. The context behind this is I have been engaged in a some intense debate on the Python-oriented Edu-Sig list. I love Python, but tried point out the obstacles I think it presents to very novice programmers. I mentioned REBOL, giving a contrasting example of how direct and friendly REBOL's help command is. Mainly because it includes a search function. Simple idea, but incedibly friendly effective result. My scenarios was of novice python student trying to determine the current working directory. Where am I? ? d ? dir ? what-dir Python by contrast is great for hackers, and should be great for students. It has all kinds of super-duper tools a for browsing docstrings, and object introspection, but it can be initially overwhelming or useless, until you know exactly what to type, you can find yourself a few screenfulls later before your get the golden answers. In Python to answer the question where am I? you have import a module, then invoke one of its methods. Very Easy when you know how, but obscure as hell when you don't: import os os.getcwd() 'C:\\Python22' Thanks ./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: radio button
Hi Nicolas, there may be different ways to do it, I would put the radio buttons into a block, and reference them through there index in the block. Normally I would add the buttons directly after I created the word to hold them, so what I#ll show here is, how to get them out of a layout block. ;-- Rebol file starts -- [REBOL [ Title: Dynamically named radiobuttons ] radio-buttons: copy [] lay: [ t7: text Just an example r1: radio of 'groupe1 text INFO DYN1 r2: radio of 'groupe1 text INFO DYN2 rn: radio of 'groupe1 text INFO DYNn button Set second button [ ; the words are only defined _after_ layout, so I can't ; get the real buttons before the layout rb: get radio-buttons/2 rb/state: true ; and why are changes not shown? show lay ] ] parse lay [ here: (probe here) some [ to set-word! here: (probe here) [ copy wrd set-word! 'radio ( ; change set-word! to word! ; why is wrd a block? wrd: to word! wrd/1 ; apend the word to the list of ; radiobuttons append radio-buttons wrd ) | skip | to end ] ] ] view layout lay ] ; -- rebol file ends -- I hope this will guide you on your way ... Ingo Am Sam, 2002-09-21 um 11.50 schrieb Nicolas Maillard: HI, i'am trying to explain beter =) i generate a script in dyn the data inside are not the same each time the file is created. so in this file i generated radio buttons whitch are like that : r1: radio of 'groupe1 text INFO DYN1 r1: radio of 'groupe1 text INFO DYN2 rn : radio of 'groupe1 text INFO DYNn a radion button for validate the choice. So i can't use r1/data or r2/data or rn/data because i never know if he exists. How can i recover dynamicaly the choice of th radio buton? for exemple if he choose the third choice can i use a thing like that : groupe1/data? or other thing thx for all - Original Message - From: Graham Chiu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 21, 2002 4:53 AM Subject: [REBOL] Re: radio button blk: copy [] repeat i 2 [ repend blk [ 'across to-set-word join 'r i 'radio 'of to-lit-word 'groupe 'text join my info i 'below ] ] repend blk ['do [r2/data: true]] l: layout blk view l After layout has been called, the same paths can be called, like setting r2/data to false. However, the displayed window must manually be told to update using show: Hi Scott, How do you access r1 .. rn dynamically? -- Graham Chiu -- 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. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Rebol Memory Allocation Strategy?
Hi Tim, Am Sam, 2002-09-21 um 19.12 schrieb Tim Johnson: ... Let's say we have a function my-f: func[][str: make string! 8192 ; untested code ; appends much data to str ] and that function is called any number of times. Now, does that mean that rebol has to allocate 8092 bytes of memory every time that 'my-f is called? ==If that is so then would not the following be more efficient? my-obj: make object![ ; untested code str: make string! 8192 _my-f: func[][ clear str ; appends much data to string... ] ; end function ] ;end object Would not 'str be allocated just once and that would be during evaluation of my-obj? As far as I know you're right. A few additions, though ... my-obj: make object![ ; untested code str: make string! 8192 set 'my-f func[][ clear str ; appends much data to string... ] ; end function ] ;end object this way you can just use 'my-f, without having to think about the object! (no my-object/my-f needed). _or_ you could use my-f: func[/local str][ str: clear str ; appends much data to string... ] ; end function 'str being a literal string, it will be retained over function invocation. Of course the first usage of the func might be slow, because 'str would have to slowly grow, while being appended to. _or_ you use the ideas someone else woll surely come up with. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Re : Rebol language aliasing == was {Re: FORUM REBOL}
Hi Laurent, Am Sam, 2002-09-21 um 21.26 schrieb Laurent Giroud: ... After reading this mail I did a few tests with the 'alias word to see if such thing was feasible, but I went too fast and tried this : alias 'first premier ; premier is french for first ** Script Error: premier has no value the error is logical since help alias reveals that alias expects a string as its second argument. So I retried (in the same console) : alias 'first premier ** Script Error: Alias word is already in use: premier premier [1 2 3] ** Script Error: premier has no value ** Near: premier [1 2 3] Isn't it a bug from 'alias ? It seems that premier was only partially registered as a word by alias which renders correct further aliasing of that same word impossible. Well, IIRC it is documented in the core guide, that 'alias can only alias to words, that have never been used before. Where used means it should never have been seen by rebol as a word, because the rebol interpreter saves everything it has seen as a word to system/words. But to answer back to Tim ... And now to answer forward to Tim ;-) premier: :first t: [1 2 3 4] == [1 2 3 4] premier t == 1 Of course, alias goes further than that ... alias 'first premier == premier troisieme: :third premier [ 1 2 3 4 5 ] == 1 troisieme [ 1 2 3 4 5 ] == 3 rand-val: func[ s [ series! ] /first /third ] [ either first [ s/1 ][ either third [ s/3 ][ random/only s]]] rand-val [ 1 2 3 4 5 ] == 5 rand-val/first [ 1 2 3 4 5 ] == 1 rand-val [ 1 2 3 4 5 ] == 2 rand-val/first [ 1 2 3 4 5 ] == 1 rand-val/third [ 1 2 3 4 5 ] == 3 rand-val/premier [ 1 2 3 4 5 ] == 1 rand-val/troisieme [ 1 2 3 4 5 ] ** Script Error: rand-val has no refinement called troisieme ** Near: rand-val/troisieme [1 2 3 4 5] Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Trimming values from a series?
Anton Rolls wrote: I think it should be faster this way, too, although it may not matter. Just for those interested ... a: [ a d e be e sn js am xmed dms d d a s e d s a s e s sa s d f de e s s dd fa s d d x cfas sd sd fa sd fas df asdf sd ] == [a d e be e sn js am xmed dms d d a s e d s a s e s sa s d f de e s s dd fa s d d x cfas sd sd fa sd fas df asdf sd] profiler/test [ unique sort copy a ] 1 == [0:00:04.271148] profiler/test [ unique sort copy a ] 1 == [0:00:04.794179] profiler/test [ unique sort copy a ] 1 == [0:00:04.29976] profiler/test [ sort unique copy a ] 1 == [0:00:03.604301] profiler/test [ sort unique copy a ] 1 == [0:00:03.57617] profiler/test [ sort unique copy a ] 1 == [0:00:03.555364] profiler/test [ sort unique copy a ] 1 == [0:00:03.681827] Of course this isn't really excessive testing, but it hints that you may be right. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Creating unique ID's?
Hi Rebols, I need to create ID's which are unique over even when they are created on different machines, or several poeple on the same machine, etc. Does anyone have a better idea than unique-id: join join system/user/email system/network/host now/precise Thanks in advance Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Evaluating if's
Hi Charles, Charles wrote: Here's a little question. Perhaps I've been spoiled in other languages, but this is starting to frustrate me. I have something like: if THIS and THAT [] Thing is, if THIS is false, it continues to evaluate THAT anyways. if (2 = length? p: parse filename .) AND (not none? find pick p 2 htm) [ What you are searching for is 'all, used like this: if all [ (2 = length? p: parse filename .) (not none? find pick p 2 htm) ] [ 'whatever-you-like-to-do-now ] 'all and its companion 'any use short-circuit evalution. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: dirty editor
Hi Gerard, Gerard Cote wrote: ... Just one more thing. The last time I asked VIEW to print block? ctx-edit the answer was not true. ? Can it really be so or did I goofed my VIEW somewhere ? For which situation can ctx-edit not be a BLOCK if this is possible? I think it must effectively be possible for ctx-edit to not be a BLOCK because of the test the EDITOR function is doing about it. But whatever is the reason for doing so this doesn't answer my question either. Look at this fresh Rebol/View Session: type? ctx-edit == block! editor %/tmp/x type? ctx-edit == object! On Rebol startup, ctx-edit is a block containing the the blueprint for the real ctx-edit object!. It's done this way mainly because a block needs much less memory than an object! created from it (especially if it contains 'view elements). To not waste this memory, the object! is only created when it is really needed. I hope that sheds a little light on that one. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Limitation coming from the initialize refinement usedwith the Array word
Hi Gerard, Gerard Cote wrote: Hello, ... Here is my example code ( I tried it directly at the concole) : tab_nbr: array/initial [3 2] 0 cells contents are all initialized to the 0 value L: 2 C: 1 tab_nbr/2/1: 10cell content [2 1] is updated to 10 print tab_nbr/:L/:CI verify that all is OK tab_nbr/:L/:C: 20But this one doesn't work, so I dynamically generated the real line and asked REBOL to execute it. The wanted expression was : tab_nbr/2/1: 20 and this can be given by join join join join tab_nbr/ L join / C : 20 which generates == tab_nbr/2/1: 20 then the do word will do it like this. There are a lot of ways to make this work, but sometimes it pays to think about what arrays really are: blocks of blocks, so the most elegant solution (IMO) is to use change at tab_nbr/:L C 20 And, btw, it is _much_ faster: profiler/test [do join join join join tab_nbr/ L join / C : 20] 100 == [0:01:07.580636] profiler/test [change at tab_nbr/:L C 20] 100 == [0:00:02.855449] ... While I am at it, I also tried to use the word reduce and a to-block conversion instead of the word do but it seems that the refered object (tab_nbr) is not in the same context. So is there a way to notify REBOL that we want it to share some valuable information from a context to another one or do we have to define it for the global one, which in this case is not under my control Yup, it's 'bind. reduce bind to-block join join join join tab_nbr/ L join / C : 30 'tab_nbr == [[30 0]] tab_nbr == [[0 0] [30 0] [0 0]] 'bind has two paramters, the block you want to run in a differrent context than its default, and a word from the context you want it to run in. I hope that helps, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Editor
Hi Jim, [EMAIL PROTECTED] wrote: I wonder if anyone knows how to keep the focus in a text area when you click on a button. If I am entering text using the key board, when I click a button that is supposed to enter more text, all that happens is that I lose the caret and the focus in the text area. I have to click back into the text area to get the focus and caret back. I changed the date button in your ed-64.r (btw, does this mean, that you have at least 70 specialized editors?) to the following: btn green / 1.8 Date # [ focus my-area put to-string now/date length? to-string now/date ] Now the button works as expected - but only a few times. After 3 to 10 times it doesn't do anything at all. I'm using REBOL/View 1.2.5.4.2 6-May-2002, anyone seeing the same problem? I hope that helps, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: problems with url...
Hi Cyphre, Cyphre wrote: I have this problem, how to 'read following url from rebol? http://slovnik.nettown.cz/?co=naslepokde=A-%C8 There is a bug in the url! handling. Percent-escaped characters are unescaped at two different places. So one possible solution is to percent-escape the percent ... read http://slovnik.nettown.cz/?co=naslepokde=A-%25C8 [Accept Connection User-Agent Host] [*/* close REBOL 1.2.5.4.2 slovnik.nettown.cz] */* close REBOL 1.2.5.4.2 slovnik.nettown.cz ** User Error: Error. Target url: http://slovnik.nettown.cz/?co=naslepokde=A-%C8 could not be retrieved. Server response: HTTP/1.0 404 WWWOFFLE Will Get ** Near: read http://slovnik.nettown.cz/?co=naslepokde=A-%C8 I hope that helps, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Newbie help: Parsing mobile email address
Hi Matthew Matthew Kim wrote: .. Basically I'm trying to do this... Mobile Email Address: [EMAIL PROTECTED] Parsing algorithm Result: ~~~ Area Code: 416 Phone Number: 5551234 You could use parse ... mea: [EMAIL PROTECTED] == [EMAIL PROTECTED] parse mea [ copy area 3 skip copy phone to @ to end ] == true area == 416 phone == 5551234 This rule would be happy to parse anything with an @ symbol and at least 3 characters before it. If you want to check, if this is really a mobile phone number, you can change it like this: digit: charset [ #0 - #9 ] == make bitset! #{ FF03 } parse mea [ copy area2 3 digit copy phone2 6 8 digit @ to end ] == true area2 == 416 phone2 == 5551234 Now you can be sure, that there are only digits before the @ and at least 3 for the area and 6 for the phone number, at most 8 for the phone number. I hope that helped, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: basics: meaning and uses of make object! vs. context
Now answering my own email ... Ingo Hohmann wrote: Ammon Johnson wrote: Use the SOURCE, Luke! The SOURCE will not fail you... ;-) Unless it does, of course ... a: make object! [ blk: [ print HI ] set 'f func [][ do blk ]] f HI source f f: func [][do blk] blk ** Script Error: blk has no value ** Near: blk Of course, given Rebols inspection abilities, you _can_ get to the source: second :f ; gives you the functions body == [do blk] second second :f ; the second element in the function body == blk get second second :f ; and, at last, the value of 'blk == [print HI] Sometimes you need to dig a little ... Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: RFC on support for user-defined types
Hi Joel, Joel Neely wrote: .. somefunc: func [ a [object! [invert]] b [object! [memorize]] ... ][ ...blah blah blah... ... a/invert ... ... b/memorize ... ] to document/enforce that the first argument must possess an INVERT attribute/method and the second must have a MEMORIZE attribute/method, with the checking to be done by the interpreter at the/each point of function invocation (e.g., as type checking is done now). Feedback, comments, etc. welcome as always! -jn- That sounds very rebolious to me ... and a valuable addition, too! As much as I'd like a facility that would allow me to define lexical syntax for a new data type, along with appropriate input/output formatting rules (to quote from your other post), I don't believe that we'll see it (at least not before 4.0), but these object! tests seem to be doable (INARTE and all, af course). Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: basics: meaning and uses of make object! vs. context
Hi Jason, Ammon, Ammon Johnson wrote: Hi again, Yes, there are times when the SOURCE hides things from you... source make make: native [ Constructs and returns a new value. type [any-type!] The datatype or example value. spec [any-type!] The attributes of the new value. ] You see MAKE is a Native! It isn't done in REBOL code, but rather in the language REBOL is written in (C?) so SOURCE couldn't tell you if it wanted to. Other than that, SOURCE will hide nothing from you. Use the SOURCE, Luke! The SOURCE will not fail you... ;-) Unless it does, of course ... a: make object! [ blk: [ print HI ] set 'f func [][ do blk ]] f HI source f f: func [][do blk] blk ** Script Error: blk has no value ** Near: blk This is an artificial example, of course, but it is not that uncommon that critical parts of a function are hidden in an object!. Especially once you start with /View. That said, 'source is always worth a try. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: How to check function arguments ?
Hi Jason, Jason Cunliffe wrote: hmm.. Q: How to tell if a word already exists or if is just an argument value being passed? somefunc: func [inp [any-type!]][if value? 'inp [print inp do stuff]] somefunc == none somefunc hello hello == do stuff somefunc print now 9-Jun-2002/8:32:33-4:00 == none When the input to somefunc is something like 'print' or any word in the rebol dictionary, we might assume that it is not a valid argument. Well, trouble is, some-func never gets to see 'print, let's walk through it: somefunc print hello The interpreter finds 'somefunc, and sees that it's a function which would be happy to get an argument (in our example it would be equally happy without one, but that will only be checked _after_ nothing at all has been found). Now it stumbles on 'print ahh, that's word, now let's find the value of that word. The value happens to be a function, this function wants one argument, too, so it eats the string hello, does its work, and the return value of print (which is nothing at all, by the way), is given to somefunc as an argument. You could change somefunc like this somefunc: func['inp[any-type!]][if value? 'inp [print inp do stuff]] (Notice the 'tick in front of inp) Now you'll get: somefunc print hello print == hello - somefunc eats the _word_ 'print, without evaluating it, and hello is just returned, because there's nothing left to do with it. It is possible to do the print command now, but the problem is to get to prints argument. And now for something completely different. Your real problem is, that Rebol functions just try to get all their arguments, and there seems to be no way to tell a function where to stop searching, while most other languages have a means for that, be it semicolons, parents, or what not. Now Rebol has some Lisp ancestry, so you can always use those lispy parens: (somefunc) == none (somefunc) print hello hello .. But the obvious escape is just put all args in a block. Well, that's the most rebolious way, I think. I hope that shines a little light on the subject, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: I need help...
Hi Daniel, I know there are at least two, and I know where one of them can be found, namely at: http://www.h-o-h.org/browser.r It's really a text-only browser, in a view layout, but I think you could get some ideas on how to parse. Kind regards, Ingo [EMAIL PROTECTED] wrote: ...to make a simple browser, because I don't know how to parse. here's the basic idea: 1. Parse all HTML tags out of the page 2. Change IMG tags to the REBOL/View version, image. 3. List all links in a menu at the top, with the ability to click on it to go to the link. 4. Possibly an address bar. I had seen something like this a long time ago, but I can't find it now. Daniel S. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Submitted, for your approval.
Hi Ed, Ed Dana wrote: ... This is because the ^ is not legal. I tried using it in REBOL and it gave me the following grief: ** Syntax Error: Invalid string -- ] ** Near: (line 54) Symbol_Set: [ ~ ! @ # $ % ^ ] It doesn't like the ^ symbol, for whatever reason... The reason is, that ^ is Rebols escape character: ^/= return ^-= tab ^(41) = ascii character 65 ^^= a literal ^ Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Submitted, for your approval.
Hi Ed, maybe it would be better (at least better looking) if you turned your function/refinements design into an object/funcs design, wouldn't take much I guess. And you can give 'print a block, like this: print [ Matched: Matched Placed: Placed newline] 'newline adds, you'll guess it, a newline (you could use ^/, too). From the usability view-point: - You should display a list of the symbols on startup. - and an error on less than 5 symbols - help on wrong symbols Kind regards, Ingo Ed Dana wrote: Greetings all, Attached is a small game I created in my continuing effort to understand REBOL. It is another guessing game, slightly more sophisticated than the one I submitted previously. Please look it over and feel free to criticize, but do be gentle, as this is my second attempt at a REBOL program. ;) -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: list! bug
Hi Romano, Romano Paolo Tenca wrote: Is this a bug? to-list 1 == make list! [] No, it's no bug, just not too intuitive. For most datatypes to-datatype value converts the value into the other datatype, but in the special case of to-any-series-datatype an-integer A new series is created, with an initial size of an-integer. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: list! bug
Thanks Gabriele, I stand corrected ... out to find that thinking brain dog now ;-) Ingo Gabriele Santilli wrote: Hi Ingo, On Monday, May 27, 2002, 4:51:06 PM, you wrote: IH converts the value into the other datatype, but in the special case of IHto-any-series-datatype an-integer IH A new series is created, with an initial size of an-integer. Nope, that's for MAKE, not for TO. What Romano showed looks like a bug to me. Regards, Gabriele. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: adding line hints when building blocks
Hi Gregg, Gregg Irwin wrote: hi Ammon, Just a shot in the dark (I am still not sure what you are attempting, an example maybe?) Have you tried placing the word 'newline in where you wanted a new line? and I think that there is a similar one for tab IIRC. Yup. Tried various combinations of things, reducing, composing, etc. but no luck so far. The goal is to write out, to a file, something like this: item-1-id [ value 0 mail [EMAIL PROTECTED] ] item-2-id [ value 1 mail [EMAIL PROTECTED] ] I guess writing a pretty printer is your only chance, maybe something like this will do: a: [item-1-id [value 0 mail [EMAIL PROTECTED]] item-2-id [value 1 mail [EMAIL PROTECTED]]] parse a [ some [ set id word! (print [id []) into [ some [ set name word! set val any-type! (print [name val ]) ] (print ]) ] ] ] which gives item-1-id [ value 0 mail [EMAIL PROTECTED] ] item-2-id [ value 1 mail [EMAIL PROTECTED] ] I hope that helps, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: adding line hints when building blocks - P.S.:
Hi Gregg, seems I have to add a little background info on my last post, at least _I_ would have had trouble to understand what I meant, hadn't it been written by me ... Gregg Irwin wrote: Suppose I want to build a block in code, which will be written to a file, and I want it to be formatted nicely in the file (i.e. with newlines and indentation). Is there any way to include formatting hints when building a block, or do you have to build a string and blockify it? Well, that what I would do: create a block, however it looks, and stringify it on save (use a pretty printer, e.g. the one in my previous post) to create a pretty printed output. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: [View] text-list usage as a face
Hi Ammon, Ammon Johnson wrote: Hi, Have you tried 'get-style? 'get-style was designed to avoid that problem. No, didn't know about it. But in the end, it's seems to do no more than my select does. HTH Ammon A short time ago, Ingo Hohmann, sent an email stating: Yore joking ain't ya? It took this mail 5 days to come back to me :-) text-list: select system/view/vid/vid-styles 'text-list and am using now make text-list [ ... ] but it seems to have lost many of its normal functionality ... so I guess that layout does a little more magic than I first thought. Are there any ideas on how to - add actions now? answer to self: make face [ ... feel: make feel [ engage: func [face action event] [ ... ] ] ] - change the list data? I tried append clear My-text-list/data [ new lines ] show my-text-list - get the slider/scroller back? Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] [View] text-list usage as a face
Hi all, I am trying to work with view again, and now I have a little problem: I am using iterated faces for my layout, but I want to use a text-list in this iterated face. I copied the face text-list: select system/view/vid/vid-styles 'text-list and am using now make text-list [ ... ] but it seems to have lost many of its normal functionality ... so I guess that layout does a little more magic than I first thought. Are there any ideas on how to - add actions now? - change the list data? I tried append clear My-text-list/data [ new lines ] show my-text-list - get the slider/scroller back? Thanks, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Internationalization appeal
Hi Gabriele, Sunanda, Gabriele Santilli wrote: Hi SunandaDH, On Thursday, May 16, 2002, 6:32:54 PM, you wrote: Sac 1. Some feedback on the requirements. Please take a look at the sample Sac functions below and tell me what is missing so it can work for your Sac country/locale. Just my 2 cents: what about handling it like AmigaOS locale.library does? You first select the country and the language, and then use the functions. This way you don't need to have all the combinations loaded, but can simply store the required info in external files (i.e. %locale/italy.country and %locale/italian.language), which can easily be replaced/added without modification of the code. It looks much simpler this way to me. Yup, this would make it _much_ easier to add new languages, I think. Furthermore it might be an idea to add a field 'lang to the system/user object, and use this to determine the language settings. I have an experimental implementation to work with different language strings on the reb under h-o-h/core/languages . Maybe something like this should be part of the system, too. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Database Compactness?
Hi Mark, [EMAIL PROTECTED] wrote: This is one for the guru's or Rt staff, Which of the following provides a more compact and secure representation for a database? an object! db1: context [ group1: [#1 A Value] ] or a block! db2: reduce [ 'group1 [#1 A Value] ] I don't know about the security aspect, but think they'd be equal. Comparing creation time / space efficency, blocks clearly win I'd _guess_ that objects are faster for lookups, but I don't know. (And using hashes instead of blocks is the worst for creation time / space, but I don't know how it works for lookups.) They both allow path retrieval ie. db1/group1/#1 == A Value .. As well as insertions / removals append db1/group1 [#2 A Thing] == [#1 A Value #2 A Thing] .. But there would be a problem when it comes to adding a new group to the object! case, I don't know if this might pose a problem in this specific case, though. I hope that helps, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Strange array behavior
Hi Geza, Geza Lakner MD wrote: Hi REBOL-fellows! Why does not properly work this code segment: a: array/initial [3 2] [[]] == [[[] []] [[] []] [[] []]] append a/1/2 3 == [3] a == [[[3] [3]] [[3] [3]] [[3] [3]]] .. Now, if I want to manipulate arrays with appendable empty lists, I don't give initial values and change each occurrances of 'none to copy/deep [[]] and THEN append to the defined location. Is this the best practice to overcome the seeming limitation of 'array ? Or you could patch the array function to copy series values before initializing, maybe like this: array: func [ {Makes and initializes a series of a given size. *PATCHED* (iho) copy/deep's series values, so you can use it to initialize with blocks} 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] rest: 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 [ ; changes \/ \/ \/ either series? value [ loop size [ insert block copy/deep value ] ] [ insert/dup block value size ] ; changes /\ /\ /\ ] [ loop size [ block: insert/only block array/initial rest value ] ] head block ] And after that: a: array/initial [3 2] [[]] == [[[] []] [[] []] [[] []]] append a/1/2 3 == [3] a == [[[] [3]] [[] []] [[] []]] I hope that helps, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Append lit-path
Hi Ammon, Anton, Ammon Johnson wrote: .. I have run into this problem sometimes and it has to do with the conversion of a lit-path to other data-types. Try this at the console; to string! 'some/path/value == somepathvalue To me that is *very* anoying! I personally think that it aught to leave the slashes in there when converting to string, but that is just me. Anyone else? Well, string conversion of paths is consistent with blocks: to-string 'a/b/c == abc to-string [ a b c ] == abc any-block? 'a/b/c == true To preserve slashes, use form: form 'a/b/c == a/b/c append %a/ form 'b/c == %a/b/c Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: File-modes on different platforms
Anton wrote: Thanks to all of you. Ok, I have: - Windows 2000 - Linux Ok, anyone who wants to help me on: - Amiga, Mac, BSD or any other platform than Windows 2000 or Linux, run this script and report the results: These are the results on Windows 98 REBOL/View 1.2.1.3.1 21-Jun-2001 date creation-date none date access-date none date modification-date none logic owner-write none logic archived none logic hidden none logic system none Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: REBOL momentum builds
Cyphre wrote: ... Core and View would be free for use and redistribution for commercial and noncommercial use; however, if more than five copies are in use at a single company, then purchasing would be required. Exception would be the use of REBOL for any educational purposes. This mean you can use REBOL for creating and selling your programs, for in-house servers, for small company clients, and for use in consulting solutions. ... This licensing model seems to be quite better than the current one! I'd second that! What about View/Pro features? Would be great to free(only at the same conditions you've written above) some (or even all?) of them...at least sound and library access interface. I think this will help to spread Rebol into wide area of applications and better compete with other free scripting languages.What is your opinion on that? Ahh, yes, those people who always try to get the whole hand, if you give them your small finger. ;-D Well, actually, I think there are many people out there who won't take Rebol seriously, unless all versions have shell/library. I, myself, think that encryption is very immportant nowadays. Can live without sound, though. BTW, are there any docs about the system port? Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Core 2.5.2 - Less aggressive evaluation - howto evaluate?
Hi Ammon, Ammon Johnson wrote: I just tried that on Command: a: context[ b: context[ c: 1]] f: func ['word] [print word] f a/b/c 1 I don't know if it is a problem with Core that is non-existant in Command. As the subject was meant to express, we are talking about a change in the next beta Version of Rebol. So the phenomenon may only be seen in the new betas, not on any of the stable versions. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Core 2.5.2 - Less aggressive evaluation - howto evaluate ?
Hi Carl, Rebols, it may be that I don't see the obvious, but given a: context[ b: context[ c: 1]] f: func ['word] [print word] f a/b/c a/b/c what do I have to do to get 'word evaluated? Thanks in advance, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: transferring files
Hi Graham, Graham Chiu wrote: What do ppl use to transfer files across a network? Here're two minimalistic scripts I once used - sending -- #!/bin/r REBOL [] print File Send Utility ^/ fn: ask Filename: if #% = first fn [ remove/part fn 1 ] fn: to-file fn sv: ask Server : data: read/binary fn p: open/binary join tcp:// [sv : 4321] insert p data - end sending -- - recieving -- REBOL [] print File Recieve Utility fn: ask Filename: if #% = first fn [ remove/part fn 1 ] fn: to-file fn sp: open/binary tcp://:4321 wait sp cp: first sp while [data: copy cp] [ write/append/binary fn data ] - end recieving -- I turned 'em into a single script that may act as sender or reciever, depending on how you call it, too. If anyone is interested, I'll send it along ... Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: Tip for splitting very long string ?
Hi Carl, Am Die, 2002-04-16 um 13.16 schrieb Carl Read: .. I tried to cut out the need for the charset in the following function but it ends up in an infinate loop when it starts comparing an empty string with an empty string. Can anyone think of a rule that would override that? Be interesting to know if this would be faster than the above. (If it worked...) split2: func [ This don't work... str [string!] num [integer!] /local blk s ][ blk: copy [] parse/all str [some[ s: (s: copy/part s num) s (insert tail blk s) ]] blk ] .. you could do it like this: split2: func [ This don't work... Now it does ;-) str [string!] num [integer!] /local blk s ][ blk: copy [] parse/all str [some[ s: (s: copy/part s num insert tail blk s) num skip ]] blk ] just 'skip the right number of characters. The 'insert is in the first paren!, because otherwise the last charecters would be added if the string does not contain a multiple of num characters. Kind regards, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: The all function.
Hi Louis, Dr. Louis A. Turk wrote: ... What I am wanting to do is to make sure that the record is not already in the database before I insert it. In other words, no duplicate _records_ are allowed. Note, however, that although the records are all unique, the code data is not necessarily unique, nor is the chknum data. There may be many records with the same code, and also many records with the same chknum. Only the code / chknum combination is unique. So, do I perhaps need the records to look like this?: ] bho 5259 ; === TWO KEYS. make object! [ code: bho chknum: 5259 date: 27-Jul-2001 amount: $100.00 special: $0.00 well, I think this would get you into much trouble, but how about using a single key, that joins the two values?, e.g. key: join join code - chknum == bho-5259 and then use ] bho-5259 ; === ONE KEY, composed of TWO KEYS. make object! [ code: bho chknum: 5259 date: 27-Jul-2001 amount: $100.00 special: $0.00 I hope that helps, Ingo -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: trim/auto doesn't do anything?
Hi Anton, what the help of trim/auto _means_ is, that the first line gets trimmed, and all subsequent lines get trimmed to the same amount, e.g. if three spaces had to be removed in the first line, there are never more than three spaces removed in the following lines. Now in your example, the first line could not be trimmed, so nothing changed at all. t: { A^/ B^/ A} ==A^/ B^/ A trim/auto t == A^/ B^/A Kind regards, Ingo Am Fre, 2002-04-05 um 14.12 schrieb Anton: trim/auto AAA^/ BBB^/ CCC^/ DDD == {AAA BBB CCC DDD} I was expecting all the lines to be lined up. P.S. That might be someting for 2.6: trim/align left aligns all lines -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.
[REBOL] Re: ?unset?
Hi Louis, your problem is, that you _print_ from within a 'print statement, and that doesn't work (as you've figured yourself by now). print [123 pad 10 456] 123 ?unset? What happened here is, that 'print first found a value (123) and then a function, so, to be able to know what to print, 'print _first_ executed the 'pad function. 'Pad used 10 and 456 as it's parameters and printed seven spaces. Then it returned the last value. Given that 'prin was the last part of 'pad, and that 'prin doesn't return a value, the value returned by 'pad was unset, too. Now 'print was ready to do its job: print the value 123, a space, and the value returned by 'pad, which was unset. Now, you have to change your function to either print everything: pad1: func [ form-length val ] [ loop form-length - length? to-string val [prin ] prin val ] prin 123 pad1 10 456 print 123 456 or to just return the padded value: pad2: func [ form-length val /local ret ] [ ret: make string! 20 loop form-length - length? to-string val [insert ret ] append ret val ] print [123 pad2 10 456] 123456 I hope that shed a little light on the mistery ... Ingo Am Die, 2002-04-02 um 21.43 schrieb Dr. Louis A. Turk: Hi rebols, I wrote this function to add spaces in the right places to line up columns of text: pad: func [form-length val] [loop form-length - length? to-string val [prin ]] It works fine except that it also prints ?unset? How do I get rid of the ?unset? ? -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.