From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Version 0.5.3 guile-log Date: Wed, 12 Nov 2014 20:57:10 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ffbaca920c9ce0507aecd79 X-Trace: ger.gmane.org 1415822248 29011 80.91.229.3 (12 Nov 2014 19:57:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Nov 2014 19:57:28 +0000 (UTC) To: guile-devel , "guile-user@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Nov 12 20:57:23 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xoe2a-000114-RS for guile-devel@m.gmane.org; Wed, 12 Nov 2014 20:57:21 +0100 Original-Received: from localhost ([::1]:56532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoe2a-0001Hr-J2 for guile-devel@m.gmane.org; Wed, 12 Nov 2014 14:57:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoe2W-0001FF-Ul for guile-devel@gnu.org; Wed, 12 Nov 2014 14:57:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xoe2V-0001Je-F6 for guile-devel@gnu.org; Wed, 12 Nov 2014 14:57:16 -0500 Original-Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:37135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoe2S-0001Ih-EJ; Wed, 12 Nov 2014 14:57:12 -0500 Original-Received: by mail-pa0-f50.google.com with SMTP id eu11so13720461pac.9 for ; Wed, 12 Nov 2014 11:57:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=toZoF9rgR2RWfYekzpAr7BplIU+dO3A4rX3I9Y4l6y4=; b=pBXC4AtXz0VmP7BB01MxRm+F96r4hybx25U1tkK1DrHUnhYqeQXVgT4Xov+OqwJNGR +os0aJR0qhu4o21wPKCfk959/dutM2XNtXqlekds0ili9Q/dGiqQYphR4WXDIz9qCUHy A2xQTOD+4SiYluQESYIavVC2PYg4kC14gjnb5GhfNg4Kh11WaUoRXUD3JWKBmCadfEj8 I7e4Ahstv2hnFxD7cacHRw0v33ZjP4ywotznyXyW2WPFn26tgPA/3P+7q6u934nGjFUf hylRbrOIaZbfEDF+TQG3kx/FKpaJZcv666OY/BNYlCZwlX6CjynzxR46PXVON7uRBG5O 22IA== X-Received: by 10.66.118.201 with SMTP id ko9mr50525086pab.46.1415822230733; Wed, 12 Nov 2014 11:57:10 -0800 (PST) Original-Received: by 10.70.50.227 with HTTP; Wed, 12 Nov 2014 11:57:10 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::232 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17607 gmane.lisp.guile.user:11635 Archived-At: --e89a8ffbaca920c9ce0507aecd79 Content-Type: text/plain; charset=UTF-8 Hi all, I managed to restore guile-log from bitrotten the previous support of iso-prolog and assoc like variable bindings, while introducing new features. There is now a couple of new features added. 1. coroutines and attributed variables, that enables hooks can controls the unification, see swi-prolog docs in e.g. http://www.swi-prolog.org/pldoc/man?section=extvar 2. It's possible to handle self referential datastructures e.g. X=[1,X] and behave well. 3. Together with 2, tablating is now suppported in guile-log which is memoisation on steroids, check out this. A nice example is this recursive definition: ---------------------------------------- (compile-prolog-string " -functorize(tabling). ff(X) :- (X=[Y,A,B]),ff(A),ff(B),(Y=1;Y=2). ") ----------------------------------------- Then we can run this as (note the recursive representation), scheme@(guile-user)> ,L prolog Happy hacking with Prolog! To switch back, type `,L scheme'. prolog@(guile-user)> .rec ff(X). X = {0}[1, ref[0], ref[0]] more (y/n/a/s) > s prolog@(guile-user)> .10 .c X = {0}[2, ref[0], ref[0]] X = {0}[1, ref[0], {1}[1, ref[1], ref[1]]] X = {0}[2, ref[0], {1}[1, ref[1], ref[1]]] X = {0}[1, ref[0], {1}[2, ref[1], ref[1]]] X = {0}[2, ref[0], {1}[2, ref[1], ref[1]]] X = [1, {0}[1, ref[0], ref[0]], {1}[1, ref[1], ref[1]]] X = [2, {0}[1, ref[0], ref[0]], {1}[1, ref[1], ref[1]]] X = [1, {0}[1, ref[0], ref[0]], {1}[2, ref[1], ref[1]]] X = [2, {0}[1, ref[0], ref[0]], {1}[2, ref[1], ref[1]]] X = [1, {0}[1, ref[0], ref[0]], {1}[1, ref[1], {2}[1, ref[2], ref[2]]]] $1 = stalled Anywau here is the news, Version 0.5, * Improved parsing tool - Factorized and enabled for customized streams flow e.g. current indentation level in python - f-cons and similar tools for functional AST creation. * Debug features * Tabling or memoisation, experimental. * rational datastructures, experimental. * scheme Keyword objects and logic values. * GC of prolog variables * Attributed variables / only one success all forms/ experimental * corouttines / experimental. * tracing * Better compilation error handling * Support for namespaced operators in prolog (TODO) * Support for X[a] and X{A} (TODO) * Operators are now namespaced correctly. * fast math and guile featured operators for numerics added. Happy Hacking! --e89a8ffbaca920c9ce0507aecd79 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all, I managed to restore guile-log from bitrotten the = previous support of iso-prolog and assoc like variable bindings, while intr= oducing new features.

There is now a couple of new featu= res added.
1. coroutines and attributed variables, that enables h= ooks can controls the unification, see swi-prolog docs in e.g.=C2=A0http://www.swi-pr= olog.org/pldoc/man?section=3Dextvar

2. It'= s possible to handle self referential datastructures e.g. X=3D[1,X] and beh= ave well.

3. Together with 2, tablating is now sup= pported in guile-log which is memoisation on steroids, check out this.

A nice example is this recursive definition:
----------------------------------------
(compile-prolog-st= ring
"
-functorize(tabling).
ff(X) :- (X= =3D[Y,A,B]),ff(A),ff(B),(Y=3D1;Y=3D2).
")
--= ---------------------------------------

Then we ca= n run this as (note the recursive representation),=C2=A0

scheme@(guile-user)> ,L prolog
Happy hacking with = Prolog!=C2=A0 To switch back, type `,L scheme'.
prolog@(guile= -user)> .rec ff(X).

=C2=A0 =C2=A0X =3D {0}[1, r= ef[0], ref[0]]

more (y/n/a/s) > s
pro= log@(guile-user)> .10 .c

=C2=A0 =C2=A0X =3D {0}= [2, ref[0], ref[0]]
=C2=A0 =C2=A0X =3D {0}[1, ref[0], {1}[1, ref[= 1], ref[1]]]
=C2=A0 =C2=A0X =3D {0}[2, ref[0], {1}[1, ref[1], ref= [1]]]
=C2=A0 =C2=A0X =3D {0}[1, ref[0], {1}[2, ref[1], ref[1]]]
=C2=A0 =C2=A0X =3D {0}[2, ref[0], {1}[2, ref[1], ref[1]]]
=C2=A0 =C2=A0X =3D [1, {0}[1, ref[0], ref[0]], {1}[1, ref[1], ref[1]]]
=C2=A0 =C2=A0X =3D [2, {0}[1, ref[0], ref[0]], {1}[1, ref[1], ref[1= ]]]
=C2=A0 =C2=A0X =3D [1, {0}[1, ref[0], ref[0]], {1}[2, ref[1],= ref[1]]]
=C2=A0 =C2=A0X =3D [2, {0}[1, ref[0], ref[0]], {1}[2, r= ef[1], ref[1]]]
=C2=A0 =C2=A0X =3D [1, {0}[1, ref[0], ref[0]], {1= }[1, ref[1], {2}[1, ref[2], ref[2]]]]
$1 =3D stalled
<= div>
Anywau here is the news,

Version 0.5,=
* Improved parsing tool
=C2=A0 - Factorized and enabled for = customized streams flow e.g.
=C2=A0 =C2=A0 current indentation le= vel in python
=C2=A0 - f-cons and similar tools for functional AS= T creation.
* Debug features
* Tabling or memoisation, = experimental.
* rational datastructures, experimental.
= * scheme Keyword objects and logic values.
* GC of prolog variabl= es
* Attributed variables / only one success all forms/ experimen= tal
* corouttines / experimental.
* tracing
*= Better compilation error handling
* Support for namespaced opera= tors in prolog (TODO)
* Support for X[a] and X{A} (TODO)
* Operators are now namespaced correctly.
* fast math and guile= featured operators for numerics added.

Happy Hacking!



--e89a8ffbaca920c9ce0507aecd79--