I just did a simple test with a 2M line file and it worked fine, so I
suspect it's a bug in your code. But if not, please provide a complete
working executable example, with data, to help identify the problem.
-rob
On Thu, Oct 12, 2023 at 7:39 PM 'Mark' via golang-nuts <
Thanks Tim, but my goal is to make things transparent and easy to the users
of my libraries. So I don't want to force them to run Makefiles (in my case
large Bazel builds for one project, Makefile for the other), install
C++/Rust build tools, deal with dockers, etc. Ideally, `go get` would just
Hallöchen!
Kurtis Rader writes:
> On Wed, Oct 11, 2023 at 10:31 PM Torsten Bronger <
> bron...@physik.rwth-aachen.de> wrote:
>
> 'Axel Wagner' via golang-nuts writes:
>
> > [...]
> >
> > What would this do?
> >
> > func F(s []any) {
> > s[0] = "Foo"
> > }
I'm reading Debian *Package files, some of which are over 1M lines long.
I used bufio.Scanner and found that it won't read past 1M lines (I'm using
Go 1.21.1 linux/amd64).
Is this a limitation of bufio.Scanner? If so then it ought to be in the
docs.
Or is it a bug?
Or maybe I made a mistake
Thanks Richard. Indeed, as you pointed out the downside is the bloating of
the git repo, but it makes sense.
But does the user have to manually clone the repository and move the `.a`
file to, let's say, /usr/local/lib, or does a simple `go get` magically
does everything ?
On Thursday,
On Wed, Oct 11, 2023 at 11:31 PM Torsten Bronger <
bron...@physik.rwth-aachen.de> wrote:
> > 'Axel Wagner' via golang-nuts writes:
> >
> > > [...]
> > >
> > > What would this do?
> > >
> > > func F(s []any) {
> > > s[0] = "Foo"
> > > }
> > > func main() {
>
Hallöchen!
Patrick Smith writes:
> [...]
>
> Here F is a simple, non-generic function, with no type
> parameters. It cannot be instantiated. Any attempt to explain what
> this code would do if it were legal (which it should not be)
> should not involve generics, type parameters, or
Hi,
I have a question about runtime.Pinner: The documentation states that you
can only pin an object when it’s the result of calling new, taking the
address of a composite literal, or taking the address of a local variable.
At the same time, the Go language specification states that a slice
On Thursday, October 12, 2023 at 8:07:02 AM UTC-4 Pascal Costanza wrote:
Hi,
I have a question about runtime.Pinner: The documentation states that you
can only pin an object when it’s the result of calling new, taking the
address of a composite literal, or taking the address of a local
On Thu, Oct 12, 2023 at 5:06 AM Pascal Costanza
wrote:
>
> I have a question about runtime.Pinner: The documentation states that you can
> only pin an object when it’s the result of calling new, taking the address of
> a composite literal, or taking the address of a local variable.
>
> At the
On Thursday, October 12, 2023 at 9:55:12 AM UTC-4 Ian Lance Taylor wrote:
On Thu, Oct 12, 2023 at 5:06 AM Pascal Costanza
wrote:
>
> I have a question about runtime.Pinner: The documentation states that you
can only pin an object when it’s the result of calling new, taking the
address of
I have written and attached an example that compares bufio.Reader and
bufio.Scanner.
Here's the output from `go run .` (a line count followed by the first error
encountered):
```
Reader 1333665
Scanner 58 bufio.Scanner: token too long
```
This probably _won't_ fail on your 2M line file; it
Can't you build (make go build for you) those libraries?
For example, see github.com/godror/godror just includes the sources of that
third party library in an "odpi" subdir, and with
```
/*
#cgo CFLAGS: -I./odpi/include -I./odpi/src -I./odpi/embed
#include "dpi.c"
*/
import "C"
```
it is
On Thu, Oct 12, 2023 at 10:21 AM 'Mark' via golang-nuts
wrote:
>
> The docs for bufio.Scanner do say
> "Programs that need more control over error handling or large tokens, or must
> run sequential scans on a reader, should use bufio.Reader instead"
> Perhaps it would be more helpful to mention
14 matches
Mail list logo