Re: [go-nuts] Is it possible to build a module without a hosted repository?

2018-09-14 Thread Jakob Borg
I’m not sure I understand. My "go build" doesn’t reach out anywhere to build a local program: $ mkdir /tmp/project && cd /tmp/project/ $ cat > main.go package main import "fmt" func main() { fmt.Println("Oi") } $ cat > go.mod module totally/fake/project $ go build $ ./project Oi On 15 Se

Re: [go-nuts] Is it possible to build a module without a hosted repository?

2018-09-14 Thread K Davidson
This seems to work, thanks. On Friday, September 14, 2018 at 6:38:15 PM UTC-7, Sam Whited wrote: > > On Fri, Sep 14, 2018, at 20:32, K Davidson wrote: > > Is there a way that I can build my package as a module without having to > > host it on the internet? > > I've found myself just making up f

Re: [go-nuts] call of non-function C.testc

2018-09-14 Thread amandeep
Hi Ian, I did you told, but I could not find --debug=all option for readelf. However, there is --debug --all option with readelf. I am attaching the output below: -bash-3.2$ /opt/csw/bin/greadelf --debug --all /b001/_cgo_.o ELF Header: Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 0

Re: [go-nuts] Is it possible to build a module without a hosted repository?

2018-09-14 Thread Sam Whited
On Fri, Sep 14, 2018, at 20:32, K Davidson wrote: > Is there a way that I can build my package as a module without having to > host it on the internet? I've found myself just making up fake import statements. While you're prototyping it doesn't hurt: package main // import "golang.org/total

[go-nuts] Is it possible to build a module without a hosted repository?

