Re: [go-nuts] Module can't find itself

2019-07-24 Thread Marcin Romaszewicz
Thanks, and duh :) I was so busy trying to figure out why it wasn't building that I neglected to check the basics. -- Marcin On Wed, Jul 24, 2019 at 9:31 PM Burak Serdar wrote: > On Wed, Jul 24, 2019 at 10:11 PM Marcin Romaszewicz > wrote: > > > > Hi All, > > > > I've got a module problem whi

Re: [go-nuts] GC: How was the object tree build?

2019-07-24 Thread Ian Lance Taylor
On Wed, Jul 24, 2019 at 5:37 AM ding liu wrote: > > We know Go`s GC mark than can check all objects begin from root object. But > how to build the object tree? I cann`t find any code in runtime, or any > document. Any body has related documents? The GC never builds a tree. It marks the roots a

Re: [go-nuts] channels as trylocks

2019-07-24 Thread Ian Lance Taylor
On Wed, Jul 24, 2019 at 11:24 AM shivaram via golang-nuts wrote: > > Several sources, including this issue comment: > > https://github.com/golang/go/issues/27544#issuecomment-419265234 > > state that a buffered channel of size 1 can be used as a trylock by > select'ing on it with a default case.

Re: [go-nuts] PCRE to RE2

2019-07-24 Thread Ian Lance Taylor
On Wed, Jul 24, 2019 at 10:11 PM Adam Takahashi wrote: > > I currently have a regex in PCRE that is > > (.|\r|\n)*?(?=FOO) > > It reads in a random number of multiple lines of sentences, and stops when it > sees the word FOO in all caps. I am have problems converting this to a valid > RE2 expres

Re: [go-nuts] PCRE to RE2

2019-07-24 Thread andrey mirtchovski
I'm sorry to say that this list isn't RE2-specific (although one of the main Go contributors wrote RE2). you will probably get very good suggestions on how to convert that to Go's regex, which are RE2-like and I hope you find your answer. A good additional step to do for this particular list is to

[go-nuts] PCRE to RE2

2019-07-24 Thread Adam Takahashi
Hello, I currently have a regex in PCRE that is - (.|\r|\n)*?(?=FOO) It reads in a random number of multiple lines of sentences, and stops when it sees the word FOO in all caps. I am have problems converting this to a valid RE2 expression. Any advice would help. Thanks. -- You received t

Re: [go-nuts] Module can't find itself

2019-07-24 Thread Burak Serdar
On Wed, Jul 24, 2019 at 10:11 PM Marcin Romaszewicz wrote: > > Hi All, > > I've got a module problem which I don't quite understand. All my code is here: > https://github.com/deepmap/oapi-codegen > > When I run "go build" from the top of the repo, I get: > $ go build > can't load package: package

[go-nuts] Module can't find itself

2019-07-24 Thread Marcin Romaszewicz
Hi All, I've got a module problem which I don't quite understand. All my code is here: https://github.com/deepmap/oapi-codegen When I run "go build" from the top of the repo, I get: $ go build can't load package: package github.com/deepmap/oapi-codegen: unknown import path "github.com/deepmap/oap

Re: [go-nuts] Re: x509.ParseCertificate return err

2019-07-24 Thread Wei Tang
Thank you very much! I think golang implement might be strict. Maybe I should use openssl or cgo calling other language implement to parse it. 在 2019年7月24日星期三 UTC+8下午9:28:55,Amar Akshat写道: > > I think the extensions in your certificate might be invalid. Namely CRL > Distribution Points: 2.5.29

[go-nuts] Re: Can't install tools

2019-07-24 Thread Andrey Tcherepanov
This is a weirdest way to post a TEXTUAL error to a text-based web group. In black. Depending on when did you try to do it, you might've hit the time that github.com was having issues. Or your corp network has a firewall. Maybe try to reach that ip:port with browser, curl or wget, see what is

[go-nuts] Can't install tools

2019-07-24 Thread dajah0219
Help please ?! -- 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 discussion on the web visit https://groups.

Re: [go-nuts] time.Format vs. fmt.Sprintf

2019-07-24 Thread Dan Kortschak
I'm offering advice about how to more effectively use the group. Feel free to ignore it. On Tue, 2019-07-23 at 23:39 -0400, Chris Hornberger wrote: > Well, I got here on topic #2 on a google search for golang date > sprintf, soo. Relevant, topical, easily found. > > > > > On Jul 23, 2019,

[go-nuts] Re: Goroutines & ENV

