[REBOL] mySQL driver

2001-04-03 Thread Paul Tretter


Doc Kimbel,

I have been wanted to test the mySQL driver and have no longer access to Doc Kimbel's 
docs and drivers except an older one that was downloaded.  Some suggestions I would 
like to make because I think this would greatly benefit us REBOL disciples.  First off 
add your website URL to the documentation. 

Now the cool part - provide some access to mock mySQL database so that users can test 
the driver on your mySQL test/training database and put documentation as to what the 
tables consist of etc... on the website URL.

I know that is alot of work but I think it compliments your work very well.  And BTW - 
keep up the great work Doc - you have inspired my to learn mySQL.

Paul Tretter


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: REBOL + PHP

2001-04-03 Thread Brett Handley

> Of course, it always helps a lot if you know which end dispenses the
bullets
> or code.

Thanks for the engaging analogy :)
Brett.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Clunky-looking code

2001-04-03 Thread Sanghabum

Thanks  Renaud,


  MultiplyBlocks: func [
   Block1 Block2
  /local sum
  ][
   sum: 0
   repeat i min length? Block1 length? Block2 [
   sum: sum + (Block1/:i * Block2/:i)
  ]
  return sum
  ]

  
What was missing from my knowledge was how to reference a block using a 
variable (pardon my non-Rebol terminology) . When I'd tried things like 
Block1/Ind I got told that was a bad path. Your little colon makes all the 
difference.


 Note that you don't need to explicitly use RETURN in your functions, since
 the last value of the affectation is still available when Rebol exits the
 loop.


True for MultiplyBlocks1. But MultiplyBlocks2 does need an explicit return, 
at least on my machine. And, maybe it's a matter of style, but I'd rather 
have an explicit return: it helps a stranger's eye when looking at code. It 
also means I can add debugging code without breaking assumptions.


It's also interesting to notice the relative speed of each
 function (multiply 2 blocks of 15 integers):



I've changed my code to your "block/:i" format. It knocks 15% of the 
application run time. A worthwhile improvement indeed.


