Author Topic: Chelsea Flower Show  (Read 3766 times)

Offline Diane CBPFC

  • .
  • Posts: 4538
Chelsea Flower Show
« on: September 20, 2021, 06:44:36 AM »
I watched the first program tonight, this is the first time Chelsea has had a fall flower show so it is quite exciting and colourful especially if you love dahlias. 

It got me wondering if Beau and Dennis were tasked to make a theme garden, what would they plant?

People will come from strange lands to hear me speak my words of wisdom. They will ask me the secret of life and I will tell them. Then maybe I'll finish off with a song. The Nomad

Offline Roger Kettle

  • Roger
  • *
  • Posts: 5008
  • Ho! Ho! £$%^&* Ho!
Re: Chelsea Flower Show
« Reply #1 on: September 20, 2021, 06:49:13 PM »
I seem to recall Egon having a garden ay one stage and attempting to grow something like lager.
On a personal note, this year we have failed to produce potatoes, artichokes and lettuce in our garden. This is similar to our crop failures of last year. We're on a roll!

Offline Diane CBPFC

  • .
  • Posts: 4538
Re: Chelsea Flower Show
« Reply #2 on: September 20, 2021, 07:50:06 PM »
I seem to recall Egon having a garden ay one stage and attempting to grow something like lager.
On a personal note, this year we have failed to produce potatoes, artichokes and lettuce in our garden. This is similar to our crop failures of last year. We're on a roll!

Maybe instead of fancy veggies you should have tried a native crop to your country such as haggis
People will come from strange lands to hear me speak my words of wisdom. They will ask me the secret of life and I will tell them. Then maybe I'll finish off with a song. The Nomad

Offline Tarquin Thunderthighs lll

  • .
  • Posts: 5847
  • They call me Tarqs... and other stuff.
Re: Chelsea Flower Show
« Reply #3 on: September 20, 2021, 09:01:21 PM »
Maybe instead of fancy veggies you should have tried a native crop to your country such as haggis

I'm afraid I must inform you that the humble Haggis is neither vegetable nor mineral, Diane, but wholly animal...

I apologise, in advance.

Offline Diane CBPFC

  • .
  • Posts: 4538
Re: Chelsea Flower Show
« Reply #4 on: September 20, 2021, 09:28:19 PM »
Maybe instead of fancy veggies you should have tried a native crop to your country such as haggis

I'm afraid I must inform you that the humble Haggis is neither vegetable nor mineral, Diane, but wholly animal...

Next you will be telling me that budgie seed doesn't grow budgies.
People will come from strange lands to hear me speak my words of wisdom. They will ask me the secret of life and I will tell them. Then maybe I'll finish off with a song. The Nomad

Offline Tarquin Thunderthighs lll

  • .
  • Posts: 5847
  • They call me Tarqs... and other stuff.
Re: Chelsea Flower Show
« Reply #5 on: September 20, 2021, 10:25:34 PM »
None of mine hatched. Sorry!
I apologise, in advance.

Offline Roger Kettle

  • Roger
  • *
  • Posts: 5008
  • Ho! Ho! £$%^&* Ho!
Re: Chelsea Flower Show
« Reply #6 on: September 21, 2021, 09:33:26 AM »
Superb cartoon, Tarks!

Offline Mince

  • .
  • Posts: 6978
  • Utter Waste of Time
Re: Chelsea Flower Show
« Reply #7 on: September 30, 2021, 10:36:06 PM »
This piece of programming that I wrote looks somewhat like a flower show.

return assemblies
   .SelectMany(
      x => x
      .GetTypes()
      .Where(t => t.Namespace != null && t.Namespace.Contains(".LCQ") && t.Name.StartsWith("LCQ"))
      .SelectMany(
         u => Enumerable
            .Range(0, (int)u.GetProperty("Count").GetValue(null))
            .Select(
               v => (
                        Title: (string)u.GetMethod("Title").Invoke(null, new object[] { v }),
                        QNo: v,
                        QType: u
                     )
            )
         .ToList()
      )
   )
   .ToDictionary(
      t => t.Title,
      t => (t.QType, t.QNo)
   );


