[go-nuts] Go-based Smart Home Hub

2017-08-03 Thread Tim
priate place to post Go hardware announcements. Tim -- 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

[go-nuts] Re: My trouble about GO interface

2018-08-09 Thread Tim Peoples
I think the confusion comes from how you're exposing each interface -- or rather, how you seem to imply their use. In your example, you provide packages pet and filepath each of which define a Walk interface *plus* one or more structs that implement that interface. But, neither package consumes

Re: [go-nuts] Confusion about gcWork put in golang source code runtime/mgcwork.go

2018-08-17 Thread Tim Xu
I am too dumb that i thought it was a slice. Thanks a lot : ) On Fri, Aug 17, 2018 at 11:01 PM Ian Lance Taylor wrote: > On Fri, Aug 17, 2018 at 3:28 AM, wrote: > > > > I am new to golang source code, and recently met a problem about > > understanding golang gc. > > > > In runtime/mgcwork.go: 1

Re: [go-nuts] Re: Ternary ... again

2018-08-18 Thread Tim Peoples
Regarding your issues with the following... > I've lost count of the times I've had to change: > > return FooBar{ > Field: blah, > } > > To: > > var foo FooBar > if someCond { > foo.Field = blah > } else { > foo.Field = bar > } > return foo > ...I hardly consider that to be idiomat

[go-nuts] Find package versions in a given binary

2018-08-24 Thread Tim Waugh
/tmp/go1.11rc2/go/pkg/mod/github.com/!masterminds/semver@v1.4.2/version.go But is there a more direct way? Thanks, Tim. */ -- 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 i

Re: [go-nuts] Find package versions in a given binary

2018-08-26 Thread Tim Waugh
On Fri, 24 Aug 2018, 18:30 Paul Jolly, wrote: > Take a look at https://github.com/rsc/goversion > > The -m flag should give you details of the modules used to build your > program. > Thanks, that's exactly what I was looking for. Tim. */ -- You received this mes

[go-nuts] Re: Any idea why b.String() does not reflect the changes done in vim?

2017-08-21 Thread Tim Heckman
Darwin kernel doesn't observe the changes, therefore trying to seek will only give you the data that the file descriptor saw at the time of opening. I am curious what the root cause is too, as this is interesting. Cheers! -Tim On Sunday, August 20, 2017 at 9:56:32 PM UTC-7, Alexandru Bon

[go-nuts] goconstraint: package for minimum Go version constraints at compile time

2017-08-27 Thread Tim Heckman
nstead of depending on my package. This package is super simple, and it seems like a great idea, so I plan on trying to make time to do this either tomorrow or Monday. I'm curious what the community thinks of this package. Is there another / better way to do this that I haven't realiz

[go-nuts] Re: error handling needs syntactical sugar

2017-09-07 Thread Tim Uckun
Totally not a go programmer but here are my worthless two cents. I don't see anything wrong with the try catch paradigm, you can choose your granularity. If you want to check every call then you can, if you want to let a few cluster together you can. You guys make is sound like go style error

Re: [go-nuts] Re: error handling needs syntactical sugar

