http:, ftp:, and ... dict:?
I went for a spelunk0 through an ancient codebase a few weeks ago which contained a curious regex that I just couldn't grok1.
{<((https?|ftp|dict|tel):[^\'">\s]+)>}i
I'm familiar with HTTP and FTP. I worked in the mobile industry, so knew that tel:+44...
could be used to launch a dialer.
But DICT?!?!?!
It turns out that, lurking on the Internet are Dictionary Servers! They exist to allow you to query dictionaries over a network.
For many years, the Internet community has relied on the "webster" protocol for access to natural language definitions. […] In recent years, the number of publicly available webster servers on the Internet has dramatically decreased. Fortunately, several freely-distributable dictionaries and lexicons have recently become available on the Internet. However, these freely-distributable databases are not accessible via a uniform interface, and are not accessible from a single site.
The (informal) standard was published in 1997 but has kept a relatively low profile since then. You can understand why it was invented - in an age of low-size disk drives and expensive software, looking up data over a dedicated protocol seems like a nifty2 idea.
Then disk size exploded, databases became cheap, and search engines made it easy to look up words.
How it works
You can try it out today!
Run this command in your terminal:
curl dict://dict.org/d:Internet
That will bring back the definition from the server's default dictionary. If you want to look up a word in a specific dictionary - like The Jargon File - you can run:
curl dict://dict.org/d:Internet:jargon
You can even use it for simple translation tasks. For example, to translate English to Japanese:
curl dict://dict.org/d:Internet:fd-eng-jpn
What Else?
Perhaps the easiest way to explore the protocol and server is to use telnet:
telnet dict.org dict
Type the command HELP
and help ye shall receive:
113 help text follows
DEFINE database word -- look up word in database
MATCH database strategy word -- match word in database using strategy
SHOW DB -- list all accessible databases
SHOW DATABASES -- list all accessible databases
SHOW STRAT -- list available matching strategies
SHOW STRATEGIES -- list available matching strategies
SHOW INFO database -- provide information about the database
SHOW SERVER -- provide site-specific information
OPTION MIME -- use MIME headers
CLIENT info -- identify client to server
AUTH user string -- provide authentication information
STATUS -- display timing information
HELP -- display this help information
QUIT -- terminate connection
250 ok
That will allow you to see all the dictionaries available - in a variety of languages - and the various commands you can use with them.
Unanswered Questions
- Are there any other Dictionary Servers still available on the Internet?
- Did the Webster Protocol get specified outside of obscure source code?
- Is there something interesting and modern one could do with a DICT server?
Bruce Lawson ✅ said on social.vivaldi.net:
@Edent 'nifty' doesn't mean 'groovy'; groovy is nifty with lashings of extra 'cosmic'. HTH.
Jon Wood said on activitypub.blankpad.net:
@Edent of course curl supports it. Is there anything you can’t use curl for?
dan 💾 said on bitbang.social:
@Edent Oh, interesting! Sticking a dict:// url into Safari on my Mac makes it want to open the Dictionary app.
But it falls apart after that... with your example it tries to up the ‘dict.org’ directly after the :// and gets no entries found, instead of connecting to the dict.org server :/
Andy Mabbett says:
Try entering
dict:Internet
in Wikipedia's search bar[Why this doesn't go to a page on Wikimedia's own Wiktionary or Wikidata is something I'm currently asking]
See also: https://en.wikipedia.org/wiki/DICT
Dan Q says:
Well this makes me want to expand on my ongoing effort to make WordPress-to-X bridges (so far I support Gemini, Spartan, Gopher, and Finger) to support DICT too!
Oggie said on woof.group:
@Edent
If anyone else want to go looking, it is a connection on port 2628. Interesting.
Also good god search is awful now. The amount of painfully bad results was impressive.
Ian K Tindale said on toot.pikopublish.ing:
@Edent did Webster come before the web, ie did one influence the name of the other
Terence Eden said on mastodon.social:
@u0421793 The Webster protocol seems to date back to at least 1989. It's named for the Webster Dictionary.
I don't think WWW is named for it
Andy Mabbett says:
Wikimedia update:
I have been shown https://phabricator.wikimedia.org/T31229
Alaric Snell-Pym said on fosstodon.org:
@Edent ahhh, I'm nostalgic for the days when people made protocols target then just REST APIs...
Jon Randy said on mastodon.social:
@Edent https://dikt.tv/servers
Dict servers list
news.ycombinator.com said on news.ycombinator.com:
HTTP: , FTP:, and Dict:? | Hacker News
Harmless Drudge says:
Was webster an open protocol, or only available on NeXT computers?
crosser says:
To question 01: https://datatracker.ietf.org/doc/html/rfc2229
@edent says:
That is literally the same standard I link to and quote.
If you read it, you'll see that it discusses the Webster protocol, but doesn't standardise it.
georgemoody says:
@blog@shkspr.mobi This is also the same protocol used by GNOME Dictionary (which i believe is still part of the official GNOME suite of apps), so anyone that has ever tried to look for a more up to date dict server to put on there is most definitely familiar with it
sadly not even the creator of the app has good sentiments about the protocol, and considering Wiktionary's existence, neither do i, a really cool piece of internet history nontheless
More comments on Mastodon.