The autogenerated miranda method only happens if you are calling through an
interface method that is provided by an embedded type. If you're doing
something like
func log(...) {
pc := runtime.Callers(1) // get the caller of log
}
It shouldn't be a problem.
On Monday, 15 August 2016 14:42:1
Can I rely on "" not changing?
On Sun, Aug 14, 2016 at 9:55 PM, Ian Lance Taylor wrote:
> On Sun, Aug 14, 2016 at 9:41 PM, Tim Hockin wrote:
>> On Sun, Aug 14, 2016 at 8:31 PM, Ian Lance Taylor wrote:
>>> On Sun, Aug 14, 2016 at 3:33 PM, Tim Hockin wrote:
Edit: It looks like this has mor
On Sun, Aug 14, 2016 at 9:41 PM, Tim Hockin wrote:
> On Sun, Aug 14, 2016 at 8:31 PM, Ian Lance Taylor wrote:
>> On Sun, Aug 14, 2016 at 3:33 PM, Tim Hockin wrote:
>>> Edit: It looks like this has more to do with being an interface
>>> method than an embedded type.
>>>
>>> https://play.golang.o
On Sun, Aug 14, 2016 at 8:31 PM, Ian Lance Taylor wrote:
> On Sun, Aug 14, 2016 at 3:33 PM, Tim Hockin wrote:
>> Edit: It looks like this has more to do with being an interface
>> method than an embedded type.
>>
>> https://play.golang.org/p/I5XPdWR_O0
>
> Hmmm, you're right. It only happens fo
Thank you. It's still not clear if we're talking about the same thing, can
you please do one of the following and post the complete output
go install -toolexec="/usr/bin/time -f '%U %S %C'" $PACKAGE #linux
go install -toolexec="/usr/bin/time" $PACKAGE #osx
On Monday, 15 August 2016 13:40:16 UTC
Compile time:
real 0m7.440s
user 0m8.109s
sys 0m0.563s
Link time:
real 0m10.331s
user 0m7.255s
sys 0m1.254s
On Friday, August 12, 2016 at 5:08:04 PM UTC-7, Dave Cheney wrote:
>
> Thank you for this information. There is no timing information.
>
> On Saturday, 13 August 2016 08:01:
Please file a bug.
--
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.
For more options, visit https://groups.google.com/d/
On Sun, Aug 14, 2016 at 3:33 PM, Tim Hockin wrote:
> Edit: It looks like this has more to do with being an interface
> method than an embedded type.
>
> https://play.golang.org/p/I5XPdWR_O0
Hmmm, you're right. It only happens for a value method.
> Is there a generic way to get the caller safel
On Sun, Aug 14, 2016 at 2:49 PM, Nigel Tao wrote:
> On Aug 15, 2016 05:21, "Ian Lance Taylor" wrote:
>> If these approaches seem awkward, I suppose you could get
>> syscall(syscall.GETCPU, ...) when you want to increment a counter.
>
> That still seems racy:
>
> n := syscall(syscall.GETCPU, ...)
Hi all,
I've found a reproducible crash of gomobile on iOS 10 using 1.7 rc6 (this
isn't the time system call issue).
I'm happy to submit a detailed bug report, but I wasn't sure if this issue
already being tracked, and didn't want to duplicate another bug.
Short description: a framework gener
Here is a list, https://github.com/golang/go/wiki/GoUsers
--
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.
For more optio
I love it!
On Sun, Aug 14, 2016 at 7:01 PM Kevin Malachowski
wrote:
> I do!
>
> --
> 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...@goo
I do!
--
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.
For more options, visit https://groups.google.com/d/optout.
Hello Everyone,
I'm preparing a list of people / companies that use Go and *really like Go*.
The plan is to present this to a large crowd of undergraduate students (and
others).
So, suggestions are very welcome!
Many thanks.
Dorival
--
You received this message because you are subscribed to
could something like this help; https://play.golang.org/p/9tbiUY1w0d
On Friday, 12 August 2016 19:41:26 UTC+1, Vasily Korytov wrote:
>
> Hi,
>
> I have an interface{} variable that can be either string or a list of
> string (yes, that's bad design, I know).
>
> I need a []string to feed it to st
Edit: It looks like this has more to do with being an interface
method than an embedded type.
https://play.golang.org/p/I5XPdWR_O0
Is there a generic way to get the caller safely, or should I just
check for and increment?
On Sun, Aug 14, 2016 at 3:02 PM, Tim Hockin wrote:
> It is, in fact, a
Hello Gaurav.
You might want to look at Jon Gjengset's project:
https://github.com/jonhoo/drwmutex
Also, I seem to recall Dmitry saying that sync.Pool distributes locking. So it
might be worth looking into.
Another type of lock which might be of interest is MCS (or K42, CLH, HCLH).
John
It is, in fact, a method on an embedded type. That means I can document it
and it ceases to be a magic number! Thanks.
On Aug 14, 2016 12:27 PM, "Ian Lance Taylor" wrote:
> On Sun, Aug 14, 2016 at 11:10 AM, 'Tim Hockin' via golang-nuts
> wrote:
> > I was playing with a method that wants to pr
On Aug 15, 2016 05:21, "Ian Lance Taylor" wrote:
> If these approaches seem awkward, I suppose you could get
> syscall(syscall.GETCPU, ...) when you want to increment a counter.
That still seems racy:
n := syscall(syscall.GETCPU, ...)
// The goroutine could be re-scheduled here to another CPU, b
Gcfg reads "INI-style" text-based configuration files with "name=value"
pairs grouped into sections (gcfg files).
A lot has been happening to gcfg since my previous announcement. Most
notably, the project has moved from Google Code:
gopkg.in/gcfg.v1
https://godoc.org/gopkg.in/gcfg.v1
https://gi
On Sun, Aug 14, 2016 at 11:10 AM, 'Tim Hockin' via golang-nuts
wrote:
> I was playing with a method that wants to print the file:line of the
> caller. `runtime.Caller(1)` seems like it should do the trick, but I
> get ':2'. If I call `runtime.Caller(2)` instead it
> seems to work, but I don't kn
On Sun, Aug 14, 2016 at 9:58 AM, Gaurav Agarwal
wrote:
> Ian, thanks for the explanation and the link !
>
> But I am still unclear how to implement such a concurrent counter in Go -
> given that we can't find out what thread/cpu is the goroutine executing.
> Note that in this case there was never
https://github.com/dontpanic92/wxGo
--
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.
For more options, visit https://gro
On Friday, August 12, 2016 at 5:31:07 PM UTC-4, Anmol Sethi wrote:
>
> Keyed fields seem to be always better than unkeyed fields in a composite
> literal.
> Under what circumstances would I want to use unkeyed fields?
When it's useful for writing code that is easier to read and comprehend.
T
I was playing with a method that wants to print the file:line of the
caller. `runtime.Caller(1)` seems like it should do the trick, but I
get ':2'. If I call `runtime.Caller(2)` instead it
seems to work, but I don't know why, so I am reluctant to depend on
that.
Can anyone enlighten me? How can
Ian, thanks for the explanation and the link !
But I am still unclear how to implement such a concurrent counter in Go -
given that we can't find out what thread/cpu is the goroutine executing.
Note that in this case there was never the need of pinning a goroutine to a
thread or cpu; just that we
On Sun, Aug 14, 2016 at 2:25 AM, gaurav wrote:
>
> How do I get to know the Thread (or CpuCore) id on which the goroutine is
> running?
Go does not expose this information. In Go it's also unreliable
because the language makes no guarantees about when a goroutine may
move from one thread, or CPU
With the struct, the data can be modified outside of the inc() method, ie
ps.i++ or ps.i--, ... it is much more flexible than a closure. But if the
data is critical, the closure is much more secure, only one function can
change the data. I hope this helps.
On Friday, August 12, 2016 at 5:14:0
On Saturday, 13 August 2016 23:21:31 UTC+2, Paul wrote:
>
>
> I was not even aware of Rawspeed. I do use Darktable, however there is
> quite some discussion going on as to the quality of the images that
> opensource raw converters produce. Adobe seems to still be king of that
> hill. [...]
>
Im
Hi there,
Just for heck of it - I am trying to come up with a ConcurrentCounter that
does not suffer memory sharing or the cost of mutex lock/unlock.
The idea as described in the following Java code snippet is quite
straightforward:
- Pin every thread to a unique int32 variable.
- Put th
30 matches
Mail list logo