From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Panicz Maciej Godek Newsgroups: gmane.lisp.guile.user Subject: Re: How to make GNU Guile more successful Date: Tue, 14 Feb 2017 10:54:38 +0100 Message-ID: References: <87lgtajpkc.fsf@web.de> <87vasdaeha.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1487066143 19664 195.159.176.226 (14 Feb 2017 09:55:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2017 09:55:43 +0000 (UTC) Cc: "guile-user@gnu.org" To: Arne Babenhauserheide Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Feb 14 10:55:37 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 1cdZpZ-0004F5-AQ for guile-user@m.gmane.org; Tue, 14 Feb 2017 10:55:29 +0100 Original-Received: from localhost ([::1]:33559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdZpe-0000FH-U6 for guile-user@m.gmane.org; Tue, 14 Feb 2017 04:55:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdZov-00009t-Vw for guile-user@gnu.org; Tue, 14 Feb 2017 04:54:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdZop-0001Yi-9S for guile-user@gnu.org; Tue, 14 Feb 2017 04:54:46 -0500 Original-Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:35021) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cdZoo-0001Wf-SW for guile-user@gnu.org; Tue, 14 Feb 2017 04:54:43 -0500 Original-Received: by mail-wm0-x22b.google.com with SMTP id v186so13315723wmd.0 for ; Tue, 14 Feb 2017 01:54:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EUFGf/1egbrhTu34bec4q2vpuE3Pd5Q7acEGTqih/AM=; b=MfZx0GH0Im9OUWYbZThEqa/8GDP+20k2sTWMAJ+lo3mbOflTdq3te0VmarzpJucVIQ lv+HSwdkKnUKMmUl54106R8HebxE95SdWFfTMm5UaBmfDzk6vBU48Zwdw6csDgDcj3vU spFt35gKWk/N8LPHggdnk60T4gucXeNPYvWYvP1bxPhOIOKU8sSlneuGHfg52FPg6067 rk3QxojLxAU4mbfE/VtNuh9ZkAretjUf7KMXoKu2kkx9u1mI3iWkcAETEu3rk4S2fAV/ LvXAaKuwg8efEdtX1epudV6IGn7M9KHw4KzNFml7I9ijUiRIIsOE+1kxyt5vBOW2DXdl fvpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EUFGf/1egbrhTu34bec4q2vpuE3Pd5Q7acEGTqih/AM=; b=PtoCQ46hCBoVqrJ1LfO/kGjCSpanfwZzO1pPsG1zSGXL3X5vs4Dok+q5idk7FjZA0v U18yA4tez8ZUerkEtj9f5FBSsO83TPH2T9RQLyEHbOwolWJ3y74tiANAvWFtqWTN9Sdk ZzrkerYDoGPsKqzWKhbVM1cjrUe7FpOK6jlhfHEE9Q4rIttOm5cFHvX/9rVr94YmZOuN /VvDAj64wr0COx7vAo1S/taTU7opc5rfjp33+xxuYFTMuw5QJ0d2S8wbPvYEh58ppIuu 42VvPpu4tAABZ/0PFH5up5/bmqusDxVdI13yItb0ZMlO4pTdtJ3d5o2DyKpXUjjSGoc8 ABbw== X-Gm-Message-State: AMke39nRsTgo2B68TSgwBhKU5bz2zk87YNknhzUDhUm2aG9SAGhXFncoe8aHQhcde8baJi2U7iatFrC71X5IPA== X-Received: by 10.28.148.76 with SMTP id w73mr2381281wmd.74.1487066079447; Tue, 14 Feb 2017 01:54:39 -0800 (PST) Original-Received: by 10.80.148.240 with HTTP; Tue, 14 Feb 2017 01:54:38 -0800 (PST) In-Reply-To: <87vasdaeha.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::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:13192 Archived-At: 2017-02-13 23:54 GMT+01:00 Arne Babenhauserheide : > > Panicz Maciej Godek writes: > > > 2017-02-13 12:06 GMT+01:00 Arne Babenhauserheide : > > There's also this problem with Scheme that it is a very diverse > > community with plethora of implementations. And while I use Guile, I > > don't mind using Chicken or Chez or Gambit for various purposes. Or > > even Stalin sometimes. Maybe, instead of getting a better compiler, we > > should focus on integrating existing compilers? > > You=E2=80=99ll have to ask Andy Wingo about all the hidden complexity in = just > wiring in a compilier. I assume it=E2=80=99s pretty big. > > I think the r7rs folks are working in that regard, to make it possible > to write code which you can simply run through another Scheme > implementation if you need those strengths. > > I started to use (import (...)) to get closer to that: Getting used to > the portable stuff (also it=E2=80=99s shorter than (use-modules (...)). B= ut not > everything is portable, and performance critical stuff most definitely > isn=E2=80=99t. > > And for the stuff I do, most things get performance critical at some > point. Even looking for null-bytes in a file becomes a bottleneck if you > have a few hundred TiB to check. > > Though I mainly need to write Python at work (Scheme isn=E2=80=99t widesp= read > enough for the folks there =E2=80=94 Python is everywhere in science > nowadays). It=E2=80=99s still efficient to do that and I enjoy it, but no= t as > much as writing Scheme. > > >> And it's easy to packages. > >> > > >> > =3D> Another pain topic. In reality it's very easy to package > >> > all sort of guile programs for guix. But guix itself needs > >> > to be more stable. > >> > >> I wish I had guildhall ready. Got hit by > >> time-eaten-by-other-project-because-guildhall-was-priority-three. > >> > >> It needs to be easy to not just package some code, but also to share > >> that package without hitting a bottleneck. > >> > > What happened to initiatives like Scheme NOW, that tried to integrate > > various groups of developers. > > I did not hear from that. > > > Or why can't we just "steal" eggs from Chicken? (I mean it. They alread= y > > have that problem solved) > > Do you mean, integrating eggs into Guile so we could just use them? > Conceptually what would be needed for that is a metadata field: "Works > with Guile". And practically someone to write the integration. > > There's surely many ways to approach that issue. The point is that for some reason, Schemers from various tribes prefer to reinvent the wheel, rather than use an existing one. (Not that I am any different) However, I also think that these CPAN-alike solutions are far from optimal: ideally, programming could be made an experience similar the game "The Journey" by thatgamecompany (where you travel to your goal and sometimes encounter other players heading the same direction), and the repository itself could look more like Wikipedia (but first we'd need to start perceiveing programming a= s a compact way of representing knowledge) > Practically put: We need Andy Wingo to nitpick the tutorial about things > >> which will cause overheads the compiler cannot fix easily =E2=80=94 in= cluding > >> expensive use of macros. > > > I definitely oppose. If Chez has something solved better, why not use > > Chez? > > It=E2=80=99s not "why not use Chez", but rather "what should I teach new > people?" > > They are already learning a new language. When I now go and point them > towards many different implementations which differ in details of stuff > I teach them, I=E2=80=99m throwing more complexity at them. More things t= o > understand before even starting to write working code. > > I totally agree. Programmers shouldn't be concerned whether they're using Chez or Guile or Gambit or Stalin or whatever else. Ideally, they should do well without even knowing that such things exist. There are Schemes, such as Kawa or Biwa or IronScheme, that are tied to their environment, but most of them just run on the PC > Maybe it would already help to mark the code which will work the same in > all (r7rs) Schemes. Is there stuff which is well optimized in all > Schemes? Who knows that? The r7rs benchmarks look like this is very much > not the case: http://ecraven.github.io/r7rs-benchmarks/benchmark.html > > (Or rather, the benchmarks would ask: "why should I *not* use Chez or > stalin for everything I do?" Because those are the fastest for most > tasks.) > > But that might mean to write less elegant or efficient code to keep it > cross-implementation. Should I rather teach new people to solve a > problem as well as possible, or teach them to solve a problem in a > portable way? > > I think that in principle, the programmer should only focus on writing most elegant code > In my case, I decided to use Guile by checking Scheme > implementations. There were three with roughly equal activity and > features. I chose Guile, because it=E2=80=99s a GNU project and it has a = long > history of surviving changing maintainers, so my skills are most likely > to stay useful. > > That's interesting. I chose it by trying to add a scripting language to my game engine written in C++. But I guess that if I was starting now, I'd write the whole engine in Chez (which wasn't opensource until last year) > > The ultimate goal is not to optimize programs, but programmers. > > I=E2=80=99m not sure that I want to optimize them, I want to teach them t= ools to > be more efficient and enjoy their work more (and teach myself the same). > > Yeah, maybe I used a harsh word, but I meant exactly optimizing programmers' efficiency (or if it sounds too bad, "giving them tools to be more efficient") > I think one important point for Scheme would be to gather some consensus > points. The Zen of Python is part of what made that one community > strong. There is no reason why there should not be a Zen of Scheme, > along with implementation-specific Koans which extend it. > > Do you have ideas for principles which could be shared by most Schemers? > > It depends on the most Schemers, not me :) However, you can have a look at the (grand scheme) glossary that I've been maintaining for some time: https://github.com/plande/grand-scheme of course, the intent is to make the glossary usable for someone else than me, and I can boast that I have at least one user distinct from the maintainer. You can have a look and let me know what you think. (for now it only works with Guile). In particular, are there any factors that could convince you t= o adapt it as a base for your library, or what would you want changed (I assume you won't stop at the README file). Anyways, the rules (of thumb) are: - functions should be pure - language constructs that cause side-effects should be encapsulated with macros that limit the extent of those side-effects - if possible, use the quasiquote macro, rather than cons, append or lis= t - prefer the use of match to con= d, if the patterns are simple - never use abbreviations - use commented prepositions to separate arguments Also, I recently added infix syntax to Scheme, but (unlike in Racket or David Wheeler's solutions) in the way it is still a prefix syntax. So for example, instead of writing (< a b), one ought to write (is a < b). The rationale is that prefix notation is terrible for non-symmetrical binary predicates, because it obscures the roles of respective arguments (in addition, (is a < b <=3D c) expands to (and (< a b) (<=3D b c))). I'm still not sure whether it is a good idea, but I have no reasons to think that it is bad either :] [Curiously enough, I think that prefix notation in arithmetic is just fine: (+ a b c) reads as "sum of a, b and c"] > Also, I think that the astounding success of R provides hints with > > regard what is needed for a programming language to gain popularity. R > > has a large repository of packages that fills a certain niche. When I > > advertised my Pamphlet on Hacker News, someone responded critically: > > "are there out of the box libraries to estimate a zero inflated > > negative binomial regression model in guile". Of course, if I knew > > what a zero-inflated negative binomial regression model, I could > > deliver an implementation by just explaining the notions used in that > > phrase. > > I think there=E2=80=99s a quote which applies here: "Most people only use= 20% of > the capabilities of any program, but they do not use the same 20%." > =E2=80=94 Joel Spolksy, if I remember correctly. > > And to make people really dig into it, a programming language must work > well for all tasks they might encounter. That=E2=80=99s why a comprehensi= ve > standard library is important: It gives the assurance that the skills > you learn will stay useful wherever you go. > > There=E2=80=99s a nice quote from Rust folks: "people started to feel saf= e when > we told them about unsafe" =E2=80=94 someone on GNU social. > This essentially says: they then saw that Rust could work in the > uncomfortable way some of their tasks might require. That they could > take it into harsher territory, if needed. > > I like it that you and Amirouche look a lot at the sociocultural perspective of programming > > (But then again, I try to write functional programs whenever > > possible, often consciously sacrificing time complexity of my > > solutions, and I'm aware that not everybody will like it.) > > I look for ease of understanding, with functional programming techniques > being a useful tool to reduce complexity and to simplify refactoring. > > But then, this is a point where we actually move into a similar > direction out of different motives. I think the only problem here is the > danger of assuming contradiction where there does not need to be > any. Just different nuances of Zen :) > > Yes, to me the ease of understanding is also crucial. (I'd even go further and say that undestranding is the very point of programming) Best regards, Panicz