[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: [QUIZ] HighLine (#29

Ryan Leavengood

4/22/2005 3:57:00 PM

James Edward Gray II wrote:
> On Apr 22, 2005, at 9:24 AM, Francis Hwang wrote:
>
>> Hi,
>>
>> Not that this necessarily mitigates the educational value of this
>> Quiz, but: EasyPrompt sort of does what you're saying below.
>>
>> http://easyprompt.ruby...
>
>
> Thanks for the link. I wasn't aware of this project. I like it.

Given the existence of this library, do we still want to proceed with this
Quiz? :)

I suppose it will be worth it simply because we will see various
implementations and APIs for this concept, even if we are duplicating
EasyPrompt.

But sometimes I think programmers have too much of a penchant for
continually re-inventing the wheel...

Ryan Leavengood


8 Answers

Dave Burt

4/22/2005 4:40:00 PM

0

"Ryan Leavengood" <mrcode@netrox.net> asked:
>> On Apr 22, 2005, at 9:24 AM, Francis Hwang wrote:
>>> Not that this necessarily mitigates the educational value of this
>>> Quiz, but: EasyPrompt sort of does what you're saying below.
>>>
>>> http://easyprompt.ruby...
>
> Given the existence of this library, do we still want to proceed with this
> Quiz? :)
>
> ... sometimes I think programmers have too much of a penchant for
> continually re-inventing the wheel...

I think it's a good one for any newbies out there to have a shot at.
Reinventing wheels is a good thing to do for the purpose of learning to
program.

Maybe others of us might look at how EasyPrompt might be extended.

Cheers,
Dave


Ryan Leavengood

4/22/2005 5:20:00 PM

0

Dave Burt wrote:
> "Ryan Leavengood" <mrcode@netrox.net> asked:
>
>>... sometimes I think programmers have too much of a penchant for
>>continually re-inventing the wheel...
>
> I think it's a good one for any newbies out there to have a shot at.
> Reinventing wheels is a good thing to do for the purpose of learning to
> program.
>
> Maybe others of us might look at how EasyPrompt might be extended.

Yeah I agree this quiz has potential for both newbies and more experienced
Rubyists. I will certainly try my hand in it. But I have a rule about not
reading code or APIs for other projects similar to something I'm solving,
so as not to taint my own problem-solving and API design. So I probably
won't look at EasyPrompt until I've written up my quiz solution...

Ryan


Francis Hwang

4/22/2005 11:40:00 PM

0


On Apr 22, 2005, at 12:43 PM, James Edward Gray II wrote:

> On Apr 22, 2005, at 10:56 AM, Ryan Leavengood wrote:
>> I suppose it will be worth it simply because we will see various
>> implementations and APIs for this concept, even if we are duplicating
>> EasyPrompt.
>
> I wouldn't declare EasyPrompt robust. Did you glance at the API?
> It's well... Easy. :) I'm confident I can add features to it in
> under an hour. It's not even capable of some of the ideas I'm tossing
> around in the quiz.
>
> What it did do for me, was give me more ideas. Have yourself a look,
> then think bigger... :)

Agreed. EasyPrompt is a pretty quick little thing; I just released it
'cause I wrote it once, then needed it again in another piece of code.
The only mildly difficult thing in it is the MockCommandLineUser.
Mostly I was just pointing it out as an informational aside.

But if people want me to add specific things, by all means let me know!

Francis Hwang
http://f...



Hal E. Fulton

4/22/2005 11:43:00 PM

0

Francis Hwang wrote:
>
> On Apr 22, 2005, at 12:43 PM, James Edward Gray II wrote:
>
>> On Apr 22, 2005, at 10:56 AM, Ryan Leavengood wrote:
>>
>>> I suppose it will be worth it simply because we will see various
>>> implementations and APIs for this concept, even if we are duplicating
>>> EasyPrompt.
>>
>>
>> I wouldn't declare EasyPrompt robust. Did you glance at the API?
>> It's well... Easy. :) I'm confident I can add features to it in
>> under an hour. It's not even capable of some of the ideas I'm tossing
>> around in the quiz.
>>
>> What it did do for me, was give me more ideas. Have yourself a look,
>> then think bigger... :)
>
>
> Agreed. EasyPrompt is a pretty quick little thing; I just released it
> 'cause I wrote it once, then needed it again in another piece of code.
> The only mildly difficult thing in it is the MockCommandLineUser. Mostly
> I was just pointing it out as an informational aside.
>
> But if people want me to add specific things, by all means let me know!

Intra-line editing?
History via (or a la) Readline?
ANSI Colors?


Hal
(who secretly misses the good old days of command lines)




