Re: MetaCard CGI - a good place to start with

2006-05-07 Thread LiangTyan Fui


On May 6, 2006, at 10:35 PM, Mark Schonewille wrote:

Information on the Memebot server is very sparse, LiangTyan Fui.
Do I need the Linux or the OS X executable, for example? And did  
you really install the normal Revolution engine as it comes with  
the distribtion, or did you download the special cgi engine that is  
provided by RunRev?


Memebot is running on Linux server.
http://toolbar.netcraft.com/site_report?url=http://www.memebot.com

Fedora Core to be precise.

The engine that I used was this one:
ftp://ftp.runrev.com/pub/revolution/downloads/engines/2.0/Linux.zip

The one in the cgi folder are having some problem.
The more recent engine needs fancy graphic libraries, which will  
likely failed on standard Fedora Core server installation (without GUI).


Unzip the file, and you'll get a "mc" binary file.

Upload the binary file into your memebot cgi-bin folder, you have to  
do that with FTP client.

Set the permission to 755 with your FTP client.

Copy the following script and save it as "echo.cgi" (the name must  
ends with .cgi -- this is required by memebot server).


Make sure the echo.cgi file start with "#!mc" as the first line.

---
#!mc
# This MetaTalk script loops over all the environment variables
# set by the server when it runs a CGI application printing out
# its name and value.

on startup
  # loop over all of the global variables, getting name and value
  repeat for each item i in the globals
put i &" = "& value(i) & cr after buffer
  end repeat

  put "Content-Type: text/plain"& cr
  put "Content-Length: "& length(buffer) & crlf & crlf

  write buffer to stdout

  quit
end startup
---

Upload the "echo.cgi" file to your memebot cgi-bin directory, place  
it together with the "mc" binary. Again, make sure it has 755  
permission.


Fire-up your browser, and type the following to access your echo script:
http://yourweb.memebot.com/cgi-bin/echo.cgi

Where yourweb is the name that you have created for memebot web  
directory.


Good luck!


--



Best,

Mark

LiangTyan Fui wrote:

On May 5, 2006, at 9:16 PM, Mark Schonewille wrote:

Hello,

Could you please provide a step-by-step guide to installing  
revcgi  on memebot.com without paying for an advanced account? I  
am looking  for the right place to put the MC executable but  
can't find it.
Where did you stuck at? HyperActive Software has pretty well  
written  instruction on the installation:

http://www.hyperactivesw.com/cgitutorial/intro.html#Installing
Make sure you set the permission correctly with FTP software, both  
on  the engine and the script file.


--

Consultant and Software Engineer
mailto:[EMAIL PROTECTED]
http://www.economy-x-talk.com

eHUG coordinator
mailto:[EMAIL PROTECTED]
http://www.ehug.info

Advertise with us and reach 1000 truely interested internet users  
every month. See http://economy-x-talk.com/advertise.html for more  
information.


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: MetaCard CGI - a good place to start with

2006-05-06 Thread LiangTyan Fui

On May 5, 2006, at 9:16 PM, Mark Schonewille wrote:


Hello,

Could you please provide a step-by-step guide to installing revcgi  
on memebot.com without paying for an advanced account? I am looking  
for the right place to put the MC executable but can't find it.


Where did you stuck at? HyperActive Software has pretty well written  
instruction on the installation:


http://www.hyperactivesw.com/cgitutorial/intro.html#Installing

Make sure you set the permission correctly with FTP software, both on  
the engine and the script file.


--


Thanks,

Mark


LiangTyan Fui wrote:

I've just encountered a very spiffy web hosting:
http://www.memebot.com
They claimed to allow CGI, php, perl and many scripting for   
well  free of charge *.
So I've registered an account and give it a try. I have no problem  
at  all running Metacard CGI there, on my very first attempt.
So if you have no Linux and server, and thinking to get your hand  
wet  with MetaCard CGI, the recipe is simple:

http://www.hyperactivesw.com/cgitutorial/index.html
http://www.memebot.com
* For 30 MB disk space, 100 MB monthly transfer limit.


--

Consultant and Software Engineer
mailto:[EMAIL PROTECTED]
http://www.economy-x-talk.com

eHUG coordinator
mailto:[EMAIL PROTECTED]
http://www.ehug.info

Advertise with us and reach 1000 truely interested internet users  
every month. See http://economy-x-talk.com/advertise.html for more  
information.


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


MetaCard CGI - a good place to start with

2006-05-04 Thread LiangTyan Fui

I've just encountered a very spiffy web hosting:
http://www.memebot.com

They claimed to allow CGI, php, perl and many scripting for  well  
free of charge *.


So I've registered an account and give it a try. I have no problem at  
all running Metacard CGI there, on my very first attempt.


So if you have no Linux and server, and thinking to get your hand wet  
with MetaCard CGI, the recipe is simple:


http://www.hyperactivesw.com/cgitutorial/index.html
http://www.memebot.com


* For 30 MB disk space, 100 MB monthly transfer limit.

--

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-29 Thread LiangTyan Fui


On Apr 28, 2006, at 10:19 AM, Brian Yennie wrote:


It is rather crud to use PHP -> socket -> MC.
The MC socket port listening method is not robust enough, and may  
went deaf under some loads.


I think Pierre would disagree. I would also - it's a whole lot more  
likely to handle a big load than a CGI that loads the whole engine  
with every request. There's nothing crud about it, it works quite  
well.


You don't have to use PHP to handle the browser POST queries. We  
have pure MC CGI written to handle POST running for years without  
problem.


Unless you need to MC running as daemon explicitly, I don't see  
the need of PHP here.


That was the point of this thread... I think you missed the  
requirements. The original poster already has a working CGI, but  
wanted a daemon solution to easily solve read/write conflicts for  
the stack.


Let me proposed a solution here, which works for us. We was trying to  
resolve a race condition on writing on a same file (not stack) by  
intensive CGI queries.


1. moved the files onto high I/O efficient RAM disk, or the shared  
memory at /dev/shm


2. implement a pseudo lock and unlock method, here is how:

# When you load stack, do this:
put false into stackOpenStatus
repeat 60 # retry for 1 minute
  if there is a stack myStackName then
# try to rename it
rename myStackName to (myStackName &".lock")
if the result = "" then
  # manage to rename, no error, so the lock is on!
  open stack (myStackName &".lock")
  put true into stackOpenStatus
  exit repeat
end if
  end if

  wait 1 second
end repeat
# remember to test the stackOpenStatus first before proceed.


# When you write stack, do this:
save stack (myStackName &".lock") # save to the lock one
rename (myStackName &".lock") to myStackName # make it available again

Hope this helps.

--


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-29 Thread LiangTyan Fui


On Apr 29, 2006, at 4:36 AM, Brian Yennie wrote:


Tariel,

Would not this mean that in this case it's not a CGI solution any  
more but a "regular" f MC running Stack that listens to some port  
and behaves like web server?
Something  like mchttpd.mc  stack  that Scott Raney put together  
and Andre later enhanced?
If this is the case, what PHP adds to it other than robustness and  
reliability ?


Yes - it is a lot like mchttpd. Using PHP as an intermediary buys  
you a few things which may or may not be important to you:
1) You don't have to open another port to the outside world, since  
the incoming connection is just coming through your web service  
(port 80)


Unless you have firewall somewhere, starting a MetaCard process with  
the listen command actually "open another" port on that machine, at  
EVERY TCP/IP interface. Quite an annoying "feature".


2) With PHP, you don't have to manage your own incoming HTTP  
headers - PHP does this automatically with the $_GET and $_POST  
variables.


Other than that, it's mostly personal preference - but I feel  
better with PHP handling the connection to the outside world to let  
the existing web server do the heavy lifting.


When we started evaluating MC CGI on a Pentium (version 1) 133 Mhz  
machine with 256 MB RAM years ago, each of the MC instance took about  
1 second to load - too slow to consider in production use.
The Apache -> PHP -> MC method here could be a big help on those  
machines.


When we put some serious processing power onto it, with P III  
processor and more RAM, it sings. We were convinced that MC CGI was  
the way to go, so we migrated our entire development platform onto it.


The Apache -> PHP -> MC Daemon may offer good speed because no need  
for reloading MC process on each browser query, but the one deadly  
limitation on this setup is the multi-thread capability.
Imagine if your application grow, some queries may take more time to  
complete due to complexity and inefficient coding (it happens), and  
your user based start growing too. If a query needs 1 seconds to  
complete, serving 30 to 50 users concurrently could be problem as the  
daemon processes queries sequentially.

The server load may still low, but the respond could suffer.
You may start exploring the MetaCard very fancy "wait for messages"  
command to release the cycle to other "thread" - we did that, and it  
bought us some time. But the project and user based continue to grow,  
and we ran out of tricks eventually ;)


These days on a AMD 2Ghz server, spawning 200 MC CGI process needs no  
more than 1 second*, so the load time isn't really matter now.


In other words, is PHP absolutely necessary for such a solution or  
not ?


Not at all! I personally prefer it, but it can certainly work without.


I respect your preference. I was just trying to point out that MC CGI  
may scale up easier, and you have 2 less components to worry: the PHP  
and the MC listen handling.


In all, I am pleased that more people has adopted MC CGI.

* about 300 MC CGI process in 1 second, on a P4 Dual Core, 3 Ghz.

--


- Brian


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-29 Thread LiangTyan Fui


On Apr 29, 2006, at 12:49 PM, J. Landman Gay wrote:


LiangTyan Fui wrote:

It is rather safe to use the "do" command here. I haven't come  
across any crackers does xTalk, yet ;)


True, but when we take over the world you will change your mind. ;)


I've been waiting for this day since 1993 (the day I open my first  
HyperCard stack). Still waiting ;)





--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Sending E-mail

2006-04-28 Thread LiangTyan Fui


On Apr 29, 2006, at 5:27 AM, Ray Horsley wrote:


Anybody know of a way to send an E-mail from Metacard?


You can find one with:
http://shaosean.tk/

--


Thanks,

Ray Horsley
Developer, LinkIt! Software


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-28 Thread LiangTyan Fui


On Apr 29, 2006, at 8:28 AM, J. Landman Gay wrote:


Tariel Gogoberidze wrote:

You can do it if you keep the stack somewhere else outside of the  
CGI
folder, but I hear that can be a security risk (though I'm not  
sure how
exactly, but someone wrote me once with very strong opinions  
about it.)
Probably because it opens the door to what's usually called  
"executing arbitrary code on remote computer" :)


Right, that's what they said, but I don't see how it could be done.  
The CGI would only write specific data to a specific stack, and  
there isn't any way to make it behave differently by sending  
commands to it. As long as your CGI only operates on valid input,  
how could someone execute code?


The only way a CGI could be misused that way is if it contained a  
line of script like:


  do the params


It is rather safe to use the "do" command here. I haven't come across  
any crackers does xTalk, yet ;)

It is even safer if you:
  set secureMode to true -- all access to file system and other  
system resources is disabled.

if you don't really need to read/write files.

My greater fear are the shell() command and the file path system. If  
you pipe the parameter directly to the shell() command, you are in  
great risk. Also, if you would allow the browser end to specify  
resources thru the path name (like /myfolder/myfile.txt), the risk of  
exposing other files will be there (cracker may specify something  
like ../../../known-system-file).


MetaCard engine is rather safe to use as CGI. Just like php/perl/ 
java. It is the application that opens the loophole. I've got people  
hacked into my development server via mambo* loophole (developed on  
php), I can only blame myself on not getting mambo up to date, there  
is really nothing to do with php and mysql.


* http://www.mamboserver.com/

--



which would be a really stupid thing to include. I can't think how  
a MC CGI could be abused without something like that in it.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-27 Thread LiangTyan Fui


On Apr 28, 2006, at 10:35 AM, Robert Brenstein wrote:



