Search found 296 matches

by xytroxon
Wed Mar 27, 2019 2:42 am
Forum: newLISP and the O.S.
Topic: Newlisp-Apache-CGI Issues Again
Replies: 29
Views: 18082

Re: Newlisp-Apache-CGI Issues Again

I think the problem is that the command-line prompt and initial copyright banner output needs to be suppressed.

Change the line:

Code: Select all

#!C:\bin\newlisp\newlisp.exe
To:

Code: Select all

#!C:\bin\newlisp\newlisp.exe -c
-- xytroxon
by xytroxon
Wed May 24, 2017 6:05 am
Forum: newLISP and the O.S.
Topic: Guiserver on Win10
Replies: 10
Views: 12095

Re: Guiserver on Win10

If I remember correctly, you have to install Java on Ubuntu first. Check to see if you have Java istalled.

Code: Select all

>java -version

java version "1.7.0_131"
OpenJDK Runtime Environment (IcedTea 2.6.9) (7u131-2.6.9-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)
-- xytroxon
by xytroxon
Sun Mar 19, 2017 9:55 pm
Forum: newLISP newS
Topic: newLISP in a browser
Replies: 115
Views: 133810

Re: newLISP in a browser

Found this. Might be as simple as setting a flag! http://webassembly.org/docs/faq/ What’s the story for Emscripten users? Existing Emscripten users will get the option to build their projects to WebAssembly, by flipping a flag. Initially, Emscripten’s asm.js output would be converted to WebAssembly,...
by xytroxon
Thu Oct 15, 2015 5:34 pm
Forum: newLISP in the real world
Topic: leave-string: any idea for simplifying?
Replies: 4
Views: 6557

Re: leave-string: any idea for simplifying?

A potential problem exists in handling UTF-8 string values in UTF-8 enabled versions of newLISP. In UTF-8 versions, the length function would return the number of bytes and not the number of UTF-8 characters in the string. Hence, your function would not return the correct number of characters from y...
by xytroxon
Mon Sep 28, 2015 6:41 am
Forum: newLISP newS
Topic: newLISP v.10.6.4 development
Replies: 12
Views: 16497

Re: newLISP v.10.6.4 development

Lutz to the rescue!!! Adding "cdecl" to import works for all 32bit versions of newLISP I have on my Win7 system. Below is an emergency working version of curl.lsp, (you may want to wait until kosh fixes his code and tests it more ;>) While the cURL website has both 32 and 64 bit dlls, the sqlite3 we...
by xytroxon
Sun Sep 27, 2015 11:19 pm
Forum: newLISP newS
Topic: newLISP v.10.6.4 development
Replies: 12
Views: 16497

Re: newLISP v.10.6.4 development

Okay, I tried Kosh's code and (curl-version) "libcurl") always works, but crashes on (curl-easy-escape "newlisp.org/?q=index.html#123") or (curl-get "http://localhost/wiki/") Compiled 10.6.4 on Win 7 without FFI enabled and it has the same hang problem! As protozen noted, this code works on 10.6.2 o...
by xytroxon
Sun Sep 27, 2015 9:24 pm
Forum: newLISP newS
Topic: newLISP v.10.6.4 development
Replies: 12
Views: 16497

Re: newLISP v.10.6.4 development

That sucks!

Another thing to check is that ostype "Win32" was changed to "Windows"

kosh's cURL module has both "Win32" "Windows" so should work?
https://github.com/kosh04/newlisp-curl

-- xytroxon
by xytroxon
Sat Sep 26, 2015 7:11 am
Forum: Anything else we might add?
Topic: newLISP mentioned on Hacker News!
Replies: 0
Views: 6749

newLISP mentioned on Hacker News!

Hacker News: newLISP https://news.ycombinator.com/item?id=10279266 newLISP doesn't use linked lists??? (I always secretly suspected Lutz was a C "source"-rer! ;O) --xytroxon Update: The "leg lifting" was continued by reddit HackerNews topic thieves. https://www.reddit.com/r/programming/comments/3mcz...
by xytroxon
Sat Sep 26, 2015 7:01 am
Forum: newLISP in the real world
Topic: [patch] system variables $main-args-load-ix, $load-list
Replies: 9
Views: 10144

