Re: [go-nuts] Security issue in

2021-05-07 Thread Lars Seipel
On Fri, May 07, 2021 at 12:05:22AM -0700, christoph...@gmail.com wrote: The issue for the security problem is here: https://github.com/satori/go.uuid/issues/73 There is a CVE identifier for this security problem: https://github

Re: [go-nuts] Re: What is the correct way to access/modify slice elements concurrently

2019-11-10 Thread Lars Seipel
On Sat, Nov 09, 2019 at 11:00:04AM -0600, Robert Engels wrote: No. Because in the absence on a memory barrier the writes may not be flushed meaning you cannot reason about any value ever being changed. atomics provide the memory barrier, but the mm still does not specify a “happens before” re

Re: [go-nuts] Re: What is the correct way to access/modify slice elements concurrently

2019-11-09 Thread Lars Seipel
On Fri, Nov 08, 2019 at 06:06:22AM -0600, Robert Engels wrote: I think that is a bit unclear - even if they access different elements, if they ever access the same element even at different times , you need synchronization- it’s not only if the access the same element “concurrently”. No, that

Re: [go-nuts] Re: Possible missing atomic load(s)/store(s) in runtime/chan.go?

2018-08-08 Thread Lars Seipel
On Sun, Aug 05, 2018 at 12:12:04PM -0700, Marvin Stenger wrote: > And my point was, that a slow path protected with a lock surely can execute > concurrently with a fast path not protected by that lock. So for the fast > path implementation one has to know what one is doing and if reordering > is

Re: [go-nuts] Please help me solve a bug with my licencing system!

2018-05-11 Thread Lars Seipel
On Thu, May 10, 2018 at 06:46:56PM -0700, ati...@mail.ccsf.edu wrote: > Code: https://gist.github.com/seriousnerve/1830e77d3e2891b0a5b158c9fb02b37f Are you sure you want to re-use the provided password as a salt value? Sure, it's a software licensing system and no one expects it to be super-secure

Re: [go-nuts] How to fake os.Stdout in golang for testing?

2018-05-05 Thread Lars Seipel
On Sat, May 05, 2018 at 08:55:17AM -0700, mfriedenha...@gmail.com wrote: > * Now in golang `os.Stdout` is an `*os.File` which is mostly a wrapper for > an OS specific file. You can always use os.Pipe to get an actual file descriptor to write to. -- You received this message because you are sub

Re: [go-nuts] Re: All Forms of Wishful Generics

2018-02-17 Thread Lars Seipel
On Sat, Feb 17, 2018 at 01:10:29AM -0800, dc0d wrote: > There are other things too, that I would like to have in Go; like a faster > FFI/CGO, or safe packages by restricting features so that a Go package > cannot harm the hosting machine or application, like Safe Tcl Go already has a NaCl backe

Re: [go-nuts] Re: Web Framework for Beginners

2018-01-28 Thread Lars Seipel
On Sun, Jan 28, 2018 at 01:08:57AM -0800, Florin Pățan wrote: > And to prove how flawed your analogy with the Hello World vs extending a > distributed database is... When you start programming you barely understand > what fmt.Println() is, how would you expect someone that doesn't understand > t

Re: [go-nuts] Re: Web Framework for Beginners

2018-01-27 Thread Lars Seipel
On Thu, Jan 25, 2018 at 01:26:00PM -0800, Florin Pățan wrote: > I'm not saying that we should be against recommending the standard library, > by all means, it's one of the best assets of the language. But maybe it's > time we should think about saying: Start with this framework, insert > framewo

Re: [go-nuts] Dangers of package renaming

2017-12-02 Thread Lars Seipel
On Sat, Dec 02, 2017 at 07:33:05AM -0800, Jonathan Hall wrote: > I maintain an open-source Go package with a few dozen followers. > (github.com/flimzy/kivik) > > I'm planning to transfer/rename the package to a new organization (new > package name to be: github.com/go-kivik/kivik). > > I under

Re: [go-nuts] what is x.exe in golang 1.9.1 sdk for windows? antiviruses complain

2017-10-14 Thread Lars Seipel
On Sat, Oct 14, 2017 at 12:36:42AM -0700, Igor Maznitsa wrote: > the version for Linux, so the question what is the file? the Totalscan site > shows terrible result of scanning of the file for i386 I especially like the "unsafe" and "malicious_confidence_100%" labels these scanners give to trivi

Re: [go-nuts] Go 2 suggestion - what dependencies included in a build?

2017-08-17 Thread Lars Seipel
On Thu, Aug 17, 2017 at 09:54:43AM -0700, Eric Johnson wrote: > The compiler, at least, knows which packages were used to compile the > source. Even absent additional metadata from something like Gopkg.lock, the > compiler could still include info about the packages compiled into a > binary. Knowin

Re: [go-nuts] Go 2 suggestion - what dependencies included in a build?