2019-07-24 Thread Andrey Tcherepanov
Yes On Wednesday, July 24, 2019 at 1:56:46 PM UTC-6, B Carr wrote: > > Basic question: Do goroutines all share the same ENV? > > -- 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, se

Re: [go-nuts] Go http server

2019-07-24 Thread B Carr
On Wednesday, July 24, 2019 at 2:17:58 PM UTC-6, Burak Serdar wrote: > > On Wed, Jul 24, 2019 at 1:36 PM B Carr > > wrote: > > > > I'm mostly interested in the degree of insulation one goroutine has from > another. My extensive reading indicates that absent a goroutine > intentionally commun

[go-nuts] go question about goroutines

2019-07-24 Thread joe mcguckin
I want to have some kind of server sitting a port and answering requests (Think HTTP or DNS). Can I tack on a AQMD client so that other software can query the server regarding it's health or various runtime variables like # goroutines that are active, etc? Does the AQMD client exist in it's own

Re: [go-nuts] Go http server

2019-07-24 Thread Burak Serdar
On Wed, Jul 24, 2019 at 1:36 PM B Carr wrote: > > > > On Wednesday, July 24, 2019 at 1:11:31 PM UTC-6, Burak Serdar wrote: >> >> On Wed, Jul 24, 2019 at 12:37 PM B Carr wrote: >> > >> > Am I correct in thinking that the unique goroutine is active for the >> > entirety of the connection session?

[go-nuts] Re: Go for Data Science

2019-07-24 Thread Jon Conradt
There is also https://github.com/containous/yaegi described as: Yaegi is Another Elegant Go Interpreter. It powers executable Go scripts and plugins, in embedded interpreters or interactive shells, on top of the Go runtime.

[go-nuts] Goroutines & ENV

2019-07-24 Thread B Carr
Basic question: Do goroutines all share the same ENV? -- 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 discu

Re: [go-nuts] Go http server

2019-07-24 Thread B Carr
On Wednesday, July 24, 2019 at 1:11:31 PM UTC-6, Burak Serdar wrote: > > On Wed, Jul 24, 2019 at 12:37 PM B Carr > > wrote: > > > > Am I correct in thinking that the unique goroutine is active for the > entirety of the connection session? Everything between the "goroutine spins > up" and "go

Re: [go-nuts] Go http server

2019-07-24 Thread Burak Serdar
On Wed, Jul 24, 2019 at 12:37 PM B Carr wrote: > > Neophyte here. > > Concept help again, please. This all relates to Go. > > > http server waiting for requests... > > http GET request comes in > > ... goroutine spins up Overall your understanding is correct, with the minor detail that the server

[go-nuts] Go http server

2019-07-24 Thread B Carr
Neophyte here. Concept help again, please. This all relates to Go. http server waiting for requests... http GET request comes in ... goroutine spins up handler calls function which may call another function which ultimately services the GET request by providing a response (webpage) then retu

[go-nuts] channels as trylocks

2019-07-24 Thread shivaram via golang-nuts
Several sources, including this issue comment: https://github.com/golang/go/issues/27544#issuecomment-419265234 state that a buffered channel of size 1 can be used as a trylock by select'ing on it with a default case. I was thinking about it and it seemed to me that with such an implementation

[go-nuts] Yaegi – Yet Another Go Interpreter by the Traefik team from Containous

2019-07-24 Thread patricia
Announcing Yaegi, the first open source Golang interpreter with complete support of the language spec. 💥 Made with love by the Traefik team from Containous. Go scripts are finally here! https://medium.com/p/263a1e2d070a/ -- You received this message be

Re: [go-nuts] time.Format vs. fmt.Sprintf

2019-07-24 Thread Chris Hornberger
Well, I got here on topic #2 on a google search for golang date sprintf, soo. Relevant, topical, easily found. > On Jul 23, 2019, at 9:38 PM, Dan Kortschak wrote: > > I couldn't find the thread in my go-nuts box, so I looked for it on > google groups. > > Chris, it may be relevant, but

Re: [go-nuts] P-local/M-local storage for goroutines?

2019-07-24 Thread Robert Engels
As I pointed out you can add code similar to the id project to also get the P id and use that as a sync.Map key. > On Jul 24, 2019, at 12:36 PM, Tamás Gulácsi wrote: > > 2019. július 24., szerda 18:05:56 UTC+2 időpontban Zihan Yang a következőt > írta: >> >> I should have said that my evalua

Re: [go-nuts] P-local/M-local storage for goroutines?

