Search found 90 matches

by Kirill
Wed Dec 05, 2012 1:14 am
Forum: newLISP and the O.S.
Topic: CGI input data disappearing
Replies: 16
Views: 10734

Re: CGI input data disappearing

And here's a patch for web.lsp: http://km.krot.org/code/web.lsp.patch
by Kirill
Wed Dec 05, 2012 12:52 am
Forum: newLISP and the O.S.
Topic: CGI input data disappearing
Replies: 16
Views: 10734

Re: CGI input data disappearing

Patch for cgi.lsp: http://km.krot.org/code/cgi.lsp.patch

Now http://km.krot.org/cgitest3.cgi works properly as well.
by Kirill
Wed Dec 05, 2012 12:47 am
Forum: newLISP and the O.S.
Topic: CGI input data disappearing
Replies: 16
Views: 10734

Re: CGI input data disappearing

I have a fix! http://km.krot.org/cgitest4.cgi

Patch will follow shortly...
by Kirill
Wed Dec 05, 2012 12:27 am
Forum: newLISP and the O.S.
Topic: CGI input data disappearing
Replies: 16
Views: 10734

Re: CGI input data disappearing

This updated version 3.1 of cgi.lsp should fix this: http://www.newlisp.org/code/modules/cgi.lsp.html ps: see also here http://newlisponrockets.com/rockets-item.lsp?p=67 ps: updated to 3.11 cgi.lsp a few minutes later Thanks, but now CGI:get returns nothing at all: http://km.krot.org/cgitest3.cgi
by Kirill
Tue Dec 04, 2012 12:46 pm
Forum: newLISP and the O.S.
Topic: CGI input data disappearing
Replies: 16
Views: 10734

Re: CGI input data disappearing

I suspect the issue is with newLISP, as perl works just fine:

http://km.krot.org/cgitest2.cgi (source: http://km.krot.org/cgitest2.txt).

All clues welcome!

Kirill
by Kirill
Tue Dec 04, 2012 11:28 am
Forum: newLISP and the O.S.
Topic: CGI input data disappearing
Replies: 16
Views: 10734

CGI input data disappearing

Hi, all, I've had an issue that bothered me for a while now. Several times I've noticed that data, which newLISP receives from CGI, is incomplete. I don't know if it's a newLISP issue or not, but I've experienced it with CGI under both Apache (behind Squid on NearlyFreeSpeech) and mathopd (behind ng...
by Kirill
Mon Dec 03, 2012 8:25 pm
Forum: newLISP in the real world
Topic: newLisp and DynamoDB (Amazon)
Replies: 2
Views: 2319

Re: newLisp and DynamoDB (Amazon)

hilti wrote:No. But seems indeed possible to solve.

How did You manage to get CouchDB working? Because I think the interface is only accessible via https.