We managed to run a full MetaCard in graphic mode, and install a  
"acgi dispatcher" (http://www.sentman.com/acgi/) to emulated  
AppleEvent from Apache back to MetaCard, just like the old OS 9  
days - but that's very different animal mind you.




How did you manage to get MC recognized as an application? I talked  
about this with Sentman (quite a while ago) after my failed  
attempts and he said it is not possible to point to apple's apps  
disguised as folders. According to him, it was Apache limitation.


I am not sure now, it was 3 years ago on one of our MetaCard  
projects. The application wasn't even build with the Carbon engine,  
and running on OS X in the OS 9 emulation mode.
Here is a note that I've written on configuring the ACGI Dispatcher  
[text in quote are the new one]:


==
Follow these steps:

- in ACGI Dispatcher, go File -> Configure Suffix Mappings...
- click "New"
- type ".mms" in the Suffix field (without the quotes) [or any .xxx  
that you would like to trigger your application]

- select "launch as suffix" in Action.
- click "Choose App" when the button appear, locate the MMS  
application. [MMS is the Metacard standalone application]

- click "Save".
- and click "Save" again if need be.
- DONE!

=

Hope this helps.

--


Robert
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-27 Thread LiangTyan Fui


On Apr 28, 2006, at 10:19 AM, Brian Yennie wrote:


It is rather crud to use PHP -> socket -> MC.
The MC socket port listening method is not robust enough, and may  
went deaf under some loads.


I think Pierre would disagree. I would also - it's a whole lot more  
likely to handle a big load than a CGI that loads the whole engine  
with every request. There's nothing crud about it, it works quite  
well.


Linux cache the engine very well (at least on disk cache), so  
subsequent call to the MC cgi result in no disk reading.
We have managed to serve over 250 concurrent mc process in a 2 GB RAM  
Intel based linux system without significant load on the system.


We was basically switched from the daemon based Metacard to the  
session based not for speed consideration (CPU gets faster, RAM gets  
cheaper each year), but for more stable, easier debug and rebuild on  
the project (update daily).


Anyway, my point is: it is quite different to code in daemon based  
Metacard and the CGI based Metacard. Going from CGI based to daemon  
based to solve the read/write conflicts may not justify the re-coding  
effort on the rest of the project (specially multi-users based).


It is easier to write all the result into a separate file, and have a  
process to collect/merge the results when you need it. That will help  
to reduce the conflicts in a way.


BTW: we are rather extreme on the server configuration, we turn off  
PHP, perl and almost every scripting support in apache for security/ 
speed tuning. So you know why I don't recommend PHP here ;)


Oh one more thing, the Metacard listen command don't allow one to  
bind the port on a specific IP. So Metacard daemon will listen too  
ALL the TCP/IP interface on the machine. Make sure you have your  
firewall configured if you do not want external traffic going into  
that port.


--

You don't have to use PHP to handle the browser POST queries. We  
have pure MC CGI written to handle POST running for years without  
problem.


Unless you need to MC running as daemon explicitly, I don't see  
the need of PHP here.


That was the point of this thread... I think you missed the  
requirements. The original poster already has a working CGI, but  
wanted a daemon solution to easily solve read/write conflicts for  
the stack.


- Brian

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI and DestroyStack property

2006-04-27 Thread LiangTyan Fui


On Apr 28, 2006, at 9:50 AM, Brian Yennie wrote:


Tariel,

I have. What I did was originally based on some of Pierre's  
comments that you referenced.
Basically, you leave the MC stack running normally, and you  
communicate with it via PHP and sockets.


It is rather crud to use PHP -> socket -> MC.
The MC socket port listening method is not robust enough, and may  
went deaf under some loads.


You'll need to install a PHP script such as this one as the  
intermediary:

http://istream.homeunix.com/insead/page4_en.html

Then you need mostly the first two handlers from here:
http://istream.homeunix.com/insead/page5_en.html

The PHP scripts will pass the POST args to your stack, which then  
sends back an HTTP reply. This definitely works - if you have  
specific questions, I may be able to answer them also.


You don't have to use PHP to handle the browser POST queries. We have  
pure MC CGI written to handle POST running for years without problem.


Unless you need to MC running as daemon explicitly, I don't see the  
need of PHP here.


Basically, it would be great to know if anybody succeeded in  
making MC CGI stay-resident on OS X (I don't have linux box) and  
thus preventing  engine quitting  after CGI script is executed and  
launching the new copy of the engine on each call.


We managed to run a full MetaCard in graphic mode, and install a  
"acgi dispatcher" (http://www.sentman.com/acgi/) to emulated  
AppleEvent from Apache back to MetaCard, just like the old OS 9 days  
- but that's very different animal mind you.


--


Any insights ?

best regards
Tariel


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Replacing carriage returns

2004-12-05 Thread LiangTyan Fui
On Dec 6, 2004, at 12:20 PM, Simon Lord wrote:
The following is not working for me, anyone got something that does?
replace "\r" with "new word" in line 1 of fld "testCode"
Why "line 1"?
That will also get you some text without "carriage return", unless you 
have linedel set to something else.

--
... I'm just trying to purge all carriage returns from a field of text.
Sincerely,
Simon

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Can't Delete Directory

2004-08-02 Thread LiangTyan Fui
On Aug 3, 2004, at 12:37 PM, Simon Lord wrote:
One of those little annoyances; if I run the command "delete 
directory myPath" where myPath is a perfectly valid path to a folder 
on the local hard disk, I get the result "can't delete that file".  
Any ideas anyone?

   Using: Metacard 2.5 on Mac OSX 10.2.8
First thing that comes to mind is permissions.  Who are you running 
metacard as and who owns the rights to the folder?  What rights was 
the folder set with?
The directory must by empty too.
--
I haven't tried it myself, I'm just pointing out the uber obvious.
Thanks,
Ray Horsley
Developer, LinkIt! Software

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: ticks and seconds ahould have a fixed reference

2004-07-30 Thread LiangTyan Fui
On Dec 17, 2002, at 4:18 AM, RCS wrote:
I thought the 'ticks' and 'seconds' were supposed to references to 
January
1,1904 or something...they change if you change the computers 
time/date!!!
Type this in the message window:
put 0 into t; convert t to short date; put t
got 1/1/70
I am on Mac OS X.
--
 I am trying to build a time limited demo...
:-(
JR

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


File append

2003-08-17 Thread LiangTyan Fui
(I was writing the following for bug report to runrev.com, unfortunately I
am getting a lot of broken links on their bug reporting system, pointing me
no where, so here I post it)

Here is the code in question:

on fileAppend thefile,thedata
  open file thefile for binary append
  write thedata to file thefile
  close file thefile
end fileAppend

But to our surprised MetaCard actually re-write the ENTIRE file from
beginning and appended thedata after it, instead of a direct append.

This function works very much the same like:
 put thedata after url ("binfile:"& thefile)

While this has very little effects on small files, it has great impacts on
dealing with larger files (more than 5 MB). We can actually see the files
dancing from 0 bytes to the final size every time when we append something
onto it.

We have tried change to the following, no luck.

on fileAppend thefile,thedata
  open file thefile for binary update
  write thedata to file thefile at eof
  close file thefile
end fileAppend

MetaCard 2.4.3
The platform: Redhat Linux 8.0, Pentium 166, RAM 128.

-- 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Multiple LAN cards & mc server apps

2003-08-03 Thread LiangTyan Fui
On 8/3/03 1:31 PM, "Dar Scott" <[EMAIL PROTECTED]> wrote:

> On Saturday, August 2, 2003, at 10:53 PM, LiangTyan Fui wrote:
> 
>>> 2. How do you restrict metacard listening to just one interface?
>> 
>> Not that I know :(
> 
> If you don't need the port on the undesired interfaces for some other
> service, you can block them with a local-machine firewall.

Unfortunately this is not always the case. For example I have MetaCard based
SMTP server listen on port 25 to handle incoming traffic, and still would
like to run sendmail on the loop back 127.0.0.1 for local traffic.
By accepting connections on port 25 using metacard, I cannot start sendmail
anymore.

-- 

> Dar Scott


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Multiple LAN cards & mc server apps

2003-08-02 Thread LiangTyan Fui
On 8/3/03 12:17 PM, "Alex Shaw" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I haven't tried this yet but I'm sure someone has:)
> 
> Using the metacard 'accept on port' command..
> 
> 1. Will this cause the server app to listen on all available interfaces?

Yes, it binds to 0.0.0.0

> 2. How do you restrict metacard listening to just one interface?

Not that I know :(

-- 

> regards
> alex
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard
> 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Limits on array dimensions

2003-07-29 Thread LiangTyan Fui
On 7/30/03 1:11 AM, "Gregory Lypny" <[EMAIL PROTECTED]> wrote:

> Wanna give me a hint as to which of the dozens of properties I should
> be looking at?

No information on array, but it should be at least comparable to custom
property. So that gives 4 GB limit on what you can store in array, and
nothing else is using the same RAM, including other variables and apps.
Sorry, still no answer to your question. I assume 4 GB limit on the array
storage includes the overhead of array index (or a separated RAM space,
still limit by 4 GB).
Given all the limits MetaCard imposed on other objects, it is safe to assume
that the number of element (index) of an array is limited by the machine
memory, or up to 4 GB, if you have stored nothing in the array.

Don't take my words for it though. I'll be happy if someone else can prove
me wrong.

-- 


> Gregory Lypny
> Associate professor
> Concordia University
> ___
> "Better for us if you don't understand."
> The Tragically Hip
> 
> http://pareto.concordia.ca
> 
> 
> 
> 
> On Tuesday, July 29, 2003, at 12:02  PM,
> [EMAIL PROTECTED] wrote:
> 
>> Message: 6
>> Date: Tue, 29 Jul 2003 22:40:39 +0800
>> Subject: Re: Limits on array dimensions
>> From: LiangTyan Fui <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Reply-To: [EMAIL PROTECTED]
>> 
>> On 7/29/03 9:07 PM, "Gregory Lypny" <[EMAIL PROTECTED]> wrote:
>> 
>>> Hello everyone,
>>> 
>>> Is there a limit on the number of elements that an indexed array can
>>> hold?
>> 
>> go card 900 of stack "MetaTalk Reference"
>> 
>> -- 
>> 
>>> Greg
>>> 
>>> 
> G
>


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Limits on array dimensions

2003-07-29 Thread LiangTyan Fui
On 7/29/03 9:07 PM, "Gregory Lypny" <[EMAIL PROTECTED]> wrote:

> Hello everyone,
> 
> Is there a limit on the number of elements that an indexed array can
> hold?

go card 900 of stack "MetaTalk Reference"

-- 

> Greg
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard
> 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Extracting a subset of lines from a large file

2003-07-01 Thread LiangTyan Fui
On 7/2/03 4:43 AM, "Gregory Lypny" <[EMAIL PROTECTED]> wrote:

> Hello everyone,
> 
> I want to take a chunk of 1000 lines at a time out of a text file and
> display it in a field.  Some of the text files are big, 200 MB and up.
> 
> Is one of the following approaches preferred?
> 
> [1]put line 1 to 1000 of url ("file:" & filePath) into field "X"

This is equivalence to:
  put url ("file:" & filePath) into tmp # you need the RAM to store this.
  put line 1 to 1000 of tmp into field "X"
  
> [2]read from file filePath from line 1 for 1000 lines
> put it into field "X"

Personally I'll pick [2] to deal with large files.

-- 
 
> 
> Regards,
> 
> Gregory
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard
> 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI in Mac Classic (8.6)

2003-06-25 Thread LiangTyan Fui
On 6/26/03 9:25 AM, "Alain Farmer" <[EMAIL PROTECTED]> wrote:

> Hello everyone,
> 
> I have created dozens of HyperCard-based CGI programs.
> I am good at it. But as you all know HyperCard only
> runs on a Mac and, more to the point, Mac-based CGI
> programs react to the web by handling a particular
> Apple event, e.g. on AppleEvent. And the CGI ends with
> the command "reply" once the HTML has been built
> line-by-line. My problem is adapting this knowledge to
> MetaCard on the same Mac. This is specifically what I
> need to know:
> 
> 1. Does MetaCard implement CGIs on a MacOS-Classic
> (8.6) by supporting the same "on appleEvent" mechanism
> ?
> 
> 2. Is "get appleEvent data with " supported?
> 
> 3. Can I convert my HyperCard-based CGI to a MC-based
> CGI merely by opening my HC-stack with MetaCard?
> 
> 4. Are there one or more ready-made examples of
> MC-based CGI programs for MacOS-Classic?
> 
> 5. What is the minimal set of HTTP-response-headers
> that CGIs created with MetaCard 2.4+ are required to
> provide? Btw these headers were not necessary in MC
> 2.3, but now they are essential.
> 
> Thanks you kindly for any help you may provide me to
> get over this initial hurdle in my mastery of
> MetaCard. I've created an entire GUI with MetaCard
> (e.g. FreeGUI), and I am currently creating three
> blogging stacks (2 clients and a server), but, so far,
> I have not mastered its CGI abilities. Please help me
> ( a fellow altruist who will be sharing his blogging
> stacks with the MC community ).
> 
> Regards,
> 
> Alain Farmer
> 
> PS: A working sample script would be ideal.  :)

Stripped from my very old archive.
You sure you still want to use OS 9 for CGI?

#! master handle here to capture event from WebSTAR
on appleEvent class, eventID, sender
  if class & eventID <> "WWW‡sdoc" then pass appleEvent
  put unpackCGI() into theHTML
  
  reply "HTTP/1.0 200 OK"& crlf \
   &"Server: MC/2.3 ID/ACGI"& crlf \
   &"MIME-Version: 1.0"& crlf \
   &"Content-type: text/html"& crlf \
   &"Content-Length: "& length(theHTML) & crlf & crlf & theHTML
end appleEvent

function unpackCGI
  # available AppleEvent:
  put 
",kfor,refr,Agnt,Kact,Kapt,post,meth,Kfrq,svnm,svpt,ctyp,Kcid,Kcip" into
aeList
  
  put "" into theHTML
  repeat for each item aeEvent in aeList
request appleEvent data with keyword aeEvent
put aeEvent &"=" it & cr after theHTML
  end repeat
  
  return theHTML
end unpackCGI


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: 2.5 drag and drop

2003-06-04 Thread LiangTyan Fui
On 6/4/03 4:56 AM, "Alejandro Tejada" <[EMAIL PROTECTED]> wrote:

> on Tue Jun 3 05:42:00 2003
> LiangTyan Fui wrote:
> 
>> I've managed to grab files dragging from Finder
>> into MetaCard 2.5 by using the newly implemented
>> drag-and-drop. The dragData furnished with files
>> and path.
> 
> After Scott Raney implemented this, I've been
> testing other apps to check their support of
> drag and drop.
> For me, drag and drop only work on fields,
> not on cards.
> Had anyone had success draging and droping on
> a card?
> 
>> But how do I reverse the process?
>> [snip]
>> Let say I have objects in a stack, when user
>> drag one of the objects out of
>> stack and drop it into the Finder,
>> all I need is the path to the Finder
>> window and export the related files
>> (it could be png graphic).
>> Anyone done that? On Windows too?
> 
> When you drag a file from the finder you get
> a path to the file. Then to write a file to
> the finder, probably you export the image:
> 
> export image ID 9234 to
> URL "binfile:Desktop/next.png"
> 
> or a similar path...

Problem here is, I cannot just reverse the process blindly.
User will drag something from the card (or field) and drop it onto the OS
desktop (or other apps).
The new drag-and-drop doesn't provide support on this "outgoing drop" seems.

> But, How do you get the path if you are dragging
> to a folder in a removible disk or to another
> application that supports drag and drop?

Wasn't that part of my question? ;)

-- 

> Alejandro
> 
> 
> =
> Useful sites:
> http://www.sonsothunder.com/devres/metacard/tips/ and /revolution/tips/
> http://lists.runrev.com/pipermail/metacard/ and /use-revolution/
> http://wiki.macitworks.com/revdocs
> http://www.google.com/advanced_search?q=site:lists.runrev.com


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


2.5 drag and drop

2003-06-03 Thread LiangTyan Fui
I've managed to grab files dragging from Finder into MetaCard 2.5 by using
the newly implemented drag-and-drop. The dragData furnished with files and
path.

But how do I reverse the process? All I manage to do now is dropping some
text clipping into the Finder.
Let say I have objects in a stack, when user drag one of the objects out of
stack and drop it into the Finder, all I need is the path to the Finder
window and export the related files (it could be png graphic).

Anyone done that? On Windows too?
-- 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Comm Server

2003-03-26 Thread LiangTyan Fui
On 3/26/03 2:01 PM, "Simon Lord" <[EMAIL PROTECTED]> wrote:

> Has anyone built a metacard based comm server?  Something akin to IRC
> that has multiple rooms etc?  I'm interested in setting something like
> this up for myself.

Shao Sean has one. Not sure if he is still working on it.

-- 

On 8/8/02 4:59 AM, "Shao Sean" <[EMAIL PROTECTED]> wrote:

> I'm looking for testers for our MDSS Community chat client. Testers will be
> supplied with an older version (v1.01) of the client (this is to test the
> ability of the server to handle multiple sessions concurrently).
> 
> v1.0.1 of the client works very much like the "chatter client" available for
> download from RunRev's website, and was actually developed while using
> chatter for our communication tool until ours was done..
> 
> Features:
> - chat (only the one room)
> - userlist (see who is online, this is the reason we wrote the program in
> the first place)
> - easy set status (let others know if you're available or not)
> 
> The code is locked, for now, and will be released publicly once we're done
> with the new version.
> 
> Bugs:
> - for some reason the code panics in MacOSX on our test machine so you'll
> need to run it in classic MacOS
> 
> 
> You will need RunRev v1.1.1 or greater and MetaCard 2.4.1 or better (the
> code does run in the starter kit). Please contact me off list if you're
> interested, and I'll email you the code (let me know if you want RunRev /MC
> and Stuffed /ZIPped).
> 
> --
> Shao Sean
> http://www.shaosean.tk/




> Sincerely,
> Simon
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard
> 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: ftp problems

2002-12-10 Thread LiangTyan Fui
On 12/10/02 7:44 PM, "Klaus Major" <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> is anybody there mirroring the downloadable MC files (betas)
> on his/her server ?

http://groups.yahoo.com/group/metacard_download/links

-- 


> Looks like the MC ftp-server is the dedicated target of DOS attacks :-(
> 
> Could not reach that server since saturday, always "Refused when
> attempting ..."
> 
> But i do not want to miss a single build ;-)
> 
> Any help welcome.
> 
> 
> Thanks from germany
> 
> Klaus Major
> [EMAIL PROTECTED]
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Looking For Suggestions

2002-09-19 Thread LiangTyan Fui

On 9/19/02 3:55 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:

> To prevent multiple instances, I have in the past simply written a file to
> disk to check against on launch and a simple warning message for the user.
> This allows user-over-ride in the case of a crash and thus a spurious file;
> most times it's enough to advise the program is already running and/or bring
> it to the front. Low tech solution.

Try this low tech solution:

on openstack
  open file "C:/program1.txt" for write
  if the result is not empty then quit metacard
end openstack

on closestack
  close file "C:/program1.txt"
end closestack

-- 

> hth
> 
> /H
> _
> Hugh Senior
> The Flexible Learning Company
> Consultant Programming & Software Solutions
> Fax/Voice: +44 (0)1483.27 87 27
> Email:  HREF="mailto:[EMAIL PROTECTED]";>mailto:[EMAIL PROTECTED]
> Web: http://www.flexiblelearning.com/";>www.flexibleLearning.com
> 

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Browser Launch Revisited

2002-08-26 Thread LiangTyan Fui

On 5/30/02 2:31 AM, Scott Rossi wrote:

> Hi List Folks:
> 
> Here's some more on launching URLs in Web browsers...
> 
> You may recall a post recently that mentioned the use of shell command in
> MC/Rev to launch a URL.  After tracking down a formatting issue (with help
> from Scott Raney and Michael Kahn), it appears the handler below could be a
> reliable option for launching URLs on Windows.
> 
> on launchBrowser theURL
>  set the hideConsoleWindows to true
>  put empty into theTitle
>  if "NT" is in the systemVersion then
>set the shellCommand to "cmd.exe"
>put quote & quote into theTitle
>  end if
>  get shell("start" && theTitle && theURL)
> end launchBrowser
>
> Passing a URL to this handler should launch the URL in the default browser
> on any system from Win95 to XP, even with parameters included in the URL
> string.  If the handler fails for you, let me know off list what your
> findings are.  Testing here on Win95/98/2K/XP appeared to work in all cases.

I have 2 users reported a system crash (cursor freeze) using launchBrowser.
Both on Windows ME.
Anyone with an ME to test this out?

-- 


> Assuming the above works, I'll post a Primer at some point about various
> Mac/Win URL launch methods.
> 
> Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design
> -
> E: [EMAIL PROTECTED]
> W: http://www.tactilemedia.com
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



A few questions on multi-platform MetaCarding

2002-08-21 Thread LiangTyan Fui

A few questions here for the MetaCard expert out there:

How do I grab attention from user when MetaCard is at the back?
1. Blink the program menu while MetaCard is at background? (Mac OS 9)
2. Bounce the MeteCard Icon on Dock? (Mac OS X)
3. Blink the window box on task bar? (W2K)
4. Blink on the KDE/Gnome task bar? (Linux)

How do I move (copy) sounds between stacks?

Based on what I've observed from the list, the following is what I am using
now for browser handling:

on launchBrowser theURL
  switch the platform
  case "MacOS"
put "open location "& quote & \
   theURL & quote into thecode
do thecode as applescript
break

  case "Win32"
set the hideConsoleWindows to true
put empty into theTitle
if "NT" is in the systemVersion then
  put quote & quote into theTitle
end if
get shell("start" && theTitle && theURL)
break

  case "Linux"
# anyone?
break
  end switch
end launchBrowser


Anyone knows how to launch "default" browser in Linux?
Also, the shell command has much smaller limit on W2k over Win95/98, passing
a long URL (over 150 chars) get truncated. Anyone can help to confirm this,
and any workaround?

Thanks.

-- 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: the detailed files

2002-07-30 Thread LiangTyan Fui

On 7/31/02 12:00 PM, Simon Lord wrote:

> Is it possible to get the detailed files of a particular file
> only?  How?

Not that I know, but you can use the "get detailed directories" and extract
the file information from the list not a clean one.

-- 


> Sincerely,
> Simon
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



liburl over SSL server

2002-07-26 Thread LiangTyan Fui

Anyone tried posting or getting URL from https (SSL) servers?

-- 

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: CGI to download file without URL display

2002-07-10 Thread LiangTyan Fui

On 7/11/02 3:38 AM, Richard Herz wrote:

> I would like to post files on a web page for download without any display of
> the URL of the source file at the browser in order to prevent future bypass
> of download logging.  The only method I've discovered so far that has no
> display of the source file URL is to get the source file into a variable and
> "put" it back to browser as "application/octet-stream":
> 
> #!mc
> on startup
> # First log remote host address so if user bookmarks
> # this cgi file I at least log something, and/or
> # check for valid input from web form
> get url "binfile:../downloads/myApp.exe"
> put it into tBuffer
> put "Content-Type: application/octet-stream" & cr
> put "Content-Length:" && the length of tBuffer & cr & cr
> put tBuffer
> end startup
> 
> Browser then asks if you want to open or save the file.  The cgi file name
> must have the same name as the file to be downloaded (e.g., myApp.exe) in
> order for the file to be saved with that name by the browser, so the file to
> be downloaded can't be in the cgi-bin directory with the cgi script of the
> same name.

You can archive this by placing the cgi in the cgi-bin directory, but with a
little trick when link to it in the browser, Eg:
http://host.name.tld/cgi-bin/mycgi.mt/myApp.exe

The browser won't know the different, and download the file as "myApp.exe".
Tested on IE and Netscape, Windows and Mac.

> QUESTIONS: Is MC's "put" as reliable as regular browser download of a URL?
> Can I rely on the cgi host at a site provider to always be able to put a 1-3
> MB file into RAM (i.e., is this a trivial amount of ram)?  Giving the CGI

3 MB is "small" ;-)

-- 

> file the same name as the download file is no problem in Linux but would it
> be a problem on a Win server or on a Mac OS X server?
> 
> Doing a redirect with "Location:" or http-equiv="refresh" to the source file
> flashes briefly the url of source file in browser status bar, might put url
> in temp files, and might put url in Mac info comments.  If this method is
> more reliable than the direct mc "put" above, I guess a shell script could
> execute periodically to rename the source file directory.
> 
> Any other methods to use instead?
> 
> Thanks!
> Rich Herz
> [EMAIL PROTECTED]
> http://ReactorLab.net
> 
> 
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Put shell has extra cr

2002-06-11 Thread LiangTyan Fui

On 6/12/02 12:19 PM, Simon Lord wrote:

> The following line:
> 
> put cr & "marelina:" & shell("pwd") & ">" into var1

if last char of var1 is cr then delete last char of var1

> ...actually comes out looking like this:
> 
> marelina:/Applications/MetaCard
>> 
> 
> I remember way back when having to check for the last char being
> a cr and deleting it.  But I'll be damned if I can recall the
> exact syntax.  Any help would be appreciated.
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Remove HTML function

2002-05-17 Thread LiangTyan Fui

On 5/18/02 11:58 AM, Sivakatirswami wrote:

> Does anyone have a script to removing HTML from a string/chunk/whole file?


function html2text htmlRaw
  # trim all html tag
  put offset(" 0 then
delete char 1 to (bodyStart -1) of htmlRaw
  end if
  replace "" with cr in htmlRaw
  replace "" with cr in htmlRaw
  repeat
put offset("<",htmlRaw) into sTag
if sTag = 0 then exit repeat
put offset(">",htmlRaw) into eTag
delete char sTag to eTag of htmlRaw
  end repeat
  return htmlRaw
end html2text



> Hinduism Today
> 
> Sivakatirswami
> Editor's Assistant/Production Manager
> [EMAIL PROTECTED] 
> www.HinduismToday.com, www.HimalayanAcademy.com,
> www.Gurudeva.org, www.hindu.org
> 
> Read The Master Course Lesson of the Day at
> http://www.gurudeva.org/lesson.shtml
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: using "repeat for each" when you don't want to start with thefirst line

2002-04-29 Thread LiangTyan Fui

put the SelectedText of fld "Scene List" into CurScene
put lineoffset(CurScene&return,SceneFile) into q
put SceneFile into SceneFile2 # If you need to preserve SceneFile, or else
delete from it directly.
delete line 1 to q of SceneFile2 # MC handle small chunk faster
repeat for each line theline in SceneFile2
  do stuff
end repeat

-- 


On 4/29/02 10:01 PM, shop wrote:

> I have a number of repeat loops in my software which I would love to speed up
> using the "repeat for each" technique but I don't want to start with the first
> line.  Instead, I want to start based on which line the user selects in a fld.
> A typical example of what I'm currently doing follows:
> 
> put the SelectedText of fld "Scene List" into CurScene
> put lineoffset(CurScene&return,SceneFile) into q
> repeat with q2 = q+1 to the number of lines in SceneFile
>   do stuff
> end repeat
> 
> Any suggestions?
> 
> Rich Mooney
> Payne Sparkman Mfg.
> [EMAIL PROTECTED]
> 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Reading files backwards

2002-04-22 Thread LiangTyan Fui

On 4/22/02 10:27 PM, shop wrote:

> I have found that referring to files as URLs is a beautiful thing because it
> allows you to refer to a file as if it were a variable which means you can
> use all your chunk expressions on it.  Sooo, try
> 
> put the last line of url "file:blabla.txt" into r

Not sure with the latest 2.4.2 released, but put-url-file is RAM based.
You'll probably run out of memory (and slow too) when opening a 30-40 MB
file.

Regards,
LiangTyan Fui

> The only exception I've found to my opening statement is that delete doesn't
> seem to work with URLs.  I.E. delete the last line of url "file:blabla.txt"
> returns an error.
> 
> Rich
> Payne Sparkman Mfg.
> [EMAIL PROTECTED]
> 
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, April 22, 2002 7:54 AM
> Subject: Reading files backwards
> 
> 
>> Hi Gang,
>> 
>> Got a problem which may help others if there is a solution...
>> I need to read the very last line from a file that's 3 - 20MBs large...
>> So I tried:
>> 
>> open file blabla for reading
>> read from file blabla for -100
>> put the result into r
>> put it into x
>> close file blabla
>> 
>> Unfortunately I never got an answer back, MC crashed...
>> No result, no error...
>> 
>> I dont want to resort to external programs (tail.exe) to do this...
>> Does anyone have a standard scripted solution?
>> 
>> Thanks in advance
>> Xavier
>> 
>> 
>> 
>> Visit us at http://www.clearstream.com/_focus1.htm
>> 
>> IMPORTANT MESSAGE
>> 
>> Internet communications are not secure and therefore Clearstream
> International does not accept legal responsibility for the contents of this
> message.
>> 
>> The information contained in this e-mail is confidential and may be
> legally privileged. It is intended solely for the addressee. If you are not
> the intended recipient, any disclosure, copying, distribution or any action
> taken or omitted to be taken in reliance on it, is prohibited and may be
> unlawful. Any views expressed in this e-mail are those of the individual
> sender, except where the sender specifically states them to be the views of
> Clearstream International or of any of its affiliates or subsidiaries.
>> 
>> END OF DISCLAIMER


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Inconsistent behavior...

2002-04-18 Thread LiangTyan Fui

On 4/18/02 8:01 PM, [EMAIL PROTECTED] wrote:

> Because the filter command only works with files... (get the files)
> I just tried again to check reality (2.4build4) with filter but it returned
> empty...
> 
> did it work for you?

I have never used it on files list ... yet ;-)

-- 

>> -Original Message-----
>> From: LiangTyan Fui [mailto:[EMAIL PROTECTED]]
>> Sent: 18 April 2002 13:47
>> To: [EMAIL PROTECTED]
>> Subject: Re: Inconsistent behavior...
>> 
>> 
>> On 4/18/02 6:07 PM, [EMAIL PROTECTED] wrote:
>> 
>>> my mistake. The script calling this function had a bug!
>>> Sorry!
>> 
>> Why don't you just use:
>> filter olist with ("*"& str &"*")
>> 
>> Regards,
>> LiangTyan Fui
>> 
>> 
>>> Xavier
>>> 
>>>> -Original Message-
>>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>>> Sent: 18 April 2002 11:33
>>>> To: [EMAIL PROTECTED]
>>>> Subject: Inconsistent behavior...
>>>> 
>>>> 
>>>> Here's an extremely fast search function.
>>>> The function filters lines from a variable (olist) containing
>>>> a string...
>>>> 
>>>> function FilterLines olist,str
>>>>  set the wholematches to false
>>>>  put 1 into thisline
>>>>   put "" into nulist
>>>>   repeat while thisline > 0
>>>> set cursor to busy
>>>> 
>>>> put LineOffset(str,olist) into thisline
>>>> put line thisline of olist & return after nulist
>>>> delete line 1 to thisline of olist
>>>> if olist is empty then exit repeat
>>>> 
>>>>   end repeat
>>>>   return nulist
>>>> end FilterLines
>>>> 
>>>> my olist looks contains
>>>> 4/16/02,11:15 AM,BUFFET,F,543923,15571
>>>> 4/16/02,11:15 AM,BUFFET,E,475933,53211
>>>> 4/16/02,11:15 AM,BUFFET,D,441937,31518
>>>> 4/16/02,11:15 AM,BUFFET,C,15,14
>>>> 4/12/02,12:51 PM,BUFFET,F,543923,40982
>>>> 4/12/02,12:51 PM,BUFFET,E,475933,56361
>>>> 4/12/02,12:51 PM,BUFFET,D,441937,27808
>>>> 4/12/02,12:51 PM,BUFFET,C,15,14
>>>> 
>>>> The string im searching for is ","&"F" &","
>>>> 
>>>> When I do the search, with wholematches = true (first line in
>>>> FilterLines)
>>>> only the first line is found... If I set wholematches to
>>>> false, it finds all
>>>> the lines...
>>>> Of course, I tried to change the searchstring to "BUFFET,F,"
>>>> but there is no
>>>> change.
>>>> 
>>>> Can anyone see the problem? I can't search for F alone...
>>>> Changing the comma in the lists would mean too much
>>>> programming changes in
>>>> my application...
>>>> 
>>>> Why can't this work???
>>>> 
>>>> Thanks for any help...
>>>> Xavier
>>>> 
>>>> 
>>>> 
>>>> Visit us at http://www.clearstream.com/_focus1.htm
>>>>   
>>>> IMPORTANT MESSAGE
>>>> 
>>>> Internet communications are not secure and therefore
>>>> Clearstream International does not accept legal
>>>> responsibility for the contents of this message.
>>>> 
>>>> The information contained in this e-mail is confidential and
>>>> may be legally privileged. It is intended solely for the
>>>> addressee. If you are not the intended recipient, any
>>>> disclosure, copying, distribution or any action taken or
>>>> omitted to be taken in reliance on it, is prohibited and may
>>>> be unlawful. Any views expressed in this e-mail are those of
>>>> the individual sender, except where the sender specifically
>>>> states them to be the views of Clearstream International or
>>>> of any of its affiliates or subsidiaries.
>>>> 
>>>> END OF DISCLAIMER
>>>> ___
>>>> metacard mailing list
>>>> [EMAIL PROTECTED]
>>>> http://lists.runrev.com/mailman/listinfo/metacard


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Inconsistent behavior...

2002-04-18 Thread LiangTyan Fui

On 4/18/02 6:07 PM, [EMAIL PROTECTED] wrote:

> my mistake. The script calling this function had a bug!
> Sorry!

Why don't you just use:
filter olist with ("*"& str &"*")

Regards,
LiangTyan Fui


> Xavier
> 
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>> Sent: 18 April 2002 11:33
>> To: [EMAIL PROTECTED]
>> Subject: Inconsistent behavior...
>> 
>> 
>> Here's an extremely fast search function.
>> The function filters lines from a variable (olist) containing
>> a string...
>> 
>> function FilterLines olist,str
>>  set the wholematches to false
>>  put 1 into thisline
>>   put "" into nulist
>>   repeat while thisline > 0
>> set cursor to busy
>> 
>> put LineOffset(str,olist) into thisline
>> put line thisline of olist & return after nulist
>> delete line 1 to thisline of olist
>> if olist is empty then exit repeat
>> 
>>   end repeat
>>   return nulist
>> end FilterLines
>> 
>> my olist looks contains
>> 4/16/02,11:15 AM,BUFFET,F,543923,15571
>> 4/16/02,11:15 AM,BUFFET,E,475933,53211
>> 4/16/02,11:15 AM,BUFFET,D,441937,31518
>> 4/16/02,11:15 AM,BUFFET,C,15,14
>> 4/12/02,12:51 PM,BUFFET,F,543923,40982
>> 4/12/02,12:51 PM,BUFFET,E,475933,56361
>> 4/12/02,12:51 PM,BUFFET,D,441937,27808
>> 4/12/02,12:51 PM,BUFFET,C,15,14
>> 
>> The string im searching for is ","&"F" &","
>> 
>> When I do the search, with wholematches = true (first line in
>> FilterLines)
>> only the first line is found... If I set wholematches to
>> false, it finds all
>> the lines...
>> Of course, I tried to change the searchstring to "BUFFET,F,"
>> but there is no
>> change.
>> 
>> Can anyone see the problem? I can't search for F alone...
>> Changing the comma in the lists would mean too much
>> programming changes in
>> my application...
>> 
>> Why can't this work???
>> 
>> Thanks for any help...
>> Xavier
>> 
>> 
>> 
>> Visit us at http://www.clearstream.com/_focus1.htm
>> 
>> IMPORTANT MESSAGE
>> 
>> Internet communications are not secure and therefore
>> Clearstream International does not accept legal
>> responsibility for the contents of this message.
>> 
>> The information contained in this e-mail is confidential and
>> may be legally privileged. It is intended solely for the
>> addressee. If you are not the intended recipient, any
>> disclosure, copying, distribution or any action taken or
>> omitted to be taken in reliance on it, is prohibited and may
>> be unlawful. Any views expressed in this e-mail are those of
>> the individual sender, except where the sender specifically
>> states them to be the views of Clearstream International or
>> of any of its affiliates or subsidiaries.
>> 
>> END OF DISCLAIMER
>> ___
>> metacard mailing list
>> [EMAIL PROTECTED]
>> http://lists.runrev.com/mailman/listinfo/metacard
>> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: About MC as a very suitable PostGreSQL linkeable WAS...

2002-04-16 Thread LiangTyan Fui

On 4/16/02 11:49 PM, Pierre Sahores wrote:

> Hi List,
> 
> Just some scripts to share there, about how to drive PostGreSQL from
> within Metacard...



I am using the psql command with MetaCard shell instead.
Some incomplete code sample attached.

function sqlexe @sql
  #! postgresql interface
  # sql["sqlcmd"] = the sql query
  # sql["db"] = the database name
  # sql["rsform"] = table format [line | ""], "" for array.
  
  #! hard code some of the command here
  put "psql" into sql["cmd"]
  put "postgres" into sql["user"]
  put "-A" into sql["cmdsuffix"]
  replace cr with " " in sql["sqlcmd"]
  
  if sql["db"] = "" then put "test" into sql["db"]
  #! construct the command line
  put sql["cmd"] &&"-U"&& sql["user"] &" -d "& \
  sql["db"] &" -c '"& sql["sqlcmd"] &"' "& \
  sql["cmdsuffix"] into shellcmd
  #! execute the command in shell
  put shell(shellcmd) into rs
  
  put 0 into x
  put line 1 of rs into sql[x] #! result description
  delete line 1 of rs
  put last line of rs into sql["lastline"] #! record description
  delete last line of rs
  
  if sql["rsform"] = "line" then
put rs into sql["raw"]
put number of lines of sql["raw"] into x
  else
#! build the record table as array
set itemdel to "|"
repeat for each line therec in rs
  put 0 into y
  add 1 to x
  repeat for each item theitem in therec
add 1 to y
    put theitem into sql[x,y]
  end repeat
end repeat
  end if
  
  put x into sql["row"] # number of row
  put y into sql["col"] # number of column
  
end sqlexe

The PHP glue could be faster. But I've tried using the shell command to
obtain a 16 MB data stream without problem: and you don't have to deal with
PHP if you don't feel comfortable with ;-)

Regards,
LiangTyan Fui

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: slow CGI with open socket

2002-03-26 Thread LiangTyan Fui

On 3/27/02 6:56 AM, Pierre Sahores wrote:



> Try :
> 
>> set the socketTimeoutInterval to "10"

Done that, the CGI halted.

-- 

> Best Regards, Pierre Sahores


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: slow CGI with open socket

2002-03-25 Thread LiangTyan Fui

On 3/26/02 12:19 AM, [EMAIL PROTECTED] wrote:

> Any reason why you can't close the socket after you send the reply? Does this
> clog things up for the next request? What happens if you don't close the
> socket, does it get killed when Metacard finishes executing anyway?

It seems the socket get killed after the CGI exit, even if you don't close
it.
Another interesting fact is: the CGI continue to execute till the end even
if you have abandon the browser loading (switching to other page, stop the
loading etc).

Regards,
LiangTyan Fui


> Regards,
> Brian
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: slow CGI with open socket

2002-03-25 Thread LiangTyan Fui

On 3/26/02 1:28 AM, Scott Raney wrote:



> Works fine here, I get about 0.391975 (though why one would use the
> long ticks instead of the milliseconds, I don't know ;-)

Just a HyperCard habit ;-)

> Note that the CGI itself could take up to 10 seconds to exit because
> it waits for that socket to time out, though (.mt scripts won't exit
> while there are open sockets because it doesn't know if maybe some new
> input is pending for them, and immediately opening and closing a
> socket could cause it to assume that there is something like that
> that's supposed to happen).  You won't have this problem if you do
> some actual work that causes the server to close its socket followed
> by your app reading until eof on it.  You could also force this clean

Unfortunately this is not always the case. For example the POP3
conversation, the server often waits for the client to close the socket,
even after a "QUIT" command being initiated. And that was where I've stuck.

> up to occur by calling the openSockets.

Indeed it works by calling openSockets, the CGI abandon immediately.

Regards,
LiangTyan Fui


> Regards,
>   Scott
> 
> 
> Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
> MetaCard: You know, there's an easier way to do that...
> 
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: slow CGI with open socket

2002-03-25 Thread LiangTyan Fui

On 3/25/02 5:07 PM, andu wrote:

> LiangTyan Fui wrote:
>> 
>> OK list, here is a problem that I have no answer for the last 2 days.
>> I am working on Linux based MetaCard CGI, everything went smoothly by far
>> except when I was trying to use "open socket".
>> When a "open socket" command is used, the script took unreadably longer time
>> to exit, even without any problem. I've tried to run the script under Apache
>> as CGI and directly from the shell, both yield the same result.
> 
> Same here. The socket actually takes a long time to close for some
> reason.

Any workaround? Or should I bug report this?

-- 

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



slow CGI with open socket

2002-03-24 Thread LiangTyan Fui

OK list, here is a problem that I have no answer for the last 2 days.
I am working on Linux based MetaCard CGI, everything went smoothly by far
except when I was trying to use "open socket".
When a "open socket" command is used, the script took unreadably longer time
to exit, even without any problem. I've tried to run the script under Apache
as CGI and directly from the shell, both yield the same result.

You may cut the following script and save it as your .mt file in your server
to tryout. Remember to modify the first line of the script to your real MC
runtime engine.

Thanks.

 script start -
#!/home/mc/mc

on startup
  # any local http server will do, if you have one
  put "www.yahoo.com:80" into thesock
  
  put the long ticks into startTicks
  open socket thesock
  close socket thesock
  put the long ticks - startTicks into ticksTaken
  
  put "Content-Type: text/plain"& crlf & crlf
  put "Ticks taken for this CGI to excute: "& ticksTaken
end startup
 script end -

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: AppleScript not working

2002-01-13 Thread LiangTyan Fui

On 1/14/02 2:17 AM, Karl Becker wrote:

>> Karl:
>> I've had a lot of success in 2.4 by setting up my Applescript script in
>> a field (holdMyScript) and then using this line:
>> 
>> put fld holdMyScript into myScript
>> do myScript as applescript
> 
> Thanks Jack, but I've already tried it, it doesn't do it.  When I do
> that inside a card script, no error message is given, and when I do
> that in the message box, I get the "alternate language not found"
> error.
> I'm on Mac OS 9.1 on a beige G3 if that has any bearing on anything...

Try MetaCard 2.4.1 build number 5.
Find this out in the message box by:
put the buildnumber

This is the version that I am using, and I've the same problem on some
versions earlier.

Hope this helps.

Regards,
LiangTyan Fui

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Restart a Mac

2002-01-11 Thread LiangTyan Fui

On 1/10/02 7:09 AM, jbv wrote:

> How can I restart a Mac from within a MC script ?
> 
> Should I use applevents, and send "quit" to the Finder
> or something similar ?

on mouseUp
  do "tell application "& quote &"finder"& quote &" to restart" as \
 "applescript"
end mouseUp

> Thanks.
> JB
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard
> 

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: RFC: Optimizing stripDup()

2001-11-01 Thread LiangTyan Fui

On 11/1/01 3:46 PM, andu wrote:

> LiangTyan Fui wrote:
>> 
>> On 10/29/01 11:09 PM, eugen helbling wrote:
>> 
>>> Hi LiangTyan,
>>> just to demonstrate that the new "split"(I like them) can do in case of
>>> duplicate removing.
>>> 
>>> for example you have a field/variable  having something like
>>> "nameA,firstnameB" & cr & "nameA,firstnameC"
>>> in it, you can use "split" handler to select names witout duplicates.
>>> 
>>> get "nameA,firstnameB" & cr & "nameA,firstnameC"
>>> split it by return and comma
>>> get the keys of it   -- in it you have "nameA" only one time
>> 
>> This could be a good trick on eliminating duplicate records, but I realised
>> it could be a problem on URL parsing.
>> If you try to submit a series of check-buttons or radio-buttons with
>> browser:
>> 
>> MetaCard split test
>> 
>> http://localhost/cgi-bin/echo.mt"; method="get">
>> Option 1
>> Option 2
>> Option 3
>> 
>> 
>> 
>> 
>> The browser constructs the the following string and pass onto the server:
>> http://localhost/cgi-bin/echo.mt?option=1&option=2&option=3
>> 
>> Suppose you are using a split command to parse the query string in the
>> echo.mt script:
>> 
>> put $QUERY_STRING into x
>> split x by "&" and "="
>> put keys(x) into xKeys
>> 
>> you'll get only "option" in xKeys, and x["option"] gives you "3".
>> 
>> Hmm. should I bug report this?
> 
> Would you like to have?
> x["option"]=1
> and
> x["option"]=2
> and
> x["option"]=3 ?

I would preferred:
x["option"] ="1"& cr &"2"& cr &"3"

or
x["option"] ="1"& the itemdel &"2"& the itemdel &"3"

Regards,
LiangTyan Fui


> I'd say it's normal behavior to retain only the last given value.
>>
>> Regards,
>> LiangTyan Fui
> 
> Andu
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: RFC: Optimizing stripDup()

2001-10-31 Thread LiangTyan Fui

On 10/29/01 11:09 PM, eugen helbling wrote:

> Hi LiangTyan,
> just to demonstrate that the new "split"(I like them) can do in case of
> duplicate removing.
> 
> for example you have a field/variable  having something like
> "nameA,firstnameB" & cr & "nameA,firstnameC"
> in it, you can use "split" handler to select names witout duplicates.
> 
> get "nameA,firstnameB" & cr & "nameA,firstnameC"
> split it by return and comma
> get the keys of it   -- in it you have "nameA" only one time

This could be a good trick on eliminating duplicate records, but I realised
it could be a problem on URL parsing.
If you try to submit a series of check-buttons or radio-buttons with
browser:

MetaCard split test

http://localhost/cgi-bin/echo.mt"; method="get">
Option 1
Option 2
Option 3




The browser constructs the the following string and pass onto the server:
http://localhost/cgi-bin/echo.mt?option=1&option=2&option=3

Suppose you are using a split command to parse the query string in the
echo.mt script:

put $QUERY_STRING into x
split x by "&" and "="
put keys(x) into xKeys

you'll get only "option" in xKeys, and x["option"] gives you "3".

Hmm. should I bug report this?

Regards,
LiangTyan Fui


> regards 
> eugen
> 
> LiangTyan Fui wrote:
> 
>> 
>> Here is a function that I've written quite some time ago. It takes a list of
>> text theList, separated by theitemDel, remove duplicate items in the list,
>> and returns a new list without duplicate items.
>> Unfortunately, this function running rather slowly on a large list (a few
>> thousands records) - that is why I am posting here as a little "open
>> source", Request For Comment: Make it faster guys!
>> Remember, the sequence of the records cannot be changed, that say you are
>> not likely to use sort.
>> 
>> Regards,
>> LiangTyan Fui
>> 
>> #
>> 
>> function stripDup theList,theitemDel
>>   # verify param
>>   if theList= "" then return ""
>>   if theitemDel = "" then put cr into theitemDel
>> 
>>   #
>>   set theitemDel to char 1 of theitemDel
>> 
>>   put number of items of theList into theListItem
>>   put 1 into k
>>   repeat
>> put item k of theList into key1
>> repeat with c = theListItem down to k+1
>>   if key1 = item c of theList then
>> delete item c of theList
>> subtract 1 from theListItem
>>   end if
>> end repeat
>> if k >= theListItem then exit repeat
>> add 1 to k
>>   end repeat
>>   return theList
>> end stripDup
>> 
>> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
>> Info: http://www.xworlds.com/metacard/mailinglist.htm
>> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: RFC: Optimizing stripDup()

2001-10-26 Thread LiangTyan Fui

On 10/27/01 2:34 AM, Jacqueline Landman Gay wrote:

> Geoff Canyon wrote:
>> 
>> Maybe something like:
>> 
> 
> Geoff's is faster than mine. I never thought to use arrays. Pretty impressive.

Yup, the winner is Geoff. Thanks!
Now, where should I post this script to?
Do we have an organised xTalk library somewhere? Or should I use
http://www.mctools.org?

Regards,
LiangTyan Fui




Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




RFC: Optimizing stripDup()

2001-10-26 Thread LiangTyan Fui

Here is a function that I've written quite some time ago. It takes a list of
text theList, separated by theitemDel, remove duplicate items in the list,
and returns a new list without duplicate items.
Unfortunately, this function running rather slowly on a large list (a few
thousands records) - that is why I am posting here as a little "open
source", Request For Comment: Make it faster guys!
Remember, the sequence of the records cannot be changed, that say you are
not likely to use sort.

Regards,
LiangTyan Fui

#

function stripDup theList,theitemDel
  # verify param
  if theList= "" then return ""
  if theitemDel = "" then put cr into theitemDel
  
  #
  set theitemDel to char 1 of theitemDel

  put number of items of theList into theListItem
  put 1 into k
  repeat
put item k of theList into key1
repeat with c = theListItem down to k+1
  if key1 = item c of theList then
delete item c of theList
subtract 1 from theListItem
  end if
end repeat
if k >= theListItem then exit repeat
add 1 to k
  end repeat
  return theList
end stripDup


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




stdout in Linux

2001-10-19 Thread LiangTyan Fui

While trying to write a Squid redirect program as stated at the following
page:

http://www.squid-cache.org/Doc/FAQ/FAQ-15.html

I realised that MC output doesn't always sync with the input. The only clue
that I have here is in the document:
"Note that the redirector program can not use buffered I/O"

Is MC using the "buffered" stdout? If so, how do I avoid using the "buffered
I/O"?

I was doing this on MC 2.3 Linux.

Regards,
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC 2.4 final release - when ?

2001-08-31 Thread LiangTyan Fui

On 9/1/01 5:38 AM, jbv wrote:

> Hi list,
> 
> Any idea of when final release for MC 2.4 will be available ?

The Gemma (final candidate) are pretty stable in my case (on Mac OS 9.1),
compared to 2.3.2.
I suggest you go for 2.4 - even it has not been "final released".

-- 


> I'm asking because I have a project that will require heavy use of
> images with full transparency, and only 2.4 supports this.
> Due to tight production schedule, if I have to simulate this on
> 2.3.2, I need to start the work right now, due to the huge amount
> of work...
> If 2.4 gets available sometimes in september, that will save me
> quite a lot of work...
> 
> Thanks.
> JB


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Mirrors

2001-07-11 Thread LiangTyan Fui

On 7/12/01 12:05 AM, Raymond E. Griffith wrote:

> The MetaCard Server appears to be messed up where the 2.4
> section is located. The 2.4 beta itself seems to have
> disappeared.

Most of the mirror sites should be ready by now:
http://groups.yahoo.com/group/metacard_download/links

Regards,
LiangTyan Fui


> Scott -- thought you'd want to know. 2.4 *is* looking good.
> I can hardly wait for the updates!
> 
> Raymond
> 
>> From: Jacqueline Landman Gay <[EMAIL PROTECTED]>
>> Subject: Mirrors
>> Date: Tue, 10 Jul 2001 15:28:00 -0500
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=us-ascii
>> Content-Transfer-Encoding: 7bit
>> 
>> Has anyone mirrored the latest MC beta yet? The MetaCard
> server is
>> running slow again.
>> 
>> --
>> Jacqueline Landman Gay |
> [EMAIL PROTECTED]
>> HyperActive Software   | 612-724-1596
>> Custom hypermedia solutions|
> http://www.hyperactivesw.com


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Mac OS X Internet

2001-06-26 Thread LiangTyan Fui

On 6/27/01 6:12 AM, Mark Talluto wrote:

> I have had no luck here either.  But, I have not done much testing and
> decided not to report as I haven't tried that hard yet.  But, my first
> impressions are the same as yours.

My luck was even worst. I have a clean installed OS X, updated to 10.0.4,
running only MetaCardCarbon 2.4b2.
After a few attempts with the socket "accept" command, my TCP/IP settings
corrupted. So I restarted the machine, but TCP/IP can never be able to
configure correctly. I have to recreate a new location profile with new
Ethernet settings, but it'll just dismissed after I closed the TCP/IP
setting.
I ended up reinstall OS X :-(

Regards,
LiangTyan Fui



> -Mark
> 
> 
> On Tuesday, June 26, 2001, at 02:50 PM, Reed Martin wrote:
> 
>> Hi all,
>> 
>> Thanks for the response, Scott. I could be doing something totally
>> wrong, but I'm running Mac OS X 10.0.4 and Mail.app, OmniWeb, Terminal
>> telnetting, etc. all seem to be able to connect just fine. In MetaCard
>> for OS X, I launched it and, in the message box typed:
>> 
>> answer url "http://www.yahoo.com/";
>> 
>> I waited, grabbed a drink, and 5 minutes later still had nothing. So I
>> command-.'ed out, and got a blank answer dialog. Not surprising. I then
>> tried to open a new stack and created a button with the same script as
>> above. Nothing. I also tried it as:
>> 
>> start using "LibURL"
>> answer url "http://www.yahoo.com/";
>> 
>> but still no luck. So I tried to use the load command:
>> 
>> on mouseUp
>> load url "http://www.yahoo.com/"; with "lDone"
>> send "statRep" to me
>> end mouseUp
>> 
>> on statRep
>> if urlStatus("http://www.yahoo.com/";) is not "cached" then
>> put urlStatus("http://www.yahoo.com/";) into fld 1
>> send "statRep to me in 30 milliseconds
>> end if
>> end statRep
>> 
>> on lDone s
>> answer url s
>> unload url s
>> end lDone
>> 
>> And all field 1 ever said was: "requested". I feel like nobody else is
>> having these problems, and I'm worried I'm missing a crucial step. I
>> tried all of the above with different URLs, and with and without
>> preceding the requests with: start using "LibURL" (which should be by
>> default, loaded?)
>> 
>> This is using 2.4B2 for Mac OS X, tried on an iMac 233, a B&W G3/450,
>> and a PowerBook G3/266. And I tried with 2 different ISPs, and one
>> direct LAN connection..
>> 
>> Any idea what I'm doing wrong, or if there is a bug in MC2.4b2? I'll
>> forward some scripts to [EMAIL PROTECTED] as well. Are other people on
>> this list finding success with internet usage using MC under Mac OS X?


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: FTP downloads

2001-06-21 Thread LiangTyan Fui

On 6/19/01 2:45 AM, Scott Raney wrote:

> LiangTyan Fui <[EMAIL PROTECTED]> wrote:
> 
>> Here is a temporally "mirror" site that you may try:
>> 
>> http://www.magix.com.my/tmp/linux.tgz
>> http://www.magix.com.my/tmp/MacOS.sit
>> http://www.magix.com.my/tmp/README.2.4
>> http://www.magix.com.my/tmp/Win32.zip
>> 
>> I hope I did not violence MetaCard copyright.
> 
> Thanks, there's no problem with redistributing these files under the
> Starter Kit license.
> 
>> BTW: Is this a right time for us to have a few mirror site for MetaCard
>> download?
> 
> We'd encourge this *if* you can commit to keeping the mirrors updated.
> We've used mirrors in the past but this has always been a significant
> problem: The only thing worse than a slow download from the main
> server is getting the wrong version from a mirror, a problem made
> worse when it's new potential customers who run into it because they
> don't know what version they're supposed to be getting.

For start, I have just created a group with Yahoo:
http://groups.yahoo.com/group/metacard_download/links

Everyone are welcome to join the group and offer bookmarks for MetaCard
download mirror site.
If you do not want to offer mirror site later, just delete it.

I'll be pleased if Scott may join the group to keep us inform on new update,
so that we may start updating our mirrors.

Regards,
LiangTyan Fui

> Does anyone else regularly have problems accessing or downloading from
> ftp.metacard.com?  We check it periodically and other than occasional
> delays logging in during peak times, we've never seen any trouble with
> it.  If you do have trouble, it'd be good to run "ping" and/or
> "traceroute" to see if the problem is with the server itself or with
> some part of the path between it and you (i.e., slow downloads are
> often caused by overloaded routers between you and the server, and
> you'll see this as dropped packets in ping and missing time values
> when using traceroute).
> Regards,
> Scott
> 
>> -- 
> 
> 
> Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
> MetaCard: You know, there's an easier way to do that...
> 
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: FTP downloads

2001-06-17 Thread LiangTyan Fui

Here is a temporally "mirror" site that you may try:

http://www.magix.com.my/tmp/linux.tgz
http://www.magix.com.my/tmp/MacOS.sit
http://www.magix.com.my/tmp/README.2.4
http://www.magix.com.my/tmp/Win32.zip

I hope I did not violence MetaCard copyright.
BTW: Is this a right time for us to have a few mirror site for MetaCard
download?

-- 

On 6/18/01 2:04 AM, andu wrote:

> Jacqueline Landman Gay wrote:
>> 
>> Does anyone else have trouble downloading from the MC FTP site? I am
>> getting less than 500 bytes/sec on average, which rapidly dwindles down
>> to 0 and then the download hangs.
> 
> Same here. Took what it looked like hours to get the beta.
> 
>> It took me six tries and over two
>> hours to pull down the 2.4b1 beta, and I am unable to get the 2.4b2 beta
>> at all. I tried downloading just the Read Me only (130K) and my ftp
>> client (Fetch) is still working on it after ten minutes and two
>> re-tries. I've tried downloading in the middle of the night, during
>> weekdays, at all different times, and it is always the same. The problem
>> has been going on for almost a year.
>> 
>> Is there an http address I can use instead to get the betas? If I
>> remember right, I had better luck using a browser to download.
> 
> It's not the client, it's the server.
> 
>> 
>> --
>> Jacqueline Landman Gay | [EMAIL PROTECTED]
>> HyperActive Software   | 612-724-1596
>> Custom hypermedia solutions| http://www.hyperactivesw.com
>> 
>> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
>> Info: http://www.xworlds.com/metacard/mailinglist.htm
>> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 
> Andu
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: size of a file/URL

2001-05-15 Thread LiangTyan Fui

On 5/15/01 11:53 PM, Leston Drake wrote:

> A simple question,
> 
> Does anyone know of a way to find out the size of a file (in Windows)?

put length(url "file:yourfile")

Beware though MetaCard will read the entire file "yourfile" into RAM before
counting it ;-)

Regards,
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Radio

2001-05-14 Thread LiangTyan Fui

On 5/15/01 8:22 AM, Steven Tripp wrote:

> I don't know if anyone is interested but WinRadio (TenTec and Icom also) has
> an all-band radio-box that can be controlled by a computer.

Sound interesting for me. Any application specifically you can do with
computer controlled Radio? On business point of view?

Regards,
LiangTyan Fui

> http://www.winradio.com/home/macradio.htm
> 
> They also have source code on their site for controlling the radio.  Someone
> might be interested in building a MC front end if they like radios.
> 
> Steve T.


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: POST Question

2001-05-06 Thread LiangTyan Fui

On 5/7/01 5:23 AM, Scott Rossi wrote:

>>> How does an HTML form assemble the values found in fields and buttons before
>>> passing them to a server?
> 
> 
> Recently, Andu wrote:
> 
>> Try to "urlEncode" the above and make sure you have a decent header.
> 
> 
> and LiangTyan Fui wrote:
> 
>> use urlEncode to encode your fields' content.
> 
> 
> Thanks guys.  Another dumb question:  if I'm passing multiple variables in
> the expression sent to the server, do I encode the ampersand between each
> value or leave it as an unencoded ampersand character?

Not sure I understand your questing entirely but here goes:
Apply urlEncode to content of your field before constructing the URL, this
would encode ampersand with it safely.
Ampersand ("&") is used to separate field=data set, using it in the field
content would get unexpected result:
field1=myname&field2=address&phonenumber&field3=age
The above URL will be unpacked to become:
field1=myname
field2=address
phonenumber=
field3=age

However, this is also depend on the server end application. If you are using
Perl and its standard library to handle http submissions, follow the rules
tightly.
If you are writing your own CGI (such as .mt file), you are free to do
anything on the URL after the "?" in it ;-)
However, you still have to urlEncode your string before passing to server,
and perform a urlDecode on your CGI.

Hope this helps.

Regards,
LiangTyan Fui


> Thanks & Regards,
> 
> Scott Rossi
> Creative Director, Tactile Media
> 
> Tactile Media, Multimedia & Design
> Email: [EMAIL PROTECTED]
> Web: www.tactilemedia.com
> 
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: POST Question

2001-05-06 Thread LiangTyan Fui

On 5/7/01 12:51 AM, Scott Rossi wrote:

> How does an HTML form assemble the values found in fields and buttons before
> passing them to a server?
> 
> I'm trying to assemble the values of various fields I have on an MC card and
> POST these to a URL.  I tried formatting the values like this:
> 
> name1=My Name&name2=His Name&name3=Her Name

post "name1="& urlEncode("My Name") &"&name2="& urlEncode("His Name") &\
 "&name3="& urlEncode("Her Name") to url "http://theserver.com";

Point here is to use urlEncode to encode your fields' content.

> ...which didn't seem to be correct (according to the server).  I also tried
> placing the values in quotes, but neither format seems to be acceptable to
> the server.
> 
> Thanks for any suggestions.
> 
> Regards,
> 
> Scott Rossi
> Creative Director, Tactile Media
> 
> Tactile Media, Multimedia & Design
> Email: [EMAIL PROTECTED]
> Web: www.tactilemedia.com


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MetaCard 2.4A2 & libURL

2001-04-25 Thread LiangTyan Fui

This maybe off topic a little:
Would it be better to start sharing of the libURL stack by default on 2.4?
This should offer a more transparent upgrade from 2.3 since URL support
available without the need to turn it on.

Regards,
LiangTyan Fui


On 4/25/01 10:40 PM, andu wrote:

> Rolf Kocherhans wrote:
>> 
>> The Readme says :
>> 
>> Support for URL access other than "file:", "binfile", and "resfile"
>> have been moved out into a script library named "libURL" that you must
>> start using before you can access these types of URLs.
>> 
>> Where can I learn how to use the libURL what is libURL and hoe do we
>> have to use it ?
> 
> LibURL is a substack of "MetaCard Menu Bar" stack, if you want to see
> the script.
> 
>> 
>> Can someone please post the smallest possible script so that I can
>> paste it into a button and download for example:
>> "http://www.metacard.com/stacks/tools.mc";.
> 
> start using "libURL"
> put url "http://www.metacard.com/stacks/tools.mc"; into temp
> go temp
> 
>> 
>> Cheers
>> Rolf
> 
> 
> Andu
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




MetaCard 2.4A2

2001-04-22 Thread LiangTyan Fui

Guys, 2.4 Alpha 2 is available quietly!
ftp://ftp.metacard.com/MetaCard/2.4/

Regards,
LiangTyan Fui 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Cookies?

2001-04-19 Thread LiangTyan Fui

On 4/20/01 4:35 AM, Scott Rossi wrote:

> Is there any way to simulate browser cookie behavior/functionality from MC?
> 
> For example, if I script:

set httpheaders to "Cookie: xxx"

> get url "http://www.coolsite.com"
> 
> Is there some way to send what would otherwise be cookie information along
> with this URL?  If possible, would the cookie info simply be appended to the
> address or does it need to be handled differently than a parameter?
> 
> Thanks & Regards,
> 
> Scott

Regards,
LiangTyan Fui 

> _
> Scott Rossi   Tactile Media - Multimedia & Design
> Creative Director Email: [EMAIL PROTECTED]
> Web: www.tactilemedia.com


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: XML everything

2001-04-17 Thread LiangTyan Fui

On 4/18/01 9:00 AM, andu wrote:

> I looked at info on different messaging software the other day and came
> across "Jobber" which is "open source".
> What distinguishes it doesn't seem to be a new technology or philosophy
> but the fact that it's all XML: header information, the message itself
> and client-server control data.
> XML has great advantages at operating with data which is displayed but I
> never understood the usefulness of it when it comes to managing data
> "behind the scene".

In many cases, storing data in XML has advantage of proceeding it with many
other tools - even a word processor. However, we parse XML into array for
processing most of the time. And only store non-critical (small size, no
speed concern) data in XML.

There are no speed advantage of dealing with XML on "behind the scene"
situation, but we realised that user tent to get more complicated nowadays
and would want to deal with data directly.

Don't forget PostScript is far more efficient then HTML on page layout, but
how many person do you know write PostScript file with word processor?

I don't mind to make full use of XML, provided a very efficient XML library
is given (definitely not written by myself ;-). However when come to data
processing, use whatever is native on your system - in our case, the array
in MetaCard.

Regards,
LiangTyan Fui

> Why would one use "andu" instead of "username:
> andu" and stuff like that in a header? Same goes for webDav. The
> overhead of parsing and transmitting at least twice the length of data
> seems unacceptable to me.
> I'd like to hear what other people think on this subject.
> 
> Andu


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: delete file

2001-04-12 Thread LiangTyan Fui

On 4/13/01 8:04 AM, Richard MacLemale wrote:

> Say...
> When you use "delete file" to delete a file on a Mac, does it delete both
> forks (resource and data) of the file?  I'd assume so, but I am
> double-checking...

It does ;-)

> :)
> Richard MacLemale
> Instructional Technology Specialist
> James W. Mitchell High School

Regards,
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: VersionTracker

2001-04-10 Thread LiangTyan Fui

On 4/11/01 10:55 AM, Karl Becker wrote:

> Since MetaCard 2.4 will be coming out soon, VersionTracker.com (one
> of the biggest software downloading places for Mac users) will be
> updated by MC Corp. when the new version comes out (I presume) .
> While looking at versiontracker.com tonite, however, I noticed
> MetaCard has a 1 out of 5 star rating from users, which consists of a
> single user review that criticizes the program for having, among
> other things, no printable docs...
> So, maybe some of we Mac users would like to go here and submit a
> good word or two for MC so it has a different rating when 2.4 is
> released?:-)

