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 to

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

2023-02-23 Thread Ludovic Courtès
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. Adding #lang support in Guile would be nice. As discussed on IRC, it c

Re: [PATCH] Print backtraces for syntax errors too.

2023-02-23 Thread Ludovic Courtès
Hi, Maxime Devos skribis: > For complicated macros, especially macros that are used correctly but > have a bug in their implementation somewhere and use 'syntax-case' > or 'syntax-rules' multiple times, it can be very convenient to know > _which_ syntax-case or syntax-rules raised the syntax-err

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 th

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 hav

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 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, W

Re: [PATCH] Print backtraces for syntax errors too.

2023-02-23 Thread Maxime Devos
On 23-02-2023 12:38, Ludovic Courtès wrote: Do you have a simple reproducer and a before/after comparison showing what Guile prints? Simpler reproducer: (define-syntax syntax-stuff-twice (lambda (s) (define (f x) (syntax-case x () (#:this #''this) (#:that #''that)))

Re: [PATCH] Print backtraces for syntax errors too.

2023-02-23 Thread Maxime Devos
On 23-02-2023 12:38, Ludovic Courtès wrote: Do you have a simple reproducer and a before/after comparison showing what Guile prints? (Please ignore my previous e-mail, the reproducer was incorrect. I'll try making another one.) OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public ke

Re: [PATCH] Print backtraces for syntax errors too.

2023-02-23 Thread Maxime Devos
On 23-02-2023 12:38, Ludovic Courtès wrote: Hi, Maxime Devos skribis: For complicated macros, especially macros that are used correctly but have a bug in their implementation somewhere and use 'syntax-case' or 'syntax-rules' multiple times, it can be very convenient to know _which_ syntax-c

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