Mark Hubbart

4/23/2005 12:16:00 AM

0

On 4/22/05, Hal Fulton <hal9000@hypermetrics.com> wrote:
> Francis Hwang wrote:
> >
> > On Apr 22, 2005, at 12:43 PM, James Edward Gray II wrote:
> >
> >> On Apr 22, 2005, at 10:56 AM, Ryan Leavengood wrote:
> >>
> >>> I suppose it will be worth it simply because we will see various
> >>> implementations and APIs for this concept, even if we are duplicating
> >>> EasyPrompt.
> >>
> >>
> >> I wouldn't declare EasyPrompt robust. Did you glance at the API?
> >> It's well... Easy. :) I'm confident I can add features to it in
> >> under an hour. It's not even capable of some of the ideas I'm tossing
> >> around in the quiz.
> >>
> >> What it did do for me, was give me more ideas. Have yourself a look,
> >> then think bigger... :)
> >
> >
> > Agreed. EasyPrompt is a pretty quick little thing; I just released it
> > 'cause I wrote it once, then needed it again in another piece of code.
> > The only mildly difficult thing in it is the MockCommandLineUser. Mostly
> > I was just pointing it out as an informational aside.
> >
> > But if people want me to add specific things, by all means let me know!
>
> Intra-line editing?
> History via (or a la) Readline?
> ANSI Colors?

Maybe eventually a readline replacement :) no more libreadline required!

> Hal
> (who secretly misses the good old days of command lines)

Mark
(who learned to like the command line when he learned it wasn't always DOS)



Francis Hwang

4/23/2005 2:19:00 PM

0


On Apr 22, 2005, at 8:15 PM, Mark Hubbart wrote:

> On 4/22/05, Hal Fulton <hal9000@hypermetrics.com> wrote:
>> Intra-line editing?
>> History via (or a la) Readline?
>> ANSI Colors?
>
> Maybe eventually a readline replacement :) no more libreadline
> required!

Well, maybe I need to backpedal a bit and say "if people have specific
things they'd like me to add that wouldn't require me to drop my other
15 projects, let me know."

Though the idea of replacing readline is intriguing ... Would the main
benefit of that be just getting away from an external lib dependency
that could make distribution harder? (And if so, I wonder if there are
any plans for RubyGems or RPA to interface with other
package-management systems so installing a Ruby lib based on a non-Ruby
lib could be easier.)

Francis Hwang
http://f...



Hal E. Fulton

4/23/2005 10:33:00 PM

0

Francis Hwang wrote:
>
> On Apr 22, 2005, at 8:15 PM, Mark Hubbart wrote:
>
>> On 4/22/05, Hal Fulton <hal9000@hypermetrics.com> wrote:
>>
>>> Intra-line editing?
>>> History via (or a la) Readline?
>>> ANSI Colors?
>>
>>
>> Maybe eventually a readline replacement :) no more libreadline required!
>
>
> Well, maybe I need to backpedal a bit and say "if people have specific
> things they'd like me to add that wouldn't require me to drop my other
> 15 projects, let me know."

Haha... I wasn't really calling your bluff, just dreaming.

> Though the idea of replacing readline is intriguing ... Would the main
> benefit of that be just getting away from an external lib dependency
> that could make distribution harder?

One possible benefit might be easy access to "completion" tricks --
write a completion routine in Ruby and just pass the name of it
or whatever.


Hal



Mark Hubbart

4/24/2005 7:11:00 PM

0

On 4/23/05, Francis Hwang <sera@fhwang.net> wrote:
>
> On Apr 22, 2005, at 8:15 PM, Mark Hubbart wrote:
>
> > On 4/22/05, Hal Fulton <hal9000@hypermetrics.com> wrote:
> >> Intra-line editing?
> >> History via (or a la) Readline?
> >> ANSI Colors?
> >
> > Maybe eventually a readline replacement :) no more libreadline
> > required!
>
> Well, maybe I need to backpedal a bit and say "if people have specific
> things they'd like me to add that wouldn't require me to drop my other
> 15 projects, let me know."

:) I wasn't trying to make more work for you. I was only half serious,
anyway. I know *I* don't have time right now to do this...

> Though the idea of replacing readline is intriguing ... Would the main
> benefit of that be just getting away from an external lib dependency
> that could make distribution harder?

On MacOSX, Apple doesn't ship libreadline due to licensing
restrictions, so there has never been readline support in Apple's
standard ruby install, which is very lame, and a source of endless
nuby problems. If I was starting a project to recreate readline, it
would be to convert one more of the default extensions to a more
comfortable license, making it easier for people to distribute.

cheers,
Mark