[go-nuts] Re: Type inference

2019-02-04 Thread 伊藤和也
Sorry, I was rude to you guys. From next time, I elaborate more on what I've read and understood, and/or how I think it happens. 2019年2月4日月曜日 2時43分45秒 UTC+9 伊藤和也: > > In all the constant and variable declarations below, is type inference > used? If not, which declarations use type inference?

Re: [go-nuts] Re: Type inference

2019-02-04 Thread Francisco Dalla Rosa Soares
Kazuya, I've been following or questions for a while and the common pattern I see is: You make it feel like we're doing homework for you. Right now you're just throwing a bunch of questions at the group and waiting for an answer. For example, this question could have been something like: "I was

Re: [go-nuts] Re: Why is "v" prefix for VCS tag required for ?

2019-02-04 Thread thepudds1460
To give a quick concrete example for the point below about still being able to make use of an existing tag that does not have a leading "v"... If you do the following from within a module (note no "v" in "0.0.3"): $ go get github.com/jondot/groundcontrol@0.0.3 The result is recorded in the

Re: [go-nuts] Why is "v" prefix for VCS tag required for ?

2019-02-04 Thread Dan Kortschak
The text of for that answer is not saying that a person cannot use "vM.m.p", but that "vM.m.p" means semver M.m.p. They even use `git tag v1.2.3 -m "Release version 1.2.3"` as an example. In the case of Go, the v is a marker that the following is a semver version. On Sun, 2019-02-03 at 02:20

Re: [go-nuts] Re: Why is "v" prefix for VCS tag required for ?

2019-02-04 Thread thepudds1460
As far as I understand it, there is a distinction drawn between: 1. a "semantic version" (where a leading "v" is not part of a "semantic version"), vs. 2. the mechanism for encoding a "semantic version" into a VCS tag (where a leading "v" is allowed) In other words, under that

Re: [go-nuts] A Measure of Hash Function Collisions

2019-02-04 Thread Michael Jones
There are many measures. One realm of them focus on the mixing properties of the design as would be a consideration in cypher systems. The other “experimentalist” realm considers how the hash performs compared to an ideal hash function. The latter approach is suitable for a broader range of

[go-nuts] Re: Type inference

2019-02-04 Thread alan . fox6
Yes, I should perhaps have prefaced my previous post by saying it depends what you mean by 'type inference' :) Rightly or wrongly, I think of it as either inferring the type of a variable or constant from its initialization expression or, in the case of a constant, inferring that it is an

Re: [go-nuts] Re: announce: LRMP - light weight reliable multicast protocol

2019-02-04 Thread robert engels
Yes? > On Feb 3, 2019, at 12:33 AM, ghulaamshab...@gmail.com wrote: > > > > On Friday, September 28, 2018 at 1:51:53 AM UTC+5, robert engels wrote: > I have ported LRMP (light weight reliable multicast protocol) to Go. > > It is available at lrmp > > There is

Re: [go-nuts] Re: Why is "v" prefix for VCS tag required for ?

