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

[go-nuts] [dev] ANN: surfsticker

2020-08-04 Thread Lars Lehtonen
al window that was displaying "foo.example.com" will change to displaying "baz.example.com". "bar.example.com" would be unaffected. Find surfsticker at <https://github.com/alrs/surfsticker>. --- Lars Lehtonen -- You received this message because you are subscribed

[go-nuts] trouble parsing XML with embedded structs

2020-06-04 Thread Lars R. Damerow
e version attribute that's set on the envelope node, just not the `xml.Name` value. Can anyone share some clues about what I'm doing wrong here? Thanks very much, -lars -- lars r. damerow https://keybase.io/ldamerow F29F 160D B23C 3237 1BA3 FCD5 4E13 C775 36B3 ABCA -- You received

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

[go-nuts] AF_UNIX sockets on Windows in a golang release?

2018-09-21 Thread lars
ughly when that release will come out? Thanks! -lars -- 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...@googlegroups.com. For more

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] Re: Help translate x86-64 assenbly to Go assembly

2017-01-17 Thread lars
Thanks, Damian Gryski has a nice tutorial on how to write Go assembly functions with PeachPy. https://blog.gopheracademy.com/advent-2016/peachpy/ On Tuesday, January 17, 2017 at 11:43:11 AM UTC+1, Peter Waller wrote: > > A useful tool for this in general is > https://github.com/Maratyszcza/Pea

[go-nuts] Re: Help translate x86-64 assenbly to Go assembly

2017-01-16 Thread lars
Managed to get this working The Go implementation now returns a monotonic time and works on 64 bit Intel Macs. Updated version at https://gist.github.com/namsral/376d0f063f631593a52e3f5b439e289c#file-time_amd64-v2-s On Tuesday, January 17, 2017 at 4:36:27 AM UTC+1, la...@namsral.com wrote: >

[go-nuts] Help translate x86-64 assenbly to Go assembly

2017-01-16 Thread lars
I want to add monotonic time to Go's runtime on macOS (x86-64) by replacing Go's runtime,nanotime() to macOS' mach_absolute_time(). So far my Go assembly compiles but it returns the seconds since 1970-01-01 instead of what mach_absolute_time() returns. What I have so far: https://gist.github.co

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

[go-nuts] Re: Go @ Work

2016-12-06 Thread Lars Lehtonen
y previously use before > switch to Golang? After almost five years, I suspect he has forgotten. - --- Lars Lehtonen -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEcBAEBAgAGBQJYR0ymAAoJEIE31HTrywTy69MH/iba49/xSPz4Ux7sXlih8lgA CmUYknFZwisszl32iENiCBrg12ZwkB28W3bZquVHZgQ6JzFs+mzN+

[go-nuts] Re: Why do plugins require a main package?

2016-11-30 Thread Lars Tørnes Hansen
I would pay attention to *with exported functions and variables.Fxfunc SomeFunc() {}* *https://golang.org/ref/spec#Exported_identifiers* Den onsdag den 30. november 2016 kl. 20.13.10 UTC+1 skrev Craig Peterson: > > From the 1.8 plugin docs : > > A plug

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

[go-nuts] Re: create a .rpm file for go app.

2016-10-07 Thread Lars Lehtonen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It's a bummer that you need to wade into the Ruby ecosystem, but I too have had good results with fpm. - --- Lars Lehtonen -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEcBAEBAgAGBQJX934JAAoJEIE31HTrywTyjqwIAJ9Tdb40XknWmzMlYDF

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] OS-threads and what they do

2016-08-23 Thread Lars Kulseng
I have read some discussion on the release of OS-threads and it seems like a difficult problem to solve. I don't think this comes up as a problem too often though. Perhaps in very resource-limited systems? tirsdag 23. august 2016 23.39.28 UTC+2 skrev Dave Cheney følgende: > > Approximately yes.

Re: [go-nuts] OS-threads and what they do

2016-08-23 Thread Lars Kulseng
-number of executing threads. Therefore, the number of threads above GOMAXPROCS is a product of how much simultaneous blocking/cgo/syscalls are performed. tirsdag 23. august 2016 15.21.07 UTC+2 skrev Ian Lance Taylor følgende: > > On Tue, Aug 23, 2016 at 1:54 AM, Lars Kulseng &

[go-nuts] OS-threads and what they do

2016-08-23 Thread Lars Kulseng
I have tried to find some onformation about how OS-threads are created, and what their roles are. I know that this doesn't really matter in a lot of cases since goroutines are multiplexed on top of OS-threads and they are usually created at startup of the program, but I'm just trying to underst

[go-nuts] Invalid JSON document from 'go list -json std'

2016-08-20 Thread Lars Tørnes Hansen
I expected that go list -json std ... would output a valid JSON document, because go help list writes: The -json flag causes the package data to be printed in JSON format instead of using the template format. but ... - The JSON document is not a JSON array - Between 2 JSON objects of typ

[go-nuts] Re: Ideas for a Go interpeter, feedback requested

2016-08-15 Thread Lars Tørnes Hansen
My thought about a Go interrpreter. I had thought of making a Go transpiler using either the D programming language, or the Julia programming language as the target. Julia is very interesting. It is using the LLVM JIT. In the Julia REPL it is very easy to show the machine code or LLVM bitcode f

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

[go-nuts] Re: TCP Server

2016-07-19 Thread Lars Kulseng
If it is possible to go the HTTP-route, you may also want to consider using WebSockets, as it uses bare TCP-protocol for transporting data, but with a HTTP-handshake. That way you can avoid the overhead that HTTP adds, and you could stream the data from you device to your server. mandag 18. j

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