[go-nuts] Tool for vendoring using git submodules

2016-06-25 Thread e . kovetskiy
Hi, check this out https://github.com/kovetskiy/manul -- 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,

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Michael Soulier
On Saturday, June 25, 2016 at 8:53:53 PM UTC-4, Michael Soulier wrote: > > Unfortunately not. runsv starts the logger and connects the service's > stdout to the logger's stdin. It opens this pipe even if the service isn't > up yet, so when you read from stdin, it immediately returns with an EOF,

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Dave Cheney
That doesn't sound right. Reading from a pipe should only get EOF when the other side of the pipe is closed. On Sunday, 26 June 2016 10:53:53 UTC+10, Michael Soulier wrote: > > On Saturday, June 25, 2016 at 4:19:34 PM UTC-4, Janne Snabb wrote: >> >> You should not be using select in the first pla

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Michael Soulier
On Saturday, June 25, 2016 at 4:19:34 PM UTC-4, Janne Snabb wrote: > > You should not be using select in the first place. You are making things > complicated for no reason whatsoever. (If I understand your intention > correctly.) > > You should just read from os.Stdin. It will block until there

Re: [go-nuts] cgo not building on darwin

2016-06-25 Thread andrey mirtchovski
two things: - you need import "C" separated and following the C code immediately. them's the rules. - OSX defines _FD_SET in /usr/include/sys/_types/_fd_def.h (it's an empty #define). change the name to something else. On Sat, Jun 25, 2016 at 2:06 PM, Michael Soulier wrote: > Experimenting with

[go-nuts] Re: Gosched: What does it mean by "It does not suspend the current goroutine, so execution resumes automatically."

2016-06-25 Thread Roberto Zanotto
Don't worry, Gosched does what you want. I believe that "execution resumes automatically" is in the docs just to clarify that the goroutine is not suspended waiting for something and that no other action is required to wake up a goroutine that calls Gosched. On Saturday, June 25, 2016 at 11:23:0

Re: [go-nuts] small defect in os.exec.LookPath

2016-06-25 Thread mhhcbon
Ahm. Very subtle. Changed it to bin := "" bin, err = exec.LookPath(os.Args[0]) if err == nil { wd = filepath.Dir(bin) } thanks for the feedback! Le dimanche 26 juin 2016 00:00:51 UTC+2, Jan Mercl a écrit : > > On Sat, Jun 25, 2016 at 11:19 PM mhhcbon >

[go-nuts] [ANN] go-msi: generate msi package with ease

2016-06-25 Thread mhhcbon
Hi, I have released a project to easily generate MSI package on top of wix. I made it primarily to enhance usability of my Go packages, but it can be used for non go projects too. It can handle multiple directories, multiple files, environments variable, and shortcuts. https://github.com/mh-c

Re: [go-nuts] small defect in os.exec.LookPath

2016-06-25 Thread Jan Mercl
On Sat, Jun 25, 2016 at 11:19 PM mhhcbon wrote: > bin, err := exec.LookPath(os.Args[0]) Note that this err variable is shadowing the one declared previously. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

[go-nuts] Gosched: What does it mean by "It does not suspend the current goroutine, so execution resumes automatically."

2016-06-25 Thread Kyle Stanly
What I mean is, if I wish to yield to allow another Goroutine to run, why would it "execution resume automatically"? I would expect it to immediately give up it's time-slice, put itself at the end of the processor's 'p' run-queue, and thats it. Does it only yield the processor immediately after

[go-nuts] small defect in os.exec.LookPath

