public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Re: A bug in Kawa reader
       [not found] <CAMFYt2ZV8bFfAyS5qaQFw936D+FOWffKcCpCxQFKxVaTcOSXSw@mail.gmail.com>
@ 2023-03-02 22:30 ` Per Bothner
  2023-03-03  7:08   ` Damien Mattei
       [not found]   ` <CAMFYt2YpOX1n45fF_nX5ZqBin4Ny_92dN3feehFkmL+-QmBxkQ@mail.gmail.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Per Bothner @ 2023-03-02 22:30 UTC (permalink / raw)
  To: Panicz Maciej Godek, kawa



On 3/2/23 14:14, Panicz Maciej Godek via Kawa wrote:
> I've noticed that if there's an escaping slash at the end of a line inside
> of a string, and the new line starts with white spaces, the white spaces
> will be chomped away from the resulting string

That's an intended (and documented) feature.

https://www.gnu.org/software/kawa/String-literals.html#Simple-string-literals

-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A bug in Kawa reader
  2023-03-02 22:30 ` A bug in Kawa reader Per Bothner
@ 2023-03-03  7:08   ` Damien Mattei
  2023-03-03 17:05     ` Per Bothner
       [not found]   ` <CAMFYt2YpOX1n45fF_nX5ZqBin4Ny_92dN3feehFkmL+-QmBxkQ@mail.gmail.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Damien Mattei @ 2023-03-03  7:08 UTC (permalink / raw)
  To: kawa

by the way,

noone interested in making a reader that support SRFI-105 ,curly infix 
for Kawa? it should be quite easy, when i have time i prospect to do it...

i'm interested in porting my Scheme+ to kawa for JVM.

Le 02/03/2023 à 23:30, Per Bothner a écrit :
>
>
> On 3/2/23 14:14, Panicz Maciej Godek via Kawa wrote:
>> I've noticed that if there's an escaping slash at the end of a line 
>> inside
>> of a string, and the new line starts with white spaces, the white spaces
>> will be chomped away from the resulting string
>
> That's an intended (and documented) feature.
>
> https://www.gnu.org/software/kawa/String-literals.html#Simple-string-literals 
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A bug in Kawa reader
       [not found]   ` <CAMFYt2YpOX1n45fF_nX5ZqBin4Ny_92dN3feehFkmL+-QmBxkQ@mail.gmail.com>
@ 2023-03-03  8:17     ` Sudarshan S Chawathe
  2023-03-03 10:19     ` Lassi Kortela
  1 sibling, 0 replies; 5+ messages in thread
From: Sudarshan S Chawathe @ 2023-03-03  8:17 UTC (permalink / raw)
  To: Panicz Maciej Godek; +Cc: Per Bothner, kawa

On 2023-03-03T08:45:20+0100 (Friday), Panicz Maciej Godek via Kawa writes:
> czw., 2 mar 2023 o 23:30 Per Bothner <per@bothner.com> napisa=C5=82(a):
>
> >
> >
> > On 3/2/23 14:14, Panicz Maciej Godek via Kawa wrote:
> > > I've noticed that if there's an escaping slash at the end of a line
> > inside
> > > of a string, and the new line starts with white spaces, the white space=
> s
> > > will be chomped away from the resulting string
> >
> > That's an intended (and documented) feature.
> >
> >
> > https://www.gnu.org/software/kawa/String-literals.html#Simple-string-lite=
> rals
> >
> >
> You're right.
> I also checked it with the spec, and it doesn't determine this behavior.
>
> Kawa seems to behave like Gambit, Chicken and Chez in this regard,
> whereas Guile and Racket behave according to my expectation.
>
> Sorry for the noise.

I am not sure of the spec to which you refer but R7RS Section 6.7
includes, in the itemized list of escape sequences,

  \<intraline whitespace>*<line ending>
  <intraline whitespace>* : nothing

which is the behavior you observed in Kawa, etc.

I find it to be a useful feature for fitting long strings in nicely
indented code.

Regards,

-chaw

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A bug in Kawa reader
       [not found]   ` <CAMFYt2YpOX1n45fF_nX5ZqBin4Ny_92dN3feehFkmL+-QmBxkQ@mail.gmail.com>
  2023-03-03  8:17     ` Sudarshan S Chawathe
@ 2023-03-03 10:19     ` Lassi Kortela
  1 sibling, 0 replies; 5+ messages in thread
From: Lassi Kortela @ 2023-03-03 10:19 UTC (permalink / raw)
  To: Panicz Maciej Godek, Per Bothner; +Cc: kawa

> I also checked it with the spec, and it doesn't determine this behavior.
> 
> Kawa seems to behave like Gambit, Chicken and Chez in this regard,
> whereas Guile and Racket behave according to my expectation.

If you have a spare moment, a pull request to add a simple Markdown file 
about this survey to 
https://github.com/schemedoc/surveys/tree/master/surveys would be 
appreciated. (These are published at https://docs.scheme.org/surveys/.)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A bug in Kawa reader
  2023-03-03  7:08   ` Damien Mattei
@ 2023-03-03 17:05     ` Per Bothner
  0 siblings, 0 replies; 5+ messages in thread
From: Per Bothner @ 2023-03-03 17:05 UTC (permalink / raw)
  To: Damien.MATTEI, kawa

On 3/2/23 23:08, Damien Mattei wrote:
> noone interested in making a reader that support SRFI-105 ,curly infix for Kawa? it should be quite easy, when i have time i prospect to do it...

I see little value in srfi-105.  Who would use it and why?

If you want infix notation with Scheme semantics, you
might find my "KaShell" experiment interesting:
     http://kashell.org/
(KaShell was previously called "q2".)
There are some examples/tests in gnu/q2/testsuite in the source-code.

KaShell has infix operators, with precedence - without reserved operators.
(While not implemented, a 'define-operator' would be conceptually
similar to define-syntax, but with precedence levels.)

On goal of KaShell is to be a nice language for REPL, specifially
like a "rich shell" with typed values.  That is why it avoids
needless parenteses and semi-colon-like delimiters.
Instead, KsShell uses indentation.

Large parts of the syntax I haven't decided on yet.  You can "fall back"
on using Scheme macros:
     let ((x (3 * 4))) (x + 20)
which is equivalent to Scheme:
     (let ((x (* 3 4))) (+ x 20))
but of course that is not very satisfactory.

I haven't worked on KaShell in almost 5 years, but hopefully I'll
get back to it someday.  Until then, maybe someone will be inspired.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-03 17:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAMFYt2ZV8bFfAyS5qaQFw936D+FOWffKcCpCxQFKxVaTcOSXSw@mail.gmail.com>
2023-03-02 22:30 ` A bug in Kawa reader Per Bothner
2023-03-03  7:08   ` Damien Mattei
2023-03-03 17:05     ` Per Bothner
     [not found]   ` <CAMFYt2YpOX1n45fF_nX5ZqBin4Ny_92dN3feehFkmL+-QmBxkQ@mail.gmail.com>
2023-03-03  8:17     ` Sudarshan S Chawathe
2023-03-03 10:19     ` Lassi Kortela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).