Shouldn't be difficult to push the rank up ;-) It is now 3.3 out of 5!

Regards,
LiangTyan Fui


> http://VersionTracker.com/moreinfo.fcgi?id=9878
> 
> Also, it seems my subscription to the list has changed from single
> message mode to digest without me doing a single thing... what is up
> with the list server?  Wish it would simply keep me on single message
> mode like it should be...


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Long files (2.4)

2001-04-10 Thread LiangTyan Fui

On 4/10/01 3:22 PM, Monte Goulding wrote:

> Horses for courses ;-)
> 
> It's no less unusual than the problem

Most of my stacks work intensively with files and directory :-)
Counting the attributes backward may become more complex when developing for
multiple platform (Mac has more items).

I think a more natural solution to this is to have "long files" obey the
itemdelimiter property. For E.g.:

set itemdel to tab
put long files into fld 1

Should get a tab-separated list of file attributes instead.

Hope the next alpha release may accommodate this.

Regards,
LiangTyan Fui


>> On 4/10/01 12:35 PM, Monte Goulding wrote:
>> 
>>> It seems a strange problem but if you are likely to have it why
>> not read the
>>> line backwards. the filename would be item 1 to -5
>> 
>> Not bad for workaround, but I prefer something more usual ;-)
>> 
>> Regards,
>> LiangTyan Fui
>> 
>> 
>>>> 
>>>> In "README.2.4":
>>>> 
>>>>> The function "the long files" returns a comma-separated list of file
>>>>> attributes including the file name, size, modification date,
>>>>> permissions (UNIX), and creator code and file type (MacOS).
>>>> 
>>>> While this a one of the feature that I've waiting for long, there is an
>>>> issue with the returned result.
>>>> MetaCard separate each attribute item with a comma "," where
>> it could be
>>>> problem when we have file name contains comma.
>>>> 
>>>> We might need escape on comma of the file name for
>> interpreting the line
>>>> correctly.
>>>> 
>>>> Suggestion anyone?
>>>> 
>>>> Regards,
>>>> LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Long files (2.4)

