Re: [go-nuts] Passing []byte from golang to char * C.

2017-06-14 Thread Aditi Bhiwaniwala
the error occur because there is 0 in my byte array . Do i need to encode
it then?

On Wed, Jun 14, 2017 at 9:16 PM, andrey mirtchovski 
wrote:

> can you show us a complete example with a stub C function? in
> particular the conversion to (*C.char) from unsafe.Pointer([0])
> should work. compare the first four bits at that address with the
> first four bits you're receiving on the C side. they should be
> identical. e.g.: https://play.golang.org/p/sqP12_nJNF
>
> On Wed, Jun 14, 2017 at 7:54 AM,   wrote:
> > I have a byte array of image in golang , i have to pass this array to my
> C
> > function as char* . I did he following ,
> >  data, err := ioutil.ReadAll(out.Body)
> >  str := fmt.Sprintf("%s",data)
> >  s:=C.main1(C.CString(str))
> >  s:=C.main1((*C.char)(unsafe.Pointer([0])))
> > but both the technique doesn't work. All i m receiving in my C function
> is
> > some garbage value of length 4.
> >
> > --
> > 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.
>

-- 
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.


Re: [go-nuts] Re: [golang-dev] Go 1.9 Beta 1 is released

2017-06-14 Thread Michael Hudson-Doyle
Do you use -skip_tests though? Because I'd be surprised if you don't and
don't hit that issue. But maybe I'm missing something.

On 15 June 2017 at 13:35, Brad Fitzpatrick  wrote:

> We use golang.org/x/build/cmd/release
>
>
> On Wed, Jun 14, 2017 at 6:32 PM, Michael Hudson-Doyle <
> michael.hud...@canonical.com> wrote:
>
>> I'm curious how you built your binaries with https://github.com/golang
>> /go/issues/20284 still open. Do you not run the tests on the built
>> binaries before packing them up?
>>
>> On 15 June 2017 at 10:15, Chris Broadfoot  wrote:
>>
>>> Hello gophers,
>>>
>>> We have just released go1.9beta1, a beta version of Go 1.9.
>>> It is cut from the master branch at the revision tagged go1.9beta1.
>>>
>>> There are no known problems or regressions.
>>> Please try running production load tests and your unit tests with the
>>> new version.
>>>
>>> Report any problems using the issue tracker:
>>> https://golang.org/issue/new
>>>
>>> If you have Go installed already, the easiest way to try go1.9beta1
>>> is by using this tool:
>>> https://godoc.org/golang.org/x/build/version/go1.9beta1
>>>
>>> You can download binary and source distributions from the usual place:
>>> https://golang.org/dl/#go1.9beta1
>>>
>>> To find out what has changed in Go 1.9, read the draft release notes:
>>> https://tip.golang.org/doc/go1.9
>>>
>>> Documentation for Go 1.9 is available at:
>>> https://tip.golang.org/
>>>
>>> Cheers,
>>> Chris
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "golang-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to golang-dev+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> 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.
>>
>
>

-- 
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.


Re: [go-nuts] Re: [golang-dev] Go 1.9 Beta 1 is released

2017-06-14 Thread Brad Fitzpatrick
We use golang.org/x/build/cmd/release


On Wed, Jun 14, 2017 at 6:32 PM, Michael Hudson-Doyle <
michael.hud...@canonical.com> wrote:

> I'm curious how you built your binaries with https://github.com/
> golang/go/issues/20284 still open. Do you not run the tests on the built
> binaries before packing them up?
>
> On 15 June 2017 at 10:15, Chris Broadfoot  wrote:
>
>> Hello gophers,
>>
>> We have just released go1.9beta1, a beta version of Go 1.9.
>> It is cut from the master branch at the revision tagged go1.9beta1.
>>
>> There are no known problems or regressions.
>> Please try running production load tests and your unit tests with the new
>> version.
>>
>> Report any problems using the issue tracker:
>> https://golang.org/issue/new
>>
>> If you have Go installed already, the easiest way to try go1.9beta1
>> is by using this tool:
>> https://godoc.org/golang.org/x/build/version/go1.9beta1
>>
>> You can download binary and source distributions from the usual place:
>> https://golang.org/dl/#go1.9beta1
>>
>> To find out what has changed in Go 1.9, read the draft release notes:
>> https://tip.golang.org/doc/go1.9
>>
>> Documentation for Go 1.9 is available at:
>> https://tip.golang.org/
>>
>> Cheers,
>> Chris
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "golang-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to golang-dev+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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.
>

-- 
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.


[go-nuts] Re: [golang-dev] Go 1.9 Beta 1 is released

2017-06-14 Thread Michael Hudson-Doyle
I'm curious how you built your binaries with
https://github.com/golang/go/issues/20284 still open. Do you not run the
tests on the built binaries before packing them up?

