Search found 145 matches
- Wed Apr 13, 2011 12:13 am
- Forum: newLISP in the real world
- Topic: Faster than find?
- Replies: 5
- Views: 2763
Faster than find?
I have the following issue: > (dolist (s (sequence 1 10000)) (push (rand 300 4) y -1)) > (set 'z (y -2)) ; this is the second to last {number} :) > (time (find z y)) ; 8.x ms Why is this a problem? I need a faster search through these numbers. 8+ milliseconds is way too long. The numbers must be in ...
- Sat Mar 26, 2011 5:42 pm
- Forum: newLISP in the real world
- Topic: date + parse problems
- Replies: 10
- Views: 4312
Re: date + parse problems
A better choice would be to parse as a string, including all the normal items (space, colon, etc.) and not do the hex/octal parsing by default. I do like the find-all example below and believe you are absolutely right and I should change my habits to use find-all with regex. As Cormullion mentions: ...
- Sat Mar 26, 2011 4:38 am
- Forum: newLISP in the real world
- Topic: date + parse problems
- Replies: 10
- Views: 4312
Re: date + parse problems
Regular expressions are the answer, however... I consider this a bug. I do not think (parse) should see anything above "08" and to "0F" as a HEX string to be split, unless you specifically ask for the string to be split as hex. This also breaks all over the place in my system because I'm actually pa...
- Fri Mar 25, 2011 8:05 pm
- Forum: newLISP newS
- Topic: newlisp Documentation 10.3.0 "net-packet"
- Replies: 2
- Views: 3510
Re: newlisp Documentation 10.3.0 "net-packet"
I too am glad to have this option. I think Lutz might have used some of my C code to add this feature. :)
- Fri Mar 25, 2011 8:03 pm
- Forum: newLISP in the real world
- Topic: date + parse problems
- Replies: 10
- Views: 4312
date + parse problems
I use parse all over the place in my code. I recently ran into a very strange problem with parse. > (set 'x 1301073325) 1301073325 > (date x) "Fri Mar 25 10:15:25 2011" > (parse (date x)) ("Fri" "Mar" "25" "10" ":" "15" ":" "25" "2011") Looks good. Parses correctly, but when the time changes... > (s...
- Sat Feb 26, 2011 3:18 am
- Forum: newLISP in the real world
- Topic: Simple pid file check
- Replies: 2
- Views: 1775
Re: Simple pid file check
So simple! Thanks. That's exactly what I was missing. No idea why it didn't occur to me. Perfect. Thanks! Send 0 to a process using 'kill' - it will return true if the process is running (and accepting signals), nil if it isn't. So, after loading unix.lsp: (kill pid 0) will return true if PID is run...
- Wed Feb 23, 2011 7:50 pm
- Forum: newLISP in the real world
- Topic: newLISP Tutors?
- Replies: 4
- Views: 2701
Re: newLISP Tutors?
Are you reading "New Lessons in Lisp" on my blog?
I'm doing some newLisp tutorials online and have a total of 52 of them planned, including the creation of several applications.
Might be useful...
I'm doing some newLisp tutorials online and have a total of 52 of them planned, including the creation of several applications.
Might be useful...
- Wed Feb 23, 2011 7:49 pm
- Forum: newLISP in the real world
- Topic: Simple pid file check
- Replies: 2
- Views: 1775
Simple pid file check
Hello all, I am interested in testing for a running process and, if it is not running, restarting it. Right now, I'm writing /tmp/app.pid files for everything I run. If I need to stop a running app, I call: (destroy-pid (int (read-file "/tmp/app.pid"))) Which works, of course. But, I want to test to...
- Sat Feb 12, 2011 8:39 pm
- Forum: newLISP in the real world
- Topic: PHP Redirect unless site down
- Replies: 0
- Views: 2283
PHP Redirect unless site down
(for those who have been asking) I created this because I am redirecting all traffic from port 80 to port 8080. Port 8080 runs a newLisp web server and DragonFly, but it could be running anything. Sometimes, for whatever reason, my ISP decides to kill the newLisp process. So, this redirects people t...
- Sat Jan 29, 2011 2:02 am
- Forum: newLISP in the real world
- Topic: (lookup nil x) -> 1st item?
- Replies: 1
- Views: 1292
(lookup nil x) -> 1st item?
Try this:
Unless I'm missing something, shouldn't (lookup) return nil?
By the way, I got here because I'm actually doing:
And x can be nil.
Code: Select all
> (set 'tr '( (1 "foo") (2 "bar") (3 "baz")))
((1 "foo") (2 "bar") (3 "baz"))
> (lookup nil tr)
"foo"
By the way, I got here because I'm actually doing:
Code: Select all
(lookup x tr)
- Sat Jan 15, 2011 12:17 am
- Forum: newLISP in the real world
- Topic: Alternative JSON -> newLISP conversion
- Replies: 11
- Views: 3863
Re: Alternative JSON -> newLISP conversion
I also posted a Json.lsp Module on my web site, which goes from JSON->LISP and LISP->JSON. It's a modified version of Lutz' module, updated and with code from John DeSanto (former kozoru Team Member). It probably makes sense to fold the changes back into the "official" newLisp module. http://www.lif...
- Wed Jan 12, 2011 5:25 am
- Forum: newLISP newS
- Topic: SentenceBoundary.lsp?
- Replies: 15
- Views: 8933
Re: SentenceBoundary.lsp?
You should probably change the Contact information in Sentence Boundary, as neither of these e-mail addresses work any longer. :) ;; Creative Commons Attribution (by) License v2.5 ;; Full text - http://creativecommons.org/licenses/by/2.5/ ;; Contact - fischer@kozoru.com, desanto@kozoru.com ;; Copyri...
- Fri Dec 17, 2010 8:02 pm
- Forum: newLISP in the real world
- Topic: Freelance, discreet code clean-up and review?
- Replies: 3
- Views: 2237
Re: Freelance, discreet code clean-up and review?
Could be any of these, depending on the code.
ale870 wrote:What do you mean for "clean-up"?
Rewrite code to be faster?
Rewrite code to eliminate wrong newLisp functions/structures?
Simply reindent/reformat the code?
Or.... ?
- Thu Dec 16, 2010 11:38 pm
- Forum: newLISP in the real world
- Topic: Freelance, discreet code clean-up and review?
- Replies: 3
- Views: 2237
Freelance, discreet code clean-up and review?
I have dozens of newLisp modules. Each of these modules needs to be reviewed and cleaned up by someone who knows newLisp (and JSON and networking, hopefully). Some of the modules are small, some are large. It pays, via Paypal, based on small set pieces of code that need to be cleaned up. Each module...
- Sat Dec 11, 2010 6:15 pm
- Forum: newLISP in the real world
- Topic: C XML parser to newLisp
- Replies: 3
- Views: 2267
Re: C XML parser to newLisp
I moved the configuration file to JSON.
I have a parser, but do not have a Lisp->JSON module yet. The previous Module for JSON doesn't work anymore, so I'll be writing a new one.
I'll release it when it is finished.
I have a parser, but do not have a Lisp->JSON module yet. The previous Module for JSON doesn't work anymore, so I'll be writing a new one.
I'll release it when it is finished.
- Thu Dec 02, 2010 7:39 pm
- Forum: newLISP in the real world
- Topic: C XML parser to newLisp
- Replies: 3
- Views: 2267
C XML parser to newLisp
NewLispers, I have a documented C XML parser which reads a Simple XML file and writes out some files for network interfaces on BSD systems. It's for the network security product I am creating. The C code works perfectly, but I'd like to port the C code to newLisp. I do not have the time to personall...
- Mon Sep 13, 2010 9:51 pm
- Forum: Anything else we might add?
- Topic: new to newLISP
- Replies: 20
- Views: 10968
Re: new to newLISP
Thanks for the kind words! It's actually http://www.Lifezero.org (or Kane-Box.com). :) i'm wondering how much people use it, and what they build in the real world with it. Hi! I use newLISP for various things, including web sites and text processing. Currently I'm not able to use it very much - my c...
- Mon Aug 30, 2010 5:14 pm
- Forum: newLISP in the real world
- Topic: Make LISP faster than Python, etc
- Replies: 0
- Views: 2368
- Tue Jul 27, 2010 3:04 pm
- Forum: Dragonfly
- Topic: Dragonfly and Lighttpd?
- Replies: 2
- Views: 4717
Dragonfly and Lighttpd?
Anyone have a suggestion for getting web pages working with Lighttpd and Dragonfly? In the case of PHP, it's pretty easy. fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/tmp/php.socket" ))) But, Dragonfly has me wondering what the best approach would be to make this h...
- Tue Jun 29, 2010 1:35 pm
- Forum: newLISP in the real world
- Topic: SBCL to newLISP
- Replies: 19
- Views: 6569
Re: SBCL to newLISP
I do not use Windows. When I look at "GetTickCount" the reference reads, "Retrieves the number of milliseconds that have elapsed since the system was started, up to 49.7 days." Seems like a simple (date-value) in newLISP can do the same thing, with a few modifications? New code: ;(import "kernel32.d...
- Tue Jun 29, 2010 3:46 am
- Forum: newLISP in the real world
- Topic: SBCL to newLISP
- Replies: 19
- Views: 6569
SBCL to newLISP
Can someone help me translate the following SBCL (or Common Lisp) script to newLISP? I'm presenting at a conference and interested in showing benchmarks between a bunch of different languages (including some Lisp, Scheme, Python, C, etc). ; sbcl lisp version by mandeep singh (declaim (optimize (spee...
- Tue Jun 22, 2010 6:16 pm
- Forum: newLISP in the real world
- Topic: Big XML Mess (help)
- Replies: 1
- Views: 1211
Big XML Mess (help)
newLISP experts, I'm having real problems finding data in the CAPEC XML document. ( http://capec.mitre.org/data/xml/capec_v1.5.xml ) I've read through everything on the forums and I've tried a bunch of things, but I seem to only be able to dig into the XML if I know what field I'm looking for... and...
- Thu Jun 17, 2010 6:53 pm
- Forum: newLISP in the real world
- Topic: newLISP web server with SSL
- Replies: 3
- Views: 2106
Re: newLISP web server with SSL
Perhaps my use of the word "stuck" is more slang in this case. Either way, my goal was to not have any third-party software installed and do everything from newLISP. If I want SSL, that goal seems like it might not be attainable. Any suggestions, or am I stuck running Apache or Lighttpd or similar t...
- Wed Jun 16, 2010 7:08 pm
- Forum: newLISP in the real world
- Topic: newLISP web server with SSL
- Replies: 3
- Views: 2106
newLISP web server with SSL
Is it possible to run newLISP as a web server and have SSL working? So far, I've only been able to figure out http requests (easy!), but https eludes me.
DragonFly? Crypto? Something else?
Any suggestions, or am I stuck running Apache or Lighttpd or similar to make this happen?
DragonFly? Crypto? Something else?
Any suggestions, or am I stuck running Apache or Lighttpd or similar to make this happen?
- Sat Jun 12, 2010 8:07 am
- Forum: newLISP newS
- Topic: Hacker Halted 2010 Conference
- Replies: 1
- Views: 2802
Hacker Halted 2010 Conference
If anyone cares about such things; I was invited to speak at Hacker Halted 2010 ( http://www.hackerhalted.com ). I'll be giving a talk called "Weaponizing LISP" where I specifically go through about 10 examples of using newLISP to do port scanning, OS detection, sniffing, scanning and a bit more. Th...