2001-04-09 Thread LiangTyan Fui

On 4/10/01 12:35 PM, Monte Goulding wrote:

> It seems a strange problem but if you are likely to have it why not read the
> line backwards. the filename would be item 1 to -5

Not bad for workaround, but I prefer something more usual ;-)

Regards,
LiangTyan Fui


>> 
>> In "README.2.4":
>> 
>>> The function "the long files" returns a comma-separated list of file
>>> attributes including the file name, size, modification date,
>>> permissions (UNIX), and creator code and file type (MacOS).
>> 
>> While this a one of the feature that I've waiting for long, there is an
>> issue with the returned result.
>> MetaCard separate each attribute item with a comma "," where it could be
>> problem when we have file name contains comma.
>> 
>> We might need escape on comma of the file name for interpreting the line
>> correctly.
>> 
>> Suggestion anyone?
>> 
>> Regards,
>> LiangTyan Fui
>> 
>> 
>> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
>> Info: http://www.xworlds.com/metacard/mailinglist.htm
>> Please send bug reports to <[EMAIL PROTECTED]>, not this list.


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Long files (2.4)

2001-04-09 Thread LiangTyan Fui

In "README.2.4":

> The function "the long files" returns a comma-separated list of file
> attributes including the file name, size, modification date,
> permissions (UNIX), and creator code and file type (MacOS).

