Omgili, forum search, forums search, search forums, discussion search,discussions search, search discussions, board search, boards search, search boards
  Advanced Search

Re: Python, Perl, Lua, Ruby -- anybody??

On Tue, 19 May 2009 02:46:17 GMT, "A. Wik" <...@dynamite.narpes.com

Hi,

Here come a few rants inspired by your observations on the
ever increasing software sizes. (Also, I have rants about
glibc2 threads, UTF-8, and an interesting comparison of
gzip - compress - bzip2 and cat, but I'm saving those for
another day.) I do, however include a little bit of
conspiracy theory right away (well, not really right away:
you may have to skip some paragraphs to get there)...
enjoy, while I catch some sleep!

That is, of course, because unlimited disk & memory sizes, not
to mention unlimited CPU speed and unlimited just-about-
everything-else have spoilt programmers into not even trying to
control quality of existing code, but rather adding new features
so that they can list the latest buzzwords among the supported
features of the latest release presented on their frontpages,
thus luring bloatware Linux distributions like Red Hat into
downloading and including it in their package systems, so that
*they* can list the latest buzzwords on *their* frontpages.
(Other distributions of Linux, such as Slackware, are
significantly, but not satisfactorily better.) (Needless to
say, XP/Vista support is essential for maximum popularity of
any software, and given the native size of those systems, users
hardly notice a few GBs more.)

Perl has been quite useful for a long time (although my
experience is limited to using and fixing the perlscripts of
others with mixed success) and perhaps even too useful... Perl
is the "Practical Extraction and Reporting Language" and it's a
suitable tool for that purpose, in those cases where grep, cut,
sort, uniq, join, sed, awk, tr, find, xargs, etc. are
insufficient or otherwise unsuitable. I would probably benefit
from using it myself in many such situations, as I'm prone to
start (but rarely finish) a real program instead after finding
the basic tools (and vim) unsatisfactory. The opposite problem
seems far more prevalent, however, and scripts that should
serve, at best, as prototypes, proofs of concepts, or
quick-and-dirty fixes for occasional problems are frequently
taking the place of proper compiled programs designed with speed,
compatibility, reliability, good resource management, and other
noble goals in mind. (Although I suppose it must be acknowledged
that scripts may have advantages such as portability, once the
interpreter has been ported.)

Interestingly, it's not DOS/Win9x that has the worst problems
with the above trends, but aging Unix systems. A shining
example follows (in spite of the fact that objdump is at least
a compiled executable rather than a perl or python script (but
maybe we'll get there?), and it can be quite useful at times,
but not this time):

# objdump -m vax -b binary --start-address=0xd4e7e -D /kmem-page80000plus.dump|more

objdump: Can not allocate 33296384 bytes after allocating 30504 bytes

I bet it was planning to read the whole dump of all 32 MB of
memory the machine has into... memory? ...before starting to
disassemble the 13 bytes or so that I needed [1]; fortunately,
the error caused it to abort the plan before wasting too much
of my time. I'm pretty sure that a real mode DOS or a PDP/11
programmer wouldn't even think about doing something so
ridiculous (I know I don't; and yes, I am sporadically working
on both a VAX disassembler and a x86 one): or in other words,
memory barriers have a positive influence on programming habits
and resulting code.

"Deprecated"... Could that be a conspiracy to force you to
"up"grade to the latest bloatware, because older code will
no longer work (as it's too full of "deprecated" stuff)?

I was discouraged from trying it a few years ago, because
they wrote that they don't support integers, only floating
point, and integers (of which pointers are a special type,
as far as I'm concerned) are what I need almost exclusively.
However, the surprisingly reasonable size suggests that
there may be something good about Lua as well (and maybe
they fixed the data types?).

Python is indeed heavy stuff... the Mailman mailing list
management system that I used to run on a Pentium 60 MHz [2]
was written in Python and had an appetite for resources
like no other process on the system; for comparison, the
SMTP and web servers easily handled their parts of the
job (of running the list) with quick response times.

(I wonder if DJ has similar reasons for writing and
running his own flavour of list management system...?)

Returning to the topic of scripting languages (although
the language I'm going to mention can also be compiled) -

What about Forth? It's a language I've heard great things
about, but I haven't looked into it sufficiently to confirm
its excellence. Among other things, it's used in some boot
loaders and console firmwares (ie. BIOS-like systems that
support early stages of hardware initialisation and booting),
and if my recollection is correct, the Sun Sparc is one
example of such a system, but it may be used in some other
"alternative" alternative architectures too.

-aw

[1] ... 13 bytes or so, which I needed In order to decide
precisely what and where to patch. It all turned out all
right in the end, after copying a 32 byte chunk out of the
memory dump with "dd" and using objdump on that. Patching was
then a matter of looking up instruction bytes to assemble
(from a book or data sheet) and using printf "\x8F\x00,,,etc",
piping its output into "dd" with the right parameters to
specify the target file offset within the kernel image file,
and last (as well as least), rebooting. (Just remember
"conv=notrunc" also, or dd will truncate the kernel.)

[2] Yes, the one with the FDIV bug!



On Fri, 22 May 2009 15:04:21 -0700 (PDT), Rugxulo <...@gmail.com

Hi,

On May 18, 9:46 pm, "A. Wik" <...@dynamite.narpes.com
Is it just me or is Linux very media-oriented these days? When every
distro tries to include MPlayer, XMMS, Firefox, Flash, etc., no wonder
they all top out at huge sizes.

Slackware 13.0 supposedly will have a new package format (lzma) and
optional 64-bit support.

Compression sucks, or at least nobody uses decent tools. And it's true
that nobody cares, sadly.

At one time, there were efforts towards a microPerl or TinyPerl, even
for use in place of the autoconf and pals. It does bug me when you
need twenty different utils just to bootstrap something simple. Of
course, it also bugs me when "ztouch" (very very very small script)
requires the big, bloated Perl just to run. :-P

There should be a contest to port certain apps to Perl 4 from Perl 5.
Maybe it's already been done, who knows. Maybe I'll finally bother to
learn Perl 6 when they get to 9 or so. (And rant and rave of
course.) ;-)

Well, Python is said to be powerful and easy to learn. But it's also
supposedly slow, definitely slower than even some other common
interpreters, and slower than compiled code too (of course). But you
can lessen that with bytecode or else the lack of a compile-edit cycle
makes up for it when developing.

Originally, I think GNU tools were just clones of *nix tools, but they
officially allowed improvements too, as long as they didn't use more
than 1 MB of RAM. Even C++ originally worked on such an old machine.
Ah, the good ol' days.

"RAM is cheap, buy more!" So much for "free" software! :-P Plus,
your motherboard can only handle so much anyways (e.g. 2 GB for this
laptop here), so you can only upgrade so much. :-/
I could rant on and on about this, but it's more the programmer's
fault than C or portability (although those don't always help, heh).

Yeah, you're lucky it didn't swap you to death!

"But C iz teh portablah!" Doesn't mean they have to code so blindly!
(Yes, it's apparently true, assembly programmers care more about
performance than C guys, I guess.)

I'm not sure, but I think it still has that same problem. However, I
don't know how much that affects things. Anyways, it must be easier to
compile, so that's a big advantage right there!

Every Linux distro advertised for "old computers" these days really
only targets PII w/ 128 or 256 MB of RAM. They don't know minimal. It
must be really hard, even with 2.4.x, I dunno. Even DeLi Linux (using
uClibc) had to up its requirements when they switched to Unicode for
0.8.0, sadly.

Yes, Forth is quite nice although I don't really know it (tried once,
gave up). However, I'm not sure which ones can be embedded, certainly
a few, but I can't remember. Anyways, the last GNU Forth to be
precompiled for DJGPP was 0.5.0, and later (when I asked) Bernd
couldn't compile for 0.6.2 or so because he only had an x86-64 box
around (although I guess nowadays is better with DOSEMU supporting
that). Now it appears they've even released 0.7.0 (!), but I'm highly
skeptical, so I don't even want to bug them about compiling it (or
even waste my own time). I guess 0.5.0 is "good enough" for now.

http://www.jwdt.com/~paysan/gforth.html
http://www.complang.tuwien.ac.at/forth/gforth/
http://groups.google.com/group/comp.lang.forth/topics?lnk=srg

On Sat, 23 May 2009 20:40:52 +0900, "Stephen J. Turnbull" <...@sk.tsukuba.ac.jp

Rugxulo writes:


As RMS always says, "Linux is a kernel, it's the GNU System" that is
so bloated. :-) This is very much by design; for example, look at GNU
hello, which now weighs in at many kB of source, or GNU true, which
sports --help and --version options (which are localized, don'cha
know!)

OTOH, the kernel has a lot of media oriented drivers, but they can all
be modularized or omitted. I suppose you could say threads and
multiprocessor support are also important to media (especially games),
but I don't think that's main thing. I guess a lot of the
functionality in modern kernels really is functional. :-)


