[go-nuts] Go Performance

2018-10-29 Thread robert engels
Hello Gophers, I’ve been chastised in the past regarding some of my Go performance tests - using Java as a baseline. In most of these micro-benchmarks Go has performed more poorly than expected. So, I ported nats (https://nats.io ) message broker (which is written in Go) to

Re: [go-nuts] Go Performance

2018-10-29 Thread Jan Mercl
On Mon, Oct 29, 2018 at 9:53 PM robert engels wrote: > In most of these micro-benchmarks Go has performed more poorly than expected. Micro-benchmarks? You can stop right here. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] Re: How to make the first character in a string lowercase?

2018-10-29 Thread messju mohr
I don't know if that is "the easiest", but I would do something like this: https://play.golang.org/p/DOhP5kc8rO4 On Sun, Oct 28, 2018 at 11:35:33PM -0700, dhananja...@gmail.com wrote: >https://play.golang.org/p/vFW8NxzL_hv >this will work fine >On Saturday, 24 November 2012 16:21:23

Re: [go-nuts] Directory Structure in Markdown Synax

2018-10-29 Thread Chris Burkert
Maybe episode #35 from justforfunc (https://youtu.be/XbKSssBftLM) answers what you’re searching for. Alex Dvoretskiy schrieb am Mo. 29. Okt. 2018 um 20:21: > Looking for a Go code or algorithm, in general, to print out directory > structure. > > Example: https://jekyllrb.com/docs/structure/ > >

[go-nuts] Invoke "go test" to execute exactly two specific tests?

2018-10-29 Thread Craig Rodrigues
Hi, I have a suite of 20 tests, each test corresponding to a function: func Test(). Out of the 20 tests, I have two specific tests: func TestXG() func TestNiceSystem() I want to invoke *go test -test.run* to execute exactly those two tests, and nothing else. How can I invoke go test

Re: [go-nuts] Go Performance

2018-10-29 Thread Ian Lance Taylor
On Mon, Oct 29, 2018 at 1:53 PM, robert engels wrote: > Hello Gophers, > > I’ve been chastised in the past regarding some of my Go performance tests - > using Java as a baseline. In most of these micro-benchmarks Go has performed > more poorly than expected. > > So, I ported nats

Re: [go-nuts] Invoke "go test" to execute exactly two specific tests?

2018-10-29 Thread Jan Mercl
On Mon, Oct 29, 2018 at 10:09 PM Craig Rodrigues wrote: > I can't figure out the regexp to match those two tests exactly. For example (not tested) $ go test -run '^Test(XG|NiceSystem)$' -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Invoke "go test" to execute exactly two specific tests?

2018-10-29 Thread Burak Serdar
On Mon, Oct 29, 2018 at 3:09 PM Craig Rodrigues wrote: > > Hi, > > I have a suite of 20 tests, each test corresponding to a function: func > Test(). > > Out of the 20 tests, I have two specific tests: > > func TestXG() > func TestNiceSystem() > > I want to invoke go test -test.run to

[go-nuts] uptick in sporadic travis failures for go package tests