While this a one of the feature that I've waiting for long, there is an
issue with the returned result.
MetaCard separate each attribute item with a comma "," where it could be
problem when we have file name contains comma.

We might need escape on comma of the file name for interpreting the line
correctly.

Suggestion anyone?

Regards,
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: List auto-unsubscribe? (was "OS X")

2001-03-28 Thread LiangTyan Fui

On 3/29/01 3:34 AM, Simon Lord wrote:

> This has been happening to me ever since we switched over to the
> runrev list.  Unfortunately they cannot find the problem since I have
> been asked to switch internet providers (it's thought that maybe my
> provider was the error).  Well, I can't do that.  I live in a high
> speed access monopoly here, I'm not downgrading to 56K!  :^)
> 
> What I have done is to switch my email to mac.com and send email to
> this list that way.  Seems to work so far but I doubt it has anything
> to do with it now that I see multiple people starting to have the
> same problem.

I was having the same problem too - being kick out even after a few attempt
on subscribe. The moderator advised me to change to a more reliable email
account, so I did and it works well by far.
I presumed the list is too sensitive on dealing with undeliverable
(temporary) messages and making decision to suspend subscriber too fast.
However it may not be the case, since not long after I've change my email
the first email account resume the delivery unexpectedly -- I have to
unsubscribe to stop it.