2019-07-24 Thread Tamás Gulácsi
2019. július 24., szerda 18:05:56 UTC+2 időpontban Zihan Yang a következőt írta: > > I should have said that my evaluation is just self-written cycle > measurement, which is very rough and lack of repeated experiment. So the > factor number might be different in your case. But the contention for

Re: [go-nuts] Re: [ANN] VictoriaMetrics - fast open source time series database written in Go

2019-07-24 Thread Aliaksandr Valialkin
Good news! Just added `pure Go` build mode to VictoriaMetrics. It uses github.com/klauspost/compress/zstd instead of github.com/valyala/gozstd. Preliminary results show slightly lower compression r

Re: [go-nuts] P-local/M-local storage for goroutines?

2019-07-24 Thread Zihan Yang
I should have said that my evaluation is just self-written cycle measurement, which is very rough and lack of repeated experiment. So the factor number might be different in your case. But the contention for the single sync.Mutex really hinders the performance in my case. > "what evidence is there

Re: [go-nuts] time.Format vs. fmt.Sprintf

2019-07-24 Thread Wojciech S. Czarnecki
On Tue, 23 Jul 2019 18:45:14 -0500 Robert Engels wrote: > Funny. Did you remember it or just pay close attention to these things? I personally did not remember nor I paid close attention, I just read it. > >>> On Thursday, April 5, 2012 at 3:24:09 PM UTC-4, Russ Cox wrote: > >>> April 5, 2

Re: [go-nuts] P-local/M-local storage for goroutines?

2019-07-24 Thread Jesper Louis Andersen
On Wed, Jul 24, 2019 at 7:16 AM Zihan Yang wrote: > > I tried to evaluate the performance with lru & without lru, the > performance with a global lru is 10x slower than without lru at all. > > This would make me step back a bit and revisit my initial plan. If a global cache isn't helping, what ev

Re: [go-nuts] Re: x509.ParseCertificate return err

2019-07-24 Thread Amar Akshat
I think the extensions in your certificate might be invalid. Namely CRL Distribution Points: 2.5.29.31 X509v3 CRL Distribution Points: SEQUENCE { 4373: OBJECT IDENTIFIER cRLDistributionPoints (2 5 29 31) 4421: OCTET STRING 00 : }. Per the RFC https:

Re: [go-nuts] P-local/M-local storage for goroutines?

2019-07-24 Thread Zihan Yang
The user apps of one container is usually certain, but there are many kinds of user apps. One of the most situations is the nginx server that would access files repeatedly. But the access pattern is not solely decided by the server itself, but also the requests from clients. Even with same client,

Re: [go-nuts] P-local/M-local storage for goroutines?

2019-07-24 Thread Robert Engels
But if the user apps are arbitrary and random how will a cache be of any benefit. It is only a benefit if the programs are reading the same files and in that case you could use a logical file manager that keeps common files in memory. Or as another pointed out, use a service worker model and p

Re: [go-nuts] P-local/M-local storage for goroutines?

2019-07-24 Thread Zihan Yang
As I said before, my use case is a little complicated, let me explain it. I am trying to add more cache inside a project called gVisor , which is an open source user-space kernel from google. Simply speaking, it is a secure container sandbox runtime that levera

[go-nuts] GC: How was the object tree build?

2019-07-24 Thread ding liu
We know Go`s GC mark than can check all objects begin from root object. But how to build the object tree? I cann`t find any code in runtime, or any document. Any body has related documents? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To uns

Re: [go-nuts] P-local/M-local storage for goroutines?

2019-07-24 Thread Robert Engels
The OS file cache is almost certainly going to better than rolling your own. You can probably still find the studies that the Lucene team did in this regard. > On Jul 24, 2019, at 12:16 AM, Zihan Yang wrote: > > My use case is a little bit complicated. The goroutine are running some > user-d

[go-nuts] Re: x509.ParseCertificate return err

2019-07-24 Thread Wei Tang
But in Java, the code below can parse the pem content, is there some difference in x509 implemention between golang and java? import java.io.ByteArrayInputStream; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; public class SoterServerDemo { public s

[go-nuts] x509.ParseCertificate return err

2019-07-24 Thread Wei Tang
Hi, I have a problem with x509.ParseCertificate. My code is: package main import ( "crypto/x509" "encoding/pem" "fmt" ) func main() { certPEM := ` -BEGIN CERTIFICATE- MIID7jCCAtigAwIBAgIBATALBgkqhkiG9w0BAQswHTEbMBkGA1UEAxMSSHVhd2Vp IEtleVN0b3JlICAgMB4XDTE5MDcyNDA4NTQ0NFoXDTI5MDcyNDA4NTQ0