News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

A look at the bible

Started by jj2007, February 05, 2024, 10:53:16 PM

Previous topic - Next topic

jj2007

What distinguishes the upper from the lower phrases?

    0  0.414    2 Seraiah, Azariah, Jeremiah,
    1  0.394    6 Shemaiah, and Joiarib, Jedaiah,
    2  0.393    THE LAMENTATIONS OF JEREMIAH
    3  0.392    7 Meraioth begat Amariah, and Amariah begat Ahitub,
    4  0.385    36 And Elioenai, and Jaakobah, and Jeshohaiah, and Asaiah, and Adiel, and Jesimi
31210  0.196    5 Blessed [shall be] thy basket and thy store.
31211  0.191    4 Shew me thy ways, O LORD; teach me thy paths.
31212  0.190    5 Hold up my goings in thy paths, [that] my footsteps slip not.
31213  0.189    1 Blessed [be] the LORD my strength, which teacheth my hands to war, [and] my fi
31214  0.187    2 What, my son? and what, the son of my womb? and what, the son of my vows?

Recall "Bible.txt", i$()    ; get it from here

jack

#1
thanks jj
for the atheist and skeptics I recommend the series presented here https://youtube.com/playlist?list=PLRfsM059jhjvOG60C6Sy477gl9UDEhgeF&si=X4MSgEruEzIAzxGk
about the author http://searchseminars.org/meet-the-author/
in a nutshell, Mr Subodh researched the most prominent religions with careful logical analysis, I believe that the presentations would interesting to atheist and skeptics.

jj2007

Subodh writes:

QuoteAre the histories behind these religions trustworthy? How accurate are their 'Holy' writings? Join Dr. Pandit in comparing these world religions. They all claim to have the truth, so we must investigate carefully to discover which one is true.

The wording "which one is true" implies that all the others are wrong. That is typical of religious fanatics: "my faith is the only right one, all others need to be converted, or killed".

Frankly speaking, I couldn't care less. Any religion that claims an old man represents the whole universe is just plain ridiculous. Science says there are around 1023 planets in the universe. They were all created by an old man with a long beard? That old man controls the thoughts of the inhabitants of 1,000,000,000,000,000,000,000 planets (assuming that only one in a hundred planets develops intelligent life)? Plain nonsense, sorry.

Btw the only reason why I use the bible here is that it's a fat text file, and thus allows interesting exercises in text processing. In this specific case, sorting lines of text by some elaborated properties.

NoCforMe

So what's the answer to your question? I have no clue. (The lower phrases end in a period?)
Assembly language programming should be fun. That's why I do it.

jj2007

See the second column, 0.414 ... 0.187? That's the share of vowels in the text. Surprised? I was indeed surprised that I don't actually see it at one glance. You have to count them to realise that the first phrases have more than twice as many vowels than the last ones.

Under the hood is an interesting sort technique, but I know you won't download it ;-)

stoo23

I'll leave this here 'briefly' :)

I always loved this 'view' of what Heaven must be like  :wink2:  :smiley:  :rofl:


NoCforMe

Ah yes, Peter Cook and Dudley Moore. Always loved those li'l scapers. Check out their "Bedazzled" (the original, not the remake).
Assembly language programming should be fun. That's why I do it.

stoo23

QuoteCheck out their "Bedazzled"
That is where that 'clip' is from  :thumbsup:

jj2007

Quote from: stoo23 on February 06, 2024, 10:08:01 AMI always loved this 'view' of what Heaven must be like

But he's English, right?
Oh yes, very upper class!

stoo23

:rofl:
Ofcourse God is English !!!,... lol

Please, feel free to delete the post to clean the 'thread' up, I just couldn't help myself, due to your earlier references  :wink2:

jj2007

Quote from: stoo23 on February 06, 2024, 11:16:32 AMclean the 'thread' up

I might do that, actually. The programming point here is as follows:

- create an array of doubles: Dim x() As REAL8
- load a text array: Recall "Bible.txt", i$()
- calculate the share of vowels of each string in i$()
- store it: fstp x(ct)   ; store the ratio vowels/len as REAL8

So far, so normal. Now comes the mean assembly programmer's trick:
- m2m word ptr x(ct), ct  ; shove the counter into the low WORD of the REAL8 array
- then sort the REAL8 array: ArraySort x(-)  ; biggest values on top
- in the loop that follows, get the string array index back via movzx ecx, word ptr x(ct)

So effectively we smuggle the counter into the least important 16 bits of the REAL8 numbers. That won't affect the sort, except in cases when the vowel shares of two strings are identical. In these rare cases, the string with the higher index has a tiny advantage; which is not a problem.