9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Does "as little software as possible" include a modern browser?
@ 2009-07-22 22:44 Jason Catena
  2009-07-22 23:13 ` andrey mirtchovski
  2009-07-22 23:19 ` Charles Forsyth
  0 siblings, 2 replies; 20+ messages in thread
From: Jason Catena @ 2009-07-22 22:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

This passage seems to me to speak to the minimal spirit in Plan 9.

"... the best choice of software is often no software -- and barring that,
as little software as you can possibly get away with, and even then, only
from the most reputable and reliable sources."


http://www.codinghorror.com/blog/archives/001289.html


I'd add that you need a way to combine what little you have with other
little bits, to build up a new, custom tool that does what you want at this
moment.

I like the part about bluescreening the city block, but hope we're past the
point where anyone would seriously think of wiring Windows that deeply into
the fabric of our real-world systems.  I like to think Vista broke the
upgrade spell, and remote computing will anyway make desktop OS choice
mostly irrelevant.

Which brings me to repeat a question about Plan9, from another thread: if
there is no real browser for the platform, how will Plan 9 participate in
the "cloud computing" (r)evolution?  I suppose it would be enough to have a
Chromium port, if Chrome and the Chrome OS gain traction.

Jason Catena

[-- Attachment #2: Type: text/html, Size: 1564 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern browser?
  2009-07-22 22:44 [9fans] Does "as little software as possible" include a modern browser? Jason Catena
@ 2009-07-22 23:13 ` andrey mirtchovski
  2009-07-22 23:19 ` Charles Forsyth
  1 sibling, 0 replies; 20+ messages in thread
From: andrey mirtchovski @ 2009-07-22 23:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Which brings me to repeat a question about Plan9, from another thread: if
> there is no real browser for the platform, how will Plan 9 participate in
> the "cloud computing" (r)evolution?  I suppose it would be enough to have a
> Chromium port, if Chrome and the Chrome OS gain traction.

"clouds" (whatever they may be) are not synonymous with web browsers.
Plan 9 is already involved in "cloud computing" (whatever that may be)
by means of the 9P protocol in at least one project i know of...

but yes, a chromium port (and the c++ compiler used for it) would be nice :)



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern browser?
  2009-07-22 22:44 [9fans] Does "as little software as possible" include a modern browser? Jason Catena
  2009-07-22 23:13 ` andrey mirtchovski
@ 2009-07-22 23:19 ` Charles Forsyth
  2009-07-22 23:56   ` Francisco J Ballesteros
                     ` (2 more replies)
  1 sibling, 3 replies; 20+ messages in thread
From: Charles Forsyth @ 2009-07-22 23:19 UTC (permalink / raw)
  To: 9fans

>if there is no real browser for the platform,
>how will Plan 9 participate in the "cloud computing" (r)evolution?

not using a browser.
careful now.
down with this sort of thing!



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern browser?
  2009-07-22 23:19 ` Charles Forsyth
@ 2009-07-22 23:56   ` Francisco J Ballesteros
  2009-07-23  0:22   ` andrey mirtchovski
  2009-07-23  0:47   ` Jason Catena
  2 siblings, 0 replies; 20+ messages in thread
From: Francisco J Ballesteros @ 2009-07-22 23:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

let´s rewrite everything in Ada.
We can use the distributed systems annex in a cloud.

On Thu, Jul 23, 2009 at 1:19 AM, Charles Forsyth<forsyth@terzarima.net> wrote:
>>if there is no real browser for the platform,
>>how will Plan 9 participate in the "cloud computing" (r)evolution?
>
> not using a browser.
> careful now.
> down with this sort of thing!
>
>



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern browser?
  2009-07-22 23:19 ` Charles Forsyth
  2009-07-22 23:56   ` Francisco J Ballesteros
@ 2009-07-23  0:22   ` andrey mirtchovski
  2009-07-23  0:47   ` Jason Catena
  2 siblings, 0 replies; 20+ messages in thread
