Search found 17 matches
- Mon Apr 02, 2007 8:33 pm
- Forum: Anything else we might add?
- Topic: how to xml-parse HTML pages?
- Replies: 10
- Views: 7450
there are a number of leads i looked up in the 'net. once i'm finished with the parsing, i need to cook up the "multipart/form-data" content-type for the PUT method. (i meant "POST" there.) there are two promising lisp html-parsers out there: http://www.neilvandyke.org/htmlprag/ http://www.stklos.o...
- Wed Mar 28, 2007 8:59 pm
- Forum: Anything else we might add?
- Topic: how to xml-parse HTML pages?
- Replies: 10
- Views: 7450
Btw, about awk: U may redefine FS to something unusual and regexps will works through "\n". Also U may remember the rest of "$0" of previous iteration and concatenate it in the current one... this one i don't understand, you'd have to explain from "remeber the rest of $0 ..." onwards. sorry, i had ...
- Wed Mar 28, 2007 7:10 pm
- Forum: Anything else we might add?
- Topic: how to xml-parse HTML pages?
- Replies: 10
- Views: 7450
In fact the current algo isn't good to differ where the current closing angle brace ">" closes "<input>", "<textarea>" or another tag. i thought so. the problem with your current approach lies in the puny little ">" which closes tags like "<input ...>", because a single ">" closes any tag anywhere....
- Tue Mar 27, 2007 3:18 pm
- Forum: Anything else we might add?
- Topic: how to xml-parse HTML pages?
- Replies: 10
- Views: 7450
does the pcre-lib built into newlisp allow pattern matching across lines? also, in addition to just recognizing the tags, i see no immediate possibility to extract their attributes, which would eliminate another step for my program. Dmi, do you see the possibility to use parenthesized groups in the...
- Tue Mar 27, 2007 2:53 pm
- Forum: Anything else we might add?
- Topic: how to xml-parse HTML pages?
- Replies: 10
- Views: 7450
Try http://en.feautec.pp.ru/store/libs/tags.lsp This isn't an xml instrument, but was mainly written for parsing a complex html. There is no separate documentation, but an example at the and of module. Pay separate attention to "parse-tags" and "structure-tags" functions. that's what i had in mind....
- Tue Mar 27, 2007 12:10 pm
- Forum: Anything else we might add?
- Topic: how to xml-parse HTML pages?
- Replies: 10
- Views: 7450
how to xml-parse HTML pages?
i would like to xml-parse the type of HTML pages one finds "in the wild". some tags are used in HTML which lead to non well-formed XML, most notably <p> or <br>. i could replace them with something like a XML NOOP or a simple space before running xml-parse. is there a recipe you could recommend to t...
- Mon Mar 26, 2007 6:19 pm
- Forum: Anything else we might add?
- Topic: post-url with content-type form-data
- Replies: 1
- Views: 1985
post-url with content-type form-data
the manual states that i can use post-url with any valid content-type, but the example just shows unencoded get-type query strings, where tokens are separated by `&' (ampersands) and tokens are name, value pairs separated by `=' (equal sign). now i need to automatically fill a form demanding content...
- Sun Mar 25, 2007 1:49 pm
- Forum: newLISP newS
- Topic: development release version 9.1.2
- Replies: 2
- Views: 2592
http://newlisp.org/downloads/development/ there's one thing i'd like to have for a future release: local-domain aka unix sockets. this would allow me to do "net-select" on both INET and local filesytem sockets. then i'd do away with net-select'ing on the INET sockets with a timeout, check for avail...
- Sun Mar 25, 2007 1:27 am
- Forum: newLISP in the real world
- Topic: does net-receive-from return complete IP?
- Replies: 3
- Views: 3113
Re: does net-receive-from return complete IP?
all sorts of other IPs of varying string length, as if there was a limit built-in to newlisp stating that IPs like "221.208.208.101" cannot happen. could someone please check newlisp's C-source or verify this? i think i found the bug: look at "newlisp-9.1.0/nl-sock.c". there are three occurences of...
- Sun Mar 25, 2007 1:02 am
- Forum: Anything else we might add?
- Topic: Keyword 'title-case' missing in VIM syntax file
- Replies: 5
- Views: 4021
Both newlisp.vim 1.0.40 shipped in newlisp-9.0.0.tgz and 1.0.50 shipped in newlisp-9.1.1.tgz have 'letn', both in the util directory of the source distribution. http://newlisp.org/code/newlisp.vim.txt ah! i installed from the freebsd ports collection, which doesn't install these files. thanks to yo...
- Sun Mar 25, 2007 12:53 am
- Forum: newLISP in the real world
- Topic: does net-receive-from return complete IP?
- Replies: 3
- Views: 3113
does net-receive-from return complete IP?
newLISP v.9.1.0 on freebsd-6-stable: i have an application doing: (define (do-udp-connect fd) (letn ((peer (net-receive-from fd 1)) (last-error (net-error))) (if (nil? last-error) (let ((ip (nth 1 peer))) (if (!= last-udp-ip-seen ip) (begin (log-n-block ip (target-ip fd) (target-port fd) "udp") (set...
- Sat Mar 24, 2007 8:36 pm
- Forum: Anything else we might add?
- Topic: Keyword 'title-case' missing in VIM syntax file
- Replies: 5
- Views: 4021
Re: Keyword 'title-case' missing in VIM syntax file
the keyword "letn" is missing, too. --clemens
- Sat Mar 24, 2007 8:18 pm
- Forum: Anything else we might add?
- Topic: Returning closures
- Replies: 7
- Views: 5263
Not sure what you mean, it works for me: > (multiplier:make 'double 2) double:double > double:multi 2 > (save "double.lsp" 'double) true > !cat double.lsp (context 'double) (define (double:double x) (* x multi)) (set 'multi 2) (context 'MAIN) what exactly did you do? Can you paste the session? i do...
- Sat Mar 24, 2007 5:10 pm
- Forum: Anything else we might add?
- Topic: Returning closures
- Replies: 7
- Views: 5263
here is a closure-like multiplier using contexts: (context 'multiplier) (define (multiplier:multiplier x) (* x multi)) (define (multiplier:make ctx multi) (def-new 'multiplier:multiplier (sym ctx ctx))) (context 'MAIN) there's something wrong here: multiplier:make doesn't use argument "multi", whic...
- Fri Mar 23, 2007 8:50 pm
- Forum: Anything else we might add?
- Topic: counting words quickly
- Replies: 9
- Views: 6087
- Fri Mar 23, 2007 7:34 pm
- Forum: newLISP in the real world
- Topic: (signal <sig> 'handler) doesn't work?
- Replies: 2
- Views: 2756
- Fri Mar 23, 2007 6:00 pm
- Forum: newLISP in the real world
- Topic: (signal <sig> 'handler) doesn't work?
- Replies: 2
- Views: 2756
(signal <sig> 'handler) doesn't work?
newLISP v.9.1.0 on FreeBSD here's the code that doesn't work: (define (sig-handler sig) (println %scriptname ": signal " sig) (cond ((member sig '(1 30 31)) (save-iplist)) (true (map (fn (_fd) (net-close (first _fd))) fds) (save-iplist) (exit sig)))) ;; disables builtin handlers (ctrl-c?) (command-l...