Hi Bryan
But the returned uintptr from syscall is as far as i know a pointer to a
struct which has been created by the C API, so go runtime won't touch it or
do I miss something?
Am Freitag, 15. Dezember 2017 00:48:51 UTC+1 schrieb Bryan Mills:
>
> In this case, the vet tool is correct if you'r
Forwarding to the mailing list this time.
Cheers.
On Dec 14, 2017 18:14, "Ivan Borshukov" wrote:
Ok, thanks.
If so, I want to announce the change that I've maid. It is regarding the
rate limiting section [0].
The wiki page states that when the created ticker is Stop-ed, the created
goroutine
API Address:https://msdn.microsoft.com/en-us/library/ms706716(VS.85).aspx
Code:
package main
// #define WIN32_LEAN_AND_MEAN
// #include
import (
"fmt"
"syscall"
"unsafe"
"C"
)
var (
wlankernal,_ = syscall.LoadLibrary("Wlanapi.dll")
wlanhandle,_ = syscall.GetProcAddress(wlanke
I'm writing a utility to import/export data into an API. I'd like to be
able to accept multiple input/output formats, and support multiple
commands. I was going to use kingpin for the flags/commands, and do a type
format after that.
My plan was to declare an interface with the methods I'm going
On Fri, Dec 15, 2017 at 11:08 AM, Ivan Kurnosov wrote:
> Jesse,
>
> what you quoted is an optimisation for the "Otherwise, the value passed is a
> new slice of type []T with a new underlying array whose successive elements
> ".
>
> Your quote says: if the final argument is assignable - it may be p
Jesse,
what you quoted is an optimisation for the "Otherwise, the value passed is
a new slice of type []T with a new underlying array whose successive
elements ".
Your quote says: if the final argument is assignable - it may be passed as
is, without any copy involving.
On 15 December 2017 at 12
On Fri, Dec 15, 2017 at 8:18 AM, Ivan Kurnosov wrote:
> Why does this code not compile: https://play.golang.org/p/f5fMvO8Ns7
> func f(items ...interface{}) {
> fmt.Println(items)
> }
The spec also says:
"If the final argument is assignable to a slice type []T, it may be
passed unchanged as the
In this case, the vet tool is correct if you're making the syscall with
Go-allocated memory.
The Go runtime is allowed to move values around: the address of a Go
variable is only pinned for the duration of the syscall itself.
If you've got C-allocated memory (or statically-allocated
memory), ht
Why does this code not compile: https://play.golang.org/p/f5fMvO8Ns7
package main
import (
"fmt"
)
func f(items ...interface{}) {
fmt.Println(items)
}
func main() {
f("a", "b", "c")
tab := []interface{}{"d"}
f("a", "b", "c", tab...)
}
The spec says:
> Otherwise, the value passed is a
It depends a lot on what your application does, but I’d try the trace tool,
which should give you execution times of your request and you see its
interactions with the garbage collector. For reasonable allocation rates you
may find that the gc can collect in the background and not introduce add
On Thu, Dec 14, 2017 at 5:05 PM Ivan Borshukov wrote:
> I've noticed that I'm able to edit the wiki pages on
https://github.com/golang/go/wiki and I wonder whether this is intentional.
IINM, it's like that from the beginning of the Github repository, so
probably intentional.
--
-j
--
You re
Hello,
I've noticed that I'm able to edit the wiki pages
on https://github.com/golang/go/wiki and I wonder whether this is
intentional.
Cheers,
Ivan
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop recei
AddressList doesn't seem to like it when the email name is encoded in RFC
2047 and enclosed in quotes.
e.g. "=?UTF-8?Q?Charles=20Schwab=20=26=20Co=2E=2C=20Inc=2E?="
Any plan to fix it?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsub
IMHO //go:generate ... tasks inside a file marked by // +build ignore
should run. Any file that is marked by // +build ignore will be ignored by
the compiler. So your code (by putting // +build ignore inside main.go)
will generate a compilation error.
On Thursday, December 14, 2017 at 2:41:47 P
Yeah, I copied the go/token style there. However, thanks Nigel -- I didn't
realize you could do "renaming imports", that's nice. -Ben
On Thu, Dec 14, 2017 at 4:35 AM, Jan Mercl <0xj...@gmail.com> wrote:
> On Thu, Dec 14, 2017 at 6:27 AM Nigel Tao wrote:
>
> > As per https://golang.org/doc/effect
2017-12-14 9:28 GMT+03:00 Dave Cheney :
> Does your profiling suggest these allocations are causing latency?
>
Hmm this is missing part =). How can i understand what causing latency
if i use http prof?
--
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
--
You received this message because you are
On Thu, Dec 14, 2017 at 11:53 AM dc0d wrote:
> What is the reasoning for not executing //go:generate ... comments inside
a file, that is excluded from build by // +build ignore?
'ignore' is just a tag like any other:
$ cat main.go
// +build ignore
//go:generate echo foo
package main
func mai
What is the reasoning for not executing //go:generate ... comments inside a
file, that is excluded from build by // +build ignore?
--
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,
Okay I found a way, this seems to work:
ca := (*[100]byte) (unsafe.Pointer(certctx.pbCertEncoded))[:certctx.
cbCertEncoded]
or
mm := make([]byte, certctx.cbCertEncoded)
for i := uint32(0) ; i < certctx.cbCertEncoded; i++ {
mm[i] = *((*byte)(unsafe.Pointer(certctx.pbCertEncoded +
On Thu, Dec 14, 2017 at 6:27 AM Nigel Tao wrote:
> As per https://golang.org/doc/effective_go.html#mixed-caps ALL_CAPS
> names are unusual Go style.
They are, but token names are often/traditionally all caps and underscores:
https://golang.org/pkg/go/token/#Token - in the old lex style. And it h
Hi Miki
I'm using syscall package and no C import, but maybe it is possible to use
this function as well?
Am Donnerstag, 14. Dezember 2017 09:18:26 UTC+1 schrieb Miki Tebeka:
>
> Do you mean
>
> func C.GoBytes(unsafe.Pointer, C.int) []byte
>
> ?
>
> On Thursday, December 14, 2017 at 9:05:32 AM
Are you talking about https://pythonhosted.org/Pyro4/ ?
It really depends on the serialization format used. If it's json, msgpack
or any other language independent format that you can do it. If it's Python
specific (marshal, pickle, ...) then you can probably invoke some python
code to convert
Do you mean
func C.GoBytes(unsafe.Pointer, C.int) []byte
?
On Thursday, December 14, 2017 at 9:05:32 AM UTC+2, snmed wrote:
>
> Hi all
>
> I'm trying to map a C structure to an equivalent go struct, but I bumped
> into a problem with a pointer to byte that is actually an array of bytes.
>
> He
23 matches
Mail list logo