5 Cent tip for today [ forum online check ]

Featuring the Dragonfly web framework
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

5 Cent tip for today [ forum online check ]

Post by newdep »

;
; A non regexp users online grabber
; (pre-historic, a little shaving could work)
;
; when inside newlisp a quick check with 'forum to
; see if the registered guru's are online :)
; Does not display "who" actualy, its in the make...

(define (forum)
(set 'buff (get-url "http://www.alh.net/newlisp/phpbb/index.php" ))
(set 'buff (slice buff (find "In total" buff)))
(set 'buff (slice buff 0 (find "Most" buff)))
(set 'buff (slice buff 0 (find "\n" buff)))
(set 'buff (replace "<b>" buff ""))
(set 'buff (replace "</b>" buff ""))
buff)


Enjoy..Norman.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Code: Select all

;;
;; non regex users online grabber using old fashioned 'match'
;;

(define (forum)
  (join (collect (match "*In total there*<b>*</b>*Guest?*" 
                (get-url  "http://www.alh.net/newlisp/phpbb/index.php")) 
         1 2 4 6 7)))
Lutz

ps: like the first one this one doesn't take care of the 'Heisenber Effect' ;-)

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Hi Lutz,

Well im not sure exactly what Heisenber's findings where but it must
have to do someting with repetition of occeurences...I already wondered
who would come up with a smarter and lispy version..Great example and
its quicker also..;-)

Norman.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

In Heisenberg's "Uncertainty Principle" (fundamental to Quantum Physics) he observes that the fact that we measure something may change the measurement itself. In Quantum Physics he meant specifically: measuring an elementary particle's position and momentum.

When inquiring the visitors on the forum the inquiry itself raises the visitor's count.

In software they also talk about Heisen-bugs meaning software bugs which change there occurance or nature when trying to debug them.

Lutz

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

aha! :-) I thought i knew that name from somewhere.. though im not
into quantom mechanics (except for Startrek parts :-) And i was not
aware of the fact that the naming was also used for "Self-Solving-bugs
during debugging" ;-) But indeed this self-guest is one to keep track on ;-)

Norman.

Locked