Cheers
Hilti
Try with "curl" bindings, maybe (https://gist.github.com/1119771)?
by Kirill
Wed Apr 11, 2012 2:26 pm
Forum: newLISP in the real world
Topic: *-url and https
Replies: 3
Views: 1868

Re: *-url and https

Yes, amazon.lsp uses crypto.lsp module to calculate hashes, but the HTTP request itself still goes in plain, although some parts are "hashed". HTTPS is HTTP over an encrypted channel.
by Kirill
Wed Apr 11, 2012 12:16 pm
Forum: newLISP in the real world
Topic: *-url and https
Replies: 3
Views: 1868

*-url and https

I always assumed that newLISP's get-url and post-url functions did not take https://. But in amazon.lsp I suddenly see this (define AWS-ec2-url "https://ec2.amazonaws.com/") and later (get-url (string AWS-ec2-url .... I thought that it was interesting! My newLISP is definetly not linked with SSL lib...
by Kirill
Sat Apr 07, 2012 11:21 pm
Forum: newLISP Graphics & Sound
Topic: post-url in place of curl with couchdb?
Replies: 10
Views: 11616

Re: post-url in place of curl with couchdb?

There are curl bindings for newLISP you might want to try: https://gist.github.com/1119771
by Kirill
Tue Feb 21, 2012 4:21 pm
Forum: newLISP in the real world
Topic: curl bindings for newLISP
Replies: 1
Views: 1875

curl bindings for newLISP

I just came across curl wrapper for newLISP:

https://gist.github.com/1119771

Might be useful for some of you.
by Kirill
Mon Jan 30, 2012 1:20 pm
Forum: newLISP in the real world
Topic: HTTP_CONTENT_TRANSFER_ENCODING
Replies: 3
Views: 1981

Re: HTTP_CONTENT_TRANSFER_ENCODING

Ah, it's set by the web server. Here's what CGI 1.1 specification says about HTTP_* environment variables: HTTP_* These variables are specific to requests made with HTTP. Interpretation of these variables may depend on the value of SERVER_PROTOCOL. Environment variables with names beginning with "HT...
by Kirill
Sun Jan 29, 2012 2:28 pm
Forum: newLISP in the real world
Topic: HTTP_CONTENT_TRANSFER_ENCODING
Replies: 3
Views: 1981

Re: HTTP_CONTENT_TRANSFER_ENCODING

HTT_CONTENT_TRANSFER_ENCODING is environment variable, created from the Content-Transfer-Encoding request header.

You can continue searching for Content-Transfer-Encoding, but in short, it tells how incoming data are encoded.
by Kirill
Tue Nov 22, 2011 9:31 am
Forum: newLISP newS
Topic: Module SMTP and Attachments
Replies: 21
Views: 15667

Re: Module SMTP and Attachments

Just came across MailGun. Which is, according to the docs, a programmable email platform. It allows sending and receiving messages with HTTP API. Receiving fully parsed message via HTTP sounds cool! And sending too, for that matter.

Haven't tested yet.
by Kirill
Sun Oct 30, 2011 7:01 pm
Forum: newLISP in the real world
Topic: threadring in newlisp
Replies: 36
Views: 9086

Re: threadring in newlisp

On the Tips & Tricks page, there is a new category "Parallel and Distributed Processing" with an example, how to do parallel web page retrieval. We need more real world examples to show using the 'spawn' API. My YubiKey verification library uses (spawn) to query verification servers in parallel. It...
by Kirill
Thu Oct 20, 2011 6:20 am
Forum: newLISP in the real world
Topic: Character mess when reading CGI-params on UTF-8 newLISP
Replies: 3
Views: 1640

Re: Character mess when reading CGI-params on UTF-8 newLISP

Confirming that replacing Web:url-encode with Dragonfly's utf8-urlencode solves the issue. It's not pretty, just cut and paste for now, so there is no pretty patch to submit.

For cgi.lsp solution would be similar.

Br,
Kirill
by Kirill
Thu Oct 20, 2011 5:44 am
Forum: newLISP in the real world
Topic: Character mess when reading CGI-params on UTF-8 newLISP
Replies: 3
Views: 1640

Re: Character mess when reading CGI-params on UTF-8 newLISP

But Dragonfly seems to provide utf8-urlencode and utf8-urldecode. Great!
by Kirill
Thu Oct 20, 2011 5:36 am
Forum: newLISP in the real world
Topic: Character mess when reading CGI-params on UTF-8 newLISP
Replies: 3
Views: 1640

Re: Character mess when reading CGI-params on UTF-8 newLISP

Seems neither cgi.lsp nor web.lsp is able to deal with multibyte characters in their processing of urlencoded data. URL decoding (and encoding) needs a tiny overhaul.
by Kirill
Wed Oct 19, 2011 10:51 pm
Forum: newLISP in the real world
Topic: Character mess when reading CGI-params on UTF-8 newLISP
Replies: 3
Views: 1640

Character mess when reading CGI-params on UTF-8 newLISP

I'm using cgi.lsp to read POST following POST-ed parameters: text=тест save-note=Save Here's what cgi.lsp gives me (web.lsp behaves accordingly): (("save-note" "Save") ("text" "\209\130\208\181\209\129\209\130")) тест The output above is produced by this code: (println "Content-type: text/plain\...
by Kirill
Fri Sep 30, 2011 7:38 am
Forum: newLISP in the real world
Topic: dolist but getting more values at the same time
Replies: 18
Views: 6499

Re: dolist but getting more values at the same time

Thanks all! I liked make-sandwich and generate-moving-window very much. The solution was really to add a nil to the start and end of the list. :) But to me it also was very helpful to "explore" the language by experimenting with macros.
by Kirill
Thu Sep 29, 2011 12:52 pm
Forum: newLISP in the real world
Topic: dolist but getting more values at the same time
Replies: 18
Views: 6499

Re: dolist but getting more values at the same time

The issue appeared as I wanted to automatically create the menu on my updated web page http://km.krot.org/ . The menu is defined in terms of a nested list data structure and in order to expand one item I need to know if the previous item in the list is the page user is currently viewing, as you may ...
by Kirill
Thu Sep 29, 2011 7:11 am
Forum: newLISP in the real world
Topic: dolist but getting more values at the same time
Replies: 18
Views: 6499

Re: dolist but getting more values at the same time

Just today I was needing a multi valued dolist and it was great to find a pointer towards a more elegant solution, that I currently have. In my case I'd need another variant of dolist with values being supplied in context, so it would return something like nil 1 2 1 2 3 2 3 4 3 4 5 4 5 6 6 7 8 7 8 9...
by Kirill
Tue Apr 19, 2011 3:25 pm
Forum: newLISP in the real world
Topic: todo.txt utility in newLISP
Replies: 2
Views: 1831

todo.txt utility in newLISP

A good way to learn a new language is to do something useful, but (for me at least) it's often difficult to fine something useful to hack on. A tool to manage todo.txt might be such useful. Post here if you create an utility to deal with todo.txt files in newLISP. Some info: https://github.com/ginat...
by Kirill
Sun Feb 06, 2011 6:27 pm
Forum: So, what can you actually DO with newLISP?
Topic: "52 Lessons in Lisp" project
Replies: 4
Views: 7787

Re: "52 Lessons in Lisp" project

Now that is what I call a commitment! Looking forward to future posts!
by Kirill
Sat Jan 29, 2011 8:00 pm
Forum: newLISP and the O.S.
Topic: HTTP POST processing
Replies: 6
Views: 4390

Re: HTTP POST processing

cgi.lsp can check for the presence of CONTENT_LENGTH, no?