Search found 296 matches

by xytroxon
Thu May 31, 2012 8:26 am
Forum: newLISP in the real world
Topic: basic list understanding
Replies: 4
Views: 2501

Re: basic list understanding

Before you can advance, first take a step back... Readable working long form code you can understand is preferable to confusing non-working short form code you do not understand. While true lispers find my code below abhorrent, true lispers also find the idea of using newLISP itself abhorrent! (Note...
by xytroxon
Thu May 31, 2012 12:12 am
Forum: newLISP in the real world
Topic: goalseek (as in Excel)
Replies: 3
Views: 2404

Re: goalseek (as in Excel)

Also be sure to use floating point math functions for any calculations, that is: add sub mul div, instead of: + - * / http://www.newlisp.org/downloads/newlisp_manual.html#floating_point Floating point math and special functionsabs returns the absolute value of a number acos calculates the arc-cosine...
by xytroxon
Thu May 31, 2012 12:02 am
Forum: newLISP in the real world
Topic: goalseek (as in Excel)
Replies: 3
Views: 2404

Re: goalseek (as in Excel)

I have never used them, but you should be able to find what you want here: http://www.newlisp.org/downloads/newlisp_manual.html#financial Financial math functions fv returns the future value of an investment irr calculates the internal rate of return nper calculates the number of periods for an inve...
by xytroxon
Wed May 23, 2012 6:26 pm
Forum: newLISP in the real world
Topic: 2D game engine with newLisp
Replies: 29
Views: 12690

Re: 2D game engine with newLisp

If you enjoy doing it, and learn something from doing it, then it is worth doing. If it is a chore, and becomes a burden, then don't do it. This is known in popular culture as "following your bliss". Currently, I would have no interest in this project. But I could have a future interest if the proje...
by xytroxon
Tue May 15, 2012 8:02 am
Forum: newLISP in the real world
Topic: cleaning strings
Replies: 8
Views: 3652

Re: cleaning strings

You have a symbol quoting error... Use: (set 'input ... or: (setq input ... or (setf input ... but not: (setq 'input ... nor (setf 'input ... (setq and (setf are the same as using (set ' ----------------- We can then also add some regex to parse to force it to break on one or more whitespace chars {...
by xytroxon
Mon May 14, 2012 8:48 am
Forum: newLISP in the real world
Topic: cleaning strings
Replies: 8
Views: 3652

Re: cleaning strings

One method, is to parse the line into words, define a small? predicate, then use the clean function. The join function can be used to make a string again. (setq input (parse "a bb ccc dddd eeeee ffffff")) (println input) (define (small? x) (< (length x) 4)) (setq output (clean small? input)) (printl...
by xytroxon
Sat May 12, 2012 7:02 pm
Forum: Anything else we might add?
Topic: The March of Progress (in programming language syntax :)
Replies: 0
Views: 3024

The March of Progress (in programming language syntax :)

From Hacker News: http://alan.dipert.org/post/153430634/the-march-of-progress Comments: http://news.ycombinator.com/item?id=3963541 -------------------- The March of Progress * 1980: C printf("%10.2f", x); * 1988: C++ cout << setw(10) << setprecision(2) << showpoint << x; * 1996: Java java.text.Numb...
by xytroxon
Tue May 08, 2012 10:36 pm
Forum: newLISP newS
Topic: newLISP Stable Maintenance Release v.10.4.3
Replies: 5
Views: 6005

Re: newLISP Stable Maintenance Release v.10.4.3

Thanks... I saw in the "cryptp.lsp" source file: (import library "MD5") (import library "RIPEMD160") (import library "SHA1") (import library "SHA256") ... and missed (the next line ;o): ;; @syntax (crypto:md5 <string> <bool-raw>) Late night coding and time for larger View panel fonts in FreeCommande...
by xytroxon
Tue May 08, 2012 9:32 am
Forum: newLISP newS
Topic: newLISP Stable Maintenance Release v.10.4.3
Replies: 5
Views: 6005

Re: newLISP Stable Maintenance Release v.10.4.3

This code: (module "crypto.lsp") (println (crypto:SHA1 "newLISP")) (exit) Crashes on Win 7: newLISP v.10.4.3 on Win32 IPv4/6 libffi, execute 'newlisp -h' for more info. Problem signature: Problem Event Name: APPCRASH Application Name: newlisp.exe Application Version: 0.0.0.0 Application Timestamp: 4...
by xytroxon
Thu Apr 12, 2012 5:54 pm
Forum: newLISP in the real world
Topic: Integer comparison bug
Replies: 2
Views: 1687

Re: Integer comparison bug

Yeah, this showed up on reddit/programming about a PHP "bug"... '9223372036854775807' == '9223372036854775808' (bugs.php.net) submitted 4 hours ago by tjansson * 143 comments http://www.reddit.com/r/programming/comments/s6477/9223372036854775807_9223372036854775808/ The above link expounds on the i...
by xytroxon
Sun Mar 11, 2012 7:05 am
Forum: newLISP and the O.S.
Topic: Run a newLISP script as a Windows batch file: FINAL
Replies: 15
Views: 10291

Re: Run a newLISP script as a Windows batch file: FINAL

Run a newLISP code as ".cmd"-file(Windows 2000 and more) @rem Posted by alex from newlisp.org @newlisp.exe "%~f0" %* & goto :EOF # begin newlisp-program (println "Hello World!") (exit) # end newlisp-program The Windows cmd-exe parser skips leading whitespace, defined as semicolons, tabs, commas, an...
by xytroxon
Tue Feb 14, 2012 10:56 pm
Forum: newLISP and the O.S.
Topic: Run a newLISP script as a Windows batch file: FINAL
Replies: 15
Views: 10291

Re: Run a newLISP script as a Windows batch file: FINAL

I'm confused... Did you have problems with using this version in Code Snippets? -- xytroxon ---------------------------------- Code Snippets http://www.newlisp.org/index.cgi?page=Code_Snippets Run a newLISP script as a Windows batch file REM posted by Alex, adjusted by Fred REM @goto RUNLISP (printl...
by xytroxon
Tue Feb 14, 2012 10:38 pm
Forum: newLISP newS
Topic: newLISP Stable Release v.10.4.0
Replies: 13
Views: 11034

Re: newLISP Stable Release v.10.4.0

Keep up the good work!!!

-- xytroxon
by xytroxon
Tue Dec 27, 2011 7:26 am
Forum: Anything else we might add?
Topic: Merry Christmas to all forum members!
Replies: 2
Views: 3313

Re: Merry Christmas to all forum members!

And a Happy newLISP Year!!!
by xytroxon
Fri Dec 23, 2011 9:05 am
Forum: newLISP in the real world
Topic: [itn book] map+curry+inc unexpected behaviour on v10.3.3
Replies: 8
Views: 3560

Re: [itn book] map+curry+inc unexpected behaviour on v10.3.3

Cormullion's original work was a single html (or pdf) version users downloaded to their machines... The wikibooks version came later... Older users are more familiar of thinking in terms of "the Cormullion html/pdf rather than of "ITN"... With other's adding / editing content though, "ITN" becomes ...
by xytroxon
Fri Dec 02, 2011 8:31 am
Forum: newLISP newS
Topic: extended import and callback API
Replies: 10
Views: 6977

Re: extended import and callback API

Here is a better way, that doesn't need to mess with import... (define (import-ffi libname funclist) (dolist (func funclist) (eval (push import (push libname func))) ) ) (import-ffi "msvcrt.dll" '( ("atof" "double" "char*") ("atoi" "int" "char*") ; etc... ) ) -- xytroxon
by xytroxon
Thu Dec 01, 2011 8:16 am
Forum: newLISP newS
Topic: newLISP development release v.10.3.7
Replies: 5
Views: 4773

Re: newLISP development release v.10.3.7

On 64 bit Win 7 machines, 32 bit programs are installed in: "C:/Program Files (x86)/..." The cypto.lsp (and other?) module needs to add that path as shown below. (context 'crypto) ; set library to path-name of the library on your platform OS ; (set 'files '( "C:/Program Files/gnuwin32/bin/libeay32.d...
by xytroxon
Thu Dec 01, 2011 8:00 am
Forum: newLISP newS
Topic: extended import and callback API
Replies: 10
Views: 6977

Re: extended import and callback API

This is a great addition to newLISP!!! Some quick thoughts: ; An idea for dlls with multiple functions. To allow for a list ; in the second argument to define a dll's functions as a group. ; So to improve readability and reduce typing errors when ; adding new functions from header source code and ; ...
by xytroxon
Sun Nov 06, 2011 7:38 am
Forum: newLISP and the O.S.
Topic: newLISP on Snow Leopard
Replies: 9
Views: 6805

Re: newLISP on Snow Leopard

Well, as a Windows user, I think what attracts people to Apple machines are their amazing good looking designs, and of course more importantly, what you find under the hair er. "what you find under the hood"... ;>)

Image


-- xytroxon
by xytroxon
Tue Oct 25, 2011 8:24 am
Forum: Whither newLISP?
Topic: Why no closures?
Replies: 8
Views: 11111

Re: Why no closures?

Lisp(s) make all mere mortals "morons" at some point...

-- xytroxon
by xytroxon
Tue Aug 23, 2011 8:44 am
Forum: Whither newLISP?
Topic: Any reason for not learning NewLisp as first Lisp?
Replies: 4
Views: 6742

Re: Any reason for not learning NewLisp as first Lisp?

LISP is used a lot by secret government funded R&D corporations and deep pocket Wall Street traders... The "real" LISP compilers cost lots of money... These tend to be huge systems in terms of the required support code base in order to run even simple code... Scheme compilers are used mainly by the ...
by xytroxon
Tue Aug 23, 2011 8:09 am
Forum: Whither newLISP?
Topic: newlisp on hacker news
Replies: 1
Views: 4453

newlisp on hacker news

Found this on my rss hackneyed er. "hacker" news feed from the weekend...

http://news.ycombinator.com/item?id=2909490

Looks like I missed all the fun! ;)

-- xytroxon
by xytroxon
Tue Apr 19, 2011 6:44 pm
Forum: Anything else we might add?
Topic: The Definition of Simple is a Complex Thing...
Replies: 2
Views: 3147

Re: The Definition of Simple is a Complex Thing...

After the "shedding" of the Python 2.x version "snake skin", the snake (Python 3) looks very much like the last, but the snake can't go back and comfortably wear (run) any of it's old snake skin scripts without the help of a good alterations tailor ;) In my case, Python 3 dropped future support of a...