5 Cent tip for today [ Seek Neighbors ]

Started by newdep, October 16, 2004, 06:53:42 AM

Previous topic - Next topic

newdep

#!/usr/bin/newlisp

;;

;; ...seek neighbors in last net range...

;;

;; Usage:

;; ./neighbor.lsp "http://www.microsoft.com">www.microsoft.com"

;;

;; Seek and Enjoy, Norman.

;;



(reverse (set 'self (net-lookup (nth 2 (main-args)))))

(set 'self (reverse (slice self (find "." self ) (length self))))



(set 'door 0)

(while (< (inc 'door 1) 255)

 (println "Neighbor: " (append self (string door)) " -> " (net-lookup (set 'neighbor (append self (string door))))))
-- (define? (Cornflakes))