<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Folks,<br>
<br>
Any news wrt this? An implementation taking account of all the great
insights in this thread would be great.<br>
<br>
Nahuel? Hernán?<br>
<br>
Thanks,<br>
<br>
On 5/11/2020 7:41 PM, Nicolas Cellier via Cuis-dev wrote:
<blockquote
cite="mid:CAKnRiT75Pib7B9VXsnkeixyJOt=b98KmQArPsOVzbno-SQi5eA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le mar. 12 mai 2020 à 00:37,
Nicolas Cellier <<a moz-do-not-send="true"
href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>>
a écrit :<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le lun. 11 mai 2020
à 23:26, Phil B <<a moz-do-not-send="true"
href="mailto:pbpublist@gmail.com" target="_blank">pbpublist@gmail.com</a>>
a écrit :<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px
0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div dir="ltr">
<div dir="ltr">Nicolas,</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, May 11,
2020 at 5:02 PM Nicolas Cellier via Cuis-dev
<<a moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st"
target="_blank">cuis-dev@lists.cuis.st</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0px
0px 0px 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le lun. 11
mai 2020 à 22:58, Luciano Notarfrancesco
via Cuis-dev <<a moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st"
target="_blank">cuis-dev@lists.cuis.st</a>>
a écrit :<br>
</div>
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div>
<div><br>
</div>
<div><br>
</div>
</div>
<div>
<div dir="ltr" class="gmail_attr">On
Tue, 12 May 2020 at 3:44 AM, Nicolas
Cellier via Cuis-dev <<a
moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st"
target="_blank">cuis-dev@lists.cuis.st</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204, 204,
204); padding-left: 1ex;">
<div dir="ltr">
<div>Can you represent empty ranges?</div>
<div><br>
</div>
<div>For example,</div>
<div>(5,5) could be empty (marking a
position before or after 5th
character - your choice)</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Definitely. That's why start<=end.
Needed for things like errors where you might
only essentially know the position something
occurred at but need to return a range for
whatever reason.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin: 0px
0px 0px 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div>
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204, 204,
204); padding-left: 1ex;">
<div dir="ltr">
<div> (5,6) a one character range
(from left to right)</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Yep.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin: 0px
0px 0px 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div>
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204, 204,
204); padding-left: 1ex;">
<div dir="ltr">
<div>(5,4) too (from right to left).</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>My thinking was that this could get swapped
during instance creation. If end<start, then
swap. (i.e. only for source code ranges would
start<=end always be the case, the more
general range superclass would allow the
inversion)</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin: 0px
0px 0px 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div>
<div dir="auto"><br>
</div>
</div>
<div>
<div dir="auto">Good question. Kind of
looks like a pathological case, do you
really need that? Is it for the cursor
position?</div>
</div>
<div>
<div dir="auto"><br>
</div>
</div>
</blockquote>
<div>For example if we want to use that
Range in Text selection, then yes.</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>While the text could be selected from end to
start, would anything be lost by flipping the
positions around in the range created?</div>
<div> </div>
</div>
</div>
</blockquote>
<div>Oups, sorry to repeat, my intention was this to be
in public discussion, but I'm bad with reply, reply
all ..</div>
<div><br>
</div>
<div>As you noted, backward ranges like (5,4) have an
interest for interactive selection: the start is the
pivot point, and the end gives the direction (we are
extending selection toward left or right around the
pivot). <br>
</div>
<div>Peserving the pivot is an advantage when you later
extend/shrink the selection with cursor keys for
example...</div>
<div><br>
</div>
<div>Of course, this can be (and is) the responsibility
of specialized editor, but I have the feeling that
Range serves this purpose well without too much
complexification...</div>
<div><br>
</div>
<div>Currently most models (Browser, Debugger, etc...)
are using Interval for contentsSelection which does
not sound good.</div>
<div>What if you want to have more control on the
direction of the selection?</div>
<div>Recently, there was a hack in Squeak which reverted
the pcRange in Debugger so as to show the beginning of
selected text rather than the end for the case when
the window is small. That would not work in Cuis due
to cleaner Interval implementation, and that did not
work either in a Squeak after I cleaned the Interval
too :(<br>
</div>
<div>Not sure if it is the right fix, but backward Range
would fit...<br>
</div>
<div><br>
</div>
</div>
</div>
</blockquote>
<div>Correction: that would work in Cuis thanks to negative
count, I did not notice this before...</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0px 0px
0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0px
0px 0px 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div>
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204, 204,
204); padding-left: 1ex;">
<div dir="ltr">
<div><br>
</div>
</div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le lun.
11 mai 2020 à 01:22, Phil B via
Cuis-dev <<a
moz-do-not-send="true"
href="mailto:cuis-dev@lists.cuis.st"
target="_blank">cuis-dev@lists.cuis.st</a>>
a écrit :<br>
</div>
<blockquote class="gmail_quote"
style="margin: 0px 0px 0px 0.8ex;
border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">
<div dir="ltr">
<div dir="ltr">Luciano,</div>
<div dir="ltr"><br>
</div>
<div>Since the vast majority of
ranges I'd be working with are
programmatically created, #..
wouldn't really help me (i.e.
Range #from:to: would be fine
and consistent with Interval
in meaning) but I'm not
opposed to it if it would help
you. However, I would not be
in favor of overloading #,
since that seems confusing
given other implementors of
#,.</div>
</div>
</blockquote>
</div>
</blockquote>
<div dir="auto"><br>
</div>
</div>
<div>
<div dir="auto">Yeah, I wouldn’t want to
overload #, and my suggestion about
#.. mainly was about allowing it as a
binary operator that might be nice to
have available for whatever people
decide to use it. #from:to: looks nice
enough, tho.</div>
</div>
-- <br>
Cuis-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:Cuis-dev@lists.cuis.st"
target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a moz-do-not-send="true"
href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote>
</div>
</div>
-- <br>
Cuis-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:Cuis-dev@lists.cuis.st"
target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a moz-do-not-send="true"
href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
</body>
</html>