2017-08-16 Thread Lars Seipel
On Tue, Aug 15, 2017 at 04:58:00PM -0700, 'Eric Johnson' via golang-nuts wrote: > As I scan reports of vulnerable software, I'm concerned that it is > impossible to tell, from a Go binary, what was used to build that binary. A lot of projects are already doing this, if somewhat indirectly: they

Re: [go-nuts] does Go memory model guarantee this program always prints 1?

2017-07-06 Thread Lars Seipel
On Thu, Jul 06, 2017 at 12:19:05PM -0700, T L wrote: > > package main > > import "fmt" > import "sync/atomic" > > func main() { > var x int32 > atomic.AddInt32(&x, 1) > fmt.Println(atomic.LoadInt32(&x)) > } Sure. > Within a single goroutine, the happens-before order is the order >

Re: [go-nuts] Errors from Gob

2017-04-29 Thread Lars Seipel
On Thu, Apr 27, 2017 at 08:55:36AM -0700, Chris Hopkins wrote: > What's the current thinking on this sort of error handling? It's hard to > say "Handle errors properly" when the standard library is butchering the > original error message. This most likely *is* the original error, as returned by

Re: [go-nuts] Re: Feedback on naming issue when interface vs main code struct

2017-03-04 Thread Lars Seipel
On Sat, Mar 04, 2017 at 03:57:48PM -0800, mlg wrote: > according to your rationale, I believe the case I'm referring to is when > the interface represents a domain object (e.g. Consumer). In such case, if > you don't plan on exporting your interface (therefore naming it > `consumer`), how would

Re: [go-nuts] How to idiomatically display chained errors?

2017-02-05 Thread Lars Seipel
On Sat, Feb 04, 2017 at 12:08:20AM -0800, so.qu...@gmail.com wrote: > The following would print out "ERROR: Foo() ERROR: Bar() ERROR: > stdlib.Func() something went wrong with this standard function call", which > feels obviously wrong. Leave out the "ERROR" string as well as the gratuitous pare

Re: [go-nuts] About 64bits alignment

2017-02-04 Thread Lars Seipel
On Sat, Feb 04, 2017 at 01:30:49AM -0800, T L wrote: > Get it. This is quite bug prone to write programs on 64bit OSes and the > programs are expected to run on 32bit OSes too. Well, there's a reason the sync/atomic package docs have this statement right at the top: > These functions require gre

Re: [go-nuts] package containing standard CA roots?

2016-12-18 Thread Lars Seipel
On Thu, Dec 15, 2016 at 04:35:09PM +, Alex Flint wrote: > Does anyone know of a golang package that embeds (go-bindata or similar) a > reasonable standard set of CA roots? No, but the common approach is to rely on the root CA set maintained by Mozilla. This should correspond to the latest Fir

Re: [go-nuts] Working with characters in strings

2016-10-31 Thread Lars Seipel
On Mon, Oct 31, 2016 at 06:06:23PM +, 'Thomas Bushnell, BSG' via golang-nuts wrote: > Strings are specified to be UTF8, so if you cast a string to []byte you > will see its UTF8 representation. They are not. A Go string may contain arbitrary bytes. Features like for..range or conversions to r

Re: [go-nuts] Re: How to initialize all members of a slice

2016-10-03 Thread Lars Seipel
On Mon, Oct 03, 2016 at 04:19:34PM -0700, C Banning wrote: > Lot's of people will jump up and down that this is "unsafe," but if you're > building a utility and have complete control of the code something like > this might work: https://play.golang.org/p/eDPoI83C0u Not necessarily unsafe, just u

Re: [go-nuts] help with bazil.org/fuse

2016-09-06 Thread Lars Seipel
On Mon, Sep 05, 2016 at 12:47:51PM +0930, Dan Kortschak wrote: > func (f *RW) Write(ctx context.Context, req *fuse.WriteRequest, resp > *fuse.WriteResponse) error { > f.mu.Lock() > defer f.mu.Unlock() > > f.mtime = f.fs.now() > > var err error > if req.FileFlags&fus

Re: [go-nuts] Re: Is there a standard lib function which will return the count of characters in a string?

2016-07-23 Thread Lars Seipel
On Sat, Jul 23, 2016 at 08:36:03AM -0700, Tamás Gulácsi wrote: > Yes, you have to normalize your String to be able to count the runes, and > have that be the count of characters. That would only work if there was a precomposed form for every possible combining character sequence, which is not the

Re: [go-nuts] Linking C dynamic library non-standard location

2016-07-16 Thread Lars Seipel
On Sat, Jul 16, 2016 at 02:10:38PM -0700, dan...@basereality.com wrote: > Do you know if it's possible to set this option in an environment variable, > so that it isn't needed to be passed on each command line operation? Ian mentioned another way to achieve your goal: add the directory to the lis