<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Roger Chapman</title>
    <link>https://rogchap.com/</link>
    <description>Recent content on Roger Chapman</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-au</language>
    <managingEditor>rogchap@gmail.com</managingEditor>
    <webMaster>rogchap@gmail.com</webMaster>
    <lastBuildDate>Mon, 14 Sep 2020 14:51:26 +1000</lastBuildDate><atom:link href="https://rogchap.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Running Go Code on iOS and Android</title>
      <link>https://rogchap.com/2020/09/14/running-go-code-on-ios-and-android/</link>
      <pubDate>Mon, 14 Sep 2020 14:51:26 +1000</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/2020/09/14/running-go-code-on-ios-and-android/</guid>
      <description>In this tutorial we&amp;rsquo;ll be building a simple Go package that you can run from an iOS application (Swift) and also an Android application (Kotlin).
This tutorial does NOT use the Go Mobile framework; instead it uses Cgo to build the raw static (iOS) and shared (Android) C library that can be imported into your mobile project (which is what the Go Mobile framework does under-the-hood).
Setup For this tutorial we&amp;rsquo;ll create a simple monorepo with the following structure:</description>
    </item>
    
    <item>
      <title>Simple Vim Markdown Preview</title>
      <link>https://rogchap.com/2020/01/09/simple-vim-markdown-preview/</link>
      <pubDate>Thu, 09 Jan 2020 21:46:34 +1100</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/2020/01/09/simple-vim-markdown-preview/</guid>
      <description>There are a lot of Vim plugins that allow you to preview markdown files:
iamcco/markdown-preview.vim JamshedVesuna/vim-markdown-preview MikeCoder/markdown-preview.vim pingao777/markdown-preview-sync suan/vim-instant-markdown PratikBhusal/vim-grip mgor/vim-markdown-grip But to name a few.
I was looking for something simple; but most of these plugins had options and setting, commands and auto commands that was just too bloated for my needs.
Most of these tools use a separate tool to render the markdown to the browser; grip is a cli application that renders markdown via the GitHub API, and is simple to install:</description>
    </item>
    
    <item>
      <title>Webhook Endpoint for grpc-gateway</title>
      <link>https://rogchap.com/2019/10/19/webhook-endpoint-for-grpc-gateway/</link>
      <pubDate>Sat, 19 Oct 2019 13:50:32 +1100</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/2019/10/19/webhook-endpoint-for-grpc-gateway/</guid>
      <description>grpc-gatway is a protoc plugin that reads protobuf service definitions and generates a reverse-proxy server which translates a RESTful HTTP API into gRPC.