Re: [patch] system variables $main-args-load-ix, $load-list

Hi Hartrock! I should of said that the use of unique in my x-load x-import functions would be done at the C code level, inside of the newLISP load and import functions. This pseudo code was written to show how the $libs list would look after preventing multiple loads from blowing up the $libs list s...
by xytroxon
Sat Sep 26, 2015 6:46 am
Forum: newLISP newS
Topic: newLISP v.10.6.4 development
Replies: 12
Views: 16497

Re: newLISP v.10.6.4 development

with 10.6.3 and 10.6.4 on windows newlisp crashes when trying to make ffi calls - I've not tested various libraries but curl.lsp definitely crashes. Hi protozen! sqlite3.lsp and sqlite3.dll work fine on my Win7 system (with both versions of newLISP). Did you install 64 bit newLISP version? 32 bit d...
by xytroxon
Wed Sep 23, 2015 9:37 pm
Forum: newLISP in the real world
Topic: [patch] system variables $main-args-load-ix, $load-list
Replies: 9
Views: 10144

Re: [patch] system variables $main-args-load-ix, $load-list

Just do a unique list operation after each file path is added. (set '$libs nil) (define (add-lib fp) (set '$libs (unique (push fp $libs -1))) (println fp "-> " $libs) ) (define (x-load fp) (add-lib fp) ) (define (x-import fp) (add-lib fp) ) (println "Load a newLISP module") (println "Load File -> $l...
by xytroxon
Wed Sep 23, 2015 7:09 am
Forum: newLISP in the real world
Topic: [patch] system variables $main-args-load-ix, $load-list
Replies: 9
Views: 10144

Re: [patch] system variables $main-args-load-ix, $load-list

Good work! In keeping with Lutz's succinct newLISP key word naming scheme, (as opposed to Scheme's the-longer-the-run-on-key-word-the-better approach ;o), I would rename $main-args-load-ix to either of the more simply remembered mnemonics: $libraries or $libs Also does/should your code include impor...
by xytroxon
Sun Sep 20, 2015 6:15 am
Forum: newLISP newS
Topic: newLISP Development Release v.10.6.3
Replies: 30
Views: 35506

Re: newLISP Development Release v.10.6.3

newLISP manual spelling error.

delete-url
syntax: (delete-file str-url)
by xytroxon
Tue Sep 15, 2015 4:36 pm
Forum: newLISP in the real world
Topic: script dir detection: any ideas for improvement?
Replies: 7
Views: 7930

Re: script dir detection: any ideas for improvement?

Ugh! Of course the "current working directory" is easily found with real-path (set 'current-dir (real-path)) > C:\\Users\\Apps\\newlisp\\work (change-dir "..") > true (set 'current-dir (real-path)) > C:\\Users\\Apps\\newlisp PS: Both of your code fragments are problematic on Windows ;o) --xytroxon
by xytroxon
Tue Sep 15, 2015 7:23 am
Forum: newLISP in the real world
Topic: script dir detection: any ideas for improvement?
Replies: 7
Views: 7930

Re: script dir detection: any ideas for improvement?