Regards,
LiangTyan Fui

> At 10:43 AM -0800 3/28/01, Phil Davis wrote:
>> Hi Geoff,
>> 
>> That has happened to me several times over the last few months. The last
>> time was earlier this month: I received MC list mail normally until I
>> responded to a message. For the rest of that day I still received MC list
>> mail, but starting the next day I was apparently no longer subscribed.
>> 
>> Go figger. And of course now I'll have to check tomorrow and see if I'm
>> still subscribed. :-\
>> 
>> Phil Davis
>> 
>> 
>> - Original Message -
>> From: "Geoff Canyon" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Tuesday, March 27, 2001 10:26 PM
>> Subject: Re: OS X
>> 
>> 
>>> At 9:13 PM -0800 3/27/01, Mark Talluto wrote:
>>>>> I have it installed as well.  Can't wait to develop on it.
>>>>> 
>>>>> -Mark
>>>>> 
>>>>> On Tuesday, March 27, 2001, at 02:45 PM, Simon Lord wrote:
>>>>> 
>>>> Ok, I have it installed Scott.  :^)
>>>> 
>>>> Do you have something for me to test???
>>>> --
>>>> 
>>>> Cheers,
>>>> Simon
>>> 
>>> Somehow I got bumped from the list -- again :-(
>>> 
>>> I'll assume that I missed something here and add that I have OS X
>>> installed as well, and a few hundred megabytes reserved for a certain
>>> application--and what I develop with it...
>>> 
>>> gc


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: socket to http

2001-03-23 Thread LiangTyan Fui

On 3/24/01 12:30 AM, andu wrote:

>>> From: LiangTyan Fui <[EMAIL PROTECTED]>
>>> not many http server returns the "Content-Length" header
>> 
>>> One wonders why bother writing standards...
>> 
>> The standard specifies actually two methods:
> 
> You're right...

I think I've figured this out after endless testing from various servers.
However, I was shocked getting result from apache that has no headers at all
-- just bare html (from my newly installed Linux).
Am I missing something?

Regards,
LiangTyan Fui

>> Either you specify the
>> content length, or for streamed contents you simply write your stuff out
>> until you are finished and close the connection. Most CGIs use that,
>> because it is easier to implement... you don't have to bother about
>> counting the number of bytes you'll want to send before you send the first
>> byte.
>> 
>> The content can be chunked, too, but that is really an exception and
>> you'll hardly have to deal with it as long as you don't have really large
>> data blobs.
>> 
>> Regards
>> Rüdiger
> 
> 
> Regards, Andu 
> ___
> [EMAIL PROTECTED]
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Sockets info

2001-03-22 Thread LiangTyan Fui

On 3/23/01 2:18 AM, [EMAIL PROTECTED] wrote:

> I've been seeing a lot of references to sockets on the list.  This is one
> topic (among many) that I am completely ignorant of.  Can someone point me to
> a book or site where I could read up on then and how to use them?

Socket discussions appear more frequently nowadays, but the actual persons
involved on the discussions are rather few (and andu is the most active
person on this topic of all ;-)
Writing socket might be too complicated for xTalk developer - but it is
getting more and more important for sure.
I wish there is a dedicated site for socket discussions and code exchange
but I've doubted how many of us will benefit for it.
The best way to start is to perform an autopsy on andu's httpd stack, but
again even I have written a similar stack, I was having problem to
understand the stack by first glance.

Good luck!

> Philip

Regards,
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: socket to http

2001-03-22 Thread LiangTyan Fui

On 3/22/01 11:46 PM, andu wrote:



> One wonders why bother writing standards...

If "load url" doesn't pause... I've this on the Mac and NT4. Haven't tested
it on Linux.

> Anyway, I also noticed that replies without content length close the
> connection right away
> (no keep-alive) so I use the "socketClosed()" message to stop reading and spit
> out the data. 

I don't find this message in MetaCard help... so all we need is to trap the
socketClose to wrap up the session?

> You'll also notice that errors behave the same with some servers.

You are referring to socketError?

Regards,
LiangTyan Fui

> Regards, Andu 
> ___
> [EMAIL PROTECTED]
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: socket to http

2001-03-22 Thread LiangTyan Fui

On 3/23/01 12:53 AM, Dave Cragg wrote:



> Hi
> 
> In the cases where no "Content-Length" is returned, is the data
> returned in "chunked" style. I've never worked on such data, but I
> think you can check for a "transfer-coding = chunked" line in the
> header. If so, the length of each "chunk" is contained within the
> chunk itself, I think. (Check the HTTP 1.1 RFC for details).

Will pay attention to this ... but haven't come across with
"Transfer-coding" by far.

> In my own endeavors, I haven't come across any servers that don't
> return a "Content-Length" field, but I'm working with a limited
> number of servers.

WebSTAR for instant, and some of my own CGI result ;-)

