Re: [go-nuts] go package dating back to 2009

2023-07-24 Thread TheDiveO
just a wild guess: search for prior art? On Tuesday, July 25, 2023 at 1:21:22 AM UTC+2 Ian Lance Taylor wrote: > On Mon, Jul 24, 2023 at 3:08 PM Bravo Moua wrote: > > > > How can one search for packages dating back to Jan 2009 > > Well, Go was only publicly released in November, 2009, so there

Re: [go-nuts] go package dating back to 2009

2023-07-24 Thread Ian Lance Taylor
On Mon, Jul 24, 2023 at 3:08 PM Bravo Moua wrote: > > How can one search for packages dating back to Jan 2009 Well, Go was only publicly released in November, 2009, so there are no public Go packages as old as January, 2009. I assume you know that you can search for Go packages today at

[go-nuts] Search for development of decred and btcd

2023-07-24 Thread Bravo Moua
Does golang have any logs of builds dating back to jan 2009 -- 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. To view

[go-nuts] go package dating back to 2009

2023-07-24 Thread Bravo Moua
How can one search for packages dating back to Jan 2009 -- 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. To view this

[go-nuts] Generics and "static" adapters

2023-07-24 Thread Salvatore Domenick Desiano
Ever since 1.18 came out I've been struggling to find an idiomatic way to implement a certain kind of adapter. I'm starting to suspect I'm Holding It Wrong (TM) so here I am. In short, I have an adapter that is effectively a collection of static methods and it doesn't look right. Imagine you

Re: [go-nuts] memory safe languages question

2023-07-24 Thread Robert Solomon
I'm also old enough to remember that. I was hoping language experts may have some useful information. I take ur point. Thx for answering On Sun, Jul 23, 2023, 10:10 PM Kurtis Rader wrote: > Wouldn't a forum dedicated to Ada be more appropriate for your question? > I'm old enough to remember

Re: [go-nuts] no way to pause `Listen` on net connections

2023-07-24 Thread Marvin Renich
* David N [230724 01:11]: > I've posted this question on stackoverflow > , > discussed it with some members of the golang community, and I was > encouraged to post here. > > Problem:

Re: [go-nuts] no way to pause `Listen` on net connections

2023-07-24 Thread Jan Mercl
On Mon, Jul 24, 2023 at 9:26 AM David N wrote: > Yup, this makes sense and should work, but I'm still surprised this can't be > entirely done in Golang. Who says it's not possible? I'm not aware of a reason why the required parts cannot be implemented in pure Go (+ syscalls + right permission

Re: [go-nuts] no way to pause `Listen` on net connections

2023-07-24 Thread David N
Yup, this makes sense and should work, but I'm still surprised this can't be entirely done in Golang. On Mon, Jul 24, 2023 at 10:49 AM Jan Mercl <0xj...@gmail.com> wrote: > On Mon, Jul 24, 2023 at 9:14 AM David N wrote: > > On Linux you may try fiddling with iptables, limitations apply: > >

Re: [go-nuts] no way to pause `Listen` on net connections

2023-07-24 Thread David N
I've posted a snippet in the so question: ```go l, err := net.Listen("tcp", ":2000")if err != nil { log.Fatal(err) } for { conn, err := l.Accept() // BLOCKING HERE ... } ``` iiuc, your solution only checks on the start as eventually you have to call `l.Accept()` and be blocked again.

Re: [go-nuts] no way to pause `Listen` on net connections

2023-07-24 Thread Jan Mercl
On Mon, Jul 24, 2023 at 9:14 AM David N wrote: On Linux you may try fiddling with iptables, limitations apply: https://stackoverflow.com/questions/44464617/stop-accepting-new-tcp-connections-without-dropping-any-existing-ones/44509993#44509993 -- You received this message because you are

Re: [go-nuts] no way to pause `Listen` on net connections

2023-07-24 Thread David N
I see, so let's take a step back, I want to pause/resume `net.Listen()`. Unlike a web server, my application doesn't need to always be on, in fact it only comes online once the user decides, responds to the requests, and would sleep again until needed - when given signal again by the user (and not

Re: [go-nuts] no way to pause `Listen` on net connections

2023-07-24 Thread Bakul Shah
You can do a non-blocking select on a channel prior to l.Accept(). If there is a pause message, you do a blocking select on the same channel for an resume or finish message. A separate goroutine can send you those messages depending on conditions under which you want to pause or resume. If the