[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [RRR] Robert's Ruby Riddle: Methodical Digits

Sebastian Hungerecker

3/15/2008 3:33:00 PM

Robert Dober wrote:
> Take the hint, the solution is a short one, much less than the 132
> characters of the second solution.
>
> But maybe there are even more solutions than these two.

I don't know whether that's the solution you wanted, but it's short anyway:

> The following whitespace is intentional of course
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

ruby rrr02.rb '?*.to_s(base)' '?*.to_s'
Or if the base hadn't been set to two (or there at all):
ruby rrr02.rb '?*.to_s(?c-?a)' '?*.to_s'

--
Jabber: sepp2k@jabber.org
ICQ: 205544826

8 Answers

Robert Dober

3/15/2008 3:58:00 PM

0

On Sat, Mar 15, 2008 at 4:33 PM, Sebastian Hungerecker
<sepp2k@googlemail.com> wrote:
> Robert Dober wrote:
> > Take the hint, the solution is a short one, much less than the 132
> > characters of the second solution.
> >
> > But maybe there are even more solutions than these two.
>
> I don't know whether that's the solution you wanted, but it's short anyway:
>
>
> > The following whitespace is intentional of course
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> ruby rrr02.rb '?*.to_s(base)' '?*.to_s'
> Or if the base hadn't been set to two (or there at all):
> ruby rrr02.rb '?*.to_s(?c-?a)' '?*.to_s'
>
Did not think of this, very clever, you can really laugh at me, look what I did:

ruby rrr02.rb '"/".succ.succ + "/".succ + "/".succ.succ + "/".succ +
"/".succ.succ + "/".succ' '"/".succ.succ.succ.succ.succ +
"/".succ.succ.succ'

However what I wanted to show is the following...
SPOILER AHEAD:
















ruby rrr002.rb super 'super()'

underlining the different semantics of super and super().

Cheers
Robert
But you are aware that this is not the optimal solution, right?
The solution I was thinking about is the following:


> --
> Jabber: sepp2k@jabber.org
> ICQ: 205544826
>
>



--
http://ruby-smalltalk.blo...

---
Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein

Sebastian Hungerecker

3/15/2008 6:39:00 PM

0

Robert Dober wrote:
> The solution I was thinking about is the following:
> > =A0--
> > =A0Jabber: sepp2k@jabber.org
> > =A0ICQ: 205544826

Your solution was my signature?

=2D-=20
NP: 1349 - Chasing Dragons
Jabber: sepp2k@jabber.org
ICQ: 205544826

Robert Dober

3/15/2008 10:06:00 PM

0

On Sat, Mar 15, 2008 at 7:38 PM, Sebastian Hungerecker
<sepp2k@googlemail.com> wrote:
> Robert Dober wrote:
> > The solution I was thinking about is the following:
> > > --
> > > Jabber: sepp2k@jabber.org
> > > ICQ: 205544826
>
> Your solution was my signature?
What? you did not know ;)

I have no idea what went wrong, the messages shows fine from my side:

ruby rrr002.rb super 'super()'

Cheers
Robert
>
> --
> NP: 1349 - Chasing Dragons
>
>
> Jabber: sepp2k@jabber.org
> ICQ: 205544826
>
>



--
http://ruby-smalltalk.blo...

---
Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein

Todd Benson

3/15/2008 10:47:00 PM

0

On Sat, Mar 15, 2008 at 1:38 PM, Sebastian Hungerecker
<sepp2k@googlemail.com> wrote:
> Robert Dober wrote:
> > The solution I was thinking about is the following:
> > > --
> > > Jabber: sepp2k@jabber.org
> > > ICQ: 205544826
>
> Your solution was my signature?

That's funny. I screw up previous writings/pastings inside a post all
the time. This happens mostly when I save as a draft previously :)

Todd

Robert Dober

3/16/2008 12:45:00 PM

0

>
> That's funny. I screw up previous writings/pastings inside a post all
> the time. This happens mostly when I save as a draft previously :)
>
> Todd
>
>
Oh I would have no problem to admit that, as I have done before...
But this time the thread looks perfectly normal from my side, do you
see the same fragment that
Sebastian saw?

Cheers
Robert


--
http://ruby-smalltalk.blo...

---
Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein

Todd Benson

3/16/2008 8:55:00 PM

0

On Sun, Mar 16, 2008 at 7:45 AM, Robert Dober <robert.dober@gmail.com> wrote:
> >
> > That's funny. I screw up previous writings/pastings inside a post all
> > the time. This happens mostly when I save as a draft previously :)
> >
> > Todd
> >
> >
> Oh I would have no problem to admit that, as I have done before...
> But this time the thread looks perfectly normal from my side, do you
> see the same fragment that
> Sebastian saw?

At the end of your responding post, I see...

<quote>

Cheers
Robert
But you are aware that this is not the optimal solution, right?
The solution I was thinking about is the following:


> --
> Jabber: sepp2k@jabber.org
> ICQ: 205544826
>
>

</quote>

Todd

Robert Dober

3/16/2008 9:48:00 PM

0

On Sun, Mar 16, 2008 at 9:55 PM, Todd Benson <caduceass@gmail.com> wrote:
> On Sun, Mar 16, 2008 at 7:45 AM, Robert Dober <robert.dober@gmail.com> wrote:
> > >
> > > That's funny. I screw up previous writings/pastings inside a post all
> > > the time. This happens mostly when I save as a draft previously :)
> > >
> > > Todd
> > >
> > >
> > Oh I would have no problem to admit that, as I have done before...
> > But this time the thread looks perfectly normal from my side, do you
> > see the same fragment that
> > Sebastian saw?
>
> At the end of your responding post, I see...
>
> <quote>
>
>
> Cheers
> Robert
> But you are aware that this is not the optimal solution, right?
>
> The solution I was thinking about is the following:
>
>
> > --
> > Jabber: sepp2k@jabber.org
> > ICQ: 205544826
> >
> >
>
> </quote>
>
> Todd
>
>
Ok thanks; I have no such massage in the thread.
So the solution seems still unknown, here you go:

ruby rrr002.rb super 'super()'


Thx again Todd
Cheers
Robert


--
http://ruby-smalltalk.blo...

---
Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein

Todd Benson

3/16/2008 10:15:00 PM

0

On Sun, Mar 16, 2008 at 4:47 PM, Robert Dober <robert.dober@gmail.com> wrote:
> Ok thanks; I have no such massage in the thread.
> So the solution seems still unknown, here you go:
>
>
> ruby rrr002.rb super 'super()'
>
>
> Thx again Todd
>
>
> Cheers
> Robert

That part was there, too. It was the part after your signature that
made me think it was a cut and paste mishap. Hmm...

Todd