of Push, at least until it blocks ranging next.
The coro version does not have this issue (coroutines start paused), and
otherwise it seems the observable behaviour matches this new version better.
Nuno
On Wednesday 26 February 2025 at 14:37:54 UTC Ian Lance Taylor wrote:
> On Wed, Feb 26,
rator will stop when the stop function is called.
func Push[V any](consumer func(seq iter.Seq[V])) (yield func(V) bool, stop
func())
This is the implementation:
https://github.com/ncruces/go-sqlite3/blob/8adb838/ext/seq/push.go
Regards,
Nuno
On Wednesday 26 February 2025 at 10:18:15 UTC Nuno C
mes harder to enforce no parallelism).
Am I wrong?
Thanks again!
Nuno Cruces
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@
e and space complexity needed to support `func Value()
> R`.
>
> The concurrency of `iter.Push` is definitely interesting, and `func
> processor(seq iter.Seq[V]) R` is nice, but the combination of the two seems
> less nice (still interesting) relative to other approaches.
>
>
> This can all be done already with channels, of course, as shown by the
> earlier examples.
>
> Ian
>
>
> >> On Tuesday, February 25, 2025 at 6:15:40 PM UTC Ian Lance Taylor wrote:
> >>>
> >>> On Tue, Feb 25, 2025 at 6:17 AM Nuno Cruces w
about the constraints here? It seems you could you
>> accomplish your goal of creating an AggregateFunction out of an iter.Seq
>> processor
>> function by storing all of the results in a slice as Step is called,
>> then running your processor function on the slice of value
Hi Jason,
First of all, thank you for your interest.
On Tue, 25 Feb 2025 at 12:28, Jason E. Aten wrote:
>
> The problem specification you originally gave was this:
>
> > "to implement... a "processor" function that accepts an iter.Seq and
> returns a result:
> >func processor(seq iter.Seq[v
I guess this is my best proposal.
If anyone has comments before I make a formal proposal, please let me know.
I'd love the feedback. I also implemented it on top of coros.
https://github.com/ncruces/go-sqlite3/blob/aad2224/ext/seq/push.go
Regards,
Nuno
On Tue, 25 Feb 2025 at 09:20, Nuno C
uno
On Sun 23 Feb 2025, 19:45 Ian Lance Taylor, wrote:
> On Sat, Feb 22, 2025 at 4:52 PM Nuno Cruces wrote:
> >
> > Is there any appetite to expose runtime.newcoro/coroswitch? They seem
> really useful beyond iter.Pull. They actually have the go:linkname
> handshake, b
aps that is a part of the reason. I find reading coroutine code in Lua,
> for example, a fairly mind-boggling torture exercise.
>
> On Sunday, February 23, 2025 at 12:52:58 AM UTC Nuno Cruces wrote:
>
> I wanted to implement this "push like" interface
> <https://pkg.g
traction like iter.Pull we could
build instead, but it's not apparent to me?
Regards,
Nuno Cruces
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
t
Please, don't make type optional. IMO, removing it altogether with this
proposal (type any = interface {}) is probably great. Making type mandatory
(as originally proposed) is fine. Making it optional is much worse than
both those options. As much as possible, there should be one way to do it.
12 matches
Mail list logo