Commercial distros that aim at who choose their own distros tend to
include a lot of that stuff by default (and I consider a graphical
browser an essential component of a personal system nowadays), but
AFAIK they all allow installing a "server" style system or even a
"bare" system with just enough to allow you to pull in the packages
you want. But as long as all that fits on the DVD but you don't have
to load it on your system, who cares?

Of course if you pull in anything that starts with "g" you'll get
about 2GB of GNOME and GTK libraries to go with it, and the "k" stuff
is just as bad I suppose. That *does* matter, but if you're not going
to install X all that is YCERIA (You Can't Even Run It Anyway ;-).


Actually, no. Go read the GNU Manifesto, dated 1985 IIRC; RMS
officially encouraged reading the whole file (whatever it might be)
into memory and using in-memory, global algorithms rather than
external, incremental ones, as a way to differentiate GNU tools from
the Unix originals (as a defense against copyright infringement).

Note that that was an *example* of how you could change the algorithm
to make legal defense easier, but it's a very prominent one. This
implementation strategy is used in several prominent GNU tools (eg,
Emacs, which is stupid, 'cause no judge would ever mistake Emacs for a
Microsoft product -- unless of course the Microsoft lawyers managed to
exclude everything but the output of ps from evidence!)

On Sat, 23 May 2009 16:45:26 +0300, Eli Zaretskii <...@gnu.org

I think the _real_ danger RMS was thinking about wrt Emacs was not
from MS lawyers, but MIT lawyers. See the GNU Manifesto for more
details.

On Sun, 24 May 2009 14:24:28 +0900, "Stephen J. Turnbull" <...@sk.tsukuba.ac.jp

Eli Zaretskii writes:


Well, maybe. But since presumably RMS wrote a lot of his code while
supported (officially or otherwise) by MIT, their claim would have
been based on "RMS's code is our code", not on the similarity to code
written by (other) MIT employees.

In any case, I think the main point stands. RMS thought of the GNU
system as a platform for personal freedom and development of free
software, and therefore encouraged full-featured, self-documenting
software rather than a lean mean implementable-on-an-8008 OS. Whether
that is "bloat" depends on your purposes.

Discussion Title: Re: Python, Perl, Lua, Ruby -- anybody??
Title Keywords: Python,  Perl,  Lua,  Ruby  anybody??