<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
Hi Hernan,<br>
<br>
In all frankness, in I would wipe out the old 'upTo' because its
behavior is a bit "wild".<br>
<br>
On the other side, I understand it may create problems in
retro-compatibility, that is why for<br>
the moment i propose to add a new method which behaves a bit better.<br>
<br>
I hope this example explains the problem:<br>
-------------------------------------------------------<br>
s _ 'hello-1Ahello-2Ahel'.<br>
'/tmp/test.txt' asFileEntry fileContents: s. <br>
<br>
st1 _ '/tmp/test.txt' asFileEntry readStream . <br>
<br>
st1 upTo: $A. " 'hello-1' "<br>
st1 upTo: $A. " 'hello-2' "<br>
st1 upTo: $A. " 'hel' " "(*)"<br>
------------------------------------------------------<br>
(*) You can't establish in any way if you actually found an "A"
terminated block or just hit the end of file<br>
(*) If you hit the end of file you eat an incomplete record, this is
another problem, maybe another process<br>
was going to end writing that record but you will never know. <br>
<br>
Maybe there is another method around that performs similarly to
'strictUpTp', if there is I did not find it, sorry.<br>
<br>
IMHO, In a scale of importance from 0 to 10, this method, for a
programmer, >= 8.<br>
I would definitely not put it into an external package, too much
fundamental.<br>
<br>
bye<br>
Nicola<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 10/19/21 14:44, Hernan Wilkinson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJAbP8jp5cqPFtxeuCzL8WEOa7PmsAoVc7CvX9=Qqg9iBP7=DQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi Nicola!<br>
<div> I was wondering, why are you suggesting adding them to the
base? Is it not enough to implement them as an extension in
your package? </div>
<div> Also, I think that any new functionality should come with
its corresponding tests to help the maintenance and
understanding of the functionality.</div>
<div><br>
</div>
<div>Cheers!</div>
<div>Hernan.</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Oct 19, 2021 at 7:04
AM Nicola Mingotti via Cuis-dev <<a
href="mailto:cuis-dev@lists.cuis.st" moz-do-not-send="true"
class="moz-txt-link-freetext">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> <font size="4"><font face="monospace">Hi Juan, guys,<br>
<br>
I would like to add to Cuis the 2 methods i attach here.
One is a helper method.<br>
<br>
-----------<br>
StandardFileStream strictUpTo: delim.<br>
-----------<br>
<br>
Differently from 'upTo: delim' this method:<br>
1. Does not return stuff if it does not find 'delim'.<br>
2. Does not upgrade the position on the stream if does
not find 'delim'.<br>
3. If it finds 'delim' returns a chunk that includes it.<br>
<br>
I am parsing log files at the moment, this is very much
useful.<br>
<br>
NOTE. Up to now I tested only on small files.<br>
<br>
bye<br>
Nicola<br>
<br>
<br>
<br>
<br>
</font></font> </div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr"><span
style="font-size:xx-small;border-collapse:collapse">
<div style="font-size:small"><a href="https://10pines.com/"
style="font-family:Roboto,Helvetica,Arial,sans-serif;font-size:medium"
target="_blank" moz-do-not-send="true"><img
src="https://10pines.github.io/email-signature/10pines-firma@2x.png"
style="margin-bottom: 0.5em;" moz-do-not-send="true"
width="108"></a><span
style="color:rgb(0,0,0);font-family:Roboto,Helvetica,Arial,sans-serif;font-size:medium"></span>
<h1 style="margin:0px;font-size:14px">Hernán Wilkinson</h1>
<h2 style="margin:0px 0px
1em;font-size:14px;color:rgb(100,100,100)">Software
Developer & Coach</h2>
<p
style="margin:0px;color:rgb(100,100,100);font-size:12px">Alem
896, Floor 6, Buenos Aires, Argentina</p>
<p
style="margin:0px;color:rgb(100,100,100);font-size:12px">+54
11 6091 3125</p>
<p
style="margin:0px;color:rgb(100,100,100);font-size:12px">@HernanWilkinson</p>
</div>
</span></div>
</div>
</blockquote>
<br>
</body>
</html>