[24799] in Perl-Users-Digest
Perl-Users Digest, Issue: 6952 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 3 03:06:06 2004
Date: Fri, 3 Sep 2004 00:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 3 Sep 2004 Volume: 10 Number: 6952
Today's topics:
Re: C<sub'a>? <bik.mido@tiscalinet.it>
Re: C<sub'a>? <bik.mido@tiscalinet.it>
Re: C<sub'a>? <bik.mido@tiscalinet.it>
Re: how to use Perl to rename the filenames and directo <bik.mido@tiscalinet.it>
Re: Larry Wall & Cults (J. Romano)
Re: NEw to Perl <tadmc@augustmail.com>
Re: NEw to Perl <abigail@abigail.nl>
Scan Microsoft Office files (Will Fawcett)
Re: Simple question <tadmc@augustmail.com>
Re: Simple question <tadmc@augustmail.com>
Re: Simple question <zebee@zip.com.au>
Re: Simple question <uri@stemsystems.com>
Re: Simple question <zebee@zip.com.au>
Re: Simple question <uri@stemsystems.com>
Re: Split by length <not_four@hotmail.com>
Re: Split by length <noreply@gunnar.cc>
Re: Split by length <junk@blackwater-pacific.com>
Re: Split by length <tadmc@augustmail.com>
Re: Xah Lee's Unixism (Rob Warnock)
Re: Xah Lee's Unixism (Rob Warnock)
Re: Xah Lee's Unixism <cbfalconer@yahoo.com>
Re: Xah Lee's Unixism <cbfalconer@yahoo.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 03 Sep 2004 08:27:12 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: C<sub'a>?
Message-Id: <r7uej0p1hoitavu0jgv2f4f9g1gtgl824v@4ax.com>
On Thu, 02 Sep 2004 17:07:03 GMT, Juha Laiho <Juha.Laiho@iki.fi>
wrote:
>>should be equivalent to
>>
>> sub ::a # a.k.a. main::a
>
>Something akin to that would've been my guess as well - but the truth
>seems different. Check what you get from the perl parser for each
>of these:
>perl -MO=Deparse -e "sub'a{9} print a;"
>perl -MO=Deparse -e "sub::a{9} print a;"
>
>The outputs are different, and I don't claim to understand each of them
I think you'll find that in my original post I had made a remark
exactly about this point so that I must have been aware of this
circumstance. It is in the part of my post that you snipped...
However your (and mine) example only shows that perl parses
sub'a
as
sub ::a
and not as
sub::a
so that the two package separators behave differently.
Michele
--
$\=q.,.,$_=q.print' ,\g,,( w,a'c'e'h,,map{$_-=qif/g/;chr
}107..q[..117,q)[map+hex,split//,join' ,2B,, w$ECDF078D3'
F9'5F3014$,$,];];$\.=$/,s,q,32,g,s,g,112,g,y,' , q,,eval;
------------------------------
Date: Fri, 03 Sep 2004 08:27:13 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: C<sub'a>?
Message-Id: <0ouej058200br61n3v6g6t9l8v7v8uinp5@4ax.com>
On Thu, 2 Sep 2004 12:34:48 -0500, Tad McClellan
<tadmc@augustmail.com> wrote:
>>> sub'a{that does something}
>
>That is just the sub's definition, it doesn't really "do something"
>until you _call_ that subroutine.
;-)
Michele
--
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
"perl bug File::Basename and Perl's nature"
------------------------------
Date: Fri, 03 Sep 2004 08:27:14 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: C<sub'a>?
Message-Id: <mpuej0dh8cihajqdqkrt0a30q2lf4pgaod@4ax.com>
On Thu, 2 Sep 2004 13:47:15 -0400, Jeff 'japhy' Pinyan
<pinyaj@rpi.edu> wrote:
>>It defaulted to using the "main" package.
>
>What is baffling her, Tad, is that
^^^
^^^
<OT>
If "her" is referred to the OP, i.e. me, then it should be a "him"[*].
</OT>
However, yes that is what was baffling me. Apart that I was not 100%
(only, say, 99%) sure that it was the correct explanation at all...
> sub'name { ... }
>
>is being seen as
>
> sub ::name { ... }
>
>instead of
>
> sub::name { ... }
>
>The question is *why* does the ' package separator in this case not act as
>the :: package separator.
Yes, actually the question remains, although it is not of vital
importance, I'd say.
[*] I've noticed that in english speaking environments people tends to
mistake my name, which is a masculine Italian name (equivalent say to
"Michael"), for the French "Michelle" that is a feminine name. Not
that this is really a big problem, but just wanted to point it out.
Michele
--
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
"perl bug File::Basename and Perl's nature"
------------------------------
Date: Fri, 03 Sep 2004 08:27:11 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: how to use Perl to rename the filenames and directory names under current and subdirectories recursively?
Message-Id: <m0sej05dlhjo62p8ik8q8knlibi9360jeu@4ax.com>
On Thu, 02 Sep 2004 14:37:53 GMT, "Jürgen Exner"
<jurgenex@hotmail.com> wrote:
>> won't work. IMHO the best workaround would be to do the renaming in
>> 'preprocess', returning the updated list, and actually doing nothing
>> in 'wanted'. All this is left as an exercise to the OP... ;-)
>
>Way to complicated. Just to a depth-first parsing and you will be fine.
D'Oh! You're *perfectly* right... ;-)
...Though I wouldn't say "way too complicated" (just "more
complicated"). It would be a matter of something similar to:
find { preprocess =>
sub {
map {
my $o=$_;
rename $o, $_ or
warn "Can't rename `$o' to `$_': $!\n"
if s/abc/xyz/;
$_;
} @_;
},
wanted => sub {} }, '.';
BTW, I must say that I have tried to avoid the 'wanted' line and I got
an error, reasonably enough in terms of UI for logically it is
expected that one would use the 'wanted' action on wanted files.
Anyway I wonder wether it could be acceptable/desirable to have a
default implicit C<<wanted => sub {}>> instead...
Michele
------------------------------
Date: 2 Sep 2004 21:06:39 -0700
From: jl_post@hotmail.com (J. Romano)
Subject: Re: Larry Wall & Cults
Message-Id: <b893f5d4.0409022006.68c9690f@posting.google.com>
xah@xahlee.org (Xah Lee) wrote in message news:<7fe97cc4.0408251356.34f2102a@posting.google.com>...
>
> In the computing world, there're also bad seeds with
> colorful creed taking innocent mobs forming cults.
> The three principal virtues of a programmer are Laziness,
> Impatience, and Hubris. Yes?
>
> How can we prevent heinous cults then? Stop bending
> truths. Education and rationalism. I'm starting my
> own cult to exterminate morons on this earth. Two
> things are on the top of my agenda: Unixism and Perl.
You know... the original poster has a point...
After all, Perl programmers have been known to "use Curses", as
well as hex(), bless(), and sin(). (Which might lead him to believe
that Perl programmers will eventually pack() their belongings, split()
from their families , and join an isolated community where there is
nothing to do but study() until you die() (or your mind goes
"pop()"!).
Coincidence? (I think so!)
(Wow... Python advocacy has really taken a bizarre turn lately...)
-- J.
(My apologies if I offended any Python programmers. It was not my
intention to associate the Python community with the original poster.)
------------------------------
Date: Thu, 2 Sep 2004 23:52:05 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: NEw to Perl
Message-Id: <slrncjfu3l.e25.tadmc@magna.augustmail.com>
Shawn Melnic <sham_x30@yahoo.com> wrote:
> while(&list) {
> @line = ..
> bla bla
> bla
> }
>
> sub list {
my @list;
push @list, "line 1";
push @list, "line 2" ;
push @list, "line 3" ;
return @list;
> }
>
> Basically, I want while to read the sub list into an array..
Can't be done.
But you can have the sub return a list, as above.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 03 Sep 2004 06:44:44 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: NEw to Perl
Message-Id: <slrncjg4ms.usv.abigail@alexandra.abigail.nl>
Shawn Melnic (sham_x30@yahoo.com) wrote on MMMMXXI September MCMXCIII in
<URL:news:a365c2aa.0409021716.4dde5964@posting.google.com>:
`` greetings,
``
`` how do I make while in perl do this:
``
`` while(&list) {
`` @line = ..
`` bla bla
`` bla
`` }
``
`` sub list {
`` print "line 1";
`` print "line 2" ;
`` print "line 3" ;
`` }
``
`` Basically, I want while to read the sub list into an array..
sub list {
("line 1", "line 2", "line 3");
}
while (my @line = list) {
bla bla
bla
}
Abigail
--
@;=split//=>"Joel, Preach sartre knuth\n";$;=chr 65;%;=map{$;++=>$_}
0,22,13,16,5,14,21,1,23,11,2,7,12,6,8,15,3,19,24,14,10,20,18,17,4,25
;print@;[@;{A..Z}];
------------------------------
Date: 2 Sep 2004 23:41:01 -0700
From: wfawcett@gmail.com (Will Fawcett)
Subject: Scan Microsoft Office files
Message-Id: <e08f2c58.0409022241.64e7898@posting.google.com>
I am trying to put together a script that will allow me to scan
Microsoft Office files and store "keywords" for those files so they
are searchable by content not just title.
If you open a word file with Perl and look at the actual source it is
basically a text file with a bunch of bogus code. I was hoping someone
here might have heard of a module out there that can step out the
ambiguous code out and just store plain text words. Or is RegEx my
only option?
-Will
------------------------------
Date: Thu, 2 Sep 2004 23:57:12 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Simple question
Message-Id: <slrncjfud8.e25.tadmc@magna.augustmail.com>
PF <pauldfisk@hotmail.com> wrote:
> # Localize variables used in this subroutine.
> #
> local($print_config,$key,$sort_order,$sorted_field,$env_report);
You are NOT localizing variables there.
You are localizing values (of variables) there.
You should always prefer lexical (my) variables over package (our)
variables, except when you can't.
If you really want local variables, then you want lexical variables:
my($print_config,$key,$sort_order,$sorted_field,$env_report);
> open(MAIL,"|$mailprog -t");
You should always, yes *always*, check the return value from open:
open(MAIL,"|$mailprog -t") or die "could not run '$mailprog' $!";
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 2 Sep 2004 23:59:58 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Simple question
Message-Id: <slrncjfuie.e25.tadmc@magna.augustmail.com>
PF <pauldfisk@hotmail.com> wrote:
> I have a request to modify the perl script
> I have never programmed PERL and haven't
> a clue.
Step 1) Learn some Perl
Step 2) modify the Perl program
Post here if you get stuck on Step 2, or
Step 1) contact the original author of the program for support
or
Step 1) hire somebody who already knows Perl to modify it for you
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 03 Sep 2004 05:54:05 GMT
From: Zebee Johnstone <zebee@zip.com.au>
Subject: Re: Simple question
Message-Id: <slrncjg1d4.h2l.zebee@zeus.zipworld.com.au>
In comp.lang.perl.misc on Thu, 2 Sep 2004 23:57:12 -0500
Tad McClellan <tadmc@augustmail.com> wrote:
>
> You should always, yes *always*, check the return value from open:
>
> open(MAIL,"|$mailprog -t") or die "could not run '$mailprog' $!";
although it may not Do The Right Thing:
here is z.pl:
#!/usr/bin/perl -w
use strict;
my $file = shift;
open (DATA,"zcat $file|") || die "can't open $file for reading $!\n";
print "end of prog\n";
[zebee@clone maillog]$ ls fred.gz
ls: fred.gz: No such file or directory
[zebee@clone maillog]$ perl z.pl fred.gz
Name "main::DATA" used only once: possible typo at z.pl line 4.
zcat: fred.gz: No such file or directory
end of prog
as you can see, it *didnt* die when told but went on to do the print
statement.
This is, I think, because the open opened a pipe, presumably that
stuffed up whatever open uses to decide if the open worked. Or else it
did work for open's purposes, just not for mine!
Either way, while open or die is ingrained for me, it doesn't always
work. If pipes are involved, I now do an explicit file test to be sure
the file exists.
Zebee
------------------------------
Date: Fri, 03 Sep 2004 06:06:28 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Simple question
Message-Id: <x77jrb7uq3.fsf@mail.sysarch.com>
>>>>> "ZJ" == Zebee Johnstone <zebee@zip.com.au> writes:
ZJ> Tad McClellan <tadmc@augustmail.com> wrote:
>>
>> You should always, yes *always*, check the return value from open:
>>
>> open(MAIL,"|$mailprog -t") or die "could not run '$mailprog' $!";
ZJ> although it may not Do The Right Thing:
ZJ> #!/usr/bin/perl -w
ZJ> use strict;
ZJ> my $file = shift;
ZJ> open (DATA,"zcat $file|") || die "can't open $file for reading $!\n";
ZJ> print "end of prog\n";
ZJ> zcat: fred.gz: No such file or directory
ZJ> end of prog
ZJ> as you can see, it *didnt* die when told but went on to do the print
ZJ> statement.
that is because the open didn't fail. open of a piped prog will fail
only if the prog itself doesn't exist (the exec fails). or if the fork
itself fails. in this case zcat is execed so it doesn't die. when you
close the handle that is where the failure of zcat to open fred.gz is
found. this is well documented.
ZJ> This is, I think, because the open opened a pipe, presumably that
ZJ> stuffed up whatever open uses to decide if the open worked. Or else it
ZJ> did work for open's purposes, just not for mine!
it is much simpler than all that and very logical if you understand how
pipes, fork and exec work.
ZJ> Either way, while open or die is ingrained for me, it doesn't always
ZJ> work. If pipes are involved, I now do an explicit file test to be sure
ZJ> the file exists.
it does always work. you need to understand what you are opening and
what the result of open means. in this case it means the fork/exec
worked. try it with open( FH, 'foobar|' ).
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Fri, 03 Sep 2004 06:30:42 GMT
From: Zebee Johnstone <zebee@zip.com.au>
Subject: Re: Simple question
Message-Id: <slrncjg3hp.j07.zebee@zeus.zipworld.com.au>
In comp.lang.perl.misc on Fri, 03 Sep 2004 06:06:28 GMT
Uri Guttman <uri@stemsystems.com> wrote:
>>>>>> "ZJ" == Zebee Johnstone <zebee@zip.com.au> writes:
>
>
> ZJ> This is, I think, because the open opened a pipe, presumably that
> ZJ> stuffed up whatever open uses to decide if the open worked. Or else it
> ZJ> did work for open's purposes, just not for mine!
>
> it is much simpler than all that and very logical if you understand how
> pipes, fork and exec work.
yes. Worked for open's purposes, just not for mine.
and so when doing a pipe, the return value of open is perhaps not going
to do what you expect. hence saying "aways deal with the return value"
is true, but it's not always helpful.
Zebee
------------------------------
Date: Fri, 03 Sep 2004 06:40:31 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Simple question
Message-Id: <x7y8jr6eku.fsf@mail.sysarch.com>
>>>>> "ZJ" == Zebee Johnstone <zebee@zip.com.au> writes:
ZJ> In comp.lang.perl.misc on Fri, 03 Sep 2004 06:06:28 GMT
ZJ> Uri Guttman <uri@stemsystems.com> wrote:
>>>>>>> "ZJ" == Zebee Johnstone <zebee@zip.com.au> writes:
>>
>>
ZJ> This is, I think, because the open opened a pipe, presumably that
ZJ> stuffed up whatever open uses to decide if the open worked. Or else it
ZJ> did work for open's purposes, just not for mine!
>>
>> it is much simpler than all that and very logical if you understand how
>> pipes, fork and exec work.
ZJ> yes. Worked for open's purposes, just not for mine.
ZJ> and so when doing a pipe, the return value of open is perhaps not going
ZJ> to do what you expect. hence saying "aways deal with the return value"
ZJ> is true, but it's not always helpful.
again, you miss the point. open's value reflects what it knows about the
result of the operation. so it can detect a fork/exec fail. until the
forked program runs (you read/write to it) or is reaped (close) you
can't tell how it behaves. so it is up to YOU and not the open call to
know it is a piped program and deal with that accordingly. open on a
pipe does what it is supposed to do and you should ALWAYS check the
results (you just have to know how to interpret them differently when
piping). close is rarely checked for its result (though some do). close
is rarely even needed to be called as handles going out of scope or
being reopened will do a close. but if you do a open pipe it is on YOUR
head to do a real close and check the results. also if your piped
program fails to run (it exits early before any i/o) you can also detect
that by reading the undef (EOF) value instead of a line or
whatever. then you should immediately do a close and report the error.
so stop your gibbering about how open's return is not always helpful. it
is ALWAYS helpful. it is your code that may not be taking proper
advantage of that offered help.
and this is all well documented in perldoc -f open and perlopentut.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Fri, 3 Sep 2004 12:10:31 +0800
From: "Fayland" <not_four@hotmail.com>
Subject: Re: Split by length
Message-Id: <ch8qrr$kua$1@news.yaako.com>
I wrote some code as folows:
-----------------------
$a = "avcdfadad";
foreach ($a =~ /.{1,2}/g) { # if u donn't want to push the last one char to
array,use /.{2}/
push (@a, $_);
}
foreach (@a) {
print "$_\n";
}
print scalar @a;
-----------------------
It's weird that I use "@a = split(/(.{1,2})/,$a);", it give me 10 elements
of array.
"Papago" <me@myplace.com> дÈëÓʼþ news:IIidnc39bpemV6rcRVn-hg@golden.net...
> Is there a single Perl command that will split a string into an array by
> number of characters? For example, if I had the string:
>
> $string = "monkey";
>
> I could specify a lenght, such as 2, and it would put every pair of 2
> characters into an array that looks something like this:
>
> $array[0] = "mo";
> $array[1] = "nk";
> $array[3] = "ey";
>
> Is that possible?
>
>
------------------------------
Date: Fri, 03 Sep 2004 06:24:04 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Split by length
Message-Id: <2pqaa2Fnoo38U1@uni-berlin.de>
Fayland wrote:
>
> foreach ($a =~ /.{1,2}/g) { # if u donn't want to push the last one
> char to array,use /.{2}/
> push (@a, $_);
> }
The foreach loop is redundant:
@a = $a =~ /.{1,2}/g;
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Thu, 02 Sep 2004 21:55:33 -0700
From: Steve May <junk@blackwater-pacific.com>
Subject: Re: Split by length
Message-Id: <10jfu8i5l2s0m79@corp.supernews.com>
Gunnar Hjalmarsson wrote:
> Fayland wrote:
>
>>
>> foreach ($a =~ /.{1,2}/g) { # if u donn't want to push the last one
>> char to array,use /.{2}/
>> push (@a, $_);
>> }
>
>
> The foreach loop is redundant:
>
> @a = $a =~ /.{1,2}/g;
>
Well, *my* copy of PSI::ESP is hinting that we might be breaking
down fixed length fields in data records here.
That being the case, the OP might want to consider the length
of $a[-1] and if padding will be required in whatever use is
intended for the elements in @a.
Just a thought.
s.
(I suppose I could mention the evils of using $a, but I won't. :-)
------------------------------
Date: Fri, 3 Sep 2004 00:05:49 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Split by length
Message-Id: <slrncjfutd.e25.tadmc@magna.augustmail.com>
Fayland <not_four@hotmail.com> wrote:
> $a = "avcdfadad";
> It's weird
No it isn't.
If you had told us what you thought was weird, we could have perhaps
explained it.
At it is, it is doing exactly what is expected, so we cannot help
repair whatever misunderstanding you have...
> that I use "@a = split(/(.{1,2})/,$a);", it give me 10 elements
> of array.
You get 5 (empty) fields, and 5 separators, just what the function's
docs say you should.
That adds up to 10 (and I didn't even have to take off my shoes
to calculate that :-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 02 Sep 2004 23:06:52 -0500
From: rpw3@rpw3.org (Rob Warnock)
Subject: Re: Xah Lee's Unixism
Message-Id: <IpWdndgNVutBcKrcRVn-gg@speakeasy.net>
Rupert Pigott <roo@try-removing-this.darkboong.demon.co.uk> wrote:
+---------------
| Pascal Bourguignon wrote:
| > In anycase, at the time the Macintosh appeared, there were
| > already 680x0 based unix workstations.
|
| It was specifically the 68000. Fixes were made that took effect in the
| 68010 and 68020. Dunno about 68008. IIRC the problem was that you could
| not restart some instructions properly. Some UNIX workstations did use
| 68Ks, there was an Apollo that had two of them running in lock-step,
| with one of them one instruction behind the other. When the leading CPU
| barfed, action would be taken and the other CPU would take over. Someone
| in comp.arch worked on the Fortune boxes and IIRC he claimed they had a
| more elegant single CPU solution.
+---------------
That would have been me, in <news:R4OdnfWrcMv1ekHdRVn_iw@speakeasy.net>,
replying to John Mashey. We tweaked the C compiler's calling conventions
enough to allow automatic stack growth by faulting off the end of the
stack to work reliably. See the referenced article for more detail.
But as I finished there:
Though there were certainly other places where the mc68000's imprecise
exceptions left no choice but to blow the offending process away...
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607
------------------------------
Date: Thu, 02 Sep 2004 23:29:50 -0500
From: rpw3@rpw3.org (Rob Warnock)
Subject: Re: Xah Lee's Unixism
Message-Id: <jpSdneJkVK-jbqrcRVn-hg@speakeasy.net>
Andreas Krey <yyx-nospam@gmx.de> wrote:
+---------------
| I don't know whether the 68000 already had user and supervisor
| mode which is also (besides an MMU) a prerequisite for completely
| jailing user programs.
+---------------
Yes, it did. The original Fortune Systems box used a 68000 to run
a hybrid ATT-v.7/BSD-4.1a kernel. It "completely jailed" user programs,
as you put it. Though, as others have noted, since the 68000 could not
recover from arbitrary bus faults (SIGSEGVs), we were only able to
provide whole-process swapping, not general paging.
But as a consequence of this limitation, we were able to use a *much*
simpler external MMU, basically a four-segment base/limit style (think
of a PDP-10 with 4 segs instead of 2, or a PDP-11/44 with 4 instead of 8)
built out of 4x4 register files (74S670's, IIRC) instead of the expensive,
fast SRAMs Sun later used on their 68020 box.
-Rob
p.s. The four segments were text, data, "extra", and stack, equally
dividing the virutual address space, with the limits growing up from
the beginning of the segment for text & data and down from the end
for "extra" and stack. [In case you're wondering, "extra" was used
for various & sundry purposes: System-V shmem; for mapping /dev/mem
or /dev/kmem for kernel debugging; mapping hardware into user-mode
drivers; and similar stunts.]
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607
------------------------------
Date: Fri, 03 Sep 2004 05:03:34 GMT
From: CBFalconer <cbfalconer@yahoo.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <4137F89A.7101526F@yahoo.com>
Alan Balmer wrote:
>
... snip ...
>
> Perhaps I'm misinterpreting John Thingstad's remarks, but I was
> mostly objecting to the idea that Linus sat down with a copy of
> the POSIX specifications and turned them into an OS. (Especially
> since not all of the current POSIX standards existed at the time
> :-)
Considering the POSIX standard as a cookbook for an OS makes no
more sense than considering the C99 standard as a cookbook for a C
compiler.
--
"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
------------------------------
Date: Fri, 03 Sep 2004 05:03:36 GMT
From: CBFalconer <cbfalconer@yahoo.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <4137F99C.FA48E44A@yahoo.com>
Alan Balmer wrote:
> <john.thingstad@chello.no> wrote:
>
>> well documented at the time. Linux Pauling started out with minix
>> and then went on to make a (mostly) posix compliant unix.
>
> Linux Pauling? I know about Linus Torvalds and Linus Pauling . I
> don't think the latter had much to do with Linux.
This has to do with the well known metamorphosis of the common
cold into an OS when treated with large doses of vitamin C. Those
viruses are smart.
--
"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 6952
***************************************