newLISP Fan Club

Forum => So, what can you actually DO with newLISP? => Topic started by: newdep on October 16, 2004, 06:53:42 AM

Title: 5 Cent tip for today [ Seek Neighbors ]
Post by: newdep on October 16, 2004, 06:53:42 AM
#!/usr/bin/newlisp

;;

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

;;

;; Usage:

;; ./neighbor.lsp "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))))))