less_retarded_wiki/gopher.md

29 lines
6.4 KiB
Markdown
Raw Normal View History

# Gopher
2023-11-03 22:26:49 +01:00
Gopher is a network [protocol](protocol.md) for publishing, browsing and downloading files and is known as a much simpler alternative to the [World Wide Web](www.md) (i.e. to [HTTP](http.md) and [HTML](html.md)). In fact it competed with the Web in its early days and even though the Web won in the mainstream, gopher still remains used by a small communities (however the more dedicated, see e.g. [bitreich](bitreich.md)). Gopher is like the Web but well designed, it is the [suckless](suckless.md)/[KISS](kiss.md) way of doing what the Web does, it contains practically no [bloat](bloat.md) and so [we](lrs.md) highly advocate its use. Gopher inspired creation of [Gemini](gemini.md), a similar but bit more complex and "[modern](modern.md)" protocol, and the two together have recently become the main part of so called [Smol Internet](smol_internet.md). Gopher is much better than Gemini though.
2022-09-19 08:56:30 +02:00
2023-11-11 12:20:48 +01:00
As of 2023 the Veronica search engine reported 315 gopher servers in the world with 5+ million indexed selectors. Quarry search engine reports 369 servers and 1+ million indexed selectors. Gopher LAWN directory (made by [bitreich](bitreich.md)) contains 281 selected quality gopher holes.
Gopher **doesn't use any [encryption](encryption.md)**. This is good, encryption is [bloat](bloat.md). Gopher also **only uses [ASCII](ascii.md)**, i.e. there's no [Unicode](unicode.md). That's also good, Unicode is bloat (and mostly serves trannies to insert emojis of pregnant men into readmes, we don't need that). Gopher simple design is intentional, the authors deemed simplicity a good feature. Gopher is so simple that you may very well write your own client and server and comfortably use them (it is also practically possible to browse gopher without a specialized client, just with standard [Unix](unix.md) [CLI](cli.md) tools).
2022-09-19 08:56:30 +02:00
From the user's perspective the most important distinction from the Web is that gopher is based on **menus** instead of "webpages"; a menu is simply a column of items of different predefined types, most importantly e.g. a *text file* (which clients can directly display), *directory* (link to another menu), *text label* (just shows some text), *binary file* etc. A menu can't be formatted or visually changed, there are no colors, images, scripts or [hypertext](hypertext.md) -- a menu is not a presentation tool, it is simply a navigation node towards files users are searching for (but the mentioned ASCII art and label items allow for somewhat mimicking "websites" anyway). Addressing works with [URLs](url.md) just as the Web, the URLs just differ by the protocol part (`gopher://` instead of `http://`), e.g.: `gopher://gopher.floodgap.com:70/1/gstats`. What on Web is called a "website" on gopher we call a **gopherhole** (i.e. a collection of resources usually under a single [domain](domain.md)) and the whole gopher network is called a **gopherspace**. [Blogs](blog.md) are common on gopher and are called **phlogs** (collectively a *phlogosphere*). As menus can refer to one another, gopher creates something akin a **global [file system](file_system.md)**, so browsing gopher is like browsing folders and can comfortably be handled with just 4 arrow keys. Note that as menus can link to any other menu freely, the structure of the "file system" is not a [tree](tree.md) but rather a general [graph](graph.md). Another difference from the Web is gopher's great emphasis on **[plaintext](plaintext.md) and [ASCII art](ascii_art.md)** as it cannot embed images and other media in the menus (even though of course the menus can link to them). There is also a support for sending text to a server so it is possible to implement [search engines](search_engine.md), guest books etc.
2023-02-18 15:02:52 +01:00
Gopher is just an [application layer](l7.md) [protocol](protocol.md) (officially running on [port](port.md) 70 assigned by [IANA](iana.md)), i.e it sits above lower layer protocols like [TCP](tcp.md) and takes the same role as [HTTP](http.md) on the Web and so only defines how clients and servers talk to each other -- the gopher protocol doesn't say how menus are written or stored on servers. Nevertheless for the creation of menus so called **gophermaps** have been established, which is a simple format for writing menus and are the gopher equivalent of Web's [HTML](html.md) files (just much simpler, basically just menu items on separate lines, the exact syntax is ultimately defined by server implementation). A server doesn't have to use gophermaps, it may be e.g. configured to create menus automatically from directories and files stored on the server, however gophermaps allow users to write custom menus manually. Typically in someone's gopherhole you'll be served a welcoming intro menu similar to a personal webpage that's been written as a gophermap, which may then link to directiories storing personal files or other hand written menus. Some gopher servers also allow creating dynamic content with scripts called **moles**.
2023-11-09 22:10:37 +01:00
**Gopher [software](software.md)**: sadly "[modern](modern.md)" browsers are so modern they have millions of lines of code but can't be bothered to support such a trivial protocol like gopher, however there are Web proxies you can use to explore gopherspace (look up e.g. floodgap). Better browsers such as [lynx](lynx.md) (terminal), [sacc](sacc.md), [clic](clic.md) or [forg](forg.md) ([GUI](gui.md)) can be used for browsing gopherspace natively (it's not hard, you don't need to learn any keybinds, using arrow keys usually just works). As a server you may use e.g. Gophernicus (used by [SDF](sdf.md)) or search for another one, there are dozens. { Personally I've used gophrier for server, it was the simplest one I found. ~drummyfish } For the creation of gophermaps you simply use a plaintext editor. **Where to host gopher?** [Pubnixes](pubnix.md) such as [SDF](sdf.md), [tilde.town](tilde_town.md) and [Circumlunar community](circumlunar.md) offer gopher hosting but many people simply [self-host](self_hosting.md) servers e.g. on [Raspberry Pis](rpi.md), it's pretty simple.
2023-11-09 22:10:37 +01:00
**Some basic/interesting gopher links**: gopher://bitreich.org/1/lawn (directory of gopher holes), gopher://gopher.floodgap.com/7/v2/vs (search engine), gopher://circumlunar.space:70/1 (circumlunar space), gopher://gopherpedia.com ([Wikipedia](wikipedia.md) on gopher), gopher://gopher.icu/7/quarry (search engine), ...
2023-11-03 22:26:49 +01:00
2023-11-03 17:46:23 +01:00
## How To
For now take a look at stuff in this repo: `git clone git://bitreich.org/gopher-tutorials/`.
## Example
2023-11-11 17:01:55 +01:00
TODO
## See Also
- [gemini](gemini.md)
- [Fediverse](fediverse.md)
- [smol internet](smol_internet.md)