A few questions about Perl and it's capabilities

  • Thread starter News.Individual.NET
  • Start date
B

Benjamin Goldberg

Vlad Tepes wrote:
[snip]
sub cursor($) {
require Term::Cap;
Term::Cap->Tgetent->Tputs( $_[0] ? 've' : 'vi', 0, *STDOUT );
}

It would be more efficient to change this to:

my $cap;
sub cursor($) {
$cap ||= (require Term::Cap and Term::Cap->Tgetent);
$cap->Tputs( $_[0] ? 've' : 'vi', 0, *STDOUT );
}

I mean, why bother re-calling Tgetent each time you want to make the
cursor appear or dissappear?
 
D

derek / nul

Windows XP Home Edition Overview

Windows XP provides improvements over Windows 2000 Professional designed to
appeal to both business and home users. Enhancements include:

* Improved application and hardware device compatibility
* Simplified security and logging on
* Fast user switching
* A new user interface with simplified WebViews
* Enhanced digital media support for movies, pictures, and music
* A software-based firewall to protect against outside security threats on
the Internet
* Support for Direct X version 8.0 technology for gaming

Windows 95, Windows 98, and Windows Me were designed to support both home and
business users. Windows XP Home Edition is designed specifically for home users.
It provides them with the reliability and security of Windows XP Professional
and the efficient simplicity of Windows Me. Windows XP Home Edition offers
enhanced support for computer games, storage of digital media (such as the My
Movies and My Music folders), and wizards for connecting to the Internet.

The hardware requirements for installing Windows XP Home Edition and Windows XP
Professional are similar; however Windows XP Home Edition supports only one CPU.

Users can upgrade to Windows XP Home Edition from Windows 98 or Windows Me — but
not from Windows 95, Microsoft® Windows NT® Workstation or Windows 2000
Professional. You can upgrade to Windows XP Professional from any of those
operating systems, except Windows 95.

Note

* There is no 64-bit version of Windows XP Home Edition.

For more information about hardware requirements and compatibility for
installing Windows XP Professional, see "Planning Deployments" in this book.
 
J

Jürgen Exner

Steve said:
news:<[email protected]>... [...]
Win2K and WinXP pro are both built on NT 5 (NT 4.0 was a bit premature
release of the OS). The DOS Window on Win2K is a *LAYER* on NT, not a
window into the OS.

Win95, Win98 and WinXP "home" are all run with DOS underneath -- a
poor excuse for an OS.

Correction: WinXP Home and WinXP Pro are using the same underlying
archicture which is based on NT4/NT5/...
There is no Win9x code in WinXP Home Edition.
The fact that WinXP home and WinXP pro look similar at all is
testament to the ability of programmers, given enough staff, to hide
the "guts" from the user.

They are the same OS.
The only difference is that in the Home Edition several features are
disabled and some settings have different default values.

However, I still wonder what this has to do with Perl.
Perl runs just fine on either.

jue
 
S

Steve D

Derek,
Thanks for the accurate information. Quick lookup on web found:
http://www.ntfs.com/fat-systems.htm
which discusses fat12, fat16, and fat32. (And one up discusses NTFS).

Carlton,
Thanks for the OS2 reference. Clears a lot up. Appears NT is indeed
a separate OS creation from OS/2, though they shared the name at one
time.

Jurgen,
I stand corrected on the WinXP "home" issue. I'll add it to my list
of allowable platforms :).

Relevance to Perl is minimal, except for understanding strange actions
in some circumstances, so I intend to terminate responses on this
thread.

Regards,
Steve D.
 
D

derek / nul

Derek,
Thanks for the accurate information. Quick lookup on web found:
http://www.ntfs.com/fat-systems.htm
which discusses fat12, fat16, and fat32. (And one up discusses NTFS).

Carlton,
Thanks for the OS2 reference. Clears a lot up. Appears NT is indeed
a separate OS creation from OS/2, though they shared the name at one
time.

NO, OS/2NT was developed under a joint venture by M$ and V1 and V2 were EXACTLY
the same code.
V3 and later is where the code diverged.
 
V

Vlad Tepes

Benjamin Goldberg said:
Vlad said:
sub cursor($) {
require Term::Cap;
Term::Cap->Tgetent->Tputs( $_[0] ? 've' : 'vi', 0, *STDOUT );
}

It would be more efficient to change this to:

my $cap;
sub cursor($) {
$cap ||= (require Term::Cap and Term::Cap->Tgetent);
$cap->Tputs( $_[0] ? 've' : 'vi', 0, *STDOUT );
}