From: andrey mirtchovski @ 2009-07-23  0:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> not using a browser.
> careful now.
> down with this sort of thing!

does this mean we should expect an influx of viewers due to the
negative publicity?



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern browser?
  2009-07-22 23:19 ` Charles Forsyth
  2009-07-22 23:56   ` Francisco J Ballesteros
  2009-07-23  0:22   ` andrey mirtchovski
@ 2009-07-23  0:47   ` Jason Catena
  2009-07-23  9:48     ` C H Forsyth
  2 siblings, 1 reply; 20+ messages in thread
From: Jason Catena @ 2009-07-23  0:47 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 343 bytes --]

On Wed, Jul 22, 2009 at 18:19, Charles Forsyth <forsyth@terzarima.net>wrote:

> >if there is no real browser for the platform,
> >how will Plan 9 participate in the "cloud computing" (r)evolution?
>
> not using a browser.
>

Fair enough.  I hope the services I want to use (will) have a non-browser
API (eg Twitter).

Jason Catena

[-- Attachment #2: Type: text/html, Size: 657 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern browser?
  2009-07-23  0:47   ` Jason Catena
@ 2009-07-23  9:48     ` C H Forsyth
  2009-07-23 10:16       ` [9fans] Does "as little software as possible" include a modern Richard Miller
  2009-07-23 13:05       ` [9fans] Does "as little software as possible" include a modern browser? Jason Catena
  0 siblings, 2 replies; 20+ messages in thread
From: C H Forsyth @ 2009-07-23  9:48 UTC (permalink / raw)
  To: 9fans

>I hope the services I want to use (will) have a non-browser API (eg Twitter).

although it uses http, twitter has got an api that you can use outside
a browser. it's much the same with several others, including aws.
there are reasonably clear descriptions of the messages, and you can construct
and send them however you like, in which ever language you like.

in fact, since a browser must ultimately send messages, it's not clear
what a `browser API' would look like. the closest is probably something
that's expressed only in terms of javascript invoking some secret code
hidden in a binary module running within the browser, making it hard
to work out easily what the messages are (if they're binary) or how they
are formed (whether binary or text).

on the internet, no one can hear you scream when someone yet again
invents `the browser as operating system'.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern
  2009-07-23  9:48     ` C H Forsyth
@ 2009-07-23 10:16       ` Richard Miller
  2009-07-23 23:49         ` Fernan Bolando
  2009-07-23 13:05       ` [9fans] Does "as little software as possible" include a modern browser? Jason Catena
  1 sibling, 1 reply; 20+ messages in thread
From: Richard Miller @ 2009-07-23 10:16 UTC (permalink / raw)
  To: 9fans

> although it uses http, twitter has got an api that you can use outside
> a browser. it's much the same with several others, including aws.
> there are reasonably clear descriptions of the messages, and you can construct
> and send them however you like, in which ever language you like.

The 'stock' command (undocumented?) is a good example of this.
(It's a 14-line shell script):

term% stock goog
"GOOG","Google Inc.",427.69,"7/22/2009",0.00,0

I have a similar little script to do currency conversions:

term% currency usd eur
  1 US Dollar (USD) = 0.70403 Euro (EUR)
term% currency -d 10/30/2000 usd eur
  1 US Dollar (USD) = 1.19046 Euro (EUR)

which is just a bit of syntactic sugar wrapped around this:

hget 'http://www.oanda.com/convert/classic?user=printable&exch='$xout'&expr='$xin'&value=1&date_fmt=us&date='$date | grep '^[ 	]*1 '




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern browser?
  2009-07-23  9:48     ` C H Forsyth
  2009-07-23 10:16       ` [9fans] Does "as little software as possible" include a modern Richard Miller
@ 2009-07-23 13:05       ` Jason Catena
  2009-07-23 13:57         ` Steve Simon
  1 sibling, 1 reply; 20+ messages in thread
From: Jason Catena @ 2009-07-23 13:05 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

On Thu, Jul 23, 2009 at 04:48, C H Forsyth <forsyth@vitanuova.com> wrote:

> >I hope the services I want to use (will) have a non-browser API (eg
> Twitter).
>


> in fact, since a browser must ultimately send messages, it's not clear
> what a `browser API' would look like.


Many AJAX and image-map interfaces wouldn't mean much outside a graphical
interface that displays the pretty pictures and maps how the user interacts
with them back to the server. Evernote, for example, would be easier to
render to the user and mount as a filesystem than Google maps.  I'm just
wondering whether it seems enough without good support for the latter kind
of (currently) browser-based interaction.

[-- Attachment #2: Type: text/html, Size: 1143 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern browser?
  2009-07-23 13:05       ` [9fans] Does "as little software as possible" include a modern browser? Jason Catena
@ 2009-07-23 13:57         ` Steve Simon
  2009-07-23 14:02           ` erik quanstrom
  0 siblings, 1 reply; 20+ messages in thread
From: Steve Simon @ 2009-07-23 13:57 UTC (permalink / raw)
  To: 9fans

> Evernote, for example, would be easier to
> render to the user and mount as a filesystem than Google maps.

You are right, google maps is much more a simple transaction
based system, I cannot see how it would fit usefully into
a file system hierarchy.

It does not require a web browser however.

assuming you have signed up and put your key in /lib/gmapkey
you can see exactly where I am at with:

/n/sources/contrib/steve/rc/gmap -s eastleigh road, havant

[credit to erik for the much needed polishing of this tool]

-Steve



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern browser?
  2009-07-23 13:57         ` Steve Simon
@ 2009-07-23 14:02           ` erik quanstrom
  0 siblings, 0 replies; 20+ messages in thread
From: erik quanstrom @ 2009-07-23 14:02 UTC (permalink / raw)
  To: 9fans

> /n/sources/contrib/steve/rc/gmap -s eastleigh road, havant
>
> [credit to erik for the much needed polishing of this tool]

anyone can polish.  the important bit is the gem.

- erik



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern
  2009-07-23 10:16       ` [9fans] Does "as little software as possible" include a modern Richard Miller
@ 2009-07-23 23:49         ` Fernan Bolando
  2009-07-23 23:57           ` John Floren
                             ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Fernan Bolando @ 2009-07-23 23:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, Jul 23, 2009 at 6:16 PM, Richard Miller<9fans@hamnavoe.com> wrote:
>> although it uses http, twitter has got an api that you can use outside
>> a browser. it's much the same with several others, including aws.
>> there are reasonably clear descriptions of the messages, and you can construct
>> and send them however you like, in which ever language you like.
>
> The 'stock' command (undocumented?) is a good example of this.
> (It's a 14-line shell script):
>
> term% stock goog
> "GOOG","Google Inc.",427.69,"7/22/2009",0.00,0
>
> I have a similar little script to do currency conversions:
>
> term% currency usd eur
>  1 US Dollar (USD) = 0.70403 Euro (EUR)
> term% currency -d 10/30/2000 usd eur
>  1 US Dollar (USD) = 1.19046 Euro (EUR)
>
> which is just a bit of syntactic sugar wrapped around this:
>
> hget 'http://www.oanda.com/convert/classic?user=printable&exch='$xout'&expr='$xin'&value=1&date_fmt=us&date='$date | grep '^[   ]*1 '
>
>
>

now if somebody can create a script to lookup words in dictionary.com
preformatted without ads. :)

-- 
http://www.fernski.com



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern
  2009-07-23 23:49         ` Fernan Bolando
@ 2009-07-23 23:57           ` John Floren
  2009-07-24  0:08           ` andrey mirtchovski
  2009-07-24 16:14           ` maht
  2 siblings, 0 replies; 20+ messages in thread
From: John Floren @ 2009-07-23 23:57 UTC (permalink / raw)
  To: fernanbolando, Fans of the OS Plan 9 from Bell Labs

On Thu, Jul 23, 2009 at 4:49 PM, Fernan Bolando<fernanbolando@mailc.net> wrote:
> On Thu, Jul 23, 2009 at 6:16 PM, Richard Miller<9fans@hamnavoe.com> wrote:
>>> although it uses http, twitter has got an api that you can use outside
>>> a browser. it's much the same with several others, including aws.
>>> there are reasonably clear descriptions of the messages, and you can construct
>>> and send them however you like, in which ever language you like.
>>
>> The 'stock' command (undocumented?) is a good example of this.
>> (It's a 14-line shell script):
>>
>> term% stock goog
>> "GOOG","Google Inc.",427.69,"7/22/2009",0.00,0
>>
>> I have a similar little script to do currency conversions:
>>
>> term% currency usd eur
>>  1 US Dollar (USD) = 0.70403 Euro (EUR)
>> term% currency -d 10/30/2000 usd eur
>>  1 US Dollar (USD) = 1.19046 Euro (EUR)
>>
>> which is just a bit of syntactic sugar wrapped around this:
>>
>> hget 'http://www.oanda.com/convert/classic?user=printable&exch='$xout'&expr='$xin'&value=1&date_fmt=us&date='$date | grep '^[   ]*1 '
>>
>>
>>
>
> now if somebody can create a script to lookup words in dictionary.com
> preformatted without ads. :)
>
> --
> http://www.fernski.com
>
>

We already have dict, and that works offline...


John
-- 
"I've tried programming Ruby on Rails, following TechCrunch in my RSS
reader, and drinking absinthe. It doesn't work. I'm going back to C,
Hunter S. Thompson, and cheap whiskey." -- Ted Dziuba



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern
  2009-07-23 23:49         ` Fernan Bolando
  2009-07-23 23:57           ` John Floren
@ 2009-07-24  0:08           ` andrey mirtchovski
  2009-07-24  0:24             ` Fernan Bolando
  2009-07-24 16:14           ` maht
  2 siblings, 1 reply; 20+ messages in thread
From: andrey mirtchovski @ 2009-07-24  0:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

like most things, it's been done by some9fan somewhere somewhen.
here's a simple transliterating eng-bg:bg-eng dictionary that queries
a remote site:

http://mirtchovski.com/p9/sadict/sadict

i don't think it was ever submitted to slashdot because it's just so
simple. on the other hand i'm contemplating submitting this XML data
file that consistently makes my machine unresponsive and takes a few
hours to process. now that's serious computer science right there!



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern
  2009-07-24  0:08           ` andrey mirtchovski
@ 2009-07-24  0:24             ` Fernan Bolando
  2009-07-24  4:12               ` Federico G. Benavento
  0 siblings, 1 reply; 20+ messages in thread
From: Fernan Bolando @ 2009-07-24  0:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Jul 24, 2009 at 8:08 AM, andrey
mirtchovski<mirtchovski@gmail.com> wrote:
> like most things, it's been done by some9fan somewhere somewhen.
> here's a simple transliterating eng-bg:bg-eng dictionary that queries
> a remote site:
>
> http://mirtchovski.com/p9/sadict/sadict
>
> i don't think it was ever submitted to slashdot because it's just so
> simple. on the other hand i'm contemplating submitting this XML data
> file that consistently makes my machine unresponsive and takes a few
> hours to process. now that's serious computer science right there!
>
>

I once tried to create a simple script to use dict if the word is in
there if not it will pick it up from dictionary.com and add them to
dicts' database, but I lost interest right after starting it.

--
http://www.fernski.com



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern
  2009-07-24  0:24             ` Fernan Bolando
@ 2009-07-24  4:12               ` Federico G. Benavento
  0 siblings, 0 replies; 20+ messages in thread
From: Federico G. Benavento @ 2009-07-24  4:12 UTC (permalink / raw)
  To: fernanbolando, Fans of the OS Plan 9 from Bell Labs

I also have a dict script but this one uses tcp!dict.org!2628

; 9fs sources
post...
; /n/sources/contrib/fgb/rc/fdict -l
Usage: fdict [-lm] [-d database] word
; ; /n/sources/contrib/fgb/rc/fdict -l
connected to tcp!dict.org!2628 on /net/tcp/25
gcide "The Collaborative International Dictionary of English v.0.48"
wn "WordNet (r) 2.0"
moby-thes "Moby Thesaurus II by Grady Ward, 1.0"
elements "Elements database 20001107"
vera "Virtual Entity of Relevant Acronyms (Version 1.9, June 2002)"
jargon "Jargon File (4.3.1, 29 Jun 2001)"
foldoc "The Free On-line Dictionary of Computing (27 SEP 03)"
easton "Easton's 1897 Bible Dictionary"
hitchcock "Hitchcock's Bible Names Dictionary (late 1800's)"
bouvier "Bouvier's Law Dictionary, Revised 6th Ed (1856)"
devils "THE DEVIL'S DICTIONARY ((C)1911 Released April 15 1993)"
world02 "CIA World Factbook 2002"
gazetteer "U.S. Gazetteer (1990)"
gaz-county "U.S. Gazetteer Counties (2000)"
gaz-place "U.S. Gazetteer Places (2000)"
gaz-zip "U.S. Gazetteer Zip Code Tabulation Areas (2000)"
--exit-- "Stop default search here."
afr-deu "Africaan-German Freedict dictionary"
afr-eng "Africaan-English Freedict Dictionary"
ara-eng "English-Arabic Freedict Dictionary"
cro-eng "Croatian-English Freedict Dictionary"
cze-eng "Czech-English Freedict dictionary"
dan-eng "Danish-English Freedict dictionary"
deu-eng "German-English Freedict dictionary"
deu-fra "German-French Freedict dictionary"
deu-ita "German-Italian Freedict dictionary"
deu-nld "German-Nederland Freedict dictionary"
deu-por "German-Portugese Freedict dictionary"
eng-afr "English-Africaan Freedict Dictionary"
eng-ara "English-Arabic FreeDict Dictionary"
eng-cro "English-Croatian Freedict Dictionary"
eng-cze "English-Czech fdicts/FreeDict Dictionary"
eng-deu "English-German Freedict dictionary"
eng-fra "English-French Freedict Dictionary"
eng-hin "English-Hindi Freedict Dictionary"
eng-hun "English-Hungarian Freedict Dictionary"
eng-iri "English-Irish Freedict dictionary"
eng-ita "English-Italian Freedict dictionary"
eng-lat "English-Latin Freedict dictionary"
eng-nld "English-Netherlands Freedict dictionary"
eng-por "English-Portugese Freedict dictionary"
eng-rom "English-Romanian FreeDict dictionary"
eng-rus "English-Russian Freedict dictionary"
eng-spa "English-Spanish Freedict dictionary"
eng-swa "English-Swahili xFried/FreeDict Dictionary"
eng-swe "English-Swedish Freedict dictionary"
eng-tur "English-Turkish FreeDict Dictionary"
eng-wel "English-Welsh Freedict dictionary"
fra-deu "French-German Freedict dictionary"
fra-eng "French-English Freedict dictionary"
fra-nld "French-Nederlands Freedict dictionary"
hin-eng "English-Hindi Freedict Dictionary [reverse index]"
hun-eng "Hungarian-English FreeDict Dictionary"
iri-eng "Irish-English Freedict dictionary"
ita-deu "Italian-German Freedict dictionary"
jpn-deu "Japanese-German Freedict dictionary"
kha-deu "Khasi-German FreeDict Dictionary"
lat-deu "Latin-German Freedict dictionary"
lat-eng "Latin-English Freedict dictionary"
nld-deu "Nederlands-German Freedict dictionary"
nld-eng "Nederlands-English Freedict dictionary"
nld-fra "Nederlands-French Freedict dictionary"
por-deu "Portugese-German Freedict dictionary"
por-eng "Portugese-English Freedict dictionary"
sco-deu "Scottish-German Freedict dictionary"
scr-eng "Serbo-Croat-English Freedict dictionary"
slo-eng "Slovenian-English Freedict dictionary"
spa-eng "Spanish-English Freedict dictionary"
swa-eng "Swahili-English xFried/FreeDict Dictionary"
swe-eng "Swedish-English Freedict dictionary"
tur-deu "Turkish-German Freedict dictionary"
tur-eng "Turkish-English Freedict dictionary"
english "English Monolingual Dictionaries"
trans "Translating Dictionaries"
all "All Dictionaries (English-Only and Translating)"
web1913 "Webster's Revised Unabridged Dictionary (1913)"
world95 "The CIA World Factbook (1995)"
;


On Thu, Jul 23, 2009 at 9:24 PM, Fernan Bolando<fernanbolando@mailc.net> wrote:
> On Fri, Jul 24, 2009 at 8:08 AM, andrey
> mirtchovski<mirtchovski@gmail.com> wrote:
>> like most things, it's been done by some9fan somewhere somewhen.
>> here's a simple transliterating eng-bg:bg-eng dictionary that queries
>> a remote site:
>>
>> http://mirtchovski.com/p9/sadict/sadict
>>
>> i don't think it was ever submitted to slashdot because it's just so
>> simple. on the other hand i'm contemplating submitting this XML data
>> file that consistently makes my machine unresponsive and takes a few
>> hours to process. now that's serious computer science right there!
>>
>>
>
> I once tried to create a simple script to use dict if the word is in
> there if not it will pick it up from dictionary.com and add them to
> dicts' database, but I lost interest right after starting it.
>
> --
> http://www.fernski.com
>
>



--
Federico G. Benavento



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern
  2009-07-23 23:49         ` Fernan Bolando
  2009-07-23 23:57           ` John Floren
  2009-07-24  0:08           ` andrey mirtchovski
@ 2009-07-24 16:14           ` maht
  2009-07-24 16:41             ` Lorenzo Bolla
                               ` (2 more replies)
  2 siblings, 3 replies; 20+ messages in thread
From: maht @ 2009-07-24 16:14 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


> now if somebody can create a script to lookup words in dictionary.com
> preformatted without ads. :)
>
>
cat > $home/bin/rc/odict << EOF
#!/bin/rc

hget http://dictionary.com/browse/$1 | htmlfmt | awk ' /dictionary
results/, /Cite This Source/ {print } '
EOF

chmod 755 $home/bin/rc/odict

odict simple







^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern
  2009-07-24 16:14           ` maht
@ 2009-07-24 16:41             ` Lorenzo Bolla
  2009-07-24 16:42             ` Lorenzo Bolla
  2009-07-24 17:16             ` [9fans] (no subject) erik quanstrom
  2 siblings, 0 replies; 20+ messages in thread
From: Lorenzo Bolla @ 2009-07-24 16:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 138 bytes --]

