[REBOL] animated rebol logo in /view Re:
This is the network activity icon. It shows whenever a net read or write occurs. I'm surprised you haven't noticed it before. You should have at least seen it when you ran the demo to look at the RT rebsite. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 06, 2000 5:31 AM Subject: [REBOL] animated rebol logo in /view I was playing around with /view trying to create an application which listens to ports and displays data. Then something cool happened. I launched the application from the /view console and then opened a /core console to send data to the port specified by the /view app. The /view layout did not change until I clicked on the window. Upon doing so, a little animated REBOL logo appeared in the lower right-hand corner of the layout. Is this logo supposed to be appearing in every layout? This is my fourth /view app and I've never seen the logo appear before. -Ryan
[REBOL] Bug in either clean-script.r or the parser. Re:
Hi Brett, I've had a few problems occasionally with this script too. I tried hard to track down the exact condition that caused the bug, but couldn't. I've also noted that if run a few times in the same session it can accumulate indents. Send your bug report direct to the author.. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 05, 2000 2:48 AM Subject: [REBOL] Bug in either clean-script.r or the parser. I've been using clean-script heavily recently, and have now tripped over the following problem. clean-script mangles the attached script. Specifically it creates an unmatched "(" for the following line. In other tests it could be a new "[". table-start: [text-line (emitter/start-table trim text) newline] The thing is it handles earlier such lines correctly, which leads me to think about the parser. I've think I've narrowed it down to the script not "consuming" the first "[" for this line. Instead load/next gets and it will return a block value. I tried removing some lines before this line and the error moved. Same for when you add extra lines - BUT they have to be of the same type not just any old line. Any ideas? Thanks. Brett. --- my-rebol-stuff == http://www.zipworld.com.au/~bhandley/rebol
[REBOL] /Command docs and release date Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 04, 2000 9:19 AM Subject: [REBOL] /Command docs and release date Hi, now that experimental /Command versions for different platforms are available for download, I'd like to see some docs for ODBC and external library calls. Also, the REBOL/Command page at http://www.rebol.com/command1w.html says that "REBOL/Command will be available for purchase in August 2000.", so should we expect it Real Soon Now? -- Michal Kracik Hi Michal, Until we have an official link for the new ones at REBOL, I have placed the the beta 0.90 REBOL/Command docs on my server. www.janita.com.au/rebolforces/docs/notes.html www.janita.com.au/rebolforces/docs/setup.html www.janita.com.au/rebolforces/docs/users.html Hope this helps, Allen K
[REBOL] Rebol novice questions Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 01, 2000 4:57 AM Subject: [REBOL] Rebol novice questions I have an interest as a hobby in writing a text word based music language, The present version in Linux Perl/Tk is becoming very large and unwieldy. I was considering moving to Forth, but a few days ago discovered REBOL may I ask firstly, I find the sample View text-edit.r is very slow taking 0.5 secs to accept a char, have I made a error in my install ,something not set correctly ? A full screen Rebol editor would be very useful. There is still some optimising to be done in the View beta. The speed of a large editable area is one one of them. Currently, if you reduce the area e.g halve the height, you will get a more reasonable edit speed. This might be an indicator of the improvement to come, in the experimental version of BeOS I find that a large screen edit is faster than std native BeOS editor. So I'm waiting to see if this improvement will be the same across all platforms with the next beta release. Cheers, Allen K
[REBOL] View-faq updated
http://www.janita.com.au/rebolforces/reb/view-faq.html Cheers, Allen K
[REBOL] REBOL Scripting Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 28, 2000 1:00 AM Subject: [REBOL] REBOL Scripting Hey, Does anyone know where i can learn to write a REBOL script? Start with the docs and the example scripts in the library or buy the books Links to all these resources are on http://www.rebol.com/developer.html Cheers, Allen K
[REBOL] RT Convention/conference. Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 27, 2000 5:06 AM Subject: [REBOL] RT Convention/conference. Hello, I think it's about time that RT organised a convention/conference and brought together in one place, all the talented people that are actively involved in promoting REBOL. It would be wonderful to see and hear people like Elan, Gabriele, Julian, Allen, Brett, Volker, Pekr, Ladislav, Brian, Larry, ... (my apologies for any ommissions) discussing REBOL, together with all the great folks from RT. Just a thought. Mike. Pay for my ticket and I'm there :-) Cheers, Allen K
[REBOL] shortcut? Re:
A few ideas d: insert/only/dup [] [this] 5 head d == [[this] [this] [this] [this] [this]] or array/initial 5 [this] == [this this this this this] or array/initial 5 [[this]] == [[this] [this] [this] [this] [this]] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 19, 2000 12:31 AM Subject: [REBOL] shortcut? Hi. Is there some rebol func that would allow me to quickly create a block which repeats a given series a given amount of times? eg. blah: some-func [series-to-be-repeated] [number-of-repeats] I made one myself, but I'm sure I've seen something similar before and wondered if it was a native func that I haven't been able to find in the dictionary. In which case, it's silly using the custom one. Just a quick yes or no would be great. Thanks, chris
[REBOL] pesky little questions Re:
Hi Tom, I'm feeling a bit tired, so I'm only going to answer the first one for now ;-) Cheers, Allen K pesky little questions howdy guys, I've a few smallish questions that have been pestering me. Like this one: compressing a file is pretty easy. compress read %this.file (right?) How can I get the compressed data into a script so that I can use it there? I guess a gif would be in the same catagory. REBOL [ Title: "Image File Compressor" Purpose: {Creates a file of compressed images from the directory images for pasting into scripts} Note: {Modified version of one of Jeffs helpful posts} ] system/options/binary-base: 64 list: [] foreach file read %. [ if any [ find file ".bmp" find file ".gif" find file ".jpg" find file ".jpeg" append list join to-string file [ {: load to-binary decompress } mold compress read/binary file "^/^/" ] ] ] write %images.r list
[REBOL] bug ? Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 12, 2000 1:44 AM Subject: [REBOL] bug ? Difference is a high-level function that returns the differences between two datasets. But datasets do not exist in Rebol (they're not a datatype), so difference accepts any series including strings. However, when you use it on the content of two files (read %file), you get a strange result : difference file1 file2 == {:"39%.@{}!(^^4567)~} From the Core release docs addendum, DIFFERENCE renamed EXCLUDE, though DIFFERENCE is retained as a synonym for EXCLUDE. Why do you say it won't work? It appears to be correctly returning only the different characters as would be expected when dealing with a string. What it returns depends on what the series is made up of. difference "ABCDEFG" "ABCDEFGH" ==H difference [1 2 3 4] [1 2 3 4 5 8] == [5 8] difference ["the" "cat" "sat"] ["the" "cat" "sat" "on" "the" "mat"] == ["on" "mat"] Cheers, Allen K
[REBOL] Can rebol print files? Re:(2)
Hey Andrew and other Javascript knowlegeble folk, Here's an idea. I haven't got time to chase the javascript for this but I think this might provide a way that we can use the printer across more platforms with better formating, printing with pictures etc. Step 1 Write a html frameset (print.html) with javascript to print the main frame onload. (temp.html) Step 2. Create page layout in html save it as temp.html Step 3. Use browse/only "path-to-print.html" Cheers, Allen K
[REBOL] Netscape vs. Explorer ??? Re:
Hi Ralph, Is there any way you can avoid the comma? Some Options.. 1. Encode it, and see if MSIE and NN can still handle it. 2. Or else strip it and modify your bookord.r to deal with all titles without the puctuation. 3 Use ISBN or a cat number to pass to bookord.r, this avoids the whole puctuation issue Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 07, 2000 7:31 AM Subject: [REBOL] Netscape vs. Explorer ??? something weird happening? I use a URL like so to pass info to a REBOL script: https://abooks.safeserver.com/cgi-bin/bookord.r?Behold,%20The%20Camels%20Wer e%20Coming!?Dr.%20Ralph%20Sexton,%20Sr.?1-57090-055-8?Mountain%20ChurchT?9.9 5 In the script, I use: orderdata: system/script/args parse orderdata/1 [some [to "\" (remove find orderdata/1 "\")] to end] order: parse/all trim orderdata/1 "?" and running Internet Explorer, my order taking script works beautifully. But in Netscape 4.03 (at least), the only info I get is the first word of the title (would be "Behold" above). Could anyone point me to a solution? Thanks, --Ralph Roberts
[REBOL] Webcam URL Re:(5)
Better than television, we have REBOL Vision... A little REBOL/View script to grab and display the webcam pic every 5 minutes. Hopefully we don't bring the server down. (The webcam is stuck at the moment though) Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 03, 2000 10:55 PM Subject: [REBOL] Webcam URL Re:(4) Looks like the webcam: http://demo.rebol.net/webcam/ is still stuck. Perhaps it has something to do with the mysterious green light in the center of the screen? Have aliens landed and mucked about with the REBOL webcam? --Ralph rebcam.r
[REBOL] Rebol page Re:
What does it have to do with REBOL ? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 04, 2000 2:55 AM Subject: [REBOL] Rebol page hi there is a Rebol/flash page: http://oldes.multimedia.cz/flash/zion-7-7-multi1600x1200na800x600.html oldes
[REBOL] Browser? Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 01, 2000 3:40 PM Subject: [REBOL] Browser? Been snoozing a bit, but was I dreaming or did somebody mention working on / having a /View-based web browser project going? jb Yep, Ingo has one. REBOL [] do http://www.2b1.de/
[REBOL] Parser seems to have bug - different results on multiple calls. Re:(2)
Hi Brett, change cell-data: {} to cell-data: copy {} This ensures you get a new empty string each call. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 01, 2000 4:48 PM Subject: [REBOL] Parser seems to have bug - different results on multiple calls. Re: How embarassing. Sent the wrong code. Here is the actual problem code. only-string: func[ s [any-string! none!] ][ either s [s][{}]] quoted-data-rule: [ (cell-data: {} print "--init-line--") ; This seems to be ignored on subsequent calls of parse. {"} copy data to {"} {"} (append cell-data only-string data) any [ {"} copy data to {"} {"} (append cell-data rejoin [{"} only-string data]) ] ] parse/all {"""Mutter."} quoted-data-rule ; This looks ok. print cell-data ; parse/all {"""Mutter."} quoted-data-rule ; This is not right. print cell-data ; parse/all {"""Mutter."} quoted-data-rule ; Bugger. print cell-data ;
[REBOL] Simple script for view layouts Re:
A lot of potential hiding in that simplicity. Gonna have fun with this over the weekend :-) One problem, once the backdrop has been selected, you can't grab any thing else. mmm.. Tinkering on If I use right click to deselect and remove the nub this would be the way around that. Tinkering off Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 30, 2000 4:36 PM Subject: [REBOL] Simple script for view layouts Here's a script you will probably enjoy. It's been hanging around for a couple months nagging to educate others, so I decided to give it a name and post it. REBOL [ Title: "Graphical Layout Editor" Author: "Carl Sassenrath" Date: 20-Jun-2000 File: %layed.r Purpose: { Your basic 1K REBOL graphical object layout editor. Not many features, but a good example of how to drag faces and show nubs. } Note: "Keeping the nubs on top is done on purpose." Category: [view vid 3] ] ; Layout to edit: faces: layout [ backdrop %bay.jpg 0.0.200 title "Test" image %bay.jpg field across space 0 button "Send" button "Cancel" ] vid-face: get-style 'face engage-drag: func [f a if find [over away] a [ f/offset: f/offset + e/offset - f/data update-nubs f show [f nub-face] ] if a = 'down [ f/data: e/offset show-nubs f ] ] nub-face: make vid-face [ edge: make edge [color: 250.120.40 effect: 'nubs size: 4x4] color: font: para: text: data: none feel: make feel [ engage: func [f a e] [ ;intercepts target face events if data [data/feel/engage data a e] ] ] ] update-nubs: func [f] [ nub-face/offset: f/offset - 4x4 nub-face/size: f/size + 8x8 ] show-nubs: func [f] [ update-nubs f nub-face/data: f if not find f/parent-face/pane nub-face [ append f/parent-face/pane nub-face ] show f/parent-face ] foreach f faces/pane [f/feel/engage: :engage-drag] view faces
[REBOL] View: RebolForces Reb updated
Hi Rebols, I've just finished an update of the Rebolforces Reb. I've added a number of the interface features people asked for. You can now choose to run, download and browse the colorised source for each script. ("+" maximises the minimised windows too) . If you haven't visited for a while, click the download icons before running scripts to force an updated version to be cached on your system. The view-FAQ I wrote is also linked from the reb as well as 13 other view demos. Have a good weekend! (and pity us Aussies as we wake up to a new tax system) Cheers, Allen K Use the REBOL forces link from the Rebol Tech Reb or use the link below REBOL [] do http://www.janita.com.au/rebolforces/reb/index.r
[REBOL] Webcam URL Re:
How often is it updated? Looks like its stuck on Friday June 30, 2000 1:22:25PM Or has someone just stuck a picture to the lense :-) Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 01, 2000 4:32 AM Subject: [REBOL] Webcam URL Whoops. Should have gotten more than 3 hours sleep... Here's the address: http://demo.rebol.net/webcam/
[REBOL] Webcam URL Re:(5)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 01, 2000 9:09 AM Subject: [REBOL] Webcam URL Re:(4) I'm more concerned as to why the tree to the right, looks like a giant snarling rat? It totally does!!! It totally is!! Why do you think we get so much done around here? We have to wait until it goes to sleep to leave the office. :) Sterling It's spooky after dark.. This is a great timezone converter, now I always know what time it there. RMT (rat meal time) Cheers, Allen K
[REBOL] Calling all Brisbane Rebols
Hi Rebols, I know there are few people from Brisbane on this list. I am thinking about organising/running a free Rebol/View workshop sometime in late July or August. Numbers will determine the venue. If you are interested in attending please contact me directly by email or phone Cheers, Allen K [EMAIL PROTECTED] ph 3366 8093 mob 0402 246664
[REBOL] REBOL/Core 2.3 Released! Re:
Hey Scott, Can you update the code in the releases.html page so we can use the 'upgrade function? It just told me, my old core was the current version. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 28, 2000 6:43 PM Subject: [REBOL] REBOL/Core 2.3 Released! Announcing the release of REBOL/Core 2.3! This new version of REBOL/Core includes many improvements only available in beta versions of our REBOL/View and REBOL/Command products, until now. With enhancements to existing functions, such as the ability to use parse on a block, as well as the addition of many other useful features, we know that you will find REBOL/Core 2.3 invaluable to your personal and professional computing needs. REBOL/Core is available for download at http://www.rebol.com/downloads.html and an addendum to the notes.html file, included in the distribution, is available at http://www.rebol.com/core23add.html. Thank You and Enjoy, The REBOL Team
[REBOL] AW: [ANN] 2KB News Reader 0.1.1 Re:(2)
Hi Thorsten, The nntp.r file is distributed with Rebol/core Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 28, 2000 5:57 PM Subject: [REBOL] AW: [ANN] 2KB News Reader 0.1.1 Re: Hi Ryan, Allen, like to try out this newsreader, but missing the nntp.r. Can anybody provide me with this script? Thanks, Thorsten
[REBOL] Why if/else ?
Hi Rebols, Going through the list of additions to core. I was wondering why is there now an 'else refinement to 'if and what advantages this might have over using 'Either. I am so used to using 'either now I can't see my self changing, I prefer it. Was it something, people couldn't live without? I guess it could be handy to create on the fly code with, optionally adding the refinement etc. I'm interested to hear what others think? Cheers, Allen K
[REBOL] REBOL/Core 2.3 Released! Re:(3)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 28, 2000 10:57 PM Subject: [REBOL] REBOL/Core 2.3 Released! Re:(2) [EMAIL PROTECTED] wrote: Announcing the release of REBOL/Core 2.3! This new version of REBOL/Core includes many improvements only available in beta versions of our REBOL/View and REBOL/Command products, until now. This is great, thanks, and congrats to all the REBOL team... but g... I was going to use 'feedback' to report that FTP is still broken but it seems that 'feedback' itself now does not work. I get: feedback ** Script Error: feedback has no value. ** Where: feedback but there isn't any function called feedback, is there? You have to "do %feedback.r" imho Bizarely I seem to recall the function was added to one of the view beta versions. Anyway here is one that will always work providing you have net access working, you don't have to worry wether the script is on your system or not. Add this to your user.r feedback: does [do http://www.rebol.com/feedback.r] Cheers, Allen K and the FTP error that has appeared in all REBOLs since 2.2 is still there: read ftp://ftp.abooks.com/ connecting to: ftp.abooks.com ** User Error: Server error: tcp 425 Can't build data connection: Connection refused.. ** Where: read ftp://ftp.abooks.com/ This latter is a bit critical for us here to get working again. That's one for Sterling and Holger :-) But... overall... 2.3 seems nicely improved. Cheers, -pekr- --Ralph Roberts
[REBOL] Email standard definition ? Re:
Hi Jean, The place to look for internet protocols is the RFC's http://www.cis.ohio-state.edu/hypertext/information/rfc.html Standard for the format of ARPA internet text messages. http://www.cis.ohio-state.edu/htbin/rfc/rfc0822.html Mime messages part1 http://www.cis.ohio-state.edu/htbin/rfc/rfc2045.html Updates and extension proposals are always being added so use the search engine to find the most current version of the protocol you are after. http://www.cis.ohio-state.edu/Excite/AT-rfcsquery.html Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 28, 2000 11:55 PM Subject: [REBOL] Email standard definition ? Hi, does anyone know, where I can find the definition of the standard(s) used for email ? Is there a ISO or ASCII (or...) norm. I mean,html 4 has been defined by w3.org. Who did the define the standards for an email file ? Jean
[REBOL] [ANN] 2KB News Reader 0.1.1 Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 28, 2000 10:13 AM Subject: [REBOL] [ANN] 2KB News Reader 0.1.1 Oops. Fixed a slight UI bug. The script now asks for a newsgroup up front and sets parameters right away. -Ryan Hi Ryan, Pretty impressive. It's about time someone made some public use of NNTP.r. I found one problem, it either reports the wrong number of messages available or else it can't always find the next message. After 3 or so messages, if I press "n" for next message, I just get the instructions again for each time I press "n". Cheers, Allen K
[REBOL] different 'feel for styles derived from the same root(style)? Re:
You need to make a feel object for each one. Like so.. cel-styles: stylize [ cel-text text [ rate: 2 feel: make feel [ engage: func [face act event index][ ...some...process... ] ] ] cel-label label [ rate: 2 feel: make feel [ engage: func [face act event index][ ...some...process... ] ] ] ] Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 27, 2000 6:57 AM Subject: [REBOL] different 'feel for styles derived from the same root(style)? ; wanna define 2 text oriented styles, with different engage func, so write : cel-styles: stylize [ cel-text text [ rate: 2 feel/engage: func [face act event index][ ...some...process... ] ] cel-label label [ rate: 1 feel/engage: func [face act event index][ ...some...other...process... ] ] ] ; _END_ now the second feel/engage definition will overwrite the first. face with cel-text style will have feel/engage doing ...some...other...process... what could i do? -z __ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/
[REBOL] igpay atinlay Re:(4)
Hi Ralph, Pig-Latin purists LOL! Perhaps you should offer version of Rebol/Core for Dummies in pig-Latin to appease them ? Cheers, Allen K
[REBOL] How's this for frustration... or...NT/CGI/mail prob solved... Re:(3)
Acutally it is quite easy to understand, now that you have shown what else in your script. 'query is a function in Rebol (you redifine it in your code) and 'exists? uses the 'query function. (Use ? query and source exists? to see what I mean) So just change the word to something like this. query-object: make object! decode-cgi system/options/cgi/query-string To help prevent yourself from accidently redifining system words you could use 'protect-system Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, June 23, 2000 1:45 AM Subject: [REBOL] How's this for frustration... or...NT/CGI/mail prob solved... Re:(2) Now if someone could explain me how the following is possible : list-dir %/existing/path/ produces a correct directory listing. But with the same path, print exists? %/existing/path/ results in false. Note: the script does run with execution permission. I'm getting somewhere : query: make object! decode-cgi system/options/cgi/query-string when the line above is commented out, all file access problems disappear. This is not a solution, of course, because I need to fetch CGI parameters, but the problem comes from creating an object, or using it, I don't know yet... -- [EMAIL PROTECTED] http://perso.worldonline.fr/mutant
[REBOL] Optional Arguments Working? Re:(6)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 23, 2000 2:43 AM Subject: [REBOL] Optional Arguments Working? Re:(5) You must perform your test in a script file and 'do it to see the bug. The bug does not occur in a console session. Rodney It is not a bug, see Andrew's explanation from the bottom of the message. The safer way to have optional arguments is to use refinements. Cheers, Allen K Note that Rebol evaluates the arguements to a function before calling the function. In this case: f f f f f f halt the 'halt is evaluated just before evaluating the last (or first in reverse order) 'f function. 'halt has the side effect of stopping execution of Rebol, so the last 'f is not evaluated. I hope that helps! Andrew Martin
[REBOL] Status words Re:
The improved help in view can also display by type Try these ? native! ? function! ? char! Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 23, 2000 9:36 AM Subject: [REBOL] Status words Did not find any word in the dictionary to list all native words and user defined words, is there one? Forth has a word to list all the words in the dictionary. Logo has commands to list user defined words and variables. Would be nice if Rebol has something similar. -- Harry Parshall Jr. [EMAIL PROTECTED]
[REBOL] A view FAQ
Hi Rebols, I have gathered together some of the wisdom from the ally list into a FAQ for Rebol/view beta 4.1 Hope you find something useful in it. REBOL [] browse http://www.janita.com.au/rebolforces/reb/view-faq.html Cheers, Allen K
[REBOL] using tcp:// with an unknown port Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 19, 2000 6:55 PM Subject: [REBOL] using tcp:// with an unknown port I am not able to locate anything in regards to how to make Rebol open a port with no known number. For example, we have a known port: my-conn: open/lines tcp://:4321 So far, so good, but, how do we do this with an unknown port number? In C, we just call socket(), bind(), then listen() on our socket and the stack will have a port allocated in this process for us. Regards, Deryk Hi Deryk, Not sure if this is what you mean or not.. If no port-id is specified, an available port will be allocated (This example works in Rebol/View) my-conn: open tcp:// my-conn/port-id ==2664 my-conn2: open/lines tcp:// my-conn2/port-id == 2665 Cheers, Allen K
[REBOL] using tcp:// with an unknown port Re:(3)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 19, 2000 11:00 PM Subject: [REBOL] using tcp:// with an unknown port Re:(2) [EMAIL PROTECTED] wrote: Hi Deryk, Not sure if this is what you mean or not.. If no port-id is specified, an available port will be allocated (This example works in Rebol/View) my-conn: open tcp:// my-conn/port-id ==2664 my-conn2: open/lines tcp:// my-conn2/port-id == 2665 Allen, Yeah, that's exactly what I was hunting for. Perhaps this should be documented. :) http://www.rebol.com/howto.html#tcp.html It is in the "how-to", under "Opening an Listen Port" but I didn't see it mentioned in the other docs. Cheers, Allen K
[REBOL] Looking for an Australian REBOL programmer Re:(2)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 13, 2000 1:39 PM Subject: [REBOL] Looking for an Australian REBOL programmer Re: Been away for several weeks and just getting around to reading old mail. Did you find someone for your project? If not I may know someone who can help. Am switching to DSL by the 15th and will have a new e-mal address so for now contact me at [EMAIL PROTECTED] Ferman Blalock Yucaipa, CA Hi Ferman, I haven't heard from you for a while, anyway I did the project for David. Cheers, Allen K
[REBOL] pseudo-globals? Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 16, 2000 4:33 AM Subject: [REBOL] pseudo-globals? Hi Galt, Not sure whether this helps or not. But it might give you some ideas.. REBOL [] result: "This is global" somefunc: func [/local result][ result: "This is local" x result y system/words/result z ] x: func [result][print result] y: func [result][print result] z: func [][print result] somefunc This is local This is global This is global Cheers, Allen K
[REBOL] CGI Re:(3)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 15, 2000 3:45 AM Subject: [REBOL] CGI Re:(2) Howdy, Daniel: Thank you for your help, everyone. This is how far I've got until now : Apparently, file access is working normally only in the first cgi script launchedby Apache, all itschild processes (subsequent calls of scripts, whether they reside in cgi-bin or elsewhere) have problems to access the local file system. That's an odd one. We'll have a closer look at that one when we can (cgi with apache for windows, right?), but unfortunately don't have a decent answer for why you're seeing that behavior right now. Is having your cgi-bin script reading and writing files outside of cgi-bin what you want to accomplish? Perhaps you could have a separate rebol process running living in the directory that you want to write files in that talks through ports to the cgi-bin program. This background REBOL process could do the writing and reading of files on the cgi-bin script's behalf. -jeff Hey Jeff, This might be related to the do/args "string" bug I found, feedback #3246. Cheers, Allen K
[REBOL] /view and the Web Re:(6)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 14, 2000 8:20 AM Subject: [REBOL] /view and the Web Re:(5) No. I am thinking of the possibility of creating interactive Web pages using /view . view contains core so it works in cgi so you can do the usual server side stuff. But another method to explore if you don't want to do cgi, using browse/only function with local files dynamically created in view, but I think this is fairly limited in the interative stakes. You can set up a kiosk mode browser, add a refresh tag, and have /view doing things in the backgound. (works for IE other browsers may or may not still support it) browse/only "-k pathtofile.html" Like I said, this is limited, but I don't think anyone has fully explored the possibilities. Cheers, Allen K PS. I have been using /view long enough for a paradigm shift. I don't try and fit /view into the web, I now see the web as a live content plugin for my view pages..
[REBOL] /content-type and rebol/core (was %detach.r) Re:(2)
Hi Ryan, Actually it is a custom BeOS MIME content subtype that seems to be the problem. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 12, 2000 8:54 AM Subject: [REBOL] /content-type and rebol/core (was Re: %detach.r) OK. The newer version of %detach.r worked fine with the Windows NT/ Pegasus e-mail message. But it is having trouble with the BeOS R5 Pro/ BeMail e-mail message. Here are the /content-type and /content results of using 'probe to view email objects as REBOL sees them. As you can see, the "boundary=" statement as read by REBOL/core produces something different than what the e-mail header declares. Here is the /content-type as produced by 'probe Content-Type: "multipart/mixed; boundary=_--_BeOS.rmp.96" Rather than parse using the inbuilt parser. Could you post the header in plain text? Would need to see this to find out why the parser is getting it wrong. It may be that BeOS is not breaking the line length and that a mail gateway is being 'helpful' by trimming it --- From what I have seen in the message it seems to indicate that BeOs is using a custom defined multipart sub type. producing a nested form of multipart/mixed, which is not wrong, but I would be surprised if the parser did handle it. From the RFC--- multipart -- data consisting of multiple parts of independent data types. Four initial subtypes are defined, including the primary "mixed" subtype, "alternative" for representing the same data in multiple formats, "parallel" for parts intended to be viewed simultaneously, and "digest" for multipart entities in which each part is of type "message". - But if you look at the Boundary you will see that it is not a standard format but rather custom content type. That of multipart/x-bfile So it looks like you will have write some changes to detatch.r to handle this BeOs specific subtype. multipart/x-bfile. If you send the same message and content from both email clients, save the message as plain text and examine the contents and the differences you should be able to see what steps need to be added to handle this content subtype in detach.r. Cheers, Allen K Here is the actual beginning of the email /content as produced by 'probe Content: {This is a multi-part message in MIME format. --_--_BeOS.rmp.960760927_--_ Content-Type: multipart/x-bfile; ^-boundary="++BFile111399423249++" As you can see, the parsing routine within REBOL/core found the first line in /content which contains "--" and copies the line past the "--" and only up to the "6" and then quit, as follows... _--_BeOS.rmp.96 Any suggestions? Does REBOL/core for BeOS need to be fixed? Or is Be, Inc., not adhering to some e-mail message standard? -Ryan
[REBOL] solved (was detach-image: func (was: %detach.r ) ) Re:(7)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 13, 2000 9:13 AM Subject: [REBOL] solved (was detach-image: func (was: %detach.r ) ) Re:(6) This now works (with .jpg images, at least)... The reason for that is below.. parse/all email-contents [thru {base64^/^/} copy text to {==} (append image-code text)] = is only used for padding in Base64 There is no guarantee that == will be the terminator of base64 encoded data. To find the end you have to go to start of the boundary and trim the excess. parse/all email-contents [thru {base64^/^/} copy text to {--} (append image-code trim copy text)] It will work more reliably. "--" will begin a boundary and "-" cannot appear as a char inside base64. Cheers, Allen K
[REBOL] solved (was detach-image: func (was: %detach.r ) ) Re:(9)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 13, 2000 12:05 PM Subject: [REBOL] solved (was detach-image: func (was: %detach.r ) ) Re:(8) Hi Allen, Ryan Allen, good catch there. But there may also be a problem with finding the start of the base64. Looking at an e-mail in my pop mailbox: --=_NextPart_000_0025_01BFD481.83702DE0 Content-Type: image/jpeg; name="bay.jpg" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="bay.jpg" /9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy ... Won't the appearance of the Content-Disposition line cause the code to fail on this e-mail? Are the blank lines just before and after the base64 required by the MIME standard? Perhaps best to find "image/jpeg" and then find the blank line before the start of the base64 with "^-^-" ? Can we find the end of the base64 by looking for the blank line after? I suppose, we would like to get the image file name as well? Sorry for the stupid questions, but I don't know much about this. Cheers Larry You are right Larry, there will also be a problem with finding the start, after finding base64 should find "^/^/" before copying. There should be at least one empty line between a mime content header and its content. Something like this perhaps. (not tested). parse/all email-contents [thru {base64^/} to "^/^/" copy text to {--} (append image-code trim copy text)] Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 12, 2000 6:18 PM Subject: [REBOL] solved (was detach-image: func (was: %detach.r ) ) Re:(7) - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 13, 2000 9:13 AM Subject: [REBOL] solved (was detach-image: func (was: %detach.r ) ) Re:(6) This now works (with .jpg images, at least)... The reason for that is below.. parse/all email-contents [thru {base64^/^/} copy text to {==} (append image-code text)] = is only used for padding in Base64 There is no guarantee that == will be the terminator of base64 encoded data. To find the end you have to go to start of the boundary and trim the excess. parse/all email-contents [thru {base64^/^/} copy text to {--} (append image-code trim copy text)] It will work more reliably. "--" will begin a boundary and "-" cannot appear as a char inside base64. Cheers, Allen K
[REBOL] User defined events in /view ? Re:
Hi Brett, Here is a little VID style element you can use to perform a particular action onload. This will fire up after the screen shows. The 'action is whatever is in the [] just like normal vid stuff. gadget: stylize [ onload image [ size: 1x1 rate: 1 cue: none feel: make feel [ engage: func [face action event][ if action = 'time [ do face/action face/rate: 0 feel/engage: none show face ] ] ] ] ] main-face: layout [styles gadget size 440x220 at 0x0 onload [output/text: read http://www.rebol.com show output] at 20x20 output: area Button "Close" [quit] ] view main-face It can also be used to display a message, before and after the action like this. main-face: layout [styles gadget size 440x220 at 0x0 status: onload "Loading..." 120x24 [ output/text: read http://www.rebol.com show output status/text: "Loaded" show status ] at 20x20 output: area Button "Close" [quit] ] view main-face Hope this helps.. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 11, 2000 1:40 PM Subject: [REBOL] User defined events in /view ? Hi all, I've written a little Rebol app to learn on, which, on running, simply reads my pop email box and displays the from, subject and date fields in a list. Now, the window does not show until the network read is done. Because the network read is slow, the window does not appear straight away. In fact the Rebol icon does not appear on the task bar (Windows NT 4) until the window is created. In my Powerbuilder work, I strike the same problem when a user opens a window that must show the results of a database read. To the user this looks like the application is slow. What is normally done in Powerbuilder is to declare a post-open event for the window. Then in the code that runs at window-open, POST a message to the window's event queue. So that after the window opens and is painted (and anything else is done) the system comes to the post-open event which will then do the database call. The end result is that windows open almost instantaneously (so the user sees that it is working) and then the information fills down the page. I would like to achieve something similiar with my little learning rebol app. My guess is that the same technique could possibly be used, but I'm not sure. Or others may have a different technique. I've considered opening a "dummy" initial window that then calls the other stuff , but I used to do that stuff years ago in more primitive (user interface days) so I would like something a little more neat and elegant :) Brett.
[REBOL] %detach.r Re:(2)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 12, 2000 3:44 AM Subject: [REBOL] Re: %detach.r I would suggest you learn about MIME, it will give a better understanding. (It will help you recognise and fix poorly constructed mime messages too, like the one you presented) MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies http://www.cis.ohio-state.edu/htbin/rfc/rfc1521.html And this one is good reading for learning about other email headers. STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES http://www.cis.ohio-state.edu/htbin/rfc/rfc822.html Cheers, Allen K
[REBOL] User defined events in /view ? Re:(3)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 11, 2000 10:45 PM Subject: [REBOL] User defined events in /view ? Re:(2) Hi Brett, That's damn sneaky Allen. The rate setting working as a substitute for my POST event command very smart. Still, a 1x1 image... shades of HTML solutions :) Yes and no.. It is just an inherited style, image had all the other facets and feel, I wanted without having to write an entire face for it A lot of the VID components are inherited from others. Image is inherited by all these Progress, List, Anim, Frame, Box, Backdrop. Here is a rough layout VID styles indicating inheritence. FACE -SENSOR -IMAGE --Progress --List --Anim --Panel --Frame --Box --Backdrop -BUTTON --Check ---Radio --Arrow --Toggle --Rotary --Choice -TEXT --Label --Title ---Subtitle -FIELD --Area -SLIDER I wonder about few things though. When does the count down for rate start? Observasional guess work here, and it would be good to confirm. I believe it is triggered after the show is called on that face. Show is called inside the 'view function. The beauty of this is that layouts can be created before time and have their own individual load events, that won't trigger until they are shown. You can always add a counter with switch [ 'time [counter: counter + 1 if (counter 10) [rate: 0 engage: none do action] ; may have to change the order of these.. ] Will this change in a different Rebol version? Will the "user experience" be the same under different platforms? Do I really need the overhead (even if small) of an graphical element for what is really an event? Good questions, The overhead is minor, however to avoid adding it, the other way would be to insert an event to the top level events using insert-event. Which is not really a solution for the non technical VID user. My aim was to provide a simple reusable plugin solution to the problem from a VID point of view, though the technique can be used in any face. If you are using faces then you have absolute control, investigate the insert-event-func. I know we have a 'quit event, I wonder if there is a 'start event? Nevertheless. Thank you. It will do this job. Brett. Glad it helped.. I'm sure better ideas will come, it is the nature of progress.. Cheers, Allen K
[REBOL] rebol for dummies Re:
Yes I think it will be a great book, and it will certainly help as an introduction to Rebol. And will sit nicely on the bookshelf, slightly to the left of the Official Guide, both with curled pages from lots of use ;-) Congrats to Ralph for writing it. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 10, 2000 8:50 PM Subject: [REBOL] rebol for dummies Well, it looks like REBOL is finally going to hit the big time. There is going to be a "Dummies" book out in September. 8-) http://www.amazon.com/exec/obidos/ASIN/0764507451/o/qid=960652424/sr=8- 2/ref=aps_sr_b_1_2/103-6443163-7540649 -Ryan
[REBOL] http authorisation - how? Solution Re:(5)
Hi Anton, If you use the read [block] method that I had at the bottom, does that work for you? If not have a look at the trace, it maybe as Brian said that the server is using Digest. Cheers, Allen K (Look like Digest might be my first chance to write a protocol :-)
[REBOL] Method to encrypt scripts? Re:
Hi Steve, I wouldn't say these methods are encrypting, but if you just want to avoid sending plain text have a look at the following command pairs enbase debase compress decompress I recall there is an encrypt.r in the Rebol script libary or it might be at http://www.rebol.org Also at REBOL org there is a ROT-13 scrambler. (Just a note, since you are new here. We have many platforms and email clients using this list, so plain text email posting is prefered over HTML email here, so if you could adjust your email client it would be appreciated.) Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 10, 2000 10:42 AM Subject: [REBOL] Method to encrypt scripts? (Real) new to the game here, totally infatuated. Yes, I read the mention of script encrypting to be under Rebol/Command (coming to a theatre near you real soon) Is there any known method of "encrypting" scripts at this point, here and now? No matter how sloppy. Just not too obvious. TIA, Steve Man this product is incredible! I've never seen so much functionality stuffed in so little a bag. Throw the cross-platform capabilities and it's mind boggling. This puppy's going to be big, really big.
[REBOL] http authorisation - how? Re:(2)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 03, 2000 6:17 AM Subject: [REBOL] http authorisation - how? Re: [EMAIL PROTECTED] wrote: What I want to do is download a html page that requires authorisation. I tried inserting the user name and password in the same fashion as email downloading: read http://user:[EMAIL PROTECTED] but it gives "...server response: .. 401 Unauthorized." There are two kinds of http authorization, basic and digest. Basic sends a clear-text userid and password as part of the headers. Digest sends an MD5 message digest of the password - it is newer and more secure. At this point, REBOL only supports basic authentication. Apparently the server you're connecting to doesn't downgrade to basic authentication for security reasons. You may be out of luck, Anton :( Brian Hawley Yes I've struck this today to, on a server that is supposed to be using Basic Authentication. Does anyone have confirmation that the Basic Authentication is working? Cheers, Allen K
[REBOL] http authorisation - how? Solution Re:(3)
Anton, Brian I've found the problem. Does your password or user-id contain a space? Example from RFC2617 !--StartFragment--To receive authorization, the client sends the userid and password, separated by a single colon (":") character, within a base64 [7] encoded string in the credentials. basic-credentials = base64-user-pass base64-user-pass = base64 [4] encoding of user-pass, except not limited to 76 char/line user-pass = userid ":" password userid = *TEXT excluding ":" password= *TEXT Userids might be case sensitive. If the user agent wishes to send the userid "Aladdin" and password "open sesame", it would use the following header field: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== OK lets try this.. enbase join "Aladdin" [":" "open sesame"] == "QWxhZGRpbjpvcGVuIHNlc2FtZQ==" Cool that creates the correct one, but the problem we have is when we include the it as part of the URL. The space is URL encoded. (confirmed from reading a trace) http://Alladin:[EMAIL PROTECTED]/file So Rebol will send the wrong code.. enbase join "Aladdin" [":" "open%20sesame"] == "QWxhZGRpbjpvcGVuJTIwc2VzYW1l" And hence we get the dreaded 401 Not Authorised Error So if you have this problem then use the following method to access the page instead. print read [ scheme: 'http host: "fortytheives.com" user: "Alladin" pass: "open sesame" path: "path/to/file/" target: "file.ext" ] I'm sending in a feedback on this.. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 08, 2000 8:42 PM Subject: [REBOL] http authorisation - how? Re:(2) - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 03, 2000 6:17 AM Subject: [REBOL] http authorisation - how? Re: [EMAIL PROTECTED] wrote: What I want to do is download a html page that requires authorisation. I tried inserting the user name and password in the same fashion as email downloading: read http://user:[EMAIL PROTECTED] but it gives "...server response: .. 401 Unauthorized." There are two kinds of http authorization, basic and digest. Basic sends a clear-text userid and password as part of the headers. Digest sends an MD5 message digest of the password - it is newer and more secure. At this point, REBOL only supports basic authentication. Apparently the server you're connecting to doesn't downgrade to basic authentication for security reasons. You may be out of luck, Anton :( Brian Hawley Yes I've struck this today to, on a server that is supposed to be using Basic Authentication. Does anyone have confirmation that the Basic Authentication is working? Cheers, Allen K
[REBOL] /View transparent gif's color Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 08, 2000 6:05 AM Subject: [REBOL] /View transparent gif's color Hi, Rebolians How to make gif's transparent colour be transparent? -Pawel Hi Pawel, Use the 'key effect, the key color is the color that will become transparent. trans-image-face: make face [ image: load %image.gif size: image/size color: none effect: [key 192.192.192] ] You can also make colored transparent elements, without having an image. You just need to make sure that both image and color are set to none or -1 The other thing to remember is the the z order of a pane is determined by the order of the elements in a layout. First items are at the back, later are to the front. attached are two little demos. which show how to stylize and VID to achieve transparency. %smile.r uses the 'key effect Cheers, Allen K smile.r fish.r
[REBOL] files Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 09, 2000 4:12 AM Subject: [REBOL] files I have a question. how do you "unzip" the .rip files? do %filename.rip That will run the file which then extracts its contents... It is a beautiful concept, I love smart data Cheers, Allen K YOU'RE PAYING TOO MUCH FOR THE INTERNET! Juno now offers FREE Internet Access! Try it today - there's no risk! For your FREE software, visit: http://dl.www.juno.com/get/tagj.
[REBOL] viewer.r (One function per class) Re:
- Did anybody look at the /View viewer.r program I posted recently? Why does the text field freak out after pressing the jump button so that I have to switch the focus away and back before it wakes up again? Am I doing something wrong? - -galt Hi Galt, viewer.r I must have missed that one. But there are a few issues with 'Field and 'Area and focus in 4.1, I have sent some feedback on it. Could you send veiwer.r to me off list? and I'll see if its a related problem or something else I can spot. Cheers, Allen K.
[REBOL] HTML parsing Re:(2)
Hi Ingo, Very impressive! 1 more thing for your parser to handle, replacing nbsp; with " " Cheers, Allen K
[REBOL] Looking for an Australian REBOL programmer Re:(2)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, June 05, 2000 2:02 PM Subject: [REBOL] Looking for an Australian REBOL programmer Re: David Jacobs wrote: Any takers out there? Try approaching Allen K: [EMAIL PROTECTED] He's offline at the moment, but I'm fairly sure he's looking for work like this. I've CC him directly Andrew Martin ICQ: 26227169 http://members.xoom.com/AndrewMartin/ -- Thanks Andrew, Hi David, I'm interested, I've sent you an email direct. Cheers, Allen K
[REBOL] Strange error when I send e-mail Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 05, 2000 5:05 AM Subject: [REBOL] Strange error when I send e-mail Hi! I have a problem when I want to send an email. I use this code: prm: to-file load system/script/args if exists? prm [ dat: load prm ] ... subj: pick dat 6 ; the 6 line in the file is: [a 1st message] ... header: make system/standard/email compose [ ... subject: (reduce [subj]) ... ] It works sometime, except when the subj contain some words, like "1st". I mean if subject is [a test] works but when is [a 1st test] fail You have to ensure that it is a string. Which it should be if you have read it from a text file. "[a 1st test]" or "a 1st test". If it is not a string and you just set subject to a block [a 1st test] it will fail with something like this (because subject is turned into a string using 'form before sending) form [a 1st test] ** Syntax Error: Invalid integer -- 1st. ** Where: (line 1) [a 1st test] You must be doing something to the string that you didn't show in your example. Also, is there really a need to use reduce?, nothing in your example indicates you need it there. I would still like Rebol to be able to handle these, 1st 2nd 3rd 3m etc (without having to have them as strings, or at least make 'form handle their conversion) Cheers, Allen K
[REBOL] What about a REBOL newsgroup Re:
- Original Message - From: Felix [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 02, 2000 11:50 PM Subject: [REBOL] What about a REBOL newsgroup Hi! I'd appreciate the idea of a newsgroup instead of a mailing list. This has several advantages: * clearer threading * easier to search for previous articles * no hundreds of mails in the mailbox * determining whether or not to read postings at a glance I actually find email is much easier to search and archive than news groups, and there is no spam on the mailinglist! You just need an email client with good filters and search facilities. But if you want to avoid email clutter then you can use, this link to read the threads from this list. http://www.rebol.org/userlist/html/index.html I know it will happen one day, that a newsgroup starts up as volume gets large and a lot of people are posting, but currently we have a nice community here in the mailing list. I would imagine that a lot of key people would stay here and not even look at the newsgroups, as newgroups tend to have poor signal to noise ratio. The commitment of joining a mailing list seems to sort out a lot of chaff. What about comp.lang.rebol? Later there could be even comp.lang.rebol.misc comp.lang.rebol.core comp.lang.rebol.view comp.lang.rebol.command etc. There are currently mail lists for these too. I'm not against newsgroups, I just don't feel there is enough volume to justify one yet, versus the benefits we have here. just my 2c (and we don't even have them in our money anymore!) Allen K
[REBOL] Screening chars from strings Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 02, 2000 11:27 AM Subject: [REBOL] Screening chars from strings Hi: I want to write a function that tests a string for an exclusive set of characters: ex: found-unwanted: func [str[string!] allowed[string!]] [ ;test str to make sure that only characters in ; allowed are present, return true if not all ; characters in str match characters in allowed ] found-unwanted "abd" "abc" == true ; the first parameters contains a 'd' which is not allowable, ; because it is not found in the second parameter Given what I know now, I can do this in about 5 lines of rebol code. I bet someone out there can do it in 1!! Thanks folks! Tim Hi Tim, Rather than give you a direct answer I'll just point you at a few built in functions which are good for dealing with sets. (note some of them are in view but will be in the next core release). Many of these can provide a one line solution for your problem, (by testing the length of the resultant string). difference union unique exclude And one that isn't always so obvious (beware though trim is case sensitive, at least in the latest view version) trim/with Cheers, Allen K
[REBOL] Screening chars from strings Re:
Hi Tim, I forgot to add 'intersect to the list. I think this is the complete list now? intersect difference union unique exclude trim/with Cheers, Allen K
[REBOL] One function per class Re:(3)
Sorry, I meant fiddling as in playing or fooling around in REBOL. :-) Swaine in DDJ once mentioned that programmers have a high correlation with musicians. I wonder how much of a correlation there is with REBOL scripters and musicians there are on this list? Andrew Martin ICQ: 26227169 http://members.xoom.com/AndrewMartin/ Interesting Andrew. I organised parts of the National Campus Band Competition finals here in 1995, and have plenty of muso friends (one just signed an international deal with Warner). And I can't work without listening to music. So I think the theory holds true :-) Oh and because I come from Brisbane I do know someone who knows the guys from Savage Garden. (And you can find my name in the thank you credits of a number of albums by various Aus artists. Happy by Real Life for one.) Cheers, Allen K I can't play an instrument but I can blow my own horn sometimes...
[REBOL] How does Rebol earn it's stripes? Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 31, 2000 9:38 PM Subject: [REBOL] How does Rebol earn it's stripes? When I first read on Rebol's site that the distinction between code and data is blurred I cheered. I looked at the language constructs and thought that looks like some of my psuedo code. But then hmm...now what? I've been trying to figure out what Rebol's niche is(/are). Well for me the niche for Rebol is anywhere that has a hard drive and an internet connection. It is a really time saver, virtually any web or file task that needs automation. It is described as a messaging language. Between what and what? I can see how flexible it is. Less clear is the readability of the code I've seen. Readability of the code? That is a very subjective thing and depends on what other languages you are used to. One of the beauties to me of Rebol is that you can use white space where ever you want. (Anyone tried Clarion? If the line doesn't start in the correct column it complains!) But I find Rebol very easy to read and very English like. Like any code it can be complex or simple depending on the task. Rebol just makes more complex tasks simpler. I would really appreciate it if people could tell me what applications of Rebol they have made (or dreamt of) that clearly show Rebol (with it's announced features) as being a better choice than a general purpose language for those applications. I've written an email processor/server for message archiving. The whole thing barely takes up 20k and will work equally well when the client changes OS platforms. For the future, I see Rebol on pocket pcs, with numerous travelling salesman friendly apps. I see smart documents, that a client can run from a floppy, view a catalog and place orders. And when View is complete I see a nice cross platform spreadsheet app. Putting my crystal ball away now. Cheers, Allen K I've got so many scripts on my harddrive, that I've had to write another script to index them :-)
[REBOL] Buy the book... Re:(2)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 31, 2000 2:03 PM Subject: [REBOL] Buy the book... Re: [EMAIL PROTECTED] wrote: If I buy a copy of the book can I get an autographed copy? Tbrownell __ Do You Yahoo!? Send instant messages get email alerts with Yahoo! Messenger. http://im.yahoo.com/ While we're on the book thing. Bout that book...My order was placed on BUY.COM many moons ago. Today I got an e-mail from them saying my order was cancelled. Seemed unfair, but if BUY.com doesn't want me on their waiting list there's bound to be another retailer willing to make room for me. Imagine that, turning down future business. eom RIckp Let's all just send the money direct to Elan instead... So Elan what's your bank account number? Only kidding, Allen K
[REBOL] Mailing List Maintenance Re:(2)
Subject Line: Mailing List Maintenance Re:(2) Hi Tim, On Windows 2000 Rebol/core starts at around 2308k in memory. Minimising the window will drop it back down to 144k. Mem usage then climbs according to what you are doing. If you are reading files naturally it goes up etc . When the garbage collector steps in it takes it back down. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 26, 2000 1:18 PM Subject: [REBOL] Mailing List Maintenance Re: Hi: For a presentation: Does any have a ball-park figure for how much memory rebol/core uses? Comparisons of different OSs would be welcome. Thanks Tim
[REBOL] Simple CGI Problem Re:(4)
Have you tried using IFRAME ? It works, as long as the browser supports HTML4.0 HTML BODY IFRAME frameborder=0 SRC=http://www.worldmerchantltd.com/cgi-bin/counter.r /IFRAME /BODY /HTML Check out http://www.w3.org/TR/html4/present/frames.html#edef-IFRAME for more details on this tag. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 24, 2000 4:32 PM Subject: [REBOL] Simple CGI Problem Re:(3) Hello, [EMAIL PROTECTED] wrote: Ryan and Ralph, I still can't get it to work on my home page. My web host does support SSI; I'm not sure about PHP. I am using Drumbeat 2000, and am using the "Roll Your Own HTML" smart element to insert the code into the home page. [...] Please examine the source code of this home page ( http://www.worldmerchantltd.com ), and see how Drumbeat inserted the html. I suspect that the problem lies there. A good book on HTML would probably solve my problem; do you recommend one? I don't think that's a matter of HTML - it's a matter of the server used here. How about putting your counter and the HTML code of your homepage in one single .r file, and calling this as your homepage? That's the only other idea I can think of, if including doesn't work. Regards Christian
[REBOL] Changing a String to a file? Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 24, 2000 8:06 PM Subject: [REBOL] Changing a String to a file? You can use 'load to convert the string. load "%/path/file" == %/path/file type? load "%/path/file" == file! Cheers, Allen K Hello, How do I change a string such as file: "%/path/file" to type: file? file: %/path/file thanks in advance, Doug
[REBOL] Simple CGI Problem Re:(8)
Another solution is to return an image of the number rather than the text. There is a script on rebol.org that can create these number gifs on the fly. So adapt it to your counter needs. http://www.rebol.org/cgi/gif-number.html http://www.rebol.org/cgi/gif-number.r Then you can add the link to the script as a normal image tag. This would be the most cross browser friendly method. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 25, 2000 4:01 AM Subject: [REBOL] Simple CGI Problem Re:(7) You probably wont need it, but I now have source for that available on request. [EMAIL PROTECTED] wrote: I love the inline frame tag, but unfortuneately its not well supported yet. That makes it a bad counter since you would only count those browsers that support it. After viewing your counter I got an idea you might like. You can have your REBOL counter preprocess your web page--much like the way PHP or SSI does. Have it parse your web page looking for a special text like ~counter. Once this text is found it would replace it with the actual count. This way would let you use your favorite html editor to create and edit the page, and still have an easy to create program. You could also use tags like REBOL-counter, just 12345, or whatever sequence you feel appropriate. This could be useful for doing quotes of the day, random jokes, time and date, and all that other fun stuff. This would only add about 3 or 4 more lines to your existing counter script. Hint: use the replace function. You will also need to tell the webserver that your printing html by first printing "Content-type: text/html^(0A)^(0A)". Best of all, it would count everytime. --Ryan
[REBOL] Simple CGI Problem Re:(7)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 25, 2000 3:33 AM Subject: [REBOL] Simple CGI Problem Re:(6) I love the inline frame tag, but unfortuneately its not well supported yet. That makes it a bad counter since you would only count those browsers that support it. I know it is poorly supported, and that is a real shame/pain. It's in the HTML 4.0 4.1 standards. It is a great tag for returning results from multiple queries, by shifting the calling of the queries off the server and onto the client. Cheers, Allen K
[REBOL] Rebol Tutorial on TUCOWS Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 20, 2000 4:14 AM Subject: [REBOL] Rebol Tutorial on TUCOWS http://htmlstuff.tucows.com/programmer/reboltut/rbastut1.html Ah, so that is where the old docs went to? Looks like someone gave the old User Guide a make over. Allen K
[REBOL] getting web pages via script Re:
Hi Jason, ** Access Error: Cannot open /C/WINDOWS/Desktop/rebol031/club_details.sps?id=1. ** Where: write file read site/:file The reason why you are getting the error is because the file name you are trying to save it under contains illegal characters. The "?" is an illegal character in Windows (and some other platforms) filenames. You could use 'trim/with to remove the illegal chars. foreach file files [write trim/with copy file "?" read site/:file] Or you could use 'replace if you prefer, to subsitute another value foreach file files [write replace copy file "?" "$" read site/:file] Cheers Allen K (also in Brisbane, Australia) REBOL [ Title: "Download Multiple Pages" File: %webgetter.r Purpose: {Fetch several web pages and save them as local files.} ] site: http://www.agu.org.au/club_directory/ files: [ %club_details.sps?id=1 ] foreach file files [write to-file trim/with file "?" read site/:file] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 06, 2000 4:24 PM Subject: [REBOL] getting web pages via script ** Access Error: Cannot open /C/WINDOWS/Desktop/rebol031/club_details.sps?id=1. ** Where: write file read site/:file hi i hope you can help. i get the above message when i run the following script REBOL [ Title: "Download Multiple Pages" File: %webgetter.r Purpose: {Fetch several web pages and save them as local files.} ] site: http://www.agu.org.au/club_directory/ files: [ %club_details.sps?id=1 ] foreach file files [write file read site/:file] i need to get the first forty listings for work so instead of manually saving them all, i thought rebol would come to the rescue!! i thought i could just tell it to do id 1 then id 2 and so on so i'll need to whack a loop in their to somehow to count the first 40..anyway.. the script below works just fine, which is just the default of the same directory but when i ask it to get the first record which is id1 that's when the problem happens! if i cut and paste the url into a web page it works just fine, so i'm thinking that it my be a syntax error on my part... REBOL [ Title: "Download Multiple Pages" File: %webgetter.r Date: 20-May-1999 Purpose: {Fetch several web pages and save them as local files.} ] site: http://www.agu.org.au/club_directory/ files: [ %default.sps ] foreach file files [write file read site/:file] can you pls help ps - this is a great product ...where have you guys been hiding!! i initally came across it on BeOS and it has since saved me s much time - thanks :-) Jason Savidge IT Manager One Stop Entertainment Brisbane Australia www.onestopent.com.au
[REBOL] merging a folder of html files and striping them of certain strings... Re:
Hi Jason, This doesn't solve/answer all your questions, but it should get you on the way. The following code will parse through page with all the courses listed on it and pull out all the links to the subdirectory pages. Then the second part of the script, reads/saves these pages into the %/courses directory on your system, in the format of %courses/stlucia.htm %courses/californiacreek etc., the code also shows simple error handling using 'try [], which is needed as the bowen is a dead link This should give you a taster of how powerful the command parse is. If you read through the parse docs at http://www.rebol.com/users/parintro.html it should help you solve the rest of your requirements. REBOL [] site: http://www.teetime.com.au/club_pics/qld/ links: copy [] ; find the links on the page link-pattern: [some [skip thru {A HREF="} copy link to {"} (append links link)]] parse read site link-pattern ; save the files in the form of %courses/stlucia.htm if not exists? %courses/ [make-dir %courses/] foreach link links [ prin ["Grabbing" site/:link "..."] either error? try [ write rejoin [%courses/ copy/part link (length? link) - 1 ".htm"] read site/:link][ print ["Error"] print "OK" ] ] Cheers Allen K
[REBOL] For all those folks unsubsribing from the list Re:(2)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 27, 2000 8:25 PM Subject: [REBOL] For all those folks "unsubsribing" from the list Re: [EMAIL PROTECTED] wrote: and click "send". Big hint: Use copy and paste, so the spelling remains correct. OK? Then you'll be unsubscribed from the list. We should probably add to SELMA the ability to accept "unsubsribe" and ask the user a confirmation... Regards, Gabriele. People could also use the unsubscribe links that are on the same page that the subscribe links are on. At least those links were there the last time I looked. Cheers, Allen K
[REBOL] REBOL and e-commerce Re:(5)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 28, 2000 6:04 AM Subject: [REBOL] REBOL and e-commerce Re:(4) There is, of course, documentation available from the REBOL site. The documentation is great for someone who is already familiar with scripting. This documentation replaces previous docs which actually included a beginner's tutorial. I'm not sure why that was removed. Someone needs to document how to write REBOL. I am a newbie who is impressed by the user comments about its power, but at a loss to get started. Documentation does not seem to be REBOL's strong point! Hi Mark, All Rebol scripts are documentation, don't look for all your answers in manuals, spend time reading the example scripts, each one is a mini how-to document. If you have questions on a particular script, contact the author of the script, commonly you will find their email in the script header. Take advantage of this list, consider the members of this list as your tutor. Ask your questions here (after you have checked/read the www.rebol.com/faq.html), your answers will be far better than any manual could ever give. We don't bite, some of us do drool though ;-) Cheers, Allen K ICQ 456820 I would propose a tutorial web page for starters. The REBOL.com site is not very helpful from a newcomer's standpoint. I've read this list for some weeks but still need an overview tutorial. Mark Evans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 27, 2000 11:34 AM To: [EMAIL PROTECTED] Subject: [REBOL] REBOL and e-commerce Re:(2) Thanks, Chas, although that message was quick and had a few typos. Yes, I've considered writing a book on REBOL and may very well do so. I love the language, that's for sure. [snip]
[REBOL] Text to CW !!! Re:
Hi Jussi To shave off another couple of bytes, (the new line is 3 characters shorter) change... str: head insert str either odd? pos ["."]["-"] to this... str: head insert str pick ["." "-"] odd? pos Because 'pick also works with Logic values. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 28, 2000 1:09 PM Subject: [REBOL] Text to CW !!! Hi, I saw a perl script in USENET news that coded text to CW -alphabets, the author of script challenged others to do the same with a shorter program. I thought to do it in REBOL. Here it is, much shorter than the original perl -script, that was actually very badly written, but unfortunately a bit longer than the shortest (and very unreadable) perl script. This script is a bit broken (because I tried to take every byte off that I could). And almost unreadable. It is certainly not a good example how one should program in REBOL. I post it here just because there might be some interested in it. Here it comes (about 210 bytes :) REBOL[]foreach c system/script/args[s: copy{ }x: index? find{etianmsurwdkgohvfüläpjbxcyzqö*54*3***2***16***7***8*90}c until[s: head insert s either odd? x["."]["-"](x: to-integer x - 1 / 2) = 0]prin s] And a little more readable version: REBOL[] foreach char system/script/args [ str: copy " " pos: index? find "etianmsurwdkgohvfüläpjbxcyzqö*54*3***2***16***7***8*90" char until [ str: head insert str either odd? pos ["."]["-"] (pos: to-integer pos - 1 / 2) = 0 ] prin str ] It is supposed to be used from the commandline, but it is easy to alter do otherwise. I'll repeat this, if you want to use this code snippet in your program do yourself a favor and fix it, currently it is hmm... feature rich :) It does not like spaces in input and also unknown characters produce a crash. Have fun, Jussi -- Jussi Hagman CS in Åbo Akademi University Studentbyn 4 D 33[EMAIL PROTECTED] 20540 Åbo[EMAIL PROTECTED] Finland
[REBOL] Evaluating Rebol Data Types Re:
Hi Tim, With all types there is an evaluator for the type. It is the data-type's name with a "?" on the end. e.g block? ["one" "two" "three"] ==true block? http://www.rebol.com ==false url? http://www.rebol.com ==true Hope that helps. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 23, 2000 10:18 AM Subject: [REBOL] [REBOL] Evaluating Rebol Data Types Hello Again: I want to be able to internally evaluate rebol data types: the following code : my-blk: ["one" "two" "three"] print reform ["my-blk is a " type? my-blk] either equal? type? proj-args "block" [print "my-blk's type is block"] [print "my-blk's type is something else"] ; returns my-blk is a block my-blk's type is something else ; It appears that either equal? [type? proj-args] "block" ; evaluates as false. How may I rewrite this code so that it evaluates as true? Thanks in advance tim
[REBOL] Evaluating Rebol Data Types with a switch Re:
Hi Tim, If you want to use switch you could try something like this my-blk: ["one" "two" "three"] switch/default form type? my-blk [ "block" [print "block!"] "string" [print "string!"] ][print "not a string or a block"] Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 23, 2000 1:07 PM Subject: [REBOL] [REBOL] Evaluating Rebol Data Types with a switch Thanks Allen: the following is what I was looking for: my-blk: ["one" "two" "three"] either block? my-blk [print "yup"] [print "nope"] BUT: Now I have tried switch with no luck ; code I tried is below my-blk: ["one" "two" "three"] switch my-blk [ block? [print "block!"] string? [print "else!"] ] == none At 10:58 AM 4/23/00 +1000, you wrote: Hi Tim, With all types there is an evaluator for the type. It is the data-type's name with a "?" on the end. e.g block? ["one" "two" "three"] ==true block? http://www.rebol.com ==false url? http://www.rebol.com ==true Hope that helps. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 23, 2000 10:18 AM Subject: [REBOL] [REBOL] Evaluating Rebol Data Types Hello Again: I want to be able to internally evaluate rebol data types: the following code : my-blk: ["one" "two" "three"] print reform ["my-blk is a " type? my-blk] either equal? type? proj-args "block" [print "my-blk's type is block"] [print "my-blk's type is something else"] ; returns my-blk is a block my-blk's type is something else ; It appears that either equal? [type? proj-args] "block" ; evaluates as false. How may I rewrite this code so that it evaluates as true? Thanks in advance tim
[REBOL] Limit on data in CGI Post? Re:(4)
Also, decode-cgi is only for the GET request and not for POST. Yo uwill find that POST data has a more complex structure... almost like an email with attachments. You will have to deal with that data yourself. Jan wrote.. That's not right. The default encoding for POST is the same as for GET, i.e. application/x-www-form-urlencoded. Hi Jan Sterling is refering to the common use of POST for multiple mime types enctype="multipart/form-data" (used for file uploads), where as he says, it is much more like dealing with email attachments. Cheers, Allen K
[REBOL] online database manipulation Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 21, 2000 11:32 AM Subject: [REBOL] online database manipulation Hi REBOLers: Among many other REBOLian projects, I am putting my ref book, THE SANDERS PRICE GUIDE TO AUTOGRAPHS on line. It has over 80,000 prices. Until REBOL/command is available and I can use mySQL, I've got the info on the server as a tab-delimited text file. I read it into REBOL via this technique: Hi Ralph, Just a small tweak for you. If the length of 'a doesn't need to be looked up all the time in the loop, then assign it once. e.g a-length: length? a repeat count 10 [append b pick a (random a-length - 10)) Allen K a: read/lines %auto.db a: to-hash a b: [] random/seed now/time repeat count 10 [append b pick a (random ((length? a) - 10)) ] You can a test of this in action (getting 10 random lookups every time Refresh is hit) at http://abooks.com/cgi-bin/randauto.r. My question: can anyone suggest a more efficient way to doing this? Thanks, --Ralph Roberts REBmeister, ALEXANDER BOOKS
[REBOL] The new little REBOL. Re:(3)
Congratulations and best wishes join Bo Rosemary == "Tatiana" Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 20, 2000 10:31 AM Subject: [REBOL] The new little REBOL. Re:(2) At 12:14 PM 4/20/00 +1200, you wrote: Bo's new baby girl, our new little REBOL, has been named Tatiana, Tatiana Lechnowsky. Wouldn't that be a beautiful name for the heroine in a Tolstoy novel. Congratulations and best wishes to Bo, Tatiana and the wife/mother (who is?)! Tired!!! ;-) (Her name is Rosemary.) Andrew Martin ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --
[REBOL] Why can't I read this URL? Re:
Hi Ralph, Be careful what you use this for, sadly eBAY are starting to sue for commercial use of their data Auction Ruling could harm ecommerce http://www.zdnet.com/anchordesk/story/story_4698.html Bidder's Edge Case http://www.zdnet.com/zdnn/stories/news/0,4586,2550905,00.html Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 19, 2000 7:23 AM Subject: [REBOL] Why can't I read this URL? Trying to do a simple search on eBAY where: a: read/lines http://search-desc.ebay.com/search/search.dll?MfcISAPICommand=GetResultSort Property=MetaEndSortht=1query=%22Mike+Resnick%22srchdesc=y then I can parse out the info I want, but I get ** User Error: URL error in REBOL. What am I not seeing here? Other types of search URL's from eBAY work great for me. Thanks, --Ralph Roberts
[REBOL] Traversing object values Re:
Hi Tim, The function your are looking for is net-utils/export This will return all values in the object that have a value. result: net-utils/export system/options/cgi if you want a list of 'none as well use this modified version (I just commented out the value? test of the original net-utils/export) result: export2 system/options/cgi export2: func [ {Export an object to something that looks like a header} object [object!] "Object to export" /local words values result word ][ words: next first object values: next second object result: make string! (20 * length? words) foreach word words [ ; if found? first values [ insert tail result reduce [word ": " first values newline] ; ] values: next values ] result ] And here are some other ways to play with object words and values cgi-labels: ["Server Software" "Server Name"] cgi-label: next first system/options/cgi == [server-software server-name gateway-interface server-protocol server-port request-method path-info path-translated script-name ... values: next second system/options/cgi == [none none none none none none none none none none none none none none none none none []] Cheers Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 18, 2000 4:49 AM Subject: [REBOL] [REBOL] Traversing object values Given an object: let's use system/options/cgi I would like to traverse the object and print out the values only, each preceded by a custom label. I know that to use print mold system/options/cgi will dump the object. But I want to just extract the values and concatenate them with a customized label. So that instead of make object! [ server-software: none server-name: none gateway-interface: none server-protocol: none server-port: none request-method: none path-info: none path-translated: none script-name: none query-string: none remote-host: none remote-addr: none auth-type: none remote-user: none remote-ident: none Content-Type: none content-length: none other-headers: [] ] I will have: Server Software: none Server Name: none ; etc.. I believe that I will also need to code a block like cgi-labels: ["Server Software" "Server Name"] cgi-label: next first system/options/cgi == [server-software server-name gateway-interface server-protocol server-port request-method path-info path-translated script-name ... values: next second system/options/cgi == [none none none none none none none none none none none none none none none none none []] and iterate simultaneously through the object and the block. Will give a nice professional looking "dump" of the cgi environment, and will also edify me on the process of interating blocks and objects. Thanks in advance Tim
[REBOL] how can i... Re:
On some servers Rebol returns an empty string if there is nothing in the query-string, however on MS based server it returns 'none. So it is a good idea to test the query-string before decoding. Some people slip the following line in before decoding prso that it behaves the same across diferent servers. if none? system/options/cgi/query-string [system/options/cgi/query-string: copy ""] But there isn't much point in decoding an empty query-string anyway... There are some good cgi examples in the www.rebol.com Howto and in the User and Libary areas, as well as on www.rebol.org. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 18, 2000 1:37 AM Subject: [REBOL] how can i... hi! everybody... i'm really new in this stuff. i'm trying to make rebol work with html forms, an the thing is: ** Script Error: decode-cgi expected args argument of type: any-string. ** Where: cgi: make object! decode-cgi system/options/cgi/query-string i cannot go futher, from this error... if i ask the value for: system/options/cgi/query-string is equal to none (but i don't know what value i need) can somebody help me! thank in advance. -- -= usaps jeronimo =-
[REBOL] REBOL for DOS Re:(5)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 13, 2000 11:28 PM Subject: [REBOL] REBOL for DOS Re:(4) That's the reason I think DOS still fits my needs. What other "simple" OSes are left? Linux? Not all that easy. Upcoming Neutrino? Standalone Amiga/Elate? Maybe DOS is ugly OS, but it is lightweight and boots fast. Still not sure RT will reconsider REBOL DOS release though ... Have you tried BeOS? Powerful as Linux, GUI interface, et al. Take a test drive :-) www.be.com free.be.com Well, it was not my intention to miss BeOS, as in real - I am going to give it a try as I have some good references to it. Just waiting for new hw. However, it's still gui system, occupying some XX MBs on your hd. I had some "pocket" server appliances in mind :-) Doesn't BeOs Personal weigh in at about 500mb? Whew! John Hi John, Boes File download is about 40 mb. But Beos needs 500mb space to create a virtual partition (ie a 500 meg windows file that contains the beos file system). Rebol on Beos runs in the telnet app If we are talking space then Beos uses a lot compared to Dos. (There is also supposed to be an embedded Beos version available) The only thing that makes Beos comparable to DOS really is how fast it boots. Beos boots up and is ready to use in under 20 seconds on my system. That's pretty amazing for a gui system (though my emulated Amiga boots just as fast, after waiting 3+ minutes for windows ;) Cheers, Allen K
[REBOL] System object documentation Re:
Hi Tim, Best way to learn what is in the system object, is to use Bo's browse-system.r script from Rebol.org archives. http://www.rebol.org/utility/browse-system.r. Many of the entries in the system can also be accessed through mezzanine functions. e.g source what-dir what-dir: func [ "Prints the active directory path" ][system/script/path ] The note on not using source system is in the FAQ. http://www.rebol.com/faq.html From the FAQ " Q. I find that when I type SOURCE SYSTEM, SOURCE REBOL, or PRINT SYSTEM, the computer will lock up. Why? A. Viewing the system object should only be done with care. Future revisions of the system object are going to change, therefore, use the mezzanine level functions to access system object information when possible. With that said, here is an example of viewing the system object: print mold first system [self version product words options user script console ports network schemes error standard] print system/product Core WARNING: DO NOT enter 'print mold second system' or 'print mold system' since this will cause the interpreter to hang. " Cheers Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 10, 2000 8:36 AM Subject: [REBOL] [REBOL] System object documentation I can't seem to find documentation on the system object. Dictionary says: "For advanced discussion on system, see the Users Guide" But I find little or nothing on the subject. I also note that even Rebol/View locks up (on Windows NT) when I attempt print mold system or probe system. Where can I find complete documentation? thanks tim
[REBOL] Salvaging ASCII data from binary file Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 06, 2000 6:46 AM Subject: [REBOL] Salvaging ASCII data from binary file Hi, I have been given a messed up (beyond hope) database file of 5MB and would like to remove all the extended and unprintable characters, then save the result as a text file. The following displays the characters: good-chars: charset [#" " - #"/" #"0" - #"9" #"A" - #"Z" #"a" - #"z"] file: to-file ask "Filename? " data: read/binary file forall data [ if find good-chars first data [ print to-string copy/part data 1 ] ] but what is the best way to collect all of these and save as a plain ASCII text file, say, good.txt ? Thanks, Hi Peter, Assuming your above code works..You could try just replacing print with write/append. if find good-chars first data [ write/append %good.txt to-string copy/part data 1 ] Cheers, Allen K -- Peter H. Geddes; Savannah, Georgia USA mailto:[EMAIL PROTECTED] --
[REBOL] OT: Fw: Free BeOS is Now Available!
Hi All, Passing this on because, This version of Beos is now free and Rebol runs on it. Thanks to innovative new technology from Be, you can download BeOS 5 Personal Edition via a Web browser and store it as a file within Windows. No repartitioning is necessary, and launching BeOS 5 is as simple as double-clicking an icon on your desktop. Cheers, Allen K - Original Message - From: Be; Inc.; "Listmaster" [EMAIL PROTECTED] To: "Free BeOS announcement list" [EMAIL PROTECTED] Sent: Wednesday, March 29, 2000 1:19 AM Subject: Free BeOS is Now Available! BeOS 5 Information and Download You are receiving this email because you signed up at free.be.com to be notified when BeOS 5 Personal Edition was available for download. BeOS 5 Personal Edition is now available, free, for download at the mirror sites listed below. Check the BeOS Ready List for information on what hardware BeOS 5 supports: http://www.be.com/support/guides/beosreadylist_intel.html Find out what's new in BeOS 5 in the Latest Release Features: http://www.be.com/products/freebeos/latestrelease.html Thanks to innovative new technology from Be, you can download BeOS 5 Personal Edition via a Web browser and store it as a file within Windows. No repartitioning is necessary, and launching BeOS 5 is as simple as double-clicking an icon on your desktop. Before downloading and installing BeOS 5 Personal Edition, please read the Readme file for important information. http://www.be.com/products/freebeos/beos5readme.html Download BeOS 5 Personal Edition (40 MB) from any of the following locations: Name/Location URL - Americas - Ziff-Davishttp://www.zdnet.com U.S. (not available until after 3/28 12:00 noon EST) CNET/Download.com http://download.cnet.com California, U.S. (not available until after 3/28 12:00 noon EST) BeOSCentral ftp://www.beoscentral.com/pub Johnson City, TN BeForever ftp://www.beforever.com/pub/beforever/freebe Omaha, NE RoadRunner.Comftp://mirrors.rochester.rr.com/pub/be Rochester, NY Be, Inc. ftp://ftp.be.com/pub/beos San Jose, CA - Europe/Australia - AARNetftp://mirror.aarnet.edu.au/pub/beos Brisbane, Australia World Online ftp://ftp.worldonline.fr/pub/BeOs Paris, France PH-Freiburg ftp://ftp.ph-freiburg.de/pub/mirrors/ftp.be.com/beos Freiburg, Germany ComputerChannel http://www.computerchannel.de/download/beos Hamburg, Germany Neues-3Sat Online ftp://ftp.zdf.de/pub Mainz, Germany Univ. of Milanhttp://pcteor1.mi.infn.it/beos Milan, Italy (not available until after 3/28 12:00 noon EST) XS4Allftp://dl.xs4all.nl/pub/mirror/Beos Amsterdam, Netherlands Via-Net-Works ftp://ftp.esoterica.pt/pub/beos Lisbon, Portgual http://ftp.esoterica.pt/pub/beos SUNET ftp://ftp.sunet.se/pub/os/BeOS Uppsala, Sweden http://ftp.sunset.se/pub/os/BeOS/ Also, look for us at http://www.tucows.com within the next few days. Check http://free.be.com for any late changes. Happy downloading and welcome to the BeOS community! --- You are currently subscribed to free-beos as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
[REBOL] stocks2.r Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 21, 2000 8:51 AM Subject: [REBOL] stocks2.r stocks2.r I am a new user to Rebol and can get most easy scripts to run. However, when I run the stocks2.r script I get a size error for the sizes defined as sizexsize. How do I refine size to correct this error? Sorry if this question is not so good. Sorry I accidently sent stocks2.r to this list instead of the Rebol/view beta list. Stocks2.r will only run with Rebol/view not Rebol/core. Sorry for confusing you. Allen K
[REBOL] stocks2.r
As requested by Andrew.. I believe someone here mentioned that they had added gui editing of the stocks, to this script.. Could whoever that is please post it? Cheers, Allen K REBOL [ Title: "Simple Stock Monitor" Date: 3-Feb-2000 File: %stocks.r Purpose: { Shows how to iterate a set of faces that make up the rows of a table. Plus, it's a fun script. This one is faster and updates every 15 minutes. } ] update-rate: 0:15 ; minutes ;-- Put your favorite stocks here, with # shares, and your purchase price: stocks: [ ["Apple Computer" AAPL 100 $50 ] ["IBM Corp" IBM 100 $140 ] ["Yahoo" YHOO 200 $80 ] ["General Magic" GMGC 1000 $4.25 ] ["Amazon.com" AMZN 50 $75 ] ] record: [company symbol shares base price chg total] labels: ["Company" "Symbol" "Shares" "Base" "Price" "Change"] ;-- Fetch current stock prices: update-stocks: func [][ syms: copy "" foreach stock stocks [append syms trim/all reform [stock/2 "+"]] clear back tail syms data: read join http://finance.yahoo.com/d/quotes.csv?s= [syms "f=sl1d1t1c1ohgve=.csv"] stock-data: copy [] parse data [ some [ thru "," copy prc to "," 3 thru "," copy chg to "," thru newline ( rec: copy first stocks append rec to-money prc append rec to-money chg append/only stock-data rec stocks: next stocks ) ] ] stocks: head stocks ] ;-- Styles for the page: stylize [ entry main [ size: 200x24 body: [color: 80.40.20] font: [style: 'bold] edge: [effect: 'ibezel] ] right entry [font: [align: 'right]] ] ;-- Common field sizes: big-size: 160x24 mid-size: 100x24 sml-size: 70x24 ;-- Row as a face of fields: row-face: make face [ offset: 20x20 size: 640x24 body: edge: none pane: layout size [ origin 0x0 across space 0 row-company: entry big-size row-symbol: entry sml-size row-shares: right sml-size row-price: right sml-size row-change: right sml-size row-total: right mid-size ] ] ;-- Sets colors for the row: set-row-color: func [color][ foreach face row-face/pane [face/body/color: color] ] ;-- Iteration function for generating table: table-func: func [face index] [ index: index - 1 if index (length? stock-data) [return none] if zero? index [ set-row-color 0.0.0 set record labels ] if positive? index [ set record pick stock-data index set-row-color either price base [0.120.0][200.0.0] row-face/offset: row-face/offset + (row-face/size * 0x1) ] row-company/text: company row-symbol/text: symbol row-price/text: price row-change/text: chg row-shares/text: shares row-total/text: either positive? index [(price - base) * shares]["Profit"] return row-face ] ;-- The face that holds the iterated pane: table-face: make face [ offset: 0x70 size: 640x480 body: edge: none feel: make feel [over: none] pane: :table-func ] ;-- Main pane for window: main: make face [ span: size: 640x480 offset: 10x10 pane: layout 640x480 [ backtile (load carlwaves.jpg) 10.10.160 Title "Stock Portfolio" status: Text "Updating..." 500x24 at 500x30 button "Update Now" [update-display] ] ] ;-- Update stock display: update-display: func [] [ update-stocks row-face/offset: 20x20 last-time: now/time + 24:00 status/text: reform ["Updated on" now/date "at" now/time " Courtesy of Yahoo.com Updates every:" update-rate] show main ] ;-- Show it and wait for events: show main append main/pane table-face update-display event-port: open [scheme: 'event] forever [ time: now/time + 24:00 if (time - last-time) update-rate [update-display] wait event-port event: first event-port if event/type = 'quit [break] do event ] close event-port
[REBOL] Updated Replace
Hi All, Heres an updated version of 'replace from Bo, that fixes an issue with 'replace and tags. (where the correct length of the tag was not taken into account during a replace), that I sent in as a feedback issue. I have been testing it and seems to be working properly. If you find any problems please let [EMAIL PROTECTED] know. If there is no problem then this updated version should (hopefully) end up in the next core release. This updated 'replace also has a case refinement An example of the problem that was identified in the current rebol/core 'replace replace "This is a string with a tag in it" tag tag2 == "This is a string with a tag2g in it" or replace "This is a string with a tag in it" tag "" == "This is a string with a g in it" Cheers, Allen K REBOL [ Title: "Case-sensitive REPLACE function" Date: 14-Mar-2000 Author: "Bohdan Lechnowsky" Email: [EMAIL PROTECTED] File: %replace.r Purpose:{ Adds the ability to do a case-sensitive REPLACE in a string or a block. Also fixes IRNumber 941. } ] replace: func [ {Replaces the search value with the replace value within the target series.} target [series!] "Series that is being modified." search "Value to be replaced." replace "Value to replace with." /all "Replace all occurrences." /case "Case-sensitive replacement." /local save-target len ][ save-target: target if (any-string? target) and ((not any-string? :search) or (tag? :search)) [search: form :search] len: either any [any-string? target any-block? :search] [length? :search] [1] while [target: either case [find/case target :search][find target :search]] [ target: change/part target :replace len if not all [break] ] save-target ]
[REBOL] Shakespeare sonnets Re:
Hi, Rachid it's mine. If you have rebol/view beta there is a version that you can look at http://www.janita.com.au/rebolforces/reb/shakespeare.r There are a number of ways I would like to make it smarter or more correct, ie to generate the correct sequence of rhyming and non rhyming couplets. I will make these changes when I have time. I also have a cgi version (needs a little updating to work with Rebol 2.2). Any questions, re how it was done, and how the e-texts were parsed and analysed, and how RNILL ?learned? them, feel free to contact me directly. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 16, 2000 9:40 AM Subject: [REBOL] Shakespeare sonnets Hello, A while ago, someone, I believe it was Allen Kamp, or Ralph Roberts, posted a message about a script that could create Shakespearian sonnets. And I wanted to demonstrate that to one of my professors, because I believe that the script "learned" from existing e-text Shakespeare sonnets. Is that correct? And where can I find it? I believe it was based on Allen's RNILL as well, so if it's you, Allen, could you please point me in the right direction? Thank you, Rachid
[REBOL] getting Rebol OK Re:(4)
What with infinite loops? "rebol.exe" says Windows? my 95 can stop rebol's with the task-manager, but for instance old textpad can't do it (maybe textpads fault)? And all are named REBOL.. Could there be a timeout which triggers like escape? Volker Hi Volker, This is kind of off target here, but.. The method below would solve that problem in rebol/view. It ensures that processes don't keep running in the task manager after the window is closed for a rebol/view script that has an infinite loop. Hopefully the event scheme could be added to rebol/core too. or Perhaps some of the rebol/core gurus have similar solution for rebol/core? event-port: open [scheme: 'event] forever [ ; do stuff... ; do more stuff wait event-port ; since time events are always firing it won't have to wait long. event: first event-port if event/type = 'quit [break] do event ] close event-port ; end of script.. Cheers, Allen K
[REBOL] Associative Arrays in Rebol? Re:(3)
Attached is a script for collection object, I wrote it to get similar functionality to the collection dictionary objects in vb and vbscript. (With a bit of modifiction it may suit your associative array needs). Cheers, Allen K col make collection [] col/set-item "Apple" "Red" col/set-item "App" "Office" col/get-item "App" == "Office" col/get-item "Apple" == "Red" col/get-item 1 == "Red" col/get-item 2 == "Office" - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 10, 2000 10:05 PM Subject: [REBOL] Associative Arrays in Rebol? Re:(2) In article [EMAIL PROTECTED], you wrote: I think select and paths should come close to what you're asking: select [ a "this is a" b "this is b" ] 'a == "this is a" I'll have to ponder that for a while but my first thought is that doing it that way would make it difficult to populate it from a data file of arbitrary data. Here is a snipit from the Awk doc's that explains what I'm after. http://www.gnu.org/manual/gawk-3.0.3/html_chapter/gawk_12.html Arrays in awk superficially resemble arrays in other programming languages; but there are fundamental differences. In awk, you don't need to specify the size of an array before you start to use it. Additionally, any number or string in awk may be used as an array index, not just consecutive integers. In most other languages, you have to declare an array and specify how many elements or components it contains. In such languages, the declaration causes a contiguous block of memory to be allocated for that many elements. An index in the array usually must be a positive integer; for example, the index zero specifies the first element in the array, which is actually stored at the beginning of the block of memory. Index one specifies the second element, which is stored in memory right after the first element, and so on. It is impossible to add more elements to the array, because it has room for only as many elements as you declared. (Some languages allow arbitrary starting and ending indices, e.g., `15 .. 27', but the size of the array is still fixed when the array is declared.) A contiguous array of four elements might look like this, conceptually, if the element values are eight, "foo", "" and 30: Only the values are stored; the indices are implicit from the order of the values. Eight is the value at index zero, because eight appears in the position with zero elements before it. Arrays in awk are different: they are associative. This means that each array is a collection of pairs: an index, and its corresponding array element value: Element 4 Value 30 Element 2 Value "foo" Element 1 Value 8 Element 3 Value "" We have shown the pairs in jumbled order because their order is irrelevant. One advantage of associative arrays is that new pairs can be added at any time. For example, suppose we add to the above array a tenth element whose value is "number ten". The result is this... REBOL [ Title: "Collection Object" Author: "Allen Kamp" Date: 11-Sep-1999 Email: [EMAIL PROTECTED] Purpose: {To provide an object similar to the VB collection object.} Notes: {I should hide the values and attributes lists (or make read only). And add a method to return a paired block, for iteration, also add a clone method} Usage: { col: make collection [] col/set-item "Apple" "Green" col/set-item "Orange" "Orange" col/set-item "Grapes" "Purple" col/count == 3 col/get-item "Apple" == "Green" col/set-item "Apple" "Red" col/get-item "Apple" == "Red" col/exists "Apple" ;--Return the index or else false == 1 col/get-item 1 == "Red" col/remove-item "Apple" col/get-item "Apple" == none ;-- if you want to add to the beginning of the list col/set-item/pos "Apple" "Granny Smith" 1 ;-- to return the list of attributes or values col/attributes col/values } ] collection: make object! [ values: make block! [] 30 attributes: make hash! [] 30 ;---count count: func [][length? attributes] ;---exists exists: func [ attribute [any-string!] /local mark ][ either found? mark: find attributes attribute [return (index? mark)][return false] ] ;---Remove-all remove-all: func [][attributes: make hash! [] 30 values: make block! [] 30 exit] ;---remove-item remove-item: func [ key [any-string! integer!] /local index ][ either integer? key [
[REBOL] Weird stuff with time
Whilst testing to find the upper limits of time/hour (for an up-time monitoring script) I came across these anomalies in time! Can anyone explain what is happening here? How come some large numbers for hours give an error and others return bizare numbers? x: 2000:10:12 == 2000:10:12 x: 20:10:12 == 20:10:12 x: 200:10:12 ** Syntax Error: Invalid time -- 200:10:12. ** Where: (line 1) x: 200:10:12 x: 200:10:12 ** Syntax Error: Invalid time -- 200:10:12. ** Where: (line 1) x: 200:10:12 x: 2000:10:12 ** Syntax Error: Invalid time -- 2000:10:12. ** Where: (line 1) x: 2000:10:12 x: 2:10:12 ** Syntax Error: Invalid time -- 2:10:12. ** Where: (line 1) x: 2:10:12 x: 20:10:12 ** Syntax Error: Invalid time -- 20:10:12. ** Where: (line 1) x: 20:10:12 x: 200:10:12 == -231041:32:12 x: 2000:10:12 == 75676:02:44 x: 2:10:12 == -436287:32:44 x: 20:10:12 == 409308:53:56 Cheers, Allen K
[REBOL] Weird stuff with time Re:(2)
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 10, 2000 12:26 AM Subject: [REBOL] Weird stuff with time Re: We're all earthlings here :P Maybe someone past the orion nebula uses programs for intergalactic journeys. I heard the aliens who crashed in Roswel, NM had watches that registered billions of years. :P LOL! But imagine you are calculating man hours (work-time) for a ten year project involving a workforce of 10 000 or more. These hour numbers don't seem so rediculous, for project management apps. I expected time! to error when hour values were greater than integers, not give me predictions of how many hours before the world would end ;-) Its prediction of -231041:32:12 makes me think we've over lived our welcome on this planet... I better find my hitchhiker guide to the galaxy, I'm gonna need it. Buzz, click, buzz Allen K
[REBOL] newsgroups Re:
Hi, If your are using news:// protocol/dialect (described in the how-to http://www.rebol.com/howto.html#news.html) rather the built in nntp:// protocol (described in the manual http://www.rebol.com/users/netnntp.html) You need to do the %nntp.r file.. do %nntp.r Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 27, 2000 11:15 PM Subject: [REBOL] newsgroups WITH THE FOLLOWING SCRIPT... REBOL [] secure none print "security level set to none" nntp-host: news://news.uswest.net np: open nntp-host print "news host opened" write/append %BeAdvocacyMessages.txt insert np [headers-bodies from "comp.sys.be.advocacy"] print "messages retrieved" I GET THE FOLLOWING ERROR... ** Access Error: Invalid port spec: news://news.uswest.net. ** Where: np: open nntp-host print "news host opened" WHAT AM I DOING WRONG? THANKS.
[REBOL] protect-system ?? Re:
Hi Timmy, Check your version number (type rebol/version), if it is pre 2.2.0.xx then you need to upgrade. Protect-system is a v2.2.0.xx command. Type upgrade to get the latest version. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 26, 2000 3:15 PM Subject: [REBOL] protect-system ?? Hi I wrote protect-system in %user.r but I got an error saying it has no value. Here is what the guide said: If protect-system is set in the user .r file, then all words set within REBOL will be protected from modification because the user .r file is called by REBOL just after initializing itself. timmy
[REBOL] text in face Re:
Hi Gerry, rebol/view related topics should be sent to the [EMAIL PROTECTED] list, not here. cheers Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 24, 2000 10:35 PM Subject: [REBOL] text in face Hello,every one, In beta view,I found: In CID layout text is easier than "make face",for example: layout 640x480 [ at 200x200 text "hello" 10x100 ] location of text can be defined using word 'at but : make face [ size: 120x120 text: "hello" font: make font [ size: 10x10 valign: 'center ;a few words not apply to me,'at not works here offset: 100x100 ;? another meaning rather than 'offset in others ] ] how to locate text in face? especially in big face,I think this is important in some cases. BTW, should all facets in face such 'text be designed as object! which could be customed in programming just like [feel font body]? of course,'font should be sub-object of text. maybe i'm missing something. ---gerry
[REBOL] select question Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 24, 2000 6:36 AM Subject: [REBOL] select question I have a series with multiple identical entries, but different values: [ "book" "The Hobbit" "book" "The Stand" "candy" "Mars Bar" "candy" "MM" ] I want to search the series for each occurrence of say "book" and then evaluate it for a match. How can I do this? Or, is select perhaps not the right hammer to beat this puzzle with? Brad Emerson Hi Brad, A couple of ideas... db: [ "book" "The Hobbit" "book" "The Stand" "candy" "Mars Bar" "candy" "MM" ] foreach [category item] db [ if category = "book" [print item] ] Or you could look at rearanging the way you store your data, so that items are stored under their categories. db: [ book ["The Hobbit" "The Stand"] candy ["Mars Bar" "MM"] ] foreach item db/book [print item] foreach item db/candy [print item] or category: 'book foreach item db/:category [print item] Cheers Allen K
[REBOL] Parse questions ?? Re:
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 19, 2000 11:15 AM Subject: [REBOL] Parse questions ?? Hello All, I have a file consisting of lines in the following format: "23123+34234+234234-23423+3-" ie, n digits followed by a sign etc etc. The only way i've been able to extract the data into a series is to do two replaces, replacing "+" by "+ " and "-" by "- " and then parsing it using the space as a delimiter. I can't use the sign as a delimiter because that only returns the value and not the sign. My first question is, should parse allow the delimited character to be optionally returned by way of a refinement?? In this case the sign is a delimiter but also an integral part of the data. Hi Mike, You are using parse in its simplist form, as just a split function, whenever you need more from it, you can create your own parse rules. See attached script, and the 'parse topics in the docs The other problem i had was once i had the data in the form "123+", i wasn't able to convert it to decimal, because the sign was at the end and not the beginning, so i had to write code to move it. Do people think that decimal and integer should be modified to allow for a optional sign at the end?? I admit I don't see this form very often, so I would not see any need for it to be built in, but others may. It only takes one or two lines to convert this format to an integer, it doesn't take much to make your own converter. (see attached script) Cheers, Allen K REBOL [] to-integer-block: func [ {Converts data "23123+34234+234234-A23423+3-" into a block of signed integers Skips/ignores illegal chars} string [string!] /local item list signs numeric rule convert ][ ;--- convertor convert: func [ {Converts end signed strings "4567-" to integer -4567} string [string!] /local number sign ][ set [number sign] reduce [(copy/part string (length? string) - 1) last string] to-integer join sign number ] item: copy "" list: copy [] signs: to-bitset [#"-" #"+"] numeric: to-bitset [#"0" - #"9"] rule: [some [[copy item [some numeric signs] (append list convert item)] | [none skip]]] parse string rule return list ] to-integer-block "23123+34234+234234- ABCDE- 23423+3-" == [23123 34234 -234234 23423 -3]
[REBOL] HELP!! Inserting text problems Re:(3)
Hi, Here is a different approach, using Replace. Not as efficient, but simple to use. marker: copy "Insert Here" new-text: copy "Insert This" replace/all page marker new-text or if you need to preserve the marker text marker: copy "Insert Here" new-text: copy "Insert This" replace/all page marker join marker new-text Cheers Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 12, 2000 2:48 AM Subject: [REBOL] [REBOL]HELP!! Inserting text problems Re:(2) Hi Ladislav: That did it!! I hope you don't mind, but later I will send you a break-down of the entire project. At the finish it may a good one to post or archive at rebol site, or you might want to use it. thanks as always tim At 07:40 PM 2/9/00 +0100, you wrote: Hi, Tim, I see three issues in your code. The first one: if you want to insert something you can try: foreach txt insert_txt [ fp: insert fp txt ] Ladislav I am attempting to insert text into a file: I have a series of strings defined thus: insert_txt: ["first new line" "second new line" "third new line"] ;; at some point in the file, I attempt to insert ;; the strings with the following code: foreach txt insert_txt [ ;insert first fp newline insert first fp txt ] with "insert first fp newline" commented out the elements are inserted in REVERSE order. Why is this happening? What am I doing wrong? with "insert first fp newline" enabled, nothing at all is inserted. Why is this? if I use the code: insert first fp "**", "**" is inserted. I would greatly appreciate anyone's help here! Thanks Tim
[REBOL] How can i get rebol/view Re:
Hi Gruss, It is currently in a limited beta at the moment, the broader beta distribution has been hinted at for next week. Just keep checking the Rebol site..it is worth the wait.. Cheers, Allen K - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 10, 2000 5:28 PM Subject: [REBOL] How can i get rebol/view Can't find it on the webpage. Peoples here are talking about. how can i test it? Gruss Volker