Next option would be to use Ladislav's %highfun.r script
(http://www.rebol.org/advanced/index.html). There you will find functions
that will make this work more elegant, or a technique to make the functions 
I've shown more generic.


Thanks for this reference. I certainly don't want to spend my life 
reinventing the wheel, and especially not clunky wheels



To write the most compact piece of code for performing this task one could
split some hairs and chop out a few chars here and there, but that does not
necessarily make it more readable/maintainable or better.


I wasn't trying to write the shortest possible code. But I like to think that 
I write code that is easy to follow. Which is why the PICKs and FIRSTs in my 
two samples niggled. They cluttered a function that ought to be simple. Call 
it programmer's intuition, but I knew there must be a better way. But my 
RTFMing skills had failed to find it.


Thanks for all the help guys. I think I am beginning to get the hang of this 
language!
Colin
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: REBOL + PHP

2001-04-03 Thread Ralph Roberts / ALEXANDER BOOKS


>To achieve the sort of flawless operation that your site has would require
>not just the stability of Rebol but also of some well thought out code.
>
>If you reflect on the operation of your site over the last nine months, do
>have you any thoughts about what makes a stable (or non-stable) Rebol cgi
>script? Or indeed any other reflections.
>
>Thanks,
>Brett.

A very good question, Brett, and one that caused me really to think. I use
REBOL for lots of stuff. While I've been programming in various languages
for over 20 years professionally, I am still more of a writer and publisher
than a programmer. We are a small company expanding explosively with far too
few people (and I'm the only programmer). I don't have a lot of time to
spend "polishing" code. If I need a script, I usually need it by yesterday.
So, far too often, my code is nonelegant, even (yes, I admit it) sloppy. But
it gets the job done. Now I've never thought about REBOL in this context
before, but that kind of usage is a true torture test of any language.

My two major tools in the hundreds of websites I maintain and write web
applications for are REBOL and PHP. I am equally sloppy (to put it nicer,
"rushed") in both languages. On consideration of the results, I find REBOL
is more reliable.

Let me sum this up by way of an analogy. Back in 1968, I was in the infantry
in Vietnam. We carried M-16 rifles, which was then a new tactical weapon and
a lot of us troops were complaining it jammed all too often. In fact,
several guys in my unit were using captured AK-47s, the Communist assault
rifle stamped out of old rice cake tins up in China (or so it looked). But
the durn thing was reliable.

So this representitive from Colt Arms (a civilian) came out to my outfit in
the jungle one day. He gave us this great song and dance about how reliable
the M-16 was, yada yada yada. To top it off, he throws an M-16 into a pool
of muddy water. Now I'm sure this demo worked flawlessly at all the other
places he'd been, but when he pulled the rifle out and attempted to fire it,
the sucker essentially embedded its first round in the firing chamber and he
couldn't clear the weapon. A bad, bad thing to have happen if you are in the
middle of a firefight.

Well, American troops being American troops, some smart ass (wasn't me, but
could've been) tossed a captured AK-47 into the same muddy pool. Plucked it
out, and rock and rolled through a whole magazine of ammo without a glitch.
Needless to say, confidence in Colt's baby was not intensified.

That's how I perceive the difference between PHP and REBOL (and ASP and
ColdFusion, et al). In the middle of a firefight (like I GOTTA get an
application up and running TODAY) I reach for REBOL. If I have the leisure
to sight the weapon in, assume an approved firing position, and plenty of
time to snap off lines of code well, yes, there are targets PHP is better
suited for, but this is seldom true in combat or making a small company
profitable on a shoestring budget. Usually, I have no time but a desperate
need, so (like our rifles in Vietnam that never left our sides day or night)
REBOL is the one I sleep with. And like the rifle, it saves my butt from
time to time.

That's the difference.

Of course, it always helps a lot if you know which end dispenses the bullets
or code.

--Ralph Roberts
author REBOL FOR DUMMIES
buy it at http://rebolpress.com

this email (c)2001 Creativity, Inc. 'cause I WILL use the analogy in a book
one of these days


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: REBOL + PHP

2001-04-03 Thread Ralph Roberts / ALEXANDER BOOKS


I have run tests on my big booklist database using both PHP and Doc Kimbel's
drivers. Since PHP uses an Apache module, it's definitely quicker. However,
the Kimbel/REBOL conbination is so much EASIER. Once REBOL gets an Apache
module in production, I think we'll have a REAL solution. As it is, I will
still be using REBOL for some MySQL tasks, again because I can program them
quicker. Doc Kimbel, he the man!

--Ralph

>
>Paul Tretter wrote:
>
>> Ralph have you tried Doc Kimbel's mySQL driver yet? If so, what did you
>> think of the performance features of the driver verses PHP.  Just curious
>> since I would like to get into mySQL and use Doc's driver to create
>> something fairly robust.
>>
>
>I would be interested in some benchmarking too. But anyway -
>Rebol/Core/Pro will
>cost very affordable price!. It will feature /library component,
>and IIRC jeff
>posted here some mySQL and postGresSQL library wrappers - should
>be faster, no?
>
>-pekr-
>
>>
>> Paul Tretter
>>
>> - Original Message -
>> From: "Ralph Roberts / ALEXANDER BOOKS" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Monday, April 02, 2001 7:31 PM
>> Subject: [REBOL] Re: REBOL + PHP
>>
>> >
>> > >Interesting...how did you use REBOL in the site? Are any of
>the scripts
>> > >visible?
>> > >
>> > >Thx,
>> > >
>> > >Dave De Graff
>> > >
>> >
>> > Thanks for the kind comment, Dave... The scripts that search
>our booklist
>> > (we sell almost a thousand different titles now) were written in REBOL.
>> The
>> > entire underlying e-commerce system that allows a customer to
>click on any
>> > title showing on the site on any page (and it's a dynamic site with the
>> > possibility of hundreds of pages) is PURE unadulterated REBOL. The same
>> > system, by the way, also handles fulfillment for the REBOLpress books,
>> etc.
>> > Kinda proud of it and it's generated a lot of good orders for us,
>> > operating flawlessly since July of last year. REBOL is just
>plain EASY to
>> > develop powerful web applications in.
>> >
>> > You may have noticed the very first line of the http://abooks.com site,
>> the
>> > one welcoming visitors and showing their IP number, etc.
>Here's the script
>> > for that tasty little enhancement:
>> >
>> > #!/rebol/rebol --cgi
>> > REBOL [
>> > ]
>> > ip: system/options/cgi/remote-addr
>> > print "Content-Type: text/plain^/"
>> > print ""
>> > print ["Thank you for visiting this page fromIP: "
>> >   ip "- - - Name: " read join dns:// ip]
>> >   print [" on"
>> >now/date "at" now/time "our time (U.S. Eastern)."]
>> > print ""
>> >
>> > Long live the REBOLution!
>> >
>> > --Ralph Roberts
>> > author REBOL FOR DUMMIES
>> > get it at http://rebolpress.com
>> >
>> > --
>> > 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.
>


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: REBOL + PHP

2001-04-03 Thread bill

>  >Interesting...how did you use REBOL in the site? Are any of the scripts
>>visible?
>>
>>Thx,
>>
>>Dave De Graff
>>
>
>Thanks for the kind comment, Dave... The scripts that search our booklist
>(we sell almost a thousand different titles now) were written in REBOL. The
>entire underlying e-commerce system that allows a customer to click on any
>title showing on the site on any page (and it's a dynamic site with the
>possibility of hundreds of pages) is PURE unadulterated REBOL. The same
>system, by the way, also handles fulfillment for the REBOLpress books, etc.
>Kinda proud of it and it's generated a lot of good orders for us,
>operating flawlessly since July of last year. REBOL is just plain EASY to
>develop powerful web applications in.
>
>You may have noticed the very first line of the http://abooks.com site, the
>one welcoming visitors and showing their IP number, etc. Here's the script
>for that tasty little enhancement:

some feedback for u ralph:

on abooks.com, i couldn't find yur book by using the search engine - 
'rebol', 'dummies', 'rebol for dummies' - none brought up any books.

when i did get to the book, the text was wayy too big (no leading at 
all - gaps between lines) - i use mac, ie5.

great book BTW!

ciao

d x


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: the answers

2001-04-03 Thread Petr Krenzelok



"Robert M. Muench" wrote:

> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> > laplace
> > Sent: Friday, March 30, 2001 2:06 PM
> > To: [EMAIL PROTECTED]
> > Subject: [REBOL] Re: the answers
>
> > I mean about Component concept, reusability with interface beetween
> > components and that works inside a browser (like flash for
> > example). If you want to offer an interactive chart for example , how
> would
> > you do if you don't have component ?
>
> Hi, well there are two issues here:
>
> 1. Rebol/XYZ Browser plug-in-able
> I think this is a must-have to make Rebol the killer language. Think about
> being able to use the fat browsers as home for Rebol (SSL etc. can be used
> than) and have the user see a real nice interface inside the browser... no
> complaints like: Well, it looks nice but it's not standard, I want to use my
> browser...
>

yes, I talked about it with jeff in Express conference. Current plug-in just
knows only how to start Rebol and few other minor things. I told openly RT that
it will not be used at all - we need the ability to live inside of browser
window, or ppl will regard us being proprietary technology 
But I can imagine that implementing something like this is not probably ease ...
But as you stated - it would definitely BE killer app.

> 2. Component concepts / protocolls
> Stuff like COM XYZ, JavaBeans, CORBA etc. are all component protocolls...
> and it's always a all-or-nothing concept. Mixing all these is very hard (if
> not impossible). So why use them? Just use the simple and straightforward
> concept like SOAP or Rebol, or whatevery ASCII readable format you wish.
> These can be translated quite easy. Robert

Absolutly agree here. Although I know why ppl want it - because of inner-OS IPC
(like Arexx on Amiga)

-pekr-

>
>
> --
> 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.