Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

That rewrite feeling...

by strredwolf (Chaplain)
on Jan 18, 2007 at 18:56 UTC ( [id://595312]=perlmeditation: print w/replies, xml ) Need Help??

Has anyone ever had the feeling that they should tackle something strange...

Like... writing an entire TCP/IP stack in pure Perl?

--
$Stalag99{"URL"}="http://stalag99.net";

Replies are listed 'Best First'.
Re: That rewrite feeling...
by ww (Archbishop) on Jan 18, 2007 at 20:24 UTC

    No, I'm way too busy rewriting the OS2 kernel in pure Basic-80...

    ... and has anyone seen my white formal jacket with the sleeves that tie in the back?

    :-)

    But, (I think this is more than just a joke), there are those who are reputedly trying to do a complete OS in Perl.

Re: That rewrite feeling...
by samtregar (Abbot) on Jan 18, 2007 at 20:32 UTC
    Yes. Inline::Guile is a fine example. I think someone actually found it useful, but it certainly wasn't me.

    Just make sure you really don't have something more productive you should be doing and have at it!

    -sam

      Heh, I'm actually using it, if nobody else is. I use it for my IRC bot to execute guile. I'm not sure that really qualifies as *useful* but it is entertaining.
Re: That rewrite feeling...
by Zaxo (Archbishop) on Jan 19, 2007 at 06:23 UTC

    I once took a shot at writing a user-side linux device driver in perl. It was heavy on bit twiddling, and was the only time I ever called ioctl. Some of it worked, but it foundered on unpacking long long's in a 32-bit perl.

    The device was perfctr. I'd have done better to access the C lib, but I wanted to see how far I could get with pure perl. Some pieces of that projuct are posted here.

    After Compline,
    Zaxo

Re: That rewrite feeling...
by almut (Canon) on Jan 18, 2007 at 20:14 UTC
    Yes, I must admit I have, at times, felt the weird urge to reinvent Xlib (client-side X11 protocol) as a lightweight, pure Perl module (I know that there's X11::Protocol, but I'm dreaming of something significantly leaner...).

    But up to now, I've managed to keep the urge under control... ;)

      Please, let that urge out. The startup time of X11::Protocol is killing me on slow machines.
Re: That rewrite feeling...
by rinceWind (Monsignor) on Jan 19, 2007 at 10:24 UTC
    Has anyone ever had the feeling that they should tackle something strange...

    Several times, over a pint of beer at London.pm meetings. This is, to my mind, one of the interesting side effects of Perl Monger socials.

    This is the origin of Acme::Magpie and probably a few other modules in the Acme:: namespace.

    I remember some discussion sbout putting together a gnu style operating system on top of Parrot.

    Back to your original question, in my case, a version control system in pure Perl. Granted, this was before CL released SVK.

    --

    Oh Lord, won’t you burn me a Knoppix CD ?
    My friends all rate Windows, I must disagree.
    Your powers of persuasion will set them all free,
    So oh Lord, won’t you burn me a Knoppix CD ?
    (Missquoting Janis Joplin)

Re: That rewrite feeling...
by syphilis (Archbishop) on Jan 19, 2007 at 08:02 UTC
    Has anyone ever had the feeling that they should tackle something strange...

    Yep !

    Like... writing an entire TCP/IP stack in pure Perl?

    Nup !

    I must admit that I once felt fairly smug about having written XS code that could out-perform Math::BigInt ... but then I looked at GMP and PARI (even OpenSSL), and the modules that wrap them ... and no longer felt so smug :-)

    Cheers,
    Rob