On 15 June 2017 at 10:15, Chris Broadfoot  wrote:

> Hello gophers,
>
> We have just released go1.9beta1, a beta version of Go 1.9.
> It is cut from the master branch at the revision tagged go1.9beta1.
>
> There are no known problems or regressions.
> Please try running production load tests and your unit tests with the new
> version.
>
> Report any problems using the issue tracker:
> https://golang.org/issue/new
>
> If you have Go installed already, the easiest way to try go1.9beta1
> is by using this tool:
> https://godoc.org/golang.org/x/build/version/go1.9beta1
>
> You can download binary and source distributions from the usual place:
> https://golang.org/dl/#go1.9beta1
>
> To find out what has changed in Go 1.9, read the draft release notes:
> https://tip.golang.org/doc/go1.9
>
> Documentation for Go 1.9 is available at:
> https://tip.golang.org/
>
> Cheers,
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.


Re: [go-nuts] Re: [Assembler] How can I call SIMD immediate by FP?

2017-06-14 Thread Meng Zhuo
You mean the intrinsic library of C/C++ just extend macro? What a pity.


'Keith Randall' via golang-nuts :

> The immediate goes first, like this:
>
> SHUFPD $1, X1, X2
>
> Note that SHUFPD takes an immediate for the shuffle - I don't see how you
> can implement the function you want; it takes a dynamic shuffle argument.
> Unless you do a switch on all possible values of the immediate.
>
>
> On Tuesday, June 13, 2017 at 11:57:20 PM UTC-7, Zhuo Meng wrote:
>>
>> The SHUFPD opcode needs X1, X2, ib three arguments, but I want to make a
>> Go function like
>>
>> shufpd(x1, x2 interface{}, imm8u uint8)
>>
>> and I hope the asm file like
>>
>> SHUFPD X1, X2, imm+48(FP)
>>
>> but it doesn't work, any suggestion?
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/golang-nuts/nSLAqg5eLlM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Best regard
Meng Zhuo

-- 
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.


Re: [go-nuts] Re: Go 1.9 Beta 1 is released

2017-06-14 Thread Brad Fitzpatrick
Correct.

https://github.com/golang/go/issues/19082 remains open.

See https://dev.golang.org/release for the other bugs not yet fixed.


On Wed, Jun 14, 2017 at 5:03 PM, Ben Shi  wrote:

> still no aarch64 prebuilt binary?
>
> Ben Shi
>
> 在 2017年6月15日,06:15,Chris Broadfoot  写道:
>
> Hello gophers,
>
> We have just released go1.9beta1, a beta version of Go 1.9.
> It is cut from the master branch at the revision tagged go1.9beta1.
>
> There are no known problems or regressions.
> Please try running production load tests and your unit tests with the new
> version.
>
> Report any problems using the issue tracker:
> https://golang.org/issue/new
>
> If you have Go installed already, the easiest way to try go1.9beta1
> is by using this tool:
> https://godoc.org/golang.org/x/build/version/go1.9beta1
>
> You can download binary and source distributions from the usual place:
> https://golang.org/dl/#go1.9beta1
>
> To find out what has changed in Go 1.9, read the draft release notes:
> https://tip.golang.org/doc/go1.9
>
> Documentation for Go 1.9 is available at:
> https://tip.golang.org/
>
> Cheers,
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-announce" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-announce+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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.
>

-- 
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.


[go-nuts] Re: Go 1.9 Beta 1 is released

2017-06-14 Thread Ben Shi
still no aarch64 prebuilt binary?

Ben Shi

> 在 2017年6月15日,06:15,Chris Broadfoot  写道:
> 
> Hello gophers,
> 
> We have just released go1.9beta1, a beta version of Go 1.9.
> It is cut from the master branch at the revision tagged go1.9beta1.
> 
> There are no known problems or regressions.
> Please try running production load tests and your unit tests with the new 
> version.
> 
> Report any problems using the issue tracker:
> https://golang.org/issue/new
> 
> If you have Go installed already, the easiest way to try go1.9beta1
> is by using this tool:
> https://godoc.org/golang.org/x/build/version/go1.9beta1
> 
> You can download binary and source distributions from the usual place:
> https://golang.org/dl/#go1.9beta1
> 
> To find out what has changed in Go 1.9, read the draft release notes:
> https://tip.golang.org/doc/go1.9
> 
> Documentation for Go 1.9 is available at:
> https://tip.golang.org/
> 
> Cheers,
> Chris
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-announce" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-announce+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.


Re: [go-nuts] Create methods for structs at runtime

2017-06-14 Thread Kevin Malachowski
Maybe I'm missing something obvious, but why do you need to do this? Seems like 
some sort of remote dependency injection which requires you to serialize code 
from the server to the client. Why not just release a compiled client binary 
which has all of the implementations compiled in already, and have it 
automatically download a new version and start that when you need different 
implementations? Do you need to swap in new implementations at runtime without 
restarting the client process?

