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: guile-log musings Date: Wed, 14 Jan 2015 15:59:27 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b15fcf961084b050c9dfc9e X-Trace: ger.gmane.org 1421247593 2836 80.91.229.3 (14 Jan 2015 14:59:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2015 14:59:53 +0000 (UTC) To: guile-devel , "guile-user@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jan 14 15:59:48 2015 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 1YBPQC-0005nd-GP for guile-devel@m.gmane.org; Wed, 14 Jan 2015 15:59:48 +0100 Original-Received: from localhost ([::1]:46671 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBPQC-0008UK-1b for guile-devel@m.gmane.org; Wed, 14 Jan 2015 09:59:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBPPz-0008Jl-Vn for guile-devel@gnu.org; Wed, 14 Jan 2015 09:59:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBPPy-0007JE-Q7 for guile-devel@gnu.org; Wed, 14 Jan 2015 09:59:35 -0500 Original-Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]:50497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBPPs-0007IQ-Il; Wed, 14 Jan 2015 09:59:28 -0500 Original-Received: by mail-pa0-f54.google.com with SMTP id fb1so10917758pad.13; Wed, 14 Jan 2015 06:59:27 -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=ALnCwSWkzKXkzAxoJK7lYnpmiR2f/3srn0Sefz+7q/4=; b=Y/Vl/00pxltnHfEMRp9bvTRVqARjl4DeRQBLlwxcx+ISw5bHOBehr4XCWKKu358tEs gXx3BlsCmg8ZMLvfTzcQ9NcVdp7yjm35RmoDRjtYtvMNTGZo0EdVjoF9novZDajwoisd ldt5iz2ArWFNdzYBsALn9txDXindrAQ4TJlPjlzN1w4V6D2n7Rngayfa6grCpDYhKbFu 1VfJ57/7YuxHJMGTOym0W4u8ZmwT/oaXwdfdf29H52KG+Yic3Bmuhgu96PbNVuOALqMs 18hONhFoYUEkXpx+h3Ph/Cyowv2rgegfblu2P7aEm6dH3TTnhIhxeZCcxJNKx7m7fyxc Zf3Q== X-Received: by 10.68.136.98 with SMTP id pz2mr6413677pbb.154.1421247567167; Wed, 14 Jan 2015 06:59:27 -0800 (PST) Original-Received: by 10.70.50.38 with HTTP; Wed, 14 Jan 2015 06:59:27 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::236 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:17634 gmane.lisp.guile.user:11743 Archived-At: --047d7b15fcf961084b050c9dfc9e Content-Type: text/plain; charset=UTF-8 Hi All, I managed to get guile-log and guile-syntax-parse to work under guile-2.2. So It looks like it will be a smooth transition from here. I did have a few hiccups but managed to clean them out. No issues with guile-2.2. Master is looking good. But most of my work recently have been on making it possible to run swi-prolog code and use the prolog module system. I can compile pretty advanced code quite well almost without no hiccups. So if you stay out of swi prolog internals in your prolog code guile-swi-prolog will be able to compile and parse it. mainly swi prolog macros is partly implemented and needs some rework to use it. And getting prolog macros to work is where I am atm. I did a small test with swi prologs assoc data structure which is a functional tree. I also compared with an internal vhash that i'm using as an assoc looking upp all the 1 .. 10.000 numbers in an assoc data structure, here is the finding Number of operations / second: swi assoc.pl 100.000 guile-prolog (guile 2.0) assoc 10.000 vhash 100.000 guile-log (guile 2.0) vhash 1.000.000 So although guile-log is 10x slower when you run the same code as in prolog, using an internal data structure, you gain 10x, and skipping the overhead of guile-log's prolog implementation another 10x is gained. So actually a prolog on scheme can be really fast, if you do it right. Unfortunately pure prolog is too slow atm, but it will be better as the prolog implementation get's better and guile get's it code all the way to assembler. Swi prolog has a lot of cool features, many of them are implemented. That together with a really good implementation of tablating and continuations makes guile-log's prolog unique. Right now I'm trying to compile clpfd which is a finite domain solver, something that one just must have in order to call oneself a prolog environment. Happy hacking! --047d7b15fcf961084b050c9dfc9e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi All,

I managed to get guile-log and = guile-syntax-parse to work under guile-2.2. So It looks=C2=A0
lik= e it will be a smooth transition from here. I did have a few hiccups but ma= naged to=C2=A0
clean them out. No issues with guile-2.2. Master i= s looking good.

But most of my work recently have = been on making it possible to run swi-prolog code=C2=A0
and use t= he prolog module system. I can compile pretty advanced code quite well=C2= =A0
almost without no hiccups. So if you stay out of swi prolog i= nternals in your prolog=C2=A0
code guile-swi-prolog will be able = to compile and parse it. mainly swi prolog macros
=C2=A0is partly= implemented and needs some rework to use it. And getting prolog=C2=A0
macros to work is where I am atm.

I did a sm= all test with swi prologs assoc data structure which is a functional tree.= =C2=A0
I also compared with an internal vhash that i'm using = as an assoc looking upp all=C2=A0
the 1 .. 10.000 numbers in an a= ssoc data structure, here is the finding


Number of operations / second:

swi
=C2=A0 =C2=A0 =C2=A0assoc.pl =C2=A0100.000= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=C2=A0
guile-prolog (guile 2.0)
=C2=A0 =C2=A0 =C2=A0= assoc =C2=A0 =C2=A0 =C2=A0 =C2=A010.000
=C2=A0 =C2=A0 =C2=A0vhash= =C2=A0 =C2=A0 =C2=A0100.000
guile-log (guile 2.0)
=C2= =A0 =C2=A0 =C2=A0vhash =C2=A0 =C2=A01.000.000

So a= lthough guile-log is 10x slower when you run the same code as in prolog, us= ing an
internal data structure, you gain 10x, and skipping the ov= erhead of guile-log's prolog
=C2=A0implementation another 10x= is gained.

So actually a prolog on scheme can be = really fast, if you do it right. Unfortunately=C2=A0
pure prolog = is too slow atm, but it will be better as the prolog implementation get'= ;s
=C2=A0better and guile get's it code all the way to assemb= ler.

Swi prolog has a lot of cool features, many o= f them are implemented. That together=C2=A0
with a really good im= plementation of tablating and continuations makes guile-log's=C2=A0
prolog unique.

Right now I'm trying to = compile clpfd which is a finite domain solver, something that one=C2=A0
just must have in order to call oneself a prolog environment.
<= div>
Happy hacking!


<= br>
--047d7b15fcf961084b050c9dfc9e--