On Wed, 2021-03-24 at 22:09 +, alex breadman wrote:
> Let's keep divisive political BS away from this lovely project.
>
> Glad to see the political header removed from the website, at least
> on mobile.
>
> All lives matter.
This too is a political statement.
--
You received this message
On Sun, 2021-03-14 at 10:41 -0700, Pascal de Kloe wrote:
> New MQTT client library + command line tool available.
>
> https://github.com/pascaldekloe/mqtt
>
> Comments are welcome.
Did you consider using context.Context rather than quit channels?
--
You received this message because you are
On Tue, 2021-03-16 at 03:10 -0700, Haddock wrote:
> Anyhow, if I hear how young people are talking nowadays, it makes me
> sick. Die Funktion wurde "gecalled" und die Exception "gethrown".
> Sometimes I fear the next generation will not have learned to watch
> what their mind is doing. I might be
Now that a proposal for an approach to generics has been approved[1],
it seems like a good time to again[2] raise the issue of how to be able
to write code that has correlated types where types are structured but
built-in, and so fields are not available to examine. The only case of
this in the
On Sun, 2021-03-14 at 15:08 -0700, Pascal de Kloe wrote:
> > Did you consider using context.Context rather than quit channels?
>
> Applying a context.Context pretty much implies using a quit channel.
> Done is the only way to receive an expiry signal.
>
> I just don't want to lock code into using
On Wed, 2021-03-10 at 15:20 -0800, Matt Mueller wrote:
> I'm assuming this is by design, but it feels to me like go install
> ./cmd/app/main.go silently failing is a bug.
>
> Is this worth opening an issue for?
If it's a bug it's an error reporting bug. The go install command is
documented to
On Sun, 2021-02-28 at 10:11 -0800, Bob Alexander wrote:
> I never have understood the *serious* hatred of Python's "indentation
> as syntax" approach. I've used lots of bracketed and begin/end
> languages (C/C++, Algol & relatives, Ruby, and most other programming
> languages), and when I write
On Sun, 2021-03-07 at 07:57 +, Paul Jolly wrote:
> Erroring on replace directives is an intentional decision for now:
> https://github.com/golang/go/issues/40276#issue-659471259
>
> But might be relaxed in the future:
>
> > Parts of this proposal are more strict than is technically
> >
On Sun, 2021-02-28 at 08:40 +0100, Jan Mercl wrote:
> Actually Go has that problem as well, just a thousand times smaller.
I'm curious where the meaningful whitespace is in Go (for amounts
differences in number greater than 1).
> FTR, I also think Python's approach to white space is a failure.
On Sun, 2021-02-28 at 09:23 +0100, Jan Mercl wrote:
> I meant, for example, in regexp notation, ` *` vs `\n *` between a
> function signature and the opening brace of the function body.
Ah, yes.
> This assumes newline is a whitespace. Most programming languages
> agree, but humans may not.
With
I am trying to set up a toy to understand Google's Pub/Sub service Go
client API. I have had no trouble with publishing and have a local
emulator for the Google Scheduler service to build against, but I am
having a lot of trouble getting subscriptions to work.
I am able get a subscription to work
On Fri, 2021-04-09 at 17:01 +0200, 'Petite Abeille' via golang-nuts
wrote:
> [1] https://textprotocol.org
That's an extraordinarily and unnecessarily obtuse document.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
Comments in-line.
On Mon, 2021-04-19 at 15:08 -0700, 'hong...@google.com' via golang-nuts
wrote:
> Ah, glad your issue was resolved. I did want to point out one thing:
>
> > 2. The topic was obtained in the subscriber using new topic
> creation
> > `client.CreateTopic(ctx, topic)` rather than
On Mon, 2021-04-19 at 10:37 -0700, 'hong...@google.com' via golang-nuts
wrote:
> Is it possible for you to paste your yaml config file? At first
> glance, nothing seems to be out of the ordinary, but I'd like to try
> with the same configuration that you have to see if I missed
> anything.
On Wed, 2021-02-17 at 02:33 +0530, Santhosh T wrote:
> is there java's BigDecimal equivalent in golang ?
There is, for example https://github.com/shopspring/decimal. But you
should ask yourself why you need this.
--
You received this message because you are subscribed to the Google Groups
On Sun, 2021-02-14 at 13:19 -0800, Santhosh Kumar T wrote:
> When I print both values, they print exactly same. so I am assuming
> no precision lost for this specific example 123.4.
> but still Cmp returns non-zero.
This is not a good assumption to make, and is refuted by the result of
Cmp.
You can set your precision arbitrarily high, but you will still find a
point at which there are non-zero decimal digits.
https://play.golang.org/p/JYcAvXQPfeO
123.4 cannot be represented in binary with a finite number of bits.
On Sun, 2021-02-14 at 13:33 -0800, Santhosh Kumar T wrote:
> now I
On Mon, 2021-08-16 at 09:22 +0700, Rijal Asep Nugroho wrote:
> I was browsing how to make a golang code to convert an image to pure
> black and white, but didn't find a suitable one, only got how to
> convert the image to grayscale.
> Can anyone help? thank you.
If you do a greyscale conversion
On Thu, 2021-08-26 at 18:21 -0400, Paul S. R. Chisholm wrote:
> Hypothetical example: Say I'm writing an application that
> uses "rsc.io/quote" and I discover a bug in that package that breaks
> my software. I would of course clone the quote repository, add a test
> that demonstrates the bug, fix
On Wed, 2021-08-25 at 18:11 -0700, ben...@gmail.com wrote:
> With the switch to pkg.go.dev (which in itself I quite like after
> getting used to it), the view-source links also changed from the
> golang.org source viewer, which was fast, to cs.opensource.google,
> which is rather slow.
>
> For
The elf package provide a sentinel error, ErrNoSymbols for the case
that Symbols or DynamicSymbols cannot return a symbol list because the
section is empty[1]. The same situation is handled in plan9obj by
returning a new error for this case[2-3]. For PE/Mach-O there is no
issue since access to the
What would you expect to happen here? A chan that has had one item sent
and then one item received has no items on it, so a receive must wait
until another item is sent.
On Sat, 2021-09-04 at 17:55 -0700, Michael Dwyer wrote:
> I encountered a deadlock when reading from a buffered channel.
> The
This is what you're describing, right?
https://play.golang.org/p/RJbEkmFsPKM
The code that does this is here
https://github.com/golang/go/blob/9133245be7365c23fcd60e3bb60ebb614970cdab/src/runtime/slice.go#L183-L242
. Note that there are cap adjustments to optimise block sizes and
alignments. This
On Sun, 2021-09-05 at 13:09 +0200, 'Axel Wagner' via golang-nuts wrote:
> This sounds interesting, but I don't understand it. Would you be
> willing to expand on this?
It's a consequence of the sum of successive powers of two. To have
reached an allocation of 2^n slots assuming a doubling n times
On Sun, 2021-09-05 at 08:15 +0200, 'Axel Wagner' via golang-nuts wrote:
> Whether that factor is 2 or 1.25 doesn't matter. It's just a bit of
> an optimization to make it 2 for small values - it doesn't terribly
> matter what's "small" for this heuristic.
There is a reason for choosing a factor
On Sun, 2021-09-05 at 03:51 -0700, Brian Candler wrote:
> I'm not sure you're clear about what "monotonically increasing"
> means.
>
> Are you saying that there are some cases where append() results in
> the allocated size of a slice *shrinking*? If so, please
> demonstrate.
I think he means
I just noticed today that the io.Closer docs say that "The behavior of
Close after the first call is undefined. Specific implementations may
document their own behavior".
Should this be "unspecified" rather than "undefined"?
Dan
--
You received this message because you are subscribed to the
On Tue, 2021-08-10 at 14:50 -0700, E Z wrote:
> It works when I changed the code as your suggested. That's great,
> thanks.
>
> And I'm still a little confused here, you know when we use the struct
> method directly, it is only when the function is called that the type
> of receiver determines
On Tue, 2021-08-10 at 15:54 -0700, E Z wrote:
> I quite agree with your above conclusion, and the test results also
> prove it. That seems to be the way it's designed right now, but what
> I find a little hard to understand here is why it's not designed as
> "The pointer to function assignment
On Thu, 2021-07-29 at 11:45 -0700, Ian Lance Taylor wrote:
> > Should this be "unspecified" rather than "undefined"?
>
> The general concern here is that if there is something like a file
> descriptor involved, and if the Close method doesn't take special
> protection to avoid problems with
Also, https://research.swtch.com/mm.
On Tue, 2021-09-21 at 16:22 -0500, robert engels wrote:
> This may be of interest to you:
> https://github.com/golang/go/issues/5045
>
> > On Sep 21, 2021, at 4:17 PM, Ian Lance Taylor
> > wrote:
> >
> > On Tue, Sep 21, 2021 at 12:54 PM xie cui
> > wrote:
>
On Fri, 2021-10-08 at 15:33 -0700, Kamil Ziemian wrote:
> Hello,
>
> I now read documentation of "fmt" package and in "Format errors" (
> https://pkg.go.dev/fmt@go1.17.2#hdr-Format_errors) we have
> Invalid or invalid use of argument index: %!(BADINDEX)
> Printf("%*[2]d", 7):
On Fri, 2021-10-08 at 16:36 -0700, Christian Stewart wrote:
> Is there a way to /not/ have this information in the binary?
>
You can use the garble tool[1] to strip/garble things like this.
$ cd golang.org/x/tools/cmd/stringer
$ garble build .
$ go version -m stringer
stringer: unknown
On Fri, 2021-09-24 at 09:55 +0100, Ian Davis wrote:
> On Fri, 24 Sep 2021, at 9:36 AM, 'Dan Kortschak' via golang-nuts
> wrote:
> > On Fri, 2021-09-24 at 01:03 -0700, Brian Candler wrote:
> > > On Friday, 24 September 2021 at 08:25:31 UTC+1 Brian Candler
> > > wrote:
On Fri, 2021-09-24 at 01:03 -0700, Brian Candler wrote:
> On Friday, 24 September 2021 at 08:25:31 UTC+1 Brian Candler wrote:
> > The documentation says it prefers exact match over case-
> > insensitive, but example 3 contradicts that. It seems to be last-
> > match that wins.
> >
> >
>
> I
On Fri, 2021-09-24 at 10:22 +0100, Ian Davis wrote:
> I was responding to your statement that it doesn't appear to use
> exact match in preference. It does, as the example I gave
> demonstrated. It's not about guarding case.
I'll clarify.
In the example I posted
On Fri, 2021-09-24 at 11:21 +0100, Ian Davis wrote:
> This is not a correct interpretation. In your example the
> unmarshaller reads the incoming json. The first key encountered is
> "Name" and it matches exactly with the field named and tagged as Name
> so that field is assigned the value. The
On Fri, 2021-09-24 at 11:21 +0100, Ian Davis wrote:
> This is not a correct interpretation. In your example the
> unmarshaller reads the incoming json. The first key encountered is
> "Name" and it matches exactly with the field named and tagged as Name
> so that field is assigned the value. The
You can use len to determine the sizeof a struct.
https://play.golang.org/p/f0x8p_04lP1 ;)
On Sun, 2021-10-24 at 16:44 -0700, jlfo...@berkeley.edu wrote:
> Thanks for the replies.
>
> I had been trying to translate the trick from C into Go where you can
> find how many structures are in an
On Sun, 2021-10-24 at 17:53 -0700, jlfo...@berkeley.edu wrote:
> But this seems overly complicated.
Sorry. That was a joke. You asked why you can't use len(); you can, by
using it to it into create something that is indexable (and so a
possible parameter for len()).
> Plus, I don't see why this
On Tue, 2022-01-04 at 08:29 -0800, Brieuc Jeunhomme wrote:
> Hi,
>
> I'm writing code that uses the golang.org/x/sys/windows/svc package.
> This package compiles only for windows builds, for other GOOS values,
> I get a build error. That's fair, but I'm wondering how to unit test
> the code that
On Mon, 2021-11-15 at 15:06 -0800, David Karr wrote:
>
> I'm pretty new to Go (many years in other languages). I'm trying to
> use cgo to use a C library we're using.
>
> I have the following line of code, which is compiling (that's been
> enough of a struggle):
>
> status =
On Wed, 2021-11-03 at 18:50 -0700, Adam Koszek wrote:
> Hello,
>
> We (Segmed.ai) are processing a lot of medical imaging data. It comes
> to us in the form of PNG/JPG/DICOM files. 90% of it is uncompressed
> or using a normal JPEG encoding, but around ~7% of it is encoded with
> lossless JPEG
On Thu, 2021-12-09 at 17:22 -0800, Kurtis Rader wrote:
> Note that the documentation for ParseFloat states: "ParseFloat
> accepts decimal and hexadecimal floating-point number syntax." In
> other words, it explicitly does not support the binary format emitted
> by FormatFloat('b'). I don't know
On Sun, 2021-12-05 at 13:24 -0800, arthurwil...@gmail.com wrote:
> How is it possible for this test case to ever fail?
>
> // Same allocation should be equal to itself (not crash).
> err := errors.New("jkl")
> if err != err {
> t.Errorf(`err != err`)
> }
>
On Tue, 2021-07-27 at 20:55 -0700, Tong Sun wrote:
> Hi,
>
> I'm trying to understand the benchstat's output.
> The benchstat that I have is fresh from golang.org/x/perf/cmd/,
> installed hours ago.
>
> This is understandable:
>
> nameold time/opnew time/opdelta
> FormatEmoji-2
While not a tool, there is code that can be bent to this in
golang.org/x/pkgsite/internal/source. I used that to get repo
information for a tool to obtain homepage and issue page links from Go
executables[1]. You could easily extend that kind of approach to get
the actual repo at the relevant
I have thoughts about the impact of assertion libraries in software
engineering. I came from a background where they are commonplace into
Go and in my earlier projects I used some the earlier iterations on
them (go-check).
While it's true that developers *can* use assertion libraries to
provide
On Wed, 2022-03-09 at 18:58 -0800, shan...@gmail.com wrote:
> This morning someone asked about dereferincing a pointer to a pointer
> to a pointer
>
> At first nobody had ever thought about, let alone knew the answer,
> but some example code was shown, and sure enough ***val is possible
> ```
>
On Wed, 2022-03-09 at 19:16 -0800, Nikhilesh Susarla wrote:
> In https://go.dev/doc/effective_go#printing
> I saw an example for printing our custom string output for the type.
> The code below is from docs.
> func (t *T) String() string {
> return fmt.Sprintf("%d/%g/%q", t.a, t.b, t.c)
> }
>
On Wed, 2022-03-09 at 03:37 -0800, christoph...@gmail.com wrote:
> I'm translating a scientific C program into Go that is doing some
> 64bit floating point operations.
>
> In this process I check that the same input yields the same output.
> Unfortunately they don't yield the same result, though
On Thu, 2022-03-17 at 18:47 -0700, RussellLuo wrote:
> Is there any way to write a constraint, say, SliceOrMap, to support
> either a slice or a map?
>
> With the help of SliceOrMap, then I can write a more generic version
> `LenBetween` like this:
>
> ```go
> func MapLenBetween[T SliceOrMap](s T,
On Fri, 2022-03-18 at 04:43 -0700, Jochen Voss wrote:
> Dear all,
>
> The spec at https://go.dev/ref/spec#For_range says
>
> "The range expression x is evaluated once before beginning the loop,
> with one exception: if at most one iteration variable is present
> and len(x) is constant, the range
I was just taking a look at the workspaces tutorial and saw that while
the doc says that adding the local example module will result in
go 1.18
use (
./hello
./example
)
what actually results is
go 1.18
use (
./hello
example
)
The behaviour is
On Fri, 2022-02-25 at 09:26 -0800, 'Markus Zimmermann' via golang-nuts
wrote:
> Would appreciate your feedback on the style and extension. Would be
> also interesting to hear other approaches and conventions that could
> help others to write better tests.
I'm struggling to understand how you
On Thu, 2022-03-03 at 05:50 -0800, twp...@gmail.com wrote:
> For debugging an individual test case, just skip over all but the
> failing test case:
>
> for i, testCase := range testCases {
> if i != 5 { // 5 is the index of the failing test, remove if
> statement before committing
>
On Thu, 2022-02-03 at 14:26 -0800, Kamil Ziemian wrote:
> Hello,
>
> I was handed proof-of-concept app written in Python. It seems
> underdeveloped, buggy and running it first time is a pain, because of
> dependencies. Basically it need to read some graphs stored in JSON
> files and manipulated
On Sun, 2022-01-30 at 12:01 -0800, Kamil Ziemian wrote:
> Hello,
>
> This is a question from ignorant in the meters of compilers and
> mediocre Go users at best, so it may be stupid.
>
> I really like that in Go unused variable or import is compiler time
> error. As such I wonder why function like
On Sun, 2022-01-30 at 13:47 -0800, Sean Liao wrote:
> By enforcing blanks, you'd lose the chance to name them something
> useful to tell the reader why they're ignored.
> eg:
> // why are the last 2 args ignored??
> handleX = func(foo, bar, _, _ string) string { return foo + bar }
>
On Thu, 2022-02-10 at 09:15 -0800, jake...@gmail.com wrote:
>
> On Wednesday, February 9, 2022 at 9:14:52 AM UTC-5 peterGo wrote:
> > Pelen Li,
> >
> > Always fix your data races. You should consider the results of data
> > races as undefined.
> >
> > Dmitry Vyukov, who implemented the Go race
On Thu, 2022-01-20 at 19:05 -0800, Mandolyte wrote:
> Or perhaps a hybrid, where the methods call generic functions...
>
> On Thursday, January 20, 2022 at 7:23:37 PM UTC-5 Ian Lance Taylor
> wrote:
> > On Thu, Jan 20, 2022 at 3:30 AM Travis Keep
> > wrote:
> > >
> > > I am working on a
On Thu, 2022-04-14 at 03:05 -0700, Michel Casabianca wrote:
> Any comment and contribution welcome.
Can I suggest that you use golang.org/x/sys/execabs rather than os/exec
in ExecCommand?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
On Fri, 2022-04-15 at 18:33 -0700, Dave Keck wrote:
> Hi all,
>
> In this code, the SetMapIndex line panics in Go <1.18, but it no
> longer panics in Go 1.18:
>
> type CustomString string
> m := reflect.ValueOf(map[CustomString]int{})
> m.SetMapIndex(reflect.ValueOf("key"),
I'm trying to get my head around a panic stack trace from a user
report[1].
The parameter value make very little sense to me based on what they
should be from following the program logic. For example the {0x0?, 0x0,
0x1?} (a slice header len=0) in
On Sat, 2023-09-09 at 15:39 -0700, Jason E. Aten wrote:
> New to generics... how can I write a method for a Matrix[float64]
> that uses a math function that expects a float64? I get:
>
> ./slurp1.go:936:18: cannot use m.At(i, j) (value of type float64
> constrained by Addable) as float64 value
On Mon, 2023-10-30 at 18:43 -0700, Jason E. Aten wrote:
> I'm surprised by that claim. I seriously doubt, from reading the
> licenses, that you can legally use the Apache2 license, since
> it removes the MPL requirements; which the MPL forbids you from
> doing.
>
The Mozilla FAQ
On Mon, 2023-10-30 at 23:29 -0700, TheDiveO wrote:
> Unfortunatelly, "okay" hasn't been tested in court yet and especially
> with HashiCorp breaking bad you surely have the deep pockets to see
> this through?
This is not really my problem, I was just pointing out that the authors
of the license
On Tue, 2023-10-31 at 02:50 -0700, Jason E. Aten wrote:
>
>
> On Tuesday, October 31, 2023 at 3:12:13 AM UTC Dan Kortschak wrote:
> > The Mozilla FAQ https://www.mozilla.org/en-US/MPL/2.0/FAQ/ appears
> > to
> > think it's OK.
> >
> > > Q13: May I combi
On Fri, 2023-10-20 at 11:56 +0700, Nurahmadie Nurahmadie wrote:
> why is there no, type coercion, as you said, that allow the new type
> to be acknowledged as its underlying type? which will not be a
> question if otherwise Go has mechanism to allow methods to be
> attached to foreign types.
On Sat, 2023-10-21 at 11:58 -0700, Mike Schinkel wrote:
> Recently I was trying to write a func using generics where I wanted
> to use a slice of an interface that would contain implementers of
> that interface and then pass those types to a generic function, but I
> ran into this error:
>
> type
On Sat, 2023-10-14 at 13:15 -0700, Tong Sun wrote:
> Hmm... somehow I had the impression that only the exported fields can
> be used in template as variables.
>
> Is that a wrong impression or things have changed?
You are indexing into a map so so the notion of fields is not relevant.
--
You
On Sat, 2023-10-14 at 09:33 -0700, Tong Sun wrote:
> Please take a look at
> https://go.dev/play/p/dTDR50dtHB0
>
> I want to
>
> - define my template data dynamically from yaml
> - and export the yaml data if they are unexported
>
> I.e., for the following code:
>
> t :=
On Wed, 2023-08-16 at 20:31 -0700, metronome wrote:
> Hi,
>
> We ran into a weird out of range issue of strconv.formatBits, hope
> someone can shed a light on what could be the root cause, any comment
> is highly appreciated.
>
> problem description:
> random out of range at code, most of
On Wed, 2023-08-16 at 23:43 -0700, metronome wrote:
> Thanks for commenting, a few supplements.
>
> # 1. Version of Go?
> We observed the issue with both go1.20.5 and go1.18.10 on linux/amd64
> (centos)
>
> # 2. Context?
> All panics we observed so far are from either
>
On Thu, 2023-08-17 at 11:34 +0200, Peter Herth wrote:
> I think the omission of keyword parameters in Go is a weakness. In
> many cases, keyword parameters are a simple way of creating APIs,
> which depend on a lot of possible parameters, of which most are not
> necessarily specified. Their
On Thu, 2023-08-17 at 23:32 -0700, metronome wrote:
> > > Have you built with CGO_ENABLED=0?
> Building with CGO_ENABLED=0 succeeded, does that mean the binary's
> runtime behavior has nothing to do with CGO, deploying
> a CGO_ENABLED=0 binary online is not an option as well, for now (We
> are
On Fri, 2023-08-18 at 16:49 +1000, Nigel Tao wrote:
> The go.sum file in the golang.org/x/image repo has a line that is not
> another golang.org.x/* module:
>
> github.com/yuin/goldmark v1.4.13/go.mod
> h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
>
>
On Sat, 2023-08-26 at 13:45 +0100, Jason E. Aten wrote:
> ah... there is documentation, it is just buried...
>
> https://pkg.go.dev/gonum.org/v1/gonum/mat#section-readme
>
> "All matrices are stored in row-major format and users should
> consider this when expressing matrix arithmetic to ensure
On Sat, 2023-08-26 at 07:28 -0700, Brian Candler wrote:
> Could you explain the comment "all of Go is cm"?
> https://go.dev/play/p/tDJiSTqsiSC
>
Sorry, that was a typo, should read "all of Go is rm" (what is there is
inconsistent with everything else I wrote).
--
You received this message
On Sun, 2022-04-24 at 05:21 -0700, Tiago Katcipis wrote:
> Hi,
>
> I was playing around with Go's fuzz support on a pet project of mine
> and as the fuzzer found some offending inputs it created the corpus
> entries on the file system. I fixed the issues but then something
> interesting happened
On Mon, 2022-04-25 at 05:39 +, 'Dan Kortschak' via golang-nuts
wrote:
>
> I suspect that this is from GitHub checking out the code on windows
> with autocrlf and so converting perfectly sensible \n to \r\n, which
> is
> then not properly handled by this
>
https://github.
On Mon, 2022-05-30 at 08:23 -0700, Vejju Deepesh wrote:
> I want know the method of preventing sorting by default and maintain
> the map in the order of insertion
If you want ordered return of elements and O(1) look-up, use a slice
and an index map. Insertion becomes and appends and a map
On Tue, 2022-06-28 at 09:40 -0700, Ian Lance Taylor wrote:
> Please open an issue. Thanks.
Filed https://go.dev/issue/53600.
Dan
--
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,
On Mon, 2022-06-27 at 23:32 -0700, iori yamada wrote:
> Running the code in the link below times out, is this a bug?
> Looking at the assembly, it seems that the instructions corresponding
> to the if statement have been removed due to optimization.
>
> https://go.dev/play/p/CZX4mbyrp37
>
> The
On Thu, 2022-06-09 at 14:21 -0700, Peter Sjolin wrote:
> I attempted to use "code.google.com/p/go.crypto/openpgp" in my
> project and got the following error:
> $ go get code.google.com/p/go.crypto/openpgp
> go: unrecognized import path "code.google.com/p/go.crypto/openpgp":
> parse
On Tue, 2022-07-19 at 09:24 -0700, Amnon wrote:
> > time.NewTicker( time.Duration(n) * time.Second ) ok : duration
> > * duration [s^2] square-seconds ?
>
> Yes, this bothers the inner Physicist in me too.
> But you can only multiply numbers if they are of the same type...
With a small
On Wed, 2022-07-20 at 22:51 +0200, 'Axel Wagner' via golang-nuts wrote:
> The reason reflect uses panic, is for convenience. It would be
> inconvenient having to check an error at every reflect call.
The other reason is that a panic in reflect is as close as you can get
in runtime to a compile
On Fri, 2022-04-29 at 23:18 -0700, Zhaoxun Yan wrote:
> And then in that folder you run:
> # go build -race
> Nothing happens, at least in my go1.15
The race detector needs to run to detect data races; it's not a static
analysis tool.
So if you execute the binary that you built with `go build
On Fri, 2022-04-29 at 23:29 -0700, Zhaoxun Yan wrote:
> Hi Dan!
>
> I did as you told, but go build -race still not functions:
> zxun@zxun-virtual:~/src/race2$ go build
> zxun@zxun-virtual:~/src/race2$ ls
> race2 race.go
> zxun@zxun-virtual:~/src/race2$ go build -race race2
>
On Sat, 2022-04-30 at 22:49 -0700, Zhaoxun Yan wrote:
> I am sure it did not detect race immediately at least in my
> project, which has similar global variable race conditions, but in a
> more subtle way .
>
> For example, the checking of one global variable is from an
> incoming message from
On Fri, 2022-05-06 at 11:22 +0200, Diego Joss wrote:
> Does this work for you?
>
> https://go.dev/play/p/xLRawVhcRtF
>
Thanks. No, the documents are in UTF-16, and the procinst will be too.
So it looks more like this https://go.dev/play/p/4IcXNI3yd2M. If I pull
the proc inst out of the UTF-16,
On Fri, 2022-05-06 at 15:55 -0700, Ian Lance Taylor wrote:
> On Fri, May 6, 2022 at 3:07 AM 'Dan Kortschak' via golang-nuts
> wrote:
> >
> > On Fri, 2022-05-06 at 11:22 +0200, Diego Joss wrote:
> > > Does this work for you?
> > >
> > > https://g
On Sat, 2022-05-07 at 15:18 -0700, Amnon wrote:
> The other interesting question is what algorithm we use to find the
> pattern in each line.
> Generally bytes.Contains uses Rabin-Karp. But as the pattern is the
> word "test" which is only 4 bytes long,
> a brute force search is used, using SSE
On Sat, 2022-05-07 at 16:16 -0700, Const V wrote:
> The question is will scanner.Scan handle a line of 100s MB?
No, at least not by default (https://pkg.go.dev/bufio#Scanner.Buffer).
But that that point you want to start questioning why you're doing what
you're doing.
Your invocation of grep can
I'm in the situation of needing to provide cross-platform xml decoding.
So I thought that xml.Decoder.CharsetReader would be the right approach
in conjunction with golag.org/x/text/encoding. However, the xml decoder
needs to be able to understand the text in order to be able to read the
proc inst
On Thu, 2022-08-25 at 01:47 -0700, Holloway Kean Ho wrote:
> What exactly you're trying to achieve by taking a very elaborated,
> crystal-clear, good-willed security-related article way out of its
> context with your thread title here and agitate some of the Go
> maintainers here?
I don't think
On Tue, 2022-08-30 at 07:46 -0700, Richard Whatever wrote:
> I'm developing a mvc Golang server.
> The model file is as follows:
> type Object struct { ... TargetSize struct{ width, height float64 }
> `json:"targetSize"` ... }
> The controller file is as follows:
> func (c *GetObject) Get()
On Mon, 2022-08-22 at 06:15 -0700, 'Gopher-Insane' via golang-nuts
wrote:
> Hi
>
> So our security team has raised a concern with Go and malware. The
> link that was sent to me
> was https://securityboulevard.com/2021/09/behavior-based-detection-ca
> n-stop-exotic-malware/.
> I reached out to
On Tue, 2022-08-23 at 23:07 -0700, Mine GO BOOM wrote:
> Our system recently experienced a bug because of the surprise that
> sits (documented) inside of time.Truncate():
>
> """
> Truncate operates on the time as an absolute duration since the zero
> time; it does not operate on the presentation
On Thu, 2022-09-22 at 20:01 -0500, Robert Engels wrote:
> The world figured out long ago that OO and it’s principles are a
> better way to go.
This is a very strong assertion (pun not intended). I heartily disagree
with the claim, particularly when it comes to how OO is implemented by
class-based
501 - 600 of 650 matches
Mail list logo