I'm just gonna wait now for a "Great programming, Mince" from Roger.

Offline Roger Kettle

  • Roger
  • *
  • Posts: 5008
  • Ho! Ho! £$%^&* Ho!
Re: Chelsea Flower Show
« Reply #8 on: October 01, 2021, 09:29:35 AM »
Actually, it's pretty average.

Offline Mince

  • .
  • Posts: 6978
  • Utter Waste of Time
Re: Chelsea Flower Show
« Reply #9 on: October 01, 2021, 02:17:51 PM »
Is it because I used reflection to invoke the function in the classes? Should I have kept everything strongly typed? Have you managed to open the lid yet?

Offline Roger Kettle

  • Roger
  • *
  • Posts: 5008
  • Ho! Ho! £$%^&* Ho!
Re: Chelsea Flower Show
« Reply #10 on: October 01, 2021, 05:55:58 PM »
a)...Yes.
b)...Yes.
c)...No.

Offline Diane CBPFC

  • .
  • Posts: 4538
Re: Chelsea Flower Show
« Reply #11 on: October 02, 2021, 05:57:53 PM »
I'll show you what the text looks like in North America and you can see why I wasn't impressed. 
People will come from strange lands to hear me speak my words of wisdom. They will ask me the secret of life and I will tell them. Then maybe I'll finish off with a song. The Nomad

Offline Mince

  • .
  • Posts: 6978
  • Utter Waste of Time
Re: Chelsea Flower Show
« Reply #12 on: October 04, 2021, 04:08:48 PM »
It looks perfect to me.

Offline Diane CBPFC

  • .
  • Posts: 4538
Re: Chelsea Flower Show
« Reply #13 on: October 04, 2021, 04:37:10 PM »
It looks perfect to me.

What is it supposed to be? I put up an image of the code but instead of that showing as a photo attachment as what normally happens when you post an image, it was read and posted in text the same as it was in your earlier post. To me it looks like a mess without reason.
People will come from strange lands to hear me speak my words of wisdom. They will ask me the secret of life and I will tell them. Then maybe I'll finish off with a song. The Nomad

Offline Mince

  • .
  • Posts: 6978
  • Utter Waste of Time
Re: Chelsea Flower Show
« Reply #14 on: October 05, 2021, 12:22:20 PM »
It's a piece of cool programming from a piece of software I wrote this year to create random maths questions (with answers).

It's cool mostly because it's one line of programming (though it's split over several lines for readability).

The main program never changes (as it just creates maths questions) but the repositories from which it chooses the questions must be capable of being added to without having to re-compile the main program, so they are placed in separate files called assemblies.

The function examines the assemblies that contain the maths questions and creates (and returns) a list of all available maths questions that the user can choose from.

return assemblies   
   .SelectMany(    turn a list of lists into a single list
      x => x
      .GetTypes()    get all the types in the assemblies
      .Where(t => t.Namespace != null && t.Namespace.Contains(".LCQ") && t.Name.StartsWith("LCQ"))    filter out the ones we need
      .SelectMany(      turn the inner list of lists into a single list
         u => Enumerable   
            .Range(0, (int)u.GetProperty("Count").GetValue(null))    get the number of questions in each type and number them
            .Select(    for each question, select the question title, the question number, and the question type
               v => (   
                        Title: (string)u.GetMethod("Title").Invoke(null, new object[] { v }),
                        QNo: v,
                        QType: u
                     )
            )
         .ToList()
      )
   )
   .ToDictionary(   create a dictionary out of the questions indexed by their title
      t => t.Title,
      t => (t.QType, t.QNo)
   );

Ten or fifteen years ago, this would have been at least a hundred lines of code. With LINQ, it's reduced to one line of code.

And Roger has the nerve to call it 'average'. Philistine!

« Last Edit: October 05, 2021, 12:24:40 PM by Mince »