2016-06-25 Thread mhhcbon
Hi, i notice a case where LookPath is not really looking for PATH. I have a bin with some files along it, i need to get its path at runtime to find the other files. I use a func like this, minus the fmt prints func getBinPath() (string, error) { var err error wd := "" if filepath.Base

Re: [go-nuts]

2016-06-25 Thread Justin Israel
On Sat, Jun 25, 2016 at 11:25 PM Oleg Puchinin wrote: > Hello ! > How to make (and load) GUI form in Go ? > Pick a GUI library: https://github.com/avelino/awesome-go#gui > > Oleg. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To uns

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Janne Snabb
On 2016-06-25 22:59, Michael Soulier wrote: > I'm curious as to what I'm doing wrong with select here, and if it's > possible to do this with a goroutine like you describe. You should not be using select in the first place. You are making things complicated for no reason whatsoever. (If I understa

[go-nuts] cgo not building on darwin

2016-06-25 Thread Michael Soulier
Experimenting with a little cgo, I did this package main /* #include #include static void _FD_SET(int sysfd, void *set) { FD_SET(sysfd, (fd_set*)set); } */ import ( "C" "unsafe" "syscall" ...etc Unfortunately, I'm getting this on my Mac when I try to build. msoulier@merlin:~/

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Michael Soulier
On Saturday, June 25, 2016 at 11:31:57 AM UTC-4, Jessta wrote: > > You'll only get an EOF if the file descriptor has been closed, if it's > closed then you're not going to be able to read anything more anyway. > > What are you trying to do? > I'm trying to write a replacement for svlogd from th

[go-nuts] [ANN] go-mutesting v1.0 - Mutation testing for Go source code

2016-06-25 Thread Markus Zimmermann
Hi gophers! I would like to announce v1.0 of go-mutesting https://github.com/zimmski/go-mutesting The following has changed since the last release: - Added a build-in exec command so only the go-mutation binary is needed for mutation testing in the most common use-case. - Added a mutator for "c

[go-nuts] Unused var written in closure

2016-06-25 Thread Val
Hello It seems that this code doesn't compile : func main() { var err error err = f() } *prog.go:8: err declared and not used* but this one does : func main() { var err error g := func() { er

Re: [go-nuts] Re: x/text/runes: How can i replace LF by CRLF ?

2016-06-25 Thread mhhcbon
Thanks ! Works for me. I m looking forward to implement text stream processing. Next time maybe ! -- 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+uns

Re: [go-nuts] Urlwatch

2016-06-25 Thread Tamás Gulácsi
Start with https://github.com/lox/cachecontrol -- 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 h

Re: [go-nuts] Re: x/text/runes: How can i replace LF by CRLF ?

2016-06-25 Thread Matt Harden
Sorry, make that strings.NewReplacer("\r\n", "\r\n", "\n", "\r\n").Replace(mystring) On Sat, Jun 25, 2016 at 8:46 AM Matt Harden wrote: > Don't use x/text/runes for this. It's overkill. > > import "strings" > ... > strings.NewReplacer("\r\n", "\r\n", "\r", "\r\n").Replace(mystring) > > > On Fri

Re: [go-nuts] Re: x/text/runes: How can i replace LF by CRLF ?

2016-06-25 Thread Matt Harden
Don't use x/text/runes for this. It's overkill. import "strings" ... strings.NewReplacer("\r\n", "\r\n", "\r", "\r\n").Replace(mystring) On Fri, Jun 24, 2016 at 2:00 PM mhhcbon wrote: > I forgot to mention another difficulty i have using replacement. > > As it will receive only one rune at a t

Re: [go-nuts] Re: can't get Content-Type and Content-Disposition to force browser to display "file->save..." dialog in the web browser

2016-06-25 Thread Matt Harden
That's very strange. Why didn't Set work? Was there some already-existing Content-Disposition value in the header that you needed to retain? On Fri, Jun 24, 2016 at 7:57 AM David Marceau wrote: > The core problem was: > w.Header().Set("Content-Disposition","attachment;filename=" + > strOutputFil

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Jesse McNelis
On 25 Jun 2016 11:08 p.m., "Michael Soulier" wrote: > > Sure, but when you read and get an EOF you return immediately, so the goroutine would be busy waiting when there's nothing to read, would it not? > You'll only get an EOF if the file descriptor has been closed, if it's closed then you're not

Re: [go-nuts] Urlwatch

2016-06-25 Thread Mohammad Nasirifar
Btw I would like to work on it On Sat, Jun 25, 2016 at 5:16 PM, Mohammad Nasirifar wrote: > Btw I would like to work on it! > > On Sat, Jun 25, 2016 at 5:11 PM, Henrik Johansson > wrote: > >> Cache headers, etags etc and dynamic scheduling of re-fetch sounds >> useful. Why not start a little li

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Michael Soulier
On Friday, June 24, 2016 at 6:59:28 PM UTC-4, Ian Lance Taylor wrote: > > In Go you normally simply start a goroutine that reads from Stdin and > sends the data over a channel. > > Goroutines are cheap. > > Sure, but when you read and get an EOF you return immediately, so the goroutine would

Re: [go-nuts] Urlwatch

2016-06-25 Thread Mohammad Nasirifar
Btw I would like to work on that! On Saturday, June 25, 2016 at 5:11:34 PM UTC+4:30, Henrik Johansson wrote: > > Cache headers, etags etc and dynamic scheduling of re-fetch sounds useful. > Why not start a little library? > > On Sat, Jun 25, 2016, 13:51 Johann Höchtl > wrote: > >> >> >> Am Donn

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Michael Soulier
I thought I got select working but now it's returning immediately even without any input to stdin. // loop forever - we expect to be killed with a SIGTERM or SIGINT for { logger.Debug("going into select on stdin") var r_fdset syscall.FdSet for i := 0; i < 16; i++ {

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Michael Soulier
On Friday, June 24, 2016 at 7:10:55 PM UTC-4, graha...@gmail.com wrote: > > If you have a specific case that isn't covered by blocking in a > go-routine, you can always use the syscall's directly, with a very similar > API to what you would do in C. > > For example here's the epoll ones in stdli

Re: [go-nuts] Urlwatch

2016-06-25 Thread Henrik Johansson
Cache headers, etags etc and dynamic scheduling of re-fetch sounds useful. Why not start a little library? On Sat, Jun 25, 2016, 13:51 Johann Höchtl wrote: > > > Am Donnerstag, 23. Juni 2016 17:04:54 UTC+2 schrieb Shawn Milochik: >> >> What do you need it to do, specifically? Doing an http.Get o

Re: [go-nuts] Urlwatch

2016-06-25 Thread Johann Höchtl
Am Donnerstag, 23. Juni 2016 17:04:54 UTC+2 schrieb Shawn Milochik: > > What do you need it to do, specifically? Doing an http.Get on a page and > storing and comparing the bytes or a hash is something you could write in > under a minute. Why not just do that? > Get notified when a change happ

[go-nuts]

2016-06-25 Thread Oleg Puchinin
Hello ! How to make (and load) GUI form in Go ? Oleg. -- 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,