Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43122

Re: Splitting of string at an interval

Date 2013-04-09 02:28 -0400
From Dave Angel <davea@davea.name>
Subject Re: Splitting of string at an interval
References (5 earlier) <D77F906C-B07F-4A6B-B0E0-05B94AA006CE@panix.com> <CAPTjJmqMZPr3qEO5-w6EVTT5fko0Yo3smSomgNJyysOJzmwGvQ@mail.gmail.com> <mailman.295.1365438635.3114.python-list@python.org> <roy-733AD5.21090708042013@news.panix.com> <51637f11$0$30003$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.317.1365488953.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 04/08/2013 10:38 PM, Steven D'Aprano wrote:
> On Mon, 08 Apr 2013 21:09:08 -0400, Roy Smith wrote:
>
>>> There's a whole competition about writing the smallest program which
>>> outputs the song "99 bottles of beer":
>>>
>>> http://codegolf.com/99-bottles-of-beer
>>
>> I see the top 10 entries are all written in Perl.  I suppose this says
>> something.
>
>
> When I write my own programming language, it will include a one-character
> built-in command to perform 99 bottles of beer, just so my language will
> always be the winner.
>
> In fact, I may make it a bare . so that not only will it be the shortest
> program, but also the smallest program in terms of number of non-white
> pixels.
>

But do we need a shebang line?  If so, then make sure the interpreter 
name is also one character long.

I expect there's a character with fewer pixels than the period, but the 
utf-8 version of it would be more than one byte long.  But you could 
define your language with a default encoding that happens to map said 
character to a single byte.

The Wang word processor (proprietary hardware and OS) used a single 
pixel for \x20, and the no pixels for the \xff.  This way spaces were 
"visible" with a faint dot, more or less in the middle of the cell 
block.  It defined other symbols for other control characters like tab 
and newline.  I'm still looking for a similar feature for emacs (on 
Ubuntu), but so far I've been disappointed by the results.

Libreoffice has a similar feature, enabled by 
View->NonPrintingCharacters, but the dotted space is way too bold, 
basically a period that's higher in its cell.

-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Splitting of string at an interval subhabangalore@gmail.com - 2013-04-07 13:25 -0700
  Re: Splitting of string at an interval Dave Angel <davea@davea.name> - 2013-04-07 16:46 -0400
  Re: Splitting of string at an interval Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-07 21:48 +0000
    Re: Splitting of string at an interval Chris Angelico <rosuav@gmail.com> - 2013-04-08 13:01 +1000
      Re: Splitting of string at an interval Roy Smith <roy@panix.com> - 2013-04-08 09:21 -0400
        Re: Splitting of string at an interval Arnaud Delobelle <arnodel@gmail.com> - 2013-04-08 16:10 +0100
        Re: Splitting of string at an interval Roy Smith <roy@panix.com> - 2013-04-08 11:37 -0400
        Re: Splitting of string at an interval Chris Angelico <rosuav@gmail.com> - 2013-04-09 02:20 +1000
        Re: Splitting of string at an interval Arnaud Delobelle <arnodel@gmail.com> - 2013-04-08 17:30 +0100
          Re: Splitting of string at an interval Roy Smith <roy@panix.com> - 2013-04-08 21:09 -0400
            Re: Splitting of string at an interval Tim Chase <python.list@tim.thechases.com> - 2013-04-08 20:42 -0500
            Re: Splitting of string at an interval Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-09 02:38 +0000
              Re: Splitting of string at an interval Andrew Berg <bahamutzero8825@gmail.com> - 2013-04-08 21:57 -0500
              Re: Splitting of string at an interval Chris Angelico <rosuav@gmail.com> - 2013-04-09 14:22 +1000
              Re: Splitting of string at an interval Dave Angel <davea@davea.name> - 2013-04-09 02:28 -0400
        Re: Splitting of string at an interval Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-04-08 19:15 -0400

csiph-web