[REBOL] Re: Commander.c adds Shell access for Rebol
Frank, commander looks the "business". I've compiled and got it running on my Linux box. I have a small question, how can I capture the output in REBOL of the command I call? eg Rebol> call "psql -d dbname -c 'select * from tablename'" This returns all the rows from tablename on STDOUT (?) but I don't see how I can assign then to a REBOL word. I would like to be able to do Rebol> results: call "psql -d dbname -c 'select * from tablename'" I will continue to investigate 'commander' Regards colinb -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Frank Sievertsen Sent: Tuesday, March 20, 2001 5:49 PM To: [EMAIL PROTECTED] Subject: [REBOL] Commander.c adds Shell access for Rebol Hi! Until RT adds a launch support for /Core and /View you can try my commander.c program. It starts the rebol-Interpreter and adds a (very simple) 'call function to it. You can now type call "kedit commander.c" to open kedit with the source-code ;) How it works: commander startes REBOL faking a console stream to it. It reads REBOLs output to find character 0 (ZERO)s in it. Commands are marked ^@command^@ They are executed (in background). So DON'T OUTPUT CHARACTER ZERO WHEN YOU USE COMMANDER at the moment. Planned is to add full support of call like in /command and to replace system/ports/output by a port which escapes character zero so commander will be absolute transpartent. Oh, use at your own risk and read the sourcecode: http://proton.cl-ki.uni-osnabrueck.de/REBOL/commander.c CU, Frank -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: [UPDATE] web.log data mining
>> Below is an updated version of the CLF format web.log >> file data mining >> script, which parses CLF format web.log files and places >> the data in .csv >> files for use in Excel and other applications. The script >> now calls >> functions instead of being simply linear. >Have you thought about saving the dns-cache between >iterations, and loading it each time? >I was going to do that for mine, but never got around to it. Yes, the first time the script runs, it loads a 0-byte cache file called %dns-library.r, as such... retrieved-library: read %dns-library.r dns-library: parse retrieved-library none It then uses the following function for the DNS lookups... dns-lookup: func [ "Convert an IP address to a domain name" dns-cache "A cache of IP addresses and corresponding domain names" IP [string!] "The IP address that needs to be converted to a domain" /local domain ][ domain: select dns-cache IP if ( domain == none ) [ domain: read join dns:// IP if ( domain == none ) [ domain: "unresolved" ] append/only dns-cache IP append/only dns-cache domain ] domain ] At the end of the script, it saves the dns cache back to the %dns-library.r file, as such... write %dns-library.r "" foreach library-entry dns-library [ write/append %dns-library.r library-entry write/append %dns-library.r " " ] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: [UPDATE] web.log data mining
On Tue, 20 Mar 2001 09:56:45 -0600 [EMAIL PROTECTED] wrote: > Below is an updated version of the CLF format web.log > file data mining > script, which parses CLF format web.log files and places > the data in .csv > files for use in Excel and other applications. The script > now calls > functions instead of being simply linear. Have you thought about saving the dns-cache between iterations, and loading it each time? I was going to do that for mine, but never got around to it. -- Graham Chiu -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Alien Names expanded
On Tue, 20 Mar 2001 13:22:19 -0500 "Ralph Roberts" <[EMAIL PROTECTED]> wrote: > How powerful is REBOL? Well, I'm still using REBOL/Core > to generate > literally hundreds of trillions of alien names. Just > added another pattern > (and another 2,197,000 possible alien names) to > my alien name generator at: But will it write more books for you ? -- Graham Chiu -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Alien Names expanded
Got source code to generate Alien Names? Geo... a curious guy as always Ralph Roberts wrote: > > How powerful is REBOL? Well, I'm still using REBOL/Core to generate > literally hundreds of trillions of alien names. Just added another pattern > (and another 2,197,000 possible alien names) to > my alien name generator at: > > http://abooks.com/alien > > This pattern (Vcv Cvc) generates short, snappy dual names for aliens, such > as: > > Ude Phap, Ugu Zeh, Ole Wat, Uthu Shal, Ipho Ren, Iphi Phush, Ote Mas, > Ela Wux, and so forth. > > Hey, wot about Inu Thit, an alien who's always into new well, write yer > own story. > > Enjoy... REBOL, the possibilities are as wide as the universe! > > And, hey, wanna learn all sorts of neat REBOL tricks, buy my book REBOL FOR > DUMMIES at: > > http://www.rebolpress.com/#RFD > > Best, > > --Ralph Roberts > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] REBOL for Dummies pg. 373
Ralph- Is the "Remember" tip on page 373 worded correctly under the heading on the previous page of Configuring for Microsoft IIS. "The two %s %s must be added to make sure that it works correctly when passing the script and command line arguments to REBOL. You must add the extension, or REBOL files and sets the last field to PUT, DELETE. The script engine doesn't have to be selected." Ryan C. Christiansen Web Developer Intellisol International 4733 Amber Valley Parkway Fargo, ND 58104 701-235-3390 ext. 6671 FAX: 701-235-9940 http://www.intellisol.com Global Leader in People Performance Software _ Confidentiality Notice This message may contain privileged and confidential information. If you think, for any reason, that this message may have been addressed to you in error, you must not disseminate, copy or take any action in reliance on it, and we would ask you to notify us immediately by return email to [EMAIL PROTECTED] -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Alien Names expanded
How powerful is REBOL? Well, I'm still using REBOL/Core to generate literally hundreds of trillions of alien names. Just added another pattern (and another 2,197,000 possible alien names) to my alien name generator at: http://abooks.com/alien This pattern (Vcv Cvc) generates short, snappy dual names for aliens, such as: Ude Phap, Ugu Zeh, Ole Wat, Uthu Shal, Ipho Ren, Iphi Phush, Ote Mas, Ela Wux, and so forth. Hey, wot about Inu Thit, an alien who's always into new well, write yer own story. Enjoy... REBOL, the possibilities are as wide as the universe! And, hey, wanna learn all sorts of neat REBOL tricks, buy my book REBOL FOR DUMMIES at: http://www.rebolpress.com/#RFD Best, --Ralph Roberts -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Commander.c adds Shell access for Rebol
Hi! Until RT adds a launch support for /Core and /View you can try my commander.c program. It starts the rebol-Interpreter and adds a (very simple) 'call function to it. You can now type call "kedit commander.c" to open kedit with the source-code ;) How it works: commander startes REBOL faking a console stream to it. It reads REBOLs output to find character 0 (ZERO)s in it. Commands are marked ^@command^@ They are executed (in background). So DON'T OUTPUT CHARACTER ZERO WHEN YOU USE COMMANDER at the moment. Planned is to add full support of call like in /command and to replace system/ports/output by a port which escapes character zero so commander will be absolute transpartent. Oh, use at your own risk and read the sourcecode: http://proton.cl-ki.uni-osnabrueck.de/REBOL/commander.c CU, Frank -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] [UPDATE] web.log data mining
Below is an updated version of the CLF format web.log file data mining script, which parses CLF format web.log files and places the data in .csv files for use in Excel and other applications. The script now calls functions instead of being simply linear. Usage: You must begin with a 0-byte %dns-library.r file in the same directory as the script. Change username, password, domain.dom and path to web.log file in ftp protocol statement. The script will write separate .csv files in the same directory as the script, each .csv file named for the date of the data for which it contains. If you run the script a second day, it will append to a .csv file for a given date if that .csv file exists in the directory. The script is designed to mine a web.log file which has been rotated to a 0-byte log file on a daily basis. REBOL [] log-file: read/lines ftp://username:[EMAIL PROTECTED]/logs/web.log retrieved-library: read %dns-library.r dns-library: parse retrieved-library none assemble-date: func [ "Parse one line in CLF web.log format and return the date as a REBOL date! datatype" log-line [string!] "One line in CLF web.log format" /local date-line date-string return-date ][ date-line: parse log-line none date-line/4: remove date-line/4 {[} date-line/5: remove date-line/5 {]} date-string: rejoin [date-line/4 " " date-line/5] return-date: make date! date-string ] assemble-time: func [ "Parse one line in CLF web.log format and return the time as a REBOL time! datatype" log-line [string!] "One line in CLF web.log format" /local date-line date-string return-time ][ date-line: parse log-line none date-line/4: remove date-line/4 {[} date-line/5: remove date-line/5 {]} date-string: rejoin [date-line/4 " " date-line/5] parse date-string [thru ":" copy text to end (return-time: make time! text)] return-time ] dns-lookup: func [ "Convert an IP address to a domain name" dns-cache "A cache of IP addresses and corresponding domain names" IP [string!] "The IP address that needs to be converted to a domain" /local domain ][ domain: select dns-cache IP if ( domain == none ) [ domain: read join dns:// IP if ( domain == none ) [ domain: "unresolved" ] append/only dns-cache IP append/only dns-cache domain ] domain ] parse-log-line: func [ "Parse one line in CLF web.log format and return the IP address, hit date, hit time, file hit, bytes used, referring page, and browser type" log-line [string!] "One line in CLF web.log format" file-to-save [file!] "The name of the target file to write returned variables" /local current-line ][ current-line: parse log-line none IP-address: make string! current-line/1 domain-address: dns-lookup dns-library IP-address hit-date: assemble-date log-line hit-time: assemble-time log-line hit-file: current-line/6 hit-bytes: current-line/8 referring-page: current-line/9 browser-type: current-line/10 write/append csv-file-name (rejoin [IP-address "," domain-address "," hit-date "," hit-time "," hit-file "," hit-bytes "," referring-page "," browser-type newline]) ] checksum-date: assemble-date log-file/1 csv-file-name: make file! (rejoin [checksum-date ".csv"]) log-directory: read %. either find/any log-directory csv-file-name [ foreach log-line log-file [ current-line: parse log-line none hit-date: assemble-date log-line either not-equal? hit-date checksum-date [ csv-file-name: make file! (rejoin [hit-date ".csv"]) write csv-file-name {User IP Address, User Domain Address, Date Hit, Time Hit, File Hit, Bytes Transferred, Referring Page, Browser Type} write/append csv-file-name (newline newline) if error? try [parse-log-line log-line csv-file-name][next log-file] checksum-date: hit-date ][ if error? try [parse-log-line log-line csv-file-name][next log-file] next log-file ] ] ][ write csv-file-name {User IP Address, User Domain Address, Date Hit, Time Hit, File Hit, Bytes Transferred, Referring Page, Browser Type} write/append csv-file-name (newline newline) foreach log-line log-file [ current-line: parse log-line none hit-date: assemble-date log-line either not-equal? hit-date checksum-date [ csv-file-name: make file! (rejoin [hit-date ".csv"]) write csv-file-name {User IP Address, User Domain Address, Date Hit, Time Hit, File Hit, Bytes Transferred, Referring Page, Browser Type} write/append csv-file-name (newline newline) if error? try [parse-log-line log-line csv-file-name][next log-file] checksum-date: hit-date ][ if error? try [parse-log-line log-line csv-file-name][next log-file] next log-file ] ] ] write %dns-library.r "
[REBOL] Re: Shell access for Rebol, was: zip file support
Me too :-) I'll give an example why I want shell access in Core. I could write a rather cool programmer's tool in REBOL. The script could: checkout a project from CVS server, run make (which runs C++ compiler and linker), run unit tests, send log via email, pack distribution files with zip, tar and gzip, upload it to a web site, send all subscribers notification email, all from REBOL in one step. Writing such application in REBOL with shell access would take several hours. And it would be even portable between Windows, Linux, and, for example, Solaris, because all used tools are already ported and behave identically on different platforms. I know that sending email with SMTP protocol is more portable than calling /usr/bin/sendmail, and 'parse is more portable than calling awk. But the application I described cannot be written portably in REBOL without shell access, because REBOL does not contain CVS client, make functionality, C++ compiler and linker, tar, zip and gzip. -- Michal Kracik GS Jones wrote: > > From: Mat Bettinson > > Yet > > I'd have a hard time evangelising it as it currently stands. > > > > Which is a shame. I like to evangelise things like Rebol because > > they're speechlessly cool. But this is a holding it back for much > > useful applications and a wider acceptance imo. > > Also expresses my thoughts exactly (I didn't see the change in thread names > before I rambled on elsewhere). --Scott Jones > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Shell access for Rebol, was: zip file support
Me, too. :) I'd like shell access in /Core to be able to use the BeOS file system's attributes as a data storage facility. It's not a true relational database, but it can store ANY type of file in attributes, meaning images, sounds, etc., perfect for serving dynamic web pages. This is being done with perl at http://www.betips.net -Ryan -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: Antwort: Small Admin Interface
Hi, thanks for the input. The user is saved directly under "Add User", and in the List users part, the save is if you want to edit your info. Btw, the code is bloated, and could probably be improved greatly, but at least it's a start. Cheers Stefan > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: den 20 mars 2001 13:22 > To: [EMAIL PROTECTED] > Subject: [REBOL] Antwort: Small Admin Interface > > > > Hi! > > When listing added users, one is presented with two buttons, > "save" and > "Remove" . I thought that a user is saved directly when > filling out the > form under "sdd user"?. I think "delete user" should als have its own > menupoint just like add user. Cool :-) > > Cheers > > Sharriff Aina > > > > > > "Falk Stefan, > > ITS-SL" An: > "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > > slg.se> Thema: [REBOL] > Small Admin Interface > Gesendet von: > > rebol-bounce@ > > rebol.com > > > > > > 20.03.01 > > 11:40 > > Bitte > > antworten an > > rebol-list > > > > > > > > > > Hi list, > I kinda wonder why I'm writing this mail but anyways. > > I've created an admin interface for my website (although it's > not quite > finished, since the entire site isn't done), but there's a > small Forum > sorta thing and some user handling. > > The forum doesn't seem to work, but I think it's got > something to do with > the server, anyways, take a look if you want, and feel free > to come with > suggestions, criticism, whatever. You'll find it at: > > www.amigaextreme.com/admin.html > > /Regards Stefan Falk > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > > > > > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: mysql scheme port
Petr Krenzelok wrote: > No, it is not. You have basically two ways of how to work with mySQL (or > even other SQL databases) in general - 1) direct access - it would require > Rebol to have mySQL "driver" inside, but it is not the case even with Linux > Command. You could also use Command's ability to call libraries ... 2) some > of SQL database servers listen on TCP port, which is the case with mySQL > too. Actually, MySQL always uses TCP/IP. There is no "direct" access (if not maybe using Unix sockets, but this is not the case for Windows and I didn't check if MySQL actually supports them; anyway, they would be accessible by REBOL too). Regards, Gabriele. -- Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/ -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Antwort: Small Admin Interface
Hi! When listing added users, one is presented with two buttons, "save" and "Remove" . I thought that a user is saved directly when filling out the form under "sdd user"?. I think "delete user" should als have its own menupoint just like add user. Cool :-) Cheers Sharriff Aina "Falk Stefan, ITS-SL" An: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> Thema: [REBOL] Small Admin Interface Gesendet von: rebol-bounce@ rebol.com 20.03.01 11:40 Bitte antworten an rebol-list Hi list, I kinda wonder why I'm writing this mail but anyways. I've created an admin interface for my website (although it's not quite finished, since the entire site isn't done), but there's a small Forum sorta thing and some user handling. The forum doesn't seem to work, but I think it's got something to do with the server, anyways, take a look if you want, and feel free to come with suggestions, criticism, whatever. You'll find it at: www.amigaextreme.com/admin.html /Regards Stefan Falk -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Antwort: Small Admin Interface
I think its nice!! good work Sharriff Aina -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Small Admin Interface
Hi list, I kinda wonder why I'm writing this mail but anyways. I've created an admin interface for my website (although it's not quite finished, since the entire site isn't done), but there's a small Forum sorta thing and some user handling. The forum doesn't seem to work, but I think it's got something to do with the server, anyways, take a look if you want, and feel free to come with suggestions, criticism, whatever. You'll find it at: www.amigaextreme.com/admin.html /Regards Stefan Falk -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: mysql access denied for user
> > So does that mean the mysql:// protocol will only work using scripts > executed on the server where the database resides? > With default MySQL privileges, yes. It's not specific to mysql:// protocol, it's the same with PHP, Perl, ODBC driver or any other client. But MySQL administrator can grant access to specific or all users, domains or IP addresses. I tried it with Nenad when testing the mysql:// protocol and it worked. But it took some time to set up the privileges, and I don't remember the exact commands. This should allow connection and grant all privileges to all databases to user with name rebtest and password reb from any domain. It's good for testing, but it's insecure since it allows the user to accidentally delete all databases on the server. telnet as any user shell> mysql -uroot -p The only MySQL user with administrative rights is root by default. His password is by default empty, it's different from root's UNIX password. mysql> use mysql; mysql> GRANT ALL PRIVILEGES ON *.* TO rebol@"%" IDENTIFIED BY 'reb'; mysql> quit; Hope this helps, -- Michal Kracik -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: zip file support wanted - help needed
Hi, I think rebol would benefit a lot from a simple shell facility. I vote for shell access. It's a quick way of getting all sorts of stuff done. At the same time, I fear the mess we could create. :) It's the diversity versus standards argument again. Messy diversity and good, clean standards. I don't think there will ever be a winner. Anton. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.