the number of items

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: the number of items

Post by [-hh] » Wed Dec 11, 2013 9:24 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 1:28 pm, edited 1 time in total.
shiftLock happens

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: the number of items

Post by mwieder » Thu Dec 12, 2013 3:32 am

Actually, even with infinities you do get exactly what you expect arithmetically, which is how Cantor's proof of the mapping of ordinal numbers to rational fractions works (although it took Cantor's brilliance to come up with it in the first place). Once you get into the axiom of choice things get a bit dicier, but if you accept the groundrules then the logic all falls into place.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: the number of items

Post by dunbarx » Thu Dec 12, 2013 3:52 am

My favorite way to explain how a seeming smaller infinity can be exactly the same size as a larger one, say showing that a one inch line contains the same number of points as a two inch line, is this old classic:

-

______________

_________________________________

Draw any straight line from the upper point through the shorter line down to the longer line. Every point in the short line has a twin in the longer. The trick is to stop "counting", which can drive you crazy, and start making one-to-one correspondences, which will give you enlightenment. Hermann will know that with a semi-circle in place of the short line above, with its center at that upper point, you can show that a finite line has as many points as an infinitely extended lower line.

This has gotten off topic, I see.

Craig

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: the number of items

Post by [-hh] » Thu Dec 12, 2013 12:39 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 1:27 pm, edited 1 time in total.
shiftLock happens

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: the number of items

Post by dunbarx » Thu Dec 12, 2013 3:02 pm

Hermann.

This is just adorable. I did not know that constants resolved that way. Anyone else know that? I am starting another thread somewhere.

So comma - 2 = colon -16

Craig

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: the number of items

Post by [-hh] » Thu Dec 12, 2013 4:08 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 1:27 pm, edited 1 time in total.
shiftLock happens

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: the number of items

Post by dunbarx » Thu Dec 12, 2013 9:19 pm

Hermann.

Shows you the subtle traps when translating from one system to another. The culprit is LC itself, since the snag happens when you add 0 to nothing. Instead of getting nothing, you get 0. This may even make sense, but it does show how that translation thing...

answer empty = 0 --false
answer empty + 0 = 0 -- true

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: the number of items

Post by FourthWorld » Thu Dec 12, 2013 9:26 pm

dunbarx wrote:So comma - 2 = colon -16
I never knew that was possible. It seems inconsistent, though.

For example, using these constants works:

put comma - colon

...but this does not:

put comma - cr
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: the number of items

Post by dunbarx » Thu Dec 12, 2013 9:45 pm

Richard.

See Hermann's post two above.

And just to ruin your lunch: answer plus + plus = 26

Craig

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: the number of items

Post by [-hh] » Thu Dec 12, 2013 10:20 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 1:27 pm, edited 1 time in total.
shiftLock happens

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: the number of items

Post by dunbarx » Thu Dec 12, 2013 11:04 pm

Hermann.

It is not true that if you:

put empty into var, that there is one word, item or line in var. There are zero of any of those chunks.

I think the empty constant is sometimes more than it seems, and sometimes less. So although empty can hold a "place" for an item, as in:

"1,2,3,,," (which contains five items)

it does not mean that empty has any tangible existence AFTER the trailing comma. Looking at that string, it may be argued that the "thing" between the last comma and the quote is actually less than empty, and therefore does not constitute a trailing item, which would yield a total of six. I see, through my aging eyes, that last comma as an indicator, a prepended placeholder if you will, of a "potential", but nonetheless real sixth item. LC sees it as a trailing comma, er, period, with less than nothing, that is, less than empty itself, following. This is just a rationalization, true, but such is the stuff of a five page thread in this forum.

In other words, we have been all through the fact that "1,2,3" and "1,2,3," both contain three items. Er, period.

Craig

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: the number of items

Post by [-hh] » Fri Dec 13, 2013 2:22 am

..........
Last edited by [-hh] on Wed Aug 13, 2014 1:27 pm, edited 1 time in total.
shiftLock happens

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: the number of items

Post by mwieder » Tue Mar 11, 2014 7:16 pm


Locked

Return to “Engine Contributors”