[go-nuts] Re: ARM server board

2016-10-22 Thread Dave Cheney
There are no server class arm64 boards in your price range, sorry. If you want server class hardware you should look to Cavium or ARM themselves, these development systems start at the several thousand US dollar price range. If you want something in the $400 mark, http://www.96boards.org/ (curr

Re: [go-nuts] A simple question - Can C++ and goLang coexist in the same ecosystem?

2016-10-22 Thread Ian Lance Taylor
On Sat, Oct 22, 2016 at 7:39 PM, wrote: > C++ is evolving. C++14 is out and used in production. C++17 is almost ready. > > I want to invest some time in goLang, mainly because I wanted to substitute > Python with a more efficient language for quick prototype implementation. > Also, goLang seems t

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread Ian Lance Taylor
On Sat, Oct 22, 2016 at 6:40 PM, T L wrote: > > On Saturday, October 22, 2016 at 11:59:55 PM UTC+8, Ian Lance Taylor wrote: >> >> On Sat, Oct 22, 2016 at 2:01 AM, T L wrote: >> > >> > On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote: >> >> >> >> >> >> The string struct used internally

[go-nuts] Re: Go Operator Precedence

2016-10-22 Thread tungcheungleong
I would recommend you use bracket no matter on which language, then people from different language can understand it without risk On Sunday, 6 May 2012 18:34:10 UTC-4, ianeperson wrote: > > The operator precedence in Go is not only shorter than that for C (C+ > +, and their various derivatives),

[go-nuts] A simple question - Can C++ and goLang coexist in the same ecosystem?

2016-10-22 Thread carlosmf . pt
C++ is evolving. C++14 is out and used in production. C++17 is almost ready. I want to invest some time in goLang, mainly because I wanted to substitute Python with a more efficient language for quick prototype implementation. Also, goLang seems to be interesting for services were performance is

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread T L
On Saturday, October 22, 2016 at 11:59:55 PM UTC+8, Ian Lance Taylor wrote: > > On Sat, Oct 22, 2016 at 2:01 AM, T L > > wrote: > > > > On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote: > >> > >> > >> The string struct used internally is > >> > >> type stringStruct struct { >

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-22 Thread Nate Finch
I'd much rather have syntax that just works rather than another built-in function. On Sat, Oct 22, 2016, 6:17 PM roger peppe wrote: > When I need to do this, I find it's only a very minor annoyance to define: > > func newInt(i int) { return &i } > > If Go ever got generics, this would probab

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-22 Thread roger peppe
When I need to do this, I find it's only a very minor annoyance to define: func newInt(i int) { return &i } If Go ever got generics, this would probably be trivial to write generically, for example: func Ref[T](x T) *T { return &x } I don't think I'd object if we added a new builtin fun

Re: [go-nuts] Re: Golang should have a center packages index hosting like npm, rust crates

2016-10-22 Thread Keith Rarick
On Thu, Oct 20, 2016 at 1:43 AM Dave Cheney wrote: T L, I often hear this comment when a central repo for Go is proposed/suggested/requested. Are you able to give details of the things you do not like about Maven/npm/rubygems central repos. The most specific the better please. I think this isn'

[go-nuts] ARM server board

2016-10-22 Thread Tharaneedharan Vilwanathan
Hi All, I am looking for a server type board with 64-bit ARM and more RAM (>2GB) that runs Ubuntu or similar. I want to run Go code in it. It shouldn't cost > $400. Any suggestions? Thanks dharani -- You received this message because you are subscribed to the Google Groups "golang-nuts" group.

Re: [go-nuts] Re: Serialization internal data to disk

2016-10-22 Thread Kiki Sugiaman
Gob helps with (de)serializing data structures. mapset.Set is an interface. It doesn't help that the underlying data structure that the interface points to is unexported, hence it can only be registered with gob by the package itself. If the package doesn't do that, the package user can't do th

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-22 Thread tylerbunnell
I agree that a spoonful of syntactic sugar would be wonderful here, though I don't have any strong opinions on what form it should take. On Saturday, October 22, 2016 at 12:31:58 PM UTC-6, Pietro Gagliardi (andlabs) wrote: > > > On Oct 22, 2016, at 2:19 PM, Matt Harden > > wrote: > > and [...]i

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-22 Thread Pietro Gagliardi
> On Oct 22, 2016, at 2:19 PM, Matt Harden wrote: > > and [...]int{5}[:] is also illegal (slice of unaddressable value) []int{5} will do the same thing, and I didn't know this until recently but the spec is written such that this even works with named indices: v := []int{

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-22 Thread Matt Harden
Interesting - &[]int{5}[0] works, but &[...]int{5}[0] doesn't, and [...]int{5}[:] is also illegal (slice of unaddressable value). I guess I always thought of []T{x,y,z} as sugar for [...]T{x,y,z}[:] but it's more like func()[]T{a := [...]T{x,y,z}; return a[:]}() I agree these are horrible. I just

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-22 Thread Matt Harden
&(&struct{int}{5}).int also works. :-) On Sat, Oct 22, 2016 at 9:29 AM Nate Finch wrote: > Which is effectively the same as my proposal, except horrible. > > On Sat, Oct 22, 2016, 12:18 PM Ian Lance Taylor wrote: > > > You can, of course, write > p3 := &(&Int{5}).i > > Ian > > -- You rece