2019-02-04 Thread Ian Denhardt
Also, on a more pragmatic level, what do you do if a repository has both tags: is the "real" version "v2.0.0" or "2.0.0"? But I generally agree with the other arguments; machines should be opinionated about the color of the shed, so humans can argue about things that actually matter (see also

[go-nuts] A Measure of Hash Function Collisions

2019-02-04 Thread Serhat Şevki Dinçer
Hi, What is the minimum sum of input lengths len(s1)+len(s2) such that: - s1, s2 are distinct utf8 strings - Txt2int(s1) = Txt2int(s2) for the below simple hash function ? func Txt2int(s string) uint64 { x := uint64(len(s)) for i := len(s) - 1; i >= 0; i-- { x =

Re: [go-nuts] Go vs C speed - What am I doing wrong?

2019-02-04 Thread 'David Chase' via golang-nuts
A general problem with interlanguage benchmarks is that you can only compare those features that both languages have, so these always reduce to lowest common denominator and are inherently biased against new features. So for example, go will get no credit for having a garbage collector,

[go-nuts] Re: announce: LRMP - light weight reliable multicast protocol

2019-02-04 Thread ghulaamshabeer
On Friday, September 28, 2018 at 1:51:53 AM UTC+5, robert engels wrote: > > I have ported LRMP (light weight reliable multicast protocol) to Go. > > It is available at lrmp > > There is also a Java implementation there, so it makes an ideal setup for > local/wan

[go-nuts] Re: Why is "v" prefix for VCS tag required for ?

2019-02-04 Thread gudvinr
> > If you start with two options you open up a flood of endless > discussions about why just these two and not that other > too. > No, it won't. Current version of semver convention (which is 2.0.0 ATM and not 1.0.0) says (as I mentioned) that any prefix violates (mildly though) semver. And

[go-nuts] Re: Type inference

2019-02-04 Thread 伊藤和也
I agree that (b), (c), (d) use type inference but not (a) because in (a), both "num1" and "100" are untyped constants so they don't have types so there is no need to use type inference. (a) const num1 = 100 (b) var num2 = num1 (c) const num1 = int(100) (d) num2 := num1 However, if type

[go-nuts] Type inference

2019-02-04 Thread alan . fox6
All four use type inference because the types of the constants or variables are not specified to the left of the assignment operator. They are instead inferred from the types of the expressions on the RHS. Alan -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Profiling runtime.futex

2019-02-04 Thread robert engels
And if that is the case, the most likely way to speed up you program would be to send the route updates in a batch to the kernel - not sure that this is even possible. > On Feb 4, 2019, at 9:56 AM, robert engels wrote: > > Also, to clarify, in the absence of more details, I would consider >

Re: [go-nuts] Profiling runtime.futex

2019-02-04 Thread robert engels
Also, to clarify, in the absence of more details, I would consider netlink.RouteReplace to be an IO operation - it is calling into the kernel (most likely). Whether that should be considered IO is probably a matter of opinion. > On Feb 4, 2019, at 9:32 AM, Andrew Medvedev > wrote: > > Hi

Re: [go-nuts] Profiling runtime.futex

2019-02-04 Thread robert engels
That doesn’t seem to match up with the pprof report - although it would be easier to determine if you showed the back-traced the syscalls. The original pprof report you stated was from without channels, thus the syscalls are almost certainly related to IO. Maybe you could clarify why you think

Re: [go-nuts] Profiling runtime.futex

2019-02-04 Thread Andrew Medvedev
Hi Robert The program is not IO bound. Sorry for not giving out the source code in the first place, here is a no-channel version https://github.com/andrewmed/loadroutes/blob/master/cmd/main.go and here is a slower channels version

[go-nuts] Re: Issue using json with array

2019-02-04 Thread Victor Giordano
My bad, if you want to custom your JSON output you should use https://golang.org/pkg/encoding/json/#Marshaler El lunes, 4 de febrero de 2019, 10:56:53 (UTC-3), Victor Giordano escribió: > > Implemeting the Stringer interface could solve your problem > > El martes, 18 de diciembre de 2018,

[go-nuts] Re: Issue using json with array

2019-02-04 Thread Victor Giordano
Implemeting the Stringer interface could solve your problem El martes, 18 de diciembre de 2018, 22:40:45 (UTC-3), Juan Mamani escribió: > > I'm not an expert but I do my best. > > Original json format required: > { "pos": [{ "lp" : "WISE-12", "lat": "-33,43565400", "lon" : > "-70,60552700",

Re: [go-nuts] Profiling runtime.futex

2019-02-04 Thread Robert Engels
Reading and writing to a channel has locks behind the scenes. Locks are implemented with futexes. If your program is IO bound the simplest solution is often to use buffering in the IO to perform more work per IO operation. > On Feb 3, 2019, at 5:00 PM, Andrew Medvedev > wrote: > > Hi

Re: [go-nuts] Re: Go vs C speed - What am I doing wrong?

2019-02-04 Thread Robert Engels
It is even more involved than that. A GC language in a highly concurrent dynamic memory environment can be faster than a hand rolled C or assembly implementation. The important consideration is memory allocation and deallocation costs in the critical path. In a GC environment they are

Re: [go-nuts] lock for assigning to different elements of an array

2019-02-04 Thread Jesper Louis Andersen
Adding [0] to the mix of papers one ought to read. Adrian Colyer had this under his looking glass some months ago: https://blog.acolyer.org/2018/08/09/bounding-data-races-in-space-and-time-part-i/ The work is being done as part of the mutlicore OCaml effort: as part of handling multiple cores,

Re: [go-nuts] Contributors wanted: Quantitative performance improvement study

2019-02-04 Thread Milind Thombre
We are on the same page! Excellent points. On Mon 4 Feb, 2019, 4:49 PM Jesper Louis Andersen < jesper.louis.ander...@gmail.com wrote: > On Sat, Feb 2, 2019 at 1:37 AM Milind Thombre wrote: > >> Wow! >> >> Django is an order of magnitude slower than nodejs. Good to know these >> numbers.

Re: [go-nuts] Contributors wanted: Quantitative performance improvement study

2019-02-04 Thread Jesper Louis Andersen
On Sat, Feb 2, 2019 at 1:37 AM Milind Thombre wrote: > Wow! > > Django is an order of magnitude slower than nodejs. Good to know these > numbers. Thanks for the link Shulhan! I don't see *go* in the list, which > framework does a typical go web app use? > > This can be important, but I too want

[go-nuts] Re: Why is "v" prefix for VCS tag required for ?

2019-02-04 Thread Volker Dobler
Well, it is good to have exactly one valid format. With two options like "vN.M.L" and "N.M.L" confusion starts to spread and why not allow a capital "V" too and a "ú" too for "útgáfa" and "r" for "release" should be allowed too. If you start with two options you open up a flood of endless