On Fri, Jul 24, 2009 at 5:14 PM, maht <mattmobile@proweb.co.uk> wrote:

> awk ' /dictionary results/, /Cite This Source/ {print } '
>

[-- Attachment #2: Type: text/html, Size: 437 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [9fans] Does "as little software as possible" include a modern
  2009-07-24 16:14           ` maht
  2009-07-24 16:41             ` Lorenzo Bolla
@ 2009-07-24 16:42             ` Lorenzo Bolla
  2009-07-24 17:16             ` [9fans] (no subject) erik quanstrom
  2 siblings, 0 replies; 20+ messages in thread
From: Lorenzo Bolla @ 2009-07-24 16:42 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

Unfortunately, this picks up some ads!

$> odict simple
- 9 dictionary results
Simply
Unique European holiday properties. Great holidays off the beaten
track
www.simplytravel.co.uk
Simple Information
Find Free Reference & Encyclopedia Articles Quickly.
Reference.com/simple

etc etc

nice script, though!
L.


On Fri, Jul 24, 2009 at 5:14 PM, maht <mattmobile@proweb.co.uk> wrote:

>
>  now if somebody can create a script to lookup words in dictionary.com
>> preformatted without ads. :)
>>
>>
>>
> cat > $home/bin/rc/odict << EOF
> #!/bin/rc
>
> hget http://dictionary.com/browse/$1 | htmlfmt | awk ' /dictionary
> results/, /Cite This Source/ {print } '
> EOF
>
> chmod 755 $home/bin/rc/odict
>
> odict simple
>
>
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1425 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [9fans] (no subject)
  2009-07-24 16:14           ` maht
  2009-07-24 16:41             ` Lorenzo Bolla
  2009-07-24 16:42             ` Lorenzo Bolla
@ 2009-07-24 17:16             ` erik quanstrom
  2 siblings, 0 replies; 20+ messages in thread
