## Search found 64 matches

Wed Jan 28, 2015 12:37 am
Forum: newLISP newS
Topic: newLISP stable release 10.6.2
Replies: 20
Views: 11796

### Re: newLISP stable release 10.6.2

Excellent, Lutz. Kudos for the quick announcement.
Sat Oct 25, 2014 12:15 pm
Forum: newLISP in the real world
Topic: (newbie) Listiness
Replies: 6
Views: 2709

### Re: (newbie) Listiness

Hi, Mark, The dolist iterates the list one element at a time. Because you're not printing in that loop, the interpreter is silently throwing away each internal result. Finally the result of the whole loop (its final evaluation) is shown by the interpreter, which is (() 5), as you would expect. For y...
Tue Apr 29, 2014 12:54 pm
Forum: newLISP in the real world
Topic: strange result with map and apply
Replies: 7
Views: 1882

### Re: strange result with map and apply

Not as veratile as cormullion's match solution, but works for the given example:

Code: Select all

``(map (curry map int) '(("1" "2" "3") ("4")))``
Mon Apr 28, 2014 1:19 am
Forum: newLISP in the real world
Topic: strange result with map and apply
Replies: 7
Views: 1882

### Re: strange result with map and apply

Ah, that makes sense. Thanks, Lutz.
Sat Apr 26, 2014 11:13 pm
Forum: newLISP in the real world
Topic: strange result with map and apply
Replies: 7
Views: 1882

### Re: strange result with map and apply

With:

Code: Select all

``(map (apply max) '((0 1 2) (3 4 5)))``
we see the expected error:

ERR: missing argument in function max

I don't know why we don't see this with the + function, but the solution to both cases is to use curry:

Code: Select all

``(map (curry apply +) '((0 1 2) (3 4 5)))``
Sat Mar 22, 2014 10:50 am
Forum: newLISP in the real world
Topic: regex \\d{n} problem
Replies: 9
Views: 1930

### Re: regex \\d{n} problem

Heh... I see, Cormullion. I felt that way about Perl before leaving her for Ruby (before newLISP and I met). Perl had a way of making you feel like a mad genius one day, and the village idiot the next. Jeffrey Friedl's Mastering Regular Expressions is a *really* good read. I highly recommend it. @hd...
Fri Mar 21, 2014 10:45 pm
Forum: newLISP in the real world
Topic: regex \\d{n} problem
Replies: 9
Views: 1930

### Re: regex \\d{n} problem

Aw, come now, Cormullion... Regular Expressions are beautiful and powerful.
Thu Mar 20, 2014 11:09 pm
Forum: newLISP in the real world
Topic: regex \\d{n} problem
Replies: 9
Views: 1930

### Re: regex \\d{n} problem

As with all regex engines, use anchors (like ^ and \$) to restrict the match to start/end boundaries: > (regex {\d{3}} "12343243242") ("123" 0 3) > (regex {^\d{3}} "12343243242") ("123" 0 3) > (regex {\d{3}\$} "12343243242") ("242" 8 3) > (regex {^\d{3}\$} "12343243242") nil > (regex {^\d{3}\$} "123") (...
Sat Mar 08, 2014 8:53 am
Forum: Whither newLISP?
Topic: fexpr issues
Replies: 18
Views: 8322

### Re: fexpr issues

Hi, Lutz,

In the last example box for (macro ...):

Code: Select all

``(define-macro (fexpr-double X) i``
Trailing i a vim oopsie? :-)
Wed Mar 05, 2014 7:48 am
Forum: Whither newLISP?
Topic: fexpr issues
Replies: 18
Views: 8322

### Re: fexpr issues

Lutz, re: the manual entry for (macro ...)

1. The signature still has 'define' instead of 'macro'.
2. "But macro definitions cannot be repeated for the same symbol during the sane newLISP session." (sane)
Sat Feb 15, 2014 4:12 am
Forum: Whither newLISP?
Topic: Ethereum
Replies: 38
Views: 16356

### Re: Ethereum

Excellent. That should sort things out, one way or another.
Fri Feb 14, 2014 6:58 am
Forum: Whither newLISP?
Topic: Ethereum
Replies: 38
Views: 16356

### Re: Ethereum

@TedWalther: I'm honestly not sure *what* Ethereum _wants_ from newLISP. Perhaps that's something @janeTA can clarify. I had assumed though they they were happy with their VM/API and were looking for others to ratify their party.
Wed Feb 12, 2014 3:23 am
Forum: Whither newLISP?
Topic: Ethereum
Replies: 38
Views: 16356

### Re: Ethereum

Interesting observation, Lutz. That has helped me make a tech decision I've been pondering for a week or so now; thanks! :-) But I must admit I am still confused about newLISP's possible Ethereum interface. Surely if there was a newLISP interface, it would be... newLISP... right? The causal non-prog...
Tue Feb 11, 2014 8:29 am
Forum: Whither newLISP?
Topic: Ethereum
Replies: 38
Views: 16356

### Re: Ethereum

I was forced to experience Forth in uni by my most excellent computer architecture lecturer, Terry Anstey. I was too young and naive to value the experience at the time, but I have just recently decided to remedy that failing. newLISP needs a killer-app; I don't know if this can be it or not. Sadly,...
Sun Jan 12, 2014 8:43 am
Forum: So, what can you actually DO with newLISP?
Topic: nlpeg - PEG parser generator
Replies: 0
Views: 2748

### nlpeg - PEG parser generator

Hi, newlispers, I wrote a PEG (Parsing Expression Grammar) parser for Vim (https://github.com/dahu/Vimpeg) a while ago and recently ported it to newLISP (https://github.com/dahu/nlpeg). I would love for you guys to review my work. I am new to lisp and expect that I have made some boo-boos along the ...
Thu Jan 02, 2014 10:56 pm
Forum: newLISP in the real world
Topic: Combining short and long opts in getopts module.
Replies: 0
Views: 1322

### Combining short and long opts in getopts module.

@TedWalther Thanks for the getopts.lsp module, Ted. Here is a macro for combining the definition of short and long options into a single call. The aim here is to DRY up option specification. My newLISP-fu in general and macro-fu in particular is not strong, so please elucidate any boo-boos. ;; @synt...
Thu Jan 02, 2014 10:38 pm
Forum: newLISP newS
Topic: newLISP in a browser
Replies: 115
Views: 85953

### Re: newLISP in a browser

You're tireless, Lutz! Awesome.
newLISP deserves a lot more attention; perhaps this move to the browser will help?

One thought I just had for this is to convert the newLISP manual example code segments into embedded, runable, modifiable, interactive learning tools.
Thu Dec 19, 2013 9:56 pm
Forum: newLISP in the real world
Topic: What benefits did you get from FOOP?
Replies: 9
Views: 2004

### Re: What benefits did you get from FOOP?

Newlisp's (F)OOP Inheritance: (new Class 'Person) (define (Person:name) (self 1)) (define (Person:salary) 0) (new Person 'Worker) (define (Worker:salary) (self 2)) (setf people '()) (push (Person "John Doe") people) (push (Worker "Jane Doe" 3000) people) (define (describe person) (string (:name pers...
Sun Jun 02, 2013 10:14 pm
Forum: newLISP newS
Topic: newlisp.vim 1.37
Replies: 5
Views: 8902

### Re: newlisp.vim 1.37

Wonderful. Thanks, Cyril.
Wed Mar 27, 2013 8:37 am
Forum: newLISP in the real world
Topic: Does newLISP have &rest and big numbers...?
Replies: 10
Views: 1999

### Re: Does newLISP have &rest and big numbers...?

newlisp has optional arguments (no need to point them out with a special keyword).
As I understand it, newlisp doesn't explicitly support keyword arguments although you could achieve a similar effect using association lists or hashes.
Sun Mar 24, 2013 2:53 am
Forum: Whither newLISP?
Topic: Howto Solve Context Collision
Replies: 12
Views: 6437

### Re: Howto Solve Context Collision

Excellent, Lutz. Those WP articles and the PDF helped a lot. Thanks! :-) Your example of handling separate concerns with contexts was clear. That reminds me of one of the GOF patterns... strategy? (I never got into the habit of quoting GOF patterns.) However, your example shows... completely separat...
Sat Mar 23, 2013 6:08 am
Forum: Whither newLISP?
Topic: Howto Solve Context Collision
Replies: 12
Views: 6437

### Re: Howto Solve Context Collision

Thanks, rickyboy! That helped a lot. I installed racket to see the difference. Hmm... This is premature of me to say so, but... I like the way newlisp does this better than racket. Which is to say... to my mind, that your are let ting x have another value before (g) is called, then it better show up...
Thu Mar 21, 2013 4:46 am
Forum: Whither newLISP?
Topic: Howto Solve Context Collision
Replies: 12
Views: 6437

### Re: Howto Solve Context Collision

Today, I believe that the problems with dynamic scoping are vastly exaggerated, which is sad, because people have stopped using dynamic scoping as a tool, exploiting its special characteristics, e.g.: switching and separation of concerns. Lutz... I would love to hear more about this. I am a struggl...
Wed Feb 06, 2013 6:20 am
Forum: newLISP newS
Topic: newLISP Development release 10.4.6
Replies: 11
Views: 10764

### Re: newLISP Development release 10.4.6

Hmm... Fair enough.

I see them as serving different purposes though. JSON is fine for machine-machine interfacing, but not well suited to human editing. YAML is much friendlier in that department.
Tue Feb 05, 2013 11:51 pm
Forum: newLISP newS
Topic: newLISP Development release 10.4.6
Replies: 11
Views: 10764

### Re: newLISP Development release 10.4.6

Very nice. Any plans for doing the same for yaml?