[go-nuts] Re: Debugging in Go seems to be a very difficult task to accomplish

2016-11-14 Thread Nyah Check
Hi Gophers, I know this post is old and there's a lot online with different sometimes contrasting opinions on how to debug go programs. My question given the complexities involved in multi-threading in Go does the go team have any plans on creating a standard debugger. I'm currently looking at

[go-nuts] Re: [ANN] lint - Run linters as part of go test

2016-11-14 Thread Dobrosław Żybort
Neat idea. Just some random thought: instead of adding all linters by hand maybe you could use what gometalinter already provide? https://github.com/alecthomas/gometalinter W dniu poniedziałek, 14 listopada 2016 14:27:26 UTC+1 użytkownik sri...@laddoo.net napisał: > > Hi, > > I'd like to announc

[go-nuts] Re: htmltest – tests generated HTML for problems, new project

2016-11-14 Thread Egor Smolyakov
Recommend to see this project -- http://www.validity.org.uk/ понедельник, 14 ноября 2016 г., 22:51:25 UTC+2 пользователь Will Pimblett написал: > > Hi, > > This is a bit of a general post, not really a precise question. I've built > a go application to test the validity of generated HTML markup

[go-nuts] Pointer use-case for Luar

2016-11-14 Thread Pierre Neidhardt
I am working on [Luar](https://github.com/stevedonovan/luar), a reflection binding library for Lua. The library can convert pretty much anything between Go and Lua. Pointers do not make much sense in Lua, so the lib dereferences them before creating a new Lua value. Luar also features proxies: th

Re: [go-nuts] GoLang assembly support shifted operands?

2016-11-14 Thread william . wei . xiao
Do you have plan to restore them back for reducing code size? On Tuesday, November 15, 2016 at 5:19:56 AM UTC+8, Aram Hăvărneanu wrote: > > They used to be supported but I think I dropped them with the old C > assembler. > > -- > Aram Hăvărneanu > -- You received this message because you are

[go-nuts] Re: Using EasyJSON with Golang

2016-11-14 Thread Tyler Compton
It looks like someone on Stack Overflow has answered your question[1]. You know your needs better than I do, but code generation seems like an unnecessarily complex way to unmarshal JSON code. I'd recommend taking a look at encoding/json[2] if you haven't already . 1. http://stackoverflow.com/a

[go-nuts] Re: [ANN] Go geospatial libraries: geometries, GeoJSON, WKB, KML, PostGIS, GPX, polyline

2016-11-14 Thread Daniel Whitenack
Thanks Tom! I think it would be great to add a few of these here: https://github.com/gopherds/resources/tree/master/tooling where you think it is appropriate. Would you consider submitting a PR with some additions? Daniel On Sunday, November 13, 2016 at 1:33:27 PM UTC-5, Tom Payne wrote: > >

Re: [go-nuts] GoLang assembly support shifted operands?

2016-11-14 Thread Aram Hăvărneanu
They used to be supported but I think I dropped them with the old C assembler. -- Aram Hăvărneanu -- 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+un

Re: [go-nuts] GoLang assembly support shifted operands?

2016-11-14 Thread Michael Hudson-Doyle
It doesn't look like they're supported on arm64 though. File a bug? Cheers, mwh > On 15 November 2016 at 06:26, Rob Pike wrote: > They are supported. Please read the ARM section of golang.org/doc/asm.html > to see the syntax. > > > On Sunday, November 13, 2016, wei.x...@arm.com > wrote: > >>

[go-nuts] [ANN] StackImpact - pprof-based production profiler and monitor

2016-11-14 Thread dmitri
Hi Everyone, This is a quick announcement of StackImpact, which is a production profiler and monitor partially based on pprof API. It automates profiling and tracing, and displays regular and anomaly-triggered profiles in a historically comparable form. A tracing introduced in 1.5 is used f

[go-nuts] htmltest – tests generated HTML for problems, new project

2016-11-14 Thread Will Pimblett
Hi, This is a bit of a general post, not really a precise question. I've built a go application to test the validity of generated HTML markup (the sort you'd make with a static site generator, like Hugo or Jekyll) based loosely on an existing ruby gem html-proofer. It runs files through a serie

[go-nuts] Re: Sub-Benchmark strange results.

2016-11-14 Thread Dave Cheney
Cool. Thanks for figuring it out and posting your answer. On Tuesday, 15 November 2016 07:28:16 UTC+11, Evan Digby wrote: > > Confirmed bug on my part. > > When using the "..." suffix to pass a slice into a func with variadic args > it passes through the the original slice, rather than construct

[go-nuts] Re: Sub-Benchmark strange results.

2016-11-14 Thread Evan Digby
Confirmed bug on my part. When using the "..." suffix to pass a slice into a func with variadic args it passes through the the original slice, rather than constructing a new one. An obvious optimization, but caused my function to act differently in my tests vs. a real use case. The tests pass

Re: [go-nuts] GoLang assembly support shifted operands?