[go-nuts] Add sql.NullTime type

2016-10-22 Thread Dima Kurguzov
sql package supports most language primitives (bool, int64, float64, string). I think time.Time must be supported too with sql.NullTime type - it's a nonsense to have databases with timestamps (e.g. standard created_at, updated_at columns). You may find NullTime example code in the playground

Re: [go-nuts] Re: Serialization internal data to disk

2016-10-22 Thread Tong Sun
On Sat, Oct 15, 2016 at 3:17 PM, Tong Sun wrote: > Hi, > > Need help again. > > I got everything tested out correctly, in https://github.com/suntong/ > lang/blob/master/lang/Go/src/ds/PersistentData-GOB.go, but when I tried > to apply it to my real case (more complicated data structure), it doesn'

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread Pietro Gagliardi
DIscounting even garbage collector: is there any memory allocator anywhere that provides a facility to only return bytes at the start of an allocation to the manager? realloc() only lets you return bytes at the end, and most other allocators I've seen are based on that one's API... > On Oct 22,

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-22 Thread Nate Finch
Which is effectively the same as my proposal, except horrible. On Sat, Oct 22, 2016, 12:18 PM Ian Lance Taylor wrote: > > You can, of course, write > p3 := &(&Int{5}).i > > Ian > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscri

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-22 Thread Ian Lance Taylor
On Sat, Oct 22, 2016 at 8:42 AM, Matt Harden wrote: > I don't like the syntax &int{0} because int is not a compound type, but > &int(0) seems reasonable syntax to me. I do think there is an irregularity > in the language here: > > type Int struct{i int} > anInt := Int{5} > p1 := &Int{5} // wor

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread Ian Lance Taylor
On Sat, Oct 22, 2016 at 2:01 AM, T L wrote: > > On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote: >> >> >> The string struct used internally is >> >> type stringStruct struct { >> str unsafe.Pointer >> len int >> } >> >> When following f function is called and s is cleared, >>

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-22 Thread Matt Harden
I don't like the syntax &int{0} because int is not a compound type, but &int(0) seems reasonable syntax to me. I do think there is an irregularity in the language here: type Int struct{i int} anInt := Int{5} p1 := &Int{5} // works p2 := &anInt.i// works p3 := &Int{5}.i // compiler error

[go-nuts] Re: URL prefix for Go's "present"

2016-10-22 Thread Torsten Bronger
Hallöchen! T L writes: > Do you want to host your talks under your own doamin? Please read > the docs: https://github.com/golang/talks, (the present folder is > here: https://github.com/golang/tools) You can deploy it on app > engine. But the app is simple, it should be easy to deploy it > elsew

Re: [go-nuts] Re: A question, simple for go team

2016-10-22 Thread Jan Mercl
On Sat, Oct 22, 2016 at 11:02 AM T L wrote: > I mean how do go runtime knows "abcdefg" instead of "cde" should be released. It's a simple case of some programming ;-) (More here: https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)) -- -j -- You received this message because

[go-nuts] Re: A question, simple for go team

2016-10-22 Thread T L
On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote: > > > The string struct used internally is > > type stringStruct struct { > str unsafe.Pointer > len int > } > > When following f function is called and s is cleared, > how do go runtime knows the starting memory address of th

[go-nuts] A question, simple for go team

2016-10-22 Thread T L
The string struct used internally is type stringStruct struct { str unsafe.Pointer len int } When following f function is called and s is cleared, how do go runtime knows the starting memory address of the old s.str is "a" instead of "c"? var s = "abcdefg"[2:5] // s.str should point a