{"id":684,"date":"2010-06-24T00:58:57","date_gmt":"2010-06-23T14:58:57","guid":{"rendered":"http:\/\/www.erisian.com.au\/wordpress\/?p=684"},"modified":"2010-06-24T01:01:14","modified_gmt":"2010-06-23T15:01:14","slug":"the-semiotic-web","status":"publish","type":"post","link":"https:\/\/www.erisian.com.au\/wordpress\/2010\/06\/24\/the-semiotic-web","title":{"rendered":"The semiotic web"},"content":{"rendered":"<p>Quite a long time ago I read a fascinating article on semiotics and user-interface design. My recollection is that it made the argument that computer user interfaces could be broken up into roughly three branches: &#8220;menus&#8221;, where you have a few options to choose between, and that&#8217;s it; &#8220;WIMP paradigm&#8221; where you&#8217;ve got windows, icons, menus and a pointer and can gesticulate to get things done; and &#8220;command oriented&#8221; where you type commands in to have things happen.<\/p>\n<p>While the WIMP paradigm is obviously pretty good, it&#8217;s restricted by its &#8220;metaphoric&#8221; nature: you have to represent everything you want to do with a picture &#8212; so if you don&#8217;t have a picture for something, you can&#8217;t do anything with it. In effect, it&#8217;s reduces your interaction with computers to point-and-grunt, which is really kind of demeaning for its operators. Can you imagine if the &#8220;communication skills&#8221; that were expected of you in a management role in business were the ability to point accurately and be able to make two distinct grunting noises?<\/p>\n<p>On the other hand, if your system&#8217;s smart enough to actually do what you want just based on a wave of your hand that <i>is<\/i> pretty appealing &#8212; it&#8217;s just that when you want something unusual &#8212; or when your grunts and handwaving aren&#8217;t getting your point across &#8212; you can&#8217;t sit down and explain what you want merely with more grunts and pointing.<\/p>\n<p>Obviously that&#8217;s where programming and command lines come in &#8212; both of which give you a range of fairly powerful languages to communicate with computers, and both of which are what people end up using when they want to get new and complicated things done. <\/p>\n<p>It&#8217;s probably fair to say that the difference between programming languages and command line invocations is similar to essays and instant messaging &#8212; programs and essays tend to be long and expect certain formulas to be followed, but also tend to remain relevant for an extended period; an IM or a command line invocation tends to be brief, often a bit abbreviated, and only really interesting exactly when it&#8217;s written. Perhaps &#8220;tweet&#8221; or &#8220;facebook status update&#8221; would be a more modern version of IM &#8212; what can I say, I&#8217;m an old fogey. In any event, my impression is that the command line approach is often a good compromise when point-and-grunt fails: it&#8217;s not too much more effort, but brings you a lot more power. For instance,<\/p>\n<blockquote><p><code><\/p>\n<pre>$ for a in *.htm; do mv \"$a\" \"${a%.htm}.html\"; done<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>isn&#8217;t a very complicated way of saying &#8220;rename all those .htm files to .html&#8221;, compared to first creating a program like:<\/p>\n<blockquote><p><code><\/p>\n<pre>#!\/usr\/bin\/env python\r\nimport os\r\nfor name in os.listdir(\".\"):\r\n    if name.endswith(\".htm\"):\r\n        os.rename(name, name[:-4]+\".html\")\r\n<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>and then running it. And obviously, one of the advantages of Unix systems is that they have a very powerful command line system.<\/p>\n<p>In any event, one of the things that strikes me about all the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Software_as_a_service\">SaaS<\/a> and cloud stuff is that there really isn&#8217;t much a linguistic equivalent to the command line for the web. If I want to do something with gmail, or flickr, or facebook I&#8217;m either pointing and grunting, or delving deeply into HTML, javascript, URLs, REST interfaces and whatever else to make use of whatever arbitrary APIs happen to be available.<\/p>\n<p>A few services do have specialised command line tools of course &#8212; there&#8217;s <a href=\"http:\/\/google-opensource.blogspot.com\/2010\/06\/introducing-google-command-line-tool.html\">GoogleCL<\/a>, various little things to upload to flickr, the bts tool in <a href=\"http:\/\/packages.debian.org\/unstable\/devscripts\">devscripts<\/a> to play with the Debian bug tracking system, and so forth.<\/p>\n<p>But one of the big advantages of the web is that you aren&#8217;t meant to need special client side tools &#8212; you just have a browser, and leave the smarts on whichever web server you&#8217;re accessing. And you don&#8217;t get that if you have to install a silly little app to interface with whichever silly little website you happen to be interested in.<\/p>\n<p>So I think there ought to be a standard &#8220;command line&#8221; API for webapps, so that you can say something like:<\/p>\n<blockquote><p><code><\/p>\n<pre>$ <b>web www.google.com search -q='hello world'<\/b><\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>to do a Google search for &#8216;hello world&#8217;. The mapping from the above command line to a URL is straightforward: up until the option arguments, each word gets converted into a portion of the URL path, so the base url is <code>http:\/\/www.google.com\/search<\/code>, and options get put after a question mark and separated by ampersands, with regular URL quoting (spaces become plusses, irregular characters get converted to a percent and a hex code), in this case <code>?q=hello+world<\/code>.<\/p>\n<p>The obvious advantage is you can then use the same program for other webapps, such as the Debian BTS:<\/p>\n<blockquote><p><code><\/p>\n<pre>$ <b>web bugs.debian.org cgi-bin bugreport.cgi --bug=123456 --mbox=yes<\/b>\r\nFrom mech...@...debian.net Tue Dec 11 11:32:47 2001\r\nReceived: (at submit) by bugs.debian.org; 11 Dec 2001 17:32:47 +0000\r\nReturn-path: <mech...@...debian.net>\r\nReceived: from gent-smtp1.xs4all.be [195.144.67.21] (root)\r\n\tby master.debian.org with esmtp (Exim 3.12 1 (Debian))\r\n\tid 16Dqlr-0007yg-00; Tue, 11 Dec 2001 11:32:47 -0600\r\n...<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>It obviously looks cleaner when you use the shorter url (<code>web bugs.debian.org 123456<\/code>), although due to the way the BTS is setup, you also lose the ability to specify things like mbox format then.<\/p>\n<p>Of course, web pages are in all sorts of weird formats, too: having Google&#8217;s HTML and javascript splatter all over your terminal isn&#8217;t very pleasant, for instance. But that&#8217;s what pipes are for, right?<\/p>\n<blockquote><p><code><\/p>\n<pre>$ <b>web chart.apis.google.com chart --cht=p3 \\\r\n    --chs=400x150 --chd=t:2,3,5,10,20,60 \\\r\n    --chl='Alice|Bob|Carol|Dave|Ella|Fred' | display<\/b><\/pre>\n<p><\/code><br \/>\n<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.erisian.com.au\/wordpress\/wp-content\/uploads\/2010\/06\/chart.png\" alt=\"chart\" title=\"chart\" width=\"400\" height=\"150\" class=\"aligncenter size-full wp-image-686\" \/>\n<\/p><\/blockquote>\n<p>It&#8217;d probably be interesting to make &#8220;web&#8221; clever enough to automatically pipe images to <code>display<\/code> and HTML to firefox and so on, depending on what media type is returned.<\/p>\n<p>Obviously you can use aliases just like you&#8217;d use bookmarks on the web, so saying:<\/p>\n<blockquote><p><code><\/p>\n<pre>$ alias gchart='web chart.apis.google.com chart'\r\n$ alias debbug='web bugs.debian.org cgi-bin bugreport.cgi'<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>lets you type a little less.<\/p>\n<p>Anyway, I think that makes for a kind-of interesting paradigm for looking at the web. And the &#8220;web&#8221; app above is pretty trivial too &#8212; as described all it does is convert arguments into a URL according to the given formula.<\/p>\n<p>Things get a little more interesting if you try to make things interactive; a webapp that asks you your name, waits for you to tell it, then greets you by name is made unreasonably difficult if you try to do it on a single connection (with FastCGI and nginx for instance, the client has to supply the exact length of all the information you&#8217;re going to send before it will receive anything, and if you don&#8217;t know what you&#8217;re going to need to send up front&#8230;). Which means that so far my attempts to have <code>web localhost bash<\/code> behave as expected aren&#8217;t getting very far.<\/p>\n<p>The other thing that would be nice would be passing files to remote web apps &#8212; being able to say &#8220;upload this avi to youtube&#8221; would be more elegant as <code>web youtube.com upload .\/myvideo.avi<\/code> than <code>web youtube.com upload &lt;.\/myvideo.avi<\/code>, but when <code>web<\/code> doesn&#8217;t know what &#8220;youtube&#8221; or &#8220;upload&#8221; actually means, that&#8217;s a bit hard to arrange. After all, maybe you were trying to tell youtube to do the uploading to your computer, and .\/myvideo.avi was where you wanted it to end up.<\/p>\n<p>Anyway. Thoughts appreciated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quite a long time ago I read a fascinating article on semiotics and user-interface design. My recollection is that it made the argument that computer user interfaces could be broken up into roughly three branches: &#8220;menus&#8221;, where you have a few options to choose between, and that&#8217;s it; &#8220;WIMP paradigm&#8221; where you&#8217;ve got windows, icons, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/684"}],"collection":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/comments?post=684"}],"version-history":[{"count":8,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/684\/revisions"}],"predecessor-version":[{"id":693,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/684\/revisions\/693"}],"wp:attachment":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/media?parent=684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/categories?post=684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/tags?post=684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}