|
MALE SHOEGAZE posted: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. I don't think the /r/golang was ever a real community to begin with. Not very many people, and most of the content was just hotlinks to random projects. The fact that they "killed" it because of the Reddit CEO's thing was just silly. The Golang Slack is a pretty good resource.
|
# ? Dec 13, 2016 15:29 |
|
|
# ? Apr 27, 2024 05:14 |
|
Go would love to have a good debugger, but it turns out debugging is hard. I think people take my favorite program, gdb, for granted.
|
# ? Dec 14, 2016 19:38 |
|
Coffee Mugshot posted:Go would love to have a good debugger, but it turns out debugging is hard. I think people take my favorite program, gdb, for granted. That is what I put in the go user survey as something go could use. (Also I put multi-dimensional arrays but hey, that poo poo ain't coming anytime soon)
|
# ? Dec 15, 2016 01:49 |
|
Bozart posted:That is what I put in the go user survey as something go could use. (Also I put multi-dimensional arrays but hey, that poo poo ain't coming anytime soon) What do you mean by multi-dimensional arrays? You can do slices of slices to arbitrary depth, right?
|
# ? Dec 15, 2016 02:31 |
|
bonds0097 posted:What do you mean by multi-dimensional arrays? You can do slices of slices to arbitrary depth, right? If you want to bounds check every single sub-slice, and not be able to rely on matrices being rectangular, sure. e: there is a related benefit to having matrices laid out in memory in a specific way Bozart fucked around with this message at 03:40 on Dec 15, 2016 |
# ? Dec 15, 2016 03:32 |
|
I've been using VS Code 1.7+ with the golang plugin and hot drat am I ever a happy camper. It's bare bones but it's a very streamlined bare bones.
|
# ? Dec 15, 2016 04:50 |
|
This was just announced https://www.jetbrains.com/go/ Setting up was easy and there seems to be a working debugger.
|
# ? Dec 15, 2016 17:06 |
|
The debugger is delve and delve is good but not sufficient IMO. Derek Parker doesn't have enough real life time to make it much better, either, unfortunately.
|
# ? Dec 16, 2016 01:59 |
|
Coffee Mugshot posted:The debugger is delve and delve is good but not sufficient IMO. Derek Parker doesn't have enough real life time to make it much better, either, unfortunately. If only Golang had a large corporate backer with the resources and motivation to develop a functional go debugger. And of course, if Google were to release one, it would be balked at by the Go community as "over complicated." This would be followed by blog posts explaining why printf debugging is actually good, because it's easy to understand, and debuggers are bad because no one can understand how they work.
|
# ? Dec 18, 2016 21:28 |
|
MALE SHOEGAZE posted:If only Golang had a large corporate backer with the resources and motivation to develop a functional go debugger. We've written a few go debuggers and funded some other ones, look at the Cloud Debugger on GCP and Jetbrains Go debugger, respectively, but those are application specific debuggers. I think y'all are seriously underestimating how good gdb is and how hard it is to make anything close to as good as that. Delve is a good attempt but no one has real time to work on it and gdb works well enough for smallish programs without a million goroutines flying around.
|
# ? Dec 20, 2016 08:03 |
|
Go is being ported to RISC-V, partly by people at Google and partly by volunteers. Slides and video from the 5th RISC-V workshop are available. This is pretty neat, but it'll be pretty neat-er if RISC-V ever manages to become real hardware.
|
# ? Dec 23, 2016 08:42 |
|
Hadlock posted:I've been using VS Code 1.7+ with the golang plugin and hot drat am I ever a happy camper. It's bare bones but it's a very streamlined bare bones. I love VS Code, I use it at work with js and at home.. this extension: https://marketplace.visualstudio.com/items?itemName=lukehoban.Go has been awesome, is this the one you are referring to? It installed gocode and a few other helpful things also, even though like MSSQL, I've found I never end up using the intellisense stuff, but the syntax help is awesome, like when it tells me I don't have to specify a string type because it can be inferred. I figure those are things Ill learn as I go more into it, but for now it is great. Loving Go so far! Im pretty dogmatic about syntax style, to the point my colleagues poke fun at me, and Go has been sort of reinforcing for me in that regard, haha.
|
# ? Apr 8, 2017 20:44 |
|
Will have to double check when I get home, I have a list of about 11 plugins I run that gets my workflow done. And yeah, go linter in vscode go plugin is the poo poo, everything I do now goes through a linter. There's a ton of brittle legacy code that someone wrote, basically in notepad, and years later people are still running in to null issues that would have never happened had they been using a linter to catch all those gross mistakes.
|
# ? Apr 19, 2017 02:12 |
|
Hadlock posted:Will have to double check when I get home, I have a list of about 11 plugins I run that gets my workflow done. Yeah, I made go vet and go lint Jenkins build status checks on all PRs. Also, there's one guy at the company who doesn't use goimports consistently and I will probably have to kill him. I love the tooling in go.
|
# ? Apr 19, 2017 02:42 |
|
.............
Mao Zedong Thot fucked around with this message at 17:56 on Jun 27, 2017 |
# ? Apr 19, 2017 17:36 |
|
Is there a really good book about learning Go?
|
# ? May 3, 2017 08:12 |
|
The Go Programming Language
|
# ? May 3, 2017 17:12 |
|
Furism posted:Is there a really good book about learning Go? Brian Kerrigan and Alan Donovan's book is really good, but speaking, personally, from the Go Team's perspective, we'd still prefer the tour to be the landing page for learning Go rather than the spectacular book. If only because it will be easier to add a section on type aliases there than to print another rev of the book. Also, I think a casual look over the language spec is a good learning tool.
|
# ? May 5, 2017 03:17 |
|
Thanks for the tips. Going over the specs and doing the tour will definitively be a part of my self-learning. But I found that, for me anyway, you just can't beat the quality of a really good book
|
# ? May 5, 2017 08:21 |
|
The impression that I get about Go is that it's excellent at concurrency and bad at parallelism, somewhat like a strongly-typed NodeJS. Am I wrong? I've been looking for a chance to do some real work using Golang but the project I'm about to start has a serious need for parallel computation so I'm thinking I'll just try C# on .NET Core or Kotlin.
|
# ? Jun 27, 2017 17:16 |
|
Twerk from Home posted:The impression that I get about Go is that it's excellent at concurrency and bad at parallelism, somewhat like a strongly-typed NodeJS. Am I wrong? I've been looking for a chance to do some real work using Golang but the project I'm about to start has a serious need for parallel computation so I'm thinking I'll just try C# on .NET Core or Kotlin. I'm not sure if Go is particularly bad at parallelism, but the language is designed around concurrency. You would probably find it easy to write "natural code" that can take advantage of parallelism in Go, but I don't know about anything similar to OpenMP targeted particularly at parallelism. C# and Kotlin seem pretty good for parallel computation with all of the primitives they provide.
|
# ? Jun 27, 2017 17:52 |
|
Twerk from Home posted:The impression that I get about Go is that it's excellent at concurrency and bad at parallelism, somewhat like a strongly-typed NodeJS. Am I wrong? I've been looking for a chance to do some real work using Golang but the project I'm about to start has a serious need for parallel computation so I'm thinking I'll just try C# on .NET Core or Kotlin. I guess that depends on how you mean "bad at parallelism." Go programs aren't stuck to being single-threaded as with node. There is a setting (GOMAXPROCS) that controls how many OS threads can be used to execute goroutines. GOMAXPROCS used to default to 1, but now defaults to the logical number of CPUs. But if you're looking for built-in utilities like java.util.concurrent, no, go doesn't have those. I hope that helps.
|
# ? Jun 27, 2017 17:53 |
|
skul-gun posted:I guess that depends on how you mean "bad at parallelism." Go programs aren't stuck to being single-threaded as with node. There is a setting (GOMAXPROCS) that controls how many OS threads can be used to execute goroutines. GOMAXPROCS used to default to 1, but now defaults to the logical number of CPUs. Well, thanks for opening my eyes guys. I had found some older documentation that indicated that GOMAXPROCS defaulted to 1 and best practice was to leave it there. I'm certainly more familiar with multithreaded C# / Java and using Goldman Sachs Collections from Kotlin looked like a simple solution, but I'm going to take a look at Go before I write it off.
|
# ? Jun 27, 2017 17:59 |
It depends on what you're trying to do with the parallelism. Generally speaking heavy parallelism comes up most in numerics, which for which go is a bad choice of language. On the other hand if you've just got some work you'd like to spread across multiple processors that's easy enough to do with go. I'm not the biggest fan of go but I find it's concurrency model better than most. Eela6 fucked around with this message at 18:08 on Jun 30, 2017 |
|
# ? Jun 30, 2017 18:05 |
|
Twerk from Home posted:Well, thanks for opening my eyes guys. I had found some older documentation that indicated that GOMAXPROCS defaulted to 1 and best practice was to leave it there. I'm certainly more familiar with multithreaded C# / Java and using Goldman Sachs Collections from Kotlin looked like a simple solution, but I'm going to take a look at Go before I write it off. I've done some AI stuff in Go for fun and the parallelism is respectable. I've mostly only done parallel stuff in C/C++ without boost/openmp/anything and OpenCL/CUDA so I don't know what fluff other languages bolt on. If you are just looking for it to run in parallel with decent performance Go can deliver. If you're looking for it to simplify the process greatly, Go's language features don't vanish but there's nothing beyond that. Which is honestly fine for lots of applications. Khorne fucked around with this message at 02:46 on Jul 2, 2017 |
# ? Jul 2, 2017 00:25 |
|
I finally have some time and a project idea to learn Go. I want to make a True Random Number Generator by reading raw files from a webcam aimed at a nearby tree. I figure I could diff images, hash that, etc.. This probably exists already but oh well. Any pointers, word of advice, or should I just head into it? I'm not a very good developer, programming is more of a hobby and I'm only average in C#.
|
# ? Sep 7, 2017 16:15 |
Furism posted:I finally have some time and a project idea to learn Go. I want to make a True Random Number Generator by reading raw files from a webcam aimed at a nearby tree. I figure I could diff images, hash that, etc.. This probably exists already but oh well. Go is a bad language for numerics. That said, it's as good a project as any to learn Go with; if it's what you want to do, go for it.
|
|
# ? Sep 7, 2017 17:30 |
|
Eela6 posted:Go is a bad language for numerics. That said, it's as good a project as any to learn Go with; if it's what you want to do, go for it. Well honestly the other contender is Rust, but it seemed exceedingly complicated for an amateur like myself. Go is easy, I've been told.
|
# ? Sep 7, 2017 18:03 |
|
Go and Rust are fine for making some amateur TRNG. Try it out and report back.
|
# ? Sep 7, 2017 18:23 |
Furism posted:Well honestly the other contender is Rust, but it seemed exceedingly complicated for an amateur like myself. Go is easy, I've been told. Go is probably the easiest C-family language to pick up. If you want to pick up another statically typed, compiled language, Go is a good choice. Go's biggest advantages are easy compilation to native machine code, better-than-usual concurrency model, and a programming model focused on simplicity: it's lightweight syntax, lack of exceptions, & extremely rigid typing help enforce that what 'what you see is what you get'. Go's biggest disadvantages are it's lack of generics, it's limited syntax, it's almost complete lack of syntactic sugar, and it's incredibly anemic handling of numerics (the math standard library is almost a joke). As such, Go tends to excel in highly-concurrent, 'simple' backend work that needs to be deployed across many different environments. It tends to be weakest in scientific & mathematical computing. Coffee Mugshot posted:Go and Rust are fine for making some amateur TRNG. Try it out and report back.
|
|
# ? Sep 7, 2017 18:25 |
|
Thanks for the feedback guys. I'll stick to Go then
|
# ? Sep 8, 2017 07:00 |
|
So I've been using go a lot lately for toolmaking and it's been pretty great for that. I've been using VS Code and it's been pretty good, but want to be sure I'm not missing a better Dev environment for go. Is anything else going to do better than VS Code + plugins?
|
# ? Oct 27, 2017 22:32 |
Walked posted:So I've been using go a lot lately for toolmaking and it's been pretty great for that. My coworkers and I are split pretty evenly between vscode, atom, and gogland. VsCode is my personal favorite of the three, at least for now. I find gogland to be a little slow and buggy for now, though it seems to be rapidly improving.
|
|
# ? Oct 27, 2017 22:57 |
|
I've been using Gogland (really the Go plugin in IntelliJ) a lot to write code for inclusion in Kubernetes. My main gripes are:
|
# ? Oct 27, 2017 23:59 |
I'm working with an API that serves JSON in response to GET requests. Great! The problem is, it represents true as "T" and false as "N". Go code:
JavaScript code:
The logic I want is basically this, but I'm not so good with the json package Go code:
|
|
# ? Dec 21, 2017 21:59 |
|
You want to write your own MarshalJSON and UnmarshalJSON functions to implement the Marshaler and Unmarshaler interfaces. This blog post is ok: http://choly.ca/post/go-json-marshalling/ Otherwise, just read the json package and how they implemented marshal/unmarshal, you're basically gonna modify that.
|
# ? Dec 21, 2017 22:37 |
|
I'm writing a lovely, bare-bones NES emulator for shits and giggles. What's a good library for graphics for someone who doesn't do graphics? EDIT: Basically I'd just like the ability to draw pixels on a screen. I don't need much, but I also don't know exactly what I need, and I don't work with graphics at all professionally. I ALSO don't really know Go and I'm using this as a way to learn some. EDIT #2: As a Python programmer I want to scream at some of this. Why is there no 'in' operator? Why does writing a for each loop require extra syntax? Why is gofmt such a dick? Give me the gun to shoot my own face off, please, I'm a competent programmer, I swear. Ghost of Reagan Past fucked around with this message at 05:02 on Dec 22, 2017 |
# ? Dec 22, 2017 04:00 |
|
Ghost of Reagan Past posted:I'm writing a lovely, bare-bones NES emulator for shits and giggles. What's a good library for graphics for someone who doesn't do graphics? I honestly wouldn't use go for this. Go is great for keeping poo poo simple but if you want to abstract over anything, go use a language with actual features.
|
# ? Dec 22, 2017 05:54 |
|
MALE SHOEGAZE posted:I honestly wouldn't use go for this. Go is great for keeping poo poo simple but if you want to abstract over anything, go use a language with actual features.
|
# ? Dec 22, 2017 06:03 |
|
|
# ? Apr 27, 2024 05:14 |
|
Go's strengths are in system programming; writing simple servers and file processors. There's very little support for anything GUI, sound, or realtime like you'd want for an emulator. Anything like that you'd probably have to write in C and link in to Go, defeating the purpose of the exercise. I'd at least try something a little less ambitious first just to get a feel for the language. A URL-shortener is a good example. It's a server, needs a simple UI, some minor config, and needs to talk to either a SQL or key/value storage engine. So you'd learn about: - the net/http package for the server - html/template for rendering web pages - optionally gRPC if you want to offer a programmatic API - reading and parsing config files - Google's flags package for handling CLI flags - The SQL interface + sqlite3 for a backend storage engine, or boltdb if you want to use a durable key/value store. And the program itself is relatively straightforward to write.
|
# ? Dec 22, 2017 08:30 |