A Bunch Of Perl Bits
Couple of Perl Bits fell into the bin worth noting today:
dlc writes, "The results of the Perl Poetry Content are in, and are available." If you're into this sort of thing, you'll dig it. A lot of clever stuff there. Course the sonnet generator is probably my favorite... hack it to generate rock lyrics, and I can start a band and record a debut album. ;) If that's not weird enough for you, check out the PerlOS Project. A PerlWM, a PerlSH, and more. It will strike fear into even the most hardened of Perl Monks.
What is the fascination with Perl in the *nix world? I can't fathom it - after all it adds little to what awk and sed have been doing for years. For more complex tasks than a simple CGI script Perl seems unwieldly, and even now technologies such as ASP and JSP are taking over the server-side processing domain.
IMHO Perl has no real domain in which it is better than everything else - so why is it so popular? Can someone please tell me?
The Perl Filesystem
Matt. Want XML + Apache + Stylesheets? Get AxKit.
(> Catalog
DISK VOLUME 254
B 203 PERL.KERNEL
A 002 HELLO
T 091 DOCUMENTATION
(> Quake3
Invalid command. Type ? for menu
(> Drat!
Invalid command. Type ? for menu
(> Return to regular OS
(by the way, site is definately
--
Never hit your grandmother with a shovel, for it leaves a bad impression on her mind...
How do you know I'm Jeff?
Erm, you don't, I guess. I'm sure you aren't losing any sleep over it though.
The point is, an Anonymous Coward can say whatever they want without their name being attached to their Insightful Post/Troll/Flame. My name is unimportant - what is important is that generally if a bunch of posts are made under the same name, that person is taking credit or blame for their content. An AC can do whatever they want without any fear of retribution or history.
- Jeff A. Campbell
- VelociNews (http://www.velocinews.com)
- Jeff
Him having no name says little about him, but you not having one could say volumes about you.
Either way, it's obvious that this is all based on a vendetta you (or whichever AC posted the original reply) have against him. His posts don't seem terribly insightful, and the non-breaking spaces are annoying as hell, but this doesn't mean he's a troll or karma whore (aren't those usually mutually exclusive?).
Whatever. It's not like his original post was inflammatory or anything. I seriously hope you don't follow people in order to toss around witless insults whenever they post anything...
- Jeff A. Campbell
- VelociNews (http://www.velocinews.com)
- Jeff
Here's another pearl:
The Perl Rocket - Rapid Knowledge Transfer for Perl programming.
")
To the editors: your English is as bad as your Perl. Please go back to grade school.
Even then, I have lingering glances to others - python, with it's elegance and - the whitespace ! Oh, those sinful temptations. And don't forget PHP - riding on top of that Apache, all the time - they banished you from there, too.
But none of them can spin poetry like you do, and that is - I know it now - the best virtue a programming language can have. And I feel so ashamed that I have ever doubted your beauty. O~ sweet Pearl, I will never leave you.
(Besides, you are pretty too damned handy with regexps.)
http://www.focusresearch.com/gregor/psh/
Gates' Law: Every 18 months, the speed of software halves.
I do the almost the same thing. I ordered an X10 firecracker kit when they were featured on here and freshmeat. I don't know if it still can be ordered, but the link is here. It was only $5.90 and it comes with a serial passthrough that has an RF transmitter in it. All you have to do is send it simple commands and it will turn on and off up to 16 things that are connected to X10 control modules. Works great too.
Last year, at YAPC, Larry Wall, creator of Perl, told in his speech about how he had wired his house with X10. All Perl driven.
-- Abigail
-- Abigail
After reading about the JavaOS project and now the PerlOS project, I've decided to start my own OS project.
DonkPunch hereby officially announces: THE C OS PROJECT.
That's right, folks -- an entire operating system written in C! Utilities and shells all written in C! It will be the most C-friendly OS the world has ever seen!
It's a revolutionary idea, I know. In fact, I'm kind of surprised nobody has tried it yet....
Save the whales. Feed the hungry. Free the mallocs.
What?!! PerlOS, PerlWM and PerlSH... no PerlPERL? You gotta be kidding!
This reminds me of the old joke about creating a /vmunix.el, waiting six months, and then finding all of the people where using it, and killing them.
Once upon a time we had a bunch of good languages and a good OS. But you couldn't write the OS in those languages, though many tried, so C was invented.
Flash forward a quarter century.....
We have a bunch of good languages, and a good OS. But you couldn't write the OS in those languages, though many tried, so we all went back to C.
.sig: Now legally binding!
Is it possible to implement an Operating System with very language? And if not in any, what requirements must a programming language meet to write an operating system with it?
who has stolen my .signature file?
/*
// initialize song
// initialization completed
//Object objDream = new Object();
//Object objReality = objDream;
// until NoMoreProblem thread wakes this up
//if (Suddenly != ) //implement later //{ // System.out.println(dayBeforeNow); //}
Yesterday (Lennon/McCartney)
Yesterday, all my troubles seemed so far away
Now it looks as though they're here to stay
Oh, I believe in yesterday.
Suddenly, I'm not half the man I used to be,
There's a shadow hanging over me.
Oh, yesterday came suddenly.
Why she had to go I don't know she woldn't say.
I said something wrong, now I long for yesterday.
Yesterday, love was such an easy game to play.
Now I need a place to hide away.
Oh, I believe in yesterday.
Mm mm mm mm mm.
*/
import java.lang.*;
import java.util.*;
import java.awt.*;
public class Yesterday extends Lyrics implements Beetles
{
private String wrong = (String)new Object();
public static void main(String[] args)
{
Yesterday Y = new Yesterday();
Y.run();
}
public String saySomething()
{
return wrong;
}
public void run()
{
Object Me = (Object)new Random();
Love love = new Love();
int Suddenly=0;
Calendar currentDate = Calendar.getInstance();
Calendar dayBeforeNow = Calendar.getInstance();
dayBeforeNow.set(
dayBeforeNow.get(Calendar.YEAR),
dayBeforeNow.get(Calendar.MONTH),
dayBeforeNow.get(Calendar.DATE) - 1,
dayBeforeNow.get(Calendar.HOUR),
dayBeforeNow.get(Calendar.MINUTE),
dayBeforeNow.get(Calendar.SECOND)
);
if ((Calendar.getInstance()).get(Calendar.DATE) == dayBeforeNow.get(Calendar.DATE))
{
try{
while(Integer.MAX_VALUE > 1)
{
if (dayBeforeNow.get(Calendar.DATE) {
Exception troubles = new Exception();
throw troubles;
}
}
}
catch(Exception e)
{
System.out.println("Troubles");
Object objHere = new Object();
synchronized(objHere)
{
try
{
Suddenly = (new Random()).nextInt();
wait(Suddenly);
}
catch(Exception ie)
{}
}
}
}
int Man = ((Random)Me).nextInt();
while(Man / 2 - 1 == Man )
{
System.out.println("I am the man!");
}
Object Shadow = (Object)(Object)Me;
String ISay = this.saySomething();
if (ISay == wrong)
{
She she = new She();
String Explanation = she.go();
if (Explanation == null)
{
System.out.println("Reason Unknown.");
}
try
{
currentDate = dayBeforeNow;
throw new Exception();
}
catch(Exception e)
{
currentDate = Calendar.getInstance();
}
}
if ((Calendar.getInstance()).get(Calendar.DATE) == dayBeforeNow.get(Calendar.DATE))
{
love.isEasy(true);
love.play();
}
this.hide();
((Yesterday)Me).believes();
for(int i = 0; i System.out.print("mm ");
}
private void hide()
{}
private void believes()
{}
}
class She
{
public String go()
{
return null;
}
}
abstract class Game
{
abstract public void play();
}
interface Easy
{}
class Love extends Game implements Easy
{
public void isEasy(boolean easy)
{}
public void play(){}
}
class Lyrics
{}
interface Beetles
{}
You can't handle the truth.
I am gonna fuck you in the ass
// garbage collection
// at least it rhymes
(new PipedReader()).connect();
Without making giant mess
System.gc();
Then I'll be fucking you so much
String str = "";
BufferedReader BR = new BufferedReader();
while((str = BR.readLine()) != null){}
Can you believe it? I am Dutch!
Object Dutch = (Dutch)(new Object());
try
{
if (this == Dutch) return true;
}
catch(Exception e)
{
return false;
}
You can't handle the truth.
The site is slashdotted, so I will make this stuff up for here on in...
Correct me if I am wrong, but when Perl has to do something lowlevel it calls the native system calls for that OS right? So if Perl is the OS, how can it call it's self to something lowlevel when the low level system calls have never been defined (since it defines it, depending on what OS it is running). It seems like a chicken-egg problem...
My guess is that they would have to hack up a kernel with hacked up Perl built directly into it. Then do everything else like memory management/ drivers/ etc though Perl code after the system gets up and going... Hell I don't know. Doing an OS in Perl is cool and all, just seems weird.
Then again having Perl in kernel space would scream...
Obfused Perl Kernel Drive contest.
"Uh, Hrmmm so this is a Video Driver right?"
"Nope"
"Uh, sound card, see here is an IRQ entry"
"Nope, that IRQ entry is run though a regexp 1000 lines down and it turns it into a DMA entry"
"Uh right, hard drive driver?"
"Nope, the file system information is imported, so that we can grep it for packed binary data, if any exists"
"SCSI card?"
"Nope"
"`Ford, you're turning into a penguin. Stop it.'" -THHGTTG
seek topost (thatflamebait);
Firstpost (the thread, fast);
while ($natalie) {
petrifies $to($stone);
not grits;
}
accept the, moderation;
seek the, $-1Troll, $-1offtopic'
and wait;
stat thekarma;
unlink and listen (for, $theflames);
for (a, karmawhore our /.) {
system ("is trollheaven");
.
Take all good things in moderation, including moderation.
$man{"from"}=qw(Nantucket);
...
-L
This coming from someone who says that they have written complex sh scripts, and, wait... get this... they work. Priceless.
I'd rather write any amount of sh than perl. When I need more than what's comfortable to do in sh, I call out to awk or sed, or write a C program.
If you knew how to use perl effectively, you wouldn't need to 'call out' to awk or sed. And writing a C program for something that you'd use sh for in the first place is pounding in a tack with a sledgehammer.
The single thing I probably hate most about perl, though, is that stupid "default variable" (called $_ or something like that... I forget).
Then quit your bitching and don't use it. Perl doesn't require you to use it. In fact, I didn't use it at all when I first started learning. Then a light bulb went on, and everything got much easier and made much more sense. Don't say something's 'stupid' because you lack the power to understand it.
Some perl bulitins operate only on $_
I'd like a few examples here.
others do so only if you don't specify otherwise
leading to ugly code that is impossible for anyone not already perl-literate to understand
You have a point there. I forgot how you can't understand a language you don't understand. Don't you get it? Was sh easy for you to understand before you learned it? Was C?
And don't even ask me about the six different ways of writing an "if" statement...
You're free to use only the ones that your simple mind can comprehend.
If you don't like Perl, don't use it. No one's twisting your arm. Take your sandpaper, go back to your desk, and write some shell scripts. Those of us who take the time to learn Perl will accomplish the task at hand much faster.
This could actually be quite useful - Bourne scripting is unbearable for anything but the most rudimentary scripts.
I purchased two RF switchable power sockets. The kit comes with what looks like a clapper and a key-chain controller (like that for your car). Cracked the case of the controller and ran it into a serial controller card, but you could probably accomplish the same feat if you can program serial ports. Then I just used perl to launch my shell script that, for all intents and purposes, pushed the on or off button on the controller and turned on the lights. To answer your next question in advance, NO I WILL NOT GIVE YOU THE URL (The /. effect on my household lights would land me a spot on the couch tonight).