[go-nuts] Re: First tutorials for iranian users

2016-08-28 Thread Cool Boy
Thank you for giving incentives On Monday, August 29, 2016 at 9:04:03 AM UTC+4:30, Mahmoodreza Aarabi wrote: > > Hello > Thank you for your effort, it is so admirable, and it will help alot to > people who likes to work in the state of the art of programming languages. > keep going man. > :) > >

Re: [go-nuts] Re: Why can't convert []T to []T2 if T2 is a copy definition of T?

2016-08-28 Thread Dan Kortschak
Clarifying: I'm not asking a question. However, the explanation is a good one. It could form the basis for a FAQ answer. On Sun, 2016-08-28 at 22:40 -0700, Ian Lance Taylor wrote: > On Sun, Aug 28, 2016 at 12:41 AM, Dan Kortschak > wrote: > > > > This would have been a significantly shorter threa

Re: [go-nuts] Re: Why can't convert []T to []T2 if T2 is a copy definition of T?

2016-08-28 Thread Dan Kortschak
It seems to me that this comes up often enough that it satisfies the definition of a FAQ. I know that https://golang.org/doc/faq#convert_slice_of_interface is commonly pointed to as an explanation, but it is not entirely satisfactory since it is talking about the specific case of []T to []interface

Re: [go-nuts] Re: Why can't convert []T to []T2 if T2 is a copy definition of T?

2016-08-28 Thread Ian Lance Taylor
On Sun, Aug 28, 2016 at 3:36 AM, wrote: > > In fact T L's experience reminds me very much of probably my first > experience with go .. I had read the specification completely, and I thought > 'thoroughly' - then immediately tried this : > https://play.golang.org/p/or1Ikhr4en > > package main > >

Re: [go-nuts] Re: Why can't convert []T to []T2 if T2 is a copy definition of T?

2016-08-28 Thread Ian Lance Taylor
On Sun, Aug 28, 2016 at 12:41 AM, Dan Kortschak wrote: > > This would have been a significantly shorter thread if there had been a > clear explanation of the motivation behind slice conversion restrictions > early. This could have been after about the second (certainly by fourth) > post from TL wh

Re: [go-nuts] Re: Why can't convert []T to []T2 if T2 is a copy definition of T?

2016-08-28 Thread Ian Lance Taylor
On Sat, Aug 27, 2016 at 8:26 PM, T L wrote: > > On Sunday, August 28, 2016 at 11:00:53 AM UTC+8, Ian Lance Taylor wrote: >> >> On Sat, Aug 27, 2016 at 12:41 AM, T L wrote: >> > >> > I don't think an int64 value can be converted to an int value is for >> > they >> > have the same underlying type.

[go-nuts] Re: First tutorials for iranian users

2016-08-28 Thread Mahmoodreza Aarabi
Hello Thank you for your effort, it is so admirable, and it will help alot to people who likes to work in the state of the art of programming languages. keep going man. :) On Sunday, August 28, 2016 at 11:35:58 PM UTC+4:30, Cool Boy wrote: > > Hello gophers > After 5 years experience working with

[go-nuts] Performance Counters

2016-08-28 Thread Mark Richman
I'm relatively new to Go, coming from a Windows/.NET background primarily. Does the Go runtime itself offer performance counters similar to what Windows makes available via perfmon? Specifically, I'm looking to capture realtime (not via a dump) metrics on heap usage, thread counts, GC collectio

Re: [go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-28 Thread Jonathan Pittman
Klaus, thank you for your input and pointing us to RawSpeed. I glanced through it and noticed one of the approaches you take is to create decoders based on the "format" and use camera Make/Model tags to decide which decoder to use. I am glad to say this is also the approach I was taking and menti

[go-nuts] Re: enabling HTTP/2 clients with some TLS settings using only stdlib?

2016-08-28 Thread 'Jeff Hodges' via golang-nuts
Sample code: https://play.golang.org/p/6PZH13zqKH Which when run on your local machine, will error with: 2016/08/28 18:21:14 Get https://www.google.com: malformed HTTP response "\x00\x00\x18\x04\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00d\x00\x04\x00\x10\x00\x00\x00\x05\x00\x00@ \x00\x00\x06\x00\x0

[go-nuts] enabling HTTP/2 clients with some TLS settings using only stdlib?

2016-08-28 Thread 'Jeff Hodges' via golang-nuts
Hey, I've not been able to figure out how to enable HTTP/2 in a net/http client that needs some tls.Config settings in its Transport (like it's needs a specific root added at run time) using only the stdlib. Is there a way to enable HTTP/2 on clients in the stdlib that I've missed? (Related: I th

Re: [go-nuts] First tutorials for iranian users

2016-08-28 Thread Cool Boy
Hi Thanks a lot I accept and certify your talks Posts located on Daneshjooyar.com published by the management, which I thought very carefully written to attract iranian users However, in my opinion, you and other Gophers may seem illogical, but for most users will be attractive In any case, post

Re: [go-nuts] Re: ANNOUNCE: renderview

2016-08-28 Thread howardcshaw
Alright, gotk3 appears to be working properly now. I found the right function - I had found set_surface_pixbuf in the GTK3 docs, but thought it missing from the gotk3, until a helpful page pointed out that it was *not* a Cairo function, and took the Cairo context as a parameter instead. So, one

