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


Groups > comp.lang.python > #66058

Re: Top down Python

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <pydev@allsup.co>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.050
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'output': 0.05; 'say,': 0.05; 'subject:Python': 0.06; 'lines,': 0.07; 'python3': 0.07; 'lines.': 0.09; 'mess': 0.09; 'outlined': 0.09; 'received:212.227.126': 0.09; 'url:github': 0.09; 'window.': 0.09; 'python': 0.11; 'background.': 0.14; 'at,': 0.16; 'emulator': 0.16; 'fancy': 0.16; 'idle,': 0.16; 'reasonably': 0.16; 'received:212.227.126.187': 0.16; 'repl': 0.16; 'usable': 0.16; '(you': 0.16; 'wrote:': 0.18; '(not': 0.18; 'wed,': 0.18; 'trying': 0.19; 'basically': 0.19; 'starts': 0.20; 'written': 0.21; 'command': 0.22; 'feb': 0.22; 'input': 0.22; '(in': 0.22; 'otherwise,': 0.22; 'header:User-Agent:1': 0.23; 'color,': 0.24; 'setup,': 0.24; 'primary': 0.26; 'somewhere': 0.26; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'chris': 0.29; 'operations,': 0.30; 'along': 0.30; 'code': 0.31; 'lines': 0.31; 'keys': 0.31; 'lessons': 0.31; 'libraries': 0.31; 'with,': 0.31; 'probably': 0.32; 'run': 0.32; 'beginning': 0.33; 'trouble': 0.34; 'could': 0.34; 'possible.': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'are,': 0.36; 'idle': 0.36; 'hi,': 0.36; 'two': 0.37; 'level': 0.37; 'easily': 0.37; 'window': 0.38; 'to:addr :python-list': 0.38; 'skip:- 10': 0.38; 'pm,': 0.38; 'does': 0.39; '12,': 0.39; 'structure': 0.39; 'though,': 0.39; 'to:addr:python.org': 0.39; 'skip:x 10': 0.40; 'how': 0.40; 'is.': 0.60; 'most': 0.60; 'hope': 0.61; 'ago.': 0.61; 'full': 0.61; 'entire': 0.61; 'john': 0.61; 'simple': 0.61; "you're": 0.61; 'first': 0.61; 'back': 0.62; 'save': 0.62; "you'll": 0.62; 'show': 0.63; 'real': 0.63; 'networking': 0.64; 'more': 0.64; 'school': 0.64; 'within': 0.65; 'received:46': 0.66; 'world': 0.66; 'close': 0.67; 'fact,': 0.69; 'wish': 0.70; 'hoping': 0.75; 'power': 0.76; 'yourself': 0.78; 'life.': 0.83; 'low': 0.83; 'actually,': 0.84; 'ages': 0.84; 'attempt,': 0.84; 'density': 0.84; "else's": 0.84; 'subject:Top': 0.84; 'recover': 0.91; 'mistakes': 0.93; 'incredibly': 0.96; 'picture': 0.97
Date Wed, 12 Feb 2014 17:05:40 +0000
From John Allsup <pydev@allsup.co>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Top down Python
References <52FB74F2.4090002@allsup.co>
In-Reply-To <52FB74F2.4090002@allsup.co>
X-Forwarded-Message-Id <52FB74F2.4090002@allsup.co>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:R8OcEluk55opCgKcYdHRU1JX3knqWkvWyN4KSw8KKFh DeA7BH3P5xdq6Ljj6WWedAPMrCweL1Zu/NVXXyoZAnMqrZXtwv /MaMyj/EJpjKbFFWZ2VO0aycgNns61AGUCbwJ1uZpsE0LGtVA9 ag99n40+5+TuDJFE4z9qjnSpTShyCxjNJHTKcD7p/qVfNiFlg3 sygnK49OpIi1YsIHTSAe34YcCfRjLIMyIolWHr46mdlxWgIeaY ZSZZ+ShmLoGxs0+iww1B7zzwM/uvruBWXR8QntgOQE0dyIeXW+ bJrPRKCwkAsj7YfnHo/o/yQc2otfGu7D5FAlZpWsPDBxeDwor4 DB3WkULdGy6P8674/Q2vCOx7XvVTGYbEyrKPZjf3T
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6767.1392224743.18130.python-list@python.org> (permalink)
Lines 62
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1392224743 news.xs4all.nl 2956 [2001:888:2000:d::a6]:43249
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:66058

Show key headers only | View raw


Hi,

Current software development methods make things way more complex than
they need to be.  I am trying to get an idea for how simple things can
be from final product down to low level implementation, hoping to
recover the code density miracles that the old school Forthers turned
out ages ago.  They outlined a philosophy that I wish to bring back to
life.  This is the beginning of my first attempt, and I wish to do this
in the full gaze of fellow Pythoners so that any mistakes I make can be
seen by others, and any lessons learned passed on as cheaply and
efficiently (in terms of real world work and energy) as possible.

Hope this starts to clarify the picture I have in my head.

All the best,

John

On 12/02/2014 07:42, Chris Angelico wrote:
> On Wed, Feb 12, 2014 at 6:05 PM, John Allsup <pydev@allsup.co> wrote:
>>      1. Put a nice picture on the background.
>>      2. Put a terminal window with, say, 64x20 lines, dead centre.
>>      3. Run a simple REPL program written in Python or Ruby within it.
>> I do not really want to write any more lines of code than I need to.
>> Why do we not have langauges and libraries that can do the above
>> with only five lines of code (line 0 == setup, line 4 == cleanup).
>
> #!/bin/sh
> xfce4-terminal --geometry=64x20 -x python3
>
> There you are, two lines. :)
>
> Seriously though, what you're asking is deceptively simple yet
> incredibly difficult. You're trying to recreate the entire structure
> of a terminal emulator or telnet client. I can show you the code for a
> MUD client, which does a lot of what you're looking for; in fact, this
> one has a REPL inbuilt (not Python or Ruby though):
>
> https://github.com/Rosuav/Gypsum/
>
> That's roughly how much code it takes to make a reasonably usable
> replicant of a terminal window. (Some of that is specific to
> networking and MUDding, but at very least, window.pike is basically
> all about the visuals.) You'll do far better to make use of someone
> else's terminal renderer, and just put a desktop background to make
> your fancy image. Otherwise, you have to recreate everything - console
> output (complete with color, presumably), scrolling, input history
> (you can get most of your editing keys easily enough, but you will
> need command history), clipboard operations, and somewhere along the
> way, performance. Save yourself a whole mess of trouble and just use
> your OS-provided terminal program :)
>
> Actually, for what you're looking at, IDLE is probably close to what
> you want. You could have a look at how much code it takes to power
> IDLE, and/or just use it as is. It's pretty handy; I use it as my
> primary interactive Python on Windows.
>
> ChrisA
>


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


Thread

Re: Top down Python John Allsup <pydev@allsup.co> - 2014-02-12 17:05 +0000

csiph-web