|
I'd also really like to see a field report for the delve debugger on VS code, liteide, and atom. I've been meaning to look at it but I don't want to go through a bunch of install docs for something that may or may not be worth the trouble.
|
# ? Apr 17, 2016 23:37 |
|
|
# ? May 8, 2024 03:56 |
|
Just use IDEA Community plugin if you want full IDE experience with Go. It's not official (yet), but it's developed by JetBrains guys as a 20% project (just like Go itself used to be at Google). At this point nothing comes close. When it comes to debugging, though, it's probably IDEA > VS Code / Sublime >>> Atom. So, if you're used to, say, Sublime, there's no reason to switch to IDEA just for that, and Atom's plugin is improving as well.
|
# ? Apr 18, 2016 11:35 |
|
As someone coming from vim (albeit with a bunch of plug-ins) I must say that Atom is great. I've always thought that IDEA "feels" really sluggish (whatever that means, I feel the same about pyCharm, intellij, aptana, eclipse, etc), while Atom feels very snappy and unobtrusive. The only issue I've run into so far is that one of the plug-ins appears to eat my imports if I'm importing two different directories in the same Github repo. That's the sole issue I've run into so far, though. I also find that since my Go projects are not monolithic but tend to be more service oriented, a full IDE experience is probably not as helpful as it would be if I was working on a complex Python project or something.
|
# ? Apr 19, 2016 23:13 |
|
rvm posted:When it comes to debugging, though, it's probably IDEA > VS Code / Sublime >>> Atom. I just wanted to say, I spent about 80% of my time today at work writing Go on Microsoft VS Code on a Mac. I am pretty sure 12 year old me in the early 90s would have never guessed that in a million years.
|
# ? Apr 21, 2016 06:25 |
|
Hadlock posted:I just wanted to say, I spent about 80% of my time today at work writing Go on Microsoft VS Code on a Mac. I am pretty sure 12 year old me in the early 90s would have never guessed that in a million years. Same, for so many reasons.
|
# ? Apr 21, 2016 12:03 |
|
Go is neat. I'm by no means a serious programmer (more on the ops side of things, professionally), but drat does it make it easy to write relatively dumb things like overly complex (and automatically updating with our infrastructure) nagios checks. (To contribute to the editor discussion: emacs with Gomode, or TextWrangler if I'm on a mac.)
|
# ? Apr 26, 2016 04:12 |
|
I love how naturally Go handles both low-level and high-level stuff. I can be implementing an SSLv2 handshake one day and dealing in raw bytes easily (something I always hated doing in Python) and then just as easily (and readably) be working at a much higher level of abstraction and it all feels the same.
|
# ? Apr 26, 2016 12:39 |
|
Just noticed that shared libs are now a hot new experimental feature, after years of praising static-only. Reminds me of the original tech talks stressing how blazing fast the compiler was because hardly any optimizations had been implemented.
|
# ? May 7, 2016 16:27 |
|
How are the analytics libraries for go these days? Anything similar to pandas in Python?
|
# ? May 17, 2016 23:29 |
|
Mr. Crow posted:How are the analytics libraries for go these days? Anything similar to pandas in Python? Nothing like pandas really. The type system really fights against data frames. I implemented something like it using the reflect package but it was quite a mess and I would never use it for actual work.
|
# ? May 18, 2016 02:23 |
|
Mr. Crow posted:How are the analytics libraries for go these days? Anything similar to pandas in Python? Yeah, pretty good example of thing that is probably awful in golang. Stick to pandas :/
|
# ? May 18, 2016 02:36 |
|
so loving future posted:Yeah, pretty good example of thing that is probably awful in golang. Stick to pandas :/ To be fair pandas is pretty bad, but in golang it is only barely possible to do so it is even worse.
|
# ? May 18, 2016 02:52 |
|
Uhhhhh, stupid question about how channels work and my Google-fu is failing me this afternoon. Let's say I'm creating a hypothetical data struct that's a bunch of hostnames/platforms. Now let's say I want to ping each of these once and just return a confirmation that a certain host was completed back to the main function. My first inclination is to do something like this: code:
This is just a stupid simple example to help me understand how these things work. In a real example I am quite certain my design would be significantly different. e: okay, the problem is slightly different than I thought. If I close the channel, then I can't receive on it anymore. If I remove the close, my output looks like: code:
Winkle-Daddy fucked around with this message at 22:35 on Jun 27, 2016 |
# ? Jun 27, 2016 22:17 |
|
Winkle-Daddy posted:Uhhhhh, stupid question about how channels work and my Google-fu is failing me this afternoon. You're closing your channel before you read it. You probably want to do something like this: code:
|
# ? Jun 27, 2016 22:40 |
|
If you're unsure about the number of things you're going to pass on the channel, you can also use a WaitGroup. Notice that the WaitGroup needs to live in its own goroutine in order to be able to close the channel:code:
|
# ? Jun 27, 2016 22:58 |
|
so loving future posted:You're closing your channel before you read it. That was odd, I did: code:
code:
Dangerllama posted:If you're unsure about the number of things you're going to pass on the channel, you can also use a WaitGroup. Notice that the WaitGroup needs to live in its own goroutine in order to be able to close the channel: Thanks! I'll see if this is easier to work with next. I have a project where I'll need to spin off a large work load into various go routines and then organize them, so I'm just creating super small examples to help get my brain around how this all works.
|
# ? Jun 27, 2016 23:06 |
|
Winkle-Daddy posted:Thanks! I'll see if this is easier to work with next. I have a project where I'll need to spin off a large work load into various go routines and then organize them, so I'm just creating super small examples to help get my brain around how this all works. You might find these presentations/articles helpful, if you haven't seen them already: Go Concurrency Patterns Advanced Go Concurrency Patterns Go Concurrency Patterns: Pipelines and cancellation Go Concurrency Patterns: Context
|
# ? Jun 27, 2016 23:33 |
|
Missed the party, but you can just writecode:
|
# ? Jun 28, 2016 00:12 |
|
skul-gun posted:You might find these presentations/articles helpful, if you haven't seen them already: Thanks! These are really helpful and I should stop trying to learn from the language spec and standard library docs alone. Lonely Wolf posted:Missed the party, but you can just write Thanks for the tip! I thought it was silly you needed to use as bit bucket there if you didn't care about the iterator at all, now I know.
|
# ? Jun 28, 2016 16:04 |
|
Learning Go because we're using Youtube's open source mysql sharding toolset, Vitess. http://www.vitess.io Really cool poo poo. Why is thread so inactive, go is awesome.
|
# ? Oct 8, 2016 18:01 |
|
First Time Caller posted:Learning Go because we're using Youtube's open source mysql sharding toolset, Vitess. http://www.vitess.io There's not much to post about because all the legitimately cool poo poo is done by Rust and everyone's already argued out Generics etc. The language is so simple that there's not much to talk about especially once you realise it's Google re-inventing Java like Microsoft did with C#.
|
# ? Oct 8, 2016 18:19 |
|
Go rules so hard there's not much to say about it. Way more like a reimagined C than Java though. That it's GC'd is a red herring, outside of specific niches GC shouldn't be a thing devs should worry about. So vendoring is first class now, which rules hard. I got 99 problems but dependencies are never one. What do y'all think of glide vs godep vs? I've mostly used godep, but think it will probably be glide soon.
|
# ? Oct 8, 2016 19:19 |
|
VOTE YES ON 69 posted:Go rules so hard there's not much to say about it. Way more like a reimagined C than Java though. That it's GC'd is a red herring, outside of specific niches GC shouldn't be a thing devs should worry about. We used godep before 1.5 but have been using glide since and I prefer it. Not having to vendor dependencies and just relying on reproducible deploys via 'glide install' is nice. The tool lacks maturity in some areas but it's constantly being improved so I'm hopeful.
|
# ? Oct 8, 2016 20:04 |
|
Go briefly became my go-to server language before I got a job writing Elixir, and now I don't really see the point of Go on the server anymore. I doubt sheer computational performance is ever going to matter as much as scalability and concurrency, unless you're working on a small project where even Django or Rails would be fine, so Elixir/OTP wins in every single category I can think of. It's kind of ugly but so is Go, so vv
|
# ? Oct 8, 2016 22:01 |
|
I think glide is the up and comer. At Gophercon more people raised their hands when Kelsey asked about glide vs godep, but I think that's inertia as opposed to momentum. We use glide at work.First Time Caller posted:Really cool poo poo. Why is thread so inactive, go is awesome. It's still a pretty niche language by overall usage, even though it seems like literally everything new and awesome is being written in it: Docker, Kubernetes, Prometheus, pretty much everything in the Hashicorp stack now.
|
# ? Oct 9, 2016 17:45 |
|
I kinda like Go as a language too, but I think the problem is that its applications are primarily lower-level and specialized - as people have said, it seems to do a specific few things:
It's not a surprise that Docker, Kubernetes, and Hashicorp stuff are written in Go - they're very low-level, systems-oriented solutions for things the grand majority of programmers and engineers take for granted and never have to think about. Way I see it, if what you're doing is relatively independent of platform, complicated enough to be handled by a framework like Rails or Phoenix, noticeably benefits from functional programming, has anything to do with game dev, or is particularly high-level in concept, it's not really a Go thing. Basically, Go is an ops language. Dangerllama posted:It's still a pretty niche language by overall usage, even though it seems like literally everything new and awesome is being written in it: Docker, Kubernetes, Prometheus, pretty much everything in the Hashicorp stack now. I'd argue that the reason Go is niche yet a bunch of cool stuff is made in it is because 1. these are solutions to real and difficult problems, 2. Go is specifically designed around enabling these solutions, and 3. these solutions are widely used and very much the backbone of the systems we use. These solutions are niche because not many people work in it yet heavily rely on what's written with it, and not many people work in it because the problems it is specialized in solving are really advanced and really hard. There's a reason it's Google's baby. Pollyanna fucked around with this message at 16:16 on Oct 18, 2016 |
# ? Oct 18, 2016 16:09 |
|
I don't know why people constantly claim Go is Google's baby. We have more external users than internal users by far and it's been an uphill battle to get people to use Go within Google. Python programmers maybe, but c++ and java programmers aren't that interested.
|
# ? Oct 19, 2016 03:45 |
|
Coffee Mugshot posted:I don't know why people constantly claim Go is Google's baby. We have more external users than internal users by far and it's been an uphill battle to get people to use Go within Google. Python programmers maybe, but c++ and java programmers aren't that interested. It also gets basically zero attention at IO anymore. It's really just a project sponsored by Google more than anything.
|
# ? Oct 19, 2016 03:49 |
|
Is there a fast and easy way to install go 1.6+ (preferably 1.7.2+) on a RPi 3 Hypriot has some crazy 27 step guide on compiling Go for ARM64 but it's got to be easier than that... right? I was unable to find any precompiled binaries ready to go.
|
# ? Oct 19, 2016 08:22 |
|
Hadlock posted:Is there a fast and easy way to install go 1.6+ (preferably 1.7.2+) on a RPi 3 Answer code:
|
# ? Oct 22, 2016 05:23 |
|
Help! I'm fixing up some co-workers code. He needed to add some cross platform support to windows. It's laid out like this now: code:
code:
code:
e: this is highly simplified, the fuckening is great with this one :\ It's actually dozens and dozens of dupe functions
|
# ? Nov 16, 2016 19:08 |
|
https://dave.cheney.net/2013/10/12/how-to-use-conditional-compilation-with-the-go-build-tool You can use `// +build linux` to control which files are built, or just use `_<os>.go` filename suffix. The below works fine with `go build` for example. main.go code:
code:
code:
Mao Zedong Thot fucked around with this message at 19:26 on Nov 16, 2016 |
# ? Nov 16, 2016 19:24 |
|
e: ^^^ yeah, I removed _common.go to get my makefile to build, which now looks something like this:code:
Hmm, I think this may just be a linter thing, where it complains that functions in an OS specific file are undefined...because it does seem to build okay so long as no functions are re-declared between the common file and the OS specific file. Winkle-Daddy fucked around with this message at 19:37 on Nov 16, 2016 |
# ? Nov 16, 2016 19:34 |
|
So...doing things this way seems to have broken my ability to run automated tests. If I build, and provide as args every file I want to include it works fine. If I try to use build tags to control how things build I get the following error:code:
|
# ? Nov 18, 2016 22:02 |
|
Winkle-Daddy posted:So...doing things this way seems to have broken my ability to run automated tests. If I build, and provide as args every file I want to include it works fine. If I try to use build tags to control how things build I get the following error: My example builds fine with `go build .` -- it picks up `main_<os>.go` functions. You have networking.go/networking_<os>.go? Try removing the build tags maybe? Or if you can provide a reproducible example via gist or something I can poke at it.
|
# ? Nov 18, 2016 22:10 |
|
Got a new job where I have to use Go, and it's kind of hard to get used to coming from a full .NET stack background
|
# ? Dec 5, 2016 20:43 |
|
Chasiubao posted:Got a new job where I have to use Go, and it's kind of hard to get used to coming from a full .NET stack background
|
# ? Dec 11, 2016 22:52 |
|
comedyblissoption posted:Can you elaborate on this? I mainly have experience w/ .NET and am wondering if my preconceived notions of golang would match yours. Not the person who posted before, but for me coming from .NET I missed generics and class-based inheritance the most plus some stuff feels strangely clunky and you can't do operator overloading. Oh, and there's no such thing as function overloading (e.g. foo(string x) and also foo(string x, int y))
|
# ? Dec 11, 2016 23:18 |
|
Go really needs function overloading, imo. It makes the clutter from not having generics that much worse, because now add(foo_type) has to be written to add_foo_type(foo_type) which is annoying. After spending time with the language, I stopped caring about that because I started accepting go's thesis re: simplicity and lack of indirection. My main complain about go these days is that the community is full of luddites who are hostile towards both useful language features and anyone introducing a new library that attempts to do...anything. My main experiences are on the golang reddit, though, which is no longer an official community. So maybe it's not representative of the real go community.
|
# ? Dec 12, 2016 17:35 |
|
|
# ? May 8, 2024 03:56 |
|
comedyblissoption posted:Can you elaborate on this? I mainly have experience w/ .NET and am wondering if my preconceived notions of golang would match yours. Background: I've been a C# backend developer for the better part of 5, almost 6 years.
There's more but this is off the top of my head. My main complaint is really the frustration at the lovely tools and the overall attitude of 'gently caress you if you want to debug poo poo, that's not our problem'. Fake edit: I absolutely recognize that a lot of my complaints can be dismissed as 'that's not how Go is done' and 'you're an enterprise developer' which, well, yes and yes. I think my issues are still valid. It's just harder for me to do things. When things are working, Go is a nifty toy language. But trying to do anything complex feels like pulling teeth when you're not quite sure why something went wrong. Chasiubao fucked around with this message at 20:43 on Dec 12, 2016 |
# ? Dec 12, 2016 20:41 |