2018-10-29 Thread Dan Kortschak
Hi, I have seen an increase in sporadic error-out failure for our tests on the Gonum suite. This is usually due to a TLS failure early in the build resulting from a go get. For example ``` $ go get gonum.org/v1/tools/cmd/check-imports go get: warning: modules disabled by GO111MODULE=auto in

Re: [go-nuts] Invoke "go test" to execute exactly two specific tests?

2018-10-29 Thread Craig Rodrigues
On Mon, Oct 29, 2018 at 2:16 PM Burak Serdar wrote: > On Mon, Oct 29, 2018 at 3:09 PM Craig Rodrigues > wrote: > > > > Hi, > > > > I have a suite of 20 tests, each test corresponding to a function: func > Test(). > > > > Out of the 20 tests, I have two specific tests: > > > > func TestXG()

[go-nuts] Directory Structure in Markdown Synax

2018-10-29 Thread Alex Dvoretskiy
Looking for a Go code or algorithm, in general, to print out directory structure. Example: https://jekyllrb.com/docs/structure/ . ├── _config.yml ├── _data | └── members.yml ├── _drafts | ├── begin-with-the-crazy-ideas.md | └── on-simplicity-in-technology.md ├── _includes | ├── footer.html |

Re: [go-nuts] Invoke "go test" to execute exactly two specific tests?

2018-10-29 Thread Craig Rodrigues
On Mon, Oct 29, 2018 at 2:18 PM Jan Mercl <0xj...@gmail.com> wrote: > On Mon, Oct 29, 2018 at 10:09 PM Craig Rodrigues > wrote: > > > I can't figure out the regexp to match those two tests exactly. > > For example (not tested) > > $ go test -run '^Test(XG|NiceSystem)$' > Ah, OK, that looks like

[go-nuts] Re: gomobile: what's the right way to make widgets?

2018-10-29 Thread Laurent Moussault
I think less and less people care about native UIs. This was not the case a few years ago, but nowadays web-like interfaces, even for desktop applications, is becoming the new standard. Most "non-tech" people interact with their computers mostly through the web browser, so a similar interface

[go-nuts] Re: Go2 proposal: remove := operator (or remove variable shadowing)

2018-10-29 Thread T L
you can use go vet -shadow to try to find the potential bugs related to shadowing. Personally, I feel the proposal in https://github.com/golang/go/issues/377 :n, err =

Re: [go-nuts] How to get current goroutine id?

2018-10-29 Thread Tang Shiwei
Now i have the same problem as you, i need to record log id through a web request, and pass the log id by httpContext, its look orderless for my code, so sad! On Thursday, February 25, 2016 at 1:59:11 AM UTC+8, Damian Turczyński wrote: > > Kevin > > I have in my opinion valid reason. I'm

[go-nuts] Re: gomobile: what's the right way to make widgets?

2018-10-29 Thread Erwin Driessens
i wish the the blender GUI would be made stand-alone, ready to port to Go... so clean and fast! -- 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

Re: [go-nuts] Documentation/tutorials on building and including precompiled .syso files in packages

2018-10-29 Thread Ian Lance Taylor
On Sun, Oct 28, 2018 at 1:20 PM, jclc via golang-nuts wrote: > > There is an initiative to remove the requirement of having a C compiler for > certain CGO packages and this seems like a somewhat common thing to do, even > the Go race condition detector ships as a pre-built C blob in the Go source

Re: [go-nuts] How to get current goroutine id?

2018-10-29 Thread robert engels
I agree. I’ve read the arguments against thread-local (or goroutine local storage), and the passing of Context everywhere instead. It doesn’t make sense to me. Even a simple runtime.GetGoID() that returned a unique int would allow the design of much simpler server software. But I don’t think

[go-nuts] Go 2 error handling non-proposal

2018-10-29 Thread DrGo
What I like about error handling in Go is that errors are just values. Like any other values, they can be transparently stored, aggregated, passed around and used, among other things, to explicitly change program flow. That is why I am on the whole satisfied by Go 1's approach and a bit

Re: [go-nuts] Draft error handling design - could 'check' and 'handle' be 'contextual' keywords?

2018-10-29 Thread Ian Lance Taylor
On Sun, Oct 28, 2018 at 2:54 AM, wrote: > OK, that's a fair point. > > So how about this then. The default (no tag) would be determined by the > compiler depending on what major version was being used to build the > application. If you were using Go 2.0, 2.1 etc, then the absence of the tag >

[go-nuts] Re: gomobile: what's the right way to make widgets?

2018-10-29 Thread Elias Naur
On Monday, October 29, 2018 at 11:48:06 AM UTC+1, Laurent Moussault wrote: > > > IMHO there is vacuum right-now, an opportunity for a native framework that > allows the same design freedom as web interfaces, but implemented directly > on top of the OSes (and Vulkan, probably). I think

[go-nuts] Re: Go2 proposal: remove := operator (or remove variable shadowing)

2018-10-29 Thread Sokolov Yura
Yes, err handling is a part of variable shadowing mistakes. But it is not all such mistakes. I shadowed other variables at least as often as errors. воскресенье, 28 октября 2018 г., 21:42:54 UTC+3 пользователь Liam написал: > > Since most variable re-declaration is to support error variables,

Re: [go-nuts] Re: gomobile: what's the right way to make widgets?

2018-10-29 Thread Andrew Williams
The assumption that Fyne has made is that people care about speed and usability more than specifically native feel. The "native feel" on Windows is in transition anyway and both Windows and Linux already have multiple widget sets. Taking inspiration from mobile apps and material design it

Re: [go-nuts] Re: gomobile: what's the right way to make widgets?

2018-10-29 Thread Robert Engels
As someone who lived through the criticisms of Java UI not looking native... I think those days are past, hopefully anyway, for the reasons others have cited. As long as the toolkit supports some “native” features like notifications, browser windows, system tray, etc. it shouldn’t be a big

Re: [go-nuts] Re: gomobile: what's the right way to make widgets?

2018-10-29 Thread Andrew Williams
The current Fyne backend is reliant upon the EFL project for rendering but it is written to allow other backends to be introduced (for desktop or beyond). You're right there is no API for platform specific stuff - if there is a use-case or a requirement it could probably be accommodated though.

[go-nuts] Re: gomobile: what's the right way to make widgets?

2018-10-29 Thread EricR
A cross-platform GUI library is perfectly doable and cross-platform applications work fine enough for most use cases. Purebasic, REALbasic (now Xojo), Lazarus/Freepascal, Qt for C++ and Python, WxWidgets, Ultimate++, IUP, Swing, etc., all offer more or less cross-platform functionality. I'm

[go-nuts] Re: How to make the first character in a string lowercase?

2018-10-29 Thread dhananjayve
https://play.golang.org/p/vFW8NxzL_hv this will work fine On Saturday, 24 November 2012 16:21:23 UTC+5:30, Nikolai wrote: > > Hi! > > What is the easiest way to make a string "LikeThis" --> "likeThis"? > -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] Re: Go2 proposal: remove := operator (or remove variable shadowing)

2018-10-29 Thread Damian Gryski
On Monday, October 29, 2018 at 5:05:40 AM UTC-7, Sokolov Yura wrote: > > Yes, err handling is a part of variable shadowing mistakes. But it is not > all such mistakes. > I shadowed other variables at least as often as errors. > While shadowing is sometimes an issue, warning every times it

Re: [go-nuts] Generics: an unwelcome conclusion and a proposal

2018-10-29 Thread Lucio
On Sunday, 28 October 2018 15:13:23 UTC+2, Scott Cotton wrote: > > Hi Marvin, > > I think a lot of us like the fact that when we see "a == b" in Go we know > what it is without looking up a redefinition somewhere. > To me, "a (==) b" is better if there is operator overloading, but I don't > like

[go-nuts] Re: How to make the first character in a string lowercase?

2018-10-29 Thread Nikolai
dude, you should test your code before posting ;) On Monday, October 29, 2018 at 4:30:55 PM UTC+2, dhananjay verma wrote: > > > https://play.golang.org/p/vFW8NxzL_hv > this will work fine > On Saturday, 24 November 2012 16:21:23 UTC+5:30, Nikolai wrote: >> >> Hi! >> >> What is the easiest way to

[go-nuts] Re: Mini library for structured concurrency.

2018-10-29 Thread 'Bryan Mills' via golang-nuts
(Hi, errgroup author here. Comments inline below.) On Thursday, October 25, 2018 at 7:40:43 AM UTC-4, Andrew Chambers wrote: > > @Sebastien > > The biggest difference is my package makes guarantees that when a bundle > is garbage collected the context and thus child goroutines > are cancelled.

[go-nuts] Re: Go2 proposal: remove := operator (or remove variable shadowing)

2018-10-29 Thread Drew Derbyshire
Given all Go's narrow minded ideas for the sake of purity, := should be considered a vicious hack and removed from the language. Adding a simple var err At the top of a routine won't kill people. In my own experience, that construct is the single largest cause of trivial errors in Go