From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: arthur miller Newsgroups: gmane.emacs.devel Subject: RE: list of elisp primitives ? Date: Thu, 26 Dec 2019 18:00:35 +0000 Message-ID: References: <627F3815-987E-4E82-8118-EE559CA7721F@traduction-libre.org> <5E53A27C-7C86-4275-AC12-9799C3CB1956@traduction-libre.org> , <701C773A-96C5-47FD-B75F-92947976E57B@traduction-libre.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_VI1P194MB04292418C75CBC353B29ECE8962B0VI1P194MB0429EURP_" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="255792"; mail-complaints-to="usenet@blaine.gmane.org" To: Jean-Christophe Helary , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 26 19:01:35 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ikXS2-0014NI-MB for ged-emacs-devel@m.gmane.org; Thu, 26 Dec 2019 19:01:35 +0100 Original-Received: from localhost ([::1]:55632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikXS1-00084W-FZ for ged-emacs-devel@m.gmane.org; Thu, 26 Dec 2019 13:01:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60186) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikXRE-0007bg-Q7 for emacs-devel@gnu.org; Thu, 26 Dec 2019 13:00:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ikXRC-00042p-EY for emacs-devel@gnu.org; Thu, 26 Dec 2019 13:00:44 -0500 Original-Received: from mail-am6eur05olkn2082.outbound.protection.outlook.com ([40.92.91.82]:26209 helo=EUR05-AM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ikXR9-0003ze-8x for emacs-devel@gnu.org; Thu, 26 Dec 2019 13:00:40 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WB5JPJF8BscAHrvEbffWC4SL5FFm7yf3Xun3nRmX+8zXYq3A+F+kYFf56KR3seI2QFuLTTlypS1RAVl3K3IS1kuAzRYZAMd1QYVcWHRJYh1+DN2L1lb1MimRwOwDKmSua6FtqGFjvdx4GbzqrGuzWknARKD0fInV+kKdjx/BLxL5VOXM1d3Oo9MXf9Kj21d1XiLg9aAfQ3RiN3U6rJhNXse1TqXmfHQO1WjEbynDJJ9sUyi/iySgr3MuAU1lmOWaPHnfWOECAXuLzUYa46NKVv6k6GpKdXTV1SkKHTRZVnh7Y0efg/bP9YgWL2HjPTt0AV/8tKrNhwHVGVP14/6JTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KLn2Qr43t43OUMJOpAgymy7QtcPP6CErEVX07ZpQAGE=; b=QYO1N9e5UBLv6lQfpLFh/BQZW6A0u+ejqaK9bGMZVk99nKzyJMkVnYBoWB8Y4tKkYNKRmO7b6psOswzPYVo1mnkCYgq12aogKNVjXYpAKpsru/QKGKrGiIiuIq/vM9h7S0gXEqcUHZbk9x0KVOTbiiQkn4wYZqVhUC6ciYqk+YONuvone3Dhp15L5ddEeIhorIMF7lHN0tAQr8LjraUnjR9fMDGfkMXjNlw3oNJGwWoNhWMt5vzIZpHEEU3hUXFZwHQKV8jlnfu8+ZL5d4BOvvhKCaMWkpC5KPI7+cm1OSsI7LE6J2AtWYDQ4O7TK1Q4AFo980FaUwQ8ZPC1m+BKKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KLn2Qr43t43OUMJOpAgymy7QtcPP6CErEVX07ZpQAGE=; b=cO2+xe2SyQ0QpTbrHz70NSqOSofjd5pwfx240kRqgREoIMYkUNEe8Wo2gRhjkhrS+xKCthsGWP9ZSU9s20pJyKKmersDZDJPBZB/djg8XJg3FTfBHpMTP8Y4sKsJzHa5w1776nuJI27hqWnwEVLEn1Pnme1yg+shF69oueXOgnT7zR26vYryEq9ZgevEZJiKfXzfpky5plrgCQOzP781EY2NqDOxGXrdo5lyCdJbI8vuO1dCfFChpts9thjG3SAmZK0dVHm0eurm178fYjxj5AhqcNSc/V1kx8galGUr4MTTpqFlLGcQaZN46rCP2SRJWjuIuwBNdEBgor38TwgavA== Original-Received: from VI1EUR05FT064.eop-eur05.prod.protection.outlook.com (10.233.242.59) by VI1EUR05HT015.eop-eur05.prod.protection.outlook.com (10.233.243.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2581.11; Thu, 26 Dec 2019 18:00:35 +0000 Original-Received: from VI1P194MB0429.EURP194.PROD.OUTLOOK.COM (10.233.242.55) by VI1EUR05FT064.mail.protection.outlook.com (10.233.243.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2581.11 via Frontend Transport; Thu, 26 Dec 2019 18:00:35 +0000 Original-Received: from VI1P194MB0429.EURP194.PROD.OUTLOOK.COM ([fe80::35f2:9ea2:efd6:1d46]) by VI1P194MB0429.EURP194.PROD.OUTLOOK.COM ([fe80::35f2:9ea2:efd6:1d46%5]) with mapi id 15.20.2581.007; Thu, 26 Dec 2019 18:00:35 +0000 Thread-Topic: list of elisp primitives ? Thread-Index: AQHVuHQA9xCOvnqqUEu0qxXlvMZ2gKfFfNwAgAAGIoCAAAj6EIAA3mKAgAZLf4CAAAX9/g== In-Reply-To: <701C773A-96C5-47FD-B75F-92947976E57B@traduction-libre.org> Accept-Language: sv-SE, en-US Content-Language: sv-SE x-incomingtopheadermarker: OriginalChecksum:B2BF9A3A28B2BAF521243EF337B34C3E27BD630995A52D244083CEBE1A477326; UpperCasedChecksum:6553F62BF3FE65B7C7213A6B7EE0ECB95A62FCDD7849CE73D1737262250FA727; SizeAsReceived:7315; Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [CE1R1H4cEMpw62q+pLaJRxxNS0gCKO/Z] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: fc2e1ca0-062a-4cb0-402c-08d78a2d820f x-ms-traffictypediagnostic: VI1EUR05HT015: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 28Kjm+tifG8sK5DvS2vzoyQjKL94YOyQxc+f2UswS+xTZNq7iDojrFjyZEGXEdchOegXL2Ys3GGsMl5dK4e56I16DSRE75XIcG3pk6tk6FptU1P42kyVEcbY2TRG11Rrv1Nrsc6qd210PnVPLMciPnYc9T084y260e/QbWY58FfKq3JQ33GUQGKFqnU4Le5y+T1nTLFNufu7Z0qhdkxEYtFHENFMhTQj7NqloHCpgGw= x-ms-exchange-transport-forked: True X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: fc2e1ca0-062a-4cb0-402c-08d78a2d820f X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Dec 2019 18:00:35.6033 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1EUR05HT015 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.91.82 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243665 Archived-At: --_000_VI1P194MB04292418C75CBC353B29ECE8962B0VI1P194MB0429EURP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I think you are thinking from the wrong end. As a consult I had opportunity= to work with all kind of languages I never thought I would work with and o= f which I had no idea what APIs where available or what was idiomatic codin= g. Anyway my approach was always to think in general programming terms of repe= tition, conditional, aggregations etc. I would then lookup what I needed to= find out details of syntax and exposed libraries. I believe programming, and any programming language is best learned by doin= g. Especially when you already know how machine works and have knowledge of= algorithms, data structures and program organization. If you have seen thevlegendaru K&R C book, then that is a bitwhat I mean. I= don't think picking up some small subset of API and giving it to people an= d telling them to make something with it is the necessary the best approach= . Probably to show them basics on small exercises and teach them how to loo= kup information they need further. Yes it takes time to lookup stuff, but t= hat is the nature of the thing. If we make an analogy with Lego bricks, then yes one can see library functi= ons as bricks to be combined, but just as Lego bricks, and everything else = in life, one has to know what one wants to make before one starts to build = it, otherwise it will just be random mess. Skickat fr=E5n min Samsung Galaxy-smartphone. -------- Originalmeddelande -------- Fr=E5n: Jean-Christophe Helary Datum: 2019-12-26 18:39 (GMT+01:00) Till: Emacs developers =C4mne: Re: list of elisp primitives ? > On Dec 23, 2019, at 2:31, Drew Adams wrote: > >> I'm trying ... to find a limited subset of >> functions that one can use to program in elisp > ^^^^^^^^^^^^^^^^ >> and do non-trivial things but that do not > ^^^^^^^^^^^^^^^^^^^^^ >> involve searching the reference at all times. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > That's not what a list of subrs gives you, at all. > A subr is just a function coded in C, not in Lisp. > Likewise, for other things, such as variables, > that might be defined in C. > > The choice of whether to implement something in C > has nothing to do with, and is no guide for, ease > in learning or how often something is used in > typical Elisp code. I'm not suggesting that implementing lisp functions in C is related to ease= of learning or anything. My idea, which may be wrong, is that lisp code uses building blocks to prov= ide more advanced functions and that the most basic blocks are lisp functio= ns implemented in C. Hence, knowing the building blocks (or a few dozen useful ones) can give a = clearer idea of what to do with elisp in general. Mind you, I too am trying to find my way around and it's not easy. My pet p= eeve is "discoverability" and for now despite the info/doc integration, I'm= still very much struggling. Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune --_000_VI1P194MB04292418C75CBC353B29ECE8962B0VI1P194MB0429EURP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I think you are thinking from the wrong end. As a consult= I had opportunity to work with all kind of languages I never thought I wou= ld work with and of which I had no idea what APIs where available or what w= as idiomatic coding.