From: erik quanstrom @ 2009-07-24 17:16 UTC (permalink / raw)
  To: 9fans

> #!/bin/rc
>
> hget http://dictionary.com/browse/$1 | htmlfmt | awk ' /dictionary
> results/, /Cite This Source/ {print } '
> EOF
>
> chmod 755 $home/bin/rc/odict
>
> odict simple

unfortunately the default charset is 8859-1, and in the http headers
dictionary.com sets the charset to utf-8.  this fact is lost on hget,
so this works a little better for me:

hget http://dictionary.com/browse/illustrate|htmlfmt -c UTF-8 |sed -n ' /dictionary results/,/Cite This Source/p'

also, one would really want to urlencode the parameter.
this would allow a lookup of "en masse"

fortunately this little bit of contorted awk

#!/bin/awk -f
# urlencode
# when in doubt, use brute force
function chr(ch,  	i)
{
	for(i = 0; i < 127; i++)
		if(utf(i) == ch)
			return i;
	return 32;
}

{
	o=""
	for(i=1; i<=length($0); i++){
		c = substr($0, i, 1)
		if(match(c, /[a-zA-Z0-9]/) == 0)
			c = sprintf("%%%.2x", chr(c))
		o = o c;
	}
	print o
}

gives us

#!/bin/rc

