|
| Do you want to replace the PDF forms with a Metacard version, or use
| Metacard to manage and display the PDF forms?
Hi Dave, thank you for responding.
We don't intend to replace PDF forms with Metacard forms, but
only because we think PDF makes things easy. We
|
| OK, trying here to get this .mt thing going. Metacard is installed on our
| San Diego Apache server...
|
| Using the survey.mt as a model I created this small script:
|
| #!/usr/local/bin/mc
| on start up
|if $REQUEST_METHOD is POST then
|read from stdin until empty
|put it
|
| I see this is turning nasty and for no good reason.
| Simon's offering of free server space *and* Metacard engine for testing
| cgi scripts should be appreciated.
| Also, his security concerns should be taken as such, final testing and
| fine tuning of scripts on a public server I think is
| So
| a) trying to understand the outside referrer business for CGI's called from
| distributed stacks and
Swamaji,
Everyone is a novice in some area! Let us not hesitate to speak
here in the assembled of the learned even if we don't know what
we are
Question from an Apple newbie,
What should I do to prepare an MC MAC 'stand alone' for distribution?
Does it need to be 'stuffit-ed' ? I built a stand alone on my mac laptop,
put it on the web, but when I download it with IE to another mac, that
mac thinks its a text file, not an executable.
permissions. That is all there is to it!! Then,
you can write any MC scripts using the right first line to point to the
mc file, again, making them executable.
Regards,
Sadhunathan Nadesan
CIO, Cast Crew
PS, Some helpful files:
This simple script can be installed as a cgi on your host to help
|
| Play safe, we consider mchttpd experimental until it's *wrapped*.
|
Suppose one set the permission on the mc file to 700
permission owner group
...
-rwx--sadhusadhu
Would this accomplish the same thing, ie, no one else but the owner
|
| From: [EMAIL PROTECTED]
| Subject: Re: Installing MC at your ISP, a How-To
snip
|
| And
| if you launched it as a user with admin privileges, cross your
| fingers.
Sir,
Isn't this highly unlikely, that an ISP would grant regular users any
kind of admin privileges? No wrapper is
|
| You make a point of telling people their car's gas tank may
| explode while driving but that doesn't stop them from driving
| anyway. Your point is based on what a driver knows about their
| environment, to put it another way, what if a passenger came
| along and placed a flaming rag
| --- MESSAGE metacard.v004.n426.3 ---
|
| From: Scott Raney [EMAIL PROTECTED]
| Subject: Re: OT: Page generation Do it locally or ...
| Date: Tue, 14 Aug 2001 15:16:51 -0600 (MDT)
|
| OR
|
| 3) have the server generate it, but only once per day. There are
|several
Bug?
The documentation for the round function states that .5 or larger
rounds up. But apparently, it is not consistent, and sometimes rounding
up occurs at 0.5, not = 0.5.
round(1.335, 2) returns 1.34
but
round(38.175, 2) returns 38.17
on my machine.
I'm thinking as a work around, just
| | From: Richard Herz [EMAIL PROTECTED]
| | Subject: Re: Math errors, HELP!
| | Date: Tue, 14 Aug 2001 14:15:45 -0700
| |
| |
| | The code you supplied and put into EXAMPLE 2 below works OK. EXAMPLE 1
| | below shows a similar rounding problem that can occur with the MC format
| | function.
This script courtesy of Rich Herz [EMAIL PROTECTED]
Aloha, Scott:
I call this a bug in the round function. I get the same results on a
Windows PC. I believe some would disagree. What do you think?
Whatever it is called, I find I have to compensate for it doing
dollar arithmetic where one
Hi Geoff,
I saw your post, looked at the scripts in the 'print field' stack. Wow,
it seems so complicated. From what I could glean, it seems you cannot
just print a field, you have to put the stuff into a card, and print
the card.
So anyway, my problem is, I have a scolling field that is
Kevin, you sent me this a while back: (on how to save data with
standalones)
| You need to place the stack that you want to save changes in an external
| file, then reference this stack using the stackFiles property. When you
| load your standalone, load this stack, make changes and save as
Aloha,
Oh darn, getting frustrated with the stack architecture and know there
must be a simple solution. The problem is hard to describe in detail
since I have tried so many combinations of things all of which failed,
but in a nutshell, I think it is the fact that substacks get saved in
the
/ FROM: Robert Brenstein [EMAIL PROTECTED], Dec 12 1:30 2001
| ABOUT: Re: stack architecture
|
| Problem is that 2 has to be a substack of 3 to inherit its algorithms
| and this causes the files to be saved as each other. I have them
| horribly mixed together and delete doesn't remove the
Hello,
Has there been any response to Swami's query below? I am
having a similar problem with Post. Worked on 2.3. Fails
on 2.4 - IF - I build a standalone.
I'm using a mail reflector (Matt's FormMail.pl), I have some
code that:
Hasn't changed
Works from a Windows standalone
This posting is for the benefit of the technical archives, regarding an
apparent problem I ran into, and worked around. Not sure if this is
something I am doing wrong, or a problem with MC, Linux, or what.
Context
---
Using MC as a cgi scripting language on RH Linux, to perform data base
|
| OK, here's a question. When darwin mc is running, what is it running AS?
| It can write to files with read/write (everyone), but cannot write to files
| with read only (everyone.) If I knew what it was running AS, I could put
| that into a group and simplify my life. When I use the shell
| Date: Sat, 09 Mar 2002 08:37:38 -1000
| Subject: Time Date Problem on Sun SPARC SOLARIS
| From: Sivakatirswami [EMAIL PROTECTED]
| To: Metacard List [EMAIL PROTECTED]
| Reply-To: [EMAIL PROTECTED]
|
| I am running a .mt script as a CGI on a Sun SPARC Solaris that hosts our web
| site in
| Today's Topics:
|
|1. GGI works and then doesn't work--global replace (Sivakatirswami)
Swami,
This doesn't solve the problem but may give you a clue? As you know,
the premature end of headers message from apache occurs when the cgi
script returns something that is not html.
In your
|
| Has anyone implemented a system like this? Is there a better way? Can
| anyone point me to a model I could follow?
|
Hi,
Yes, we've implemented some things like this. Either custom cgi's or
using the FormMail.pl script from Matt's perl archives.
In other words, the problem is - trying
Well, Swami, I should probably remain silent on this, not having an OSX
around - but the quick and fraught with peril answer may be - log in
as root.
(I would expect to hear back a few no, don't do it! responses from
seasoned Unix veterans, because it lets you overcome all sorts of
permission
Hi
Just run the script directly from the command line and
see what error message you are getting back from either
Unix or MC.
Premature end of headers means apache got something that
was not prefixedwith the content type etc, ie, the
script didn't run.
Sadhu
| Message: 1
| Date: Fri, 05 Jul
Aloha,
We have identified an intermittent bug situation using MC as a CGI
language which I will submit to the bug list. Personally I don't read
the bug list emails and I imagine there are others who don't either
but who might like to know of the existence of the situation.
In a nutshell it is
Promised 3rd mail follow up.
3. back end cgi
...cut here
#!/usr/local/bin/mc
#*
#
#-= Web Stuff =-
#
# Program name: test_approve.mt
# Version
Bonjour Pierre,
Ah, merci for the confirmation! Yes, good idea, just put something in
front of MC to handle the sockets communication. That probably would
have been faster than a complete rewrite in Perl. Did you ever hear
anything from Scott or his team about fixing these bugs? Anyway, will
| Subject: Re: Web-PHP-Metacard Process FAQ
Pierre, excuse me for butting in here ..
|
| First : Do you have a linux box with apache, php and mc installed on it
| ? (If yes, it will be a piece of cake to explain how to run MC as a
| WAS).
Swami has for deployment a Sun OS box with
Aloha,
Can anyone help me with some ideas for copy protection?
I'm developing a small Windows application that I want to give
for free to existing customers, but I don't want them able
to use it after they are no longer customers, or, making
copies for friends. I'd prefer something more
| Try something alike :
|
| on mouseup
| put 1 into startread
| open file thefile for read
| read from file thefile until eof
| put the num of lines of it in endtoread
| close file thefile
| repeat while startread endtoread
| open file thefile for read
| read from file thefile at
| Try something alike :
|
| on mouseup
| put 1 into startread
| open file thefile for read
| read from file thefile until eof
| put the num of lines of it in endtoread
| close file thefile
| repeat while startread endtoread
| open file thefile for read
| read from file thefile at
Wow,
Just logged on to work and saw all the great responses. Thanks all,
what fun.
Anyway I will respond to each later and try your code too. I have
to run right now, appointment.
I did however have some code from Andu via Swami that I modifed
somewhat and got enormous speed improvement.
| I'm confused: if the point is to avoid reading the entire file into memory,
| isn't what what line 8 does? And if it's already in memory, why is it read
| again inside the loop?
|
| I think I missed something from the original post
Hi
Sorry, yes you missed something but not from the
| If we're allowed to read the whole thing into RAM and the goal is the count
| the occurences of the string mystic_mouse, then to optimize speed we can
| just remove the redundant read commands and use offset to search for us:
|
| #!/usr/local/bin/mc
| on startup
| put /gig/tmp/log/xaa into
|
| I'm pretty sure the problem with speed here is from reading in the entire
| file.
| Unless of course you have enough free RAM- but that's hard to imagine when
| the files are 300MB+.
|
| How about this, which you can adjust to read any given number of lines at a
| time.
| Try it with 10,
|
| One last note:
|
| Be careful of using read from file xxx for yyy
|
| If you do not read for lines, you run the risk of cutting a line in half on
| the spot where your magic string occurs.
|
| So always use read from file xxx for yyy LINES
|
| HTH.
| Brian
|
Good point. For
| # repeat for each line this_line in the_text
| # if (not eof) then
| # if (this_line contains mystic_mouse) then
| # put the_counter + 1 into the_counter
| # end if
| # end if
| # end repeat
|
| close file the_file
| Allo Sadhu,
|
| Perhaps
| So that is 1:53 for bash, 2:04 for pascal, and 2:19 for MC. darn good!
|
| But golly, I thought an interpreted language like MetaTalk was supposed to
| be slow, certainly much slower than compiled Pascal.
|
| :)
|
By golly, that would be I think the conventional wisdom alright!
Another
I got this suggestion from Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
repeat
read from stdin until mystic_mouse
if the result is not empty then add 1 to the_counter -- found it
else exit repeat -- encountered end of file, no more occurrences
end repeat
put the_counter
But I was not
Ok, here are the results so far,
bash
Sun Nov 10 13:01:59 PST 2002
17333
Sun Nov 10 13:03:43 PST 2002
pascal
Sun Nov 10 13:03:43 PST 2002
17333
Sun Nov 10 13:05:47 PST 2002
andu's metacard
Sun Nov 10 13:05:47 PST 2002
29623
Sun Nov 10 13:08:10 PST 2002
pierre's metacard
Sun Nov 10 13:08:10
| So ! MC as far so fast than Pascal ! Is'nt it great ? And, thanks again
| to Scott, for that too !
|
| It's enough to make a Java programmer cry. ;)
|
| Java ? Help me to remember... Are you speaking, Richard, in about this
| dead marketed toy that crashes any time he search some more
| Actually, this says more about your specific implementation of the algorithm
| and/or the quality of your compiler than it does about the relative speed
| merits of any given language. As in your bash example, the bash shell
| actually calls functions from libraries of well written highly
|
| Message: 1
| Date: Thu, 14 Nov 2002 10:39:01 -0700
| Subject: RE: the large file challenge
| From: John Vokey [EMAIL PROTECTED]
| To: [EMAIL PROTECTED]
| Reply-To: [EMAIL PROTECTED]
|
| To be fair: most of metacard is coded in metatalk; it is a
| boot-strapped language, much like many of
| Maybe we need a new name for what Transcript does.
|
| Transcript pre-processes scripts into pointer-based bytecode, which
| generally outperforms purely interpreted xTalk by anywhere from several
| times to a few orders of magnitude.
|
Maybe? This is an excellent clarification. If MC is
| Date: Sun, 08 Dec 2002 15:51:00 +
| Subject: MC on Apache and CGI
|
| As I want to use MC for cgi in more and more projects, I'd
| be very glad if someone could take a part of his time and explain
| everything to me (or at least everything I need to know), on or
| off list, it doesn't
| Message: 5
| Date: Sat, 7 Dec 2002 15:33:46 -1000
| Subject: Faceless CGI challenge/print incoming text-email files
| Cc: [EMAIL PROTECTED]
| To: [EMAIL PROTECTED]
| From: Sannyasin Sivakatirswami [EMAIL PROTECTED]
| Reply-To: [EMAIL PROTECTED]
|
| OK, well maybe it's not a challenge maybe it
Fantastic, Pierre!
Simple is beautiful.
Do you happen to have any working examples, meaning, a front end to
an existing site?
Merci!
Sadhu
|
| Allo Friends,
|
| For the ones using Oracle or PostgreSQL backend databases (unix hosted)
| and wants to drive them from within mc apps, without
Request for proposal:
Hi
I have a project which may be suitable for Metacard. This would be a
budgeting system for Film, TV Commercial producers. We'd like to have
a Mac, Windows, and Web version. The Web version would have a front end
MC client and a back end PostgreSQL data base, while the
| Hello Sadhu,
|
| Just have an eye at http://acacia93.dyndns.org/citalis.xml in using
| visiteur as the login and visiteur (again) as the password. It's a
| small tests purpose dedicated mc/pg web app.
|
| Have fun ;)
Bonjour Pierre,
Ok, I got on, it worked! What is pg? Is this a CGI
| Date: Sat, 04 Jan 2003 07:37:12 -0800
| To: [EMAIL PROTECTED]
| From: Sannyasin Sivakatirswami [EMAIL PROTECTED] (by way of Sadhunathan Nadesan
|[EMAIL PROTECTED])
| Subject: Re: cgi mc/large data reads
|
| Om Sadhunathan:
|
| Wonderful!
|
| You might tell Scott that. I am sure he would
| Alain Farmer
| xCard fanatic
|
| PS: I should probably mention that in addition to all
| of the above, the Java version of FreeCard will be
| able to be embedded into web-pages in the same manner
| that Java applets are. No separate program or plugin;
| the stack in a portion of the web-page.
| Just as you say, Alain and we, all, are going to open l'avenue des
| Champs-Elysees to the web-dedicated metacard developments.
| Because they did'nt know it was impossible,... ;-)
|
| Do you mean you will distribute MC
| stacks and the user won't go through a browser?
|
| You certainly
| won't know either. So I choose MetaTalk. :)
|
| It's too bad that more people don't take advantage of darwin mc. It's easy,
| powerful, and free...
|
Richard, thanks for the perspective. What is darwin mc ??
Sadhu
___
metacard mailing list
| Yes ! I'm building such Metacard based client apps and, with a back-end
| database server available (PostgreSQL, for me), you can do same in using
| (in addition to the server-side code we spoken about some weeks ago in
| this thread) such kind of code to do this client speak with the back-end
|
|
| I'm working on such a stack right now for a client. It posts queries to a
| http server + mc cgi which in turn passes them to the database using
| shell(), then replies the results back to the client. I can't make it
| publicly available though, just a confirmation that it can be done
|
| It's the metacard engine for Darwin. You can slap it into your
| CGI-EXECUTABLES folder and then write MetaTalk scripts to do cool CGI stuff.
|
Ok, I get it. Call me ignorant, but I had no idea what Darwin was.
Your response gave me enough of a clue to do a search on the net and
uncover
|
| Sorry. I'm on so many Mac mailing lists that I forget sometimes that
| everyone else isn't the Mac addict that I am.
|
| OS X is not perfect, no OS is. But OS X is by far my favorite OS to work
| on, and at my job I work on many (Win 98, Win 2K, Win XP, Win NT, Mac OS 9,
| Mac OS X, Mac OS
|
| The best, in my mind, would be to build a general purpose example app,
| directly descibed and shared on the Metacard list, to let evryone become
| able to understand how the purposed technology works and how to reuse it
| to build, from scratch,
| other kinds of dedicated apps.
|
| An updated issue of the MCSQL Address Book example app is available for
| download at :
|
| ftp://crdp.intereduc.net/MCSQLABOOK/
|
| This issue provide a replacement version of the stack addressbook.mc,
| including a new delete card handler, previously bugged.
Greetings, all,
I would
|
| Allo List,
|
| A build 3 issue of the MCSQL Address Book example app is available for
| download at :
|
| ftp://crdp.intereduc.net/MCSQLABOOK/
|
Merci, Pierre,
I'm out of town on a business trip but will install and test
as soon as I get a chance. Good show!
|
| See the installabook.txt for more, including explainations about the
| need of a primary key to index the column name and the needed
| add of a new serial-typed column to the abook pg table, used to add
| to each row an unicity control key...
|
FYI, Pierre, this is what worked for me.
|
| I didn't have time to play with Pierre's thing yet but I kept wondering
| what's the benefit of padding each name with ___ to keep a fixed number of
| chars in the column names?
|
| Regards, Andu Novac
|
Ah, hi
I guess I should have posted one mail of 'gotchas' I found
| Allo Sadhu,
|
| It's exactly the right way to use : i will update the install docs to
| avoid possibles confusions ;)
| --
Allo, Pierre,
You have made a major contribution in figuring this out, IMHO. Thank
you Pierre.
Aloha,
Sadhu
___
metacard
| Subject: Re: MC front end to PostgreSQL
| Reply-To: [EMAIL PROTECTED]
|
| |
| | Allo List,
| |
| | A build 3 issue of the MCSQL Address Book example app is available for
| | download at :
In an earlier post today I said I thought I should have posted to this
list a few gotchas which I had
| Allo Sadhu,
|
| Did you try in using the clone this card command instead of the
| create card one ?
| --
| Cordialement, Pierre Sahores
Problem solved. Thank you Pierre!
___
metacard mailing list
[EMAIL PROTECTED]
Yo,
A newbie question:
I want to wrap some single line text in a text box and not use a
horizontal scroll bar. I have an algorithm that works.
But it is horribly inefficient and I'm sure there must be a better way!
Can you X-talk gurus help me out with this one?
if (the length of this_line
Greetings all,
Building on the work of Pierre, I would like to share with you another
simple MC - web enabled - data base application. This is another example
to show how it's done.
Kindly pardon any over verbosity or belaboring the obious. It's hard
to know who the audience might be,
| Greetings all,
|
| Building on the work of Pierre, I would like to share with you another
That is Pierre Shores, master MC craftsman, whose native
language seems to be French. Mine's English so I'm writing
docs.
| , the middle piece is a CGI program that
| connects
| After that you can do a \d within psql and see your table structure as
| follows
|
| azz= \d
| Database= azz
| +--+--+--+
| | Owner | Relation | Type |
|
| That is Pierre Shores, master MC craftsman, whose native
| language seems to be French. Mine's English so I'm writing
| docs.
Speaking of credits ..
I should also mention the invaluable help of Sanyassin Sivakatirswami,
who has been my MC mentor. He is producing very
| Perhaps if Pierre agrees I will post the actual stack on his ftp server,
| similar to what he has put there.
Pierre agreed. Merci!
BTW, another thing I plan to do is make available a publically
accessible postgres db for this stack, so you can actually
try it, if you are unable to set up
Corrections to lesson 3
1) the subject was lesson 1, should have been 3.
2) the following command is wrong
grant all on azz to 'nobody';
Should be
grant all on azz to nobody;
___
metacard mailing list
[EMAIL PROTECTED]
Strange, somewhere between a version of a stack I had
yesterday, and today, I can't create new cards. But
I don't know how/where this problem crept in??
If I go into the message box and say create card or
say clone this card, and then ask put the number of
cards or put the number of this card,
One thought occurs to me just now is, I notice I have 2.4.3 at
home and 2.4.1 at work and I was passing the stack file back and
forth to work on it. Using resource mover for example. Could this
have messed up my stack?
/ FROM: Sadhunathan Nadesan [EMAIL PROTECTED], Jan 28 8:13 2003
| ABOUT
|
| Resource mover adds some stacks to your main stack and depending of what
| resources you move (libURL) a little script. My impression is that when you
| can create a new cd successfully you use the correct defaultStack(),
| otherwise not. If the stack is locked then you get an error.
|
Hi Jose,
Ok, many thanks.
Sadhu
| Hi Sadhu,
|
| I understand you want to pad the text to a fixed lenght (in fld 1 or in a
| variable) to a fld 2. Try this:
|
| local thetext, counterr, tam
| on mouseup
| put 0 into counterr
| put 80 into tam
|
| repeat for each char x in fld 1
|
| |
| | Just set the dontWrap of the field to true.
| |
|
Actually as it turns out, that works, but I did have to
set it to false. Not sure what I did wrong before,
possibly not saving the stack before testing.
___
metacard mailing list
[EMAIL
Greetings Scott,
Not sure actually if this is a bug report, or I am doing something wrong,
a library mismatch, or maybe, just a request for a 'how to do it the
right way'?? In any case I would appreciate any advice.
Context:
I have a stack that does a post command to a cgi script on a remote
|
| Could it be the shell call waiting for an answer?
| I know I have to wait for the info to return from the shell to be able to
| continue using MC on NT...
|
| Suggestions:
| - send the shell on idle or
| - have an agent app detect a shellfile (file with shell commands to be sent
| by the
|
| You don't need, Sadhu, to rebuild all the app if you stick the commun
| part of it in a first stack and the issue-specific part of it in a
| second stack. You can even set each one as the substack of the other and
| get them working together in using the start using command or a simple
| send
Problem: read from stdin clips off input
Scott, I request your help please. As you may recall I am running
an older 2.4 version of the MC interpreter on my 2.2.16 (kernel) Linux
machine and newer versions won't compile due to library incompatibilities.
I think you said you were going to fix
|
| Sadhu,
|
| This was a post from Scott about this back in October:
|
| --
| We've recently received several reports of short reads from stdin in CGI
| (snip) ...
|
| We'll look into supporting a simpler way to do this for 2.5 (not sure
| whether to fix it so read .. for
|
| Today's Topics:
|
|1. the read from standard in bug (Sadhunathan Nadesan)
Ok, thanks Ken. I'll try read until eof and see if that works. In other
words,
...
put empty into buffer
repeat until eof
read from stdin until empty
put it after buffer
| From: Alain Farmer [EMAIL PROTECTED]
| Subject: Re: php wikis
|
| ... and will be releasing that open source
| (most likely public domain) ...
|
| Public Domain, eh! Admit it, David : I have had a (+)
| influence on you. ;-)
|
| ... as soon as it's all integrated
| with the CVS servers.
| Subject: Re: Installing MC at your ISP, a How-To
| Reply-To: [EMAIL PROTECTED]
|
| I put the mc engine in /cgi-bin with the scripts and #!mc does it just
| fine. Upload binary.
|
| Regards, Andu Novac
|
Thank you for the kind words on the how-to.
Good answers Andu :-)
| Date: Wed, 11 Jun 2003 10:00:21 -0600
| Subject: Re: How do you join lines in a container so it becomes one line, so you
can use split?
| From: Dar Scott [EMAIL PROTECTED]
|
|
| Could your fields have | or numToChar(10) in them?
|
Hi
Valid question. Nope, they do not.
|
| Allo Sadhu,
|
| set itemdel to |
| tune your metatalk code
Bonjour Pierre,
Ok, I'm not sure exactly what that means but it looks like what
it means from reading the Transcript dictionary is, change
the default item delimter in a container from comma to
|
|repeat for each line x in keywords
| put x :---: sqlData[x] cr
|end repeat
|
| Wouldn't this just show you the last entry in the keywords? The keys
Hi
No, it works.
As you surmise, the above snippet is not actually part of the
intended
#File name: sony_filter.mt
# Author: Sadhunathan Nadesan
# Date started: 06/11/2003
#
# Description:
# Get Walker Numbers from Data Base and replace tselect field
#
###
global sqlData
|5. UNIX help? (Richard MacLemale)
Perhaps it would be instructive to see a cgi script that is working?
BTW, this is an old one, I now collect the post data in a loop, since
we found we'd sometimes not get all the data. However, this should work
for a form that is not too long.
You will of
|
| As Scott said the MC IDE is now open source so you can continue to
| maintain
| an engine license and use the MC IDE instead of Rev. It's up to you if
| you
| want to switch or not but it seems that all development will go into
| the
| engine and the Rev IDE.
Greetings,
Sorry if
| | As Scott said the MC IDE is now open source so you can continue to
| | maintain
| | an engine license and use the MC IDE instead of Rev. It's up to you if
| | you
| | want to switch or not but it seems that all development will go into
| | the
| | engine and the Rev IDE.
Ok, this
93 matches
Mail list logo