Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: August 24, 2026, 6:29 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Theists - what convinced you?
#21
RE: Theists - what convinced you?
I wasn't aiming to be concise, it only took me 10 minutes to write. Tongue
Reply
#22
RE: Theists - what convinced you?
My little Delphi version..

Code:
var
  target, output: string; a: word; cnt: longint;

begin
  target:='HELLO'; cnt:=0;

  repeat
    output:='';

    for a := 0 to length(target)-1 do begin
      output:=output+chr(65+Random(26)); inc(cnt);
    end;

  until target=output;

  Label1.Caption:='Target string '+target+' found after '+IntToStr(cnt)+' attempts..';
end;

But without the 'hold' feature.

Produces: Target string HELLO found after 22537965 attempts..
[Image: cinjin_banner_border.jpg]
Reply
#23
RE: Theists - what convinced you?
Yeah, mine is overly long to include object orientation, etc. Now do one with the hold method and the ability to choose between them Tongue
Reply
#24
RE: Theists - what convinced you?
(April 10, 2010 at 5:11 pm)Tiberius Wrote: Yeah, mine is overly long to include object orientation, etc. Now do one with the hold method and the ability to choose between them Tongue

I'm attempting just the same Smile However, I've just given it "SHALL I COMPARE THEE TO A SUMMERS DAY" to do so it might take some time :S
[Image: cinjin_banner_border.jpg]
Reply
#25
RE: Theists - what convinced you?
Won't that fail given the fact there are spaces and you're only using 26 letters of the alphabet?
Reply
#26
RE: Theists - what convinced you?
Yup..

Code:
var
  target, output, tmp: string; a: word; cnt: longint;

begin
  target:='Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the galaxy';

  cnt:=0; output:=''; a:=0;

  while a<=length(target)-1 do begin
    tmp:=chr(32+Random(94)); inc(cnt);

    if Copy(target,a+1,1)=tmp then begin
      output:=output+tmp; inc(a);
    end;
  end;

  Label1.Caption:='Target string '+target+' found after '+IntToStr(cnt)+' attempts..';
end;

This is fun isn't it.....

Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the galaxy found in 8662 attempts

Edit: Oops, forgot the ability to choose.. Hang on a mo..
[Image: cinjin_banner_border.jpg]
Reply
#27
RE: Theists - what convinced you?
(April 10, 2010 at 4:37 pm)Darwinian Wrote: I'm pleased you indent your code properly, so many people don't and just produce a clumsy mess. Nothing to do with the topic but I thought I'd give you a bit of praise anyway Great

You certainly wouldn't want to see my code Big Grin

@ Adrian: Nice job!
Reply
#28
RE: Theists - what convinced you?
(April 10, 2010 at 5:52 pm)Disinter Wrote:
(April 10, 2010 at 4:37 pm)Darwinian Wrote: I'm pleased you indent your code properly, so many people don't and just produce a clumsy mess. Nothing to do with the topic but I thought I'd give you a bit of praise anyway Great

You certainly wouldn't want to see my code Big Grin

@ Adrian: Nice job!

What about me Angry

Anyway..

Code:
var
  target, output, tmp: string; a: word; cnt: longint;

Const
  hold: boolean = False;

begin
  target:='Hello';

  cnt:=0;

  repeat
    output:=''; a:=0;

    while a<=length(target)-1 do begin
      tmp:=chr(32+Random(94)); inc(cnt);

      if (Copy(target,a+1,1)=tmp) or (not hold) then begin
        output:=output+tmp; inc(a);
      end;

    end;

  until (hold) or (output=target);

  Label1.Caption:='Target string '+target+' found after '+IntToStr(cnt)+' attempts..';
end;

It's still working on 'Hello' without the hold option and it's really surprising how long it takes using the whole alphabet rather than just the capitals :S

Edit: It found 'Hell' in 216813840 attempts!!! I dare you to do it with the full alphabet and look for 'How long will this take?'
[Image: cinjin_banner_border.jpg]
Reply
#29
RE: The God That Died (Solving The First Cause)
I don't believe in any deity but if I did, I'd probably believe in the deity that died. If you don't believe in a deity that loves you or performs miracles or you don't believe that a deity became human and died for you on the cross, yet you can't deal with the 'first cause argument', believe in the god that died. Problem solved.

I wouldn't actually believe in a deity that died... deities don't die... everyone knows that, common sense.

I honestly don't see myself ever believing that a god created the universe. the word god is way too personified or anthropocentric to describe what I think of 'the first cause' argument. Though, any god could solve the 'first cause' argument. The god that died is just as qualified for the job. Wink
Reply
#30
RE: Theists - what convinced you?
(April 10, 2010 at 5:56 pm)Darwinian Wrote:
(April 10, 2010 at 5:52 pm)Disinter Wrote:
(April 10, 2010 at 4:37 pm)Darwinian Wrote: I'm pleased you indent your code properly, so many people don't and just produce a clumsy mess. Nothing to do with the topic but I thought I'd give you a bit of praise anyway Great

You certainly wouldn't want to see my code Big Grin

@ Adrian: Nice job!

What about me Angry

Kudos to you too, I've enjoyed your contributions as well. Big Grin
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  Theists, provide your arguments for God. Disagreeable 41 10684 August 9, 2024 at 12:22 pm
Last Post: Ferrocyanide
  Serious question about thoughts on theists Kingpin 118 30966 May 18, 2023 at 2:44 pm
Last Post: The Grand Nudger
  Theists: What is your stance on evolution? Agnostic1 118 30294 March 27, 2022 at 8:48 pm
Last Post: The Architect Of Fate
  Theists, tell me, an atheist, why your God has neglected to show himself to me? ignoramus 75 40279 March 5, 2021 at 6:49 am
Last Post: awty
  If artificial super intelligence erases humans, will theists see this as God's plan? Face2face 24 10615 March 5, 2021 at 6:40 am
Last Post: awty
  Am I right to assume, that theists cannot prove that I am not god? Vast Vision 116 60438 March 5, 2021 at 6:39 am
Last Post: awty
  Is God weaker than theists imagine, and is mankind stronger? invalid 6 3950 March 5, 2021 at 6:38 am
Last Post: awty
  Theists: how do you account for psychopaths? robvalue 288 92106 March 5, 2021 at 6:37 am
Last Post: awty
  Theists: What do you mean when you say that God is 'perfect'? Angrboda 103 41002 March 5, 2021 at 6:35 am
Last Post: awty
  Active theists represent Paraselene 10 2504 October 10, 2020 at 8:28 pm
Last Post: Fireball



Users browsing this thread: 1 Guest(s)