> Cheers
> Dave Cragg

Regards,
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




socket to http

2001-03-22 Thread LiangTyan Fui

This might be re-inventing the wheel of exiting "put url" and "load url"
commands but here goes:

I was trying to query web site with the "put url" command, but this command
lock the process when the internet link was less than perfect (I am on
dialup most of the time).

So I changed the query method to "load url x with message y" -- helps a
little, but still hog from time to time when the connection was real poor.
The "load url" pause for few seconds (occasionally to a minute)

So I took the trouble to write my own method by using socket, and opened up
a Pandora box.

A typical http session returns something as follow:

HTTP/1.1 200 OK
Server: MetaCard/2.3 ID/11222
MIME-Version: 1.0
Content-type: text/html
Content-Length: 102

And follow by the content of the file.
However, not many http server returns the "Content-Length" header in many
cases (special CGI generated result). So I have problem to determine how
many bytes to read with:
read from socket x for y chars

Anyone out there has better idea of how can I deal with it?

###
Anyone would like a copy of the code may email me privately.


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: .mt script example for cmc.exe on

2001-03-15 Thread LiangTyan Fui

On 3/15/01 10:14 PM, David Bovill wrote:

> Are you sure Andu??? I thought the first shebang line was uix specific shell
> script stuff, and as for calling mc - should this not be changed to cmc or
> cmc.exe?

The first line isn't important when you are running cmc.exe. I've managed to
install cmc.exe on NT 4 but not on 2000.
Do you know how to deal with windows registry? I used that to get IIS
recognising the .mt files. Not sure if 2000 using the same method.

Regards,
LiangTyan Fui


>> From: andu <[EMAIL PROTECTED]>
>> Reply-To: [EMAIL PROTECTED]
>> Date: Wed, 14 Mar 2001 15:47:01 -0500 (EST)
>> To: [EMAIL PROTECTED]
>> Subject: Re: .mt script example for cmc.exe on
>> 
>>> 
>>> Does anyone have an example MC CGI for Win2000?
>> 
>> It should be the same as on Linux.
>> 
>> 
>> 
>> Regards, Andu 
>> ___
>> [EMAIL PROTECTED]
>> 
>> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
>> Info: http://www.xworlds.com/metacard/mailinglist.htm
>> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>> 
>> 
> 
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Apache and MetaCard

2001-02-20 Thread LiangTyan Fui

On 2/20/01 5:04 AM, Pierre Sahores wrote:

>> I have recently tested cmc.exe on IIS (Windows NT 4) and MetaCard CGI on
>> Apache (Linux). Both offer similar CGI interface and portability.
>> The echo.mt file provided on MetaCard web site ran well on Linux, though the
>> NT version need some minor tweaks to get it works flawlessly.
> 
> Could you, please, send me it too, as far i have sometimes to do with NT4
> Servers...

The new cmc.exe is now compatible entirely with the echo.mt script, so it is
not necessary to teak the file.

Regards,
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Apache and MetaCard

2001-02-18 Thread LiangTyan Fui

On 2/19/01 10:41 AM, Scott Raney wrote:

> On Sun, 18 Feb 2001 David Bovill <[EMAIL PROTECTED]> wrote:
> 
>>>> I know Andu http stack could provides a better "glue" for http and
>>>> MetaCard,
>>>> but I am interested to find out how we could do this on IIS (using cmc.exe)
>>>> and Apache (.mt)?
>>> 
>>> There's no way.  Those system just aren't designed to support this
>>> kind of thing.  For one thing, in most Apache installations there are
>>> actually several copies of that program running at a time (mainly so
>>> that if one of them is busy doing a CGI or something the system will
>>> still respond to new connections) and so doing synchronization between
>>> them would be difficult.  If you really need something like this,
>>> you'll need to start yet another MetaCard process (a server) and have
>>> the CGI scripts connect to and communicate with that server.
>>> Regards,
>>> Scott

OK, so we stick to the idea of having separated process to handle http query
- that is fine for me.
But any incentive for us to build large MetaTalk CGI by this way? Perl
allows CGI to include libraries and codes written on separated files, is it
possible for MetaTalk to do so -- at least for the CGI environment like:
#!mc
#include /home/mc/myMetaTalk/mainLib.mt
#include /home/httpd/metatalk/std.mt
on startup
  loadAllMyGlobal # call to handle in the mainLib.mt
  unpackURLParam # call to handle in the mainLib.mt
  doOtherThingsHere
end startup

Without the capability to load external scripts, things can get ugly very
quickly.

Regards,
LiangTyan Fui

>> 
>> Would this be possible with a Metacard Apache Module? Namely to have the
>> ability to load a Metacard stack into memory, and keep it there in a way in
>> which other processes on the server can safely refer to the scripts and data
>> it contains?
> 
> I haven't looked at it in detail, but yes, I think it'd be technically
> possible to do this, at least *within* a process.  Of course, you'd
> run right into the problem that multiple HTTP processes are typically
> started and the data couldn't be shared among them.  There are also a
> lot of limitations for this kind of library on UNIX, like you can't do
> anything that would result in delayed execution such as "send in" or
> asynchronous open/read/write socket.
> 
>> Don't now about IIS on NT, but I guess it would be possible to run a similar
>> Apache/module set up?
> 
> The DLL interface to IIS is similar enough to Apache mods that it
> should work the same way.  Of course, we're not considering doing
> either of these things because it'd be a lot of work and you'd end up
> with something less useful than just writing a little client/server
> system and running MetaCard as a separate server, or just using mchttp
> instead of or in addition to another HTTP server.
> Regards,
> Scott
> 
> 
> Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
> MetaCard: You know, there's an easier way to do that...


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Apache and MetaCard

2001-02-17 Thread LiangTyan Fui

I have recently tested cmc.exe on IIS (Windows NT 4) and MetaCard CGI on
Apache (Linux). Both offer similar CGI interface and portability.
The echo.mt file provided on MetaCard web site ran well on Linux, though the
NT version need some minor tweaks to get it works flawlessly.

However non of these CGI implementations match the one that I've been
dealing with on the Mac (WebSTAR and MetaCard combo).
MetaCard is running as an application on the Mac, it won't quits nor
restarts on every query - by this way, I may preserve all the globals, and
using stack script to build large library of handles/functions.

Now the question is:
How can I do the same based on Apache + MetaCard or IIS + MetaCard?

I know Andu http stack could provides a better "glue" for http and MetaCard,
but I am interested to find out how we could do this on IIS (using cmc.exe)
and Apache (.mt)?

Thanks.
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Apache and MetaCard

2001-02-16 Thread LiangTyan Fui

I have recently tested cmc.exe on IIS (Windows NT 4) and MetaCard CGI on
Apache (Linux). Both offer similar CGI interface and portability.
The echo.mt file provided on MetaCard web site ran well on Linux, though the
NT version need some minor tweaks to get it works flawlessly.

However non of these CGI implementations match the one that I've been
dealing with on the Mac (WebSTAR and MetaCard combo).
MetaCard is running as an application on the Mac, it won't quits nor
restarts on every query - by this way, I may preserve all the globals, and
using stack script to build large library of handles/functions.

Now the question is:
How can I do the same based on Apache + MetaCard or IIS + MetaCard?

I know Andu http stack could provides a better "glue" for http and MetaCard,
but I am interested to find out how we could do this on IIS (using cmc.exe)
and Apache (.mt)?

Thanks.
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Telnet client

2001-02-02 Thread LiangTyan Fui

On 2/3/01 7:15 AM, Scott Raney wrote:

> I recall that awhile back someone on this list said that they had done
> some work on a telnet client using MetaCard sockets.  Anyone know who
> that was, or have any other experience with this?

Hi Scott, this is from my archive.

--
From: Miel <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: 16 Jun 2000 11:43:05 -0700
To: [EMAIL PROTECTED]
Subject: telnet stack

hi all,

my telnet stack (.mc format) can be downloaded at:
www.casema.net/~zweda/telnet.mc

it's not stainless or anything but it's a start. enjoy!


-=[MieL]=-
   
-
Get free email at http://mail.limpbizkit.com

> Regards,
> Scott
> 
> 
> Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
> MetaCard: You know, there's an easier way to do that...


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Simple Sockets?

2001-01-01 Thread LiangTyan Fui

On 1/2/01 1:44 AM, Peter Reid wrote:

> Hi
> 
> I'm just starting to experiment with very simple sockets for message
> between two computers on the same TCP/IP LAN.  I'm taking the scripts
> posted by Kevin on 6 Nov and Mark on 1 Jan as my starting point.
> 
> I'm hoping to use the same stack on both computers, each acting as
> both a host and a client.  Here are some simple/stupid questions:
> 
> 1) is there a reverse of the "accept" command, i.e. the facility to
> stop the host from accepting connections?

Close the port that you have "accept" on.
eg:
 accept connections on port "8080" with message "sockOpen"
 close socket "8080"

> 2) is there any way of finding out the IP address of the current
> computer a stack is running on without making a socket connection to
> another machine?

Not that I know.

Regards,
LiangTyan Fui


> Thanks to both Kevin and Mark for helping me to get started in this area!
> 
> Thanks for any help.
> Peter


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC as CGI on WebStar

2000-11-22 Thread LiangTyan Fui

On 11/23/00 8:11 AM, Sivakatirswami wrote:

> Does anyone know if we can install MC as a CGI "engine" on WebStar on a MAC
> OS 9.0.4 server (and later, on a MAX OSX server)? I don't mean as an HTTP
> server (Webstar will do that) but to handle CGI posts from web pages?

Quick and dirty one:

- create alias of MetaCard application, named as "mc.cgi"
- place the alias in "WebSTAR:cgi-bin:" folder
- login with WebSTAR admin
- create a new action in the "Actions" tag -- Action "MC", Path
":cgi-bin:mc.cgi" (without quotes), Save it.
-  go to "MIME Mapping" tag, create a mime suffix for MC action:-
Action "MC", Suffix: ".mc", Type: "*", Creator: "*", MIME type "text/html",
save it.
- restart WebSTAR (must do this)
- launch MetaCard and create a new stack, place the following code in the
stack script.

on appleEvent class, eventID, sender
  if class & eventID <> "WWW‡sdoc" then pass appleEvent
  put ",kfor,user,pass,addr,svnm,svpt,scnm,"& \
  "ctyp,refr,Agnt,Kact,Kapt,post,meth,Kcip,"& \
  "Kfrq,Kcid,DIRE" into aeArg
  
  put "" into tmp
  repeat for each item argName in aeArg
request appleEvent data with keyword argName
put argname &": "& it &""& cr after tmp
  end repeat

  reply "HTTP/1.1 200 OK"& crlf & \
   "Content-type: text/html"& crlf & crlf &\
  "CGI Echo Result"&\
  "CGI returned result test:"& tmp &\
  ""