On windows, when my newLISP script is executed from a .bat or .cmd file, I can use: (main-args) > ("C:\\Program Files (x86)\\newlisp\\newlisp.exe" "C:\\Users\\Apps\\newlisp\\work\\test.lsp") (set 'script_name (last (parse (main-args 1) "\\"))) > test.lsp (set 'script_dir (join (0 -1 (parse (main-arg...
by xytroxon
Thu Sep 10, 2015 11:51 pm
Forum: newLISP in the real world
Topic: "save" makes improper [text] strings; impossible to reload
Replies: 26
Views: 16911

Re: "save" makes improper [text] strings; impossible to relo

While being destructive, the extend function also has variable history to worry about! To use the extend function in the save output to avoid side effects when executing the load function, res MUST be explicitly RESET to nil or "the empty string" to prevent seemingly random "string errors" from occu...
by xytroxon
Sun Jul 19, 2015 9:47 pm
Forum: newLISP newS
Topic: newLISP Development Release v.10.6.3
Replies: 30
Views: 35506

Re: newLISP Development Release v.10.6.3

After spending a couple of hours in a time warp after an unexpected date-value function crash in a weekly archive program I run. ((( Yes, I NOW know about: http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=16&t=4725 (PLEASE, post about devlopment release errors in the development release threa...
by xytroxon
Sun Jul 12, 2015 6:38 am
Forum: newLISP newS
Topic: newLISP Development Release v.10.6.3
Replies: 30
Views: 35506

Re: newLISP Development Release v.10.6.3

I noticed that just below that section, in the "Registering callbacks" section.

Code: Select all

(set 'LIBRARY (if (= ostype "Win32") "newlisp.dll" "newlisp.dylib"))
and...

Code: Select all

(set 'CALLTYPE (if (= ostype "Win32") "stdcall" "cdecl"))
The ostype string being compared should be changed to "windows".

-- xytroxon
by xytroxon
Thu Jul 02, 2015 6:42 am
Forum: newLISP in the real world
Topic: [bof?] ++ nil val in hashmap fails -> feature
Replies: 5
Views: 5455

Re: [bof?] ++ nil val in hashmap fails

You could also use newLISP eval-string.

Code: Select all

> (setq id "bar")
> (eval-string (string "(++ hm:" id ")")))
> 1

> (define (++hm id) (eval-string (string "(++ hm:" id ")")))
> (++hm "foo"))
> 1

-- xytroxon
by xytroxon
Tue Jun 30, 2015 3:52 pm
Forum: newLISP in the real world
Topic: [bof?] ++ nil val in hashmap fails -> feature
Replies: 5
Views: 5455

Re: [bof?] ++ nil val in hashmap fails

Just use this direct form, no need for (new Tree 'hm), it is created auto-magically ;o)

Code: Select all

> (++ iter:baz)
> 1
-- xytroxon
by xytroxon
Wed Jun 17, 2015 4:09 pm
Forum: newLISP Graphics & Sound
Topic: wiki: The missing (https) link?
Replies: 2
Views: 5657

wiki: The missing (https) link?

The web is evolving rapidly towards using https links for their website content. e.g. github etc... Currently, the newLISP wiki only allows for cold blooded reptilian Jurassic style [http://... ] links. newLISP wiki needs to adapt to the new "https everywhere*" life forms or... face extinction as a ...
by xytroxon
Sat May 02, 2015 10:19 pm
Forum: newLISP in the real world
Topic: stack trace in newlisp for debugging?
Replies: 8
Views: 5778

Re: stack trace in newlisp for debugging?

rickyboy wrote:Just being a lurker from afar: thank you all -- Ralph, Ted and Lutz -- for your attention to this issue. Please know it's much appreciated by the rest of newlisperdom.
Ditto! ;p)

-- xytroxon
by xytroxon
Sat Apr 11, 2015 8:31 pm
Forum: newLISP and the O.S.
Topic: mingw64 build patch
Replies: 22
Views: 19499

Re: mingw64 build patch

Doing a write-file of the "test" string shows no premature shortening of the string or any extra "odd" chars in the file on disk. (write-file "test.txt" test) But reading and printing the file has the same display failure. (print (read-file "test.txt")) So maybe the problem lies within the print fun...
by xytroxon
Sat Apr 11, 2015 5:11 pm
Forum: newLISP and the O.S.
Topic: mingw64 build patch
Replies: 22
Views: 19499

Re: mingw64 build patch

Hi Lutz! This Win64 version is noticeably faster than the Win32 version - like 7 times faster for some string operations!!! Then I noticed I was having some missing output using either newlisp64.exe or newlisp64utf8.exe. Assuming an 80 character x 25 line console display - the following code should ...
by xytroxon
Sun Feb 22, 2015 1:12 am
Forum: newLISP in the real world
Topic: newlisp-apache-win7
Replies: 26
Views: 13311

Re: newlisp-apache-win7

These shebang forms all fail: #!C:\Program Files (x86)\newlisp\newlisp.exe #!"C:\Program Files (x86)\newlisp\newlisp.exe" #!"C:/Program Files (x86)/newlisp/newlisp.exe" http://localhost/test.lsp #!C:\Program Files (x86)\newlisp\newlisp.exe (print "Content-type: text/html\n\n" "<html>\n" "<head>\n" "...