Skip to content

Commit

Permalink
Added newLISP
Browse files Browse the repository at this point in the history
  • Loading branch information
JudgeGroovyman committed Oct 4, 2019
1 parent 8e6105d commit 07b197c
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 0 deletions.
1 change: 1 addition & 0 deletions newLisp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
newlisp.exe
18 changes: 18 additions & 0 deletions newLisp/demo.lsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
; generate 1000 random numbers between 1 and 10
; (true-random 1000 1 10)

(println "About to do randos")
(define (true-random num from to)
(let (params (format "num=%d&min=%d&max=%d&" num from to)
pre "http://www.random.org/integers/?"
post "col=1&base=10&format=plain&rnd=new")
(println pre params post)
(map int (parse (get-url (append pre params post))))

)
)
;

(println "Randos Done!")
(exit)

2 changes: 2 additions & 0 deletions newLisp/helloworld.lsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(println "Hello World!")
(exit)
11 changes: 11 additions & 0 deletions newLisp/htmlOfAllLinks.lsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; write links.html with all links in page

(setq page (get-url "http://www.newlisp.org/"))
(println "About to grab links")
(write-file "links.html"
(join (find-all
"<a href=([^>]+)>([^>]*)</a>" page)
"<br>\n"))
;
(println "should be done now")
(exit)
21 changes: 21 additions & 0 deletions newLisp/ip.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# begin newlisp-program
; get all IPs assigned to this machine on Win32

(define (get-ips , ips)
(println "getting Ips")
(dolist (ln (exec "ipconfig"))
(if (find
{\b\d{1,3}\.\d{,3}\.\d{1,3}\.\d{1,3}\b} ln 0)
(push $0 ips)
)
)
ips
)
;

(println "IPs: " ips)

(println "Hello")
(exit)
# end newlisp-program
17 changes: 17 additions & 0 deletions newLisp/ip.lsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
; get all IPs assigned to this machine on Win32

(define (get-ips , ips)
(println "getting Ips")
(dolist (ln (exec "ipconfig"))
(if (find
{\b\d{1,3}\.\d{,3}\.\d{1,3}\.\d{1,3}\b} ln 0)
(push $0 ips)
)
)
ips
)
;

(println "IPs: " ips)

(println "Hello")
26 changes: 26 additions & 0 deletions newLisp/links.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<a href="index.cgi?Home">Home</a><br>
<a href="index.cgi?FAQ">About</a><br>
<a href="index.cgi?Downloads">Downloads</a><br>
<a href="index.cgi?Documentation">Docs</a><br>
<a href="modules/"> Modules</a><br>
<a href="index.cgi?Code_Contributions">Links</a><br>
<a href="index.cgi?Tips_and_Tricks">Tips&amp;Tricks</a><br>
<a href="index.cgi?Libraries">C-Libs</a><br>
<a href="index.cgi?Applications">Apps</a><br>
<a href="index.cgi?page=Downloads">May 12th, 2019</a><br>
<a href="index.cgi?FAQ">new LISP</a><br>
<a href="index.cgi?page=Differences_to_Other_LISPs">differs from other LISPs</a><br>
<a href="http://nuevatec.nfshost.com/manual-intro.mov">Movie</a><br>
<a href="http://nuevatec.nfshost.com/manual-intro.html">Slideshow</a><br>
<a href="http://www.newlisp.org/newlisp-js/">newLISP in a Browser</a><br>
<a href="index.cgi?Documentation">Documented</a><br>
<a href="downloads/manual_frame.html">API</a><br>
<a href="modules/">modules</a><br>
<a href="index.cgi?Libraries">C-libraries</a><br>
<a href="http://www.newlisp.org/index.cgi?Code_Contributions">Editors</a><br>
<a href="http://www.gnu.org/copyleft/gpl.html#SEC1">GPL</a><br>
<a href="index.cgi?Features">features</a><br>
<a href="http://twitter.com/newlisp">Twitter</a><br>
<a href="http://www.addthis.com/bookmark.php?v=250&amp;username=xa-4c9a0bc41ae9d39d" class="addthis_button_compact">Share</a><br>
<a href="http://www.newlisp.org/">Site</a><br>
<a href="http://newlisp.org">newLISP</a>
4 changes: 4 additions & 0 deletions newLisp/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Copy newlisp.exe into this folder (it wont commit since its in the gitignore)


* [newLISP website](http://www.newlisp.org/index.cgi?Home)

0 comments on commit 07b197c

Please sign in to comment.