Search found 156 matches

by newBert
Thu Jan 08, 2009 11:48 am
Forum: newLISP Graphics & Sound
Topic: TreeView and table
Replies: 7
Views: 8094

pjot wrote:Oops my bad, that should be libglib-2.0-0.dll.

So: (import "libglib-2.0-0.dll" "g_malloc").

I updated the program, can you check again?

Regards
Yes, now it works ... Fine !
Thanks
;o)
by newBert
Thu Jan 08, 2009 11:40 am
Forum: newLISP newS
Topic: Close NewLisp console window
Replies: 12
Views: 7820

Xytroxon, thanks for CHP !
It works fine and easily in a batch file.

:-)
by newBert
Thu Jan 08, 2009 10:53 am
Forum: newLISP Graphics & Sound
Topic: TreeView and table
Replies: 7
Views: 8094

The code is here: http://www.turtle.dds.nl/newlisp/tables.lsp Should run on MacOSX, Unix/Linux/BSD and Win32. Peter I've got an error (on WinXp-SP3): > "libgobject-2.0-0.dll" g_signal_connect_data <63A553B0> ERR: import function not found in function import : "g_malloc" > N.B.: the script (modified...
by newBert
Wed Jan 07, 2009 4:53 pm
Forum: newLISP newS
Topic: Close NewLisp console window
Replies: 12
Views: 7820

I think you should put

Code: Select all

(import "kernel32.dll" "FreeConsole")
(FreeConsole) 

in the first file, I mean in this case at he beginning of sgui.lsp

I used to act in that way with runtk.lsp...

P.S.: By the way, does the file sgui.lsp have something to do with wxWidgets ?
by newBert
Mon Jan 05, 2009 5:25 pm
Forum: newLISP newS
Topic: Close NewLisp console window
Replies: 12
Views: 7820

Here is a solution: put these lines at the beginning of the script to hide the console window (import "kernel32.dll" "FreeConsole") (FreeConsole) Or create a shortcut for the script with this in the target field : "C:\Program Files\newlisp\guiserver.jar" 47011 " <name_of_the_script> .lsp" ( right cl...
by newBert
Thu Jan 01, 2009 5:47 pm
Forum: Anything else we might add?
Topic: Happy new year
Replies: 1
Views: 2465

Happy new year

Happy new year to all NewLISPers !
by newBert
Mon Nov 24, 2008 3:21 pm
Forum: newLISP newS
Topic: development release newLISP v.9.9.95
Replies: 12
Views: 5817

Thanks, now it works !... What a quick correction !

:-)
by newBert
Mon Nov 24, 2008 3:12 pm
Forum: newLISP newS
Topic: development release newLISP v.9.9.95
Replies: 12
Views: 5817

Seems to work on 9.9.94 (a quick try before installing v.9.9.95) ... and on WinXP-SP3 ;-) newLISP v.9.9.94 on Win32 IPv4, execute 'newlisp -h' for more info. > (import "newlisp.dll" "newlispEvalStr") newlispEvalStr <6BD6B34D> > (get-string (newlispEvalStr "(+ 3 4)")) "7\n" > and on 9.9.95 newLISP v....
by newBert
Thu Nov 20, 2008 10:06 am
Forum: newLISP newS
Topic: Context madness bugs?
Replies: 3
Views: 2557

Also note the "setf" in the error. It's because 'setf' = 'setq' newLISP v.9.9.94 on Win32 IPv4, execute 'newlisp -h' for more info. > setq setq <40802D> > setf setf <40802D> > May be the explanation is in the newLISP Manual and Reference at 'delete' ;; in contexts, the quote may be omitted (delete ...
by newBert
Tue Nov 18, 2008 5:53 pm
Forum: Anything else we might add?
Topic: If it is Newlisp logo?
Replies: 5
Views: 4753

I think I'm becoming a real unquestionning newlisp fan ...
It's because of this wonderfull...... light, of course
;o)
by newBert
Fri Nov 14, 2008 4:55 pm
Forum: newLISP and the O.S.
Topic: How to call newLisp functions in DLL but not using Eval
Replies: 9
Views: 6310

I think you can create a DLL from a PureBasic program and then you should use it in NewLISP. I tackled PureBasic a little for a long time, before I got on with Freestyle Basic, and I think it's possible if my memory is still good . In any case it works with a Rebol script calling such a PureBasic DL...
by newBert
Mon Nov 10, 2008 10:59 am
Forum: Anything else we might add?
Topic: Before starting
Replies: 21
Views: 13289

It's an interesting challenge - learning one language from a book written about another. You're almost learning two languages at once... And why not! :) I learnt NewLISP (and Scheme, that I left on one side now to concentrate on newLISP) using a french Python tutorial, that I annotated with newLISP...
by newBert
Thu Oct 23, 2008 8:58 am
Forum: newLISP newS
Topic: How to use unqualified symbols as 'parameters'
Replies: 9
Views: 4519

Re: How to use unqualified symbols as 'parameters'

