[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [patch rfc 1/3] xen arch header rework.

Julian Davison wrote:
Gerd Hoffmann wrote:
I don't think adding perl as build dependency is a big problem, almost
everyone has it on the machine anyway.  Try "rpm -e perl" on any linux
distro and watch the error message with the long list of stuff which
depends on perl.

While I realise this is drifting from the topic somewhat,
if I could just say:
jade:~# rpm -e perl
rpm: To install rpm packages on Debian systems, use alien. See README.Debian.
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open /var/lib/rpm/packages.rpm

Perl is most certainly on that system, but 'perl is everywhere'
is a little like 'rpm is everywhere'.

OK, then try this:

# apt-get remove perl
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  gaim-data gimp-data wesnoth-data
Recommended packages:
  wesnoth-utbs wesnoth-ttb wesnoth-tsg
The following packages will be REMOVED
abiword-common abiword-gnome acroread acroread-plugins akregator alien amor
  analog anjuta apache apache-common ark arts artsbuilder atlantik
atlantikdesigner auctex autoconf autodia automake1.4 beagle binfmt-support

[ snip lots of packages ]

  gnome-system-tools gnome-terminal gnome-themes gnome-themes-extras
  gnome-utils gnome2-user-guide gnomemeeting gnumeric gpdf grepmail gs

[ snip some more ]
kcharselect kcoloredit kcontrol kcron kdat kde-core kdeaddons-kfile-plugins
  kdeadmin kdeadmin-kfile-plugins kdeartwork kdeartwork-style
  kdeartwork-theme-window kdebase kdebase-bin kdebase-kio-plugins kdegames
  kdegraphics kdegraphics-kfile-plugins kdelibs kdelibs4c2a kdelirc
  kdemultimedia-kappfinder-data kdemultimedia-kfile-plugins

[ snip lots and lots more ]

  websvn wesnoth wesnoth-ei wesnoth-httt wesnoth-sotbe wesnoth-trow
  x-ttcidfont-conf xawtv xbase-clients xchm xemacs21 xemacs21-basesupport
  xemacs21-bin xemacs21-mule xemacs21-support xml-core xpdf xpdf-reader
xprint xprint-common xprt-xprintorg xqf xsane xscreensaver xscreensaver-gl
  xserver-xfree86 xserver-xorg xterm xxdiff yaird yelp zenity
The following packages will be upgraded:
  gaim-data gimp-data wesnoth-data
3 upgraded, 0 newly installed, 702 to remove and 129 not upgraded.
Need to get 34.2MB of archives.
After unpacking 1837MB disk space will be freed.
Do you want to continue [Y/n]? n

So, Gerd's example of using rpm was bad, and I wouldn't compare having perl to having rpm.

Wrt. readability of the scripts:  That is IMO more a matter of the
programming style than of the programming language.  Sure you can easily
write unreadable perl code, but you don't have to.  And you better
shouldn't, just in case you have to touch the scripts again one year later.

I spend far more time with python than I do perl, I confess,
however one of my colleagues spends no time with either and
has far less trouble understanding python than perl.
In terms of novice-readability perl has a whole bunch of
(really useful) line noise constructs. =~, say.

But that is an extremely more powerful tool than anything in python.

In many cases having a tool in an 'odd' language is better than
no tool at all, but in general the fewer dependencies the better.

I find python annoying to work with.  Is it spaces or tabs?

if a:
  <do something>
  if b:
    <do this>
    if c:
       <do that>
       if d:
         <do another>
         if e:
           <do whatever>
           <and more>
           <and that>
           <and here>
           <and there>
    if f:
      <do this too>
      if g:
         <do that as well>
  <Now what if am I on???>

Using columns instead of blocks has brought me back to the old days on the old IBM Mainframes. It sometimes gets confusing to know where you're at. And I haven't found emacs or vi helpful in telling you which "if" you are working under. (both easily show which { matches which } ).

But, OK, I like C better than most languages. So if I need something done I usually write it in C. But if it has to do with string manipulation and file parsing, I'll write it in perl.

Yes perl can be obfuscated, and hard to read if someone writes it that way. But I have written lots of perl scripts where I need to work with them after a year or two, and it's never been a problem with me to understand what I did. I just write my perl scripts like I write C and it never has been a problem.

I picked up perl a lot faster than I picked up python, and I still don't have a strong urge to go the python route.

Anyway, perl vs python is just like emacs vs vi, or gnome vs kde.

But just for comparison's sake:

# apt-get remove python
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED
abiword-gnome alsa-utils anjuta beagle bluefish bug-buddy bum capplets-data
  devhelp dia dia-common dia-gnome eog epiphany-browser evolution
  evolution-data-server file-roller galeon galeon-common gcalctool
  gconf-editor gconf2 gdm gdm-themes gedit gksu gnome-about gnome-alsamixer
  gnome-applets gnome-applets-data gnome-control-center gnome-core
  gnome-cups-manager gnome-doc-utils gnome-games gnome-games-data gnome-gv
  gnome-media gnome-media-common gnome-menus gnome-netstatus-applet
gnome-panel gnome-panel-data gnome-session gnome-spell gnome-system-monitor
  gnome-system-tools gnome-terminal gnome-terminal-data gnome-utils
  gnomemeeting gnumeric gpdf gstreamer0.10-gnomevfs
  gstreamer0.10-plugins-good gstreamer0.8-gnomevfs gstreamer0.8-misc
gstreamer0.8-vorbis gtkhtml3.2 gtkhtml3.6 gtkhtml3.8 gtkorphan gtranslator
  gucharmap hplip knewsticker-scripts konq-plugins libapache2-mod-python
  libbonoboui2-0 libcamel1.2-0 libcamel1.2-dev libdevhelp-1-0 libebook1.2-3
  libebook1.2-5 libebook1.2-dev libebook8 libecal1.2-6 libecal1.2-dev
libecal6 libedata-book1 libedata-book1.2-2 libedata-cal1.2-5 libedata-cal5
  libedataserver1.2-4 libedataserver1.2-dev libedataserver3
libedataserverui1.2-6 libedataserverui1.2-dev libeel2-2 libegroupwise1.2-5
  libegroupwise6 libevolution-cil libexchange-storage1.2-1 libgal2.2-1
libgal2.2-common libgconf2-dev libgksu2-0 libglade2-dev libgnome-desktop-2
  libgnome-media0 libgnome-menu2 libgnome-window-settings1 libgnome2-0
  libgnome2-common libgnome2-dev libgnome2.0-cil libgnomecupsui1.0-1c2a
  libgnomedb2-4 libgnomedb2-common libgnomeui-0 libgnomevfs2-0
  libgnomevfs2-common libgnomevfs2-dev libgnomevfs2-extra libgoffice-1-2
libgsf-gnome-1 libgsf-gnome-1-114 libgstreamer-gconf0.8-0 libgtkhtml3.2-11
  libgtkhtml3.6-18 libgtkhtml3.8-15 libgucharmap4 libmetacity0
  libnautilus-extension1 libpanel-applet2-0 libtotem-plparser1 lsb lsb-core
  lsb-cxx lsb-desktop lsb-graphics lsb-qt4 lsb-release mail-notification
  mercurial metacity metacity-common nautilus nautilus-data
  notification-daemon python python-cairo python-central python-dev
  python-foomatic python-glade2 python-gmenu python-gtk2 python-ipy
  python-libxml2 python-newt python-numeric python-qt3 python-subversion
  python-support python-uno rdiff-backup rhythmbox sgt-puzzles slbackup
  subversion-tools svn-buildpackage timer-applet vim-latexsuite vino yelp
0 upgraded, 0 newly installed, 166 to remove and 239 not upgraded.
Need to get 0B of archives.
After unpacking 369MB disk space will be freed.
Do you want to continue [Y/n]? n

No snipping needed :-)

-- Steve

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.