Wizard quiz

It still sounds very interesting.

James Edward Gray II

···

On Nov 29, 2005, at 10:32 PM, David Balmain wrote:

On 11/29/05, James Edward Gray II <james@grayproductions.net> wrote:

On Nov 29, 2005, at 8:15 AM, David Balmain wrote:

On 11/29/05, James Edward Gray II <james@grayproductions.net> wrote:

On Nov 29, 2005, at 1:12 AM, Leslie Viljoen wrote:

The real challenge will be the parser - in fact, that might be a
good quiz too.

I've been considering this for a quiz. I'm currently in the process
of solving it myself, to prove it's not too much work. My free time
is scarce currently though, so if you beat me to a solution mail it
to me, along with a count of how many hours it took to build...

James Edward Gray II

Parsing English is what I wrote my thesis on at university. I wonder
if a general purpose English tokenizing and parsing library would be
of any use to anyone. I'm thinking of taking it up again.

I would LOVE to see a pure Ruby library for something like this. I
can't imagine it wouldn't get used.

Unfortunately I think I'd have to do it in C. My linguistic skills
aren't good enough to take a purely grammatical approach. I'd need to
take a learning approach. The parser I wrote at university took 72
hours to process the input corpus which it learned all the rules from.
I'd hate to think how long this would take in pure ruby. Writing this
as a ruby extension would be the way to go. For me at least anyway.

Hi --

I've checked lambdas and I think it's not possible also to pass more than one proc as parameter to a method also? I used hash instead

You can pass any number of them as normal params:

   def block_test(b1,b2)
     b1.call
     b2.call
   end

   b1 = lambda { puts "one" }
   b2 = lambda { puts "two" }

   block_test(b1,b2)

   => one
       two

David

···

On Wed, 30 Nov 2005, Niyazi Toytok wrote:

--
David A. Black
dblack@wobblini.net

I have countless uses for such a parser, I'm sure many other do too!
Very interesting project, keep us informed.

Jacob

···

On 11/29/05, James Edward Gray II <james@grayproductions.net> wrote:

On Nov 29, 2005, at 10:32 PM, David Balmain wrote:

> On 11/29/05, James Edward Gray II <james@grayproductions.net> wrote:
>> On Nov 29, 2005, at 8:15 AM, David Balmain wrote:
>>
>>> On 11/29/05, James Edward Gray II <james@grayproductions.net> wrote:
>>>> On Nov 29, 2005, at 1:12 AM, Leslie Viljoen wrote:
>>>>
>>>>> The real challenge will be the parser - in fact, that might be a
>>>>> good quiz too.
>>>>
>>>> I've been considering this for a quiz. I'm currently in the
>>>> process
>>>> of solving it myself, to prove it's not too much work. My free
>>>> time
>>>> is scarce currently though, so if you beat me to a solution mail it
>>>> to me, along with a count of how many hours it took to build...
>>>>
>>>> James Edward Gray II
>>>
>>> Parsing English is what I wrote my thesis on at university. I wonder
>>> if a general purpose English tokenizing and parsing library would be
>>> of any use to anyone. I'm thinking of taking it up again.
>>
>> I would LOVE to see a pure Ruby library for something like this. I
>> can't imagine it wouldn't get used.
>
> Unfortunately I think I'd have to do it in C. My linguistic skills
> aren't good enough to take a purely grammatical approach. I'd need to
> take a learning approach. The parser I wrote at university took 72
> hours to process the input corpus which it learned all the rules from.
> I'd hate to think how long this would take in pure ruby. Writing this
> as a ruby extension would be the way to go. For me at least anyway.

It still sounds very interesting.

James Edward Gray II

I was putting & sign before parameters. that's why I thought it does not work. thank you

···

----- Original Message ----- From: "David A. Black" <dblack@wobblini.net>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Wednesday, November 30, 2005 5:14 AM
Subject: Re: blocks

Hi --

On Wed, 30 Nov 2005, Niyazi Toytok wrote:

I've checked lambdas and I think it's not possible also to pass more than one proc as parameter to a method also? I used hash instead

You can pass any number of them as normal params:

  def block_test(b1,b2)
    b1.call
    b2.call
  end

  b1 = lambda { puts "one" }
  b2 = lambda { puts "two" }

  block_test(b1,b2)

  => one
      two

David

--
David A. Black
dblack@wobblini.net

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.9/185 - Release Date: 28.11.2005