For: (setq black 0 white 1 blue 2) (constant (global 'black 'white 'blue)) Unless I missed it ;) It might be nice to have an enumeration list function(s). (enum 'black 0 'white 1 'blue 2) And or: (enum-global 'black 0 'white 1 'blue 2) -- xytroxon You can do: (constant (global 'black) 0 (global 'wh...
by newBert
Thu Oct 23, 2008 7:56 am
Forum: newLISP newS
Topic: How to use unqualified symbols as 'parameters'
Replies: 9
Views: 4519

Otherwise:

Code: Select all

(context 'C)

(define (f x y (mode 'black))
  (cond
    ((= mode 'blue)
        (+ x y))
    ((= mode 'white)
        (- x y))
    (true
        0)))

(context MAIN)
(C:f 1 2 'C:white)

(context 'Z)
(C:f 1 2 'C:blue)
produce:

Code: Select all

-1
3
by newBert
Thu Oct 23, 2008 7:45 am
Forum: newLISP newS
Topic: How to use unqualified symbols as 'parameters'
Replies: 9
Views: 4519

With:

Code: Select all

(define (f:f x y (mode 'black))
  (cond
    ((= mode 'blue)
        (+ x y))
    ((= mode 'white)
        (- x y))
    (true
        0)))

(f 1 2 'white)
I get:

Code: Select all

-1
which seems correct. But can I obtain the same result from another context than MAIN ?
by newBert
Wed Oct 22, 2008 7:40 am
Forum: newLISP Graphics & Sound
Topic: javaw.exe + 2 x newlisp.exe?
Replies: 1
Views: 3162

I'm not sure but maybe there is a 'newlisp.exe' for the newlisp-GS editor process and another 'newlisp.exe' for the newlisp console which is open in the editor ?
by newBert
Thu Oct 09, 2008 6:04 pm
Forum: Anything else we might add?
Topic: de-structuring in newLISP
Replies: 7
Views: 5504

;) always tempting! But then I liked what Rich Hickey (Mr Clojure) said in a comment on another blog somewhere - if you want others to respect your language, then respect their's too... Comparing can be also a token of respect, because of the interest that we take to learn and understand another la...
by newBert
Thu Oct 09, 2008 5:53 pm
Forum: Anything else we might add?
Topic: de-structuring in newLISP
Replies: 7
Views: 5504

Thanks for the links, I understand a little better now what it is about ... ... and I find Lutz's example (in NewLISP) clearer and more readable (and more "Lispic") than those in CloJure. CloJure (def flat "flat") (def tree '(("one" ("two")) "three" ((("four"))))) ;; Simple binding (like Common Lisp...
by newBert
Wed Oct 08, 2008 5:08 pm
Forum: Anything else we might add?
Topic: de-structuring in newLISP
Replies: 7
Views: 5504

Some things in CloJure can be done simply (more simply) in NewLISP e.g.: ;;; CloJure ;;; ; (defn my-zipmap [keys vals] ; (loop ; [map {} ; ks (seq keys) ; vs (seq vals)] ; (if (and ks vs) ; (recur (assoc map (first ks) (first vs)) ; (rest ks) ; (rest vs)) ; map))) ; ; (my-zipmap [:a :b :c] [1 2 3]) ...
by newBert
Tue Sep 30, 2008 9:17 am
Forum: Anything else we might add?
Topic: 99 bottles of beer on the wall
Replies: 18
Views: 12308

Cheers!Image
by newBert
Fri Sep 19, 2008 7:27 am
Forum: newLISP newS
Topic: set-nth on strings
Replies: 9
Views: 4506

This can work too:

Code: Select all

> (set 's "abc")
"abc"
> (replace (first s) s "z") ; or (replace (s 0) s "z")
"zbc"
:)
by newBert
Wed Sep 17, 2008 1:04 pm
Forum: newLISP newS
Topic: development release newLISP version 9.9.2
Replies: 17
Views: 6087

As for me I like the way NewLISP is developing. Some of my scripts, after all quickly modified, are really faster ! I realized this with my own eyes, without the help of any benchmarking :-) It's sure that all three set (s) (set, setq, setf) must be preserved, at least for readability and expressive...
by newBert
Thu Sep 11, 2008 1:58 pm
Forum: newLISP newS
Topic: Making true and nil functions...
Replies: 7
Views: 3260

Since 9.4.8 you already can do this, but have to start newlisp with the -x option: $ newlisp -x newLISP v.9.4.8 on OSX IPv4 UTF-8, execute 'newlisp -h' for more info. > (true 'y 'n) y > (nil 'y 'n) n > Personally, I find that less legible (or readable) than : newLISP v.9.4.8 on Win32 IPv4, execute ...
by newBert
Fri May 30, 2008 3:19 pm
Forum: Anything else we might add?
Topic: Lutz - feature request
Replies: 2
Views: 2497

Does this simple function (without 'cond' and predicates) would not be sufficient? (define (type x) ; returns the type of data (let (types '("boolean" "boolean" "integer" "float" "string" "symbol" "context" "primitive" "primitive" "primitive" "quote" "list" "lambda" "macro" "array")) (types (& 0xf (...
by newBert
Thu May 29, 2008 4:55 pm
Forum: newLISP newS
Topic: development release newLISP v.9.3.14
Replies: 13
Views: 6525

Re: development release newLISP v.9.3.14

Lutz wrote: • newLISP-GS with multitrack MIDI interface for internal synthesizer, see midi-demo.lsp and midi2-demo.lsp.
Super on WinXP with the appropriate soundbank !
Thanks Lutz