#golang-nuts
Explore tagged Tumblr posts
Text
Anyone else find it just absolutely infuriating when technical projects use Google Groups for their mailing lists or forums or other discussions or questions?
I don't know about you, but I don't enjoy waiting several seconds until some plaintext discussion on golang-nuts loads, for example.
Which it does take several seconds, even on a modern high end laptop or phone.
I haven't timed it, but literally anything else - GitHub issues, godoc, readthedocs, etc - all load significantly faster - or at least something about all of those feels much less like a jarring mental slowdown to me.
1 note
·
View note
Photo

Programming C# 10. Build Cloud, Web, and Desktop Applications C# is undeniably one of the most versatile programming languages available to engineers today. With this comprehensive guide, you’ll learn just how powerful the combination of C# and .NET can be. Author Ian Griffiths guides you through C# 10.0 and .NET 6 fundamentals and techniques for building cloud, web, and desktop applications. Designed for experienced programmers, this book provides many code examples to help you work with the nuts and bolts of C#, such as generics, LINQ, and asynchronous programming features. You’ll get up to speed on .NET 6 and the latest C# 9.0 and 10.0 additions, including records, enhanced pattern matching, and the new features designed to remove “ceremony” to improve productivity. Understand how .NET has changed in the most recent releases, and learn what it means for application development Select the most appropriate C# language features for any task Learn when to use the new features and when to stick with older ones Examine the range of functionality available in .NET’s class libraries Learn how you can apply these class libraries to practical programming tasks Explore numerous small editions to .NET that improve expressiveness . . . . . . . #androiddeveloper #mobiledeveloper #programminglanguage #javascriptdevelopers #fullstackdeveloper #kotlin #javaprogrammer #webdevelopers #pythonprogramming #swiftprogramming #pythondeveloper #programmingfun #websitedeveloper #webprogramming #javadeveloper #frontenddeveloper #programmingstudents #stackoverflow #computerprogramming #learnprogramming #softwaredeveloper #programminglove #typescript #programminglife #programming #golang #programminglanguages #javascriptdeveloper #developers #javaprogramming (at New York, New York) https://www.instagram.com/p/CiBLmWsMoky/?igshid=NGJjMDIxMWI=
#androiddeveloper#mobiledeveloper#programminglanguage#javascriptdevelopers#fullstackdeveloper#kotlin#javaprogrammer#webdevelopers#pythonprogramming#swiftprogramming#pythondeveloper#programmingfun#websitedeveloper#webprogramming#javadeveloper#frontenddeveloper#programmingstudents#stackoverflow#computerprogramming#learnprogramming#softwaredeveloper#programminglove#typescript#programminglife#programming#golang#programminglanguages#javascriptdeveloper#developers#javaprogramming
0 notes
Text
Go言語で標準出力にカラーをつけるライブラリーのベンチマーク比較
代表的なライブラリー
fmt
github.com/fatih/color
github.com/gookit/color
比較したコード:
import ( "fmt" "testing" "github.com/fatih/color" gcolor "github.com/gookit/color" ) // https://github.com/fatih/color func Benchmark_fatih_color(t *testing.B) { color.Cyan("Prints text in cyan.") } // https://github.com/gookit/color func Benchmark_gookit_color(t *testing.B) { gcolor.Cyan.Println("Prints text in cyan.") } // https://groups.google.com/g/golang-nuts/c/nluStAtr8NA?pli=1 func Benchmark_fmt_color(t *testing.B) { fmt.Printf("\x1b[36m%s\x1b[0m", "Prints text in cyan.") }
結果:
cpu: Intel(R) Core(TM) i7-5775R CPU @ 3.30GHz github.com/fatih/color: 1000000000 0.0000173 ns/op 0 B/op 0 allocs/op github.com/gookit/color: 1000000000 0.0000118 ns/op 0 B/op 0 allocs/op fmt: 1000000000 0.0000114 ns/op 0 B/op 0 allocs/op
結果の関数名は見やすように変更
fmt.Printf()が最も高速だが、他も早い。 ただ直感的に描けるし、早いのでカラーつけるときは "github.com/gookit/color" 使おうかな。
0 notes
Text
Go generics may use square brackets [] not parenthesis ()
https://groups.google.com/forum/#!topic/golang-nuts/7t-Q2vt60J8 Comments
0 notes
Text
Google's Go Lead: the Language Belongs To the Community
Russ Cox (along with Rob Pike) is the tech lead for Google's Go team and its Go project. This week he responded on the Google group golang-nuts to a blogger who'd argued that "Go is Google's language, not ours." First Cox points to a talk at Gophercon 2015 -- and its accompanying blog post -- which argued that Go's open source status is critical to its long-term success. He noted this week that "good ideas come from outside Google as often as they come from inside Google.... But getting to yes on every suggested new feature is not and never has been a goal." No one can speak for the entire Go community: it is large, it contains multitudes. As best we can, we try to hear all the many different perspectives of the Go community. We encourage bug reports and experience reports, and we run the annual Go user survey, and we hang out here on golang-nuts and on gophers slack precisely because all those mechanisms help us hear you better. We try to listen not just to the feature requests but the underlying problems people are having, and we try, as I said in the Gophercon talk, to find the small number of changes that solve 90% of the problems instead of the much more complex solution that gets to 99%. We try to add as little as possible to solve as much as possible. In short, we aim to listen to everyone's problems and address as many of them as possible, but at the same time we don't aim to accept everyone's offered solutions. Instead we aim to create space for thoughtful discussions about the offered solutions and revisions to them, and to work toward a consensus about how to move forward... The "proposal review" group meets roughly weekly to review proposal issues and make sure the process is working. We handle trivial yes and trivial no answers, but our primary job is to shepherd suggested proposals, bring in the necessary voices, and make sure discussions are proceeding constructively. We have talked in the past about whether to explicitly look for people outside Google to sit in our weekly meeting, but if that's really important, then we are not doing our job right. Again, our primary job is to make sure the issues get appropriate discussion on the issue tracker, where everyone can participate, and to lead that discussion toward a solution with broad agreement and acceptance. If you skim through any of the accepted proposals you will see how we spend most of our meetings nudging conversations along and trying to make sure we hear from everyone who has a stake in a particular decision. It remains an explicit goal to enable anyone with a good piece of code or a good idea to be able to contribute it to the project, and we've continued to revise both the code contribution and proposal contribution docs as we find gaps. But as I said in 2015, the most important thing we the original authors of Go can do is to provide consistency of vision, to keep Go feeling like a coherent system, to keep Go Go. People may disagree with individual decisions. We may get some flat wrong. But we hope that the overall result still works well for everyone, and the decision process we have seems far more likely to preserve a coherent, understandable system than a standards committee or other process. His conclusion? The Go language belongs to the Go community -- and, because it's open source, "the freedom to fork hopefully keeps me and the other current Go leadership honest."
Read more of this story at Slashdot.
from Slashdot http://bit.ly/2ELOFi8
0 notes
Link
Article URL: https://groups.google.com/forum/#!topic/golang-nuts/4cDIL5Vr_es
Comments URL: https://news.ycombinator.com/item?id=22858662
Points: 25
# Comments: 2
0 notes
Link
Posted by Andrew Bonventre, Jun 26, 2018 2:57 PM https://ift.tt/2K9j9iZ
0 notes
Text
Consistency matters; even when you disagree
No matter where you fit into any of the great developer debates (vim vs Emacs, tabs vs spaces, 80 vs 120 vs no column limit) the most critical point is consistency. Switching between tabs and spaces inside your own project would certainly prove annoying for others should you share the code even it won’t affect function. When you’re working on a team, though, or as part of a large organization; consistency has to exist not just in your project but across many.
Maybe you’re a tab person. Cool. Go nuts; at home. If your company prefers spaces the reality is that your preference doesn’t matter. Conforming to a shared norm is more important. When you have to share code with others the bottom line is that the consistency is bigger than your preference. This can even escape your own company should you end up open-sourcing your work for others to benefit from.
This is why I prefer to lean on community-driven style guides. I may not agree that Ruby should be written with an 80 character line limit but the community-driven Ruby Style Guide says otherwise and Rubocop defaults to that as well. Given that; it then makes sense that in any project that I plan on making public I should follow these norms as much as possible.
When it comes to Python we have PEP. The old Sun Java guide works but there’s a newer offering from Google that could be used. Older languages aren’t left out; even Perl has guidelines.
It’s hard to get consensus when opinions are strong and nobody’s preference is really wrong (unless they prefer tabs- then they’re wrong). Rather than infighting and company-specific styles that lead to Python that looks like Java and Perl that looks like, well, chaos we should be able to agree to disagree and stick to accepted solutions. I’m going to link a few below. Mostly these are the top or near-top hits on Google if you look for style guides for these languages. Google is the source of some but as the massive engineering powerhouse they are that makes sense.
Decide what to use, commit to move forward with it, and stop wasting time arguing over the right column to end the line at.
Ruby: https://github.com/bbatsov/ruby-style-guide Python: https://www.python.org/dev/peps/ Java: https://google.github.io/styleguide/javaguide.html Scala: http://docs.scala-lang.org/style/ Golang: https://github.com/golang/go/wiki/CodeReviewComments Perl: http://perldoc.perl.org/perlstyle.html Shell: https://google.github.io/styleguide/shell.xml R: https://google.github.io/styleguide/Rguide.xml Haskell: https://wiki.haskell.org/Programming_guidelines Javascript: https://github.com/airbnb/javascript C#: https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx
Consistency matters; even when you disagree was originally published on Secure()
0 notes
Text
“Complex Logic” in Go Templates
Last week, I was looking to do something in a Go template that I obviously should not have been trying to do. In my dive through stackoverflow and the mailing lists, I came across a pretty funny quip: Accipiter Nisus said “Whether or not assigning a new value to a variable is considered complex logic might be up for discussion.” And, of course, I sat at my desk laughing at the dystopian hellscape through which we each wade every day.
I don’t entirely agree with the idea but, in this context, it’s right. I was trying to solve the wrong problem. Or the right problem in a sub-optimal way due to a misunderstanding of the tools I had at my disposal.
The problem I was trying to solve was a pretty straightforward web programming task - after a ‘delete’ action, remove an element (and its children) from the page. I already had an AJAX endpoint to handle the delete request and I wanted to add some client-side stuff to handle the clicks. My naive javascript skills told me to add unique IDs to each element that users could click (so I could getElementById later). That’s when I started trying to add some sort of accumulator to the template ({{i := 0}}, etc) which is not possible in Go’s templating engine.
My solution was to set the IDs of those interactive elements via javascript after the page loaded. It is pretty bad. I worked through some of a javascript tutorial like 3 days after I wrote this shitty code and now I think I know a more idiomatic way to do it: using document.querySelecorAll to grab all of the interactive things I wanted to work with. Then add an event listener on the appropriate child element (delete button) that makes the AJAX request and removes the outer element on success. This approach is somewhat limited by scoping issues, for example, if you had:
<div class="”deletable”"> Matt <button type="”button”">delete</button> <div>
The click listener on the button should not remove this, but it could remove this.parentNode or the handler could be bound to the div element.addEventListener(“click”, deleteHandler.bind(outerDiv));
Making use of javascript’s this keyword and iterating across the nodelist returned by querySelectorAll are thousands of times better than trying to cajole a template to do something it wasn’t designed to do.
The moral of the story is that you should learn javascript.
tl;dr: if you’re having trouble doing seemingly simple things in your html templates, you’re probably approaching the problem incorrectly.
0 notes
Text
A Rebuttal to “Go Is Not a Community Driven Project”
https://groups.google.com/d/msg/golang-nuts/6dKNSN0M_kg/Y1yDJRwQBgAJ Comments
0 notes
Text
Go Author's Response to 'Go Is Google's Language'
https://groups.google.com/forum/#!msg/golang-nuts/6dKNSN0M_kg/EUzcym2FBAAJ Comments
0 notes
Text
Go 1.11 Beta 1 is released
https://groups.google.com/forum/#!msg/golang-nuts/vpVOVVMLa08/oQQQWX3rCgAJ Comments
0 notes
Text
Upcoming Go protobuf release
https://groups.google.com/forum/#!topic/golang-nuts/F5xFHTfwRnY Comments
0 notes
Text
Go 1.9.1 and Go 1.8.4 are released
https://groups.google.com/forum/m/#!topic/golang-nuts/sHfMg4gZNps Comments
0 notes
Text
Go 1.8 Release Candidate 1 is released
https://groups.google.com/forum/#!topic/golang-nuts/tr2ZKSQ42zE Comments
0 notes