[go-nuts] A Zip function for Go iterators

2025-01-25 Thread Travis Keep
I just published https://pkg.go.dev/github.com/keep94/itertools, which features a Zip function for Go iterators that works like python's zip function. But now I see that I wasn't the only one with that idea :-) -- You received this message because you are subscribed to the Google Groups "golan

Re: [go-nuts] Accessing elements outside slice using [:]

2025-01-25 Thread Reto
On Fri, Jan 24, 2025 at 11:57:14PM -0800, Pyrode wrote: > The following code allows elements > outside the length of the slice to be accessed. > Is this the expected behaviour or a bug? This is expected. They still share the same underlying data array after all

Re: [go-nuts] Accessing elements outside slice using [:]

2025-01-25 Thread 'Sean Liao' via golang-nuts
https://go.dev/ref/spec#Slice_expressions > For slices, the upper index bound is the slice capacity cap(a) rather than the length. - sean On Sat, Jan 25, 2025, 17:20 Pyrode wrote: > Hey, > > The following code allows elements > outside the length of the slic

[go-nuts] Accessing elements outside slice using [:]

2025-01-25 Thread Pyrode
Hey, The following code allows elements outside the length of the slice to be accessed. Is this the expected behaviour or a bug? Thanks ``` package main import "fmt" func main() { foo([]int{1, 2, 3, 4}[0:1]) } func foo(bar []int) { fmt.Println(len(bar)) //

Re: [go-nuts] PDF to text

2025-01-25 Thread Robert Solomon
Adobe's Acrobat can extract to docx and xlsx. Not a cheap option but it does work On Thursday, January 23, 2025 at 7:29:13 PM UTC-5 Hugh Myrie wrote: > Hi Michael, > > You're absolutely right, PDF extraction can be a real headache! > I've tried Mike's suggestion, but unfortunately, it didn't