Search found 46 matches

by winger
Thu Feb 20, 2014 7:09 am
Forum: newLISP newS
Topic: newLISP Development Release v.10.5.7
Replies: 1
Views: 4972

Re: newLISP Development Release v.10.5.7

libcrypto path is " /usr/lib/libcrypto.so.0.9.8 " on "ubuntu 12.04 i386" $ uname -a Linux L4F 3.2.0-54-generic-pae #82-Ubuntu SMP Tue Sep 10 20:29:22 UTC 2013 i686 i686 i686 GNU/Linux $ locate libcrypto /lib/i386-linux-gnu/libcrypto.so.0.9.8 /usr/lib/libcrypto++.so.9 /usr/lib/libcrypto++.so.9.0.0 /u...
by winger
Sun Feb 09, 2014 6:24 am
Forum: newLISP in the real world
Topic: Fore nth to not use utf8 ?
Replies: 7
Views: 1565

Re: Fore nth to not use utf8 ?

Code: Select all

> (println(join  ( 0 4 (explode "好汉不吃眼前亏"))) " ")
好汉
" "
This trick is very cool!
by winger
Sun Feb 09, 2014 6:19 am
Forum: newLISP in the real world
Topic: Thousand's separator
Replies: 9
Views: 1739

Re: Thousand's separator

