Domain: swi-prolog.org
Stories and comments across the archive that link to swi-prolog.org.
Comments · 14
-
Re:haskell for the masses? sure, but only...
You remind me the guy who told me this week that Glassfish sucks and nobody uses it, we need a stable proven technology like PHP/MySQL.
http://www.swi-prolog.org/pldoc/doc/swi/library/http/http_dispatch.pl?show=src
http://www.swi-prolog.org/pldoc/doc/swi/library/semweb/sparql_client.pl?show=src -
Re:haskell for the masses? sure, but only...
You remind me the guy who told me this week that Glassfish sucks and nobody uses it, we need a stable proven technology like PHP/MySQL.
http://www.swi-prolog.org/pldoc/doc/swi/library/http/http_dispatch.pl?show=src
http://www.swi-prolog.org/pldoc/doc/swi/library/semweb/sparql_client.pl?show=src -
Re:Lessons from the Old and Wise
Seconded. I used to say Prolog (I feel SWI Prolog is excellent to start with) for the past 20 years instead of the languages you suggest. When I learned Prolog, I had to admit that I had no clue of what a programming language actually was (which was shocking, because I knew assembler, Pascal, Basic etc...). I'm now learning Erlang, and I love to see how some parts of its Prolog roots still shine through in the Erlang syntax - I guess that to somebody who does not know Prolog the punctuation in Erlang must be very weird at first.
-
Re:Specialization Versus BreadthCool languages I've read about, maybe used, but not played with nearly enough:
- Lambda calculus-ish
- Combinator/Forth-ish
- Joy
- Interesting but not practical: unlamdba iota and jot
- Logic
- Pi calculus-ish
I think I want to master logic programming next, though it may be better for me to do some haskell programming first so I have a better foundation. Monads/Arrows give me a headache, but with enough time, I'm sure I could get used to them. s-expressions a-la lisp/scheme are very similar to xml, except better, but logic programming seems more likely to make the hardest parts of internet programming easier.
Unfortuately, I have nowhere near enough time to get proficient in all these languages.
-
I can 'think OWL' easier than 'think RDF'
I have experimented with RDF for many years (best toolkit for experimenting, I think, is the Swi-prolog semantic web library: http://www.swi-prolog.org/packages/semweb.html).
I much prefer the higher level OWL representation with descriptive logic, but the problem is that support for lower level RDF is much better. There are commercial and open source OWL+descriptive logic reasoner packages, but there is much better coverage for RDF tools. In any case, with the exception of the expensive (commercial) Lisp based AllegroGraph and RacerPro tools, and the open source Swi-prolog semantic web library, almost all of the tools I have tried (Sesame, Jena, Pellet, etc.) are written in Java. Fortunately, most of the Java tools are open source, so playing/experimenting only costs your time :-) -
Procedural programmingIs something that has been in use a long time - so it's not new. Anybody familiar with the classic programming languages Basic, Pascal, C and many more can't help that they feel familiar here.
Of course - since many today tend to do object oriented programming (for good and bad) the procedural programming may seem "fresh" for some.
And there are other programming areas that can be considered too;
- Concurrent Programming, E.g. Erlang.
- Logic Programming, E.g. Prolog.
- Functional programming, E.g. ML
-
Re:The universe will outAnd given the base definitions, 2+3=5 is universally true.
2+3=5 is not univserally true, it is true within the framework of a common set of axioms. Here is an example of a simple set of axioms which allow us to prove that 2+3 = 5 (within the framework of those axioms):
Let s(X) be the successor function applied to the variable X.
Let 0 be a symbol in our algebra.
Let 0 = 0. (1)
Let s(X) = s(X) if and only if X = Y. (2)
We now have equality defined.Let X + 0 = X. (3)
Let X + s(Y) = s(X) + Y. (4)
Let X + Y = Y + X. (5)
We now have addition defined.We define a set of symbols such that 2 = s(s(0)), 3 = s(s(s(0))), and 5 = s(s(s(s(s(0))))).
2+3 = 5 is therefore equivalent to s(s(0) + s(s(s(0))) = s(s(s(s(s(0))))).We can rewrite this by applying our axoims (axiom number given in brackets) so that:
s(s(s(0))) + s(s(0)) = s(s(s(s(s(0))))) (4)
s(s(s(s(0)))) + s(0) = s(s(s(s(s(0))))) (4)
s(s(s(s(s(0))))) + 0 = s(s(s(s(s(0))))) (4)
s(s(s(s(s(0))))) = s(s(s(s(s(0))))) (3)
s(s(s(s(0)))) = s(s(s(s(0)))) (2)
s(s(s(0))) = s(s(s(0))) (2)
s(s(0)) = s(s(0)) (2)
s(0) = s(0) (2)
0 = 0 (2)This gives axiom 0, and so is true.
Anyone wanting to play with these ideas in a more hands-on way should download a prolog implementation (I recommend SWI Prolog). You can implement these axioms in prolog as the following program (the first two are implicitly defined):
% add(X,Y,Z) predicate represents X + Y = Z
You can then ask it questions in the following way:
add(X,0,X).
add(X,s(Y),Z) :- add(s(X),Y,Z).
add(X,Y,Z) :- add(Y,X,Z).?- add(s(s(0)),s(s(s(0))),Five).
Your homework from this post is to extend this system to define multiplication.
Five = s(s(s(s(s(0)))))
Yes -
Re:Careful about speed comparisonsDisclaimer: I have never used OCaml. I have, however, used Haskell (a functional language that, apparently, inherits quite a lot from OCaml - the OCaml code in one of the links in TFA looked remarkably similar to Haskell).
One of the advantages of functional languages that is not often mentioned is that it is relatively easy (at least in comparison with imperative languages) to implicitly parallelise the code. As an exercise, I sat down with a piece of Haskell code and some lambda calculus (*shudder*) to see how much of it a compiler could determine could be executed in parallel. While this may not be a huge advantage now (since most PCs have a single CPU), the advent of multi-core chips, mainstream SMP, and the increasingly slow rate of increase in raw CPU speeds this may make functional languages increasingly more attractive.
Personally, I'd rather use a declarative language that's actually fun to use, like Prolog.
-
Strong AI not required for software agents
Strong AI requires grounding symbols in real world things, events, and processes.
I think that simply defining the "meaning" of words in ontologies is likely good enough for useful web-based software agents. It will take time, but with well defined ontologies, and common use of RDF using standard schemas will make a lot of cool things possible. I think that dealing with ungrounded symbols, but symbols defined and related to other symbols in a structured way, is OK.
One of the classic complaints of AI systems can be summed up with a trivial example:
Define a relation in Prolog:
father(ken, mark).
A human reader assigns their own meaning to "father", "ken", and "mark". To a prolog system, this could just as easily be:
aaa1(aaa2, aaa3).
Somewhere, on the edge of symbol-slamming systems, there has to be some connection with the real world, with our experiences.
For semantic web applications, this "edge connection" can simply be tying into symbols defined in OWL ontologies, RDF Schema, etc.
The problem is getting people to use RDF (I added RDF to my main web site years ago, but it only contains limited information).
Another problem with RDF is that there are several kluges to get it into XHTML, but that will hopefully change soon.
A good toolkit for experimenting with the semantic web is the Swi-Prolog semweb library (http://www.swi-prolog.org/packages/semweb.html/)
-Mark -
RDF ToolsI enjoyed this book review - useful, and the links to tools are useful.
One tool not mentioned: the semantic web library for Swi-Prolog that provides a high level toolkit for dealing with RDF, Owl, etc. Since the hoped-for use of RDF is applications that make logical inferences, Prolog seems like a good language to use
:-)The Jena and Sesame packages are written in Java and also are very good tools.
The big problem is getting people to use RDF - this technology can only be useful if enough people use it (think FAX machines).
I believe that the earliest large scale adoption of Semantic Web technologies will really be on company LANs and be used for organizing company/.organizational information.
Think of shifting from information technology to knowledge management technology.
-Mark
-
Semantic Web: best solutionReal breakthrouhs in search technology are likely to come from Semantic Web technoligies: using standards like RDF, OWL, etc. for document markup based on content type (using standard ontology definitions).
The technology for the Semantic Web is good enough - people and organizations just have to be willing to add semantic markup. This will enable what I would call knowledge based search. Some good tools are:
RDF and semantic web tools for Swi-Prolog
-Mark
-
Dejavu: 5th generation projectI started to get into the AI field professionally around the early 1980s.
I remember the excitement in the U.S. AI community when Feigenbaum went to Japan and sold the government there on the 5th generation build-a-real-AI project.
Funny - I do not remember any animosity - mostly just wishing them good luck.
BTW, the 5th generation project was built around logic programming (Prolog variants). I have never understood why more people do not use Prolog. For an admittedly small percentage of software projects, Prolog is the best language for solving problems - well worth learning. (A very good free LGPL Prolog is available here).
-Mark
-
XPCE is little-known - for C, C++, Prolog, LISP
XPCE is an excellent cross-platform alternative, at
http://www.swi-prolog.org/". Most discussion is about Prolog, but see http://www.swi-prolog.org/packages/xpce/ for info about C, C++, LISP bindings. -
XPCE is little-known - for C, C++, Prolog, LISP
XPCE is an excellent cross-platform alternative, at
http://www.swi-prolog.org/". Most discussion is about Prolog, but see http://www.swi-prolog.org/packages/xpce/ for info about C, C++, LISP bindings.