Re: [PATCH] add language/wisp to Guile?

2023-10-02 Thread Christine Lemmer-Webber
"Philip McGrath" writes: > I've sort of alluded above to my pipe dream of a grand unified future > for Racket-and-Guile-on-Chez, Guile-and-Racket-on-the-Guile-VM, and > endless other possibilities. I wrote about it in more detail on the > guix-devel list at [10]. (These thoughts were inspired by

Re: [PATCH] add language/wisp to Guile?

2023-10-02 Thread Christine Lemmer-Webber
Maxime Devos writes: > [[PGP Signed Part:Undecided]] > Op 30-09-2023 om 15:17 schreef Christine Lemmer-Webber: >> Haven't fully caught up on this thread, but as a side note I have a >> mostly-finished implementation of a Wisp parser which takes a very >> different approach than Arne's, and was

Re: [PATCH] add language/wisp to Guile?

2023-09-30 Thread Maxime Devos
Op 30-09-2023 om 15:17 schreef Christine Lemmer-Webber: Haven't fully caught up on this thread, but as a side note I have a mostly-finished implementation of a Wisp parser which takes a very different approach than Arne's, and was more understandable to me personally, a bit more functional and

Re: [PATCH] add language/wisp to Guile?

2023-09-30 Thread Christine Lemmer-Webber
Haven't fully caught up on this thread, but as a side note I have a mostly-finished implementation of a Wisp parser which takes a very different approach than Arne's, and was more understandable to me personally, a bit more functional and recursive-descent style. I could make it available if

Re: [PATCH] add language/wisp to Guile?