-- 
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.


Re: [go-nuts] Create methods for structs at runtime

2017-06-14 Thread Dat Huynh
Hi,

What I want is to use interfaces to describe services for client side of my 
app.
Then, I implement the services on the server side and allow client side to 
call the services via my pre-defined protocol (e.g HTTP, ...)

In Java, I used the method newProxyInstance( ) of the class 
 java.lang.reflect.Proxy to implement the idea.
However, I don't know how to implement it easily in Go.

Below is what I expect to write in Go in client side.


type MyFooInterface interface {
  Method1() int
  Method2(a int, b int) string
   // any methods
}
func main() {
servicefactory.Init("http://URL/transport;)

var myService MyFooInterface

// pass any interface and obtain a struct instance which implements 
the methods of the interface.
   //In java, I just write myservice = 
ServiceFactory.CreateService(MyFooInterface.class) 

myService = servicefactory.CreateService((*MyFooInterface)(nil)).(
MyFooInterface) 
myService.Method2(10, 20) 
}


Enter code here...

Thank you very much.

Regards,
Dat.





On Wednesday, June 14, 2017 at 4:28:59 PM UTC+10, Lutz Horn wrote:
>
> Hi, 
>
> > Given an interface, how can I create a struct instance with the 
> > methods of the interface at runtime? 
>
> What is your usecase for this? What problem are you trying to solve? 
>
> Lutz 
>
>

-- 
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.


[go-nuts] Re: [Assembler] How can I call SIMD immediate by FP?

2017-06-14 Thread 'Keith Randall' via golang-nuts
The immediate goes first, like this:

SHUFPD $1, X1, X2

Note that SHUFPD takes an immediate for the shuffle - I don't see how you 
can implement the function you want; it takes a dynamic shuffle argument.
Unless you do a switch on all possible values of the immediate.

On Tuesday, June 13, 2017 at 11:57:20 PM UTC-7, Zhuo Meng wrote:
>
> The SHUFPD opcode needs X1, X2, ib three arguments, but I want to make a 
> Go function like 
>
> shufpd(x1, x2 interface{}, imm8u uint8)
>
> and I hope the asm file like 
>
> SHUFPD X1, X2, imm+48(FP)
>
> but it doesn't work, any suggestion?
>

-- 
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.


[go-nuts] Go 1.9 Beta 1 is released

2017-06-14 Thread Chris Broadfoot
Hello gophers,

We have just released go1.9beta1, a beta version of Go 1.9.
It is cut from the master branch at the revision tagged go1.9beta1.

There are no known problems or regressions.
Please try running production load tests and your unit tests with the new
version.

Report any problems using the issue tracker:
https://golang.org/issue/new

If you have Go installed already, the easiest way to try go1.9beta1
is by using this tool:
https://godoc.org/golang.org/x/build/version/go1.9beta1

You can download binary and source distributions from the usual place:
https://golang.org/dl/#go1.9beta1

To find out what has changed in Go 1.9, read the draft release notes:
https://tip.golang.org/doc/go1.9

Documentation for Go 1.9 is available at:
https://tip.golang.org/

Cheers,
Chris

-- 
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.


[go-nuts] Re: KVs store for large strings

2017-06-14 Thread Robert Johnstone
I'm surprised that the memory overhead is significant - 100 MB is not that 
much.

Assuming that you don't need atomic updates to the entire KV store, 
partition the keys.

Does the periodic reload involve changing the keys?  If not, you could map 
the dataset into nested structs.  However, you will still need to 
synchronise access if you want to to reload without stopping the server, 
but that would just be the leaves.  Switching just the top-tier to a struct 
could help with the contention.


On Wednesday, 14 June 2017 14:45:25 UTC-4, James Pettyjohn wrote:
>
> I have an application which has all of it's text, multiple languages, 
> stored in XML on disk that is merged into templates on the fly. About 
> 100MB. Templates use dozens of strings for each render. 
>
> Currently this is loaded in full into memory in a bunch of tier hash maps. 
> They are lazy loaded and using multiple locks to perform reads but, unless 
> in dev mode, actually don't change throughout the lifetime of the 
> application and should be considered immutable.
>
> While workable at a smaller scale, it's slow at scale. The most important 
> factor is concurrent lookup speed, secondary concern is memory overhead. 
> And it cannot preclude periodic reload while doing dev.
>
> Is there a data structure or lib that suits this scenarios more than 
> others?
>

-- 
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.


Re: [go-nuts] KVs store for large strings

2017-06-14 Thread Kiki Sugiaman

Try boltdb.

- supports disk persistence
- no read lock for read-only ops
- fast key iteration (only as fast as O(n) can be)
- probably will translate 100MB raw into 200MB-ish actual utilization, 
but see for yourself

- no cgo

https://github.com/boltdb/bolt


On 15/06/17 04:45, James Pettyjohn wrote:
I have an application which has all of it's text, multiple languages, 
stored in XML on disk that is merged into templates on the fly. About 
100MB. Templates use dozens of strings for each render.


Currently this is loaded in full into memory in a bunch of tier hash 
maps. They are lazy loaded and using multiple locks to perform reads 
but, unless in dev mode, actually don't change throughout the lifetime 
of the application and should be considered immutable.


While workable at a smaller scale, it's slow at scale. The most 
important factor is concurrent lookup speed, secondary concern is memory 
overhead. And it cannot preclude periodic reload while doing dev.


Is there a data structure or lib that suits this scenarios more than others?

Best,
James

--
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.


--
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.


Re: [go-nuts] Fast string sorting

2017-06-14 Thread Stefan Nilsson


I added a function radix.SortSlice similar to sort.Slice. Instead of a 
comparison function, it takes a function that serves the relevant strings:


// SortSlice sorts a slice according to the strings returned by str.

func SortSlice(slice interface{}, str func(i int) string) {


The performance is pretty good for this one as well. Thanks for the idea 
Thomas!

Stefan

On Tuesday, June 13, 2017 at 8:47:36 PM UTC+2, Stefan Nilsson wrote:
>
> That's an interesting challenge! What the algorithm really does is to 
> first find a permutation that will sort the string slice, and then apply 
> this permutation to the slice. Perhaps it would be possible to return this 
> permutation in some cheap usable format.
>
> On Tuesday, June 13, 2017 at 7:56:54 PM UTC+2, Thomas Bushnell, BSG wrote:
>>
>> That's really nice!
>>
>> Consider a case where I am sorting a slice of structs, but the underlying 
>> sort is based on a string within the structs. Or, with some other radixable 
>> datatype besides strings.
>>
>> Can we figure out an interface (similar to sort.Interface) which would 
>> permit a solution for either or both of these cases? The former should be 
>> fairly simple to do without sacrificing the speedup; the latter might be 
>> trickier.
>>
>> Thomas
>>
>>
>> On Tue, Jun 13, 2017 at 6:20 AM Stefan Nilsson  
>> wrote:
>>
>>> It's well known that radix sort can be faster than comparison-based 
>>> methods for string sorting. With that in mind, I wrote this optimized 
>>> version of MSD radix sort:
>>>
>>> https://github.com/yourbasic/radix
>>>
>>> It's equivalent to sort.Strings in the standard library and on my 
>>> machine it's twice as fast as when sorting King James Bible and four times 
>>> as fast for the 1k benchmark in the sort package. Of course I can't promise 
>>> similar performance in other settings, but Go get it if you like.
>>>
>>> Stefan
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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.


Re: [go-nuts] Re: chidley: XML to Go structs

2017-06-14 Thread Shrinkhala Singhania
Hi,

I tried running my XML file and throws this error:


chidley$chidley -W xml/openconfig.xml > examples/oc/openconfig1.go

chidley$cd examples/oc/

oc$go build

   # github.com/gnewton/chidley/examples/oc

  ./openconfig1.go:3361: Chiroot redeclared in this block

   previous declaration at ./openconfig1.go:213

Regards,
Shrinkhala

On Wed, Jun 14, 2017 at 2:25 PM, Shrinkhala Singhania <
singhania.shr...@gmail.com> wrote:

> That worked. Thanks.
>
> Regards,
> Shrinkhala
>
> On Wed, Jun 14, 2017 at 2:22 PM, Ian Lance Taylor  wrote:
>
>> On Wed, Jun 14, 2017 at 11:08 AM,   wrote:
>> > I have this in my bash_profile:
>> >
>> > export PATH=/usr/local/bin:/usr/local/sbin:$PATH
>> >
>> > export GOPATH = /Users/ssinghania/go/
>> >
>> > export CLASSPATH=".:/usr/local/lib/antlr-4.6-complete.jar:$CLASSPATH"
>>
>> OK, so do what I suggested.  You need something like
>>
>> export PATH=/usr/local/bin:/usr/local/sbin:/Users/ssinghania/go/bin:$PATH
>>
>> Ian
>>
>>
>> > On Wednesday, June 14, 2017 at 1:53:53 PM UTC-4, Ian Lance Taylor wrote:
>> >>
>> >> On Wed, Jun 14, 2017 at 10:19 AM,   wrote:
>> >> >
>> >> > To install chidley, I did the following:
>> >> >
>> >> > go get github.com/gnewton/chidley
>> >> >
>> >> > This worked. However, issue on
>> >> >
>> >> >
>> >> > chidley -W xml/test1.xml > examples/test/ChildTest1.go
>> >> >
>> >> > -bash: chidley: command not found
>> >> >
>> >> > How do I fix this?
>> >>
>> >> Put $GOPATH/bin on your PATH.  If you haven't set $GOPATH, the default
>> >> is $HOME/go.
>> >>
>> >> Ian
>> >
>> > --
>> > 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.
>>
>
>

-- 
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.


[go-nuts] KVs store for large strings

2017-06-14 Thread James Pettyjohn
I have an application which has all of it's text, multiple languages, 
stored in XML on disk that is merged into templates on the fly. About 
100MB. Templates use dozens of strings for each render. 

Currently this is loaded in full into memory in a bunch of tier hash maps. 
They are lazy loaded and using multiple locks to perform reads but, unless 
in dev mode, actually don't change throughout the lifetime of the 
application and should be considered immutable.

While workable at a smaller scale, it's slow at scale. The most important 
factor is concurrent lookup speed, secondary concern is memory overhead. 
And it cannot preclude periodic reload while doing dev.

Is there a data structure or lib that suits this scenarios more than others?

Best,
James

-- 
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.


Re: [go-nuts] Re: chidley: XML to Go structs

2017-06-14 Thread Shrinkhala Singhania
That worked. Thanks.

Regards,
Shrinkhala

On Wed, Jun 14, 2017 at 2:22 PM, Ian Lance Taylor  wrote:

> On Wed, Jun 14, 2017 at 11:08 AM,   wrote:
> > I have this in my bash_profile:
> >
> > export PATH=/usr/local/bin:/usr/local/sbin:$PATH
> >
> > export GOPATH = /Users/ssinghania/go/
> >
> > export CLASSPATH=".:/usr/local/lib/antlr-4.6-complete.jar:$CLASSPATH"
>
> OK, so do what I suggested.  You need something like
>
> export PATH=/usr/local/bin:/usr/local/sbin:/Users/ssinghania/go/bin:$PATH
>
> Ian
>
>
> > On Wednesday, June 14, 2017 at 1:53:53 PM UTC-4, Ian Lance Taylor wrote:
> >>
> >> On Wed, Jun 14, 2017 at 10:19 AM,   wrote:
> >> >
> >> > To install chidley, I did the following:
> >> >
> >> > go get github.com/gnewton/chidley
> >> >
> >> > This worked. However, issue on
> >> >
> >> >
> >> > chidley -W xml/test1.xml > examples/test/ChildTest1.go
> >> >
> >> > -bash: chidley: command not found
> >> >
> >> > How do I fix this?
> >>
> >> Put $GOPATH/bin on your PATH.  If you haven't set $GOPATH, the default
> >> is $HOME/go.
> >>
> >> Ian
> >
> > --
> > 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.
>

-- 
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.


Re: [go-nuts] Re: chidley: XML to Go structs

2017-06-14 Thread Ian Lance Taylor
On Wed, Jun 14, 2017 at 11:08 AM,   wrote:
> I have this in my bash_profile:
>
> export PATH=/usr/local/bin:/usr/local/sbin:$PATH
>
> export GOPATH = /Users/ssinghania/go/
>
> export CLASSPATH=".:/usr/local/lib/antlr-4.6-complete.jar:$CLASSPATH"

OK, so do what I suggested.  You need something like

export PATH=/usr/local/bin:/usr/local/sbin:/Users/ssinghania/go/bin:$PATH

Ian


> On Wednesday, June 14, 2017 at 1:53:53 PM UTC-4, Ian Lance Taylor wrote:
>>
>> On Wed, Jun 14, 2017 at 10:19 AM,   wrote:
>> >
>> > To install chidley, I did the following:
>> >
>> > go get github.com/gnewton/chidley
>> >
>> > This worked. However, issue on
>> >
>> >
>> > chidley -W xml/test1.xml > examples/test/ChildTest1.go
>> >
>> > -bash: chidley: command not found
>> >
>> > How do I fix this?
>>
>> Put $GOPATH/bin on your PATH.  If you haven't set $GOPATH, the default
>> is $HOME/go.
>>
>> Ian
>
> --
> 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.

-- 
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.


Re: [go-nuts] Re: chidley: XML to Go structs

2017-06-14 Thread singhania . shrink
I have this in my bash_profile:

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

*export GOPATH = /Users/ssinghania/go/*

export CLASSPATH=".:/usr/local/lib/antlr-4.6-complete.jar:$CLASSPATH"


On Wednesday, June 14, 2017 at 1:53:53 PM UTC-4, Ian Lance Taylor wrote:
>
> On Wed, Jun 14, 2017 at 10:19 AM,   
> wrote: 
> > 
> > To install chidley, I did the following: 
> > 
> > go get github.com/gnewton/chidley 
> > 
> > This worked. However, issue on 
> > 
> > 
> > chidley -W xml/test1.xml > examples/test/ChildTest1.go 
> > 
> > -bash: chidley: command not found 
> > 
> > How do I fix this? 
>
> Put $GOPATH/bin on your PATH.  If you haven't set $GOPATH, the default 
> is $HOME/go. 
>
> Ian 
>

-- 
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.


Re: [go-nuts] Re: chidley: XML to Go structs

2017-06-14 Thread Shrinkhala Singhania
I have this in my bash_profile:

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

*export GOPATH = /Users/ssinghania/go/*

export CLASSPATH=".:/usr/local/lib/antlr-4.6-complete.jar:$CLASSPATH"

Regards,
Shrinkhala

On Wed, Jun 14, 2017 at 1:53 PM, Ian Lance Taylor  wrote:

> On Wed, Jun 14, 2017 at 10:19 AM,   wrote:
> >
> > To install chidley, I did the following:
> >
> > go get github.com/gnewton/chidley
> >
> > This worked. However, issue on
> >
> >
> > chidley -W xml/test1.xml > examples/test/ChildTest1.go
> >
> > -bash: chidley: command not found
> >
> > How do I fix this?
>
> Put $GOPATH/bin on your PATH.  If you haven't set $GOPATH, the default
> is $HOME/go.
>
> Ian
>

-- 
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.


Re: [go-nuts] Re: chidley: XML to Go structs

2017-06-14 Thread Ian Lance Taylor
On Wed, Jun 14, 2017 at 10:19 AM,   wrote:
>
> To install chidley, I did the following:
>
> go get github.com/gnewton/chidley
>
> This worked. However, issue on
>
>
> chidley -W xml/test1.xml > examples/test/ChildTest1.go
>
> -bash: chidley: command not found
>
> How do I fix this?

Put $GOPATH/bin on your PATH.  If you haven't set $GOPATH, the default
is $HOME/go.

Ian

-- 
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.


Re: [go-nuts] Why *cookie and cookie variables returns the cookie in different format upon printing it to terminal?

2017-06-14 Thread Ayan George
Well -- I was wrong.

I got it backwards.  There is a String() function is a receiver for
*http.Cookie so it gets called when you need a string representation of a
*http.Cookie (pointer to http.Cookie).

On Wed, Jun 14, 2017 at 1:18 PM, Aman Kapoor  wrote:

> Hi Ayan,
>
> Thank you for pointing me to the right code. I saw there how string method
> is creating the response. I think this is what I needed to see for my
> question. Thank you.
>
> On Wednesday, 14 June 2017 22:28:55 UTC+5:30, Ayan George wrote:
>>
>> Hi Aman --
>>
>> When you print *http.Cookie, Go does it's best to print each field
>> knowing that it is a pointer to a struct.  This is the format you end up
>> with.
>>
>> But http.Cookie has a String() method associated with it that provides
>> the output that you get when you simply print 'cookie' (without the
>> asterisk).  You can find the source for this by following the link below.
>>
>>https://golang.org/src/net/http/cookie.go?s=432:945#L138
>>
>> This is AFAIK and I could be wrong.
>>
>> On Wed, Jun 14, 2017 at 11:24 AM, Aman Kapoor  wrote:
>>
>>> Hi,
>>>
>>> I was setting up cookies today. Go is my first web development language.
>>> And, in my code (https://github.com/amankapoor
>>> /basic-authentication-using-cookies), I outputted the cookie to command
>>> line because I wanted to see how it looked there.
>>>
>>> I found that *cookie and cookie are returning answers in different
>>> formats. Why so?
>>>
>>>
>>> 
>>>
>>> --
>>> 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...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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.
>

-- 
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.


[go-nuts] Re: chidley: XML to Go structs

2017-06-14 Thread singhania . shrink

To install chidley, I did the following:

go get github.com/gnewton/chidley

This worked. However, issue on 

chidley -W xml/test1.xml > examples/test/ChildTest1.go

-bash: chidley: command not found

How do I fix this?

Thanks
On Thursday, August 28, 2014 at 7:33:27 AM UTC-4, Glen Newton wrote:
 

> chidley (https://github.com/gnewton/chidley) reads in XML and writes out 
> Go structs. It also can output a full Go program that - when compiled - 
> will convert the given original input XML file (and other XML files with 
> the same schema) to JSON or XML (useful for validation), or can give a 
> count of the unique XML elements in the input XML. 
>
> Please see the github page for usage,limitations and examples.
>
> chidley has been tested on large (>100GB: 
> https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-pages-articles.xml.bz2)
>  
> XML, while keeping a resident memory size < 20MB.
> The generated code mentioned above also supports XML streaming decoding of 
> large files as described in 
> http://blog.davidsingleton.org/parsing-huge-xml-files-with-go/
>
> If you have any questions, suggestions, issues, please let me know or use 
> the issue tracker on github.
>
> Thanks,
>
> Glen Newton
> :-)
>
>
>

-- 
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.


Re: [go-nuts] Why *cookie and cookie variables returns the cookie in different format upon printing it to terminal?

2017-06-14 Thread Aman Kapoor
Hi Ayan,

Thank you for pointing me to the right code. I saw there how string method 
is creating the response. I think this is what I needed to see for my 
question. Thank you.

On Wednesday, 14 June 2017 22:28:55 UTC+5:30, Ayan George wrote:
>
> Hi Aman --
>
> When you print *http.Cookie, Go does it's best to print each field knowing 
> that it is a pointer to a struct.  This is the format you end up with.
>
> But http.Cookie has a String() method associated with it that provides the 
> output that you get when you simply print 'cookie' (without the asterisk).  
> You can find the source for this by following the link below.
>
>https://golang.org/src/net/http/cookie.go?s=432:945#L138
>
> This is AFAIK and I could be wrong.
>
> On Wed, Jun 14, 2017 at 11:24 AM, Aman Kapoor  > wrote:
>
>> Hi,
>>
>> I was setting up cookies today. Go is my first web development language. 
>> And, in my code (
>> https://github.com/amankapoor/basic-authentication-using-cookies), I 
>> outputted the cookie to command line because I wanted to see how it looked 
>> there.
>>
>> I found that *cookie and cookie are returning answers in different 
>> formats. Why so?
>>
>>
>> 
>>
>> -- 
>> 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...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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.


Re: [go-nuts] Problem with building Go1.4.3 in OpenBSD/386

2017-06-14 Thread Henry
Hi Dave,

Thanks for the idea. You are right. They have patches that aren't 
upstreamed yet. The OpenBSD port builds just fine on my machine, but the 
official version does not. I have opened up an issue on 
https://github.com/golang/go/issues/20672 together with a copy of their 
ports. Hopefully, someone could integrate the changes into Go's official 
version.

On Wednesday, June 14, 2017 at 4:09:00 PM UTC+8, Dave Cheney wrote:
>
> Can you check to see if they have patches in ports that aren't upstreamed 
> yet. If so, while there is some resistance to keeping the 1.4 branch alive, 
> if it reduces the background noise of the bootstrap tarball rotting, I 
> think that would be beneficial.

-- 
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.


Re: [go-nuts] Why *cookie and cookie variables returns the cookie in different format upon printing it to terminal?

2017-06-14 Thread Ayan George
Hi Aman --

When you print *http.Cookie, Go does it's best to print each field knowing
that it is a pointer to a struct.  This is the format you end up with.

But http.Cookie has a String() method associated with it that provides the
output that you get when you simply print 'cookie' (without the asterisk).
You can find the source for this by following the link below.

   https://golang.org/src/net/http/cookie.go?s=432:945#L138

This is AFAIK and I could be wrong.

On Wed, Jun 14, 2017 at 11:24 AM, Aman Kapoor  wrote:

> Hi,
>
> I was setting up cookies today. Go is my first web development language.
> And, in my code (https://github.com/amankapoor/basic-
> authentication-using-cookies), I outputted the cookie to command line
> because I wanted to see how it looked there.
>
> I found that *cookie and cookie are returning answers in different
> formats. Why so?
>
>
> 
>
> --
> 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.
>

-- 
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.


[go-nuts] Why *cookie and cookie variables returns the cookie in different format upon printing it to terminal?

2017-06-14 Thread Aman Kapoor
Hi,

I was setting up cookies today. Go is my first web development language. 
And, in my code 
(https://github.com/amankapoor/basic-authentication-using-cookies), I 
outputted the cookie to command line because I wanted to see how it looked 
there.

I found that *cookie and cookie are returning answers in different formats. 
Why so?



-- 
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.


[go-nuts] Passing []byte from golang to char * C.

2017-06-14 Thread Tamás Gulácsi
Both should work. What is your C function?

-- 
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.


Re: [go-nuts] Passing []byte from golang to char * C.

2017-06-14 Thread andrey mirtchovski
can you show us a complete example with a stub C function? in
particular the conversion to (*C.char) from unsafe.Pointer([0])
should work. compare the first four bits at that address with the
first four bits you're receiving on the C side. they should be
identical. e.g.: https://play.golang.org/p/sqP12_nJNF

On Wed, Jun 14, 2017 at 7:54 AM,   wrote:
> I have a byte array of image in golang , i have to pass this array to my C
> function as char* . I did he following ,
>  data, err := ioutil.ReadAll(out.Body)
>  str := fmt.Sprintf("%s",data)
>  s:=C.main1(C.CString(str))
>  s:=C.main1((*C.char)(unsafe.Pointer([0])))
> but both the technique doesn't work. All i m receiving in my C function is
> some garbage value of length 4.
>
> --
> 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.

-- 
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.


Re: [go-nuts] goxpath: An XPath 1.0 parser

2017-06-14 Thread Jim Robinson
Since he was the initial author of this thread you're replying to, it does 
seem reasonable enough to also raise the question here. :)

On Wednesday, June 14, 2017 at 7:25:08 AM UTC-7, Lutz Horn wrote:
>
> Hi, 
>
> Am 14.06.2017 15:57 schrieb seamus via golang-nuts: 
> > Yes referring to https://github.com/ChrisTrenkamp/goxpath 
> > ... 
> > You would be Chris Trenkamp. 
>
> Then you will probably get better answers if you open an issue on this 
> GitHub project. The people here on go-nuts did not write this library 
> nor can they tell you what the current status of it is. 
>
> Regards 
>
> Lutz 
>
>

-- 
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.


Re: [go-nuts] goxpath: An XPath 1.0 parser

2017-06-14 Thread Lutz Horn

Hi,

Am 14.06.2017 15:57 schrieb seamus via golang-nuts:

Yes referring to https://github.com/ChrisTrenkamp/goxpath
...
You would be Chris Trenkamp.


Then you will probably get better answers if you open an issue on this 
GitHub project. The people here on go-nuts did not write this library 
nor can they tell you what the current status of it is.


Regards

Lutz

--
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.


[go-nuts] Passing []byte from golang to char * C.

2017-06-14 Thread aditi . bhiwaniwala
I have a byte array of image in golang , i have to pass this array to my C 
function as char* . I did he following ,
 data, err := ioutil.ReadAll(out.Body)
 str := fmt.Sprintf("%s",data)
 s:=C.main1(C.CString(str))
 s:=C.main1((*C.char)(unsafe.Pointer([0])))
but both the technique doesn't work. All i m receiving in my C function is 
some garbage value of length 4. 

-- 
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.


Re: [go-nuts] goxpath: An XPath 1.0 parser

2017-06-14 Thread seamus via golang-nuts
Yes referring to https://github.com/ChrisTrenkamp/goxpath

YANG is a data modelling language, that may use XML to represent the data 
stored in a model. Valid relationship between nodes can be expresses as XPATH 
expressions. These XPATH expression sometimes use current(), for example:

/acl/acl-sets/acl-set[name=current()/../../../../set-name][type=current()/../../../../type]/acl-entries/acl-entry/sequence-id

You would be Chris Trenkamp.


-- 
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.


Re: [go-nuts] goxpath: An XPath 1.0 parser

2017-06-14 Thread Lutz Horn

Hi,


I've been doing some work on goxpath to use it to evaluate xpath
expressions used in YANG. One issue I just hit is the XSLT current()
function is used in the YANG files, this fails to evaluate as
current() isn't included in the implementation. Did you consider it at
all ?


* Are you talking about https://github.com/ChrisTrenkamp/goxpath?
* What is YANG?
* Whom do you address as "you"?

Regards

Lutz

--
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.


[go-nuts] goxpath: An XPath 1.0 parser

2017-06-14 Thread seamus via golang-nuts
I've been doing some work on goxpath to use it to evaluate xpath expressions 
used in YANG. One issue I just hit is the XSLT current() function is used in 
the YANG files, this fails to evaluate as current() isn't included in the 
implementation. Did you consider it at all ?

-- 
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.


[go-nuts] workstealing goroutine scheduling algorithm for real-time applications?

2017-06-14 Thread akashina
Hi I am looking to use the work-stealing algorithm of goroutine scheduling 
for real-time. I have a model of G struct where i have added a deadline 
parameter and execution time parameter and modified newproc() to initialize 
it; I was wondering if anyone has explored realtime scheduling in go and 
would like to offer any comments/suggestions.

-- 
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.


Re: [go-nuts] Problem with building Go1.4.3 in OpenBSD/386

2017-06-14 Thread Dave Cheney
Can you check to see if they have patches in ports that aren't upstreamed yet. 
If so, while there is some resistance to keeping the 1.4 branch alive, if it 
reduces the background noise of the bootstrap tarball rotting, I think that 
would be beneficial.

-- 
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.


[go-nuts] [Assembler] How can I call SIMD immediate by FP?

2017-06-14 Thread Zhuo Meng
The SHUFPD opcode needs X1, X2, ib three arguments, but I want to make a Go 
function like 

shufpd(x1, x2 interface{}, imm8u uint8)

and I hope the asm file like 

SHUFPD X1, X2, imm+48(FP)

but it doesn't work, any suggestion?

-- 
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.


Re: [go-nuts] Create methods for structs at runtime

2017-06-14 Thread Lutz Horn

Hi,


Given an interface, how can I create a struct instance with the
methods of the interface at runtime?


What is your usecase for this? What problem are you trying to solve?

Lutz

--
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.