public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* kawa improvements for strings and sequences
@ 2015-06-12 21:33 Per Bothner
  2015-06-12 23:53 ` Jamison Hope
  0 siblings, 1 reply; 3+ messages in thread
From: Per Bothner @ 2015-06-12 21:33 UTC (permalink / raw)
  To: Kawa mailing list

I checked in a number of neat features recently.
Check out the first few sections here:

http://www.gnu.org/software/kawa/news.html

The main still-missing functionality is replacement indexing:
   (set! (seq [i <: j]) new-value)
This would generalize insertion/deletion/replacement.
I have prototype code for this (working for arbitrary java.util.List), but I
need to figure out how to detect and handle if new-value overlaps with seq.

Another issue still unresolved is how to print ranges and indirect-indexing:

#|kawa:1|# [3 <=: 6]
(#sequence 3 4 5 6)

I'm thinking this should display as: [3 4 5 6]
and write as: [3 <: 7]

#|kawa:2|# ([11 12 13 14] [3 2])
(#sequence 14 13)

This should probably print as: [14 13]
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

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

* Re: kawa improvements for strings and sequences
  2015-06-12 21:33 kawa improvements for strings and sequences Per Bothner
@ 2015-06-12 23:53 ` Jamison Hope
  2015-06-13  7:27   ` Per Bothner
  0 siblings, 1 reply; 3+ messages in thread
From: Jamison Hope @ 2015-06-12 23:53 UTC (permalink / raw)
  To: Kawa mailing list


On Jun 12, 2015, at 5:32 PM, Per Bothner <per@bothner.com> wrote:

> I checked in a number of neat features recently.
> Check out the first few sections here:
> 
> http://www.gnu.org/software/kawa/news.html

They are indeed pretty neat.

> The main still-missing functionality is replacement indexing:
>  (set! (seq [i <: j]) new-value)
> This would generalize insertion/deletion/replacement.
> I have prototype code for this (working for arbitrary java.util.List), but I
> need to figure out how to detect and handle if new-value overlaps with seq.
> 
> Another issue still unresolved is how to print ranges and indirect-indexing:
> 
> #|kawa:1|# [3 <=: 6]
> (#sequence 3 4 5 6)
> 
> I'm thinking this should display as: [3 4 5 6]
> and write as: [3 <: 7]
> 
> #|kawa:2|# ([11 12 13 14] [3 2])
> (#sequence 14 13)
> 
> This should probably print as: [14 13]

Can we also make it so that open-ended sequences such as [3 <:]
display and write in a finite number of characters?



--
Jamison Hope
The PTR Group
www.theptrgroup.com



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

* Re: kawa improvements for strings and sequences
  2015-06-12 23:53 ` Jamison Hope
@ 2015-06-13  7:27   ` Per Bothner
  0 siblings, 0 replies; 3+ messages in thread
From: Per Bothner @ 2015-06-13  7:27 UTC (permalink / raw)
  To: kawa



On 06/12/2015 04:53 PM, Jamison Hope wrote:
> Can we also make it so that open-ended sequences such as [3 <:]
> display and write in a finite number of characters?

Definitely for write.

For display it's a bit more difficult.  Consider a long-running
application or server that writes out a lazy sequence to stdout.

A related and more general problem is that we don't have a way to stop
a run-away process without killing the JVM. We need a way to interrupt the
current command (whether it is producing tons of output or in an infinite loop
or deadlocked). This means (I think) using the JVM TI (Tool Interface).

Ihis fall I plan to spend a lot of time on the REPL, including working on a
graphical console.  I'm hoping that will include a mechanism to interrupt a
command.

In the interim I guess we could consider a special REPL output mode or other
hacks to limit excessive output.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

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

end of thread, other threads:[~2015-06-13  7:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 21:33 kawa improvements for strings and sequences Per Bothner
2015-06-12 23:53 ` Jamison Hope
2015-06-13  7:27   ` Per Bothner

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).