hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

Matz Just Sent Me a Ruby Script From 2009 #

by why in inspect

It suddenly toppled through this DRb port I just opened! An Object with an @author, @timestamp and @message. I can’t verify the authenticity. The message is:

  Tumblemail -> ActiveRecord Base
    belongs to: User
    has: content -> Link (or) Quote (or) IRC Log (or) Flickr Photo
    has: Recipient(s)

    validates presence of: User ID, Creation Time 
          and format of: Reply To with: /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/
          also, uniqueness and existence of: URL

    ::find popular -> |n = 10|
    <- find: all,
            order by: Replies,
            limit: 0, 10

    .check status
      ? .sent (and) .finished <- "Finished" 
      ? .sent                 <- "Sending" 
      ? .ready                <- "Still in draft" 
      ;; 
    ;;

    .friendly replies
    <- replies.sender.every.friendly?

    .percentage who replied
    <- * 100 <- replies.count / sent.to_f

    .inspect
    <- #<Tumblemail:#<Message Id>>
  ;;

He also sent a short follow-up: “Everything is a class.” Which scared the bejesus out of me and I freaked out and ran straight into the wall of my sock closet.

said on 04 Nov 2005 at 13:11

Hurry, evasive maneuvers from SkyNet resistance, human-coded in an uncrackable aesthetic: copy them quickly!

_why, you must bear that child. He’s.. he’s Matz.

said on 04 Nov 2005 at 14:01

What… what does it all MEAN ?!

said on 04 Nov 2005 at 14:36

Where did Tumblemail come from? I only ask because I started writing a ruby app yesterday called Tumblemail! Spooky

said on 04 Nov 2005 at 14:44

I’m really pleased to see that regexps survive in Ruby4.

said on 04 Nov 2005 at 14:54

Raskelltalk. I’ve seen it myself too, One just needs to set their clock to the future, count to ten in random order, and then start reading SICP backwards and from a mirror, you mail box should contain a message if done correctly. Take that and run it through a Triple-DES cipher using “flux-capacitator” as the key (zero padded). The resulting message should be xor’ed against itself. Now run it with the latest ruby from cvs. The error message it spits out should be identical to what why gave.

said on 04 Nov 2005 at 15:00

This is starting to take on a suspiciously OCamlly flavor… which is a good thing… apart from those double semicolons. shudder

said on 04 Nov 2005 at 15:08

No, methinks this is Absinthe! The apocolypse will be in 2009, then.

said on 04 Nov 2005 at 15:15

I have to say, this looks appealing, except for ;;, which was my least favorite part of OCaml.

said on 04 Nov 2005 at 16:48

Maybe by then I’ll dig the gratuitous syntactic changes like Tumblemail → ActiveRecord Base vs. Tumblemail < ActiveRecord::Base.

Of course, has: Recipient(s) is cool.

said on 04 Nov 2005 at 20:52

I don’t like that at all.

said on 04 Nov 2005 at 23:01

Ah, come on, dude. Code in 2009 still having to conform to measly nineteenth century ASCII code? GIVE US UNICODE DAMMIT !

->? WTF ? I want a real Unicode arrow symbol. Maybe a biohazard symbol for dangerous methods. But then Ruby in 2009 has colons, double colons, semicolons? Argh, nasty.

said on 05 Nov 2005 at 00:31

“Everything is a class.”

Matz must have/will changed/change his mind about prototype languages. I thought he said they were too confusing at RubyConf 05.

said on 05 Nov 2005 at 00:50

Pick a syntax and stick with it!... climbs back into his hole

said on 05 Nov 2005 at 01:31

No, give us macros so we can each choose our own syntax and stick with it! (for a day or two at least)

I don’t want arrows, I think the %^\ is underused and >,< has been neglected.

That’s it! The name for this new language: Babel

said on 05 Nov 2005 at 08:05

Well, I like it.

said on 05 Nov 2005 at 08:10

Oh, and that’s 2006, right, not 2009?

said on 05 Nov 2005 at 09:27

RE: Raskelltalk: So you have payloads of your own from the future??

Carlos: That biohazard idea is awesome. Maybe if you post that idea on Ruby-Talk, we’ll see the code sample above change before our very eyes.

