Golang News http://golangnews.com Curated links about the Go programming language, including Tutorials, Videos and Jobs for Go hackers. Thu, 20 Jul 2017 14:11:00 +0000 Piece of PIE - Ian Lance Taylor on executable shared libraries It turns out to be quite simple to create a PIE: a PIE is simply an executable shared library. 2 points posted by gopher https://www.airs.com/blog/archives/549 2416 Thu, 20 Jul 2017 09:28:00 +0000 mock - GoMock is a mocking framework for the Go programming language. 4 points posted by Donutloop https://github.com/golang/mock 2415 Thu, 20 Jul 2017 06:20:00 +0000 go-tools - A collection of tools and libraries 5 points posted by Donutloop https://github.com/dominikh/go-tools 2414 Wed, 19 Jul 2017 20:26:00 +0000 The meteoric rise of Go and why HashiCorp is betting on it 4 points posted by kenny https://jaxenter.com/go-interview-jackson-hashicorp-135746.html 2413 Wed, 19 Jul 2017 12:51:00 +0000 GopherCon 2017-talks - Slides and links for 2017 talks 7 points posted by Donutloop https://github.com/gophercon/2017-talks 2412 Wed, 19 Jul 2017 04:46:00 +0000 Why we argue style <p>I've been thinking about why we argue about code, and how we might transform vehement differences of opinion into active forces for good.&nbsp;My thoughts spring from a very specific context. Ten or twelve times a year I go to an arbitrary business and spend three or more days teaching a course in object-oriented design. I'm an outsider, but for a few days these business let me in on their secrets.</p> 3 points posted by kenny https://www.sandimetz.com/blog/2017/6/1/why-we-argue-style 2411 Tue, 18 Jul 2017 21:14:00 +0000 Go's work-stealing scheduler 6 points posted by Donutloop https://rakyll.org/scheduler 2410 Tue, 18 Jul 2017 08:37:00 +0000 Go experience report: the append function #generics #append <p class="postmeta">Ian Lance Taylor talks about adding the append function.&nbsp;When the Go language was first publicly released it contained a package named container/vector. &nbsp;The type <code style="font-family: monospace; color: rgb(102, 102, 102);">vector.Vector</code>&nbsp;was a name for the type <code style="font-family: monospace; color: rgb(102, 102, 102);">[]interface{}</code>. <code style="font-family: monospace; color: rgb(102, 102, 102);">Vector</code>&nbsp;supported methods like <code style="font-family: monospace; color: rgb(102, 102, 102);">Len</code>, <code style="font-family: monospace; color: rgb(102, 102, 102);">Cap</code>, <code style="font-family: monospace; color: rgb(102, 102, 102);">At</code>, <code style="font-family: monospace; color: rgb(102, 102, 102);">Set</code>, <code style="font-family: monospace; color: rgb(102, 102, 102);">Insert</code>, <code style="font-family: monospace; color: rgb(102, 102, 102);">Delete</code>, <code style="font-family: monospace; color: rgb(102, 102, 102);">Push</code>, <code style="font-family: monospace; color: rgb(102, 102, 102);">Pop</code>, and several more. &nbsp;You can see the source code at <a href="https://github.com/golang/go/tree/059c68bf0cccea85bea19c44c15d7fec9e9cbd21/src/pkg/container/vector" style="font-size: 1.2rem; color: rgb(185, 111, 23);">on Github</a>. &nbsp;An interesting aspect of the package is that <code style="font-family: monospace; color: rgb(102, 102, 102);">string</code>&nbsp;and <code style="font-family: monospace; color: rgb(102, 102, 102);">int</code>&nbsp;versions of <code style="font-family: monospace; color: rgb(102, 102, 102);">Vector</code>&nbsp;were automatically generated by copying the file vector.go with edits applied by gofmt -r.</p><div class="postentry"><div><br></div></div> 8 points posted by kenny https://www.airs.com/blog/archives/559 2409 Tue, 18 Jul 2017 06:14:00 +0000 Golang topic server and client package 4 points posted by AhmadrezaZibaei https://github.com/hadidimad/topserve 2408 Mon, 17 Jul 2017 07:57:00 +0000 Slides: Fallacies of distributed computing #gophercon <h3>In scope for this talk</h3> <p>Go programs …</p><ul style="margin: 20px 0px 0px 1.5em; padding: 0px; font-family: 'Open Sans', Arial, sans-serif; font-size: 26px; letter-spacing: -1px; -webkit-text-size-adjust: auto; background-color: rgb(255, 255, 255);"><li style="padding: 0px; margin: 0px 0px 0.5em;">running on two or more machines (VMs, containers, etc.)</li><li style="padding: 0px; margin: 0px 0px 0.5em;">using <code style="font-size: 24.700000762939453px; font-family: 'Droid Sans Mono', 'Courier New', monospace;">net/*</code></li><li style="padding: 0px; margin: 0px 0px 0.5em;">that need to coordinate their efforts to achieve a result</li><li style="padding: 0px; margin: 0px 0px 0.5em;">with centralized or decentralized control</li> </ul><p>In short&nbsp;distributed&nbsp;systems&nbsp;at large …</p> 6 points posted by kenny http://go-talks.appspot.com/github.com/mhausenblas/fallacies-of-distributed-gomputing/main.slide#1 2407 Sun, 16 Jul 2017 11:01:00 +0000 Building Containers from Scratch with Go #video #paid #tutorial <ul> <li>Paid safari subscription required.</li> <li>By: Liz Rice</li> <li>Publisher: O'Reilly Media, Inc.</li> <li>Pub. Date:July 11, 2017</li> </ul> <h2>Many people use container systems like Docker, but how do they work?</h2> <p>What do people mean when they mention cgroups and namespaces, or when they describe a container as a “lightweight virtual machine”? In this course designed for the intermediate level programmer (any language), you’ll discover exactly what a container is by writing one with a surprisingly small amount of Go code. Along the way, you’ll lose your fear of syscalls and learn that a container is really just a Linux process with its view of the world limited through namespaces, cgroups, and chroot.<br></p> <p>Gain an in-depth understanding of what containers are and how they work. Learn how to build your own container engine using Go. Master the ability to run containers with confidence. Liz Rice is a technology evangelist for Acqua Security, the CEO of Microscaling Systems, and one of the developers of MicroBadger, the tool for managing container metadata. An in-demand speaker at <a href="https://downtro.com/tag/oreilly/">O’Reilly</a> OSCON and Velocity conferences, Liz has 25+ years of software development, team management, and product management experience working with network protocols, distributed systems, and digital technology in sectors like VOD, music, and VoIP.</p> 3 points posted by iris-go http://my.safaribooksonline.com/9781491988404 2406 Sat, 15 Jul 2017 15:09:00 +0000 Slides: Understanding channels 13 points posted by kenny https://speakerdeck.com/kavya719/understanding-channels 2405 Sat, 15 Jul 2017 06:46:00 +0000 go-update - Go package for auto-updating system-specific binaries via GitHub releases. 3 points posted by Donutloop https://github.com/tj/go-update 2404 Sat, 15 Jul 2017 06:38:00 +0000 Cast: Bringing Kubernetes to Azure with Kris Nova #kubernetes #azure <p>Kris Nova joined the show to talk about developer empathy, running K8s on Azure, Kops, Draft, editors, containerizing odd things...and what it's like to play a keytar.</p> 8 points posted by gopher https://changelog.com/gotime/50 2403 Fri, 14 Jul 2017 20:46:00 +0000 Basic AST Traversal in Go Looking at and interacting with the AST (Abstract Syntax Tree) of a program can be both interesting and useful for automation. In this post, we'll look at an example of how to parse a Go program to an AST and how to analyse it. 5 points posted by zupzup https://zupzup.org/go-ast-traversal 2402 Fri, 14 Jul 2017 14:16:00 +0000 go-pry - an interactive REPL for Go #repl &nbsp;An interactive REPL for Go that allows you to drop into your code at any point. 6 points posted by Donutloop https://github.com/d4l3k/go-pry 2401 Fri, 14 Jul 2017 12:40:00 +0000 How to Turn an Android Device into a Web Server #article #tutorial <p name="c372" id="c372" class="graf graf--p graf-after--figure">Hello folks,</p><p name="850b" id="850b" class="graf graf--p graf-after--p">Yesterday I did manage to serve my web simple application from my android phone. By following some simple steps you can do it too, it’s ridiculous easy!</p> 2 points posted by iris-go https://t.co/SMaEB3LkUK 2400 Fri, 14 Jul 2017 12:40:00 +0000 Go - The Well-Crafted Programming Language that Delivers more Bang for your Web Hosting Buck Great introduction of the Go programming language by<b> </b>@EngineerKamesh<figcaption itemprop="caption"><br></figcaption> 4 points posted by norbertfuhs https://www.linkedin.com/pulse/go-well-crafted-programming-language-delivers-more-balasubramanian 2399 Fri, 14 Jul 2017 10:30:00 +0000 Gophercon 2017 liveblog 6 points posted by lolly https://about.sourcegraph.com/go 2398 Thu, 13 Jul 2017 19:18:00 +0000 A URL Shortener Service using Go, Iris and Bolt (UPDATED) #article 2 points posted by iris-go https://t.co/F8ZN7ssrpt 2397 Thu, 13 Jul 2017 17:42:00 +0000 Toward Go 2 #releases This is the text of my talk today at Gophercon 2017, asking for the entire Go community's help as we discuss and plan Go 2. We will add a link to the video when it becomes available. 14 points posted by kenny https://blog.golang.org/toward-go2 2396 Thu, 13 Jul 2017 17:38:00 +0000 Gerbo - Rodent and data extractor, sqlite3 for mongoDB, export the data by API REST Gerbo - Rodent and data extractor 3 points posted by Lucas https://github.com/luk4z7/gerbo 2395 Thu, 13 Jul 2017 10:59:00 +0000 Code: Golang Pros & Cons for DevOps (Part 3 of 6): Speed vs. Lack of Generics #devops 3 points posted by Philip Volmar https://blog.bluematador.com/posts/golang-pros-cons-devops-part-3-speed-lack-generics/?utm_source=gonews&utm_medium=link&utm_campaign=golang3 2394 Wed, 12 Jul 2017 18:01:00 +0000 Code: devenv v1.4.0 released <h2>Changes since v1.2.0</h2><div>- scan for unknown repositories within project directory</div><div>- pin a repository: checkout specific commit after project setup</div><div>- OS shell with `devenv&nbsp;shell&nbsp;project`, interactive shell with `devenv -- project`</div><div>- `shell` command in interactive shell</div> 5 points posted by Sascha Andres https://github.com/sascha-andres/devenv/releases/tag/v1.4.0 2393 Wed, 12 Jul 2017 04:16:00 +0000 Boutique - Immutable state store with subscriptions to field changes 4 points posted by johnsiilver http://github.com/johnsiilver/boutique 2392 Wed, 12 Jul 2017 03:36:00 +0000 ws: WebSocket implementation in Go <blockquote>Existing WebSocket implementations do not allow users to reuse I/O buffers between connections in clear way. This library aims to export efficient low-level interface for working with the protocol without forcing only one way it could be used.<br></blockquote> 3 points posted by gobwas https://github.com/gobwas/ws 2391 Tue, 11 Jul 2017 15:56:00 +0000 Optimising machine learning algorithms p3 #ai 2 points posted by lolly http://www.jamesbowman.me/post/optimising-machine-learning-algorithms-part3 2390 Tue, 11 Jul 2017 15:17:00 +0000 10 Packages to Instrument Your Go Application <p>I keep writing small batch-processing applications. Go is nice for these because it allows relatively easy concurrent implementations. However, as with all things concurrent, it becomes difficult to see what is happening inside the process. I want to know what is happening to determine which parts to focus development effort on to, say, improve performance.</p> 4 points posted by kenny https://pocketgophers.com/10-to-instrument 2389 Tue, 11 Jul 2017 06:49:00 +0000 Video: A code review with logging, errors, and signals #justforfunc This time I review a piece of code by <a href="https://twitter.com/sandeepdinesh" class="yt-uix-servicelink " data-url="https://twitter.com/sandeepdinesh" data-target-new-window="True" data-servicelink="CDEQ6TgYACITCInHqNLY_9QCFcYMFgod0PgO_yj4HQ" target="_blank" rel="nofollow noopener" style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; background: rgb(255, 255, 255); color: rgb(22, 122, 198); cursor: pointer; text-decoration: none; font-family: &quot;YouTube Noto&quot;, Roboto, arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://twitter.com/sandeepdinesh</a>, from his repo <a href="https://github.com/thesandlord/logpipe" class="yt-uix-servicelink " data-url="https://github.com/thesandlord/logpipe" data-target-new-window="True" data-servicelink="CDEQ6TgYACITCInHqNLY_9QCFcYMFgod0PgO_yj4HQ" target="_blank" rel="nofollow noopener" style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; background: rgb(255, 255, 255); color: rgb(22, 122, 198); cursor: pointer; text-decoration: none; font-family: &quot;YouTube Noto&quot;, Roboto, arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://github.com/thesandlord/logpipe</a><br style="color: rgb(51, 51, 51); font-family: &quot;YouTube Noto&quot;, Roboto, arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">The program simply reads from standard input and sends each line both to standard output and a logging service.<br style="color: rgb(51, 51, 51); font-family: &quot;YouTube Noto&quot;, Roboto, arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">What could go wrong? Many things! 12 points posted by gopher https://www.youtube.com/watch?v=c5ufcpTGIJM&feature=youtu.be 2388 Mon, 10 Jul 2017 21:49:00 +0000 Don't use checkErr functions <p>That saves you two lines <em>every</em>&nbsp;time an error is checked. As an implementation of <code style="font-size: 0.95em; tab-size: 4;">checkErr</code>&nbsp;is about five lines, you only need to handle three errors to start saving lines of code. Less code is better, right?&nbsp;I think the cost of writing a little boilerplate far outweigh the problems and limitations of <code style="font-size: 0.95em; tab-size: 4;">checkErr</code>, some of which are explained below.</p> 6 points posted by kenny https://pocketgophers.com/checkErr 2387 Mon, 10 Jul 2017 07:49:00 +0000 Using different Git emails 4 points posted by Tania http://pliutau.com/using-different-git-emails 2386 Mon, 10 Jul 2017 05:10:00 +0000 gotime - a project/task manager #cli I wrote this project because all of the current to-do list programs were just that- to-do lists.<div>I needed something to track the time I spent on tasks of projects, and I didn't want to enter a new command to the console for every action.</div><div>Hopefully the community finds this useful. This is my first public project; constructive criticism is welcome.</div> 7 points posted by nanohard https://github.com/nanohard/gotime 2385 Sat, 08 Jul 2017 21:02:00 +0000 My neovim setup for go 4 points posted by kenny https://medium.com/@sebdah/my-neovim-setup-for-go-7f7b6e805876 2384 Sat, 08 Jul 2017 20:06:00 +0000 Show: Lottip, aMySQL GUI proxy v0.3 released - new features and more stable #releases 3 points posted by orderbynull https://github.com/orderbynull/lottip/releases/tag/v0.3 2383 Sat, 08 Jul 2017 18:39:00 +0000 Automation using a slack bot based on hanu library 3 points posted by dyl.simon https://github.com/get-ion/bot 2382 Sat, 08 Jul 2017 14:27:00 +0000 Globe wireframe visualizations in Golang Globe wireframe visualizations in Golang backed by <a href="https://github.com/tidwall/pinhole" style="box-sizing: border-box; background-color: rgb(255, 255, 255); color: rgb(3, 102, 214); font-family: -apple-system, system-ui, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 16px;">pinhole</a>. 6 points posted by kenny https://github.com/mmcloughlin/globe 2381 Fri, 07 Jul 2017 16:19:00 +0000 Go Tooling Workshop - a workshop covering all the tools gophers use in their day to day life After going through this workshop, you will find out about tools to help you write better Go code, how to build artifacts from that code, and how to understand the performance of your code once it's running. 4 points posted by gopher https://github.com/campoy/go-tooling-workshop 2380 Fri, 07 Jul 2017 09:53:00 +0000 Rounding implementations in go Rounding in Go is hard to do correctly. That is, given a <i>float64</i>, truncate the fractional part (anything right of the decimal point), and add one to the truncated value if the fractional part was &gt;= 0.5. This problem doesn’t come up often, but it does enough that as of this writing, the second hit on Google for <i>golang round</i> is a <a href="https://github.com/golang/go/issues/4594">closed issue</a> from the Go project, which declined to add a Round function to the math package. That issue also includes many community contributions about ways to round. 5 points posted by gopher https://www.cockroachlabs.com/blog/rouding-implementations-in-go 2379 Fri, 07 Jul 2017 08:38:00 +0000 Video: Setting Up a Portable Go Testing Rig #testing Set Up a Portable Go Testing Rig with Docker and GoConvey by Alison Rowland 6 points posted by andythomas https://www.youtube.com/watch?v=w2Q4r4BFxXY 2378 Fri, 07 Jul 2017 04:37:00 +0000 GopherCon Contributor Workshop RSVP On July 15th the Go team is holding a workshop at GopherCon where we will mentor people making their first contributions to the Go project. If you've ever wanted to become a contributor to the Go project, this is your best chance! Please RSVP now if you will be coming as there are limited seats available. There are two identical workshops to extend participation to as many people as possible. 4 points posted by kenny https://docs.google.com/forms/d/e/1FAIpQLSekirseylbMneSNybQ6yJoCWwGVrT_7gmaSDQfWA-kNMevGyg/viewform 2377 Thu, 06 Jul 2017 21:21:00 +0000 liblb - A golang library that implements load balancing algorithms <p>A golang library that implements load balancing algorithms. Still a work in progress!</p> <p><a href="https://godoc.org/github.com/lafikl/liblb" style="box-sizing: border-box; color: rgb(3, 102, 214);">https://godoc.org/github.com/lafikl/liblb</a></p> 5 points posted by lolly https://github.com/lafikl/liblb 2376 Thu, 06 Jul 2017 09:19:00 +0000 This will cut you - Go security Thomas Shadwell talks about how distinct, exploitable misuse patterns arise in software languages, and through example in Go – in particular a quietly prevalent and worryingly effective denial of service attack on Go systems affecting the Go toolchain itself – hopes to begin greater discourse on the language's distinct security characteristics. 13 points posted by kenny https://www.infoq.com/presentations/go-security 2375 Wed, 05 Jul 2017 10:28:00 +0000 Profiler labels in Go <p>Go 1.9 is introducing <a href="https://github.com/golang/proposal/blob/master/design/17280-profile-labels.md" style="box-sizing: border-box; color: rgb(55, 94, 171); text-decoration: none; font-weight: bold;">profiler labels</a>, a way to add arbitrary key-values to the samples collected by the CPU profiler. CPU profilers collect and output hot spots where the CPU spent most time in when executing. A typical CPU profiler output is primarily reports the location of these spots as function name, source file/line, etc. By looking at the data, you can also examine which parts of the code invoked these spots. You can also filter by invokers to have more granular understanding of certain execution paths.</p> 7 points posted by gopher https://rakyll.org/profiler-labels 2374 Wed, 05 Jul 2017 09:26:00 +0000 Making a debugger in golang part 2 3 points posted by andythomas https://medium.com/golangspec/making-debugger-in-golang-part-ii-d2b8eb2f19e0 2373 Wed, 05 Jul 2017 07:32:00 +0000 Optimising machine learning algorithms part2 #machinelearning This is the second in a series of blog posts sharing my experiences working with algorithms and data structures for machine learning. These experiences were gained whilst building out the <a href="http://github.com/james-bowman/nlp" style="background: rgb(255, 255, 255); color: rgb(74, 74, 74); transition: color 0.3s ease; font-family: Merriweather, serif; font-size: 18px; letter-spacing: 0.1px;">nlp project</a>&nbsp;for <a href="http://www.jamesbowman.me/post/semantic-analysis-of-webpages-with-machine-learning-in-go/" style="background: rgb(255, 255, 255); color: rgb(74, 74, 74); transition: color 0.3s ease; font-family: Merriweather, serif; font-size: 18px; letter-spacing: 0.1px;">LSA (Latent Semantic Analysis)</a>&nbsp;of text documents. 4 points posted by kenny http://www.jamesbowman.me/post/optimising-machine-learning-algorithms-part2 2372 Tue, 04 Jul 2017 20:09:00 +0000 JSON tips 4 points posted by taowen http://jsoniter.com/go-tips.html 2371 Tue, 04 Jul 2017 15:57:00 +0000 kolpa - A fake data generator written in and for Go 4 points posted by lolly https://github.com/malisit/kolpa 2370 Tue, 04 Jul 2017 15:29:00 +0000 How we improved our workflow by piping sql (using go tools) In this blog post, we share two of these tools: <a href="https://github.com/marianogappa/sql">https://github.com/marianogappa/sql</a>&nbsp;and <a href="https://github.com/marianogappa/chart">https://github.com/marianogappa/chart</a>, that we've been using a lot lately. Together, they compose an interesting pattern for tinkering with multiple databases individually or concurrently within the terminal. 7 points posted by Mariano https://movio.co/en/blog/improving-with-sql-and-charts 2369 Tue, 04 Jul 2017 02:38:00 +0000 Event: Golang UK Conference Schedule - August 2017 5 points posted by Samuel Bell https://golanguk.com/schedule 2368 Mon, 03 Jul 2017 14:05:00 +0000 Goroutines Explained 9 points posted by geekme https://golangbot.com/goroutines 2367 Sun, 02 Jul 2017 11:14:00 +0000