2023-03-08 Thread Dr. Arne Babenhauserheide
Hi, "Dr. Arne Babenhauserheide" writes: > Ludovic Courtès writes: >>> Why should Wisp be a separate package when other SRFIs are made part >>> of Guile? Your point about maintenance and evolving applies equally >>> to other SRFIs. >> >> That’s a good point. Making it available as (srfi

Re: [PATCH] add language/wisp to Guile?

2023-02-27 Thread Marc Nieper-Wißkirchen
Am Di., 28. Feb. 2023 um 05:27 Uhr schrieb Philip McGrath : > > Hi, > > On Monday, February 27, 2023 2:26:47 AM EST Marc Nieper-Wißkirchen wrote: [...] > > Nevertheless, I am not sure whether it is relevant to the point I > > tried to make. The "#!r6rs" does not indicate a particular language >

Re: [PATCH] add language/wisp to Guile?

2023-02-27 Thread Philip McGrath
, 26. Feb. 2023 um 08:46 Uhr schrieb : > > > > Message: 1 > > > > Date: Sun, 26 Feb 2023 02:45:12 -0500 > > > > From: "Philip McGrath" > > > > To: "Maxime Devos" , Ludovic Courtès > > > > > > > > , "Matt W

Re: [PATCH] add language/wisp to Guile?

2023-02-27 Thread Marc Nieper-Wißkirchen
12 -0500 > > > From: "Philip McGrath" > > > To: "Maxime Devos" , Ludovic Courtès > > > > > > , "Matt Wette" , > > > guile-devel@gnu.org > > > > > > Cc: "Christine Lemmer-Webber" > > >

Re: [PATCH] add language/wisp to Guile?

2023-02-26 Thread Dr. Arne Babenhauserheide
Matt Wette writes: > On 2/26/23 10:03 AM, Dr. Arne Babenhauserheide wrote: >> Matt Wette writes: >> >>> You can name a file containing Scheme code "foo.js" and "guile foo.js" >> guile -L . -e '(foo)' -c '' >> >> won’t find it. But it will find it in foo.scm. >> > > Guile does not use file

Re: [PATCH] add language/wisp to Guile?

2023-02-26 Thread Matt Wette
On 2/26/23 10:03 AM, Dr. Arne Babenhauserheide wrote: Matt Wette writes: With respect to file extensions, guile does not use file extension: You can name a file containing Scheme code "foo.js" and "guile foo.js" will execute it. The module-system uses file extensions: If you (define-module

Re: [PATCH] add language/wisp to Guile?

2023-02-26 Thread Dr. Arne Babenhauserheide
Matt Wette writes: > With respect to file extensions, guile does not use file extension: > You can name a file containing Scheme code "foo.js" and "guile foo.js" > will execute it. The module-system uses file extensions: If you (define-module (foo) #:export (main)) (define (main args)

Re: [PATCH] add language/wisp to Guile?

2023-02-26 Thread Matt Wette
With respect to file extensions, guile does not use file extension: You can name a file containing Scheme code "foo.js" and "guile foo.js" will execute it. The code in the wip-load-lang branch provides file-extension support: 1) Currently emacscript, with "js" extension, elisp, with "el"

Re: [PATCH] add language/wisp to Guile?

2023-02-26 Thread Maxime Devos
Op 26-02-2023 om 08:45 schreef Philip McGrath: Hi, On Sat, Feb 18, 2023, at 10:58 AM, Maxime Devos wrote: On 18-02-2023 04:50, Philip McGrath wrote: I haven't read the patch or this thread closely, I'll assume you have read it non-closely. but R6RS has an answer to any concerns about

Re: [PATCH] add language/wisp to Guile?

2023-02-26 Thread Marc Nieper-Wißkirchen
Am So., 26. Feb. 2023 um 08:46 Uhr schrieb : > Message: 1 > Date: Sun, 26 Feb 2023 02:45:12 -0500 > From: "Philip McGrath" > To: "Maxime Devos" , Ludovic Courtès > , "Matt Wette" , > guile-devel@gnu.org > Cc: "Christine

Re: [PATCH] add language/wisp to Guile?

2023-02-25 Thread Philip McGrath
Hi, On Sat, Feb 18, 2023, at 10:58 AM, Maxime Devos wrote: > On 18-02-2023 04:50, Philip McGrath wrote: >> I haven't read the patch or this thread closely, > > I'll assume you have read it non-closely. > >> but R6RS has an answer to any concerns about compatibility with `#lang`. At >> the

Re: [PATCH] add language/wisp to Guile?

2023-02-25 Thread Maxime Devos
On 25-02-2023 01:15, Matt Wette wrote: On 2/24/23 3:51 PM, Maxime Devos wrote: On 25-02-2023 00:48, Maxime Devos wrote: (**) For compatibility with Racket, it's not like we couldn't implement both "#lang" and "-*- stuff: language -*-". TBC, I mean ‘only support #lang' for values of 'lang'

Re: [PATCH] add language/wisp to Guile?

2023-02-24 Thread Matt Wette
On 2/24/23 3:51 PM, Maxime Devos wrote: On 25-02-2023 00:48, Maxime Devos wrote: (**) For compatibility with Racket, it's not like we couldn't implement both "#lang" and "-*- stuff: language -*-". TBC, I mean ‘only support #lang' for values of 'lang' that Racket supports’, or alternatively

Re: [PATCH] add language/wisp to Guile?

2023-02-24 Thread Maxime Devos
On 25-02-2023 00:48, Maxime Devos wrote: (**) For compatibility with Racket, it's not like we couldn't implement both "#lang" and "-*- stuff: language -*-". TBC, I mean ‘only support #lang' for values of 'lang' that Racket supports’, or alternatively ‘support #lang for compatibility, but

Re: [PATCH] add language/wisp to Guile?

2023-02-24 Thread Maxime Devos
On 24-02-2023 16:45, Ludovic Courtès wrote: Adding #lang support in Guile would be nice. As discussed on IRC, it can be experimented with in a WIP branch. Have you seen my messages on how the "#lang" construct is problematic for some languages, and how alternatives like "[comment delimiter]

Re: [PATCH] add language/wisp to Guile?

2023-02-24 Thread Dr. Arne Babenhauserheide
Hi, Ludovic Courtès writes: >> Why should Wisp be a separate package when other SRFIs are made part >> of Guile? Your point about maintenance and evolving applies equally >> to other SRFIs. > > That’s a good point. Making it available as (srfi srfi-119) would make > sense I guess. I need to

Re: [PATCH] add language/wisp to Guile?

2023-02-24 Thread Ludovic Courtès
Hello! Maxime Devos skribis: > Why should Wisp be a separate package when other SRFIs are made part > of Guile? Your point about maintenance and evolving applies equally > to other SRFIs. That’s a good point. Making it available as (srfi srfi-119) would make sense I guess. I need to take a

Re: [PATCH] add language/wisp to Guile?

2023-02-23 Thread Dr. Arne Babenhauserheide
Hi, Ludovic Courtès writes: > FWIW, I think it might be best to keep Wisp as a separate package: that > allows it to evolve independently of Guile (and possibly more quickly > :-)), and it might simplify maintenance in some way. While this reasoning is true for most languages, I don’t think it

Re: [PATCH] add language/wisp to Guile?

2023-02-23 Thread Maxime Devos
On 23-02-2023 12:36, Ludovic Courtès wrote: Hi! Sorry for the late reply. FWIW, I think it might be best to keep Wisp as a separate package: that allows it to evolve independently of Guile (and possibly more quickly :-)), and it might simplify maintenance in some way. To my understanding,