said on 05 Nov 2005 at 11:27

This looks suspiciously like YAML to me.

said on 05 Nov 2005 at 17:13

Carlos: I amen you in buckets.

But don’t stop with biohazard sigils…

character unicode function
U+2704 WHITE SCISSORS comment
U+270C VICTORY HAND unit test passed! dag!
U+2706 TELEPHONE LOCATION SIGN call me.
U+2744 SNOWFLAKE dude, that method was cold
U+2798 HEAVY SOUTH EAST ARROW pretty private
U+2799 HEAVY RIGHTWARDS ARROW private
U+279A HEAVY NORTH EAST ARROW have to shoot you if we tell you, it’s so private.

It’s just a matter of time.

said on 05 Nov 2005 at 17:53

we must send a cyborg through the time vortex to stop this insanity

said on 05 Nov 2005 at 18:04

but i confess, i like it. add some syntax highlighting! spiced up

my god, there is a pattern there somewhere. my chronoarchaelogical decyphering thus far: ? == if <- == return -> == block…or is that a method? :: == class method? . == def or method invocation? or both

said on 05 Nov 2005 at 18:42

No, there’s no pattern to that madness. Instead of an interpreter, they hire a staff of translators who, over the Internet, in real time, transcribe your code into what they think is the corresponding set of instructions.

said on 06 Nov 2005 at 11:52

No, I believe that a special sitting of the UN deliberates over the specifics of each execution. The burning question remains unanswered: Not if…WHEN will we need to call in the special squadron of starmonkeys.

said on 06 Nov 2005 at 12:12

With all honesty, that’s really ugly. So really what you’re saying is that ruby in 2009 won’t be ruby, right? Is this like a Perl 6 thing?

said on 06 Nov 2005 at 12:28

Heh. Once we get ‘Unicode keyboards’...

said on 06 Nov 2005 at 12:57

Actually, this looks like our plans for Perl7 set to release in 2009. We’re still optimistic that Perl6 will be ready by 11:59 on December 31, 2008.

said on 06 Nov 2005 at 13:20

p@, it’s already time! DrScheme allows your symbols to be real images, and handles inserting λ and → (lambda and arrow) for you.

said on 06 Nov 2005 at 14:07
Tumblemail -> ActiveRecord Base

Can someone explain why inheritance is now back to front?

Inheritance makes so much more sense as it is at the moment with the < pointing in the other direction…

And similarly, so much of this is so much more readable, but the @;;@s … ew.

said on 06 Nov 2005 at 17:50

that is because → is a message sent to Tumblemail to create a subclass. Maybe in a monad.

said on 06 Nov 2005 at 20:38

In UML diagrams, the arrow always points towards the superclass. It’s always confused me in languages like Ruby where the arrow points the wrong way.

said on 06 Nov 2005 at 23:19

Let’s just hope that by 2009 we’re not using naive Regex’s like that to validate email addresses.

said on 07 Nov 2005 at 10:30

the → operator is reminicent of UML generalization: subclass—|> superclass

where—|> is a solid arrow..

said on 07 Nov 2005 at 11:01

Wow, this is a unicode-a-palooza! ☺☻

said on 08 Nov 2005 at 09:19

I don’t care if → is UML . I code in Ruby, not UML . I’m not one of those MDA , UML to code generation guys.

said on 14 Nov 2005 at 20:01

the ;; makes me want to cry

said on 15 Nov 2005 at 15:42

Oh lord that’s terrible. I hope he was just really drunk when he sent that. :|

said on 17 Nov 2005 at 00:24

That is ridiculously confusing. So much for Ruby being a human-readable language.

Surely this is fake, right?

said on 28 Nov 2005 at 09:06

wow. very cool. so no more space delimiters. looks like everything is delimited by keyword, symbol or EOL . so you can have spaces in your names.

some guess work:
class/object Declaration:
    myclass
    myclass -> superclass

method invocation:
    some method: arg1, arg2

class method declaration:
    ::some method -> |param1, param2|
        # method body here
    ;;

method declaration:
    .some method -> |param1, param2|
        # method body here
    ;; 

switch statement:
    ? x == 3 <- "one result" 
    ? x > 2 <- "another result" 
    ;;

Comments are closed for this entry.