I'm new to new lisp (love it!) but this doesn't work for numbers with a decimal part. My try: (define (format1000 n) (let (t (parse (string n) ".")) (append (reverse (join (explode (reverse (first t)) 3) ",")) (if (empty? (rest t)) "" (append "." (last t)))))) > (format1000 12131) "12,131" > (forma...
by winger
Tue Oct 29, 2013 3:09 am
Forum: newLISP in the real world
Topic: Maybe We can call .Net Function from a Custom DLL ?
Replies: 1
Views: 643

Re: Maybe We can call .Net Function from a Custom DLL ?

http://weitz.de/rdnzl/#download
Now only need to write a library call the RDNZL.DLL........
Unfortunately, I am not familiar with.Net.55555
by winger
Mon Oct 28, 2013 4:06 am
Forum: newLISP in the real world
Topic: Maybe We can call .Net Function from a Custom DLL ?
Replies: 1
Views: 643

Maybe We can call .Net Function from a Custom DLL ?

It's just an idea.
We know .Net does not provide a standard DLL for other languages.
Should we write a DLL to complete the call to.NET and provide the interface for other languages ?
Anyone idea?
by winger
Fri Oct 18, 2013 3:57 am
Forum: newLISP in the real world
Topic: process and sleep function error on a self-calling script
Replies: 5
Views: 1047

Re: process and sleep function error on a self-calling scrip

VERY THX Lutz ! Everything there is reason. My knowledge is so poor that it did not notice the problem is the signal. Now I found two ways to avoid this problem. (signal 17 "ignore") ; The SIGCHLD signal is sent to the parent of a child process when it exits, is interrupted, or resumes after being i...
by winger
Thu Oct 17, 2013 9:01 am
Forum: newLISP in the real world
Topic: process and sleep function error on a self-calling script
Replies: 5
Views: 1047

Re: process and sleep function error on a self-calling scrip

I THINK This's a bug ?! #p1.lsp (while 1 (sleep 5000) (dotimes (n 2) (process (string "/usr/bin/newlisp " " p2.lsp " n)) ) ) (exit) #ps.lsp (println "Current PIS is " (sys-info 7) " ---> " (last $main-args)) (exit) $ newlisp -v newLISP v.10.5.4 32-bit on Linux IPv4/6 UTF-8 libffi. $newlisp p1.lsp p1...
by winger
Tue Oct 15, 2013 4:14 am
Forum: newLISP in the real world
Topic: process and sleep function error on a self-calling script
Replies: 5
Views: 1047

process and sleep function error on a self-calling script

;#t2.lsp (set 'ARGS (main-args)) (define (get-arg argname '_result) (let (ix (find argname ARGS)) (and ix (pop ARGS ix)) (if (catch (ARGS ix) '_result) (and (pop ARGS ix) _result) nil ) ) ) (constant 'EXECUTE_PATH "/usr/bin/newlisp") (constant 'ARG_SECOND "t2.lsp") (constant 'TIME_CLOCK 4000) (cons...
by winger
Sat May 04, 2013 6:06 pm
Forum: newLISP in the real world
Topic: timeout question about net-receive
Replies: 5
Views: 1193

Re: timeout question about net-receive

r is a string "'connection is closed" "when socket been closed by romote.
Then expr "(min q number)" will broke .
by winger
Mon Apr 29, 2013 4:40 am
Forum: newLISP in the real world
Topic: timeout question about net-receive
Replies: 5
Views: 1193

Re: timeout question about net-receive

Code: Select all

(= -1 q)
to
(> (int q) -1)
because

Code: Select all

(throw-error "connection is closed")
by winger
Tue Apr 16, 2013 11:00 am
Forum: newLISP in the real world
Topic: get-url can't return 302 status code
Replies: 3
Views: 1034

Re: get-url can't return 302 status code

Don't work! newLISP v.10.4.7 on Linux IPv4/6 libffi, execute 'newlisp -h' for options. >(get-url "http://newlisp.org" "header debug") HEAD / HTTP/1.1 Host: newlisp.org User-Agent: newLISP v10407 Connection: close HEAD / HTTP/1.1 Host: www.newlisp.org User-Agent: newLISP v10407 Connection: close "Dat...
by winger
Mon Apr 15, 2013 6:52 am
Forum: newLISP in the real world
Topic: get-url can't return 302 status code
Replies: 3
Views: 1034

get-url can't return 302 status code

Sometimes we need get http status code . But get-url only return 404 status code. > (setf xo2 (get-url "http://www.baidu.com/link?url=kX6MGJqjJ4zBBpC8yDF8xDhzsTii46BoCipLx6xJ2t3626ZBIWUltBgpQyK" "list debug" 10000 )) GET /link?url=kX6MGJqjJ4zBBpC8yDF8xDhzsTii46BoCipLx6xJ2t3626ZBIWUltBgpQyK HTTP/1.1 ...
by winger
Wed Feb 27, 2013 8:23 am
Forum: newLISP in the real world
Topic: Issue about loading modules from different directory
Replies: 2
Views: 763

Re: Issue about loading modules from different directory

Code: Select all

;; env.lsp 
(println (real-path "env_ubuntu.lsp"))
Must define a root path then "changer-dir" to it .......
by winger
Sat Feb 23, 2013 5:21 am
Forum: newLISP in the real world
Topic: Some issuses about socket function
Replies: 6
Views: 1632

Re: Some issuses about socket function

;i change report function to following : (define (report pid) (semaphore sid -1) (when (< pcount allipnum) (spawn (sym (allip pcount)) (if (begin (catch (brute_path (allip pcount)) 'result) result) (println "----:----> "result (read-key))) ) ) (inc pcount) (semaphore sid 1) ) But code (println "---...
by winger
Sun Feb 17, 2013 7:18 am
Forum: newLISP in the real world
Topic: Some issuses about socket function
Replies: 6
Views: 1632

Re: Some issuses about socket function

thx lutz...


I forgot to paste the code about "sync" portion.
I use "sync"from the outset. --!

Post it to github now:
https://github.com/freewinger/wsec_tool ... canner.lsp
by winger
Fri Feb 01, 2013 3:58 am
Forum: newLISP in the real world
Topic: Some issuses about socket function
Replies: 6
Views: 1632

Re: Some issuses about socket function

I found where the problem.

Code: Select all

get-url
Function get-url always not return on child process.
Even if you set the timeout does not work。
Comment out the line that contains the “get-url”, will be able to perform good.
by winger
Sat Jan 26, 2013 4:57 am
Forum: newLISP in the real world
Topic: Some issuses about socket function
Replies: 6
Views: 1632

Some issuses about socket function

first: I have wirted a multiporcess scanner. i use ten process. All of them blocked sometimes later!!! (define (check_path host , url url2 result str socket) (if-not (starts-with host "http://") (setf url2 (string "http://" host))) (dolist (port portlst) (when (and (setf socket (net-connect host (in...
by winger
Sat Jan 26, 2013 2:24 am
Forum: newLISP in the real world
Topic: When command-line arguments contain "http://" something ....
Replies: 3
Views: 872

Re: When command-line arguments contain "http://" something

i just want get "http://www.google.com/bank.html" as a text argument.
(last-error) can't get the url.

Of course we can pass parameter as this :

Code: Select all

newlisp a.lsp  www.google.com/bank.html
Then add prefix in the code.

Code: Select all

(setf url (string "http://" (main-args -1)))
这不和谐啊
by winger
Sun Jan 20, 2013 10:38 am
Forum: newLISP in the real world
Topic: When command-line arguments contain "http://" something ....
Replies: 3
Views: 872

When command-line arguments contain "http://" something ....

create a empty file a.lsp winger@winger$ newlisp a.lsp http://www.google.com/bank.html ERR: problem accessing file : "ERR: server code 404: HTTP/1.1 404 Not Found\r\n<!DOCTYPE html>\n<html lang=en>\n <meta charset=utf-8>\n <meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=device-...
by winger
Tue Nov 13, 2012 7:25 pm
Forum: Anything else we might add?
Topic: We need a app store or cpan !
Replies: 5
Views: 2857

Re: We need a app store or cpan !

No accumulation No Future
by winger
Mon Nov 12, 2012 2:25 pm
Forum: Anything else we might add?
Topic: We need a app store or cpan !
Replies: 5
Views: 2857

We need a app store or cpan !

We need to submit code and search script code in a very convenient place.
These codes can be very easily applied to the actual work.
Now everyone each write their own.
I think we need a CPAN or an appstore.
http://search.cpan.org/
by winger
Sun Nov 04, 2012 3:52 am
Forum: newLISP in the real world
Topic: Exploding a list using patterns
Replies: 5
Views: 922

Re: Exploding a list using patterns

(setf lst '("exb" "BEGIN" "unknown" "num" "of" "items" "END" "BEGIN" "ex3" "END" "something" "and" "so" "on" )) (setf ix (map (fn (x) (first x)) (ref-all {BEGIN|END} lst regex))) (push 0 ix) (apply (fn (, y z) (println (push ( y (inc (- z y)) lst) result -1))) ix 3) ;result (("BEGIN" "unknown" "num...
by winger
Sun Nov 04, 2012 3:08 am
Forum: newLISP in the real world
Topic: Exploding a list using patterns
Replies: 5
Views: 922

Re: Exploding a list using patterns

(setf lst '("exb" "BEGIN" "unknown" "num" "of" "items" "END" "BEGIN" "ex3" "END" "something" "and" "so" "on" )) (setf ix (map (fn (x) (first x)) (ref-all {BEGIN|END} lst regex))) (push 0 ix) (apply (fn (, y z) (println (push ( y (inc (- z y)) lst) result -1))) ix 3) ;result (("BEGIN" "unknown" "num...
by winger
Tue Oct 23, 2012 3:24 pm
Forum: newLISP in the real world
Topic: (ref) can't process big data?
Replies: 3
Views: 809

Re: (ref) can't process big data?

Very thanks cormullion !
You are right.
All right if don't use 'true' parameter.

Code: Select all

(println (txml (ref  '(portid *)  txml match )))
But Why?
Call @Lutz
by winger
Sun Oct 21, 2012 3:24 pm
Forum: newLISP in the real world
Topic: emEditor newlisp syntax highlight
Replies: 1
Views: 502

Re: emEditor newlisp syntax highlight

thx share!
EE is a good editor!