end appleEvent

- keep the stack open and front most.

- launch your browser, type "http://yourMachineIP_or_Domain/.mc

Note: try something:
http://yourMachineIP_or_Domain///c/metacard.mc?field=abc
and see what the server returned.

Have fun!

Regards,
LiangTyan Fui


> If so, where is any documentation/installation procedure/ sample scripts on
> how to do this? Thanks!
> 
> Hinduism Today
> Sivakatirswami
> Editor's Assistant/Production Manager
> www.HinduismToday.com
> www.HimalayanAcademy.com
> [EMAIL PROTECTED]
> 
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: About the cmc.exe engine

2000-11-15 Thread LiangTyan Fui

On 11/13/00 7:35 AM, Pierre Sahores wrote:

> LiangTyan Fui a écrit :
>> 
>> On 11/12/00 7:28 PM, Pierre Sahores wrote:
>> 
>>> andu a écrit :
>>>> 
>>>>> Yes, I've been using the AppleEvent handle on Mac for CGI some time ago.
>>>>> But
>>>>> the major concern here is the complexity of the CGI. Suppose I have a
>>>>> chunk
>>>>> of code that would takes a long time to execute (10 seconds?), the second
>>>>> query from the AppleEvent will have to wait.
>>> 
>>> You mc code need optimisation. I would never serve something on the web in
>>> using
>>> a piece of code unable to reply in more than 50/60 ticks.
>> 
>> Even if I can cut each query down to 30 ticks, I'll have problem when I have
>> 5 to 10 hits per seconds - and yes, it happens.
> 
> Congratulations if your server runs with such an hits average. For 10
> hits/second * 3600 * 24 = 864000 hits/day, both macos 8/9 and winnt are going
> to be out of the range and you will need to use an unix server. If the hits
> average is < 15/day, i just know that MacOS 8.1 and up + WebStar 3.02
> (reply timeout set to 900 seconds) + HC/PopToFront or MC will run fine, even
> if some requests are going time-to-time to a slowest service (like
> Lasso/FileMaker) running on the same G3 266 Mhz/292 Mo server. If you want to
> get the same average from a winNT monoprocessor server without crashing it day
> after day, don't try to use any web application server solution (Websphere,
> Oracle, Metacard, etc..) nor any cgi config and just run little ASP/SQLServer
> solutions.

Most of the hits were not coming from the public. The CGI serve webmail for
11 thousands student in a university, based on a 10BaseT Ethernet, so you
can imagine the traffic.

>> On an on going development project, I just don't have luxury to think
>> "optimised" over "functional".
> 
> I agree and when i have to write 28 chars of mc code in a month, i'm happy
> to know that the stuff will be web served by a Linux box ;-)

I just started intensively testing MetaCard socket on Linux, maybe I'll port
the webmail CGI to Linux based on MetaCard socket, integrated with MCHttpd
if possible.

>>>>> In most case this is ok if I plan carefully, but when I start deploying
>>>>> complex solution this way, I have to always ensure:
>>>>> - each query has to be short
>>> 
>>> Use only "POST" procedures and boost the Ram over more than 256 Mo.
>> 
>> Can you elaborate how "POST" is better then "GET"?
> 
> 1.- Because each post request need to be recognised by the web application or
> cgi script by its name/value key, the server will not answer anything to an
> unrecognised key (server more secure againt attacks where it's always easiest
> to crashe a server in sending it a non autorised get request).
> 
> 2.- Because the length of a post request is only limited by the ram avalaible
> on the server.

If this is the case, there is no speed different issue I presumed?



Regards,
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: About the cmc.exe engine

2000-11-12 Thread LiangTyan Fui

On 11/12/00 7:28 PM, Pierre Sahores wrote:

> andu a écrit :
>> 
>>> Yes, I've been using the AppleEvent handle on Mac for CGI some time ago. But
>>> the major concern here is the complexity of the CGI. Suppose I have a chunk
>>> of code that would takes a long time to execute (10 seconds?), the second
>>> query from the AppleEvent will have to wait.
> 
> You mc code need optimisation. I would never serve something on the web in
> using
> a piece of code unable to reply in more than 50/60 ticks.

Even if I can cut each query down to 30 ticks, I'll have problem when I have
5 to 10 hits per seconds - and yes, it happens.
On an on going development project, I just don't have luxury to think
"optimised" over "functional".

>>> In most case this is ok if I plan carefully, but when I start deploying
>>> complex solution this way, I have to always ensure:
>>> - each query has to be short
> 
> Use only "POST" procedures and boost the Ram over more than 256 Mo.

Can you elaborate how "POST" is better then "GET"?

>>> - push complex processing to other application, if I use MetaCard (the CGI
>>> in this case), the CGI will still hog.
>>> - slice long processing with "send xxx to yyy in 1 second with ", making
>>> codes become more complex.
> 
> Hum ! Code optimisations needed...

Hmmm... sometime you just cannot optimise more ;-)

>>> Even with all the above, I still get unreasonable performance on extremely
>>> busy situation (10 to 20 cgi hit a second?)
>>> 
>>> Well I must say this has something to do with AppleEvent and the way CGI has
>>> been implemented on the Mac. The same limitation are effecting ALL CGIs on
>>> the Mac as well, not only MetaCard.
> 
> I agree too if is it to say that Unixes both cgi's and web applications
> servers solutions are the best ways to serve complexes web solutions in using
> php, omnisstudio, webobjects or, best, metacard (i'm still testing a mc/mysql
> solution on Linux and it seems it could become a good way to serve the
> web...).

How do you access mySQL from MC? Sorry if this has been discussed in this
list.

> I'm not sure to agree if someone think WinNT/Apache or WinNT/IIS4 (XiTami not
> tested for yet) are better handling cgi or web apps solutions than MacOS 8.6 +
> WebStar 3.02 + AppleEvents (boosted by the free and very fine PopToFront XCMD
> from Maxum Corp) + HC or MC...

I noticed MetaCard runs fine in the background (Mac). I used to keep
HyperCard running as front most application in order to build a reasonable
responsive CGI, but with MetaCard, putting WebSTAR as front most seems
faster.

> Just see one of my last mails about the answers delays for the same mc e-com
> solution tested on macos, linux and winnt. I have installed such a G3 solution
> on a professional backbone witch run without any app bugs or system crashes
> since 01/98.

But again you were referring to a relatively simple CGI request, and
probably low traffic web site.

> The problem with the macos way (and winnt too) is the system memory handling.
> To get good results on mac, you must avoid the use of "GET" requests, have
> more than 256 Mo of ram installed and optimise the hc/mc code even more and
> more... Sure that today, it's probably better to use unixes, even in waiting
> for MacOS X, in all cases...

Couldn't agreed more.

> On the other hand, WinNT seems unable to handle cleanly others web serving
> solutions than asp's/sql server (the separated memory processes system is only
> reserved to SQL Server, most of the jobs are handled in the Win Apps partaged
> memory process, just like MacOS 8/9 does) and, clearly, it's not working as
> fine as a clean configured MacOS 8 solution can.
> 
>> 
>> Most inefficient, I agree. Not sure I understand your comment bellow but
>> MCHTTPd *is*
>> the way to go (in theory) in terms of efficiency in this case. Unfortunately
>> I didn't have
>> enough motivation to develop it beyond the demo state.
> 
> I did'nt test it enough and could'nt handle "POST" requests in using it.

That could be easily enhanced I think. But I cannot understand why must POST
better then GET? Is this a browser issue or server? I use both - and frankly
I was avoiding POST if necessary - GET is easier to debug where everything
is clear on the browser URL.

Regards,
LiangTyan Fui


>> But talking about web servers I recently experimented with Xitami and I
>> highly
>> recommend it as an alternative to Apache at least when it comes to
>> configuration.
>> Related to this discussion, it has no 

Re: About the cmc.exe engine

2000-11-12 Thread LiangTyan Fui

On 11/12/00 3:11 PM, andu wrote:

>> Yes, I've been using the AppleEvent handle on Mac for CGI some time ago. But
>> the major concern here is the complexity of the CGI. Suppose I have a chunk
>> of code that would takes a long time to execute (10 seconds?), the second
>> query from the AppleEvent will have to wait.
>> In most case this is ok if I plan carefully, but when I start deploying
>> complex solution this way, I have to always ensure:
>> - each query has to be short
>> - push complex processing to other application, if I use MetaCard (the CGI
>> in this case), the CGI will still hog.
>> - slice long processing with "send xxx to yyy in 1 second with ", making
>> codes become more complex.
>> 
>> Even with all the above, I still get unreasonable performance on extremely
>> busy situation (10 to 20 cgi hit a second?)
>> 
>> Well I must say this has something to do with AppleEvent and the way CGI has
>> been implemented on the Mac. The same limitation are effecting ALL CGIs on
>> the Mac as well, not only MetaCard.
> 
> Most inefficient, I agree. Not sure I understand your comment bellow but
> MCHTTPd *is* the way to go (in theory) in terms of efficiency in this case.
> Unfortunately I didn't have enough motivation to develop it beyond the demo
> state.

Socket in MetaCard is rather powerful. But I haven't been able to test it
out entirely yet, even after a few months putting it on the production
server for handling browser file upload, I am still not sure how reliable
this can be (I have taken it down after WebSTAR has a workaround for file
upload to work consistently)

While MetaCard is extremely easy for most of us, but socket could be too
"low down" in most cases. It is not as simple as "put url" single line
scripting, you'll most likely end up writing massive functions and "with
message" kind of calling to complete a socket implementation (more complex
on dealing files with with "open file" commands). I would think thread
supports on MetaCard for these face-less implementations would be nice - at
least from my point of view ;-)

Imagine:
on something_coming_from_socket theSocket
  create process "myProcess" with script of btn "scriptTemplate"
  send theSocket to process "myProcess"
end something_coming_from_socket

That would be good!

Yes, this is rather demanding - Scott might needs to revamp the entire
MetaCard engine for this, but I always bound into situation where thread may
offer easier way out.

Regards,
LiangTyan Fui


> But talking about web servers I recently experimented with Xitami and I highly
> recommend it as an alternative to Apache at least when it comes to
> configuration.
> Related to this discussion, it has no problem calling MC cgi scripts.
> 
>> 
>> While the cmc.exe and Unix based MetaCard have advantage to handle queries
>> simultaneously, but overhead on loading the CGI and initialising the
>> solution might be high. And concept of implementing these CGI is very
>> different on the Mac CGI (and MCHttpd too).
>> 
>> Regards,
>> LiangTyan Fui
>> 
> 
> Regards, Andu 
> ___
> [EMAIL PROTECTED]
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: About the cmc.exe engine

2000-11-11 Thread LiangTyan Fui

On 11/12/00 12:15 AM, Pierre Sahores wrote:

> LiangTyan Fui a écrit :
>> 
>> On 11/11/00 7:43 PM, Pierre Sahores wrote:
>> 
>>> Hi anybody,
>>> 
>>> Does anyone use the win32 cmc.exe engine and if yes, what is the right
>>> config
>>> to use to get .mt scripts running (WinNT 4 sp5) with both Apache and IIS4
>>> httpds  ?
>> 
>> I've just tested it a few days ago with IIS3 on NT4.0 sp6.
>> Pretty good I would said, but I am still yet to find out more on how I can
>> build a complex CGI solution on NT (calling library, build re-usable
>> scripts)
>> 
>> Read Chapter 10 on the NT IIS configuration page, it shows you all you need
>> to get the CGI works. Remember to place cmc.exe on a "clean" directory,
>> excluding any of the MetaCard appl or stacks.
> 
> Thank's. I'm new to win32 (MacOS and Linux prefered).
> 
>> 
>> I wish the similar engine can be built for Mac OS 9, but since OS X is
>> coming .
> 
> You can use the regular mc engine in using appleevents to speak directly with
> webstar, ASIP or quidproquo.

Yes, I've been using the AppleEvent handle on Mac for CGI some time ago. But
the major concern here is the complexity of the CGI. Suppose I have a chunk
of code that would takes a long time to execute (10 seconds?), the second
query from the AppleEvent will have to wait.
In most case this is ok if I plan carefully, but when I start deploying
complex solution this way, I have to always ensure:
- each query has to be short
- push complex processing to other application, if I use MetaCard (the CGI
in this case), the CGI will still hog.
- slice long processing with "send xxx to yyy in 1 second with ", making
codes become more complex.

Even with all the above, I still get unreasonable performance on extremely
busy situation (10 to 20 cgi hit a second?)

Well I must say this has something to do with AppleEvent and the way CGI has
been implemented on the Mac. The same limitation are effecting ALL CGIs on
the Mac as well, not only MetaCard.

While the cmc.exe and Unix based MetaCard have advantage to handle queries
simultaneously, but overhead on loading the CGI and initialising the
solution might be high. And concept of implementing these CGI is very
different on the Mac CGI (and MCHttpd too).

Regards,
LiangTyan Fui




Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: About the cmc.exe engine

2000-11-11 Thread LiangTyan Fui

On 11/11/00 7:43 PM, Pierre Sahores wrote:

> Hi anybody,
> 
> Does anyone use the win32 cmc.exe engine and if yes, what is the right config
> to use to get .mt scripts running (WinNT 4 sp5) with both Apache and IIS4
> httpds  ?

I've just tested it a few days ago with IIS3 on NT4.0 sp6.
Pretty good I would said, but I am still yet to find out more on how I can
build a complex CGI solution on NT (calling library, build re-usable
scripts)

Read Chapter 10 on the NT IIS configuration page, it shows you all you need
to get the CGI works. Remember to place cmc.exe on a "clean" directory,
excluding any of the MetaCard appl or stacks.

I wish the similar engine can be built for Mac OS 9, but since OS X is
coming .

Regards,
LiangTyan Fui

> Thank's for the help !
> 
> Pierre Sahores
> 
> chef de projet cyberlibrairie
> SNPIN - CNDP. 91, rue Gabriel-Peri
> 92120 Montrouge. Tél.: 01.64.45.05.33
> 
> Penser la part du rêve et
> produire l'avantage compétitif.
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.