Search found 136 matches

by hartrock
Thu Mar 17, 2016 12:08 pm
Forum: newLISP newS
Topic: mem leak in v10.7.1
Replies: 2
Views: 7400

mem leak in v10.7.1

sr@freen:~/newLISP_Core/mirror$ ./newlisp newLISP v.10.7.1 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h > (set 'v nil 'r (string "foo")) (sys-info 0) "foo" 442 > (set 'v nil 'r (string "foo")) (sys-info 0) "foo" 443 > ;; no mem leak: (set 'r (string "foo")) (sys-info 0) "foo" 443 > Same...
by hartrock
Sat Feb 20, 2016 4:58 pm
Forum: newLISP Graphics & Sound
Topic: Inspector v.0.4.2
Replies: 0
Views: 5870

Inspector v.0.4.2

  • symbols view: more detailed info about dynsyms Remote Inspector: dynamic symbols (dynsyms)
  • permanently show PID of remote and remote's status
  • better interrupt handling: now it works for remote startup code given by startup arguments, too.
Project page:
https://github.com/hartrock/Inspector
by hartrock
Thu Feb 11, 2016 9:21 pm
Forum: newLISP Graphics & Sound
Topic: Inspector v.0.4: Remote Inspector
Replies: 1
Views: 4736

Inspector v.0.4: Remote Inspector

Inspector v0.4 Inspector is suited now for inspecting behavior - output, symbols - of developer's newLISP code running in a *remote* newLISP process. It only needs newLISP and a browser. Remote Inspector Working horse application of Inspector is 'Remote Inspector' (RI); it consists of three parts: ...
by hartrock
Fri Jan 29, 2016 7:58 pm
Forum: newLISP newS
Topic: newLISP v.10.7.0 Stable Release
Replies: 21
Views: 21120

wrong version numbers [Re: newLISP v.10.7.0 Stable Release]

Title of http://www.newlisp.org/downloads/newLIS ... lease.html is
newLISP v.1.7.0 Release Notes...
At bottom there is
- development version 1.64
- guiserver.jar version 1.65 (probably wrong, too),
.

Besides this: Thanks for the ongoing work!
by hartrock
Sat Jan 09, 2016 12:57 am
Forum: newLISP in the real world
Topic: segfault, if trying to switch to illegal context *twice*
Replies: 1
Views: 4765

segfault, if trying to switch to illegal context *twice*

Code: Select all

sr@freen:~$ newlisp
newLISP v.10.6.5 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h

> (set 's (sym "Foo bar" MAIN))
Foo bar
> (context s)

ERR: invalid parameter in function context : "Foo bar"
> (context s)
Segmentation fault
by hartrock
Sun Dec 20, 2015 11:45 pm
Forum: newLISP in the real world
Topic: [BoF] error after deleting var ctx part of dyn sym
Replies: 7
Views: 7827

Re: [BoF] error after deleting var ctx part of dyn sym

[Update with full example] Unfortunately I have to put some water into the wine... newLISP v.10.6.5 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h > (set 'sy nil) (set 'foo MAIN) (define (f) (foo:println 'sy:bar)) (delete 'sy) f nil MAIN (lambda () (foo:println 'sy:bar)) true (lambda () (n...
by hartrock
Sun Dec 20, 2015 11:02 pm
Forum: newLISP in the real world
Topic: [BoF] error after deleting var ctx part of dyn sym
Replies: 7
Views: 7827

Re: [BoF] error after deleting var ctx part of dyn sym

Thanks, Lutz!

By your fix a 'Bus error' related to this problem has disappeared, too (in a more complex scenario: had just given a minimal version to trigger the problem).
by hartrock
Sun Dec 20, 2015 4:35 pm
Forum: newLISP and the O.S.
Topic: [module crypto.lsp] Debian jessie: path to be added
Replies: 1
Views: 4928

[module crypto.lsp] Debian jessie: path to be added

I had to add to NEWLISP_DIR/modules/crypto.lsp :

Code: Select all

"/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0" ; Debian jessie
There is an already existing path, if libssl-dev has been installed, but not without (which I noticed after a fresh OS install).
by hartrock
Sun Dec 20, 2015 3:52 am
Forum: newLISP in the real world
Topic: [BoF] error after deleting var ctx part of dyn sym
Replies: 7
Views: 7827

[BoF] error after deleting var ctx part of dyn sym

While looking deeper into the semantics of dynamic symbols, there has been this unexpected behavior: sr@freen:~/newLISP$ newlisp newLISP v.10.6.5 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h > (set 'sy nil) (define (f) (println 'sy:bar)) (delete 'sy) (f) nil (lambda () (println 'sy:bar))...
by hartrock
Tue Oct 27, 2015 6:50 am
Forum: Anything else we might add?
Topic: letn semantics for default vals and set: stable feature?
Replies: 10
Views: 15709

Re: letn semantics for default vals and set: stable feature?

that let and letex are the exception of a general left to right evaluation for setting symbols? Or is it more complicated? เล่นจีคลับผ่านเว็บ let and letex are using the outer binding of given symbols for initialization; e.g.: sr@free:~$ newlisp newLISP v.10.6.4 64-bit on Linux IPv4/6 UTF-8 libffi,...
by hartrock
Sat Oct 17, 2015 1:52 am
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 ...
by hartrock
Fri Oct 16, 2015 11:39 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?

Not really simpler, but the negative index case would be slightly shorter with the following. ((length 0 pos str) str) Thanks for the suggestion! Corrected it is: ((length (0 pos str)) str) ; which is shorter and easier to understand than: ((- (min (- pos) (length str))) str) The longer variant avo...
by hartrock
Sun Oct 11, 2015 5:19 pm
Forum: newLISP in the real world
Topic: leave-string: any idea for simplifying?
Replies: 4
Views: 6557

leave-string: any idea for simplifying?

There is the following function leave-string for leaving left (positive pos) or right (negative pos) part of a string, which works for pos out of range, too: > (define (leave-string str pos) (if (>= pos 0) (0 pos str) ((- (min (- pos) (length str))) str))) ;; (set 'str "foobar") (leave-string str 3)...
by hartrock
Fri Oct 02, 2015 6:56 pm
Forum: Whither newLISP?
Topic: do newlisp support some callback like method_missing?
Replies: 1
Views: 10395

Re: do newlisp support some callback like method_missing?

This reminds me on Smalltalk's #messageNotUnderstood selectors. Here is something similar for newLISP FOOPs; due to not having messages, but function calls, there is the renaming to callNotUnderstood . After loading cnu.lsp: (new Class 'Foo) (context Foo) (define (fun) (string "FOOP: " (self) ", cal...
by hartrock
Fri Oct 02, 2015 1:38 pm
Forum: Whither newLISP?
Topic: Why first lambda expression is args
Replies: 1
Views: 5199

Re: Why first lambda expression is args

I think first lambda expression should is 'lambda: > (first (lambda (x y) (+ x y))) lambda > (first (fn (x y) (+ x y))) fn > 'lambda lambda > 'fn fn > (cons 'fn '((x y) (+ x y))) (fn (x y) (+ x y)) Why newLISP use args as first elements of lambda expression? Why could not quote *lambda* and *fn*? l...
by hartrock
Wed Sep 30, 2015 8:49 am
Forum: newLISP in the real world
Topic: [patch] system variables $main-args-load-ix, $load-list
Replies: 9
Views: 10126

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

As I see it, the argument for addressing this part of the interpreter is to make it possible to build a generic modularization support framework that avoids everyone having to hard code the modularization into every application. Introducing $main-args-load-ix is a no-brainer to me, as long as there...
by hartrock
Mon Sep 28, 2015 6:45 pm
Forum: Anything else we might add?
Topic: letn semantics for default vals and set: stable feature?
Replies: 10
Views: 15709

Re: letn semantics for default vals and set: stable feature?

Evaluation order in general is always depth first from left to right . See also here: https://en.wikipedia.org/wiki/Tree_traversal If you want to change that order you would write a fexpr using the define-macro function, which does not evaluate arguments on function entry. Thanks for clarification....
by hartrock
Mon Sep 28, 2015 8:31 am
Forum: Anything else we might add?
Topic: letn semantics for default vals and set: stable feature?
Replies: 10
Views: 15709

Re: letn semantics for default vals and set: stable feature?

> (define (foo (a a)) a) (lambda ((a a)) a) > (foo) 123 > (letn (a a) a) 123 > (letex (a a) a) 123 > (let (a a) a) 123 Thanks for the example, where symbol a refers to different environments: inner new environment and outer one, where it has 123 value (inner val gets outer val assigned here). I alr...
by hartrock
Sat Sep 26, 2015 5:09 pm
Forum: Anything else we might add?
Topic: letn semantics for default vals and set: stable feature?
Replies: 10
Views: 15709

Re: letn semantics for default vals and set: stable feature?

It's good to know for sure, that things like: (define (do str , (len (length str))) ...) (set 'str "foo" 'len (length str)) are working reliably. For bind with evaluation it is left to right, too: > (define-macro (foo) (local (a1 a2 a3) (bind (args) true) (println "a1: " a1 ", a2: " a2 ", a3: " a3))...
by hartrock
Sat Sep 26, 2015 11:55 am
Forum: Anything else we might add?
Topic: letn semantics for default vals and set: stable feature?
Replies: 10
Views: 15709

letn semantics for default vals and set: stable feature?

It could be helpful to mention in the manual (haven't found it), that setting symbols by 'Default variable values' ( http://www.newlisp.org/CodePatterns.html#toc-4 ) or set goes from left to right, honoring the values of symbols already set: this is letn semantics (in contrast to let 'using symbol b...
by hartrock
Sat Sep 26, 2015 10:45 am
Forum: newLISP in the real world
Topic: [patch] system variables $main-args-load-ix, $load-list
Replies: 9
Views: 10126

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

Hello Xytroxon, 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 would not help, if the name of some repeatedly loaded source continuously changes: e.g. by having some version info (could ...
by hartrock
Fri Sep 25, 2015 4:49 am
Forum: newLISP in the real world
Topic: trial to get script info from outside interpreter core
Replies: 0
Views: 5591

trial to get script info from outside interpreter core

There has been a trial to get some script info - e.g. for getopts - from outside interpreter core: ;; ;; script properties ;; - could become part of getopts or an own module ;; ;; *** old basename (now scriptname) too limited *** ;; ;;;; works for both newLisp and #!/.../newlisp ;;(define (basename)...
by hartrock
Thu Sep 24, 2015 5:16 am
Forum: newLISP in the real world
Topic: [patch] system variables $main-args-load-ix, $load-list
Replies: 9
Views: 10126

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

Just do a unique list operation after each file path is added. This is a good example for what can well be done from outside the interpreter (you could check for loading the same lib with same path twice, too). But in Lutz' example such a solution (with keeping list small by unique added) just woul...
by hartrock
Wed Sep 23, 2015 6:12 pm
Forum: newLISP in the real world
Topic: [patch] system variables $main-args-load-ix, $load-list
Replies: 9
Views: 10126

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

I understand the occasional necessity to remember the names of files loaded, but this should not be built-in to the language. What happens with applications which reload files over and over again to refresh or change a set of data or function definitions? This would make the the stack of filenames ...
by hartrock
Tue Sep 22, 2015 9:45 pm
Forum: newLISP in the real world
Topic: [patch] system variables $main-args-load-ix, $load-list
Replies: 9
Views: 10126

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

Here is a patch providing system variables $main-args-load-ix and $load-list . These system variables provide system information, which is difficult to compute outside the interpreter code, but easy from inside, where all needed information is available. Patch against newlisp-10.6.4.tgz 2015-09-21 1...