Your code will work with v10.7.4 like in v10.7.1 here:
http://newlisp.org/downloads/development/inprogress/
See the paragraph about synchronizing file positions from stream and raw file access:
http://newlisp.org/downloads/developmen ... 10.7.4.txt
Search found 5296 matches
- Sun Mar 25, 2018 9:14 pm
- Forum: newLISP newS
- Topic: Development release newLISP v.10.7.3
- Replies: 7
- Views: 10815
- Tue Feb 13, 2018 11:56 pm
- Forum: newLISP Graphics & Sound
- Topic: newLisp compile to webassembly (newlisp-js)
- Replies: 1
- Views: 4589
Re: newLisp compile to webassembly (newlisp-js)
Thanks, it is now included in the distribution as 'makefile_emscripten_wasm_utf8' here:
http://www.newlisp.org/downloads/develo ... nprogress/
http://www.newlisp.org/downloads/develo ... nprogress/
- Sat Jan 13, 2018 3:26 pm
- Forum: newLISP in the real world
- Topic: (share) with (pack) memory
- Replies: 3
- Views: 4206
Re: (share) with (pack) memory
In this changed example from newlisp-10.7.4/qa-specific-tests/qa-share share is used by a spawn ed process: (set 'flash (share)) (share flash (pack (dup "u" 10) (sequence 1 10))) (define (get-data adr) (unpack (dup "u" 10) (share adr))) (spawn 'X (get-data flash)) (sync 10) (println X " = " (sequenc...
- Wed Jan 10, 2018 5:46 pm
- Forum: newLISP Graphics & Sound
- Topic: Guiserver can not load internal image under jre 9.0.1
- Replies: 3
- Views: 5390
Re: Guiserver can not load internal image under jre 9.0.1
Thanks for fixing this. There is a new guiserver.jar version 1.67 and upated source package here:
http://www.newlisp.org/downloads/develo ... nprogress/
http://www.newlisp.org/downloads/develo ... nprogress/
- Tue Jan 09, 2018 5:28 pm
- Forum: newLISP in the real world
- Topic: (share) with (pack) memory
- Replies: 3
- Views: 4206
Re: (share) with (pack) memory
Perhaps you forgot to unpack when reading the information back. > (set 'flash (share)) 4419780608 > (share flash (pack (dup "u" 10) (sequence 1 10))) "\001\000\002\000\003\000\004\000\005\000\006\000\007\000\b\000\t\000\n\000" > (unpack (dup "u" 10) (share flash)) (1 2 3 4 5 6 7 8 9 10) > The above ...
- Tue Nov 28, 2017 5:32 am
- Forum: newLISP and the O.S.
- Topic: Not start on Win10
- Replies: 13
- Views: 12515
Re: Not start on Win10
A port-number must be specified:
http://www.newlisp.org/guiserver/guiserver.lsp.html
scroll down to the chapter "Application start"
http://www.newlisp.org/guiserver/guiserver.lsp.html
scroll down to the chapter "Application start"
- Sun Nov 19, 2017 2:25 pm
- Forum: newLISP in the real world
- Topic: parameter for http only
- Replies: 6
- Views: 5815
Re: parameter for http only
In newLISP version 10.7.4 a new server mode using the -http-safe flag on server start will suppress HTTP PUT and DELETE requests. This will cause 'write-file and delete-file with url', 'put-url' and 'delete-url' functions issued from a newLISP client to return the text message "Server in safe mode"....
- Fri Nov 17, 2017 7:00 am
- Forum: newLISP in the real world
- Topic: parameter for http only
- Replies: 6
- Views: 5815
Re: parameter for http only
File modifying functions are available on purpose. The 'http' mode is used to run newLISP as a web server, which needs to have read-write access to the filesystem. But you can redefine protected function symbols using 'constant': > (constant 'write-file (fn () (throw-error "function not allowed"))) ...
- Mon Oct 09, 2017 5:12 pm
- Forum: newLISP newS
- Topic: Development release newLISP v.10.7.3
- Replies: 7
- Views: 10815
Development release newLISP v.10.7.3
Development release newLISP v.10.7.3 fixes bugs and adds a non-blocking option to 'read-key'.
http://www.newlisp.org/downloads/development/
http://www.newlisp.org/downloads/develo ... lease.html
This release is the base for a stable release 10.7.4 in January 2018.
http://www.newlisp.org/downloads/development/
http://www.newlisp.org/downloads/develo ... lease.html
This release is the base for a stable release 10.7.4 in January 2018.
- Wed Aug 23, 2017 2:54 pm
- Forum: newLISP in the real world
- Topic: Does struct support only up to 32 parameters?
- Replies: 3
- Views: 3795
Re: Does struct support only up to 32 parameters?
As you have seen, one can use ‘pack’ and ‘unpack’ alone to access data in a structure. You just need to have good C-language knowledge and know where filler/alignment bytes have to be inserted and be familiar with address arithmetic and usage in C. E.g. arrays in C are simply pointers to memory wher...
- Mon Aug 21, 2017 8:02 pm
- Forum: newLISP in the real world
- Topic: Does struct support only up to 32 parameters?
- Replies: 3
- Views: 3795
Re: Does struct support only up to 32 parameters?
You cannot have more than 32 members in the top level of a structure. Use sub-structs to pack more together. newLISP v.10.7.3 64-bit on OSX IPv4/6 UTF-8 libffi, options: newlisp -h > (apply struct (cons 'b (flat (dup (list "char") 32)))) b > (length (pack b)) 32 > (struct 'comp "b" "b") comp > (leng...
- Mon Aug 21, 2017 8:01 pm
- Forum: newLISP in the real world
- Topic: Why is the behavior of "trim" function so strange?
- Replies: 11
- Views: 9051
Re: Why is the behavior of "trim" function so strange?
See last paragraph here:
http://www.newlisp.org/downloads/develo ... 10.7.3.txt
So the 10.7.3 now is more forgiving when a string contains zero characters, which it should'nt in perfect ASCII or UTF-8 where the zero character marks the end of the string.
http://www.newlisp.org/downloads/develo ... 10.7.3.txt
So the 10.7.3 now is more forgiving when a string contains zero characters, which it should'nt in perfect ASCII or UTF-8 where the zero character marks the end of the string.
- Sat Aug 19, 2017 4:42 pm
- Forum: newLISP in the real world
- Topic: Why is the behavior of "trim" function so strange?
- Replies: 11
- Views: 9051
Re: Why is the behavior of "trim" function so strange?
'trim' was overrunning memory when all characters in string < 32 (space).
Fixed here:
http://newlisp.nfshost.com/downloads/de ... nprogress/
Fixed here:
http://newlisp.nfshost.com/downloads/de ... nprogress/
- Fri Aug 11, 2017 4:17 pm
- Forum: newLISP in the real world
- Topic: Is this newLISP's bug?
- Replies: 4
- Views: 4691
Re: Is this newLISP's bug?
Also note, that 'struct' take C-language struct types. "long" on the 32-bit version of newLISP is 32-bit wide but 64-bit wide on the 64-bit version of newLISP. To specify a 32-bit wide signed data type specify "int" which will be 32-bit on both versions of newLISP, or "long long" which will be 64-bi...
- Fri Aug 11, 2017 4:02 pm
- Forum: newLISP in the real world
- Topic: Is this newLISP's bug?
- Replies: 4
- Views: 4691
Re: Is this newLISP's bug?
The funtion 'struct' is only available on the extended ffi enabled versions. The 32-bit version was compiled without it. Here update 32-bit with ffi:
http://newlisp.nfshost.com/downloads/de ... nprogress/
http://newlisp.nfshost.com/downloads/de ... nprogress/
- Fri Aug 11, 2017 2:55 pm
- Forum: Anything else we might add?
- Topic: key-pressed or (read function with a time out
- Replies: 5
- Views: 6817
Re: key-pressed or (read function with a time out
Both, 32-bit and 64-bit now here: http://www.newlisp.org/downloads/develo ... nprogress/
- Fri Aug 11, 2017 1:33 pm
- Forum: Anything else we might add?
- Topic: key-pressed or (read function with a time out
- Replies: 5
- Views: 6817
Re: key-pressed or (read function with a time out
You can find an executable Windows version here:
http://newlisp.nfshost.com/downloads/de ... nprogress/
http://newlisp.nfshost.com/downloads/de ... nprogress/
- Thu Aug 10, 2017 3:36 pm
- Forum: Anything else we might add?
- Topic: key-pressed or (read function with a time out
- Replies: 5
- Views: 6817
Re: key-pressed or (read function with a time out
In version 10.7.3 a 'true' flag parameter in 'read-key' enables non-blocking behavior. When using '(read-key true)' a 0 (zero) is returned when no key was pressed or the key code is returned when a key was pressed. http://newlisp.nfshost.com/downloads/development/inprogress/ Tested on macOS, Ubuntu ...
- Wed Aug 09, 2017 2:55 pm
- Forum: newLISP Graphics & Sound
- Topic: Postscript page size: plywood sheet for CNC routing.
- Replies: 5
- Views: 6101
Re: Postscript page size: plywood sheet for CNC routing.
Oops, there is no ‘ps:canvas’ only a ‘cv:canvas’ in the canvas.lsp module. I use the following code in all of my http://www.newlisp.org/art/ drawings to create either .html or .ps output with the same code. The ‘(set 'ps cv)’ statement makes the postscript code work with the canvas.lsp module. #!/us...
- Wed Aug 09, 2017 1:44 am
- Forum: newLISP Graphics & Sound
- Topic: Postscript page size: plywood sheet for CNC routing.
- Replies: 5
- Views: 6101
Re: Postscript page size: plywood sheet for CNC routing.
You can convert a postscript file to a pdf file using the ghostscript utility ‘gs’ (unix). The command lets you specify the points per inch and resolution and size of the pdf file in points. I use the following to convert ps files to pdf files for printing 8.25 by 11 inch paper images: gs -sDEVICE=p...
- Tue Aug 08, 2017 2:27 pm
- Forum: newLISP and the O.S.
- Topic: unusual (print buffering on FreeBSD
- Replies: 4
- Views: 6029
Re: unusual (print buffering on FreeBSD
In newLISP version 10.7.3 ‘print’ to standard out will also flush on macOS and other BSDs:
http://newlisp.nfshost.com/downloads/de ... nprogress/
http://newlisp.nfshost.com/downloads/de ... nprogress/
- Tue Aug 01, 2017 7:22 pm
- Forum: Whither newLISP?
- Topic: why setf don't work?
- Replies: 1
- Views: 5261
Re: why setf don't work?
Thanks for this discovery, the protection status of RECT should'nt be an issue in that expression as only the evaluation result of it is changed in place. Fixed now: newLISP v.10.7.3 64-bit on OSX IPv4/6 UTF-8 libffi, options: newlisp -h > (struct 'RECT "long" "long" "long" "long") RECT > (setf ((un...
- Thu Jul 27, 2017 5:38 pm
- Forum: Anything else we might add?
- Topic: wanted (net-debug ...)
- Replies: 3
- Views: 4837
Re: wanted (net-debug ...)
Import ‘debugConsole’ from newlisp.dll and call it do reopen std I/O for newlisp.dll. This was introduced in the Windows version 10.3.2 of newLISP and is not documented.
- Thu Jul 13, 2017 3:54 pm
- Forum: Anything else we might add?
- Topic: Documentation improvements
- Replies: 1
- Views: 3799
Re: Documentation improvements
thanks for the documentation corrections:
http://www.newlisp.org/downloads/newlis ... .html#cilk
http://www.newlisp.org/CodePatterns.html#toc-15
http://www.newlisp.org/downloads/newlis ... .html#cilk
http://www.newlisp.org/CodePatterns.html#toc-15
- Wed Jul 05, 2017 11:19 pm
- Forum: Anything else we might add?
- Topic: Error in gsl.lsp ?
- Replies: 3
- Views: 4959
Re: Error in gsl.lsp ?
The string "Process newlisp speicherzugriffsfehler" in your output seems to indicate you are running a German localization of your operating system either change the 0.0 in gsl.lsp to 0,0 in the definition of gsl:CholeskyD or use a different locale or change to (float 0) to make the code work on all...