Re: [go-nuts] First tutorials for iranian users

2016-08-28 Thread Skip Tavakkolian
Hi Erfan, This is cool! I skimmed through the videos. I think the videos are great for students learning Go as their first language. I read the intro page, and I think your reasons for "a bright future for Go" are reasonable but somewhat subjective. I think it would be useful to include why Go

Re: [go-nuts] Re: ANNOUNCE: renderview

2016-08-28 Thread howardcshaw
I still have not tested on Windows; I did look up and find some documentation on how to get go and gtk installed and working together on Windows, and it basically boils down to installing the linux version of go under mingw. https://github.com/conformal/gotk3/wiki/Installing-on-Windows http://s

[go-nuts] First tutorials for iranian users

2016-08-28 Thread icoolboy0101
Hello gophers After 5 years experience working with Go, i decided to record educational videos for iranian users which can't learn go simply I'm an iranian and i know iranian users need to be trained In the past years, i didn't see any significant training for Go in iran, Actually nothing Now i

Re: [go-nuts] Length of Channel Using len Function

2016-08-28 Thread Klaus Post
On Sunday, 28 August 2016 17:33:10 UTC+2, Jan Mercl wrote: > > Using len(ch) like this in a concurrency scenario is a big no because then > the value you get carries 0 bits of useful information. It's not a data > race, it's worse, the race is semantic and not fixable without removing the > use

Re: [go-nuts] Length of Channel Using len Function

2016-08-28 Thread dc0d
Thanks for comments. The status00 should be not-buffered (status00 = make(chan *Data)); was rate limiting on two channels. On Sunday, August 28, 2016 at 8:16:50 PM UTC+4:30, Henrik Johansson wrote: > > The race is between the len call and the use of the channel. Entries can > have been added in

[go-nuts] Re: What's current status of the crypto/des package (performance-wise)?

2016-08-28 Thread mura
Here is a good news. The crypto/des package has some low-hanging-fruit optimizations that are worth trying. The results of the benchmark have being improved to an extent (I tested it on AMD64 though): > Old BenchmarkEncrypt-4 200 852 ns/op 9.38 MB/s Benchmar

Re: [go-nuts] What's current status of the crypto/des package (performance-wise)?

2016-08-28 Thread mura
Interesting. Thanks for sharing. I used to confront with a similar scenario in the C world, where we had to use *sched_setscheduler(2) *to prevent the OS scheduler from interfering with our application, which requires a below ~50ms variation IIRC. Yeah, it happened even though the application w

Re: [go-nuts] Length of Channel Using len Function

2016-08-28 Thread Henrik Johansson
The race is between the len call and the use of the channel. Entries can have been added in between. On Sun, Aug 28, 2016, 17:40 dc0d wrote: > Would you please elaborate on that? > > As I understand it there is no concurrent use of len happening here. It's > a for loop and all calling to len is

Re: [go-nuts] Length of Channel Using len Function

2016-08-28 Thread Dave Cheney
TLDR; channels, like maps, are references to the a data structure stored elsewhere. Calling Len on either returns the length of the data stored in the underlying channel. This is different to a slice, which is a three word value, containing it's own Len and cap values. As Jan notes, Len(ch) is

Re: [go-nuts] Length of Channel Using len Function

2016-08-28 Thread dc0d
Would you please elaborate on that? As I understand it there is no concurrent use of len happening here. It's a for loop and all calling to len is happening sequentially. Unless the channels make the code inside cases of one select statement concurrent - which will be super confusing for me. O

Re: [go-nuts] Length of Channel Using len Function

2016-08-28 Thread Jan Mercl
Using len(ch) like this in a concurrency scenario is a big no because then the value you get carries 0 bits of useful information. It's not a data race, it's worse, the race is semantic and not fixable without removing the use of len(ch). On Sun, Aug 28, 2016, 17:26 dc0d wrote: > TL;DR > > Does

[go-nuts] Length of Channel Using len Function

2016-08-28 Thread dc0d
TL;DR Does assigning a (buffered) channel, already in a variable, to a second variable, affects the result of len function? Long version: What is happening here? - Code at the end; Go 1.7. *Output 1*: Nine times: [ info ] 2016/08/28 19:51:28 LEN_BEFORE=0 [

Re: [go-nuts] trouble running "git-codereview mail"

2016-08-28 Thread radu
For what its worth, I was able to authenticate by using the cookie as the username and password (username is the part before the "=" password is the part after). On Saturday, August 27, 2016 at 10:56:04 PM UTC-4, Ian Lance Taylor wrote: > > On Sat, Aug 27, 2016 at 10:49 AM, > > wrote: > > >

[go-nuts] Re: Why can't convert []T to []T2 if T2 is a copy definition of T?

2016-08-28 Thread xiiophen
agree with Korshak above In fact T L's experience reminds me very much of probably my first experience with go .. I had read the specification completely, and I thought 'thoroughly' - then immediately tried this : https://play.golang.org/p/or1Ikhr4en package main import ( "fmt" ) func main()

Re: [go-nuts] Re: Why can't convert []T to []T2 if T2 is a copy definition of T?

2016-08-28 Thread Dan Kortschak
I think that your original interpretation of TL's questions is the correct one, and the one that I read when I read all of this posts. I don't think that it's a fair characterisation that he is asking about possibility rather that design, even in the post that this was a reply to. I can understand