Re: That rewrite feeling...
by apotheon (Deacon) on Jan 20, 2007 at 08:39 UTC

    I know a guy who once completely replaced the init system on his Linux box with a custom system written in Perl.

    I made serious headway into recreating the complete set of standard unix core utilities (excepting C compiler, et alii) in Perl, but ultimately gave that up as a goal because I discovered I actually want to complete that task in OCaml -- including, eventually, an OCaml compiler. First, I've got to learn more Ocaml, though. I'm not even at a level of mediocre competence in that language yet.

    I'm currently looking at the possibility of using Perl to write interpreters for other languages -- such as Logo -- in Perl such that I can upload the interpreter to the cgi-bin of shared hosting accounts. This, of course, would be for the purpose of using some rather edge-case languages for web development, mostly for the perverse joy of it.

    Maybe someday I'll use Perl to write a binary compiler for Perl. I sincerely doubt it, though.

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    CopyWrite Chad Perrin

      I made serious headway into recreating the complete set of standard unix core utilities (excepting C compiler, et alii) in Perl,

      Sounds much like the Unix Reconstruction Project. Last time I looked, I had the impression that the project was sleeping, and a random look in some of the code revealed stuff like ad hoc handling of cmd line switches, whereas one would reasonably use some Getopt::* module nowadays. I wanted to check just to be sure not to shout utter nonsense but the site seems unreachable today...

        I seem to recall seeing something similar at the URP, and it seems down today for me too. It's unfortunate to hear about the ad hock option handling.

        I didn't know about the URP when I first started work on the Perl reconstruction of core utilities, else I might have just contributed to that (or at least investigated whether contributing was something I wanted to do), but it's kind of a moot point now since I changed my focus from Perl to OCaml for that purpose.

        print substr("Just another Perl hacker", 0, -2);
        - apotheon
        CopyWrite Chad Perrin

Re: That rewrite feeling...
by tsee (Curate) on Jan 19, 2007 at 14:10 UTC

    I hear you! This is what made me write Math::Symbolic and the transformation add ons.

    Steffen

      hi, I wonder if you know about Form by Jos Vermaseren (took lots of ideas from Schoonschip by M. Veltman. As you do physics my guess if that you might know about it. If not have a look at it, some of the ideas might be useful (freezing expressions left over after taking out some factors to work on them independently -- special "combining" substitutions that add an arg to a function
      Id, x^any * f(x1,...)= f (poly(x), x1,...), poly(x) = full polynomial in x of all terms having f's
      useful for integ.

      cheers --stephan

        Hi Stephan,

        I haven't looked at Form before. I seem to recall the name from somewhere, but I might be mistaken. Perhaps it's that the theoretical physicists I know use Mathematica almost exclusively.

        Thanks for the pointer!

        Steffen

Re: That rewrite feeling...
by sgt (Deacon) on Jan 19, 2007 at 09:29 UTC

    Yes...all the time actually. ksh in perl. some symbolic manipulation stuff. strictly speaking most of the things I think about would need some special support, so do not qualify as "rewrites".

    cheers --stephan
      Yes...all the time actually. ksh in perl.

      BTW: are you aware of the projects mentioned in perldoc -q 'Perl shell'?

Re: That rewrite feeling...
by starX (Chaplain) on Jan 19, 2007 at 19:51 UTC
    I'm not sure it's of the same caliber and complexity as a TCP/IP stack, but I have recently started poking around an old project of mine as some people I work with have expressed interest in a completed working version, and I've been looking at a Perl implementation.

    I really wish I knew more about Perl/C compatibility back in the day when I was initially working on this, it would have made parsing the cue sheet files a lot easier, but apart from that I've been looking into some different methods for using Perl to play the audio itself in a cross platform way. Drawing a GUI for the Windows folks might also come in handy.

    I know it's probably nothing especially hard, it's just more time consuming than I have time for at this moment. Story of my life, really :)

Re: That rewrite feeling...
by Anonymous Monk on Jan 20, 2007 at 01:44 UTC
    Sure, I wrote an X Window Manager in perl :)
Re: That rewrite feeling...
by jkva (Chaplain) on Jan 23, 2007 at 12:15 UTC
    If I had the time and knowledge, I would like to port Perl to the PalmOS.
    However, I lack in both. Nice thread!
Re: That rewrite feeling...
by fglock (Vicar) on Jan 23, 2007 at 16:00 UTC

    yes - I guess all my cpan modules started with that feeling :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://595312]
Approved by Corion
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-19 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found