My brother recently lent me a fascinating book, called "Breaking the Time Barrier", by Jenny Randles.

In the chapter on Wormholes, she describes a futuristic, potential scenario for creating a time machine based on a wormhole in space:

First stabilize the wormhole. Then tow one mouth of the wormhole through deep space so that it comes very close to a dense object such as a neutron star. The star's enormous gravity well would then produce massive distortions in space-time and eventually open up a time tunnel. The gravity forces involved would cause a discrepancy between the time experienced by the mouth of the wormhole next to the star and the exit mouth left elsewhere far away from the gravity well. After generating a time difference between the two ends of the wormhole (which could take you backward for any number of days, weeks, months, or years depending upon how long you left it next to the neutron star) the wormhole mouth can be towed away. Parked wherever you needed to use it--perhaps near the moon to make it easily accessible from Earth--you would now have a reusable time machine with a set period of time transfer involved.

Now of course this chapter, like most of the rest of the book, is highly theoretical, and not to be taken as a literal suggestion for immediate implementation!  But, as I read this section of the book, it occurred to me what she is talking about is very much in essence a sort of physical world "closure" on a cosmic scale!

Perl's closures operate on the principle that you can use lexical variables which, though they go out of scope at the end of the enclosing block or subroutine, continue to keep the state of the lexical variables "alive" ("deeply bound") afterwards.

In the wormhole example, the lexical variable is analogous to the time difference between the two ends of the wormhole, the act of moving the mouth of the wormhole towards a neutron star is analogous to the closure which creates an anonymous subroutine, and the anonymous subroutine is the wormhole itself:

sub create_time_machine { my $time_duration = shift; my $wormhole = sub { # (Creation of wormhole is left as an exercise :-) # ... }; # Here, implement the following pseudocode: # Tow wormhole close enough to the neutron # star, and for a long enough period, to # fix its duration at $time_duration years... return $wormhole; } # Now create time machine with desired time period my $p = create_time_machine(1_000); # eg. 1,000 years

It seems to me both fascinating and humorous that principles in Perl can extend, by analogy, to theories about wormholes and time-travel.

Update:  fixed spelling mistakes (much appreciated, ysth)


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re: On Wormholes, Time-Travel and Closures
by davido (Cardinal) on Dec 11, 2006 at 06:25 UTC

    Let's hope the reference count on our universe never drops to zero. Universal garbage collection sounds detrimental to humanity. ;)


    Dave

      That made me wish I could find an old quote I saved. Something like "But I'm worried about the efficiency of this, especially during global destruction."

      - tye        

      Well, as long as we're observing the universe, that'd be OK.

      And we could find out if the universe is holding a reference to each of it's observers1 by getting everyone to ignore someone and see if they disappear.

      1 - because then we'll have a ref loop and the universe won't disappear if everyone completely ignores everybody else. Which would be nice.

      Update: the "not disappearing" would be nice. Not the "ignoring everybody".

        ...everyone completely ignores everybody else....

                    That sounds vaguely antisocial!

      Hi davido,

      I think that there are only some local garbage collections implemented.

      An Universal Garbage collection will be implemented somewhere in the future. Let's hope that in a compatible version of Universe.

      TheMage
      Talking Web
Re: On Wormholes, Time-Travel and Closures
by Limbic~Region (Chancellor) on Dec 11, 2006 at 13:36 UTC
    liverpole,
    Continuations, coroutines, callbacks, and closures - Oh my. Yes, it is very interesting how the state of the universe can be wrapped up in a neat little package. What is more interesting to me, is faster than light communication via quantum entanglement. I see articles every now and then about entanglement experiments but I am not holding my breath.

    What would be nice is quantum entanglement for programming. I have often wanted "spooky action at a distance" when modifying a variable. Yes, I know tie can likely give me all that and a bag of chips but it doesn't feel quite as magical. It is more like lazy evaluation.

    my $blind_mice; my $answer = $blind_mice * 14; $blind_mice = 3; print $answer; # 42 of course

    Cheers - L~R

      What is more interesting to me, is faster than light communication via quantum entanglement. I see articles every now and then about entanglement experiments but I am not holding my breath.

      Unfortunately, the No-communication theorem shows that you can't use entagled quantum particles to communicate information.


      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

        hardburn,
        Well, technically it shows a set of conditions in which failed local realism doesn't lead to faster than speed of light communication. Taking it further, it shows that it would statistically be impossible to differentiate changes to state as intentional communication or side-effects of observation itself. This seems to imply that you might be able to communicate this way but it would definately be unreliable.

        To be honest, I don't think we have scratched the surface on understanding this stuff and hence - not holding my breath.

        Cheers - L~R

      yikes, hope i never have to maintain code like that. it's hard enough tracing what happens, with that i'll have to enumerate and trace all possible futures as well

      spooky action indeed!


      It's not what you look like, when you're doin' what you’re doin'.
      It's what you’re doin' when you’re doin' what you look like you’re doin'!
           - Charles Wright & the Watts 103rd Street Rhythm Band, Express yourself
        qbxk,
        No offense, but this likely has to do with your lack of exposure to pure functional languages. In some languages, variables can't change value so it is moot. It does kind of make you wonder why they still call them variables. In other languages, you need to desginate this behavior (default being eager) which is a visual indicator like tie.

        We are of course talking about Perl, not other languages, so your point is well taken. Re: Evaluating variables when called is an example of such a desire. I am kind of interested in where Perl 6 will go with this.

        Cheers - L~R

Re: On Wormholes, Time-Travel and Closures
by Gavin (Archbishop) on Dec 11, 2006 at 17:32 UTC
    And here's me just getting to grips with
    Reg expressions!!
Re: On Wormholes, Time-Travel and Closures
by wulvrine (Friar) on Dec 12, 2006 at 12:32 UTC
    Interesting theory there liverpole!
    So, taking it a wee bit further, you could suggest that the universe is nothing more than a really well written perl obfu, in which the writer has purposefully broken the -MO=Deparse function!
    I knew all your code was going somewhere, now I'm getting the bigger picture (insert conspiracy music here).

    s&&VALKYRIE &&& print $_^q|!4 =+;' *|
Re: On Wormholes, Time-Travel and Closures
by Anonymous Monk on Dec 12, 2006 at 00:27 UTC
    It looks as though the create_time_machine function does/did/will not work as we would have seen a working version by now (or by then?) - written by someone in the future no less. errr ... that is, if we can update archives ... Of course, I may be wrong to assume so much in so little time. Now I've done it - I'm getting a headache ... - Laz. insert fancy, cryptic, awesome perl-one liner here ...