[go-nuts] TMTP messaging protocol

2022-04-06 Thread Liam Breck
TMTP is a protocol [1] to let Internet sites message customers/members directly, instead of unreliable, insecure email or costly custom apps. https://mnmnotmail.org https://twitter.com/mnmnotmail The open source client [2] and server [3] are written in Go. The client UI runs in a localhost browse

Re: [go-nuts] an open source project to replace SMTP/email

2021-01-13 Thread Liam Breck
Here's the backstory to mnm, in a draft article not yet published. I'd love any feedback... https://mnmnotmail.org/volunteered.html On Tue, Jan 5, 2021 at 1:31 PM Liam wrote: > > The mnm project is building a legitimate email replacement: a client[1], a > server[2], and a simple protocol[3] bet

Re: [go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-27 Thread Liam Breck
Go mindshare suffers if it's seen as worse for prototyping, and necessary only for scale. Especially as there are more efficient (albeit more complex) ways to achieve scale. On Mon, Jan 27, 2020, 10:55 AM Eric S. Raymond wrote: > Michael Jones : > > Python, to its credit, has the nice inclusive

Re: [go-nuts] Workaround for missing RWMutex.Try*Lock()

2019-12-03 Thread Liam Breck
Which looks like...? On Tue, Dec 3, 2019, 4:50 PM Robert Engels wrote: > I would use an atomic and a lock instead of two locks. > > > On Dec 3, 2019, at 6:35 PM, burak serdar wrote: > > > > On Tue, Dec 3, 2019 at 5:21 PM Liam Breck > wrote: > >> > >&

[go-nuts] Workaround for missing RWMutex.Try*Lock()

2019-12-03 Thread Liam Breck
I have a problem that is trivially solved via door sync.RWMutex func Reader() T { if !door.TryRLock() { // missing in stdlib :-( return busy } defer door.RUnlock() ... } func Writer() { door.Lock() defer door.Unlock() ... } How does one achieve this in Go? -- You re

Re: [go-nuts] early close of http.Client's Response.Body

2019-11-25 Thread Liam Breck
On Mon, Nov 25, 2019, 10:32 AM Andy Balholm wrote: > > > > On Nov 25, 2019, at 9:54 AM, Liam wrote: > > > > - does the read-to-EOF stipulation also apply to Client.Get/Post() ? > > Yes. Those methods are fairly simple wrappers around Do. > > > - why does Response.Body.Close() before io.EOF not r

Re: [go-nuts] rebuild & reinstall pkg/tool/.../link

2019-10-09 Thread Liam Breck
On Wed, Oct 9, 2019, 3:17 AM Jan Mercl <0xj...@gmail.com> wrote: > On Wed, Oct 9, 2019 at 12:10 PM Liam wrote: > > > > I have the current 1.12 release from a Linux distro, installed in > /usr/lib/go. > > > > If I patch the linker source, how would I rebuild and reinstall > pkg/tool/.../link ? > >

Re: [go-nuts] Re: Windows syscall.Open() change to fix os.Rename() & .Remove()

2019-08-04 Thread Liam Breck
If you can point to an example that depends on the windows-specific error, could you post it in the issue? On Sun, Aug 4, 2019, 2:16 AM Reto wrote: > On Wed, Jul 31, 2019 at 07:00:46PM -0700, Liam wrote: > > In this issue, Microsoft suggested that Go on Windows switch to > Unix-like > > behavio

Re: [go-nuts] `on err` alternative to `try()` has traction...?

2019-07-09 Thread Liam Breck
The controversy between try and explicit error checking is why I wrote this proposal, to provide a compromise that's both explicit and terse. On Fri, Jul 5, 2019, 11:08 PM Liam Breck wrote: > I've expanded the proposal to address feedback from the Go team. It now > offers a more

Re: [go-nuts] `on err` alternative to `try()` has traction...?

2019-07-05 Thread Liam Breck
I've expanded the proposal to address feedback from the Go team. It now offers a more special purpose construct than the generic if-variant 'on'. See the Critiques section in https://github.com/golang/go/issues/32611 On Tue, Jul 2, 2019, 12:57 PM Liam wrote: > This proposal has attracted modes

Re: [go-nuts] YAEHI (Yet another error-handling idea)

2019-07-01 Thread Liam Breck
Erm, what expression besides a function call would yield an error only sometimes? I suppose channel receive, but is that a useful case? It's all moot anyway. On Mon, Jul 1, 2019, 10:42 PM Andrey Tcherepanov < xnow4fippy...@sneakemail.com> wrote: > Thanks Liam, > > your suggested placement would

Fwd: [go-nuts] Does your Windows app rely on os.Rename() or .Remove() ?

2019-06-25 Thread Liam Breck
Microsoft recommends changing this, so we need to know whether existing apps rely on it: On Windows (but not elsewhere) this fails with a "sharing violation": path := "rename-after-open" fd, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0600) if err != nil { ... } err = os.Rename(path_a, path_b

[go-nuts] Web access to golang-dev is down

2019-05-06 Thread Liam Breck
But golang-nuts is still working... -- 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 options, visit https://grou

[go-nuts] rand.Rand.Seed() vs rand.NewSource()

2019-03-26 Thread Liam Breck
Could anyone clarify the difference between these two? r := rand.New(rand.NewSource(...)) var r rand.Rand; r.Seed(...) -- 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 ema

[go-nuts] Project install for go mod

2019-03-04 Thread Liam Breck
What are the recommended from-scratch download/install directions for a project using go.mod (having 1+ main packages)? I don't see them in the wiki, sorry. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] missing fmt.Error(...interface{})

2018-12-30 Thread Liam Breck
rror as suggested would not, > instead implicitly encouraging things like fmt.Error(false, 42) which is > user unfriendly. > > //jb > > On 30 Dec 2018, at 09:53, Justin Israel wrote: > > > > On Sun, Dec 30, 2018 at 9:26 PM Liam Breck > wrote: > >> Justin

Re: [go-nuts] missing fmt.Error(...interface{})

2018-12-30 Thread Liam Breck
Justin, see docs for fmt.Print(...interface{}) On Sun, Dec 30, 2018, 12:15 AM Justin Israel > > On Sun, Dec 30, 2018, 7:24 PM Liam Breck wrote: > >> What's the rationale for omission of: >> fmt.Error(a ...interface{}) error >> > > What does it mean

[go-nuts] missing fmt.Error(...interface{})

2018-12-29 Thread Liam Breck
What's the rationale for omission of: fmt.Error(a ...interface{}) error Given that other fmt functions come in that variety? I realize it can be achieved like this, but so can fmt.Errorf errors.New(fmt.Sprint(...)) Would a proposal to add it be entertained? Happy New Year to all :-) -- Yo

Re: [go-nuts] Generic function aliases

2018-12-04 Thread Liam Breck
04, 2018 at 10:27:19AM -0800, Liam Breck wrote: > >Ah yes, var works. But it should be const, since func names aren't > >variables. > >On Tue, Dec 4, 2018, 5:40 AM Axel Wagner <[1] > axel.wagner...@googlemail.com > >wrote: > > > >

Re: [go-nuts] Generic function aliases

2018-12-04 Thread Liam Breck
s-declarations ended up only be added for types - all other > declarations can already be emulated sufficiently well. :) > > > On Mon, Dec 3, 2018 at 11:39 PM Liam Breck wrote: > >> Type aliases appear in the contracts draft design. Has anyone suggested >> alias declarat

[go-nuts] Generic function aliases

2018-12-03 Thread Liam Breck
Type aliases appear in the contracts draft design. Has anyone suggested alias declarations for generic functions? This would simplify syntax for callers... package g func G(type T)(i T) error { ... } --- package main import "g" func Gi g.G(int) // declare alias func f() { Gi(1) } -- You

Re: [go-nuts] Go 2 Error Handler Testing

2018-10-31 Thread Liam Breck
On Tue, Oct 30, 2018, 4:08 PM Burak Serdar wrote: > On Tue, Oct 30, 2018 at 2:15 PM Liam wrote: > > > > I've compiled an outline of Requirements to Consider for Go 2 Error > Handling. > https://gist.github.com/networkimprov/961c9caa2631ad3b95413f7d44a2c98a > > > > Recently I was asked about sup

Re: [go-nuts] Golang, how dare you handle my checks! (Critique of error proposal)

2018-09-23 Thread Liam Breck
for sharing. > > On Thu, Sep 13, 2018 at 2:46 PM Liam Breck > wrote: > >> The contents of the feedback wiki are interesting. The Go 2 error >> proposal hasn't seen much support, and there are lots of >> counter-proposals... >> >> https://github.com/golan

Re: [go-nuts] Golang, how dare you handle my checks! (Critique of error proposal)

2018-09-13 Thread Liam Breck
The contents of the feedback wiki are interesting. The Go 2 error proposal hasn't seen much support, and there are lots of counter-proposals... https://github.com/golang/go/wiki/Go2ErrorHandlingFeedback On Mon, Sep 10, 2018, 6:11 AM Liam wrote: > > "Golang, how dare you handle my checks!" > A

Re: [go-nuts] Re: Go2 Error Handling - Alternate Handler Concept

2018-09-02 Thread Liam Breck
Posted your link to the feedback wiki, and to my design-revision draft, which will land on the issue tracker this week. https://golang.org/wiki/Go2ErrorHandlingFeedback https://gist.github.com/networkimprov/c6cb3e2dff18d31840f2ef22e79d4a1e On Sun, Sep 2, 2018, 4:49 PM Vlad Didenko wrote: > Ab

Re: [go-nuts] Re: Go2 Error Handling - Alternate Handler Concept

2018-09-02 Thread Liam Breck
Well, that was then, this is now... I'll just note that 10 of 30 feedback posts on the error handling draft feedback wiki have asked for named handlers. Can I add your link there? On Sun, Sep 2, 2018, 4:33 PM Vlad Didenko wrote: > Some time ago, after going through a very similar design (reall

Re: [go-nuts] Re: Ternary ... again

2018-08-18 Thread Liam Breck
Normally the FooBar is full of other fields, necessitating the single field patch. On Sat, Aug 18, 2018, 1:17 PM Tim Peoples wrote: > Regarding your issues with the following... > > >> I've lost count of the times I've had to change: >> >> return FooBar{ >> Field: blah, >> } >> >> To: >> >>

Re: [go-nuts] Re: Ternary ... again

2018-08-17 Thread Liam Breck
People have a wide range of perceptive and cognitive abilities. People also have difficulty imagining the very different abilities that others possess. I find constant vertical scanning and scrolling to be distracting and thus inefficient. So I won't use a tool that adds line breaks to my code, an

Re: [go-nuts] Re: Ternary ... again

2018-08-17 Thread Liam Breck
Ah, very nice! Tho I can't tell from scanning the readme which features are different than go fmt. On Fri, Aug 17, 2018, 1:17 AM Matthias B. wrote: > On Thu, 16 Aug 2018 16:54:35 -0700 > Liam Breck wrote: > > > Indeed, the problem is largely go fmt, I already raised this, b

Re: [go-nuts] Re: Ternary ... again

2018-08-16 Thread Liam Breck
le? I've found that they make code more > complex and unreadable, in both C and the proposed go, and the one-liner > you provide is equally or more unreadable than the more verbose if > statement. > > On Thu, Aug 16, 2018, 16:55 Liam Breck wrote: > >> Indeed, the problem is

Re: [go-nuts] Re: Ternary ... again

2018-08-16 Thread Liam Breck
Indeed, the problem is largely go fmt, I already raised this, but no one picked up on it: I use this one-liner: v := a; if t { v = b } This is not compatible with go fmt, but that tool's effects are undocumented (see issue 18790 which was declined), an

[go-nuts] go mod: x/net,etc repos need version tags

2018-08-16 Thread Liam Breck
Retry under clarified subject... I could not find a version number for x/net or x/net/ipv4. If none exists, > could the maintainers start committing version tags for each submodule in > golang.org/x -- i.e. x/*/* (or x/* if no submodules)? > > This will benefit the imminent rush of *go mod* users

Re: [go-nuts] Re: cross-compile with cgo 'permission denied'

2016-10-26 Thread Liam Breck
On Oct 25, 2016 3:49 PM, "Ian Lance Taylor" wrote: > > On Tue, Oct 25, 2016 at 2:23 PM, Liam wrote: > > What I wanted was the magic incantation (documented nowhere) for linux_arm > > installation: > > > >GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc go install > > -v -a std >

Re: [go-nuts] Why no bytes.InsertByte(s []byte, p int, b byte) []byte ?

2016-10-18 Thread Liam Breck
On Oct 18, 2016 2:56 AM, "Aram Hăvărneanu" wrote: > > On Mon, Oct 17, 2016 at 8:29 PM, Liam Breck wrote: > > bytes.Replace(s []byte, pos int, len uint, new []byte) > > I have no idea what this bizarre hypothetical function does. It's an > awful interface t

Re: [go-nuts] Why no bytes.InsertByte(s []byte, p int, b byte) []byte ?

2016-10-17 Thread Liam Breck
On Oct 16, 2016 6:03 PM, "Liam Breck" wrote: > > > > On Sun, Oct 16, 2016 at 5:32 PM, Ian Lance Taylor wrote: >> >> On Sun, Oct 16, 2016 at 5:25 PM, Liam wrote: >> > >> > On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian Lance Taylor wrot

Re: [go-nuts] Why no bytes.InsertByte(s []byte, p int, b byte) []byte ?

2016-10-16 Thread Liam Breck
On Sun, Oct 16, 2016 at 5:32 PM, Ian Lance Taylor wrote: > On Sun, Oct 16, 2016 at 5:25 PM, Liam wrote: > > > > On Sunday, October 16, 2016 at 5:13:36 PM UTC-7, Ian Lance Taylor wrote: > >> > >> On Sun, Oct 16, 2016 at 3:34 PM, Liam wrote: > >> > > >> > On Sunday, October 16, 2016 at 2:56:42 PM