2016-11-14 Thread Rob Pike
They are supported. Please read the ARM section of golang.org/doc/asm.html to see the syntax. On Sunday, November 13, 2016, wei.x...@arm.com wrote: > I'm trying to rewrite following two ARM64 assembly instructions into > GoLang assembly instructions > add x0, x3, x6, lsr #1 > neg

Re: [go-nuts] Stressing the system using

2016-11-14 Thread Michael Jones
Benchmark a call to math.Sqrt(). It is easy. Here is all it takes: https://play.golang.org/p/1XZJsjhpIq In the assembly output of “go test -v -run=Q -bench=. -gcflags=-S” you can see the SQRT instruction: babar:sqrt mtj$ go test -v -run=Q -bench=. -gcflags=-S # sqrt "".BenchmarkSqrt t=1

[go-nuts] Re: Rendering absolute URLs for a hypermedia API

2016-11-14 Thread paraiso . marc
With gorilla/mux you can use named routes : r := mux.NewRouter() r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). Name("article") url, err := r.Get("article").URL("category", "technology", "id", "42") Le lundi 14 novembre 2016 17:34:26 UTC+1, to...@hypr.nz a écrit : > > I beli

[go-nuts] Rendering absolute URLs for a hypermedia API

2016-11-14 Thread todd
I believe I have done enough research (and attempts) that this should be an easy answer: either it doesn't work that way or I've missed something simple! Fingers crossed and thanks in advance. My goal is to render absolute URLs for my API—I can't get route libraries (eg gorilla/mux) to do this

[go-nuts] GoLang assembly support shifted operands?

2016-11-14 Thread wei.x...@arm.com
I'm trying to rewrite following two ARM64 assembly instructions into GoLang assembly instructions add x0, x3, x6, lsr #1 neg x4, x4, lsl #1 But it seems that GoLang ARM64 assembly don't support shifted operands. So i need to write following 4 GoLang assembly instructions? LSL

Re: [go-nuts] Stressing the system using

2016-11-14 Thread vyasgiridhar27
Why would a select statement take up most of the execution time? Is there another way to implement a non blocking channel? On Monday, November 14, 2016 at 6:01:24 PM UTC+5:30, Michael Jones wrote: > > This is funny in the sense that my programs are great at stressing the CPU > even though I don

[go-nuts] [ANN] lint - Run linters as part of go test

2016-11-14 Thread sridhar
Hi, I'd like to announce a library I just released called lint [1]. It allows you to run a variety of linters as part of go test. It also supports whitelisting false positives. It reduces the need for build scripts, makes CI integration easy and lets projects enforce linter usage without extra

Re: [go-nuts] Stressing the system using

2016-11-14 Thread vyasgiridhar27
Why would a select statement take up most of the execution time? Is there another way to implement a non blocking channel? On Monday, November 14, 2016 at 6:01:24 PM UTC+5:30, Michael Jones wrote: > > This is funny in the sense that my programs are great at stressing the CPU > even though I don

Re: [go-nuts] Stressing the system using

2016-11-14 Thread Michael Jones
This is funny in the sense that my programs are great at stressing the CPU even though I don’t want to! :-) I looked at your hogcpu() function and saw an issue: you busy loop repeats a select statement and a square root. Almost any simple implementation of this will spend all of its time in

[go-nuts] Stressing the system using

2016-11-14 Thread vyasgiridhar27
I have been working on this applications to stress the cpu, io and the hard drive. https://github.com/vyasgiridhar/gstress Kind of like stress . But i am unable to achieve high load. This might be due to the scheduling of goroutines. Is there a

[go-nuts] Using EasyJSON with Golang

2016-11-14 Thread Debraj Manna
Crossposting this from stackoverflow :- Let's say I have a struct like below:- //easyjson:json type JSONData struct { Data []string} I want to un-marshal the below json to JSONData struct {"Data" : ["One", "Two", "Three

[go-nuts] Re: Exported singleton in vendor is initialized on every call

2016-11-14 Thread Rayland
Thank you! On Monday, November 14, 2016 at 11:00:36 AM UTC+2, pierre...@gmail.com wrote: > > Hello, > > You shadow your DB global variable in the DB, err := gorm.Open() call. > Do something like this instead: > var err error > DB, err = gorm.Open() > > > > Le lundi 14 novembre 2016 09:54:40 UTC+1

[go-nuts] Re: Exported singleton in vendor is initialized on every call

2016-11-14 Thread pierre . curto
Hello, You shadow your DB global variable in the DB, err := gorm.Open() call. Do something like this instead: var err error DB, err = gorm.Open() Le lundi 14 novembre 2016 09:54:40 UTC+1, Rayland a écrit : > > Greetings fellow gophers, > > I have a library in my vendor folder that looks like th

[go-nuts] Exported singleton in vendor is initialized on every call

2016-11-14 Thread Rayland
Greetings fellow gophers, I have a library in my vendor folder that looks like this: package gorm import ( "fmt" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" conf "github.com/spf13/viper" "math/rand" "time" ) var DB *gorm.DB func