2017-09-07 Thread Tim Uckun
>I *like* the way go does error passing, *because* it's constrained to handle errors explicitly. But it doesn't though. You can completely ignore the errors if you want. > >TBH, no. Not only do I not know what this is supposed to be doing (err.pop? of what? Why are we assigning to error? What is

[go-nuts] Choosing a framework

2017-09-09 Thread Tim Uckun
I am in the process of learning go and decided to do it by writing a (mostly) API based web site. I have been doing some research and have found the following. Revel: https://revel.github.io/ GoBuffalo: https://gobuffalo.io/ Iris: https://iris-go.com/ In addition there are "toolkits" like chi a

[go-nuts] Help with viper please.

2017-09-09 Thread Tim Uckun
I have this code v := viper.New() v.SetConfigFile("settings.yaml") v.AddConfigPath(".") v.AddConfigPath("./settings") v.AddConfigPath("./config") err := v.ReadInConfig() if err != nil { panic(fmt.Errorf("Error when reading config: %v\n", err)) } if as the instructions say I don't

[go-nuts] Re: Do you guys use ORMs when working with SQL?

2017-09-09 Thread Tim Uckun
Wow. the amazing amount of projects mentioned in this thread are interesting. Surprised that by now there isn't a well established leader or leaders for such a common need. On Sunday, September 10, 2017 at 10:01:51 AM UTC+12, Denis Isaev wrote: > > Take a look at kallax

Re: [go-nuts] Choosing a framework

2017-09-09 Thread Tim Uckun
Do you have experience with this? Can you say a couple of words about it? On Sun, Sep 10, 2017 at 11:53 AM, Rodolfo wrote: > https://echo.labstack.com/ > > 2017-09-09 19:51 GMT-04:00 Tim Uckun : > >> I am in the process of learning go and decided to do it by writing a >>

[go-nuts] Re: Choosing a framework

2017-09-10 Thread Tim Uckun
On Monday, September 11, 2017 at 12:56:40 PM UTC+12, Florin Pățan wrote: > > Given your list of choices, I would go for Buffalo as it's probably the > closest you can get to an idiomatic Go code base while not having magic in > the code and still be able to understand what's happening when thin

[go-nuts] Re: Help with viper please.

2017-09-10 Thread Tim Uckun
hope this helps. > > On Sunday, September 10, 2017 at 2:05:40 AM UTC+2, Tim Uckun wrote: >> >> I have this code >> >> v := viper.New() >> v.SetConfigFile("settings.yaml") >> v.AddConfigPath(".") >> v.AddConfigPath

Re: [go-nuts] Re: Choosing a framework

2017-09-10 Thread Tim Uckun
2:18:54 PM UTC+12, Shawn Milochik wrote: > > On Sun, Sep 10, 2017 at 10:05 PM, Tim Uckun > wrote: > >> >> I understand the sentiment but I am really confused by this advice. Are >> you saying I should write everything myself? My own CSRF implementation, my >&g

Re: [go-nuts] Re: error handling needs syntactical sugar

2017-09-11 Thread Tim Uckun
| However, what's great for avoiding straightforward failures becomes a | nightmare when your goal is to guarantee that no undefined behaviour | happens It seems to me that if this is your goal other languages are more suitable. Erlang for example is famous for it's error handling capability, elm

Re: [go-nuts] Choosing a framework

2017-09-15 Thread Tim Uckun
At this point haven't you just built your own framework? You looked around, did some research, read a whole of documentation and decided that this set of components work well together and do what you want. It seems to me that a framework is the exact same thing except that somebody else has c

[go-nuts] Simple web crawler question. How to avoid crawling visited links?

2017-09-25 Thread Tim T
I did something similar for an interview some months ago. If you want to get some inspiration: https://github.com/TimTosi/crawlr -- 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, se

[go-nuts] Re: Bug report github.com/golang/glog

2017-11-18 Thread Tim Peoples
You're absolutely right -- and, if you'll notice, there's a TODO on the traceLocation.String() method to "clean this up". Granted, all it needs is a: if !t.isSet() { return "" } On Friday, November 17, 2017 at 5:27:49 PM UTC-8, Bri

[go-nuts] Re: Dangers of package renaming

2017-12-05 Thread Tim Peoples
You may want to consider using a type alias -- similar to how golang.org/x/net/context is being transitioned to the standard library's context package. Also, Russ Cox wrote an excellent article abou

[go-nuts] github repo names with "go-" prefix?

2017-12-23 Thread Tim Peoples
I've noticed a somewhat common practice of people naming their github repositories with a "go-" prefix (and then, of course, subsequently dropping the prefix in the actual package name) -- yet a similar naming scheme doesn't seem to be commonplace among many other languages. Is this recommende

[go-nuts] Re: github repo names with "go-" prefix?

2017-12-23 Thread Tim Peoples
yet may often be interpreted as a recommendation. However, I'll assume the genesis is elsewhere. On Saturday, December 23, 2017 at 10:18:14 AM UTC-8, Tim Peoples wrote: > > > I've noticed a somewhat common practice of people naming their github > repositories with a "go-

[go-nuts] Re: github repo names with "go-" prefix?

2017-12-23 Thread Tim Peoples
On Saturday, December 23, 2017 at 11:06:35 AM UTC-8, Dave Cheney wrote: > > On Sunday, 24 December 2017 05:18:14 UTC+11, Tim Peoples wrote: > > I've noticed a somewhat common practice of people naming their github > repositories with a "go-" prefix (and

Re: [go-nuts] github repo names with "go-" prefix?

2017-12-23 Thread Tim Peoples
On Saturday, December 23, 2017 at 11:36:45 AM UTC-8, Jakob Borg wrote: > > On 23 Dec 2017, at 19:18, Tim Peoples > > wrote: > > > > I've noticed a somewhat common practice of people naming their github > repositories with a "go-" prefix (and the

[go-nuts] Re: github repo names with "go-" prefix?

2017-12-24 Thread Tim Peoples
...and yet, a vast majority of the instances where I see a go package hosted as "github.com/user/go-foobar", they are not using gopkg.in. I'm w/ Dave on this one; except in very rare instances, this shouldn't be done (and even then, you should try find a way to avoid it). Also, in many ways, t

[go-nuts] Re: gofmt: one line if statement

2018-01-07 Thread Tim Heckman
err`, followed by a hotkey, and I get the block formatted out for me. This makes it even less of an issue for me personally. If-anything, my preference would be for `gofmt` to forbid single-line func literals and to make them multi-line always. Cheers! -Tim On Sunday, January 7, 2018 at 1:09:4

Re: [go-nuts] Re: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-08-31 Thread Tim Hawkins
I would have expected that aside from informing about general performance, one of the purposes for benchmarks would have been to create pressure for improvement of key features of the laguage, this seems to circumvent this, im not dure what they are trying to achive. Perhaps restrictions on only us

Re: [go-nuts] interactive debugger for go ??

2016-09-06 Thread Tim Hawkins
If you install the go plugin on intelij (community or paid) and install the delve debugger, you get a full go ide with interactive visual debugging for go. On 7 Sep 2016 00:44, "Bruno Albuquerque" wrote: > https://github.com/derekparker/delve > > Em ter, 6 de set de 2016 às 13:42, JM escreveu:

[go-nuts] Re: interactive debugger for go ??

2016-09-09 Thread Tim Shannon
Visual Studio Code has a great Go implementation with the Delve debugger built in, and it runs on windows / mac / linux. On Tuesday, September 6, 2016 at 11:42:13 AM UTC-5, JM wrote: > > Will there be a debugger that will allow me to step into my code, watch > the flow, and go line by line in

Re: [go-nuts] What 5 things does Go need in 2017?

2016-09-12 Thread Tim Hawkins
Especialy since the distros often lag the release cycle by quite a bit. 1.7.x is not due on Fedora until release 25, which is several months away. On 12 Sep 2016 09:58, "Dave Cheney" wrote: An 'official' deb/apt/yum repo for Go would be much appreciated, https://github.com/golang/go/issues/10965

Re: [go-nuts] What 5 things does Go need in 2017?

2016-09-12 Thread Tim Hawkins
But fedora for example is stuck on 1.6 until fedora 25 is released, its a simular situation to elasticsearch, distro version is old, and has severe limitations, nobody in thier right mind would install from there. Far far safer to use the official version fom the elastic.co site. The same is true

[go-nuts] do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
with the latest Go? Thank you. Tim -- 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 optio

[go-nuts] Re: do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
OK, so all that should happen is just re-install the binaries in $GOPATH/bin. Does anyone have any tips or helper scripts that help automate re-installing all these binaries? There's a pile of them which makes it a bit difficult to find out what exact package path they came from so they can be

Re: [go-nuts] Re: do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
, 'go list all', and also > how to query individual folders inside GOPATH. > > "go build -i" will ensure that prerequisite library dependencies are > also installed, which will populate the entire pkg/* directory. > > On Wed, Sep 28, 2016 at 9:30 AM, Tim K >

Re: [go-nuts] Re: do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
On Wednesday, September 28, 2016 at 2:31:44 PM UTC-7, andrey mirtchovski wrote: > > > If I want to start from the executables in $GOPATH/bin and recompile > only > > those, is there a way to tell what package an executable comes from so I > can > > easily automate the process? E.g. goimports

[go-nuts] Suggestions for parsing Forwarded HTTP Header (RFC 7239)

2016-10-08 Thread Tim Heckman
ire about implementing a parser, in the "mime" package, that's capable of extracting the parameters from all "Forwarded" header values of a request? Is this a better fit for a third-party package? Cheers! -Tim [1] https://tools.ietf.org/html/rfc7239 [2] https://golang.o

[go-nuts] Re: Suggestions for parsing Forwarded HTTP Header (RFC 7239)

2016-10-11 Thread Tim Heckman
Hi Gophers! I ended up implementing a package for parsing the header. It didn't seem like there was anything else purpose-built for it: * https://github.com/theckman/httpforwarded Any feedback on the code, or the project in general, is welcome. Cheers! -Tim On Saturday, October 8, 2016

Re: [go-nuts] Go 1.7.3 is released

2016-10-19 Thread Tim Henderson
I can reproduce that error. Here is my `go env` output the test output is identical. $ go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/hendersont/stuff/code/godev" GORACE="" GOROOT="/home/hendersont/srcs/go" GOTOOLDIR="/home/hendersont/srcs/

[go-nuts] [ANN] - BoltHold - An embeddable NOSQL store for Go Types built on BoltDB

2016-11-16 Thread Tim Shannon
I've used BoltDB in a quite a few projects, and have found it to be fast and very reliable. But I've found that I was writing the same serialization and filtering code for each project, so I thought I'd try and build a more generic, reusable solution for storin

Re: [go-nuts] [ANN] - BoltHold - An embeddable NOSQL store for Go Types built on BoltDB

2016-11-17 Thread Tim Shannon
n Thursday, November 17, 2016 at 8:52:53 AM UTC-6, Diep Pham wrote: > > This looks very interesting. How does it compare to > https://github.com/asdine/storm? > > Tim Shannon wrote: > > I've used BoltDB <https://github.com/boltdb/bolt> in a quite a few > >

[go-nuts] Anatomy of a go web application

2016-12-04 Thread Tim Shannon
I just finished writing a blog post to give an overview of building a web application in go. http://tech.townsourced.com/post/anatomy-of-a-go-web-app/ It was kind of an excuse to play with hugo , but hopefully there's some good information in there as well. Any corrections,

[go-nuts] Re: Can searchbox on golang.org be improved?

2016-12-15 Thread Tim K
Instant search would be nice, in particular for APIs. Google surely has the technology to improve the search box on golang.org Meanwhile, for API searches you can use: http://devdocs.io/go/ Or desktop apps such as Dash (Mac) or Zeal (Win/Linux). On Thursday, December 15, 2016 at 7:59:44 AM UTC

[go-nuts] Re: Anatomy of a go web application

2017-01-17 Thread Tim Shannon
FYI, I've added a second post that gives some specifics on Authentication and password handling, if anyone is interested. http://tech.townsourced.com/post/anatomy-of-a-go-web-app-authentication/ On Sunday, December 4, 2016 at 10:36:45 PM UTC-6, DrGo wrote: > > Thanks Tim, > Very

Re: [go-nuts] [ANN] - BoltHold - An embeddable NOSQL store for Go Types built on BoltDB

2017-01-17 Thread Tim Shannon
55:27 PM UTC-6, Tim Shannon wrote: > > This is the first I've heard of storm, looks like it currently has more > features (some I think I might try and implement in bolthold). I think > bolthold's querying is a bit simpler to understand, but I may be biased in > that re

Re: [go-nuts] How to be safe in Go?

2016-06-24 Thread Tim Hawkins
That is a lofty goal, and not always achievable, many libraries are not self contained and often wrap other non-go libraries or device integration libraries that don't support that model. What people do inside a library should not be a language feature, otherwise the language is becoming overly op

[go-nuts] Re: Trying to dynamically find interfaces

2016-06-27 Thread Tim O'Brien
It's best to have a function to create your BaseAppController: func NewBaseAppContoller(subClasses ...interface{}) *BaseAppController { for _, i := range subClasses { } } On Monday, 27 June 2016 15:16:40 UTC+1, David Koblas wrote: > > I've got a program that is trying to implement functions on

Re: [go-nuts] Re: Reverse proxy with HTTP2 support

2016-07-13 Thread Tim Hawkins
https://github.com/containous/traefik On 14 Jul 2016 2:13 a.m., "Kevin Klues" wrote: > Im curious about this as well. Are there any plans to build native support > for a reverse proxy that can directly forward HTTP/2 traffic to a backend > server? If not, does anyone know of a usable external pro

Re: [go-nuts] Understanding HTTP server latencies

2016-07-18 Thread Tim Hawkins
Check also that you dont have any ulimits that are limiting the maximum concurrent open files, each socket is a file handle, if you dont open it up you can starve the vegita host of outbound connections. It may be worth firing up 10 t1.micro instances and run 10th of the load from each. On 18 Jul

Re: [go-nuts] Go is for everyone

2016-07-19 Thread Tim Hawkins
My personal experience is as somebody comming from almost 3 decades of oop with c++ and java, while there are a lot of tutorials etc for folks starting out with go as a first or second language. I find there is a lack of support for people moving from other languages and other methodologies. On 2

Re: [go-nuts] Go is for everyone

2016-07-19 Thread Tim Hawkins
gs such as strings and numbers, use >> of the terminal, finding stuff in the standard library are very poorly >> covered and maybe we/I should start there. >> >> Another simple thing I've been meaning to do so many times: provide >> example tests for the standard

Re: [go-nuts] Controlling VMware ESXi from Go

2016-07-21 Thread Tim Hawkins
Do they have an OpenStack wrapper for ESXi? If they do that is probaly an easier target to be looking at# http://docs.openstack.org/kilo/config-reference/content/vmware.html It does seem to exist for vSphere. https://github.com/openstack/golang-client Openstack golang client. Upside is that y

Re: [go-nuts] How do i create a fake drive that shows up in windows explorer?

2016-07-28 Thread Tim Hawkins
Look at FUSE, its a userland filesystem driver system. https://github.com/hanwen/go-fuse On 29 Jul 2016 7:31 a.m., "Justin C" wrote: > Good afternoon, > I am trying to create a fake (virtual?) drive that would display a > programmatic generated file system tree that when the user clicks on a fi

[go-nuts] Re: Wrestling with Mingw64 on Windows

2017-01-30 Thread Tim O'Brien
I've been using CGO on Windows for a while it works well. I followed Andrew Gerrand's advice here: https://groups.google.com/forum/#!topic/golang-dev/Rjgft0z8ICo I installed TDM-GCC, and then Go. See the discussion there. Tim On Tuesday, 31 January 2017 02:32:34 UTC+11, Arie van

Re: [go-nuts] memory gc when slice shortcut

2017-03-09 Thread Tim K
On Thursday, March 9, 2017 at 2:48:05 AM UTC-8, Jan Mercl wrote: > > On Thu, Mar 9, 2017 at 11:45 AM 代君 > > wrote: > > > I have a []*Struct, at some times it length grow to 1000, after that, > the slice be shortcut to length of 10, and never grow to 1000 again. > > dose the memory of *Struct at

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Tim K
gofmt documentation says: Gofmt formats Go programs. It uses tabs (*width = 8*) for indentation and > blanks for alignment. > https://golang.org/cmd/gofmt/ Just curious, any reason why it needs to specify the tab width = 8? Should that be removed if it's not relevant? Thanks! On Sunday, Mar

[go-nuts] Testing code within channel dispatchers/workers

2017-04-06 Thread Tim Jones
that the Run() function is dispatching to the right code blocks. I considered injecting an object into Run that has the codeBlockOne and codeBlockTwo methods on it, but now I'm doing a lot of refactoring away from what feels like the normal way to write this code. What's the common w

[go-nuts] RegexWriter - not sure if there's something equivalent out there

2020-02-26 Thread tim . dufrane
Hi all, Needed a writer that would let me take actions based on input but didn't want much fuss, wrote a thing: https://github.com/timdufrane/regexwriter/. I'm no good at this "Github" stuff or this "good code" stuff but this did the trick for my use case and maybe it can help someone else. I'm

[go-nuts] subscribe

2020-06-16 Thread Tim Thompson
-- 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. To view this discussion on the web visit https://groups.google.com/d/m

[go-nuts] Re: go get with vanity import path and 404: fails

2020-06-20 Thread Tim Heckman
rt is missing quotes around it. I think fixing those up should solve the issue here. There is a larger question as to whether this code should return *both, *as it's hard to know which is correct and in this case it shared the wrong context. Cheers! -Tim On Saturday, June 20, 2020 at 4:38:03

Re: [go-nuts] Re: Graphic Go Algorithms: Graphically learn data structures and algorithms better than before

2020-06-27 Thread tim Hu
German user please try this link: https://www.amazon.de/dp/B08BFXNTFF Have a nice day. 在 2020年6月26日星期五 UTC+6上午11:42:47,Christian Staffa写道: > > it seems not to be available for germany users 🤬 > > Sent from my iPhone > > On 25. Jun 2020, at 21:20, Yesudeep Mangalapilly > wrote: > >  > Hey, than

[go-nuts] Anyone else writing an interpreter with Thorsten Ball?

2022-01-26 Thread Tim Hardcastle
How's it going? I'd just like to talk with someone who's doing the same thing, it's kind of a lonely hobby. I'm just about to start on the actual interpreter, I've got my lexer and parser working, and I also have a thing called a "relexer" which is kind of an elegant kludge that makes syntactic

[go-nuts] Re: Anyone else writing an interpreter with Thorsten Ball?

2022-01-28 Thread Tim Hardcastle
It's very well-explained and the code's easy to read. And you can build on it. I've been able to modify his code to my language spec, use syntactic whitespace instead of braces, utf8 instead of ASCII, my idea of how continuations should work, line numbers in error messages, the ability to defi

[go-nuts] Re: Why, oh why, do people do this? Things that annoy me in Go code.

2022-01-29 Thread Tim Hardcastle
Agree with Rudolf on point 2. Long meaningful variable/function names are good. Comments become obsolete, they become detached from their code, they're only used to explain the name of the variable once and then you're left with something than reads // urn contains the userlist fxn := rx (frn)

Re: [go-nuts] Re: Why, oh why, do people do this? Things that annoy me in Go code.

2022-01-30 Thread Tim Hardcastle
reviations, how good one's memory is, how fast one types, etc. Personally I find I just mess up less since I've learned to be more verbose. On Saturday, January 29, 2022 at 9:00:49 AM UTC-8 david@gmail.com wrote: > On Sat, Jan 29, 2022 at 6:21 AM Tim Hardcastle > wrote:

[go-nuts] Preemptive interfaces in Go

2022-08-08 Thread Tim Peoples
considered the norm with Go? Or, should I just shut up and crawl back into my hole? TIA, Tim. -- 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 gola

Re: [go-nuts] Preemptive interfaces in Go

2022-08-08 Thread Tim Peoples
oducer -- for one and only one impl -- and then adding a bunch of extra (often autogenerated) code to deal with that. t. On Monday, August 8, 2022 at 11:02:31 AM UTC-7 bse...@computer.org wrote: > On Mon, Aug 8, 2022 at 11:17 AM Tim Peoples wrote: > >> >> For years I've r

Re: [go-nuts] Preemptive interfaces in Go

2022-08-08 Thread Tim Peoples
face defines the API contract). I suspect you and I are saything the same thing. t. On Monday, August 8, 2022 at 12:51:29 PM UTC-7 bse...@computer.org wrote: > On Mon, Aug 8, 2022 at 12:51 PM Tim Peoples wrote: > >> I don't necessarily consider the "multiple implement

Re: [go-nuts] Preemptive interfaces in Go

2022-08-09 Thread Tim Peoples
peoples.com wrote: >> >>> I can't speak to the *auto-generated swagger client* case but I believe >>> gRPC is still doing things the right way -- in that the framework defines >>> an interface I (the framework API consumer) then implements. IOW: I don't &

Re: [go-nuts] Preemptive interfaces in Go

2022-08-09 Thread Tim Peoples
ode meets certain standards and is *idiomatically Go.* It took me ~15 months and just under 60 CRs to get Go *readability* (compared to 4 months and 3 CRs for Python). On Tuesday, August 9, 2022 at 1:08:42 PM UTC-7 bse...@computer.org wrote: > On Tue, Aug 9, 2022 at 1:52 PM Tim Peoples wr

Re: [go-nuts] Preemptive interfaces in Go

2022-08-10 Thread Tim Peoples
Responses inline... On Wednesday, August 10, 2022 at 1:17:21 AM UTC-7 Henry wrote: > Someone mentioned that data is data and there is no need to hide > implementation details. If we are to use that reasoning, there is no need > for Go to allow un-exported fields/types/functions. Why do we need

[go-nuts] Wrote a language in Go --- how to do FFI, ineteroperability etc?

2022-08-14 Thread Tim Hardcastle
ok called "Let's Write An FFI In Go!" with cartoons in it. Failing that, what should I be looking at? Thanks for your advice. Tim. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] Re: Error handling

2023-07-31 Thread Tim Casey
ergy (at least by me as an outside observer). Having something which fits within the design of the language, making it a developer centric language, would seem to fight with any one-line-template approach. tim The test and the handle all fit on one line. I dont think having a single line return, l

Re: [go-nuts] Re: Error handling

2023-07-31 Thread Tim Casey
e line, and up to this point has largely been ignored. In any event, i dont mean to be argumentative or even contrarian. Sorry if it comes across that way. tim On Mon, Jul 31, 2023 at 4:46 PM DrGo wrote: > Thanks for the valuable feedback, > The verbosity of error handling is the number on

Re: [go-nuts] Re: Parsing difficult JSON

2023-09-14 Thread Tim Casey
I solved this in some bizzaro way. Maybe what is needed is a json parser which is allowed to be multiple types. Or, another way to think about parsing which is easier on the type strictness, but still strongly typed. Like a duck typed struct of some sort. map[string]duck, where duck is allowed t

Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-10-11 Thread Tim Casey
I would put down Makefile includes for the supported targets and build each target at a time, as cross compiled shared libraries. This is easier for linux, harder for windows. But, you can build/export from docker containers as part of the overall build process to allow simulated build environment

Re: [go-nuts] Re: URL variables with net/http

2023-10-19 Thread Tim Casey
Gin does this directly. There is nothing complicated it does. Something like: group := engine.Group("/service/v1") group.GET("user/:id", handler) And then in the handler: id := c.Param("id") And the rest is what ever is yours. "engine" is a gin engine and 'c' is a gin context. On Thu, Oct

[go-nuts] [ REMOTE JOB ] CodePen

2017-10-23 Thread tim via golang-nuts
Hello Friend! We’re looking for a strong systems programmer to help push CodePen ’s editor capabilities forward. The applicant must be talented, dedicated and have a strong background in Docker and Ruby, with Golang as a plus. The candidate must be willing to work remotel

[go-nuts] Re: import paths - slash vs backslash

2018-02-19 Thread &#x27;Tim Hockin' via golang-nuts
Pinging this topic - does anyone know? On Fri, Nov 10, 2017 at 10:30 AM, Tim Hockin wrote: > Is it valid to say `import "github.com\foo\bar" (windows path > separators) or must it be "github.com/foo/bar"? I couldn't find a > canonical answer to this. > &g

[go-nuts] go install touches the result file even if no changes

2019-01-25 Thread &#x27;Tim Hockin' via golang-nuts
/home/thockin/src/go/bin/git-sync 1200f479c8ba86f70f0e4a885ecdd5f2 /usr/local/google/home/thockin/src/go/bin/git-sync ``` Is the desired behavior or just a side-effect? Is there any way to defeat it? Would a patch for this be shot down? Tim -- You received this message because you are subscribed

Re: [go-nuts] go install touches the result file even if no changes

2019-01-25 Thread &#x27;Tim Hockin' via golang-nuts
use, maybe I am limited in my imagination). Even Does it really matter if some corner cases result in spurious updates? On Fri, Jan 25, 2019 at 3:02 PM Ian Lance Taylor wrote: > > On Fri, Jan 25, 2019 at 1:07 PM 'Tim Hockin' via golang-nuts > wrote: > > > > Example:

Re: [go-nuts] go install touches the result file even if no changes

2019-01-25 Thread &#x27;Tim Hockin' via golang-nuts
n Fri, Jan 25, 2019 at 3:51 PM Tim Hockin wrote: > > > > I don't grok that reasoning - can you expand on it? Assume for a > > second that it did NOT update mtime if the result did not change. I > > can be confident that same mtime == no change, right? It doesn

Re: [go-nuts] go install touches the result file even if no changes

2019-01-26 Thread &#x27;Tim Hockin' via golang-nuts
On Fri, Jan 25, 2019 at 11:43 PM Paul Jolly wrote: > > Tim - in case it's of any interest, I am in the process of (re)writing > a dependency-aware wrapper around go generate that caches results in > an artefact cache (i.e. only re-runs code generation as required). Yes intereste

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread &#x27;Tim Hockin' via golang-nuts
Of course you are right, as usual. I just felt like that was a lot of hoop-jumping. People already chide me for my affinity for baroque Makefiles... On Sat, Jan 26, 2019 at 11:01 AM Ian Lance Taylor wrote: > > On Fri, Jan 25, 2019 at 7:55 PM Tim Hockin wrote: > > > > Fai

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread &#x27;Tim Hockin' via golang-nuts
If you want to see why people give me a hard time: https://github.com/kubernetes/kubernetes/blob/master/build/root/Makefile.generated_files And that's AFTER a massive simplification. On Mon, Jan 28, 2019 at 11:55 AM Ian Lance Taylor wrote: > > On Mon, Jan 28, 2019 at 11:44 AM Tim Ho

[go-nuts] import paths - slash vs backslash

2017-11-10 Thread &#x27;Tim Hockin' via golang-nuts
Is it valid to say `import "github.com\foo\bar" (windows path separators) or must it be "github.com/foo/bar"? I couldn't find a canonical answer to this. Thanks Tim -- You received this message because you are subscribed to the Google Groups "golang-nuts&qu

[go-nuts] `go test -i` considered helpful?

2016-09-01 Thread &#x27;Tim Hockin' via golang-nuts
he tests. So I changed my script to always `go test -i` followed by `go test` and lo, my tests run in 20% of the time. Am I doing something wrong? This feels really hacky - is it correct? Tim -- You received this message because you are subscribed to the Google Groups "golang-nuts" g

Re: [go-nuts] `go test -i` considered helpful?

2016-09-01 Thread &#x27;Tim Hockin' via golang-nuts
What's weird to me is that go test -i doesn't actually run tests. Maybe go test -I which does both? On Sep 1, 2016 11:41 AM, "Ian Lance Taylor" wrote: > On Thu, Sep 1, 2016 at 11:24 AM, 'Tim Hockin' via golang-nuts > wrote: > > I was running tests aga

[go-nuts] runtime.Caller ->

2016-08-14 Thread &#x27;Tim Hockin' via golang-nuts
I was playing with a method that wants to print the file:line of the caller. `runtime.Caller(1)` seems like it should do the trick, but I get ':2'. If I call `runtime.Caller(2)` instead it seems to work, but I don't know why, so I am reluctant to depend on that. Can anyone enlighten me? How can

Re: [go-nuts] runtime.Caller ->

2016-08-14 Thread &#x27;Tim Hockin' via golang-nuts
It is, in fact, a method on an embedded type. That means I can document it and it ceases to be a magic number! Thanks. On Aug 14, 2016 12:27 PM, "Ian Lance Taylor" wrote: > On Sun, Aug 14, 2016 at 11:10 AM, 'Tim Hockin' via golang-nuts > wrote: > > I was pla

Re: [go-nuts] runtime.Caller ->

2016-08-14 Thread &#x27;Tim Hockin' via golang-nuts
Edit: It looks like this has more to do with being an interface method than an embedded type. https://play.golang.org/p/I5XPdWR_O0 Is there a generic way to get the caller safely, or should I just check for and increment? On Sun, Aug 14, 2016 at 3:02 PM, Tim Hockin wrote: > It is, in fact

Re: [go-nuts] runtime.Caller ->

2016-08-14 Thread &#x27;Tim Hockin' via golang-nuts
On Sun, Aug 14, 2016 at 8:31 PM, Ian Lance Taylor wrote: > On Sun, Aug 14, 2016 at 3:33 PM, Tim Hockin wrote: >> Edit: It looks like this has more to do with being an interface >> method than an embedded type. >> >> https://play.golang.org/p/I5XPdWR_O0 > > Hmm

Re: [go-nuts] runtime.Caller ->

2016-08-14 Thread &#x27;Tim Hockin' via golang-nuts
Can I rely on "" not changing? On Sun, Aug 14, 2016 at 9:55 PM, Ian Lance Taylor wrote: > On Sun, Aug 14, 2016 at 9:41 PM, Tim Hockin wrote: >> On Sun, Aug 14, 2016 at 8:31 PM, Ian Lance Taylor wrote: >>> On Sun, Aug 14, 2016 at 3:33 PM, Tim Hockin wrote: >&g

Re: [go-nuts] runtime.Caller ->

2016-08-15 Thread &#x27;Tim Hockin' via golang-nuts
OK, is there ANY heuristic I can rely on find the "real" call frame? On Mon, Aug 15, 2016 at 10:17 AM, Ian Lance Taylor wrote: > On Sun, Aug 14, 2016 at 10:07 PM, Tim Hockin wrote: >> Can I rely on "" not changing? > > I'm sorry, that's a hard que

[go-nuts] timer Reset concurrent to receive

2017-01-25 Thread &#x27;Tim Hockin' via golang-nuts
ine. What I am seeking to know is whether this is considered "safe"? The receive is running concurrently to the Reset(). Will this cause problems inside Timer, beyond the potential "extra" delivery? Do I need to break the loop and stop receiving on it while the Reset() happe

Re: [go-nuts] timer Reset concurrent to receive

2017-01-25 Thread &#x27;Tim Hockin' via golang-nuts
Thanks! That makes sense. Does it make sense to update the docs to show the "select-with-default" mode of draining the channel instead? On Wed, Jan 25, 2017 at 10:20 AM, Ian Lance Taylor wrote: > On Wed, Jan 25, 2017 at 9:34 AM, 'Tim Hockin' via golang-nuts > wrote:

Re: [go-nuts] timer Reset concurrent to receive

2017-01-25 Thread &#x27;Tim Hockin' via golang-nuts
Lance Taylor wrote: > On Wed, Jan 25, 2017 at 10:30 AM, Tim Hockin wrote: >> Thanks! That makes sense. Does it make sense to update the docs to >> show the "select-with-default" mode of draining the channel instead? > > I guess I don't think so, as ther

Re: [go-nuts] timer Reset concurrent to receive

2017-01-25 Thread &#x27;Tim Hockin' via golang-nuts
ause. Thanks for the guidance! On Wed, Jan 25, 2017 at 11:47 AM, Ian Lance Taylor wrote: > On Wed, Jan 25, 2017 at 11:32 AM, Tim Hockin wrote: >> Better to have a documented race than a potential hang, though, yeah? >> If it delivers and then I Stop(), drain, Reset(), I might l

[go-nuts] 1.8 plugins and ABI

2017-02-23 Thread &#x27;Tim Hockin' via golang-nuts
on plugin-specific objects? Are there any concessions toward versioning? What happens if I add a method to a type in the host, but don't rebuild he plugin? Are functions/method calling conventions guaranteed to be consistent, or do compiler flags change that? Thanks! Tim -- You receiv

  1   2   >