word=`{urlencode $"*}
hget http://dictionary.com/browse/illustrate |
	htmlfmt -c UTF-8 |
	sed -n ' /dictionary results/,/Cite This Source/p'



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-07-24 17:16 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-22 22:44 [9fans] Does "as little software as possible" include a modern browser? Jason Catena
2009-07-22 23:13 ` andrey mirtchovski
2009-07-22 23:19 ` Charles Forsyth
2009-07-22 23:56   ` Francisco J Ballesteros
2009-07-23  0:22   ` andrey mirtchovski
2009-07-23  0:47   ` Jason Catena
2009-07-23  9:48     ` C H Forsyth
2009-07-23 10:16       ` [9fans] Does "as little software as possible" include a modern Richard Miller
2009-07-23 23:49         ` Fernan Bolando
2009-07-23 23:57           ` John Floren
2009-07-24  0:08           ` andrey mirtchovski
2009-07-24  0:24             ` Fernan Bolando
2009-07-24  4:12               ` Federico G. Benavento
2009-07-24 16:14           ` maht
2009-07-24 16:41             ` Lorenzo Bolla
2009-07-24 16:42             ` Lorenzo Bolla
2009-07-24 17:16             ` [9fans] (no subject) erik quanstrom
2009-07-23 13:05       ` [9fans] Does "as little software as possible" include a modern browser? Jason Catena
2009-07-23 13:57         ` Steve Simon
2009-07-23 14:02           ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).