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: Sv: Christmas wish: Literate Elisp Date: Sun, 15 Dec 2019 08:37:56 +0000 Message-ID: References: , Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_VI1P194MB0429DA112E2D3B3D47AF1C3996560VI1P194MB0429EURP_" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="190306"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "archambv@iro.umontreal.ca" , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 15 09:38:16 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 1igPPp-000nMB-Gg for ged-emacs-devel@m.gmane.org; Sun, 15 Dec 2019 09:38:13 +0100 Original-Received: from localhost ([::1]:37064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igPPn-0001vD-ME for ged-emacs-devel@m.gmane.org; Sun, 15 Dec 2019 03:38:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54721) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igPPg-0001v6-HV for emacs-devel@gnu.org; Sun, 15 Dec 2019 03:38:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igPPe-0005oV-HY for emacs-devel@gnu.org; Sun, 15 Dec 2019 03:38:04 -0500 Original-Received: from mail-oln040092064098.outbound.protection.outlook.com ([40.92.64.98]:13702 helo=EUR01-DB5-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 1igPPd-0005gl-Ok for emacs-devel@gnu.org; Sun, 15 Dec 2019 03:38:02 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cDuwbSp8UuQTEG4wiEZUVNPDJS9N9t8Z5TAMLxYmTd/djGYK7R5se3M82+2fOPcUqmJUa+6Kplh8nCHpS1fWvaIu+oLK0u7DoUNG8AbDK7M6f5f0jYZHTgPlKE2mZavaY8ehSdahg6jb/c5cnli0ShhZey/6wbY/8fCgkmBeEtiV0jS2pYwxu9i+VOCkgJ5OxdQtDnQENAHoGqeog71bKfB/7d+JVjRiO7UvJAfrb9J1am0qsrX2Hf1s5Dh+LGZlxjRGYJfpjdYFkMWe/dz+eG3Vt6pE7BPW36hRisRCuxRd/o2xgdhFhZiCb4QK2JRBS+ttiiLy5T54GR/4lJkxAQ== 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=fya9e/Jy//89Lq+TI8No5XQK1VVwo49p4YzE1rfSSgo=; b=ahF3dOwZWo0+UDUb9ZL7YSBjgsDuZckSFd+ovyeEDSkALoZTFkTWYUQjMZ97YAx37Dy9ZpUa0KG81IFP5WfxF+sZpsMzw7Dvy9SC6+yP/kQa2waIIWEWxykXwUUYf+feXbrPOYnIL1eEK/um6V/MuUR+mDEeav6aMqtyd4wVOE6Hi+7Os9z+ld4Krydm/UNX4qd2UjAgiWoRK7BbCh7rHkKBczkksH0HvqVtynVSq6VjFmSeqJ8yjf7fzfdcI0fNxtjPpt0N2nv2a9hj83TYHaavsw21oR5vgIUooiytyW77tNSczDSzk6Ob/EMnAydmBNC5oeRw90NxXU5qYt98yA== 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=fya9e/Jy//89Lq+TI8No5XQK1VVwo49p4YzE1rfSSgo=; b=KX7LTVTpYHUqRJB0RcYP0iSM/dJIPzvQsl7mYzx1/1Qpo94fBbSXZlBFBvHfHnHJXYWHLUKN0Tjx/8s02GeQ8+5devVw1H8/8kclMb/XyAOysUhkqhwXbSWzCsLqw9BJ7dsEtUElRz2SWu01BkeelCjJmrEBFccpyxxarrSZy4qL4firwvnw6MSWDsWL4QQUBKHzkAefCKq6z6Uv91gv43ipRNyK1aMJKnw4yT6N3gAWKBXiqeWc3GOdfWGTyFuLZ+Ar8rNcI6FHL44PLadavt+9t/Lj/6mNAqOWk5N4XqtHsoTUHousSf8QqTzAk9yfhM/N+na9M4ZXKCTG9HPHOA== Original-Received: from VE1EUR01FT034.eop-EUR01.prod.protection.outlook.com (10.152.2.51) by VE1EUR01HT174.eop-EUR01.prod.protection.outlook.com (10.152.3.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.14; Sun, 15 Dec 2019 08:37:56 +0000 Original-Received: from VI1P194MB0429.EURP194.PROD.OUTLOOK.COM (10.152.2.51) by VE1EUR01FT034.mail.protection.outlook.com (10.152.2.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.14 via Frontend Transport; Sun, 15 Dec 2019 08:37:56 +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.2538.019; Sun, 15 Dec 2019 08:37:56 +0000 Thread-Topic: Sv: Christmas wish: Literate Elisp Thread-Index: AQHVsQLpbIcz5UxgfkCAm3tN+LzJEqe2wVZzgAJDFqiAAKl6MoABNfkl In-Reply-To: Accept-Language: sv-SE, en-US Content-Language: sv-SE x-incomingtopheadermarker: OriginalChecksum:EF3B66BEA8AC86AA72E121ABF56B61899E0F475AE941FEBC9F498518B5AEAA17; UpperCasedChecksum:A019B25731FF3048F7FE0E9B5C5A2DB05079C0C36A8A257D3DF0CDA6C6FC010F; SizeAsReceived:7147; Count:46 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [/SHptYSDIh07NmBHilJK3oI/ToUzbRkd] x-ms-publictraffictype: Email x-incomingheadercount: 46 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 75291f1f-c126-4457-02c6-08d7813a1569 x-ms-traffictypediagnostic: VE1EUR01HT174: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PU6L/lNeNFc8T1yJwQ4bnhK2/TAnmC1GUDDtXUb1n66poSNFii4MzAiL+P3llrkGJ9hudIssO5h4SRK0flwOs5Ci0ojYdB+HuYk2gnBYmYZYe6meclbfWR/1K2sRxiI9OGDaNfSO7vFdQ5HUMfGwQVBf/fF3Wuv2qA9NZ1d/Trf3tf6U499Sk3JxlY6u1WA9wg2pf7T4gml1ypX1mB6EVfPJBET2WOBtD42ME6tzOqw= 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: 75291f1f-c126-4457-02c6-08d7813a1569 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2019 08:37:56.3194 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT174 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.64.98 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:243393 Archived-At: --_000_VI1P194MB0429DA112E2D3B3D47AF1C3996560VI1P194MB0429EURP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks, I have also found literste-li when I searched, but thought it didn'= t looked as suggested . I have played a bit yesterday, for about an hour and managed to find reade= valloop in lread.c in sources. I managed to get a partial hack to work in s= ome cases, but in other I get parse errors. I am not sure I understand exac= tly how the parser hangs together yet, if I can do everything in that funct= ion or I have to change some of other functions too. I will have more time = tonight evening. Skickat fr=E5n min Samsung Galaxy-smartphone. -------- Originalmeddelande -------- Fr=E5n: Stefan Monnier Datum: 2019-12-14 15:08 (GMT+01:00) Till: arthur miller Kopia: emacs-devel , archambv@iro.umontreal.ca =C4mne: Re: Sv: Christmas wish: Literate Elisp arthur miller [2019-12-14 04:40:30] wrote: > To be honest my contact with Haskell broke once the university course, so= me > 20 yrs ago was over, so I am a little bit illiterate about Haskells sexy > packages. I just recalled that it was possible to invert text and code i= n > Haskell. But cool. The fact that it's written is Haskell is just incidental. > Didn't know there is a package to let load org files directly either. Hmm... The closest I can find is https://github.com/jingtaozf/literate-elis= p/ but it doesn't quite match what I think I was referring to. Stefan > Thanks for the answers. > ________________________________ > Fr=E5n: Stefan Monnier > Skickat: den 12 december 2019 18:29 > Till: arthur miller > Kopia: emacs-devel ; archambv@iro.umontreal.ca > =C4mne: Re: Christmas wish: Literate Elisp > >> My proposal is to slightly change Elisp parser to treat lines that start >> with any other printable character but '(' as a start of comment and to >> simply ignore the line, just as it treats ';' as a comment. > > The `sexpresso` Haskell package follows the same idea ;-) > > As for using it in Elisp: I don't think there's anything stopping anyone > from making such a `literate-elisp-mode` and even arrange for `load` to > handle such a file (just like there is already a package that lets > `load` work directly on .org files). > > I'd welcome such a package in GNU ELPA. > > > Stefan --_000_VI1P194MB0429DA112E2D3B3D47AF1C3996560VI1P194MB0429EURP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Thanks, I have also found literste-li when I searched, bu= t thought it didn't looked  as suggested .

