Re: [go-nuts] go modules and local packages

2020-08-08 Thread Gulácsi Tamás
Then why are they in a monorepo? AFAIK monorepos for strictly controlled dependenies and easier refactorings. If two part needs different versions for something common, then they should live and evolve separately. From: Sankar P Sent: Saturday, August 8, 2020 9

Re: [go-nuts] cgo use question

2018-10-01 Thread Gulácsi Tamás
Got it, thanks! Scott Cotton ezt írta (időpont: 2018. okt. 1., H, 11:11): > > Hi, > > My use case is very very particular and unlikely to be related to most cgo > use cases. > > The use case requires that there is no C calling of Go. the requirements > arise from a special set of circumstances

Re: [go-nuts] Re: Why is the cpu usage so high in a golang tcp server?

2017-12-19 Thread Gulácsi Tamás
You don't need to use bufio, but you'll need buffering to decrement the count of Read calls (thus, syscalls). Reusing []byte slices: use a sync.Pool. Or several sync.Pools for different byte slices. Vasiliy Tolstov ezt írta (időpont: 2017. dec. 19., K, 11:30): > If I have something like this, bu

Re: [go-nuts] Re: appengine golang logs

2017-11-04 Thread Gulácsi Tamás
Sth. along https://play.golang.org/p/BwlbkxMLdw ? Sankar P ezt írta (időpont: 2017. nov. 4., Szo, 8:10): > There is no log.SetWriter in either the builtin log package or the > appengine log package. There is a log.SetOutput which I mentioned in my > original mail, but I am not able to understand

Re: [go-nuts] multiply and divide

2017-08-19 Thread Gulácsi Tamás
Awesome, thanks! I just can't match "arbitrary precision" and "float" expressions: 1/3 is rational, but can't be represented with float-like data structure. The same problem is with arbitrary precision uint: what will ^uint-1 be? So, arbitrary precision int and user-specified-precision float is g

Re: [go-nuts] Attaching to email and extracting email attachments

2017-07-30 Thread Gulácsi Tamás
; >> @Konstantin K. - Yes been doing that. Have you successfully done this >> problem before? >> >> @Gulacsi - That's where I am right now. >> >> Thanks guys. Will let you know if I figure this out... >> >> On Wed, Jul 26, 2017 at 5:30 PM, G

Re: [go-nuts] Attaching to email and extracting email attachments

2017-07-26 Thread Gulácsi Tamás
You only need to decode the Transfer-Encoding, and treate the file as Content-Type says. jesse junsay ezt írta (időpont: 2017. júl. 26., Sze, 8:52): > Thank you Tamas... I am already done with identifying each part using the > mime multipart... My main issue now is decoding it back to its binary

Re: [go-nuts] Correct way to track each individual goroutine

2017-07-25 Thread Gulácsi Tamás
golang.org/x/sync/singleflight is the descendant of go4.org/syncutil/singleflight which is factored out from camlsitore.org :) Konstantin Khomoutov ezt írta (időpont: 2017. júl. 25., K, 9:04): > On Mon, Jul 24, 2017 at 11:47:44PM -0700, Tamás Gulácsi wrote: > > > See http://godoc.org/go4.org/syn

Re: [go-nuts] Re: http: TLS handshake error from :: EOF

2016-12-31 Thread Gulácsi Tamás
Yup, exchanged the values, sorry. The default is 1.1, so you need 1.0. Einthusan Vigneswaran ezt írta (időpont: 2016. dec. 31., Szo 13:00): > Are you suggesting to set the minimum to 1.1? Wouldn't that cause less > compatibility? Maybe a typo in your reply? > > Sent from iPhone > > > On Dec 31,

Re: [go-nuts] Re: Go on AIX

2016-12-15 Thread Gulácsi Tamás
n a recent gcc bug they filed. They probably already got it working. > Not sure whether and when they would upstream the changes though. > > On Thursday, 24 January 2013 14:15:06 UTC-8, minux wrote: > > > On Fri, Jan 25, 2013 at 5:50 AM, Gulácsi Tamás wrote: > > I've

Re: [go-nuts] Re: cgo - 'runtime.h' file not found in MacOSX

2016-12-15 Thread Gulácsi Tamás
they don't belong there. > > > On Thursday, December 15, 2016 at 5:24:30 AM UTC-8, DM wrote: > > Actually that is my problem changing all functions to pass on the context. > > > On 15-Dec-2016 6:51 pm, "Gulácsi Tamás" wrote: > > > Debraj Manna ezt

Re: [go-nuts] Re: cgo - 'runtime.h' file not found in MacOSX

2016-12-15 Thread Gulácsi Tamás
Debraj Manna ezt írta (időpont: 2016. dec. 15., Cs, 14:12): If I get you correctly I still have to pass the Context (with logger attached) to all the functions where I wish to do the logging. If my understanding is not correct then can you please give me a small example? No, you're right: you h

Re: [go-nuts] Re: cgo - 'runtime.h' file not found in MacOSX

2016-12-15 Thread Gulácsi Tamás
Just attach your pimped logger to the Context, and use some structured logger such as github.com/go-kit/kit/log, and pass a logger.With("reqid", reqID) specialized logger. Way easier than hacking out the goroutine id just to have a goroutine-local storage, and waay more reliable - for example you

Re: [go-nuts] Re: Isn't the use of Context in db/sql non-diomatic?

2016-12-11 Thread Gulácsi Tamás
Good question. QueryContext(ctx context.Context, query QueryWithOpts, args ...interface{}) (sql.Rows, error) ? Where type QueryWithOpts struct { fmt.Stringer opts []qryOpt } and func Query(qry string, options ...qryOpt) QueryWithOpts á'lá sql.NamedArg. But this feels just as hacky, as

Re: [go-nuts] Re: Serialization internal data to disk

2016-10-17 Thread Gulácsi Tamás
No, method 1 preserves "err" if it is not nil. Tong Sun ezt írta (időpont: 2016. okt. 17., H 20:11): > > On Mon, Oct 17, 2016 at 1:20 AM, Tamás Gulácsi wrote: > > > > The reason that I didn't do it, is because I don't know how to do it. In > essence, that "f.Close()" that you worried about is wr

Re: [go-nuts] Go string to uintptr

2016-09-07 Thread Gulácsi Tamás
Thanks! Nigel Tao ezt írta (időpont: 2016. szept. 8., Cs 3:23): > On Thu, Sep 8, 2016 at 1:03 AM, Tamás Gulácsi > wrote: > > a:=([1<<20]byte(unsafe.Pointer(retPtr))) > > Also, the type needs to be pointer-to-array, not array. > > a:=(*[1<<20]byte)(unsafe.Pointer(retPtr)) > -- You received thi

Re: [go-nuts] Where is .gosymtab in go binaries with cgo?

2016-06-27 Thread Gulácsi Tamás
Ok, will do. Ian Lance Taylor ezt írta (időpont: 2016. jún. 26., V, 22:53): > On Sun, Jun 26, 2016 at 1:28 PM, Tamás Gulácsi > wrote: > > > > 2016. június 26., vasárnap 21:42:15 UTC+2 időpontban Ian Lance Taylor a > > következőt írta: > >> > >> On Sun, Jun 26, 2016 at 12:18 AM, Tamás Gulácsi >