I mean, why bother re-calling Tgetent each time you want to make the
cursor appear or dissappear?

Well, as I said, the script was just thrown together. I scanned the docs
and /etc/termcap and was satisfied once it was working.

I agree, catching is a good idea. On my machine your version saves
some 7 ms on repeated calls to cursor(). Jippi! :)

Thanks for the tip on Term::Cap, it might be useful sometime.
 
V

Vlad Tepes

Benjamin Goldberg said:
Vlad said:
sub cursor($) {
require Term::Cap;
Term::Cap->Tgetent->Tputs( $_[0] ? 've' : 'vi', 0, *STDOUT );
}

It would be more efficient to change this to:

my $cap;
sub cursor($) {
$cap ||= (require Term::Cap and Term::Cap->Tgetent);
$cap->Tputs( $_[0] ? 've' : 'vi', 0, *STDOUT );
}

I mean, why bother re-calling Tgetent each time you want to make the
cursor appear or dissappear?

Well, as I said, the script was just thrown together. I scanned the docs
and /etc/termcap and was satisfied once it was working.

I agree, catching is a good idea. On my machine your version saves
some 7 ms on repeated calls to cursor(). Jippi! :)

Thanks for the tip on Term::Cap, it might be useful sometime.
 
C

Carlton Brown

[email protected] (Steve D) wrote in message news: said:
Carlton,
Thanks for the OS2 reference. Clears a lot up. Appears NT is indeed
a separate OS creation from OS/2, though they shared the name at one
time.

Whoa... that could be interpreted way differently than what I
intended... OS/2 originated at IBM, was a collaborative project with
MS for a brief time, and then MS took OS/2 version 3 for their own and
called it NT. IBM retained version 2 and skipped a rev to version 4.
No DOS in the mix except for the runtime application emulator.
That's just for the 32-bit family beginning with NT. All 16-bit OS
products run on some mutation of DOS, some better hidden than others.

As another piece of trivia... nobody's yet mentioned that NT (up to
4.0) supported HPFS, which is an OS/2 file format. One might even
argue that NTFS is just an improved version of HPFS. Yet of course we
wouldn't argue that NT is OS/2 merely because it supports HPFS. You
could just as well say that it's a CD player because it supports CDFS.

And yes, to confirm what was said about FAT12, it is true that all
floppies are FAT12 - and this is true of every system I know of,
including Mac and even Solaris (where it is called PCFS). Although
it's true that FAT originated with DOS, it's important not to confuse
the disk formatting with the runtime operating system. Linux can read
FAT disks although nobody of course would be foolhardy enough to call
Linux DOS.

Regarding boot disks... Purl Gurl is correct, NTFS has way too much
overhead to go on a floppy, although I don't think anyone contested
that fact. If you think about it, NTFS (and UFS for that matter) are
inappropriate for floppies because they are too portable for FS
security to be practical and too small for performance to be a
significant concern. Floppies are on the way out, anyway.

Regarding whether NTFS security can be bypassed by a boot floppy -
yes. File-level security is only as good as physical security
protocols. This isn't what file security is intended to defend
against. If your system is compliant with DoD security specs, then it
will physically secured, and boot disk access won't be an issue.
Encryption is the only way to guard against boot disk bypass, on any
system. If someone has physical access to the disk or even the
network cable, and the data isn't encrypted, it's only a matter of
time.

Finally, regarding whether you can create an "NTFS boot disk" - it is
possible to create an NT-only bootstrapping disk that will allow you
to bypass a damaged boot sector. However, due to logical
contradictions noted before, Microsoft obviously isn't going to give
you a boot disk with a shell escape to bypass their security. Here
are the instructions here:
http://is-it-true.org/nt/utips/utips3.shtml
Your installation disk also serves as an emergency boot disk for
restoring a damaged registry, which you've hopefully backed up at some
point. Before someone says that an installation disk isn't the same
as a boot disk, I'd remind them that disk 1 of the DOS kit was a boot
disk.

Finally... the windows NT install disks do contain the entire kernel
and all drivers required to launch the install routine and they can be
created with the command winnt /ox. This of course does not transfer
you to a navigable shell because, as mentioned before, it would be a
logical contradiction to the concept of file security.

I hope this clears a few things up... before switching to Solaris, I
started out as a Microsoft sysadmin, at a time when this file system
interoperability mess was at its worst, and I had to deal with format
problems like this pretty often.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,135
Messages
2,570,783
Members
47,341
Latest member
hanifree

Latest Threads

Top