The semantics of the directive are not defined, and there are comments
like this[1] that would introduce breakage for people who target more
than one version of Go.
Which version do we choose to write? Gonum support latest and two
previous versions. We have had to write go 1.10 into that line so t
Thanks very much Ian!
Kind regards,
Howard
On Tue, 11 Jun 2019 at 08:32, Ian Lance Taylor wrote:
>
> On Mon, Jun 10, 2019 at 10:23 PM Houzuo Guo wrote:
> >
> > Here's a complete example constructed from the snippets:
> >
> > -
> > package main
> >
> > type Fun func()
> >
On Mon, Jun 10, 2019 at 10:23 PM Houzuo Guo wrote:
>
> Here's a complete example constructed from the snippets:
>
> -
> package main
>
> type Fun func()
> type Alpha struct {
> }
> func (a Alpha) funA() {
> }
>
> type Beta struct {
> }
> func (b Beta) funB() {
> }
>
> var a
On Mon, Jun 10, 2019 at 9:56 PM Dan Kortschak wrote:
>
> The semantics of this line of go.mod is not described anywhere, but the
> tool chain blithely writes it to a go.mod file when there is no go
> directive present.
>
> Is there a way to mark the go.mod as go version-agnostic?
No. But there i
Hello Ian.
Here's a complete example constructed from the snippets:
-
package main
type Fun func()
type Alpha struct {
}
func (a Alpha) funA() {
}
type Beta struct {
}
func (b Beta) funB() {
}
var a1,a2,a3,a4,a5 Alpha
var b1,b2,b3,b4,b5 Beta
var f Fun
func main() {
f =
On Mon, Jun 10, 2019 at 9:14 PM Neil Schellenberger
wrote:
>
> When upgrading our build container from 1.11.10 to 1.12.5, some of our tests
> failed in a surprising way. I've boiled down the issue to this short example
> code fragment.
>
> package main
>
> // #include
> // struct S { unsigned
Thank you. That was very informative.
On Tuesday, June 11, 2019 at 12:29:16 PM UTC+12, David Skinner wrote:
>
> Back in 1988, I was tasked with a code review for what seems like 150
> programmers. Now I am very lazy, being a good programmer, I am willing to
> spend all day automating a one hour
The semantics of this line of go.mod is not described anywhere, but the
tool chain blithely writes it to a go.mod file when there is no go
directive present.
Is there a way to mark the go.mod as go version-agnostic?
--
You received this message because you are subscribed to the Google Groups
"g
"[T]he Heisenberg Uncertainty Principle says that you cannot measure
something without changing it". Actually no, that is the Observer Paradox.
The Heisenberg Uncertainty Principle states that the product of the
uncertainty of complementary variables, such as momentum and position, can
never be les
Hi Folks,
When upgrading our build container from 1.11.10 to 1.12.5, some of our
tests failed in a surprising way. I've boiled down the issue to this short
example code fragment.
package main
// #include
// struct S { unsigned char data[18]; };
import "C"
import "unsafe"
func main() {
var a
Thanks a lot for all your help Marcin! Your expertise makes a total
difference here!
Double-thumbs up!
On Mon, Jun 10, 2019 at 7:46 PM Marcin Romaszewicz wrote:
>
> In my example in the previous email, I accidentally used a very old version
> of echo. If you use the latest ("github.com/labstac
Back in 1988, I was tasked with a code review for what seems like 150
programmers. Now I am very lazy, being a good programmer, I am willing to
spend all day automating a one hour job. They were all using an in house
OOPS language. I performed a cluster analysis of metrics using a Comal
program
On Mon, Jun 10, 2019 at 7:50 PM Axel Wagner
wrote:
>
>
>
> On Mon, Jun 10, 2019 at 11:28 PM Tong Sun wrote:
>>
>> There is a second test well before your this post, which is a direct
>> translation of Perl code, that is now reading and writing directly to
>> a socket. Hanging on to the first test
On Mon, Jun 10, 2019 at 11:28 PM Tong Sun wrote:
> There is a second test well before your this post, which is a direct
> translation of Perl code, that is now reading and writing directly to
> a socket. Hanging on to the first test method and not referring to the
> second test is not a very cons
In my example in the previous email, I accidentally used a very old version
of echo. If you use the latest ("github.com/labstack/echo/v4"), then it's a
lot faster than using simple string splitting, resulting in about 22,000
requests per second.
Concurrency Level: 100
Time taken for tests:
One more followup.
Here's an example using an HTTP router named Echo, which I use in
production. With proper HTTP parsing and validation, and no regular
expressions involved in routing, it still does about 14,000 requests per
second. I stubbed some of your stuff which doesn't affect the result. Th
I think the others were correct in pointing the finger at the RegEx engine
in Go. It is quite slow. I hacked your inside loop which checks the request
not to use regular expressions, and it's tons faster. You can't say that
something can't be responsible for too much slowdown because it "1 line",
s
On Sun, Jun 9, 2019 at 10:17 PM Houzuo Guo wrote:
>
> Thanks very much Ian - indeed I should have proof read the message. With the
> last paragraph, I wished to ask for a way to tell a non-nil ` var f Fun` is
> assigned to `funA` of any instance of structure Alpha, or `funB` of any
> instance o
On Mon, Jun 10, 2019 at 7:44 AM Nitish Saboo wrote:
>
> Does the successful compilation makes sure that the Go code is properly
> linked to the C header files ?
I'm sorry, I don't know how to answer that question.
Does your program run as expected?
The `ldd` program will show the set of dynami
Just to clarify some facts.
On Sun, Jun 9, 2019 at 11:09 AM 'Axel Wagner' wrote:
>
> As I've also mentioned: I don't think this test is meaningful.
>
> First, as it has been pointed out, your Perl program isn't actually a web
> server. It only understands ridiculously simple requests and as such
I’ve resolved my issue and now have a working copy of Go.
Unfortunately, this version (1.8.7) is the last version that openly supports
Power5. Mikael Urankar has ported 1.12.5 to PowerPC64, however, when I attempt
to build this version I encounter “illegal instruction”, indicating that
unsuppo
The olivere/elastic package will help you filter these events in a way
that's helpful. See: https://github.com/olivere/elastic for more details.
There are a couple great examples within that repo that should help.
On Mon, Jun 10, 2019 at 10:45 AM wrote:
> Hi guys.
>
> I want push the s
On Mon, Jun 10, 2019 at 9:10 AM Jesper Louis Andersen
wrote:
>
>
>
> On Mon, Jun 10, 2019 at 1:34 PM Jan Mercl <0xj...@gmail.com> wrote:
>>
>>
>>
>> On Mon, Jun 10, 2019, 13:07 Jesper Louis Andersen
>> wrote:
>>>
>>> At some point, it is going to be "generally accepted" at which point
>>> langu
On Mon, Jun 10, 2019 at 1:34 PM Jan Mercl <0xj...@gmail.com> wrote:
>
>
> On Mon, Jun 10, 2019, 13:07 Jesper Louis Andersen <
> jesper.louis.ander...@gmail.com> wrote:
>
>> At some point, it is going to be "generally accepted" at which point
>> languages without sum types are going to be regarded
Hi Ian
On Sat, Jun 8, 2019 at 12:21 PM Nitish Saboo
wrote:
> Hi Ian,
>
> So I observed a very strange thing.If I leave it out completely then also
> the project gets compiled.
> I thought that linker file is binding my Go code to the C code.Why am I
> not getting any error ?
> How the Go code is
Hi Ian,
Does the successful compilation makes sure that the Go code is properly
linked to the C header files ?
Thanks,
Nitish
On Sat, Jun 8, 2019 at 12:21 PM Nitish Saboo
wrote:
> Hi Ian,
>
> So I observed a very strange thing.If I leave it out completely then also
> the project gets compiled.
Hi guys.
I want push the some events to redislab(using go lang) ... using
elastic search i need to filter those events What are the tool required for
this.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group
On Mon, Jun 10, 2019, 13:07 Jesper Louis Andersen <
jesper.louis.ander...@gmail.com> wrote:
> At some point, it is going to be "generally accepted" at which point
> languages without sum types are going to be regarded as a relic of the
> past.
>
I hope to be dead for a long time then.
Don't get
Hi!
There is a fundamental thing you got to grok in Go, which is that the
program is concurrent. If you have many requests to your server at the same
time, they'll all try to write to your global `data`. This is called a data
race, and it leads to all kinds of undefined behavior. You are not even
On Mon, Jun 10, 2019 at 8:11 AM Michael Jones
wrote:
> I miss discriminated unions too. (Fancy new name, “sum types”).
>
They are called sum types because they work as an "addition" like
construction in the type theory. Their dual, product types, are what people
usually call records or structs i
I have this simple http server. How can i access the request data to a
global variable and use it in any other part of my application (example in
different function).
package main
import (
"io"
"net/http")
var data string // Get http request URL data globally and use it in other part
31 matches
Mail list logo