QB64 Phoenix Edition
A quick lesson on: What is IMP? - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Official Links (https://qb64phoenix.com/forum/forumdisplay.php?fid=16)
+--- Forum: Learning Resources and Archives (https://qb64phoenix.com/forum/forumdisplay.php?fid=13)
+--- Thread: A quick lesson on: What is IMP? (/showthread.php?tid=305)

Pages: 1 2 3


RE: A quick lesson on: What is IMP? - SMcNeill - 07-27-2022

(07-27-2022, 07:37 PM)Pete Wrote: @SMcNeill

What about trans-males? IMP that! Big Grin

From my personal viewpoint, this is an excellent example of IMP!

IF Male IMP Penis THEN
      they're not in my dating pool
ELSE
      they may be
END IF

IF they have a Penis THEN they're not in my dating pool.  Doesn't matter if they call themselves male, female, or Pete...  Not in my dating pool if they have a penis.

IF they proclaim themselves to be a Male, then they're not in my dating pool.  A girl in a tuxedo?  If she calls herself a male, then me and her aren't going to be very compatible.  Whether they have an actual penis, or not, it doesn't matter.  If they proclaim themselves as Male, they're not in my dating pool.

So Male IMP Penis = not in Steve's dating pool!  Only Non-Males without a penis need to apply.  

So where's that leave in regards to an eunuch who has adopted a female lifestyle??   I've never met one (that I know of), and I've certainly never met one that expressed interest in me.  If I ever do, I guess I'll cross that bridge when I get there.  Who knows?  They might be in my dating pool!


RE: A quick lesson on: What is IMP? - Pete - 07-27-2022

Well I guess every pool needs a filter, apparently even a dating pool!

Pete


RE: A quick lesson on: What is IMP? - Dimster - 07-28-2022

Lots to think about here Steve. You've really given a lot more on the workings and application of IMP then I've found elsewhere on the internet. Thanks for breaking this down into layman's terms. It seems to me, if the AI in a program is working with limited data, IMP should be tool in the learning code.


RE: A quick lesson on: What is IMP? - SMcNeill - 07-28-2022

I think the biggest problem with IMP is that folks think of it logically, and not programmatically. 

In logic, we can say something such as NOT TRUE = FALSE.  When coding, however, that statement doesn't hold true, *except in very limited situations*.

NOT -1 = 0.  In this case, -1 is TRUE and 0 is FALSE, so the statement NOT TRUE = FALSE is correct.

But what if we NOT a different value?

NOT -2 = 1.  In this case -2 is TRUE, and 1 *is also* TRUE. 

NOT (a true condition) is *ONLY* a FALSE condition, when that condition is -1.  In all other cases, it's still TRUE.

Logically, we think that NOT TRUE is FALSE, but when coding, that's only accurate in the limited condition that our truth value is -1.  One could break the logic down just as simple to:

IF A = -1 THEN
  'NOT A is FALSE
ELSE
    'NOT A is TRUE
END IF

----------------------------

IMP breaks down to the same type of simplified logic.  When dealing with A IMP B, it's:

IF A =-1 AND B = 0 THEN
  'A IMP B is FALSE
ELSE
    'A IMP B is TRUE
END IF


RE: A quick lesson on: What is IMP? - Dimster - 07-28-2022

Someone aught a write a bible about this stuff  Big Grin


RE: A quick lesson on: What is IMP? - JRace - 07-28-2022

Slacker @SMcNeill hasn't been doing anything, man!  JK of course, Steve.

Sooner or later he'll have enough informational posts on the forum to collect and reformat.  Viola, instant book!


RE: A quick lesson on: What is IMP? - TempodiBasic - 10-18-2022

HI
on the other forum I posted a little library based on IMP.
Surely it is too intuitive using the other logic operators while IMP seems to be not linear and not so flexible!
Moreover in VB6.0 IMP had been cancelled and coders that used it must convert their code to NOT a OR b, just because developer team of VB6.0 thourght that IMP was a duplicate of NOT a OR b.

Very interesting the binary part of argument!
Thanks Steve!


RE: A quick lesson on: What is IMP? - TempodiBasic - 10-18-2022

Just Kidding but this filter for dating let me just surprised.
Code: (Select All)
Const False = 0, True = Not False
For Male = True To False Step 1
    For Penis = True To False Step 1
        If Male Then Print "He is male and "; Else Print "She is Female and ";
        If Penis Then Print " has penis, so "; Else Print "has no penis, so ";
        If Male Imp Penis Then
            Print "they're not in my dating pool"
        Else
            Print "they may be"
        End If
Next Penis, Male

This is output :
"He is male and has no penis, so they may be"
However free love for everyone

-------------------------------
PS: a link about the evil IMP
https://en.wikipedia.org/wiki/Truth_table#Logical_implication

Moreover the difficult to use IMP is related to get as values of comparison TRUE vs FALSE... and not scalar values


RE: A quick lesson on: What is IMP? - PhilOfPerth - 11-05-2022

(10-18-2022, 07:16 PM)TempodiBasic Wrote: Just Kidding but this filter for dating let me just surprised.
Code: (Select All)
Const False = 0, True = Not False
For Male = True To False Step 1
    For Penis = True To False Step 1
        If Male Then Print "He is male and "; Else Print "She is Female and ";
        If Penis Then Print " has penis, so "; Else Print "has no penis, so ";
        If Male Imp Penis Then
            Print "they're not in my dating pool"
        Else
            Print "they may be"
        End If
Next Penis, Male

This is output :
"He is male and has no penis, so they may be"
However free love for everyone

-------------------------------
PS: a link about the evil IMP
https://en.wikipedia.org/wiki/Truth_table#Logical_implication

Moreover the difficult to use IMP is related to get as values of comparison TRUE vs FALSE... and not scalar values
Well, that link *really* clarified things for me - NOT.  Huh


RE: A quick lesson on: What is IMP? - JRace - 11-05-2022

"they're not in my dating pool"

LOL.  I first read that as "they're not dating in my pool" and my first thought was "Dude, if people are 'dating' in your pool, regardless of gender or orientation, then you need to lay down some strict rules!"

Pee in the pool is bad enough.