Search found 123 matches

by jopython
Mon Mar 24, 2014 10:11 pm
Forum: newLISP and the O.S.
Topic: Errors compiling 10.5.8 on Solaris 10 with gcc
Replies: 2
Views: 4038

Errors compiling 10.5.8 on Solaris 10 with gcc

Are these errors normal. $ make -f makefile_sunos gcc -m32 -Wall -pedantic -Wno-uninitialized -Wno-long-long -c -O2 -DSUNOS newlisp.c newlisp.c: In function `evaluateExpression': newlisp.c:1493: warning: ISO C90 forbids mixed declarations and code newlisp.c: In function `p_apply': newlisp.c:4686: wa...
by jopython
Thu Dec 19, 2013 12:10 am
Forum: newLISP in the real world
Topic: What benefits did you get from FOOP?
Replies: 9
Views: 4834

Re: What benefits did you get from FOOP?

What is DUMB about (openFile sourceFile)? It seems so natural to me. I think the real benefit of the features of what is called FOOP is the ability to overload functions. It always feel a little dumb to me to have to write e.g. (openFile sourceFile); FOOP features allow for writing (:open sourceFile...
by jopython
Fri Nov 29, 2013 2:41 am
Forum: newLISP and the O.S.
Topic: libc6 on Ubuntu, path issue unix.lsp
Replies: 0
Views: 3774

libc6 on Ubuntu, path issue unix.lsp

libc6 is not in

Code: Select all

"/lib/libc.so.6" 
At the latest versions of Ubuntu it is in

Code: Select all

/lib/i386-linux-gnu/libc.so.6
/lib/i686-linux-gnu/libc.so.6
by jopython
Thu Nov 28, 2013 2:34 am
Forum: newLISP in the real world
Topic: how to make newlisp app run in background
Replies: 6
Views: 3151

Re: how to make newlisp app run in background

If you are using the bash shell, you can simply run "disown"
by jopython
Thu Nov 21, 2013 3:33 am
Forum: Whither newLISP?
Topic: JSON encoder?
Replies: 1
Views: 5146

JSON encoder?

Is there a JSON encoder for newlisp?
by jopython
Fri Nov 08, 2013 1:36 pm
Forum: newLISP in the real world
Topic: Thousand's separator
Replies: 9
Views: 4703

Re: Thousand's separator

Thank you everyone for your solutions.
by jopython
Mon Nov 04, 2013 9:16 pm
Forum: newLISP in the real world
Topic: Thousand's separator
Replies: 9
Views: 4703

Thousand's separator

Is there a newlisp built-in for a thousands separator? Say in python we can

Code: Select all

In [5]: format(123456789,',d')
Out[5]: '123,456,789'
by jopython
Sun Nov 03, 2013 4:27 am
Forum: newLISP in the real world
Topic: arranging list items
Replies: 8
Views: 3677

Re: arranging list items

And how would be the final desired list look like for this example?
by jopython
Sun Nov 03, 2013 1:11 am
Forum: newLISP in the real world
Topic: arranging list items
Replies: 8
Views: 3677

Re: arranging list items

Your intentions are not clear in your example.
by jopython
Sun Sep 08, 2013 5:29 pm
Forum: newLISP in the real world
Topic: Iterator pattern like python?
Replies: 2
Views: 2152

Iterator pattern like python?

Do we have a iterator pattern in newlisp like the one in python? >>> lst = [3, 2, 1] >>> s = iter(lst) >>> s <listiterator object at 0xb741e0cc> >>> s.next() 3 >>> s.next() 2 >>> s.next() 1 >>> s.next() Traceback (most recent call last): File "<stdin>", line 1, in <module> StopIteration Here 's' is ...
by jopython
Fri Aug 30, 2013 7:12 pm
Forum: Anything else we might add?
Topic: Reducers in newlisp?
Replies: 1
Views: 2755

Reducers in newlisp?

Is it possible to have to have reducers in newlisp too as mentioned in this http://adambard.com/blog/Reducers-explained-through-Python/ ? The key takeaway from the article is This is the idea behind reducers. If you take your mapping function (map, filter, flatten, etc.), and have it modify the redu...
by jopython
Fri Aug 30, 2013 2:44 pm
Forum: newLISP in the real world
Topic: What happened to "if-not"?
Replies: 15
Views: 8064

What happened to "if-not"?

I see that if-not has been deprecated in the manual. But the code patterns document for 10.5.0 still mentions it.
by jopython
Sat Aug 03, 2013 4:13 pm
Forum: newLISP in the real world
Topic: is this a bug?
Replies: 3
Views: 2302

Re: is this a bug?

I will sanitise the input before conversion

Code: Select all

(int (trim "0034234230" "0" ""))
=> 34234230
by jopython
Wed Jul 31, 2013 1:55 pm
Forum: So, what can you actually DO with newLISP?
Topic: Just share what newlisp does for me here
Replies: 7
Views: 9312

Re: Just share what newlisp does for me here

Log parsing and reporting primarily. Due to its very smallish size I am able to distribute it and run across thousands of servers with ease. No lisp out there comes close to that feature.
by jopython
Sun Jul 28, 2013 1:41 am
Forum: newLISP in the real world
Topic: How to implement function overwriting
Replies: 2
Views: 2115

Re: How to implement function overwriting

Are you referring to arity overloading like we have in clojure.

Code: Select all

;trumped-up example
(defn argcount
  ([] 0)
  ([x] 1)
  ([x y] 2)
  ([x y & more] (+ (argcount x y) (count more))))
-> #'user/argcount
(argcount)
-> 0
(argcount 1)
-> 1
(argcount 1 2)
-> 2
(argcount 1 2 3 4 5)
-> 5
by jopython
Fri Jun 21, 2013 5:50 pm
Forum: newLISP in the real world
Topic: Higher level multi-processing
Replies: 1
Views: 1621

Re: Higher level multi-processing

Nice. I have been looking for this. Something in the line of Clojure agents.
by jopython
Mon Jun 17, 2013 1:54 am
Forum: newLISP in the real world
Topic: compiled regex and ends-with
Replies: 2
Views: 1623

Re: compiled regex and ends-with

Thank you Lutz. newLisp has one of the best documentation for any Lisps I have seen around.
by jopython
Sat Jun 15, 2013 1:48 am
Forum: newLISP in the real world
Topic: compiled regex and ends-with
Replies: 2
Views: 1623

compiled regex and ends-with

Is it possible to use compiled regex with the ends-with function?

Code: Select all

(set 'dt (regex-comp {(\w+)}))

(ends-with "delta" dt 0x10000)  => ERR: regular expression in function ends-with : "error -4 when executing"

by jopython
Sun Jun 02, 2013 1:13 pm
Forum: Anything else we might add?
Topic: wish i could enter multiline expressions by default
Replies: 10
Views: 6420

Re: wish i could enter multiline expressions by default

William, the repl code broke with version 10.5.0.

Code: Select all

Quit with (exit).
: (exit)
ERR: value expected in function slice : scanned
called from user defined function input__complete?
called from user defined function input__complete?
by jopython
Tue May 21, 2013 10:43 pm
Forum: newLISP newS
Topic: newLISP Development release 10.4.8
Replies: 9
Views: 10842

Re: newLISP Development release 10.4.8

I don't get it.
Why is the development release (10.4.8) behind the stable(Production) release (10.5.0)?
by jopython
Mon May 20, 2013 8:54 pm
Forum: newLISP in the real world
Topic: How to extract values from symbols in a list?
Replies: 4
Views: 2150

Re: How to extract values from symbols in a list?

Thank you for the quick responses. Love you people.
by jopython
Mon May 20, 2013 1:15 pm
Forum: newLISP in the real world
Topic: How to extract values from symbols in a list?
Replies: 4
Views: 2150

Re: How to extract values from symbols in a list?

never mind:

I figured it is
(map eval mems)
by jopython
Mon May 20, 2013 1:09 pm
Forum: newLISP in the real world
Topic: How to extract values from symbols in a list?
Replies: 4
Views: 2150

How to extract values from symbols in a list?

I have a list of symbols in a list named 'mems'
How do i extract the "values" of those symbols instead of the symbols themselves?

Code: Select all

: mems
(s1 s2 s3 s4 s5)

: s1
("hi")

: (map symbol? mems)
(true true true true true)

by jopython
Thu May 09, 2013 5:39 pm
Forum: newLISP in the real world
Topic: newLISP and big data?
Replies: 5
Views: 3545

Re: newLISP and big data?

The function definition tells me it is not newlisp

(define string-row *stream*)