From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Linas Vepstas Newsgroups: gmane.lisp.guile.user Subject: Re: out-of-control GC Date: Thu, 14 Sep 2017 15:15:17 -0500 Message-ID: References: <87zia28phj.fsf@web.de> <87shfuqojf.fsf@elektro.pacujo.net> <877ex6qivt.fsf@elektro.pacujo.net> <87vakl2jkv.fsf@elektro.pacujo.net> Reply-To: linasvepstas@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1505420163 1190 195.159.176.226 (14 Sep 2017 20:16:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 14 Sep 2017 20:16:03 +0000 (UTC) Cc: "guile-user@gnu.org" To: Marko Rauhamaa Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Sep 14 22:15:59 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsaYI-00008I-Nk for guile-user@m.gmane.org; Thu, 14 Sep 2017 22:15:58 +0200 Original-Received: from localhost ([::1]:49856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsaYP-0001o1-VA for guile-user@m.gmane.org; Thu, 14 Sep 2017 16:16:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsaY2-0001na-LM for guile-user@gnu.org; Thu, 14 Sep 2017 16:15:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsaY0-0002IT-8S for guile-user@gnu.org; Thu, 14 Sep 2017 16:15:42 -0400 Original-Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]:47699) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dsaXz-0002H4-PL for guile-user@gnu.org; Thu, 14 Sep 2017 16:15:40 -0400 Original-Received: by mail-lf0-x22b.google.com with SMTP id 80so466085lfy.4 for ; Thu, 14 Sep 2017 13:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xTduBu09et2lCtZvpEFnA/Xhqtxe4tKy53BfeDFzC1U=; b=fBj4Tw75RjFhJ1IDDLuYd7/ociKdaO6fOHgjTrBI1Yumd+RxkT2anOVumRNGk5QaBu HmwGRFW04CcEP/mK0XSKlNp9xVFWA09vuaGPkM0sWWdZKOp03gzjG2a08rDYqHce4j62 L1lRQUeLhC+j8EoBsdJ4uVsnYeuCEaQeUQK3Ql2t34YejpssPqJugW0noPO9qs7/hCXw E6fJbkULTdij7hCVOpQhLm3RRzFpj/YTkbc6QHN1Wc4UAWWj/i7wXKaqYROP3g+dRjk+ bifO4D6AYGU7Loy/jFSyeQVHiq19qe265O9RsV9Wr4BsQ4IVzKFRs9GotJytTZYjQiZT Zdqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=xTduBu09et2lCtZvpEFnA/Xhqtxe4tKy53BfeDFzC1U=; b=S9GqpqIoHXGhoFzP0rVxmAhNXR+8X2/ss0czaJsxNaIalTZNXdQffcAmmoZe/H4ZIM VklS6AcpzyDceayMPEsVC6p6TSJjg5pKWxt5/zq72e2OMJ92pYRh30GZsmOxDyRcPzkx 4sGFjUE+N3i67OobmSO8d+yuZ59B/U07Db6xg58+bgbPn1HTpTZ2vzNrzH9e3qeRO7Zk dIFTnj34E5ReL6qAOd6O1mWmbqF/o5myTZ/h81o2cWAyegUvZ8vc502b/n5IqF4iQXy/ 3NxvbaoWuqgaH//qIYGE95xUuUU+cq3jm17atW51qaXX8MUID6Ji2Xtl/u8eacD6G4KL TlaQ== X-Gm-Message-State: AHPjjUgbq+C1e/nhUhl/2nOegeWLBXVln6ahjzBPkdnbH2j0AZJB3NGe jQzvol2ndKbQJ0vTH2bzRemAbt3fCPpfp8y6pQ0= X-Google-Smtp-Source: AOwi7QAVo3pCckVv/BZn2el41XEA7eLJNaCmDjqU741UGzsSPFXy5HsOqQJoUNpQFdaJQ53HndGWvi4eOZIdtWKqPSY= X-Received: by 10.25.99.23 with SMTP id x23mr8377841lfb.100.1505420138489; Thu, 14 Sep 2017 13:15:38 -0700 (PDT) Original-Received: by 10.25.44.200 with HTTP; Thu, 14 Sep 2017 13:15:17 -0700 (PDT) In-Reply-To: <87vakl2jkv.fsf@elektro.pacujo.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22b X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14149 Archived-At: Hi Marko, long off-topic reply about the nature of programming languages. On Thu, Sep 14, 2017 at 1:58 PM, Marko Rauhamaa wrote: > Linas Vepstas : > > > Well that's a can of worms. Aside from static typing to benefit the > > compiler, there's static typing to help the programmer understand what > > the heck is being passed as an argument to some poorly documented, > > overly-long function. This has always been a kind-of bugaboo of > > reading other people's scheme code -- its too often too hard to > > understand. > > > > This is also why python is popular: any shmo feels they can code in > > it; its the new visual-basic of the 21st century, with all of the > > culture and code-quality that implies. > > I strongly disagree. Python is popular because its level of abstraction > is optimal for a whole slew of use cases. I see no reason why Scheme > couldn't surpass Python some day in the future for the same reason. > What would that leve of abstraction be? Racket, ex PLT/scheme seems to have taken steps in that direction; I can't tell if they've been successful at this. Should guile move in that direction? > > Not everybody can write software in good style. In fact, in my > experience very few programmers can do it. That is not a property of the > programming language. > Perhaps. Back in the day, when young programmers were learning C++ for the first time, they felt obligated to use each of the nifty new tricks they just learned: multiple inheritance, overloaded operators, virtual methods, virtual base classes, templates: not just use, but abuse these, even when something simpler was available. It was like working with quick-set concrete: after the code was written, it seemed like it was impossible to make any significant changes to it that would even compile, much less do the right thing. This kind of code was hard to read cause it was badly written. Sometimes, with scheme, I get the sense that if you haven't read SICP you can't understand what the code does: that you can't understand the code cause it's well-written. > > Static type declarations have undeniable quality benefits, but in my > experience the noise they introduce is also a quality problem. One of > the prime quality boosters for high-level programming languages is the > clear but concise expressivity. You can see the forest for the trees. > Speaking of SICP -- one of the early examples they have there is for working with 2D numeric data, and using either (x,y) under the covers, or using (r,theta). Which is all very spiffy, except that, for the user who just glances at the function signature, its not clear exactly what that function was expecting to get as arguments. Somehow, that doesn't happen in Python, even in it's current untyped state. But I cannot put my finger on it, its a gut-sense thing. > > > For a certain class of problems, coding in python simply doesn't work: > > graph data structures are naturally recursive and functional; they're > > a natural fit for scheme, and are hard/painful/nearly impossible to > > manipulate in python. > > I don't see that. > Hmm. I have C++ code with guile, cython and haskell bindings. It is used to work with data structures that resemble json-like nested, recursive tree-structures. By json-like I mean they are trees, with various different types at the vertexes. A graph (directed or non-directed, with loops in general) is specified by specifying the various trees that partly span the graph. I kind of wish I had javascript bindings for this thing, but can't figure out how. The guile bindings for this are very elegant, and are about as readable as json is. The python bindings are real clunkers -- they're much more verbose, by factors of 3x to 5x, To add injury to insult, the insanely stupid python whitespace rules means that it is impossible to indent them into the natural tree structure that they naturally "want" to have. Perhaps our python bindings are mis-designed. They were created by a python fanatic to be "pythonic" which I think means "I don't know how to code" :-( Our guile bindings are also mis-designed (by me), I regret many of the decisions I made... but they're still nicer than the python... > The greatest benefit of Scheme (and other Lisps) is the data/code > unification. All code is data and all data is code. Apart from that, > Python has adopted almost everything from Lisp. Now, Scheme and Lisp > famously allow you to expand the language syntax dynamically, but I'd > say you most often shouldn't use that power. Good Scheme code embraces > the lambda and leaves ad-hoc syntax aside. > Since we are off-topic, I want to mention two things that scheme doesn't have that I'm supremely interested in. Of course, it would not be scheme, any more, once these were added, but these are things important for some unspecified future. One is a knowledge-representation language subset. Something like the datalog subset of prolog, or something like SQL: some subset of scheme that can be manipulated and queried and persisted to a file. Think pattern matching .. but not the current anemic, super-simplistic model used in scheme, but something full-featured, like SQL. Applied not to tables, but to s-exps. Another neato trick would be some kind of term-rewriting system. Something kind-of-ish like the scheme macro subsystem, but instead, the macros could be invoked repeatedly, ad infinitum, on arbitrary data, instead of just once on fixed data. Again, kind-of-like SQL query statements: you can re-use them over and over, even as the table of data underneath it all changes. Pattern-matching, all grown up. If you had these two, you've have a graph DB that far exceeded what the tinkerpop folks can do. and with it being scheme ... or at least s-exps ... --linas > > > Marko > -- *"The problem is not that artificial intelligence will get too smart and take over the world," computer scientist Pedro Domingos writes, "the problem is that it's too stupid and already has." *