the number of items
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: the number of items
..........
Last edited by [-hh] on Wed Aug 13, 2014 1:28 pm, edited 1 time in total.
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: the number of items
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.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: the number of items
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
-
______________
_________________________________
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
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: the number of items
..........
Last edited by [-hh] on Wed Aug 13, 2014 1:27 pm, edited 1 time in total.
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: the number of items
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
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
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: the number of items
..........
Last edited by [-hh] on Wed Aug 13, 2014 1:27 pm, edited 1 time in total.
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: the number of items
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
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
-
- VIP Livecode Opensource Backer
- Posts: 9824
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: the number of items
I never knew that was possible. It seems inconsistent, though.dunbarx wrote:So comma - 2 = colon -16
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
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: the number of items
Richard.
See Hermann's post two above.
And just to ruin your lunch: answer plus + plus = 26
Craig
See Hermann's post two above.
And just to ruin your lunch: answer plus + plus = 26
Craig
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: the number of items
..........
Last edited by [-hh] on Wed Aug 13, 2014 1:27 pm, edited 1 time in total.
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: the number of items
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
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
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: the number of items
..........
Last edited by [-hh] on Wed Aug 13, 2014 1:27 pm, edited 1 time in total.
shiftLock happens