🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #1211

Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ?

#1211
From: Jan Burse
Date: Sat, 01 Jan 2011 18:05
52 lines
3808 bytes
Hi

I am responding from comp.lang.prolog.

Nathan schrieb:
> Ruby is just a blast to code in. If it had stronger GUI support, no
> global interpretor lock,

I think a global interpreter lock can be avoided by combining
the following approaches in logic programming languages:

0) Actual parameter data structures (of a thread running in the
    interpreter) should be immune to concurrency problems.
1) Conversions between actual parameter data structures, and
    global data structures (of the interpreter).
2) No exposure of global data structures,
    only access via the interpreter.
3) When exposure of global data structures, then access via
    thread safe methods.

Interestingly 0) and 1) is automatically assured by Prolog 
implementations. Actual parameters are not visible between
threads, and clause instantiation can be viewed as producing
actual parameter data structures from global data structures,
whereas asserting a clause can be viewed as producting global
data structures form actual parameter data structures.

Point 2) and 3) depend on the API design for a Prolog implementation.
For point 2) it is assumend that a multi-threaded interpreter will
not have any problems accessing its global data structures, for
example in the case of Prolog clauses, concurrently. For 3) it
is assumed that corresponding access can be encapsulated in
thread safe methods.

There are a couple of Prolog system implementations around
that support multi threading. For example SWI Prolog. Or
Jekejeke Prolog. In Jekejeke Prolog mostly the approach 2)
has been followed by the API on purpose.

> and either lazy evaluation or preemptive multi-threading (with a
 > strong preference toward the latter),

The threads deployed by multi-threading Prologs are preemptive.
They typically don't follow the cooperative model, because
coopertaive threads have only limited applications. SWI
Prolog has preemptive threads (*), Jekejeke Prolog inherits
the property from the threads of the Java VM.

Best Regards

(*)
http://hcs.science.uva.nl/projects/SWI-Prolog/articles/iclp-03.pdf
Technical Details
Message-ID: <ifnqd6$6vs$1@news.albasani.net>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!195.71.90.67.MISMATCH!news.unit0.net!weretis.net!feeder4.news.weretis.net!news.albasani.net!not-for-mail
References: <80ceeca0-1d32-47d1-ba96-feb4d9729c3a@v17g2000yqv.googlegroups.com> <87pqsgk8v9.fsf@kuiper.lan.informatimago.com> <ca15d8c3-86db-46fd-b35f-1a2596475769@n32g2000pre.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: ee3de009bc,1641de092071599d
X-Google-Attributes: gidee3de009bc,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!195.71.90.67.MISMATCH!news.unit0.net!weretis.net!feeder4.news.weretis.net!news.albasani.net!not-for-mail
From: Jan Burse <janburse@fastmail.fm>
Newsgroups: comp.lang.functional,comp.lang.lisp,gnu.emacs.help,comp.lang.forth,comp.lang.prolog
Subject: Re: How to improve the readability of (any) LISP or any highlevel
 functional language to the level of FORTH ?
Date: Sat, 01 Jan 2011 19:05:24 +0100
Organization: albasani.net
Lines: 53
Message-ID: <ifnqd6$6vs$1@news.albasani.net>
References: <80ceeca0-1d32-47d1-ba96-feb4d9729c3a@v17g2000yqv.googlegroups.com> <87pqsgk8v9.fsf@kuiper.lan.informatimago.com> <ca15d8c3-86db-46fd-b35f-1a2596475769@n32g2000pre.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.albasani.net LtMFVhClRjYacFFllP6+g1jDSeAqq5Cwd+ahDcy/xrWbZcae7R9xGTYEIvxIX0JpwEsij2mJJmP13t1OF+hScQ==
NNTP-Posting-Date: Sat, 1 Jan 2011 18:05:26 +0000 (UTC)
In-Reply-To: <ca15d8c3-86db-46fd-b35f-1a2596475769@n32g2000pre.googlegroups.com>
Cancel-Lock: sha1:z8ciN/IYfasJ9R6SiJV9Ve96VJA=
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.16) Gecko/20101123 SeaMonkey/2.0.11
Injection-Info: news.albasani.net; logging-data="dcVovUv/2qO5l2awyBRFkv25mh48QIiCQ9NATUduKAFcG0j67eoObkwPX/+r2tbVk1wMn4KRwYRUcX/wgMolFAKgDxViSJMlo0whRzEZNENanbb9gn4Fg5Rzf/Iyzpm5"; mail-complaints-to="abuse@albasani.net"