Each field in a proto message would normally match to a JSON field:
message Request { id int32 = 1; first_name string = 2; last_name string = 3; } { &amp;#34;id&amp;#34;: 123456, &amp;#34;first_name&amp;#34;: &amp;#34;Roger&amp;#34;, &amp;#34;last_name&amp;#34;: &amp;#34;Chapman&amp;#34; } However, for a webhook (or other arbitrary data) being POSTed you may just want to pass the raw JSON body to your gRPC handler.</description>
    </item>
    
    <item>
      <title>Demystify Go&#39;s Empty Interface</title>
      <link>https://rogchap.com/2019/10/06/demystify-gos-empty-interface/</link>
      <pubDate>Sun, 06 Oct 2019 14:03:20 +1100</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/2019/10/06/demystify-gos-empty-interface/</guid>
      <description>One of delights of using the Go programming language is how quickly Engineers can learn and start using the language; but at the same time, Engineers also &amp;ldquo;Copy/Paste&amp;rdquo; without some of the understanding.
Go&amp;rsquo;s empty interface interface{} is one such mystery when learning the language; Engineers are happy to use interface{} to represent any type, but get confused about the interface keyword and why it&amp;rsquo;s used.
let i:any = 1; // Typescript std::any i = 1; // C++17 Object i = 1; // Java var i interface{} = 1 // Go &amp;ldquo;interface{} says nothing&amp;rdquo; &amp;ndash; Rob Pike Interface type Lets start with a regular interface:</description>
    </item>
    
    <item>
      <title>Building an Assembler</title>
      <link>https://rogchap.com/2019/07/28/building-an-assembler/</link>
      <pubDate>Sun, 28 Jul 2019 13:04:23 +1000</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/2019/07/28/building-an-assembler/</guid>
      <description>I recently completed the first part of the awesome &amp;ldquo;From Nand to Tetris&amp;rdquo; course. For project 6 you build an Assembler for the HACK Computer using a high level language of your choice; naturally I did my project using Go (Golang).
The HACK Assembly language is very simple, and an Assembler could be written using string manipulation in less than 50 lines of code. However, I&amp;rsquo;ve always wanted to build a lexer/scanner and parser in Go and thought this would be a great little project to do so.</description>
    </item>
    
    <item>
      <title>In Process gRPC-Web Proxy</title>
      <link>https://rogchap.com/2019/07/26/in-process-grpc-web-proxy/</link>
      <pubDate>Fri, 26 Jul 2019 17:11:06 +1000</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/2019/07/26/in-process-grpc-web-proxy/</guid>
      <description>From the official gRPC-Web docs:
&amp;ldquo;gRPC-Web clients connect to gRPC services via a special gateway proxy: the current version of the library uses Envoy by default, in which gRPC-Web support is built-in.&amp;rdquo;
For production we can just enable the envoy.grpc_web filter and we are good to go.
But for development I wanted to create a gRPC server that engineers could install via a single binary and not have to run anything extra (like envoy running in docker).</description>
    </item>
    
    <item>
      <title>Mocking gRPC in Go</title>
      <link>https://rogchap.com/2019/06/25/mocking-grpc-in-go/</link>
      <pubDate>Tue, 25 Jun 2019 22:20:10 +1000</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/2019/06/25/mocking-grpc-in-go/</guid>
      <description>One of the huge benefits of using gRPC is the ability to autogenerate our client and server stubs from the protocol buffer definitions.
In the same way, we can we generate our own code by building a plugin for the protocol buffer compiler (protoc).
The plugin we&amp;rsquo;re creating is going to auto-generate gRPC response messages so that we can build a mock gRPC server in Go (Golang).
Goal Given the following proto file:</description>
    </item>
    
    <item>
      <title>About</title>
      <link>https://rogchap.com/about/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/about/</guid>
      <description>Roger is a Software Engineer living in Sydney, Australia. As a polyglot engineer, previously working with C# (ASP.NET), Objective-C (iOS), Java (Android) and Javascript (Node.js and React), he has found his passion with the Go programming language.
Roger is currently a Distinguished Engineer at SafetyCulture, where he helps team&amp;rsquo;s design, and build, their microservice architecture using gRPC, Protocol Buffers, Docker, Kubernetes and Go.
Code dotfiles - All my dotfiles (configuration) for my development tools (OSX, kitty, tmux, vim etc) v8go - A Go module package to execute JavaScript grpc-web-devtools - Chrome browser extension to aid gRPC-Web development; view gRPC messages de-serialized into JSON just like the standard Network devtool.</description>
    </item>
    
    <item>
      <title>pdf</title>
      <link>https://rogchap.com/pdf/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/pdf/</guid>
      <description></description>
    </item>
    
    <item>
      <title>skia</title>
      <link>https://rogchap.com/skia/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/skia/</guid>
      <description></description>
    </item>
    
    <item>
      <title>suid</title>
      <link>https://rogchap.com/suid/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/suid/</guid>
      <description></description>
    </item>
    
    <item>
      <title>v8go</title>
      <link>https://rogchap.com/v8go/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <author>rogchap@gmail.com</author>
      <guid>https://rogchap.com/v8go/</guid>
      <description></description>
    </item>
    
  </channel>
</rss>
