Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - iamnotanumber10

#1
newLISP and the O.S. / Re: Executables and Dynamic Linking
September 03, 2012, 11:30:25 AM
Ok Folks, I've cracked it!


Quote> (load "/usr/share/newlisp/util/link.lsp")

(lambda (orgExe newExeName lispSourceName) (println "original newlisp executable:"

  orgExe)

 (println "new executable:" newExeName)

 (println "source:" lispSourceName)

 (set 'size (first (file-info orgExe)))

 (copy-file orgExe newExeName)

 (set 'buff (pack "ld" size))

 (set 'handle (open newExeName "u"))

 (search handle "@@@@@@@@")

 (write-buffer handle buff 4)

 (set 'buff (read-file lispSourceName))

 (set 'keylen (pack "ld" (length buff)))

 (write-buffer handle keylen 4)

 (seek handle size)

 (set 'buff (encrypt buff (string (length buff))))

 (write-buffer handle buff (length buff))

 (close handle))

then
Quote> (link "/usr/bin/newlisp" "hw" "hw.lsp")

original newlisp executable:/usr/bin/newlisp

new executable:hw

source:hw.lsp

true
#2
Hi,

Whoops, it looks like I forgot to call link.lsp, but I still must be doing something wrong...
Quoteasdf@asdf:~$ newlisp link.lsp

newLISP v.10.4.3 on Linux IPv4/6 UTF-8 libffi, execute 'newlisp -h' for more info.



> (link "newlisp" "hw" "hw.lsp")



ERR: invalid function : (link "newlisp" "hw" "hw.lsp")

Updated hw.lsp file...
Quote#!/usr/bin/newlisp

;  hw.lsp



(println "Hello World!")

(exit)


?
#3
newLISP and the O.S. / Executables and Dynamic Linking
August 21, 2012, 02:34:05 AM
Hi, I'm following a tutorial http://www.newlisp.org/newLISP_in_21_minutes.html">http://www.newlisp.org/newLISP_in_21_minutes.html and came to this part...

Executables and Dynamic Linking. I created hw.lsp and launched it from the command line successfully.
Quoteasdf@asdf:~$ newlisp hw.lsp

Hello World!

I tried to reproduce the executable example in the tutorial though and got the following...
Quoteasdf@asdf:~$ newlisp

newLISP v.10.4.3 on Linux IPv4/6 UTF-8 libffi, execute 'newlisp -h' for more info.



> (link "newlisp" "hw" "hw.lsp")



ERR: invalid function : (link "newlisp" "hw" "hw.lsp")

I'm using Ubuntu 12.04 32bit. Any ideas why the function is invalid?
#4
newLISP and the O.S. / NL on the RP?
July 11, 2012, 09:39:49 AM
Hi, just wondering if you had any plans to get NL running n the Raspberry Pi? I think it would make a suitable edition.



Thanks.