Re: [go-nuts] Re: Option to disable version validation in 1.13?

2019-09-04 Thread Steven Hartland
Yer replace is mentioned in the link I provided too and I’d seen that thread, but as you can see from the amount of effort required I would suggest that it’s currently not practical to have everyone go through that process; particularly for tools when they just want to install and use not develop

Re: [go-nuts] An old problem: lack of priority select cases

2019-09-04 Thread Leo Lara
I agree mostly with T L, and I say in the article in the section "Testing for race conditions" https://dev.to/leolara/closing-a-go-channel-written-by-several-goroutines-52j2 . The race detector will detect race conditions if they happen during the execution of the tests. But, as they are race

Re: [go-nuts] An old problem: lack of priority select cases

2019-09-04 Thread Leo Lara
You should read up on how a RWLock works. > I am not going to answer to that ;-) About this code: https://play.golang.org/p/YOwuYFiqtlf 1. I wouldn't say that there are several goroutines writing, as there are several goroutines block in a mutex. Some might find this not important,

Re: [go-nuts] An old problem: lack of priority select cases

2019-09-04 Thread Robert Engels
As for the readers being aware of a lock, that is not true either, as the lock is hidden by encapsulation. (The last and best version doesn’t even need the lock on the readers) > On Sep 4, 2019, at 4:55 AM, Leo Lara wrote: > > > >> You should read up on how a RWLock works. > > I am not

Re: [go-nuts] Re: An old problem: lack of priority select cases

2019-09-04 Thread Leo Lara
Hi Marcin, I think https://play.golang.org/p/RiKi1PGVSvF is basically what I do with atomic operations in my blog post https://dev.to/leolara/closing-a-go-channel-written-by-several-goroutines-52j2 in the section "Some experiments", and then using the wait group as I say later in the section

Re: [go-nuts] An old problem: lack of priority select cases

2019-09-04 Thread Robert Engels
I will repeat this - and I meant no offense. You should read up on RWLocks because your criticism is incorrect. Multiple Go readers can hold the Read lock at the same time - so there are multiple writers adding to the channel concurrently (but the channel impl uses a lock, so it’s not strictly

[go-nuts] ticker not firing often enough in minimal mac app with run loop

2019-09-04 Thread Tor Langballe
I'm running a mac cocoa event loop, and calling a go ticker: void StartApp() { [NSAutoreleasePool new]; [NSApplication sharedApplication]; [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; [NSApp run]; } func test() { last := time.Now() ticker :=

[go-nuts] how to query mysql hexadecimal value

2019-09-04 Thread afriyie . abraham
I have tried to query mysql database table data but am getting the byte data after trying many instances to convert the byte data to the hexadecimal values. Any help about how can i get the hexadecimal values from the database. I created the table below as CREATE TABLE

Re: [go-nuts] Re: An old problem: lack of priority select cases

2019-09-04 Thread Leo Lara
Hi Jasper, Do you have some literature with that use. I honestly have googled:

Re: [go-nuts] An old problem: lack of priority select cases

2019-09-04 Thread Robert Engels
No, please review this: https://play.golang.org/p/sPWrNhzRXKz There is no need to use the lock in Read()Encapsulation in this case means, the user of MultiWriterIntChan does not know it uses locks behind the scenes, nor does it need to know.Due to limitations of the playground, the code referenced

Re: [go-nuts] ticker not firing often enough in minimal mac app with run loop

2019-09-04 Thread Marcin Romaszewicz
I'm not quite sure how to avoid this, but I'm pretty sure that I know the cause. Read up on Grand Central Dispatch and Centralized Task Scheduling ( https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/DiscretionaryTasks.html). It's been

Re: [go-nuts] ticker not firing often enough in minimal mac app with run loop

2019-09-04 Thread Gregory Pomerantz
currenly just running the go program from the terminal, though I got similar results packaging it into an app. I soon get very long periods between ticker fires: Tick slow: 3.501350114s Tick slow: 5.551485377s I am seeing the same thing (Late 2012 13" MacBook Pro Retina). My first guess

Re: [go-nuts] How to query mysql hexadecimal data

2019-09-04 Thread burak serdar
On Wed, Sep 4, 2019 at 6:41 AM wrote: > > > I have tried to query mysql database table data but am getting the byte data > after trying many instances to convert the byte data to the hexadecimal > values. Any help about how can i get the hexadecimal values from the database. > > I created the

Re: [go-nuts] How to query mysql hexadecimal data

2019-09-04 Thread afriyie . abraham
Hi hex.EncodeString works! The problem was the struct field types ([]byte) instead of string. Thanks! On Wednesday, September 4, 2019 at 4:49:46 PM UTC+3, burak serdar wrote: > > On Wed, Sep 4, 2019 at 6:41 AM > > wrote: > > > > > > I have tried to query mysql database table data but am

Re: [go-nuts] An old problem: lack of priority select cases

2019-09-04 Thread Leo Lara
By encapsulation? Are you talking about https://play.golang.org/p/YOwuYFiqtlf or other version of the code? As I think someone already said, there is a need in the method Read for a lock. And the read from the channel is done from that method. With your pattern, the user of the hypothetical

[go-nuts] How to query mysql hexadecimal data

2019-09-04 Thread abraham . afriyie
I have tried to query mysql database table data but am getting the byte data after trying many instances to convert the byte data to the hexadecimal values. Any help about how can i get the hexadecimal values from the database. I created the table below as CREATE TABLE

Re: [go-nuts] ticker not firing often enough in minimal mac app with run loop

2019-09-04 Thread Gregory Pomerantz
On 9/4/19 2:30 PM, Gregory Pomerantz wrote: currenly just running the go program from the terminal, though I got similar results packaging it into an app. I soon get very long periods between ticker fires: Tick slow: 3.501350114s Tick slow: 5.551485377s I am seeing the same thing (Late

[go-nuts] Re: [ANN] Gio: portable immediate mode GUI programs in Go for iOS/tvOS, Android, macOS, Linux, Windows

2019-09-04 Thread Nuclear Squid!!
Hi, I wanted to try gio this week, and after a lot of work getting kde-plasma v5.14.3 working on Wayland (Funtoo x86_64), I now have hit the same issue here: https://git.sr.ht/~eliasnaur/gio/tree/master/ui/app/os_wayland.go#L1134 "wayland: no xdg_wm_base available" I'm a newbie to Wayland --

[go-nuts] How to update a module's direct dependencies only

2019-09-04 Thread mihaibopublic
Hello, I am looking for a way to regularly update my Go module's direct dependencies. Without specifying indirect dependencies myself: let my direct dependencies specify what they need in their own go.mod. After reading relevant documentation, I could only come up with this partial

[go-nuts] Re: How to update a module's direct dependencies only

2019-09-04 Thread t hepudds
Hello Mihai, To upgrade your direct dependencies to their latest release (with your indirect dependencies using versions selected based on the requirements of your direct dependencies), this should work in most cases: go get $(go list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m

[go-nuts] Re: Go module and local dependencies

2019-09-04 Thread t hepudds
Hello Guillaume, I haven't had a chance to look at your example closely, but it seems you have two modules defined on your local filesystem, with two go.mod files total. If that is what you are trying to do, one approach is to use a `replace` directive to let one module know about the on-disk