[go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread chuvak117
Ok with Mutex all work okay but i'm still have unclosedTransports, i'v check it with pprof and he show that Dial: dialer.Dial, blocked Transport from closing воскресенье, 27 мая 2018 г., 18:33:12 UTC+3 пользователь Tamás Gulácsi написал: > > Map is not concurrency safe, you have to synchronize

[go-nuts] [show] A lemmatizer for Go

2018-05-27 Thread Matt Sherman
Hi, been a while since I’ve been on the list! I’ve started a package with tokenizers and lemmatizers for Go, called ‘Jargon'. It’s intended to be useful for detecting synonyms in text, and turning them into their canonical terms. It’s early so I am looking for feedback: would you find such a

[go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread Tamás Gulácsi
"By default, Transport caches connections for future re-use. This may leave many open connections when accessing many hosts. This behavior can be managed using Transport's CloseIdleConnections method and the MaxIdleConnsPerHost and DisableKeepAlives fields. " So you may try to close

[go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread chuvak117
I got suggestion use DialContext but proxy package not suport it, also i found this https://go-review.googlesource.com/c/net/+/37641 воскресенье, 27 мая 2018 г., 20:26:19 UTC+3 пользователь Vadim Lesich написал: > > Ok with Mutex all work okay but i'm still have unclosedTransports, i'v > check

[go-nuts] Cross platform native(no dependencies) GUI options.

2018-05-27 Thread atighe
Hello, I would like you guys to suggest some GUI libraries that do not have any HTML/CSS or C bindings, are cross platform and require no dependencies. When I say native, I mean no dependencies. I do not mean native to the OS. This would be great but I don't see any available that have no C

Re: [go-nuts] Cross platform native(no dependencies) GUI options.

2018-05-27 Thread Sebastien Binet
There was very recently a thread about this on Reddit: https://www.reddit.com/r/golang/comments/8m5icy/cross_platform_native_gui_library/ sent from my droid On Sun, May 27, 2018, 22:51 wrote: > Hello, > > I would like you guys to suggest some GUI libraries that do not

Re: [go-nuts] Cross platform native(no dependencies) GUI options.

2018-05-27 Thread atighe
Yeah, the ones suggested all use cgo though. On Sunday, May 27, 2018 at 2:08:17 PM UTC-7, Sebastien Binet wrote: > > There was very recently a thread about this on Reddit: > > > https://www.reddit.com/r/golang/comments/8m5icy/cross_platform_native_gui_library/ > > sent from my droid > > On Sun,

Re: [go-nuts] Cross platform native(no dependencies) GUI options.

2018-05-27 Thread Tyler Compton
I'm not sure if it's actually feasible to write a GUI library without external libraries. A GUI that runs Linux will need to interact with an X server or a Wayland compositer, and the library will have to interact with their APIs somehow. On Sun, May 27, 2018, 14:19 wrote:

Re: [go-nuts] Cross platform native(no dependencies) GUI options.

2018-05-27 Thread atighe
I just do not want it to have cgo and it should be perfect. On Sunday, May 27, 2018 at 2:55:06 PM UTC-7, Tyler Compton wrote: > > I'm not sure if it's actually feasible to write a GUI library without > external libraries. A GUI that runs Linux will need to interact with an X > server or a

Re: [go-nuts] Re: I am confused.

2018-05-27 Thread David Skinner
https://invite.slack.golangbridge.org/ You Must be Over the Age of 16 to use chat server. You must be over age 13 to use GitHub On Sat, May 26, 2018 at 11:07 PM wrote: > Have you not seen my post about joining a chat server? > Instead of waiting a day or so for each

[go-nuts] Re: New Embedded Document Database (Alpha)

2018-05-27 Thread Kaveh Shahbazian
BTW CAS is now implemented and added employing a rev field inside the json document (and again this idea is from CouchDB!). -- 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

[go-nuts] Re: New Embedded Document Database (Alpha)

2018-05-27 Thread Sokolov Yura
> - The meaning and implementation of CAS at document level (and a transaction > involving multiple documents) might greatly differ from that of at a simple > key level and Badger provides multi-key transactions, so any high level logic may use it. > - It requires to expose badger transactions

[go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread chuvak117
Do you have an example? воскресенье, 27 мая 2018 г., 8:39:50 UTC+3 пользователь Tamás Gulácsi написал: > > Just reuse the created http.Client. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

[go-nuts] Re: New Embedded Document Database (Alpha)

2018-05-27 Thread Sokolov Yura
If you read Badgrer's README carefully (and if Badger's README tells the truth), you'll see that Badger's transactions are implemented with sort of CAS: - transaction remembersall version of all data it reads, - on commit it rechecks that all data read during transaction were not modified, -

[go-nuts] Re: New Embedded Document Database (Alpha)

2018-05-27 Thread Kaveh Shahbazian
That's possible. Yet it will not help with implementing another database based on that key-value store. Because even if (I do not know how and doubt that) badger provides CAS capabilities, one can not simply use it directly because: - The meaning and implementation of CAS at document level

[go-nuts] Re: New Embedded Document Database (Alpha)

2018-05-27 Thread Kaveh Shahbazian
> > Badger provides multi-key transactions, so any high level logic may use it. > > Already doing that. It requires you expose your own transactions that use Badger's one. > It will be sick if you build non-transactional storage on top of > transactional. > It is transactional. If transactions

[go-nuts] Re: New Embedded Document Database (Alpha)

2018-05-27 Thread Kaveh Shahbazian
Indeed this JSON store is transactional and takes advantage of this feature provided by badger. But CAS is another story and is orthogonal to transactions. Even when using common RDBMSs we need some form of optimistic concurrency. Assume we are about to update the balance for an account. How

Re: [go-nuts] Re: I am confused.

2018-05-27 Thread alex . rou . sg
That's why I also linked discord (age 13) and irc On Sunday, 27 May 2018 17:07:10 UTC+8, David Skinner wrote: > > https://invite.slack.golangbridge.org/ > You Must be Over the Age of 16 to use chat server. > > You must be over age 13 to use GitHub > > On Sat, May 26, 2018 at 11:07 PM

Re: [go-nuts] Type dependency graphs?

2018-05-27 Thread mrx
Very cool! I'll for sure investigate this closer, thanks a lot Rohit Jain. Regards, Patrik Iselind On Sat, May 26, 2018 at 7:34 AM Rohit Jain wrote: > https://github.com/TrueFurby/go-callvis > > This is a really neat tool > > On Wednesday, May 23, 2018, Patrik

[go-nuts] Re: Cross platform native(no dependencies) GUI options.

2018-05-27 Thread Fino
yes , there are https://github.com/g3n/engine https://github.com/google/gxui https://github.com/goki/ki widgets in Go, window by GLFW, 2D graphic by opengl or a 2D graphic lib in Go, BR fino -- You received this message because you are subscribed to the Google Groups "golang-nuts" group.

Re: [go-nuts] Cross platform native(no dependencies) GUI options.

2018-05-27 Thread Randall O'Reilly
wrt the compilation slowdown issue, the cgo code that I adapted from shiny in the “as native as you can reasonably get in Go" GoGi GUI (https://github.com/goki/gi) is certainly the slowest part of the build, but even so, it is a *tiny* fraction of the compilation time of Qt (which can take

[go-nuts] Re: I am confused.

2018-05-27 Thread alex . rou . sg
Then you shouldn't even have a google account/gmail and shouldn't be posting on google groups. https://support.google.com/accounts/answer/1350409?hl=en > For all countries not listed below, 13 is the minimum age to manage your > own Google Account. The only legit way for you to have a

[go-nuts] Re: I am confused.

2018-05-27 Thread John
Okay I will confess my age: 9 .. On Saturday, May 26, 2018 at 9:07:26 PM UTC-7, alex@gmail.com wrote: > > Have you not seen my post about joining a chat server? > Instead of waiting a day or so for each reply, people could reply > instantly and hold your hand through setting things up. >

Re: [go-nuts] Cross platform native(no dependencies) GUI options.

2018-05-27 Thread Tyler Compton
I did a bit more research and found https://github.com/BurntSushi/xgb which interacts with X directly without the need for C bindings, so it is possible to at least open a window without any cgo. However, I don't know of a way that you can have cross-platform accelerated graphics without using

Re: [go-nuts] Cross platform native(no dependencies) GUI options.

2018-05-27 Thread Wojciech S. Czarnecki
On Sun, 27 May 2018 14:57:34 -0700 (PDT) ati...@mail.ccsf.edu wrote: > I just do not want it to have cgo and it should be perfect. You may wait for the OS written entirely in Go then. With such one the "native" half of your ponywish ["native(no dependencies)"] will be real. The latter might

Re: [go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread Amnon Baron Cohen
No, just get rid of the clients map, and instead, just create a single global client. Http Clients are designed to be used by multiple goroutines. On Sun, May 27, 2018 at 4:33 PM, Tamás Gulácsi wrote: > Map is not concurrency safe, you have to synchronize access. For

[go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread Tamás Gulácsi
Copy golang.org/x/net/internal/socks (like github.com/tgulacsi/go/x-net-internal-socks) and use socks.NewDialer(...).DialContext instead of Dial. 2018. május 27., vasárnap 19:45:36 UTC+2 időpontban Vadim Lesich a következőt írta: > > I got suggestion use DialContext but proxy package not

[go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread Amnon Baron Cohen
As Tamas said, reuse the client. Just make the client into a global variable. On Sunday, 27 May 2018 11:29:47 UTC+1, Vadim Lesich wrote: > > Do you have an example? > > воскресенье, 27 мая 2018 г., 8:39:50 UTC+3 пользователь Tamás Gulácsi > написал: >> >> Just reuse the created http.Client. >

[go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread Tamás Gulácsi
var clients = make(map[string]*http.Client) func checkProxySOCKS(prox string, c chan QR, wg *sync.WaitGroup) (err error) { defer wg.Done() httpClient := clients[prox] if httpClient == nil{ dialer, err := proxy.SOCKS5("tcp", prox, nil, proxy.Direct) if err != nil { return

[go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread chuvak117
fatal error: concurrent map writes воскресенье, 27 мая 2018 г., 16:12:24 UTC+3 пользователь Tamás Gulácsi написал: > > var clients = make(map[string]*http.Client) > > func checkProxySOCKS(prox string, c chan QR, wg *sync.WaitGroup) (err > error) { > > defer wg.Done() > > httpClient :=

[go-nuts] Re: guru on Windows limits referrers to the same package

2018-05-27 Thread Torsten Uhlmann
This seems to be an open issue with Guru on Windows: https://github.com/golang/go/issues/23318 I've created a little proxy app that takes the guru call from VS Code and passes the arguments and stdin to the Linux version of guru installed in Windows WSL:

[go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread Tamás Gulácsi
Map is not concurrency safe, you have to synchronize access. For example with a sync.Mutex. -- 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

Re: [go-nuts] Re: http Transport dies too slowly

2018-05-27 Thread chuvak117
But i'm need to put new dialer every time, cause i'm checking different proxy воскресенье, 27 мая 2018 г., 19:06:04 UTC+3 пользователь Amnon Baron Cohen написал: > > No, just get rid of the clients map, and instead, just create a single > global client. > Http Clients are designed to be used