Page 2 of 3 <123>
Topic Options
#178063 - 2007-07-19 12:01 AM Re: How Many Members [Re: Richard H.]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
good gosh, what have I started???

Sorry, Jens, I didn't mean to start an imprompto golf tournament. I guess it shows how much we're all ready for the next round!

G-
_________________________
Actually I am a Rocket Scientist! \:D

Top
#178066 - 2007-07-19 02:33 AM Re: How Many Members [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, technically, Doc started it.
and his original post even has classification for my correcting post and next one correcting me and the anal pita know's it all who says we all suck...
_________________________
!

download KiXnet

Top
#178067 - 2007-07-19 02:36 AM Re: How Many Members [Re: Lonkero]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well... you do. :p
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#178068 - 2007-07-19 02:44 AM Re: How Many Members [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
 Originally Posted By: Jooel
well, technically, Doc started it.


Well had to do something. Post levels are below sea-level these days, trying to keep the ship afloat. \:\(

Top
#178071 - 2007-07-19 07:35 AM Re: How Many Members [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
below sea-level.
in netherlands? (that's where the server's located)

go figure \:\)
_________________________
!

download KiXnet

Top
#178072 - 2007-07-19 08:30 AM Re: How Many Members [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
LOL - Pretty much the whole Country is isn't it?
Top
#178073 - 2007-07-19 08:42 AM Re: How Many Members [Re: Lonkero]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
Ehm, a new lamp doesn't get hot when u screw it in....

 Code:
    :GetNewLampScrew
    $N=CreateObject("Lamp.Screw")
    While $N.Loose
      $N.Rotate(180)
      If $N.IsHot
        $S.Toggle
        $=RunFingersUnderColdWater(@WKSTA)
        If $N.Broken
          Goto "GetNewLampScrew"
        EndIf
      EndIf
    Loop


 Originally Posted By: NTDOC
LOL - Pretty much the whole Country is isn't it?

Yup hence the "dijken"

Top
#178074 - 2007-07-19 09:20 AM Re: How Many Members [Re: Arend_]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
 Quote:
Ehm, a new lamp doesn't get hot when u screw it in....


It does if you forgot to switch it off before you change it, which is why we then have "$S.Toggle" before we continue.

Top
#178076 - 2007-07-19 12:06 PM Re: How Many Members [Re: Lonkero]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Um, pardon me, but - in the spirit of post-count incrementatation - I do believe that I was the first to mention a light-bulb, er, LAMP changing script.. followed by references to Shawn's Sheepish UDFs.

The bulk of this thread then turned into a discussion of those scripts/udfs, based on Richard's post of his version of a lamp management script.. which turned into a Golfing exercise, which in turn may have annoyed the Golf-Miester... It technically could be looked at at "my fault" for starting an unauthorize golf round - it's all quite clear in black and white and blue and tan and brown (ugh! Those weren't brown pixels... SHAWN!!! Get your sheep outta here!)

I gotta go change my shoes...

G-
_________________________
Actually I am a Rocket Scientist! \:D

Top
#178084 - 2007-07-19 04:19 PM Re: How Many Members [Re: Glenn Barnas]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
might wanna change your pants too, while you are at it ;\)

anyways, think the discussion of our small kixgolf play's legality is not covered by the original subject.
think you should start a new thread about that in the kixgolf disciplinatory forum.

uh, that word was hard to write.
how many typos, did anyone count?
_________________________
!

download KiXnet

Top
#178087 - 2007-07-19 04:51 PM Re: How Many Members [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
If you meant disciplinary I count 2

disciplinarian would result in 4 ... but no that would be a Jens only forum


Edited by Jochen (2007-07-19 04:53 PM)
_________________________



Top
#178089 - 2007-07-19 05:16 PM Re: How Many Members [Re: Jochen]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
 Quote:

SHAWN!!! Get your sheep outta here!) I gotta go change my shoes...


Want to borrow my large rubber sheep-shaggin boots ?

Top
#178090 - 2007-07-19 05:45 PM Re: How Many Members [Re: Richard H.]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
 Originally Posted By: Richard H.
 Quote:
Ehm, a new lamp doesn't get hot when u screw it in....


It does if you forgot to switch it off before you change it, which is why we then have "$S.Toggle" before we continue.


Might I suggest $S.Toggle(0) for turning off then \:\)
Btw shouln't
 Code:
$O=GetObject("Lamp:/"+$R)
$S=GetObject("Switch:/"+$R)

actually be:
 Code:
$O=GetObject("Lamp://"+$R)
$S=GetObject("Switch://"+$R)


Edited by apronk (2007-07-19 05:48 PM)

Top
#178091 - 2007-07-19 05:59 PM Re: How Many Members [Re: Arend_]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
My golfing attempt:
 Code:
; ChangeLamp.kix
;	Automated lightbulb changer
 
Dim $R, $O, $N, $S, $I, $M
"Please enter lightbulb maintenance reference: " Gets $R
 
$O=GetObject("Lamp://"+$R)
$S=GetObject("Switch://"+$R)

$S.Toggle
$I=$OState | $O.Illuminated
$S.Toggle
 
If $I 
  If $O.Type="Bayonet"
    $O.Push
    $O.Rotate(-90)
    $O.Pull
    Do
      $N=CreateObject("Lamp.Bayonet")
      $N.Push
      If $N.IsHot
        $S.Toggle
        $=RunFingersUnderColdWater(@WKSTA)
      EndIf
    Until NOT $N.Broken
    $O.Rotate(90)
  Else ;$O.Type="Edison Screw"
    Do
      $O.Rotate(-180)
    until $O.Released
    Do
      $N=CreateObject("Lamp.Screw")
      While $N.Loose
        $N.Rotate(180)
        If $N.IsHot
          $S.Toggle
          $=RunFingersUnderColdWater(@WKSTA)
        EndIf
      Loop
    Until Not $N.Broken
  EndIf
  $S.Toggle
  If $OState | $O.Illuminated
    "Lamp successfully changed and tested"+@CRLF
  Else
    "Lamp still not working.  Please try running FixFuse.kix then retry ChangeLamp.kix"+@CRLF
  EndIf
  $S.Toggle
Else
  "Lamp is OK, no need to change"+@CRLF
EndIf

Top
#178092 - 2007-07-19 06:11 PM Re: How Many Members [Re: Arend_]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, is it shorter?
if you can't count how many, get the kixgolf() udf and let us hear the score.
_________________________
!

download KiXnet

Top
#178102 - 2007-07-20 03:43 AM Re: How Many Members [Re: Lonkero]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
 Quote:
disciplinarian would result in 4 ... but no that would be a Jens only forum

There's no need to discipline you, my disciples, ahem, children,... \:\)

Q: How many Germans does it take to screw in a light bulb?
A: Ve are asking ze qvestions here!

Q: How many Germans does it take to screw in a light bulb?
A: Two, one to give the order that the bulb be changed and one to screw it in.

Q: How many Germans does it take to screw in a light bulb?
A: None. They assign the task to a gastarbeiter.

Q: Helga, how many Germans does it take to change a light bulb?
A: Ah, is this the one about the highly-trained quality control checkers at the Löwenbräu brewery here in the beautiful city of Munich where they have to carefully check that each and every stage of the beer brewing process adheres to the Reinheitsgebot ancient brewing laws laid down in 1516 which set minimum standards for the purity of the ingredients otherwise they'd be subject to extremely enormous fines so quality control is a very important job both in terms of the quality of all the Löwenbräu beers and of course the financial good health of the company from the checking of the malted barley with the hops not forgetting the pure Bavarian spring water by any chance? What we Germans lack in humour, we make up for in our beer.

Source: The ultimate lightbulb joke list at http://bulbs.justpickone.org/lbbase.html.gz
_________________________
There are two types of vessels, submarines and targets.

Top
#178105 - 2007-07-20 09:25 AM Re: How Many Members [Re: Sealeopard]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
 Quote:
Might I suggest $S.Toggle(0) for turning off then


In the interest of maintining the level of pedantry in this thread - No, you may not \:\)

