..which is working like a charm.
Thanks a lot again,
Le vendredi 24 juillet 2020 à 22:54:33 UTC+2, Vincent Jouglard a écrit :
> Hi John,
>
> Thanks for your message.
> The main difference with my implementation is that I use a service account
> which is authorized to send messages on
Hi John,
Thanks for your message.
The main difference with my implementation is that I use a service account
which is authorized to send messages on my behalf...and I think that this is
where lies the problem.
As i understand OAuth and the implementation from your exemple, a token is
generated
ption.
WithCredentialsFile("credentials.json"), option.WithScopes(
"https://mail.google.com/";, "https://www.googleapis.com/auth/gmail.modify";,
"https://www.googleapis.com/auth/gmail.compose";,
"https://www.googleapis.com/auth/gmail.send";))
if err
2020 07:52:03 UTC+4, Ian Lance Taylor a écrit :
>
> On Tue, Apr 28, 2020 at 10:49 PM Vincent Blanchon
> > wrote:
> >
> > I'm building a simple program that has a dependency to
> github.com/DataDog/zstd, a wrapper of a C code.
> > So by default, Go will u
Hello,
I'm building a simple program that has a dependency to
github.com/DataDog/zstd, a wrapper of a C code.
So by default, Go will use the external linker. When debugging with, I can
see
host link: "clang" "-m64" "-Wl,-headerpad,1144" "-Wl,-no_pie"
"-Wl,-pagezero_size,400" "-o"
"/var/fo
Hi everyone,
>From what I understand, timers are ran by:
- the P holding them
- other P if timer-stealing happen (thanks to the async preemption that
should not happen often)
- sysmon thread that, periodically, check if some timers have to run
But, in the comments of the code, I have seen this s
Thank you Ian!
Le mercredi 18 mars 2020 23:20:15 UTC+4, Ian Lance Taylor a écrit :
>
> On Wed, Mar 18, 2020 at 9:33 AM Vincent Blanchon
> > wrote:
> >
> > In this proposal
> https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md,
Hi all,
In this
proposal
https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md,
it is mentioned past-the-end pointer and the fact it should be avoided. My
assumption is that it could lead to a bad memory tracking/cleaning since
the write barriers keep trac
Yes, definitely, good point.
Both are them are good depending on the case actually.
Le mardi 18 février 2020 16:55:02 UTC+4, Jan Mercl a écrit :
>
> On Tue, Feb 18, 2020 at 1:47 PM Vincent Blanchon
> > wrote:
>
> > However, in real code, I guess we will have that many con
With 100 constants:
Stringer-4 4.96ns ± 0%
StringerWithSwitch-4 4.99ns ± 1%
StringerWithMap-4 30.40ns ± 0%
The gap between the switch and the current implement is much smaller. I
guess it is due to the number of JMP instructions the code has to go
through.
It confirms that
n "Ibuprofen"
case 3: return "Paracetamol"
default: return "Pill(" + strconv.FormatInt(int64(i), 10) + ")"
}
}
Le mardi 18 février 2020 14:06:14 UTC+4, Jan Mercl a écrit :
>
> On Tue, Feb 18, 2020 at 10:37 AM Vincent Blanchon
> &
has not been rerun since.
> The const/slice implementation allows for that (useful!) check.
>
>
> Le mardi 18 février 2020 07:42:41 UTC+1, Vincent Blanchon a écrit :
>>
>> Hello,
>>
>> I was wondering why the stringer command has been implemented that way:
>>
&g
Hello,
I was wondering why the stringer command has been implemented that way:
const _Pill_name = "PlaceboAspirinIbuprofen"
var _Pill_index = [...]uint8{0, 7, 14, 23}
func (i Pill) String() string {
if i < 0 || i >= Pill(len(_Pill_index)-1) {
return "Pill(" + strconv.FormatInt(int64(i)
I got it, Thank you Ian!
Le jeudi 2 janvier 2020 07:36:39 UTC+4, Ian Lance Taylor a écrit :
>
> On Wed, Jan 1, 2020 at 7:25 PM Vincent Blanchon
> > wrote:
> >
> > Here is a loop in Go: https://play.golang.org/p/G4wdLi26LZ4
> > With looking at the assembly, I
Hi,
Here is a loop in Go: https://play.golang.org/p/G4wdLi26LZ4
With looking at the assembly, I can see that the loop counter uses *AX*
register while the total (t) use *the CX* register:
0x004c 00076 (main.go:7) INCQ AX
0x004f 00079 (main.go:8) ADDQ DX, CX
I have a basic knowledge of assembly,
active thread accounting" is accurate in the OS, I dont see
> any reason to set it higher. I think it is easy to test >HWthreads effects
> with a concurrent cpu-intensive job.
>
> On Wednesday, December 4, 2019 at 8:24:13 PM UTC+3, Vincent Blanchon wrote:
>>
>> Hell
Hello,
I've read on GitHub
(https://github.com/golang/go/issues/20303#issuecomment-329418911) "there
are good reasons" to set GOMAXPROCS to > num CPU.
Just out of curiosity, I want to know if someone has an example of it or
any good reason to set it up more than the number of CPUs?
Thanks
--
Hello,
I was wondering about the behavior of syscalls. It looks like Go always
wraps syscall - whatever blocking or not - with calling entersyscallblock()
and exitsyscall() later. The first one automatically detaches M from the P
when exit tries to acquire the same P or move the G to the glob
Thank you, Ian! With the CL it is much more clear now
Le mardi 5 novembre 2019 02:27:00 UTC+4, Ian Lance Taylor a écrit :
>
> On Sat, Nov 2, 2019 at 4:58 AM Vincent Blanchon
> > wrote:
> >
> > Reading the code, I can see the structs m and p hold a mcache ins
Hello,
Reading the code, I can see the structs m and p hold a mcache instance. I'm
curious to understand why both of them need an instance of mcache?
Also, I see that those instances are the same ones (runtime/proc.go init
the p.mcache with m.cache and vice versa), is it correct? Should we
cons
That's interesting, thanks for sharing.
Also interested to know if someone got results with a similar approach.
>
--
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
Hi,
I was wondering what problem *gcTriggerTime* is supposed to solve? Why
does the language need to force the GC every two minutes if it did not run?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
Hi,
The documentation of the profiling
(https://blog.golang.org/profiling-go-programs) explains that: "Go program
stops about 100 times per second".
However, in the code, I could see that the collector has a sleep of 100ms
https://github.com/golang/go/blob/master/src/runtime/pprof/pprof.go#L779
usage of two different syntax tree was a bit confusing.
Hope this helps
Yes, a lot. Thanks again!
Le mardi 3 septembre 2019 17:54:38 UTC+4, Ian Lance Taylor a écrit :
>
> On Tue, Sep 3, 2019 at 6:23 AM Vincent Blanchon
> wrote:
> >
> > The compiler documentation men
Hi all,
The compiler documentation mentions a syntax tree in the parsing phase when
the AST transformation phase mentions a conversion from the syntax tree to
the compiler's AST representation.
If I do not misunderstand, the command "*go tool compile -W" *will display
the AST.
I was wondering
When using net/http ProxyFromEnvironment to specify proxy using HTTP_PROXY
environment variable, there is a special case to prevent use of a proxy
when connecting to a localhost or 127.0.0.1 service.
Using a debugging proxy with local services is a common practice, and it
was surprising to fin
Thanks, that explains it.
On Fri, Dec 22, 2017, at 6:28 PM, Volker Dobler wrote:
> See https://golang.org/doc/faq#nil_error
>
> V.
>
> On Friday, 22 December 2017 17:37:40 UTC+1, Vincent Rischmann wrote:>> Hello,
>>
>> while refactoring some code I encoun
Hello,
while refactoring some code I encountered something strange regarding
redeclarations.
Here is an example: https://play.golang.org/p/b7Bp2w2fWwk
Somehow after redeclaring err when calling doIt, err is apparently not nil,
yet the functions never return anything other than nil.
If I use a
Hi ascarter,
This sounds like a great way to do it (even if I don't totally understand
how it works, you gave me homework :D ), but, as I understand it, this
would'nt work on slices ; i.e. []Player . Or I am mistaken ?
Moreover, the regular rule is that the CustomField is not sent and the
except
(player Player) Frontend() Player {
> player.CustomField = ""
> return player
> }
>
> On Wednesday, 6 September 2017 00:36:56 UTC+3, Vincent Jouglard wrote:
>>
>> Hi guys,
>>
>> I would like to have fields in a custom type that :
>> - are not
Hi guys,
I would like to have fields in a custom type that :
- are not exported when I mashall them (to send to front)
- are imported when I decode them (from the from)
This is the type :
type Player struct {
Id bson.ObjectId `json:"id,omitempty" bson:"_id,omitempty"`
CustomField stri
go installation is fine, works properly for lost of packages
But for this one application go install seems to do nothing and gives no
warnings/messages or any output at all
The packages can be built with build command and produce proper
executables.
Is the install command running some tests
Hi,
I'm on Windows, I had Go 1.7.4 installed from the MSI installer. Today I
decided to upgrade to Go 1.8, so I downloaded the new MSI, ran it and
that was it.
However, first package I tried to install I got the following errors:
G:\Gopath\src\github.com\google> go get -u -v github.com/vris
Thanks for the responses.
I took a look at the generated code and go-bindata does in fact use the
form "var _data = []byte(`my giant string`)".
But there's something strange happening: I can't reproduce the problem
on my Macbook Pro. It compiles just fine here.
On Mon, Jan 9, 2017, at 12:5
Hi,
so I was trying to embed JS and HTML assets in a Go file using go-bindata
and ended up with a Go file of 4Mib, and I noticed compiling it consumes
all my system's memory.
I'm on Windows and using the resource monitor I can see compile.exe memory
usage grow to more than 15Gib in a couple of
ed to change the
> underlying type of bson.ObjectID to [12]byte instead. This would still work
> as a map key and would cause json.Marshaller to use the MarshalText method,
> giving you the results you were looking for automatically.
>
> On Thu, Dec 22, 2016 at 8:20 AM Vincent Jou
Hi Jon,
Thanks for the explanation ; i already used strings as indexes to make this
work; but I was wondering if I was doing something wrong :)
Still, I wonder if this behavior is wanted and if so, why that ?
Regards,
--
You received this message because you are subscribed to the Google Group
Hi,
I am sending a map of elements indexed by a bson.ObjecId(), coming from the
bdd.
type Stats struct {
A bson.ObjectId `json:"a,omitempty" bson:"a,omitempty"`
B map[bson.ObjectId]CustomType `json:"b,omitempty" bson:"b,omitempty"`
}
// t is of type Stats
if err = c.Write
> It's a wretched hive of scum and villainy. The Go subreddit was the only
> thing similar to human and it is downright painful most of the time.
Way to go insulting everyone on Reddit. I'm neither scum or a "villain".
I also spend a lot of time on /r/golang and it's nowhere near painful, I
have
anks!
Note I don't need military grade security, but secure enough to defer the
most attempt to steal the email password
Thanks
Vincent
--
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.
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
41 matches
Mail list logo