2018-09-14 Thread K Davidson
I appologize if this has been asked before, I tried searching but all the posts I could find of a similar nature were asking about dependencies, rather than about the module specifically. Is it possible to have a package as a module without having it hosted somewhere (like Github, or other inte

Re: [go-nuts] modules and package cyclic dips

2018-09-14 Thread Sameer Ajmani
Go modules can use the listed version or later minor versions. So if B depends on v1.11 of A, then it can also work with v1.12 of A. Therefore a valid set of versions for the build is A v1.12 and B v1.3. On Mon, Sep 10, 2018 at 1:28 AM Scott Cotton wrote: > Well, ok. > > Did you mean if A v1.12

[go-nuts] Re: setting text color in freetype library (https://github.com/golang/freetype)

2018-09-14 Thread diarselimi92
just set the Src to the color you want and it will change the color fg := image.Black d := &font.Drawer{ Dst: rgba, Src: fg, //<- Face: truetype.NewFace(f, &truetype.Options{ Size: *size, DPI: *dpi, Hinting: h, }), } On Wednesday, August 1, 2018 at 6:38:47 PM UTC+2, zakar

Re: [go-nuts] A simplified generics constraint system.

2018-09-14 Thread alanfo
Thanks for your comments, Jonathan. I did in fact deal with all the cases you mention in my 'fuller' proposal: https://gist.github.com/alanfo/5da5932c7b60fd130a928ebbace1f251 where I'd used a device to restrict the built-ins to just one following criticism by Ian that an earlier proposal I'd ma

[go-nuts] Re: net/http client: MaxConcurrentStreams exceeded

2018-09-14 Thread Eddie Shvartsman
Correction: current default client MaxConcurrentStreams is 1,000 On Friday, September 14, 2018 at 4:47:27 PM UTC-5, Eddie Shvartsman wrote: > > Greetings! > We are seeing a problem at h

Re: [go-nuts] Contracts and fused multiply add

2018-09-14 Thread jimmy frasche
If the contract further specified that the type must be ordered without restricting it to just floating-point you could feature test var d T = 3 if d/2 != 1 { // T is floatX if unsafe.Sizeof(d) == 4 { // float32 } else { // float64 } } Similarly, you could test for unsigned with

Re: [go-nuts] A simplified generics constraint system.

2018-09-14 Thread Jonathan Amsterdam
I'm sympathetic to the general idea, but I don't think this quite does it. In addition to introducing a bunch of new names, it's not expressive enough: - You can't express "string or []byte", as you note. There are many algorithms where this would be useful. See the strings and bytes packages f

Re: [go-nuts] A simplified generics constraint system.

2018-09-14 Thread alan . fox6
Well, I can't speak for the other simpler proposals but for my own there's very little to learn - just six built-ins where it's pretty obvious what they mean from their names and the rest is (in effect) just checking that a type satisfies a certain interface or, if it's a struct, has certain fi

Re: [go-nuts] call of non-function C.testc

2018-09-14 Thread Ian Lance Taylor
On Fri, Sep 14, 2018 at 2:16 PM, wrote: > It would be the same. Please see below. > > -bash-3.2$ gcc --version > gcc (GCC) 8.2.1 20180814 > Copyright (C) 2018 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCH

[go-nuts] net/http client: MaxConcurrentStreams exceeded

2018-09-14 Thread Eddie Shvartsman
Greetings! We are seeing a problem at high RPS where repeated http2 calls using the same Transport (reusing as recommended in go docs) are exceeding the server's MAX_CONCURRENT_STREAMS setting, resulting in a protocol error. The server appears to

Re: [go-nuts] call of non-function C.testc

2018-09-14 Thread amandeep
It would be the same. Please see below. -bash-3.2$ gcc --version gcc (GCC) 8.2.1 20180814 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. On Fr

Re: [go-nuts] call of non-function C.testc

2018-09-14 Thread Ian Lance Taylor
On Fri, Sep 14, 2018 at 1:40 AM, wrote: > > oh yes, I am using gccgo. I configured gccgo from source. Below is the go > version output: > go version go1.10.3 gccgo (GCC) 8.2.1 20180814 solaris/sparc What version of GCC are you using? What is the output of `gcc --version`? Ian -- You received

Re: [go-nuts] A simplified generics constraint system.

2018-09-14 Thread Ian Lance Taylor
On Fri, Sep 14, 2018 at 10:47 AM, wrote: > > The problem is that many people think the current draft design is too > complex and I haven't seen a plausible suggestion from anyone (myself > included) which would be appreciably simpler but as comprehensive, or nearly > so. > > This is why I'd concl

Re: [go-nuts] Announcing a Fyne GUI toolkit

2018-09-14 Thread Andrew Williams
Hi, Thanks. There is an efl opengl driver which we could utilise instead of the sofware driver with a small change - if your hardware supports it. It would also be possible to provide an alternative driver that communicates directly with opengl, but this is a lot more work. I have designed the b

Re: [go-nuts] [ANN] goey - Declarative, cross-platform GUIs

2018-09-14 Thread robert engels
Robert, You might want to look at https://github.com/fyne-io/fyne R > On Sep 11, 2018, at 8:24 AM, Robert Johnstone wrote: > > Hello, > > I've taken a previous comment about screenshots seriously. They will be up > in a little bit. > > The layout widgets

Re: [go-nuts] Announcing a Fyne GUI toolkit

2018-09-14 Thread Ian Davis
On Fri, 14 Sep 2018, at 6:02 PM, Andrew Williams wrote: > > It's now well into development and ready for people to get involved. > There is a long way to go but it feels like a solid base.> Instructions for > getting started, if you need them, are at > https://github.com/fyne-io/bootstrap/blob/m

Re: [go-nuts] A simplified generics constraint system.

2018-09-14 Thread alan . fox6
Ian, Ian, Well, if a simple comprehensive solution can be found, then I'm sure we'll all be in favor of it. The problem is that many people think the current draft design is too complex and I haven't seen a plausible suggestion from anyone (myself included) which would be appreciably simpler

Re: [go-nuts] A simplified generics constraint system.

2018-09-14 Thread robert engels
I think you hit the nail on the head, Go already uses a 90% solution in many areas, and that is why it is both simple and useful. In the case of generics programming though, it is 0% (unless you count interface{} as being generic - I don’t) Java went for over a decade without generics, and many

Re: [go-nuts] A simplified generics constraint system.

2018-09-14 Thread Ian Lance Taylor
On Fri, Sep 14, 2018 at 3:32 AM, alanfo wrote: > > I was then brought back to reality by this post by Robert Engels in the > 'Generics - Why contracts?' thread: > > "As I’ve said elsewhere, a SIMPLE to use and understand solution that covers > 90% is better than a complex one to cover 100% IMO, an

Re: [go-nuts] Re: Go 2 error-handling counter-proposal: returnfrom

2018-09-14 Thread roger peppe
On 14 September 2018 at 17:45, Scott Pakin wrote: > On Friday, September 14, 2018 at 12:30:46 AM UTC-6, rog wrote: >> >> What about here, where the call stack associated with g is still live? >> >> func g() error { >> Top: >> f := func(err error) { returnfrom Top, nil } >

Re: [go-nuts] Re: Go 2 error-handling counter-proposal: returnfrom

2018-09-14 Thread Scott Pakin
On Friday, September 14, 2018 at 12:30:46 AM UTC-6, rog wrote: > > What about here, where the call stack associated with g is still live? > > func g() error { > Top: > f := func(err error) { returnfrom Top, nil } > c := make(chan struct{}) >

[go-nuts] Re: A simplified generics constraint system.

2018-09-14 Thread alan . fox6
Thanks for those comments, guys. I've responded to them in the same place. -- 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.c

Re: [go-nuts] A simplified generics constraint system.

2018-09-14 Thread Eric S. Raymond
alanfo : > Any comments or constructive criticism are of course welcome. I applaud this step in the direction of simplicity. I've left a more specific comment on the issue. -- http://www.catb.org/~esr/";>Eric S. Raymond My work is funded by the Internet Civil Engineering Institu

[go-nuts] Binary module and security reasons

2018-09-14 Thread Vitold S
Hello my friends, Right now I review go ui module ( https://github.com/andlabs/ui ) and compile example and happy that I can create cross platofrm UI application without HTML engine involving. But little later when I start research module I found compile and linking with binary *.a files under

[go-nuts] Re: using go modules replace with old repos

2018-09-14 Thread John Shahid
Ping. John Shahid writes: > Hi all, > > Is there a way to use the go module `replace' directive for packages > that don't have go.mod yet ? I tried doing that and I get the following > error: > >> go: parsing ../pkg/go.mod: open /path/to/pkg/go.mod: no such file or >> directory > > According t

Re: [go-nuts] A simplified generics constraint system.

2018-09-14 Thread alan . fox6
Well, it's easy enough if you check that it's a non-negative integer to start with :) If it's negative, you'd have to decide what to do - return an error, panic or circumvent the problem in some other way. Alan On Friday, September 14, 2018 at 1:40:41 PM UTC+1, ohir wrote: > > On Fri, 14 Sep 2

[go-nuts] A new API for modular static analysis

2018-09-14 Thread 'Alan Donovan' via golang-nuts
[bcc: golang-{dev,nuts}] I've been working on a common interface for modular static analysis of Go packages, and have built prototypes of several drivers, including a replacement for the existing standalone 'vet' command and for the implementation of 'go vet'. Please read the code and doc and let

[go-nuts] A new API for modular static analysis

2018-09-14 Thread 'Alan Donovan' via golang-nuts
[bcc: golang-{dev,nuts}] I've been working on a common interface for modular static analysis of Go packages, and have built prototypes of several drivers, including a replacement for the existing standalone 'vet' command and for the implementation of 'go vet'. Please read the code and doc and let

Re: [go-nuts] Generics - Min challenge

2018-09-14 Thread Jesper Louis Andersen
On Wed, Sep 12, 2018 at 4:49 PM Wojciech S. Czarnecki wrote: > > This is not metaprogramming! > > Every and each statement is written by the human author in plain Go > and no code is produced by the program itself. > > The key of metaprogramming is the ability to treat code as data which can be m

Re: [go-nuts] Go 2 error-handling: choose requirements!

2018-09-14 Thread Robert Engels
Until Go has typed errors and a throws clause (I.e exceptions) it’s pointless. You need to be able to be certain errors are handled or passed up at compile time. The throws clause facilitates this. It allows refactoring without breakage. Until then just live with the boilerplate and keep your

[go-nuts] CGG (Craftsman Generics) Update

2018-09-14 Thread Wojciech S. Czarnecki
Changes: Add break statement to `for type switch`. > **break** statement can be given as the last case in the `for type switch` > to signal that at least one substituted type does not make sense for the > func code. If break statement is reached it effects in compile error of > "func/method 'iden

[go-nuts] Go 2 error-handling: choose requirements!

2018-09-14 Thread Liam
There are *thirty-something* counter-proposals on the feedback wiki ! It's a bit of a train wreck :-p What that means, I believe, is that many folks see different requirement sets for a new error-handling idiom, so the union of the set

[go-nuts] A simplified generics constraint system.

2018-09-14 Thread alanfo
It's now more than a fortnight since the Go 2 Draft Generics Design was published and, like many others, I have spent considerable time: 1. Steeped in discussions about the draft. 2. Reading feedback papers by others (Roger Peppe's are particularly illuminating) most of whom share my opinion th

Re: [go-nuts] Generics - Min challenge

2018-09-14 Thread Wojciech S. Czarnecki
[Bcc: drchase] On Wed, 12 Sep 2018 10:55:26 +0200 "Wojciech S. Czarnecki" wrote: > func Min(a, b T) T { `func Min(a, b type T) type T` of course. Late correction but needed. > for type switch { > case T func(T) Less(T) T: > return a.Less(b) > } > if a < b { >return a >

Re: [go-nuts] call of non-function C.testc

2018-09-14 Thread amandeep
oh yes, I am using gccgo. I configured gccgo from source. Below is the go version output: *go version go1.10.3 gccgo (GCC) 8.2.1 20180814 solaris/sparc * Following is the output of what is -bash-3.2$ go build -x sol10.go

Re: [go-nuts] Generics - Min challenge

2018-09-14 Thread Wojciech S. Czarnecki
On Thu, 13 Sep 2018 10:29:21 -0700 (PDT) Manlio Perillo wrote: > `try` tries each block at compile time, and use the first block that > compiles successfully. How the reader of this will know what will compile and what not? Esp doing "by a finger"/"paper and pencil" codewalk?. But you just red