Hi all,
I've been having some trouble using HTML forms with the CGI program
written in Ciao. If I use the method 'post' instead of 'get' in the
form, the Ciao program outputs the following error:
Unknown conten type application/x-www-url-encoded or bad request.
(or something like that, I didn't copy/paste it)
Note that everything works fine when I use the 'get' method. But I'd
prefer to use post because the input to the form might be very long, too
long for the get method to handle ...
Anyone have any idea what the problem might be?
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
so, it should be noted that we shouln't let symbolic links in the
variables which we modify in "SETTINGS"
why "`Mac OS X' users should add (or modify) the `path' file in the
directory `~/Library/init/tcsh'" since it doesn't exist ?
(~/Library/init/ doesn't exist. should i create
~/Library/init/tcsh/path ?)
i have ".tcshrc"
doesn't it work if i add the lines into it ?
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Hi,
I'm considering a number of options in trying to architect a distributed
system in line with the semantic web's ambitions.
I haven't yet given a try to ciao prolog, but I would like to know a
number of things before I get into more details.
First: I have read that prolog systems are generally backward-chaining
systems. I would like to do forward-chaining so I can deal with
notification of particular events to the users.
Second: The user contributed libraries mention a utility to convert
Prolog to SQL... Does that cover triggers ? :-) that would be too easy,
wouldn't it ? More seriously, what does it cover ? It just sounds like
magic !
Finally: what kind of persistence does ciao prolog allow for ? In regard
to XSB for example. I'm concerned about the convenience of writing
triggered code to write things down to a database or an EJB,... Is such
a thing possible ?
Thanks in advance for taking the time to answer my naive questions,
Candide Kemmler
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Hallo, my name is Fabio Cappabianco and I'm trying to make a CGI in
CiaoProlog.
The problem is:
When the program get some data from a CGI form and try to compare with
another one the following error message apears:
{ERROR: No handle found for thrown error
error(existence_error(procedure,/(user:\=,2)),/(user:\=,2))}
Is there a way to transform data from POST mode to a Prolog term that
could be compared?
I know that by the command prolog_term/1 data from the program can be
writen in HTML, but is there some way to do the reverse operation?
Thanks a lot!
Fabio Cappabianco.
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
I've been playing with Ciao prolog a bit, and so I build a Debian
package for it (so that it would co-exist with the rest of the
system in a more pleasing manner.)
Interested parties can get it from:
http://people.debian.org/~bfulgham/ciao
There is a binary i386 build, and the necessary *diff.gz file
for building on other architectures.
Enjoy!
-Brent
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Hello,
I am wondering how to use the trace/1 predicate. I included the three
packages mentioned in the doc, but when I then do:
?- trace( --some styff-- )
I just get that trace/1 is undefined... I guess that I am forgetting
some basic thing here (something that has to do with modules, etc), but
I am not sure. Any ideas?
PS: I am using the ciao shell, not the emacs integration...
--
Roel Wuyts Software
Composition Group
roel.wuyts(a)iam.unibe.ch University of Bern,
Switzerland
http://www.iam.unibe.ch/~wuyts/
Board Member of the European Smalltalk User Group: www.esug.org
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Candide,
Regarding notifications, database connections and so on, you might consider this strategy
which I have employed successfully to integrate Prolog with various other languages and
packages (like databases):
1) Define a little XML message protocol which maps easily between Prolog predicates and
any structures or objects on the other side of the interface. "MyJavaObject" with
instance variables "name" and "city" would become
<MyJavaObject><name>Gregory</name><city>Ottawa</city></MyJavaObject>. On the Prolog
side this would map to the fact, myJavaObject(name('Gregory'),city('Ottawa')).
2) Using a message middleware such as CORBA or MQSeries, or even something as simple as
http or TCP/IP sockets, communicate with very small, simple programs that insert and
fetch from the data store using EJB or JDBC.
3) Notify users using this same XML inter-lingua.
If the Prolog you choose does not directly support the middleware you want to use, it is
very simple to implement this scheme using the standard in and standard out streams; this
way the Prolog program simply responds to the input stream as if to interactive Goals,
and makes requests to store or get data via the output stream. Then a very simple
helper program in a language with bindings to the chosen middleware simply starts the
Prolog program and attaches to its in and out streams -- all the helper program does
after that is provide strings from the Middleware to the Prolog and from the Prolog to
the Middleware.
Regards.
Gregory Bourassa
On May 28, Candide Kemmler <candide(a)urbanium.tv> wrote:
>
>
> Hi,
>
> I'm considering a number of options in trying to architect a distributed
> system in line with the semantic web's ambitions.
>
> I haven't yet given a try to ciao prolog, but I would like to know a
> number of things before I get into more details.
>
> First: I have read that prolog systems are generally backward-chaining
> systems. I would like to do forward-chaining so I can deal with
> notification of particular events to the users.
>
> Second: The user contributed libraries mention a utility to convert
> Prolog to SQL... Does that cover triggers ? :-) that would be too easy,
> wouldn't it ? More seriously, what does it cover ? It just sounds like
> magic !
>
> Finally: what kind of persistence does ciao prolog allow for ? In regard
> to XSB for example. I'm concerned about the convenience of writing
> triggered code to write things down to a database or an EJB,... Is such
> a thing possible ?
>
> Thanks in advance for taking the time to answer my naive questions,
>
> Candide Kemmler
> ==============================================================================
> Message: Address: Action:
> help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
> subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
> unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
> <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
> -----------------------------------------------------------------------------
> Archived messages: <a href='http://www.clip.dia.fi.upm.es/Mail/ciao-
users/'>http://www.clip.dia.fi.upm.es/Mail/ciao-users/</a>
> -----------------------------------------------------------------------------
>
>
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Dear Ciao Prolog users,
we have just discovered an unfortunate error in the Prolog
compiler which comes with the recently released Ciao Prolog 1.8 patch 0.
Certain types of clauses [1] were compiled incorrectly, leading to
a wrong failure during their execution. This bug is *not* present in
distributions previous to Ciao 1.8. No file in the Ciao Prolog
sources was compiled differently to the previous version, and,
partially because of that, the bug crept in without us noticing. We
sincerely apologize for any problem this may have caused to you. Ciao
Prolog 1.8 patch 1 is already available at
http://clip.dia.fi.upm.es/Software/Ciao.
[1] It is not easy to characterize them, but, for those interested, a
clause as
p(A, B, C, D) :-
C < B,
!,
E = C,
q(A, 0, B, E, D1),
D is - D1.
would be incorrectly compiled to WAM code by Ciao Prolog 1.8 .
--
+--------------------------------------------------------------------------+
|Manuel Carro -- Facultad de Informática -- U. Politécnica de Madrid (UPM) |
| Email: mcarro(a)fi.upm.es --- Ph: +34-91336-7455 --- FAX: +34-91336-7412 |
|http://lml.ls.fi.upm.es/~boris --- http://clip.dia.fi.upm.es/Software/Ciao|
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Dear Sir.
Thank you for your prompt answer.
> Just for curiosity, and to see if I am in the right track, how
> does GNU Prolog behave? Are the figures you obtain as bad as Ciao
> Prolog's?
You are right. GnuProlog is almost as slow as Ciao Prolog.
> After all, they are different languages, with Mercury
> requiring more user effort, such as modes, types, determinism
> declarations, etc., which makes translation to C (or assembler)
> easier.
Again, I am sure you are right. I think that mode and type inference
makes Mercury run faster. I never declare modes or types. I always
compile with the option "mmc --infer-all myprogram.m". In any case,
Mercury infer modes and types. As for determinism, my students and I
avoid non-deterministic predicates very carefully. Thus, I am sure
that all predicates are deterministic.
Question: Is it possible to insert mode declaration in a Ciao-Prolog
code? If the answer is yes, I could check how it influences speed.
I have made an experience with GNU-Prolog that may help. Dr. Marcus
Vinicius, from Ryerson University
(http://www.scs.ryerson.ca/~m3santos/) wrote a Prolog to C translator
as part of his MSC thesis. I got a copy of this thesis and of the
translator. A few years later, Dr. Cedric Carvalho wrote a Prolog to
JVM compiler with mode and type inference. One of my students combined
the two compilers to generate C code (instead of JVM) for GNU-Prolog.
Then, I used gplc to compile and link this code to a GNU-Prolog
program. With this off-hand scheme, I was able to compile only very
simple programs. However, they proved to be as fast as equivalent
programs in Mercury. Is it possible to add an option to Ciao Prolog
to generate mode and type inference? Of course, it is possible. I
think I should rephrase the question. Do you have plans to add mode
and type inference to Ciao-Prolog?
> Yes, it is true that we are working on compilation to C. However
> the compiler is still on a very preliminary stage, and although
> results are good, it is still far from being usable.
Would you accept volunteers? I am sending copies of this letter to
Dr. Cedric and Dr. Marcus. They know well the kind of programs I
write, and they may make suggestions. I am also sure that they would
be happy to work as volunteers in your Prolog to C compiler, if you
accept volunteers, of course.
By the way, I do not want to keep with Mercury because it generates
ridiculously large code (ten times larger than Ciao Prolog, or
GNU-Prolog). Finally, I am giving up Visual Prolog because it requires
type declaration.
Eduardo Costa
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------