Anyway my approach was always to think in general program= ming terms of repetition, conditional, aggregations etc. I would then looku= p what I needed to find out details of syntax and exposed libraries. <= /div>

I believe programming, and any programming language is be= st learned by doing. Especially when you already know how machine works and= have knowledge of algorithms, data structures and program organization.&nb= sp;

If you have seen thevlegendaru K&R C book, then that = is a bitwhat I mean. I don't think picking up some small subset of API and = giving it to people and telling them to make something with it is the neces= sary the best approach. Probably to show them basics on small exercises and teach them how to lookup information th= ey need further. Yes it takes time to lookup stuff, but that is the nature = of the thing.

If we make an analogy with Lego bricks, then yes one can = see library functions as bricks to be combined, but just as Lego bricks, an= d everything else in life, one has to know what one wants to make before on= e starts to build it, otherwise it will just be random mess.



Skickat fr=E5n min= Samsung Galaxy-smartphone.



-------- Originalmeddelande --------
Fr=E5n: Jean-Christophe Helary <jean.christophe.helary@traduction-l= ibre.org>
Datum: 2019-12-26 18:39 (GMT+01:00)
Till: Emacs developers <emacs-devel@gnu.org>
=C4mne: Re: list of elisp primitives ?



> On Dec 23, 2019, at 2:31, Drew Adams <drew.adams@oracle.com> wro= te:
>
>> I'm trying ... to find a limited subset of
>> functions that one can use to program in elisp
>            = ;            &n= bsp;       ^^^^^^^^^^^^^^^^
>> and do non-trivial things but that do not
>      ^^^^^^^^^^^^^^^^^^^^^
>> involve searching the reference at all times.
>          ^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^^^^^^^^^
>
> That's not what a list of subrs gives you, at all.
> A subr is just a function coded in C, not in Lisp.
> Likewise, for other things, such as variables,
> that might be defined in C.
>
> The choice of whether to implement something in C
> has nothing to do with, and is no guide for, ease
> in learning or how often something is used in
> typical Elisp code.

I'm not suggesting that implementing lisp functions in C is related to ease= of learning or anything.

My idea, which may be wrong, is that lisp code uses building blocks to prov= ide more advanced functions and that the most basic blocks are lisp functio= ns implemented in C.

Hence, knowing the building blocks (or a few dozen useful ones) can give a = clearer idea of what to do with elisp in general.

Mind you, I too am trying to find my way around and it's not easy. My pet p= eeve is "discoverability" and for now despite the info/doc integr= ation, I'm still very much struggling.


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blog= spot.com @brandelune



--_000_VI1P194MB04292418C75CBC353B29ECE8962B0VI1P194MB0429EURP_--