itNew article: gopher - monochromatic - monochromatic blog: http://blog.z3bra.org Err z3bra.org 70 hgit clone git://z3bra.org/monochromatic URL:git://z3bra.org/monochromatic z3bra.org 70 1Log /scm/monochromatic/log.gph z3bra.org 70 1Files /scm/monochromatic/files.gph z3bra.org 70 1Refs /scm/monochromatic/refs.gph z3bra.org 70 i--- Err z3bra.org 70 1commit 041a2d14fa4dc88a9b0be196586d03cab85fb982 /scm/monochromatic/commit/041a2d14fa4dc88a9b0be196586d03cab85fb982.gph z3bra.org 70 1parent a3a9a49c7e1228797d66852d347d5ace3c9c9964 /scm/monochromatic/commit/a3a9a49c7e1228797d66852d347d5ace3c9c9964.gph z3bra.org 70 hAuthor: z3bra URL:mailto:willy@mailoo.org z3bra.org 70 iDate: Sat, 14 Feb 2015 00:53:57 +0100 Err z3bra.org 70 i Err z3bra.org 70 iNew article: gopher Err z3bra.org 70 i Err z3bra.org 70 iDiffstat: Err z3bra.org 70 i A 2015/02/do-you-gopher.txt | 132 +++++++++++++++++++++++++++++++ Err z3bra.org 70 i M config.mk | 3 ++- Err z3bra.org 70 i M index.txt | 1 + Err z3bra.org 70 i Err z3bra.org 70 i3 files changed, 135 insertions(+), 1 deletion(-) Err z3bra.org 70 i--- Err z3bra.org 70 1diff --git a/2015/02/do-you-gopher.txt b/2015/02/do-you-gopher.txt /scm/monochromatic/file/2015/02/do-you-gopher.txt.gph z3bra.org 70 it@@ -0,0 +1,132 @@ Err z3bra.org 70 i+# [Do you gopher ?](#) Err z3bra.org 70 i+## — 03 February, 2015 Err z3bra.org 70 i+ Err z3bra.org 70 i+> Pocket gophers, commonly referred to as gophers, are burrowing rodents of the Err z3bra.org 70 i+> family Geomyidae.[3] There are approximately 35 species of gopher living in Err z3bra.org 70 i+> Central and North America.[4] They are commonly known for their extensive Err z3bra.org 70 i+> tunneling activities. Gophers are endemic to North and Central America. Err z3bra.org 70 i+> Err z3bra.org 70 i+> -- wikipedia Err z3bra.org 70 i+ Err z3bra.org 70 i+This article is not about them. Err z3bra.org 70 i+ Err z3bra.org 70 i+The gopher I'll cover here is the TCP/IP protocol. It is a simple protocol used Err z3bra.org 70 i+to share resources across the internet. The goal is to make the all internet Err z3bra.org 70 i+look like a giant filesystem, where everything is read-only. Err z3bra.org 70 i+ Err z3bra.org 70 i+How does it looks? Err z3bra.org 70 i+ Err z3bra.org 70 i+ $ curl -s gopher://z3bra.org Err z3bra.org 70 i+ iYou found me. Happy browsing ! Err z3bra.org 70 Err z3bra.org 70 i+ i============================== Err z3bra.org 70 Err z3bra.org 70 i+ i Err z3bra.org 70 Err z3bra.org 70 i+ 0prolog /prolog.txt z3bra.org 70 Err z3bra.org 70 i+ 1notes /notes z3bra.org 70 Err z3bra.org 70 i+ 1ascii /ascii z3bra.org 70 Err z3bra.org 70 i+ 1images /img z3bra.org 70 Err z3bra.org 70 i+ hhttp://blog.z3bra.org URL:http://blog.z3bra.org z3bra.org 70 Err z3bra.org 70 i+ . Err z3bra.org 70 i+ Err z3bra.org 70 i+We'll come back on this later. First, how does it works? Err z3bra.org 70 i+ Err z3bra.org 70 i+### gopher indexes Err z3bra.org 70 i+ Err z3bra.org 70 i+Gopher is a text based protocol, where each line either points to an index Err z3bra.org 70 i+(directory), or an item (items being files). Err z3bra.org 70 i+The items will either be files or text (see file types later). To understand Err z3bra.org 70 i+what the indexes are, let's assume we have the following filesystem: Err z3bra.org 70 i+ Err z3bra.org 70 i+ /var/gopher/ Err z3bra.org 70 i+ ├── img Err z3bra.org 70 i+ │ ├── index.gph Err z3bra.org 70 i+ │ ├── dad.png Err z3bra.org 70 i+ │ ├── mom.png Err z3bra.org 70 i+ │ └── son.png Err z3bra.org 70 i+ ├── index.gph Err z3bra.org 70 i+ ├── notes Err z3bra.org 70 i+ │ ├── index.gph Err z3bra.org 70 i+ │ ├── memories.txt Err z3bra.org 70 i+ │ └── tricks.txt Err z3bra.org 70 i+ └── hello.txt Err z3bra.org 70 i+ Err z3bra.org 70 i+ 2 directories, 9 files Err z3bra.org 70 i+ Err z3bra.org 70 i+The files `index.gph` are the equivalent for `index.html` for most HTTP servers. Err z3bra.org 70 i+In this case, each `index.gph` lists the content of the directory, so from a Err z3bra.org 70 i+gopher client, we'll see: Err z3bra.org 70 i+ Err z3bra.org 70 i+ / Err z3bra.org 70 i+ ├── img [index] Err z3bra.org 70 i+ │ ├── dad.png [file] Err z3bra.org 70 i+ │ ├── mom.png [file] Err z3bra.org 70 i+ │ └── son.png [file] Err z3bra.org 70 i+ ├── hello.txt [file] Err z3bra.org 70 i+ └── notes [index] Err z3bra.org 70 i+ ├── memories.txt [file] Err z3bra.org 70 i+ └── tricks.txt [file] Err z3bra.org 70 i+ Err z3bra.org 70 i+Pretty simple. You could however create a more difficult architecture by making Err z3bra.org 70 i+`.gph` point to other files not in their directories and such.. but that's not Err z3bra.org 70 i+the point here. Err z3bra.org 70 i+ Err z3bra.org 70 i+### the protocol Err z3bra.org 70 i+ Err z3bra.org 70 i+To put it simply, each gopher "line" is composed of 5 distinct parts: Err z3bra.org 70 i+ Err z3bra.org 70 i+ Err z3bra.org 70 i+ Err z3bra.org 70 i+So each line is a link to another file, which could be on any server. Err z3bra.org 70 i+ Err z3bra.org 70 i+* <type> : type of the line, usualy the type of the file pointed to Err z3bra.org 70 i+* <description> : just text, to describe what the link points to Err z3bra.org 70 i+* <path> : path to the item, from gopher's server root Err z3bra.org 70 i+* <server> : the server which hosts the file Err z3bra.org 70 i+* <port> : the port on which the server is listenning Err z3bra.org 70 i+ Err z3bra.org 70 i+A gopher index is then just a list of links, each one pointing to a file which Err z3bra.org 70 i+can be anywhere accross the world. And you don't need any unreadable markup Err z3bra.org 70 i+language for this! Err z3bra.org 70 i+ Err z3bra.org 70 i+### file types Err z3bra.org 70 i+ Err z3bra.org 70 i+The gopher protocol implements a rudimentary filetype thingy, by putting a Err z3bra.org 70 i+character at the beginning of each line, indicating what the "item" points to. Err z3bra.org 70 i+For example: Err z3bra.org 70 i+ Err z3bra.org 70 i+ 0this is a file /path/to/the/file domain.tld port Err z3bra.org 70 i+ 1this is an index path/to/the/index domain.tld port Err z3bra.org 70 i+ 9this is a binary file /path/to/the/binary domain.tld port Err z3bra.org 70 i+ Ithis is an image /path/to/the/image domain.tld port Err z3bra.org 70 i+ Err z3bra.org 70 i+There is also a special type: 'i', which doesn't point to anything, so it is Err z3bra.org 70 i+only used to display text: Err z3bra.org 70 i+ Err z3bra.org 70 i+ iThe following is a set of cat pictures Err domain.tld port Err z3bra.org 70 i+ Icat1.png /img/cats/1.png domain.tld port Err z3bra.org 70 i+ Icat2.png /img/cats/2.png domain.tld port Err z3bra.org 70 i+ Icat3.png /img/cats/3.png domain.tld port Err z3bra.org 70 i+ Icat4.png /img/cats/4.png domain.tld port Err z3bra.org 70 i+ Err z3bra.org 70 i+### gopher holes Err z3bra.org 70 i+ Err z3bra.org 70 i+Gopher spaces are commonly named "holes". All you need now is a gopher to crawl Err z3bra.org 70 i+this huge gallery. Here are a few I recommend: Err z3bra.org 70 i+ Err z3bra.org 70 i+* gopher - http://gopher.quux.org:70/give-me-gopher/ Err z3bra.org 70 i+* cgo - https://github.com/kieselsteini/cgo Err z3bra.org 70 i+ Err z3bra.org 70 i+Or you could use an HTTP proxy : http://gopher.floodgap.com/gopher/ Err z3bra.org 70 i+ Err z3bra.org 70 i+### final thoughs Err z3bra.org 70 i+ Err z3bra.org 70 i+As you might have noticed (or not), I run my own gopher hole. I first wanted to Err z3bra.org 70 i+move this whole blog over gopher, but finally decided to keep it as is (because Err z3bra.org 70 i+I'm kind of attached to it after all!), and use my gopher space to share some Err z3bra.org 70 i+quick thoughs & notes about POSIX systems and other IT related subjects. Err z3bra.org 70 i+ Err z3bra.org 70 i+Because of this, I might reduce the freequency of posts I publish here, in favor Err z3bra.org 70 i+of more notes on my gopher space. So see you there! Err z3bra.org 70 i+ Err z3bra.org 70 i+ gopher://z3bra.org Err z3bra.org 70 i+ Err z3bra.org 70 i+ Err z3bra.org 70 1diff --git a/config.mk b/config.mk /scm/monochromatic/file/config.mk.gph z3bra.org 70 it@@ -23,7 +23,8 @@ PAGES = index.html \ Err z3bra.org 70 i 2014/09/backup-someone.html \ Err z3bra.org 70 i 2014/11/avoid-workspaces.html \ Err z3bra.org 70 i 2014/12/so-tox-me-maybe.html \ Err z3bra.org 70 i- 2015/01/you-are-the-wm.html Err z3bra.org 70 i+ 2015/01/you-are-the-wm.html \ Err z3bra.org 70 i+ 2015/02/do-you-gopher.html Err z3bra.org 70 i Err z3bra.org 70 i FEEDS = rss/feed.xml Err z3bra.org 70 i EXTRA = css img vid errors favicon.ico Err z3bra.org 70 1diff --git a/index.txt b/index.txt /scm/monochromatic/file/index.txt.gph z3bra.org 70 it@@ -1,3 +1,4 @@ Err z3bra.org 70 i+* 0x0014 - [Do you gopher ?](/2015/02/do-you-gopher.html) Err z3bra.org 70 i * 0x0013 - [You are the WM](/2015/01/you-are-the-wm.html) Err z3bra.org 70 i * 0x0012 - [So tox me maybe](/2014/12/so-tox-me-maybe.html) Err z3bra.org 70 i * 0x0011 - [Avoid workspaces](/2014/11/avoid-workspaces.html) Err z3bra.org 70 .