I have played a bit yesterday,  for about an hour an= d managed to find readevalloop in lread.c in sources. I managed to get a pa= rtial hack to work in some cases, but in other I get parse errors. I am not= sure I understand exactly how the parser hangs together yet, if I can do everything in that function or I have to c= hange some of other functions too. I will have more time tonight evening.



Skickat fr=E5n min= Samsung Galaxy-smartphone.



-------- Originalmeddelande --------
Fr=E5n: Stefan Monnier <monnier@iro.umontreal.ca>
Datum: 2019-12-14 15:08 (GMT+01:00)
Till: arthur miller <arthur.miller@live.com>
Kopia: emacs-devel <emacs-devel@gnu.org>, archambv@iro.umontreal= .ca
=C4mne: Re: Sv: Christmas wish: Literate Elisp

arthur miller [2019-12-14 04:40:30] wrote:

> To be honest my contact with Haskell broke once the university course,= some
> 20 yrs ago was over, so I am a little bit illiterate about Haskells se= xy
> packages.  I just recalled that it was possible to invert text an= d code in
> Haskell.  But cool.

The fact that it's written is Haskell is just incidental.

> Didn't know there is a package to let load org files directly either.<= br>
Hmm... The closest I can find is https://github.com/jingtaozf/literate-elisp/
but it doesn't quite match what I think I was referring to.


        Stefan


> Thanks for the answers.
> ________________________________
> Fr=E5n: Stefan Monnier <monnier@iro.umontreal.ca>
> Skickat: den 12 december 2019 18:29
> Till: arthur miller <arthur.miller@live.com>
> Kopia: emacs-devel <emacs-devel@gnu.org>; archambv@iro.umontreal= .ca <archambv@iro.umontreal.ca>
> =C4mne: Re: Christmas wish: Literate Elisp
>
>> My proposal is to slightly change Elisp parser to treat lines that= start
>> with any other printable character but '(' as a start of comment a= nd to
>> simply ignore the line, just as it treats ';' as a comment.
>
> The `sexpresso` Haskell package follows the same idea ;-)
>
> As for using it in Elisp: I don't think there's anything stopping anyo= ne
> from making such a `literate-elisp-mode` and even arrange for `load` t= o
> handle such a file (just like there is already a package that lets
> `load` work directly on .org files).
>
> I'd welcome such a package in GNU ELPA.
>
>
>         Stefan

--_000_VI1P194MB0429DA112E2D3B3D47AF1C3996560VI1P194MB0429EURP_--