Maybe it doesn't translate very well into other languages, but "Toggle" in english when used in a programming context means "change to the alternate state".

For booleans, it has the same effect as NOT, so the following two statements are equivalent:
 Code:
1 - $oSwitch.State=Not $oSwitch.State
2 - $oSwitch.Toggle


For a 1Hz (2Hz? someone help me out) flashing lamp effect:
 Code:
while "true"
  $oSwitch.Toggle
  Sleep 0.5
Loop


Perhaps I should have described the script better as a "lightbulb change emulator", as it emulates what people do, rather that the sensible way of doing it which would have been less amusing - people burning their fingers through ineptitude is always going to be funny.

When a bulb doesn't work, people tend to flick (toggle) the switch two or three times before the fact that it is clearly not working sinks in. Then they change the bulb, forgetting to check the state of the lightswitch first.

Now, you could check $oSwitch.State at the start and toggle the switch if true. This would allow you to remove the later IsHot checks and and lose the entire RunFingersUnderColdWater() UDF making the code much shorter.

However, the problem with this is twofold:
  1. Push type switches often don't have a clear on/off state, so $oSwitch.State will be undetermined.
  2. Another routine may have toggled the switch state after you checked it. You can get around this if the switch supports the "Lock" method, but most lamp switches do not.

Top
#178107 - 2007-07-20 10:22 AM Re: How Many Members [Re: Richard H.]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
 Originally Posted By: Richard H.
Maybe it doesn't translate very well into other languages, but "Toggle" in english when used in a programming context means "change to the alternate state".


Aha! makes sense now \:\)

 Originally Posted By: Jooel
ok, is it shorter?
if you can't count how many, get the kixgolf() udf and let us hear the score.


Yeah 418 points shorter \:\)


Edited by apronk (2007-07-20 10:25 AM)

Top
#178111 - 2007-07-20 01:20 PM Re: How Many Members [Re: Arend_]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, I take your code and replace:
 Code:
$S.Toggle
$I=$OState | $O.Illuminated
$S.Toggle


with:
 Code:
$OState = $O.Illuminated
$S.Toggle
$I=$OState | $O.Illuminated
$S.Toggle


to finally make first working code.
now I shall start golfing that then.

that makes golf score of 781.
_________________________
!

download KiXnet

Top
#178112 - 2007-07-20 01:26 PM Re: How Many Members [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and this would be 753:
 Code:
; ChangeLamp.kix
;	Automated lightbulb changer
;! 
Dim $R, $O, $N, $S, $I, $M
"Please enter lightbulb maintenance reference: " Gets $R
 
$O=GetObject("Lamp://"+$R)
$S=GetObject("Switch://"+$R)

If $O.Illuminated | $S.Toggle | $O.Illuminated
  If $O.Type="Bayonet"
    $O.Push
    $O.Rotate(-90)
    $O.Pull
    Do
      $N=CreateObject("Lamp.Bayonet")
      $N.Push
      If $N.IsHot
        $S.Toggle
        $=RunFingersUnderColdWater(@WKSTA)
      EndIf
    Until NOT $N.Broken
    $O.Rotate(90)
  Else ;$O.Type="Edison Screw"
    Do
      $O.Rotate(-180)
    until $O.Released
    Do
      $N=CreateObject("Lamp.Screw")
      While $N.Loose
        $N.Rotate(180)
        If $N.IsHot
          $S.Toggle
          $=RunFingersUnderColdWater(@WKSTA)
        EndIf
      Loop
    Until Not $N.Broken
  EndIf
  $S.Toggle
  If $OState | $O.Illuminated
    "Lamp successfully changed and tested"+@CRLF
  Else
    "Lamp still not working.  Please try running FixFuse.kix then retry ChangeLamp.kix"+@CRLF
  EndIf
  $S.Toggle
Else
  "Lamp is OK, no need to change"+@CRLF
EndIf
;!
_________________________
!

download KiXnet

Top
Page 2 of 3 <123>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 369 anonymous users online.
Newest Members
rrosell, PatrickPinto, Raoul, Timothy, Jojo67
17877 Registered Users

Generated in 0.106 seconds in which 0.038 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org