Re: [PATCH] add language/wisp to Guile?

2023-02-23 Thread Maxime Devos
On 23-02-2023 19:04, Maxime Devos wrote: (*) Java actually allows "#!", but only in 'Shebang' files (see: https://openjdk.org/jeps/330#Shebang_files).  It remains invalid to put a '#!java' line in files with a class definition that is supposed to be found by Java's class loaders and compiler

Re: [PATCH] add language/wisp to Guile?

2023-02-23 Thread Maxime Devos
On 23-02-2023 19:04, Maxime Devos wrote: (*) Java actually allows "#!", but only in 'Shebang' files (see: https://openjdk.org/jeps/330#Shebang_files).  It remains invalid to put a '#!java' line in files with a class definition that is supposed to be found by Java's class loaders and compiler

Re: [PATCH] add language/wisp to Guile?

2023-02-23 Thread Maxime Devos
On 23-02-2023 19:04, Maxime Devos wrote: Still doesn't really address the problem though, as Scheme scripts (or scripts in another language) may need to start with a shebang and "#!lang" or "#lang" is not a valid comment in all languages.  (E.g., I don't think it's valid Pascal, though I only 

Re: [PATCH] add language/wisp to Guile?

2023-02-23 Thread Maxime Devos
On 23-02-2023 09:51, Dr. Arne Babenhauserheide wrote: Thinking a bit more about it, it should be possible to special-case Guile's interpretation of "#!" such that "#!r6rs" doesn't require a closing "!#". (Technically backwards-incompatible, but I don't think people are writing #!r6rs ...!# in

Re: [PATCH] add language/wisp to Guile?

2023-02-23 Thread Dr. Arne Babenhauserheide
Maxime Devos writes: >> ‘#! ... !#’ comments aren't legacy; they exist to allow putting the >> shebang in the first line of a script, and to pass additional >> arguments to the Guile interpreter (see: (guile)The Top of a Script >> File) (*). This is awesome, by the way. It’s what allowed me

Re: [PATCH] add language/wisp to Guile?

2023-02-22 Thread Maxime Devos
In Racket, in the initial configuration of the reader when reading a file, "`#!` is an alias for `#lang` followed by a space when `#!` is followed by alphanumeric ASCII, `+`, `-`, or `_`." (See .) [...] > (Guile does

Re: [PATCH] add language/wisp to Guile?

2023-02-21 Thread Dr. Arne Babenhauserheide
Hi Matt, Please tell me once you know for which patch exactly you need a WIP-branch. Best wishes, Arne -- Unpolitisch sein heißt politisch sein, ohne es zu merken. draketo.de signature.asc Description: PGP signature

Re: [PATCH] add language/wisp to Guile?

2023-02-18 Thread Matt Wette
On 2/18/23 7:58 AM, Maxime Devos wrote: On 18-02-2023 04:50, Philip McGrath wrote: I haven't read the patch or this thread closely, I'll assume you have read it non-closely. but R6RS has an answer to any concerns about compatibility with `#lang`. At the beginning of Chapter 4, "Lexical and

Re: [PATCH] add language/wisp to Guile?

2023-02-18 Thread Maxime Devos
On 18-02-2023 04:50, Philip McGrath wrote: I haven't read the patch or this thread closely, I'll assume you have read it non-closely. but R6RS has an answer to any concerns about compatibility with `#lang`. At the beginning of Chapter 4, "Lexical and Datum Syntax"

Re: [PATCH] add language/wisp to Guile?

2023-02-18 Thread Philip McGrath
Hi, On Fri, Feb 17, 2023, at 6:06 PM, Maxime Devos wrote: > On 16-02-2023 22:38, Dr. Arne Babenhauserheide wrote: >> >> Matt Wette writes: >> >>> You may be interested in the load-lang patch I generated a few years ago >>> to allow file-extension based loading, in addition to '#lang elisp" >>>

Re: [PATCH] add language/wisp to Guile?

2023-02-17 Thread Maxime Devos
On 16-02-2023 22:38, Dr. Arne Babenhauserheide wrote: Matt Wette writes: You may be interested in the load-lang patch I generated a few years ago to allow file-extension based loading, in addition to '#lang elisp" type hooks.

Re: [PATCH] add language/wisp to Guile?

2023-02-16 Thread Matt Wette
On 2/16/23 1:38 PM, Dr. Arne Babenhauserheide wrote: Matt Wette writes: You may be interested in the load-lang patch I generated a few years ago to allow file-extension based loading, in addition to '#lang elisp" type hooks.

Re: [PATCH] add language/wisp to Guile?

2023-02-16 Thread Dr. Arne Babenhauserheide
Matt Wette writes: > You may be interested in the load-lang patch I generated a few years ago > to allow file-extension based loading, in addition to '#lang elisp" > type hooks. > > https://github.com/mwette/guile-contrib/blob/main/patch/3.0.8/load-lang.patch @Maxime: Is this something you’d

Re: [PATCH] add language/wisp to Guile?

2023-02-16 Thread Dr. Arne Babenhauserheide
Maxime Devos writes: > On 16-02-2023 09:03, Dr. Arne Babenhauserheide wrote: >> Do you mean using it similar to this test? >>(pass-if "R6RS/SRFI-30 block comment syntax overridden" >> ;; To be compatible with 1.8 and earlier, we should be able to override >> ;; this syntax. >>

Re: [PATCH] add language/wisp to Guile?

2023-02-16 Thread Maxime Devos
On 16-02-2023 09:03, Dr. Arne Babenhauserheide wrote: Maxime Devos writes: + ;; allow using "# foo" as #(foo). + (read-hash-extend #\# (λ (chr port) #\#)) That's a rather Wisp-specific extension, but it appears you are extending things globally. Instead, I propose

Re: [PATCH] add language/wisp to Guile?

2023-02-16 Thread Dr. Arne Babenhauserheide
Maxime Devos writes: >> + ;; allow using "# foo" as #(foo). >> + (read-hash-extend #\# (λ (chr port) #\#)) > > That's a rather Wisp-specific extension, but it appears you are > extending things globally. Instead, I propose extending it > temporarily, with the undocumented

Re: [PATCH] add language/wisp to Guile?

2023-02-15 Thread Dr. Arne Babenhauserheide
Maxime Devos writes: >> [...] >> Which begs an important question: How would you like to be attributed? I >> plan to also merge this back to the wisp repo and I’d like to attribute >> you there, too. > > You could add a ";; Copyright © 2023 Maxime Devos > " line next to yours in the file that

Re: [PATCH] add language/wisp to Guile?

2023-02-15 Thread Maxime Devos
[...] Which begs an important question: How would you like to be attributed? I plan to also merge this back to the wisp repo and I’d like to attribute you there, too. You could add a ";; Copyright © 2023 Maxime Devos " line next to yours in the file that contains the read-one-wisp-sexp I

Re: [PATCH] add language/wisp to Guile?

2023-02-15 Thread Dr. Arne Babenhauserheide
Maxime Devos writes: >> [...] >> That would be nice, but would require doing changes in a critical core >> part of Guile. It would change this addition from a risk-free added >> feature to a risky core change. > > I maintain that a new language shouldn't be merged until the > Scheme-specific

Re: [PATCH] add language/wisp to Guile?

2023-02-14 Thread Matt Wette
You may be interested in the load-lang patch I generated a few years ago to allow file-extension based loading, in addition to '#land elisp" type hooks. https://github.com/mwette/guile-contrib/blob/main/patch/3.0.8/load-lang.patch Matt

Re: [PATCH] add language/wisp to Guile?

2023-02-14 Thread Maxime Devos
> [...] That would be nice, but would require doing changes in a critical core part of Guile. It would change this addition from a risk-free added feature to a risky core change. I maintain that a new language shouldn't be merged until the Scheme-specific load path stuff is fixed/extended to

Re: [PATCH] add language/wisp to Guile?

2023-02-14 Thread Dr. Arne Babenhauserheide
PS: So what’s still missing here is to avoid setting the locale. Do you happen to have a hint how to actually do this right? -- Unpolitisch sein heißt politisch sein, ohne es zu merken. draketo.de signature.asc Description: PGP signature

Re: [PATCH] add language/wisp to Guile?

2023-02-14 Thread Dr. Arne Babenhauserheide
Maxime Devos writes: > On 04-02-2023 22:35, Dr. Arne Babenhauserheide wrote: >> Maxime Devos writes: >> This needs an addition to the extensions via guile -x .w — I wrote that in the documentation. I didn’t want to do that unconditionally, because detecting a wisp file as

Re: [PATCH] add language/wisp to Guile?

2023-02-05 Thread Maxime Devos
On 04-02-2023 22:35, Dr. Arne Babenhauserheide wrote: Maxime Devos writes: This needs an addition to the extensions via guile -x .w — I wrote that in the documentation. I didn’t want to do that unconditionally, because detecting a wisp file as scheme import would cause errors. If done

Re: [PATCH] add language/wisp to Guile?

2023-02-04 Thread Dr. Arne Babenhauserheide
Maxime Devos writes: >> This needs an addition to the extensions via guile -x .w — I wrote >> that >> in the documentation. I didn’t want to do that unconditionally, because >> detecting a wisp file as scheme import would cause errors. > > If done carefully, I don't think this situations would

Re: [PATCH] add language/wisp to Guile?

2023-02-04 Thread Maxime Devos
On 04-02-2023 16:46, Dr. Arne Babenhauserheide wrote: [...] So I’d like to ask: can we merge Wisp as supported language into Guile? From some conversations elsewhere, I got the impression that (use-modules (foo)) will search for foo.scm and not in foo.w. I think you'll need to tweak the

Re: [PATCH] add language/wisp to Guile?

2023-02-04 Thread Dr. Arne Babenhauserheide
Thank you for your review! Maxime Devos writes: >> Why add Wisp? >> For Wisp: it is then available directly wherever Guile is available. >> This will make it much easier for people to follow tutorials. > > I'm not convinced of this argument, because package managers exist, but ... >

Re: [PATCH] add language/wisp to Guile?

2023-02-04 Thread Maxime Devos
Why add Wisp? For Wisp: it is then available directly wherever Guile is available. This will make it much easier for people to follow tutorials. I'm not convinced of this argument, because package managers exist, but ... For Guile: - Wisp has proven to be good at enabling people