Re: [go-nuts] Re: Golang should have a center packages index hosting like npm, rust crates

2016-10-25 Thread Haddock
Am Samstag, 22. Oktober 2016 01:57:59 UTC+2 schrieb Axel Wagner: > > > > On Fri, Oct 21, 2016 at 11:08 PM, Ronny Bangsund > wrote: > >> On Thursday, October 20, 2016 at 5:45:03 AM UTC-0:8, zixu mo wrote: >>> >>> Golang should have a center packages index hosting like npm, rust crates. >>> >> It

Re: [go-nuts] Re: iconvg: a compact, binary format for simple vector graphics

2016-10-25 Thread Nigel Tao
On Wed, Oct 26, 2016 at 12:45 AM, Sean Russell wrote: > How did you calculate the SVG sizes? When I download the the icons from the > material design github, the collection of the *_48px.svg icons weighs in at > 3.8MB. You may be double counting the design/ and production/ versions of the same i

Re: [go-nuts] iconvg: a compact, binary format for simple vector graphics

2016-10-25 Thread Nigel Tao
On Tue, Oct 25, 2016 at 9:30 PM, roger peppe wrote: > Would there be some advantage in making the Rasterizer > types in shiny/iconvg and image/vector somewhat more > uniform in the types they use? For example, vector.Rasterizer > seems to use f32.Vec2 pairs everywhere, but iconvg.Rasterizer > uses

Re: [go-nuts] Freetype performance

2016-10-25 Thread Nigel Tao
On Tue, Oct 25, 2016 at 9:40 PM, David M. wrote: > Is the Go freetype library optimized? Should I expect a similar performance > from the original C version? Why freetype don't use an internal cache to > store most frequent characters? Go freetype has had some performance work, but not a lot. I

Re: [go-nuts] Re: Golang should have a center packages index hosting like npm, rust crates

2016-10-25 Thread Matt Harden
There is also go-search.org. On Mon, Oct 24, 2016 at 9:18 AM 'Axel Wagner' via golang-nuts < golang-nuts@googlegroups.com> wrote: > On Mon, Oct 24, 2016 at 5:46 PM, Nate Finch wrote: > > Godoc.org is pretty good for searching for packages to use. It's not > perfect, of course... it won't find t

Re: [go-nuts] Hosting godoc internally for private git server

2016-10-25 Thread stephenmw via golang-nuts
Yeah, I work on godoc.org and we essentially decided not to try to support the internal usecase. The reason is that you can just use the normal godoc tool. I recommend setting up a simple cron job to pull from github every so often and run the godoc tool. gddo is very very heavy for this small

Re: [go-nuts] cross-compile with cgo 'permission denied'

2016-10-25 Thread Pietro Gagliardi
What part of that magic incantation was not documented? > On Oct 25, 2016, at 5:23 PM, Liam wrote: > > What I wanted was the magic incantation (documented nowhere) for linux_arm > installation: > >GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc go install > -v -a std >GO

Re: [go-nuts] Re: cross-compile with cgo 'permission denied'

2016-10-25 Thread Ian Lance Taylor
On Tue, Oct 25, 2016 at 2:23 PM, Liam wrote: > What I wanted was the magic incantation (documented nowhere) for linux_arm > installation: > >GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc go install > -v -a std >GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc

Re: [go-nuts] Hosting godoc internally for private git server

2016-10-25 Thread Dmitry Savintsev
s/appenging/appengine (https://cloud.google.com/appengine/) On Tuesday, October 25, 2016 at 11:24:57 PM UTC+2, Dmitry Savintsev wrote: > > that's what we do - forking https://github.com/golang/gddo and adding the > custom authentication logic and fetching data from the GHE. > > I'd recommend to c

[go-nuts] Re: go get: You are not currently on a branch

2016-10-25 Thread Thomas Modeneis
gurp...@gmail.com wrote: "The error occurs because the repo got a new branch since your last go get." ...right ... but look how many errors, one have to manually get "fixed" in order get a dependency updated. $ go get -u github.com/dancannon/gorethink # cd /opt/gocode/src/github.com/Sirupsen/l

Re: [go-nuts] Hosting godoc internally for private git server

2016-10-25 Thread Dmitry Savintsev
that's what we do - forking https://github.com/golang/gddo and adding the custom authentication logic and fetching data from the GHE. I'd recommend to concentrate on building and customizing gddo-server and gosrc (don't try to build everything in gddo). We changed or added the following files:

[go-nuts] Re: cross-compile with cgo 'permission denied'

2016-10-25 Thread Liam
What I wanted was the magic incantation (documented nowhere) for linux_arm installation: GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc go install -v -a std GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-gnueabihf-gcc go install -v -a cmd where CC varies for the toolcha

[go-nuts] Re: [ANN] AXIS VFS - Simple, lightweight, virtual file system API

2016-10-25 Thread milo . christiansen
// From the code to initialize AXIS in Rubble fs := new(axis2.FileSystem) fs.Mount("df", sources.NewOSDir(dfdir), true) fs.Mount("rubble", sources.NewOSDir(rubbledir), true) fs.Mount("out", sources.NewOSDir(output), true) for i := range addonsdir { fs.Mount("addons", sources.NewOSDir(addonsdir[i])

[go-nuts] Re: [ANN] AXIS VFS - Simple, lightweight, virtual file system API

2016-10-25 Thread ChrisLu
Need some examples to understand the API. Chris On Friday, October 21, 2016 at 1:20:15 PM UTC-7, milo.chr...@gmail.com wrote: > > AXIS VFS public repository > > Today I am proud to announce the public release of AXIS VFS, a simple and > lightweight vi

[go-nuts] Re: cross-compile with cgo 'permission denied'

2016-10-25 Thread Dave Cheney
Unless you have built Go from source and/or your user owns the path Go is installed in, this is one of the few cases where go build is recommended over go install. http://dave.cheney.net/2015/08/22/cross-compilation-with-go-1-5 On Wednesday, 26 October 2016 05:09:18 UTC+11, Liam wrote: > > I h

[go-nuts] fsnotify: maintainers wanted

2016-10-25 Thread Nathan Youngman
Hi, Fsnotify provides notifications of changes to files and directories on BSD, Linux, Mac, and Windows. It is imported by ~800 projects (via godoc.org). While I would like to remain involved in fsnotify, I personally don't have enough cycles to handle all the incoming issues and pull requests

[go-nuts] cross-compile with cgo 'permission denied'

2016-10-25 Thread Liam
I have these commands in a package script: GOPATH="${srcdir}" go get -d -u "${_site}/${pkgname}" ... GOPATH="${srcdir}" GOOS=linux GOARCH=arm \ CC=arm-unknown-linux-gnueabihf-gcc CGO_ENABLED=1 \ go install -v -ldflags='-s -w -extld=$CC' "${_site}/${pkgname}" Results: runtime/cgo g

[go-nuts] Re: [ANN] DCLua - Lua 5.3 VM and compiler for Go

2016-10-25 Thread milo . christiansen
I don't have any number currently, and I no longer have the other VMs I tested installed any more. There is a disabled "benchmark" included in the package that will run a chunk of code in both my VM and the fastest of the ones I tested. If I remember correctly it was measurably slower, but well

[go-nuts] Re: [ANN] DCLua - Lua 5.3 VM and compiler for Go

2016-10-25 Thread chris.lu via golang-nuts
Thanks! I will try to use it in my project, which is a map reduce system in pure Go. But the computation is in Lua. Currently it support calling Luajit via an external OS process. https://github.com/chrislusf/gleam Maybe you can also post some perf numbers? Chris On Tuesday, October 25, 2016

[go-nuts] Re: Survey on Software Architectures

2016-10-25 Thread paraiso . marc
I'm on page 5 of the survey and still didn't get any question regarding software modelling. I stopped answering these questions. I'm not keen of survey methodology but I don't think most questions are relevant to the theme of the survey. I also think you should ask personal questions at the en

[go-nuts] [ANN] DCLua - Lua 5.3 VM and compiler for Go

2016-10-25 Thread milo . christiansen
GitHub Repository DCLua is a lightweight Lua 5.3 VM and compiler for embedding in Go programs. Most of the Lua standard library is implemented, the exceptions are due to implementation details, security, and just plain laziness... AFAIK there are two

[go-nuts] Re: Is it possible to enable http2 and have specific TLS configuration?

2016-10-25 Thread Dave Cheney
You have to depend on golang.org/x/net/http2 to opt in https://github.com/davecheney/httpstat/blob/master/main.go#L252 On Wednesday, 26 October 2016 03:46:31 UTC+11, Moshe Litvin wrote: > > The code in net/http/transport.go (onceSetNextProtoDefaults) contain: > > if t.TLSClientConfig != nil ||

[go-nuts] Is it possible to enable http2 and have specific TLS configuration?

2016-10-25 Thread Moshe Litvin
The code in net/http/transport.go (onceSetNextProtoDefaults) contain: if t.TLSClientConfig != nil || t.Dial != nil || t.DialTLS != nil { // Be conservative and don't automatically enable // http2 if they've specified a custom TLS config or // custom dialers. Let them opt-in themselves via //

Re: [go-nuts] Hosting godoc internally for private git server

2016-10-25 Thread Jonathan Yu
It looks like the source code for godoc.org is available, but there's not a whole lot of instructions on use (my guess is they don't intend for it to be used in your intranet): https://github.com/golang/gddo That means you'll need to roll up your sleeves and dig into the code, probably modifying i

[go-nuts] Re: I can't build golang

2016-10-25 Thread Dave Cheney
It looks like you have many conflicting versions of Go all smoshed on your machine at the moment. You proably have something from homebrew; uninstall that first. Then look in /usr/local/go and remove that. Check /etc/paths.d for anything that is adding a go version to your path and remove that.

Re: [go-nuts] Hosting godoc internally for private git server

2016-10-25 Thread Kareem Gan
Ah. But I need it to download the repositories from my organizations enterprise github server through. On Tue, Oct 25, 2016 at 09:55 Pietro Gagliardi wrote: > Is imitating golang.org not sufficient? It will still show you all the > packages in your $GOPATH in the Packages page: > > http://imgur.c

Re: [go-nuts] Hosting godoc internally for private git server

2016-10-25 Thread Pietro Gagliardi
Is imitating golang.org not sufficient? It will still show you all the packages in your $GOPATH in the Packages page: http://imgur.com/EGpqWsR > On Oct 25, 2016, at 10:36 AM, Kareem Gan wrote: > > So it's not possible? It would be really helpful if someone here has done it > already and share

Re: [go-nuts] Hosting godoc internally for private git server

2016-10-25 Thread Kareem Gan
So it's not possible? It would be really helpful if someone here has done it already and share the knowledge how. On Thursday, October 20, 2016 at 12:35:10 PM UTC-5, Pietro Gagliardi (andlabs) wrote: > > You can go get golang.org/x/tools/cmd/godoc and run the godoc tool > itself, which will imi

[go-nuts] I can't build golang

2016-10-25 Thread voxsim
I can't build golang due to cycle problem. ### What version of Go are you using (`go version`)? The version on my pc is go version go1.7.1 darwin/amd64, but i downloaded a fresh version from git. ### What operating system and processor architecture are you using (`go env`)? ``` GOARCH="amd64"

[go-nuts] Survey on Software Architectures

2016-10-25 Thread ozkaya . mert . 1
Dear All, We're conducting a survey on software architecture modelling whose link is http://bit.ly/2bGpSN4 The survey aims at better understanding the practical knowledge and experience of practitioners on software architecture modelling languages. If you spend 3-7 mins to fill the survey, we wo

Re: [go-nuts] Re: do i need to wait all child routine exit

2016-10-25 Thread Nick Patavalis
On Tuesday, October 25, 2016 at 5:17:10 PM UTC+3, Axel Wagner wrote: > > I suggest using errgroup > (and/or context.Context in > general) instead of rolling your own cancellation and timeout logic. It > shoul

Re: [go-nuts] XML parsing of simple array of tags

2016-10-25 Thread Kiki Sugiaman
Not a problem, glad it helped! Yeah, basically a code snippet leaves less room for guesses than "I have done so and so". Not that it's that big of a deal. I also solve my own problem before asking it half of the time while trying to distill, write it down for others to reproduce. -- You rece

Re: [go-nuts] Re: do i need to wait all child routine exit

2016-10-25 Thread 'Axel Wagner' via golang-nuts
I suggest using errgroup (and/or context.Context in general) instead of rolling your own cancellation and timeout logic. It should make it pretty much trivial to kick off all the queries and cancel the context on

[go-nuts] Re: do i need to wait all child routine exit

2016-10-25 Thread Nick Patavalis
Hi, You don't *need* to wait for the goroutines to exit, per se, but, as far as I can tell, your code will panic when it "return"s and one of the still-running resolver goroutines try to send to the closed channel. One solution would be *not to close the channel upon return*. The channel will

Re: [go-nuts] XML parsing of simple array of tags

2016-10-25 Thread Ken MacDonald
Hi Kiki, Thanks - the first part did the trick! I'd have posted what I had tried, except that I tried probably a dozen variations on different themes, and can't even remember them all Also, appreciate the second part of your example - that may come up useful someday. I've got a couple of thing

[go-nuts] Re: iconvg: a compact, binary format for simple vector graphics

2016-10-25 Thread Sean Russell
Hi, On Monday, October 24, 2016 at 2:52:48 AM UTC-4, Nigel Tao wrote: > > The Material Design icon set (https://design.google.com/icons/) > consists of 961 vector icons. As SVG files, this totals 312,887 bytes. > As 24*24 pixel PNGs, 190,840 bytes. As 48*48 pixel PNGs, 318,219 > bytes. As IconV

Re: [go-nuts] XML parsing of simple array of tags

2016-10-25 Thread Kiki Sugiaman
Does either of the two results from the following code give you what you want? https://play.golang.org/p/Dh1N1xPxiw Btw, it wouldn't hurt posting what you have tried to do if you have tried them. It makes it easy for those who want to give you a suggestion :) -- You received this message be

Re: [go-nuts] issue with sending JSON via HTTP

2016-10-25 Thread Pietro Gagliardi
ioutil.ReadAll() returns a []byte, which already represents the data in JSON form. You do not need to marshal it agian; in fact, you do not want to marshal it again, because then you'll get, as per encoding/json's documentation, the base64-encoded byte stream as a string, which is not right. Ins

Re: [go-nuts] do i need to wait all child routine exit

2016-10-25 Thread Ken MacDonald
You should not need to wait for more than a single response if any of the responses will do the job. I've done this querying several distributed DBs for an answer, and just taking the one that comes back fastest. On Tue, Oct 25, 2016 at 2:53 AM, wrote: > in my case, i have serval child routine f

Re: [go-nuts] issue with sending JSON via HTTP

2016-10-25 Thread Henrik Johansson
It seems like you encode the valid json string? If you have a string that is json you should be able to post the string as is no? Just make sure you set the application/json content type. tis 25 okt. 2016 kl 14:32 skrev Rich : > Hi All, > > I have code that is similar to this: > https://play.gol

Re: [go-nuts] Profiling live webserver application

2016-10-25 Thread Shawn Milochik
The net/pprof package works great for this. What do you get when you run one of these? go tool pprof http://localhost:6060/debug/pprof/profile or go tool pprof http://localhost:6060/debug/pprof/heap You may have to replace port 6060 with the port you're actually listening on. Once you're in the

[go-nuts] issue with sending JSON via HTTP

2016-10-25 Thread Rich
Hi All, I have code that is similar to this: https://play.golang.org/p/zZ8EQ-R6cb When I run it I get the following error: 2016/10/25 12:19:56 Body: 400 {"message":"The JSON stream reader doesn't support chunking."} So I changed my code to this: https://play.golang.org/p/NYV5SdCtnt and I get t

Re: [go-nuts] Re: Assign a string representation to an enum/const

2016-10-25 Thread yashronaldo07
I tried this thing but it doesn't work. In my example the type for Count is displayed as AggregationFuncEnum, but for Sum it is only string. https://play.golang.org/p/ioemgmE0Sm On Thursday, November 28, 2013 at 11:52:20 PM UTC+5:30, Rodrigo Kochenburger wrote: > > I'm gonna second what bronze s

[go-nuts] do i need to wait all child routine exit

2016-10-25 Thread dkxulei
in my case, i have serval child routine for query for dns record, but i just need a answer code looks like: recvChan := make(chan *dnsRecord, 1) defer close(recvChan) for _, server := range DnsServers { go doResolve(server, req, recvChan) // query ip address }

[go-nuts] XML parsing of simple array of tags

2016-10-25 Thread Ken MacDonald
I'm parsing a fairly large XML stream using "encoding/xml"; most of it seems to work fine, but I have a couple of bits like: 4.00 10.00 and: 1 2 3 7 8 10 where I haven't been able extract those values as an array. I would like to get the values back as strings, not numerics. I've tried a

Re: [go-nuts] allow &int{3}, &bool{true} etc

2016-10-25 Thread roger peppe
On 24 October 2016 at 21:14, Nate Finch wrote: > Because it's consistent with how you get a pointer for other types... if I'm > used to using &T{x} for structs, maps, and slices, then it's perfectly > natural to try that with builtins and arrays. If someone says "oh, sorry, > for ints you have to

[go-nuts] Freetype performance

2016-10-25 Thread David M.
Hi, I'm using Go freetype (https://github.com/golang/freetype) for a 3D app using OpenGL. At each frame one portion of the text displayed changes, so I call DrawString() and upload the new image to OpenGL. After some profiling I know that the program runs at 350fps without the DrawString() cost

Re: [go-nuts] iconvg: a compact, binary format for simple vector graphics

2016-10-25 Thread roger peppe
This looks really cool, thanks! Would there be some advantage in making the Rasterizer types in shiny/iconvg and image/vector somewhat more uniform in the types they use? For example, vector.Rasterizer seems to use f32.Vec2 pairs everywhere, but iconvg.Rasterizer uses individual x, y arguments. H

[go-nuts] Is os.exec thread safe ?

2016-10-25 Thread Dave Cheney
os.Exec is thread safe. -- 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.com. For more options, visit https://groups.google.co

[go-nuts] Is os.exec thread safe ?

2016-10-25 Thread Jianjun Mao
Hi all, I have a HTTP job server which will receive jobs and start them at background in another go routine. A job may run many external commands (e.g. ethtool, supervisorctl ...). But my server may hang after running a few hours. The server has no log output and can't receive any HTTP request.

Re: [go-nuts] Re: iconvg: a compact, binary format for simple vector graphics

2016-10-25 Thread Nigel Tao
On Tue, Oct 25, 2016 at 4:31 PM, Daniel Theophanes wrote: > My understanding is that the original rust font render code could replace > something like FreeType. Do you envision using iconvg and vector as a > replacement for the go freetype package, where font glyphs would be loaded > in as iconvg

Re: [go-nuts] iconvg: a compact, binary format for simple vector graphics

2016-10-25 Thread Nigel Tao
On Tue, Oct 25, 2016 at 2:13 AM, Pietro Gagliardi wrote: > I wonder if there's a way to simulate elliptical gradients with only circular > gradients and affine transformations, so package ui can also render these > files directly using the system native vector graphics APIs. I'd expect that you