Re: SRFI-64 module and SRFI-78 module -- archive file attached

2012-05-14 Thread Sunjoong Lee
URL changed: SRFI 64: "A Scheme API for test suites by Per Bothner" Guile implementation - https://gitorious.org/srfi-64-port/srfi-64-guile SRFI 78: "Lightweight testing by Sebastian Egner" Guile module - https://gitorious.org/srfi-78-guile Test code added: Modified test suite for the testing SR

RE: guile-gnome-platform 2.16.2 released

2012-05-09 Thread Sunjoong Lee
Hello, I'm glad to hear guile-gnome-platform works with Guile 2.0. To celebrate it, I've attatched my ebuild files for Gentoo Linux users. You know, Gentoo's last stable guile ebuild file is guile-1.8.8-r1.ebuild for Guile 1.8.8 but the last stable version of Guile itself is 2.0.5. There are guile

Re: Working http-get example and still unsolved problem

2012-05-07 Thread Sunjoong Lee
Hi, Ian; 2012/5/7 Ian Price > > Thanks for pointing this out, and if you have other comments on the > implementation (and the close-port issue), I'll be happy to have them. I don't understand the "close-port issue" exactly so this might be nonsense. I think you mean comment-out-ed (close-port p

Re: Working http-get example and still unsolved problem

2012-05-06 Thread Sunjoong Lee
The previous patch made in 06 Nov 2011 does not make a crash. With that, I could not read the content body of the page but it might be my fault. 2012/5/2 Sunjoong Lee > > 1. http-get of current stable version, 2.0.5, of Guile does not > support "Chunked Encoding." > 2. You

http-read with cookie

2012-05-06 Thread Sunjoong Lee
Hello, There is http-get in Guile and will be http-put, then what's the next? I think the method using cookie and handling https. I had thought that I'd be able to read contents of a web page needing login when I had read http-put of Greg Benison, http://lists.gnu.org/archive/html/guile-user/2012-

Re: Problem with guile on Dragora

2012-05-04 Thread Sunjoong Lee
Hi, Germán; 2012/5/4 Ludovic Courtès > Could you apply this patch and confirm? Alternatively, you can try a > tarball from . > When checking the new patched version of Guile, there is "check-guile" script in root of Guile source director

Re: Unbound variable: cond-expand-provide

2012-05-03 Thread Sunjoong Lee
rovide (current-module) '(srfi-64 If (cond-expand-provide (current-module) '(srfi-64)) be outside of cond-expand, there would be a no problem. Hum... 2012/5/4 Sunjoong Lee > Hello, > > I thought cond-expand-provide be available in everywhere but saw a compile > erro

Unbound variable: cond-expand-provide

2012-05-03 Thread Sunjoong Lee
Hello, I thought cond-expand-provide be available in everywhere but saw a compile error, "ERROR: In procedure module-lookup: Unbound variable: cond-expand-provide". I don't know why this is happening; do you have any idea or comments? Thanks in advance. test-load in attatched archive file is a sc

Re: SRFI-64 module and SRFI-78 module -- archive file attached

2012-05-02 Thread Sunjoong Lee
Hello, SRFI-64 - https://gitorious.org/srfi-64-guile/ SRFI-78 - https://gitorious.org/srfi-78-guile/ There was one bug in srfi-64.scm file of my previous post. 2012/4/26 Sunjoong Lee > SRFI-64 is "A Scheme API for test suites." > SRFI-78 is "Lightweight testing." >

Re: I'm looking for a method of converting a string's character encoding

2012-05-02 Thread Sunjoong Lee
Hi, Daniel; 2012/4/28 Daniel Hartwig > > Can you provide us with a couple of sites where http-get or > decode-string does not work properly? Or was something else at play > here? This would help to investigate what the issue is. (I am lazy > today to find some, I think you must know of a few :

Re: crash in guile-sqlite3

2012-05-01 Thread Sunjoong Lee
Hi, Daniel and Joonas; 2012/5/1 Daniel Krueger > > (make-pointer (bit-extract (lognot 0) 0 (* 8 (sizeof '* > Good and thank you. I made a new patch based on that. > On Tue, May 1, 2012 at 5:01 PM, Joonas Sarajärvi wrote: > >> Replying to myself, I now noticed that the change will not work

Working http-get example and still unsolved problem

2012-05-01 Thread Sunjoong Lee
Hello, It's 1st day of May, a new month; I thought it would be better to summarize some issues of http-get. This post include 3 examples; working, half working and not working because of implementation of declare-uri-header! Example 1 - working (use-modules (srfi srfi-8) ((web uri)

Re: Problem with guile on Dragora

2012-05-01 Thread Sunjoong Lee
Hi, Germán; Just curious what locale do you use? You may know that from output of the command "locale". 2012/4/30 Germán A. Arias > > Hi, I'm testing guile 2.0.5 in a new system (www.dragora.org). The > compilation seems OK. But when I run guile I get: > > bash-4.2$ guile > Backtrace: > In ice-9

Re: crash in guile-sqlite3

2012-04-30 Thread Sunjoong Lee
Hi, Andy; Where is a "request a pull" button? I tried somethings; one of them makes 3e2add75. I don't know what's exactly work but https://gitorious.org/guile-sqlite3 display "sunjoong committed 3e2add75 on April 30, 2012 13:23". Now, the time to "pull request." 2012/4/30 Andy Wingo > > What it

Re: crash in guile-sqlite3

2012-04-30 Thread Sunjoong Lee
2012/4/30 Andy Wingo > > Would you mind sending a pull request on gitorious? Preferably we could > add a test case too. > I apologize for my poor english; I'm willing to "send a pull request on gitorious" but don't know what means that sentence. Joonas had reported that Segmentation fault cras

Re: crash in guile-sqlite3

2012-04-28 Thread Sunjoong Lee
r (sizeof '*) #xff +(sqlite-transient -1)) (lambda (stmt key val) (assert-live-stmt! stmt) (let ((idx (key->index stmt key)) ## cut here ## 2012/4/27 Sunjoong Lee > > Same crash on Guile 2.0.5. It looks like string encoding problem. Supp

Re: I'm looking for a method of converting a string's character encoding

2012-04-28 Thread Sunjoong Lee
etskii > > Date: Sat, 28 Apr 2012 20:29:22 +0200 > > From: Daniel Krueger > > Cc: guile-user@gnu.org, Sunjoong Lee > > > > i think there shouldn't be any transcoding of guile's strings, as > > strings are internal representation of characters, no matter h

Re: I'm looking for a method of converting a string's character encoding

2012-04-28 Thread Sunjoong Lee
2 +0200 > > From: Daniel Krueger > > Cc: guile-user@gnu.org, Sunjoong Lee > > > > i think there shouldn't be any transcoding of guile's strings, as > > strings are internal representation of characters, no matter how they > > are encoded. So the only t

Re: I'm looking for a method of converting a string's character encoding

2012-04-28 Thread Sunjoong Lee
t contents of output sxml's codeset is the original web page's. For example, when you want to compare strings, you must use codeset of the web pages's. If you want to compare strings of two web pages, codeset converting method may be need. 2012/4/28 Sunjoong Lee > > Background; &g

Re: I'm looking for a method of converting a string's character encoding

2012-04-27 Thread Sunjoong Lee
input-port port) str))) (port2 (open-output-string))) (set-port-encoding! port1 "XXX") (set-port-encoding! port2 "utf-8") (display (read-delimited "" port1) port2) (close-input-port port1) (display (get-output-string port2

I'm looking for a method of converting a string's character encoding

2012-04-27 Thread Sunjoong Lee
Hello, I'm looking for a method of converting a string's character encoding from a certain codeset to utf-8. I know the string of Guile uses utf-8 and (read (open-bytevector-input-port (string->utf8 "hello"))) returns "hello" . But what if the string "hello" be encoded not utf-8 and you want to ge

Re: crash in guile-sqlite3

2012-04-27 Thread Sunjoong Lee
Hi, David; 2012/4/28 David Pirotte > > Best would be to send us an small, complete and concise example of you > consider > reproducible, could you d that ? > I mean a example code of Joonas Sarajärvi, http://paste.pocoo.org/show/587676/ , produces a Segmentation fault on Guile 2.0.5 too. I thoug

Re: A question about http-get of (web client)

2012-04-27 Thread Sunjoong Lee
-Location and Referer may be relative URI or absolute URI. Current declare-uri-header! can do only absolute URI because string->uri returns false value whenever not absolute URI!! 2012/4/26 Sunjoong Lee > > (use-modules ((srfi srfi-11) #:select (let-values)) > ((web uri)

Re: read-response-body of (web response) depends on Content-Length but ...

2012-04-27 Thread Sunjoong Lee
http://lists.gnu.org/archive/html/guile-user/2011-11/msg00011.html . There are many comments about "Chunked Encoding". Oh, my poor english and background knowledge... Thanks Daniel and Ian again. 2012/4/27 Sunjoong Lee > The urgent patch posted before makes a bug, so I cancel it and repost: >

Re: read-response-body of (web response) depends on Content-Length but ...

2012-04-27 Thread Sunjoong Lee
(define-response-accessor last-modified #f) +(define-response-accessor transfer-encoding #f) ;; Response headers ;; ## cut here ###### 2012/4/27 Sunjoong Lee > > +(define-response-accessor transfer-encoding '()) > 2012/4/27 Sunjoong Lee > >> I googled and

Re: read-response-body of (web response) depends on Content-Length but ...

2012-04-27 Thread Sunjoong Lee
nse-accessor transfer-encoding '()) ;; Response headers ;; Above patch is just a patch. 2012/4/27 Sunjoong Lee > I googled and found http://tools.ietf.org/html/rfc2616 . > > In a section of "4.4 Message Length": > 2.If a Transfer-Encoding header field (section 14.41)

Re: read-response-body of (web response) depends on Content-Length but ...

2012-04-27 Thread Sunjoong Lee
NOT be sent if these two lengths are different (i.e., if a Transfer-Encoding header field is present). If a message is received with both a Transfer-Encoding header field and a Content-Length header field, the latter MUST be ignored. 2012/4/27 Sunjoong Lee > > Oh, Conte

read-response-body of (web response) depends on Content-Length but ...

2012-04-27 Thread Sunjoong Lee
Hello, I cannot solve http://lists.gnu.org/archive/html/guile-user/2012-04/msg00034.html yet. This is a potentially related problem but I'm not sure; (use-modules ((srfi srfi-11) #:select (let-values)) ((web uri) #:select (string->uri)) ((web client) #:select (htt

Re: crash in guile-sqlite3

2012-04-26 Thread Sunjoong Lee
Hi, Joonas; 2012/4/26 Joonas Sarajärvi > > I tried to run guile in gdb to get a backtrace from the crash. The > segfault seems to be triggered inside libsqlite3 code, but I could not > really get much useful information from it. I am thus writing here to > ask if someone else has more insight on

Re: A question about http-get of (web client)

2012-04-26 Thread Sunjoong Lee
I suspect "ISO-8859-1" make a problem. open-socket-for-uri of (web client) sets encoding of port to "ISO-8859-1". read-response of (web response) also sets encoding of port to "ISO-8859-1". (use-modules ((srfi srfi-11) #:select (let-values)) ((web uri) #:select (string->uri))

SRFI-64 module and SRFI-78 module -- archive file attached

2012-04-26 Thread Sunjoong Lee
Hello, I've attatched a file archiving modules of my recent version of SRFI-64 implementation and SRFI-78. SRFI-64 is "A Scheme API for test suites." SRFI-78 is "Lightweight testing." If you want to test your code, there are 5 options; using SRFI-64, SRFI-78, unit-test of guile-lib, lib of test-

A question about http-get of (web client)

2012-04-25 Thread Sunjoong Lee
First, here is an example of http-get: (use-modules ((web uri)#:select (string->uri)) ((web client) #:select (http-get))) (call-with-values (lambda () (http-get (string->uri "http://www.gnu.org/software/guile/";))) (lambda (re

Re: read-header procedure of (web http) module has a bug?

2012-04-25 Thread Sunjoong Lee
This is not a question; are examples. Yesterday, Noah gave me an answer and I tanks. 2012/4/25 Noah Lavine > > Yes, that's right. And procedures at one level can always call to > procedures at a higher level, but not the other way around. ;;; filename: called1.scm (define (calling arg) (called

Re: read-header procedure of (web http) module has a bug?

2012-04-24 Thread Sunjoong Lee
It's very pleasure to know something new. 2012/4/25 Noah Lavine > > Yes, that's right. And procedures at one level can always call to > procedures at a higher level, but not the other way around. I understood. > > I have another question; What if the macro case? > > Suppose there is a proced

Re: read-header procedure of (web http) module has a bug?

2012-04-24 Thread Sunjoong Lee
Thanks Noah. 2012/4/25 Noah Lavine > Hello, > > That's actually perfectly legal. The procedure definitions at the top > level of a module can all call each other. > > (This also applies to all of the procedures inside a 'let' or similar.) I see. You mean the procedures of the same level can ca

Re: SRFI-64 implementation for Guile 2.0

2012-04-22 Thread Sunjoong Lee
it display unexpected(!!) failure, something's wrong. 2012/4/22 Ludovic Courtès > Hello, > > Sunjoong Lee skribis: > > > Your implementation fails srfi-64-test.scm, a test suite for the SRFI 64. > > Oh, which ones? This is essentially the reference implementation, so it &g

Re: SRFI-64 implementation for Guile 2.0

2012-04-20 Thread Sunjoong Lee
I've attached diff of 2007 testing.scm. 2012/4/21 Per Bothner > > I'm going to look at the patch in detail, but before I do, a question: > Why is your srfi-64.scm.gz "for Guile, Chicken and Gambit" so very > different from the reference implementation with your patch applied? > I just mean that

Re: SRFI-64 implementation for Guile 2.0

2012-04-20 Thread Sunjoong Lee
Hi, Ludo’; Your implementation fails srfi-64-test.scm, a test suite for the SRFI 64. Per: I realize the test-error of the reference implementation has a bug; It calls %test-error like this - (test-assert (%test-error etype expr)) but %test-error needs three arguments - (%test-error r etype expr)

Re: SRFI-64 implementation for Guile 2.0

2012-04-20 Thread Sunjoong Lee
Thanks Noah and Per; English language is more difficult than scheme language for me. :( I want to share my code or modification to others and learn somethings during that. Few days ago, I found testing.scm, the reference implementation of SRFI 64, does not pass srfi-64-test.scm, a test suite for

Re: SRFI-64 implementation for Guile 2.0

2012-04-15 Thread Sunjoong Lee
a newbie of scheme and don't understand Guile yet. I hope someone fix these problems; a) On Guile 2.0, I used (datum->syntax form (syntax->datum form)) b) On Guile 2.0, I used (assq-ref (syntax-source form) 'filename) 2012/4/14 Sunjoong Lee > > 2012/4/14 P

Re: SRFI-64 implementation for Guile 2.0

2012-04-14 Thread Sunjoong Lee
I rewrote srfi/srfi-64.scm file using cond-expand but don't know it works. On Guile 2.0, it works; $ guile -L `pwd` --use-srfi=64 srfi-64-test.scm Starting test SRFI 64 - Meta-Test Suite (Writing full log to "SRFI 64 - Meta-Test Suite.log") # of expected passes 51 # of expected f

Re: SRFI-64 implementation for Guile 2.0

2012-04-13 Thread Sunjoong Lee
: check a exception throw a certain message? scheme@(guile-user)> (use-modules (srfi srfi-64)) scheme@(guile-user)> (test-begin "wrong-type-arg") Starting test wrong-type-arg (Writing full log to "wrong-type-arg.log") $1 = ("wrong-type-arg") scheme

SRFI-64 implementation for Guile 2.0

2012-04-12 Thread Sunjoong Lee
Hello, world! :) I'm a newbie of scheme. I'd heard the testing framework SRFI-64 but failed to use it on Guile 2.0. After attempt to solve this problem, I made a guile module to pass the test suite for SRFI-64 by Donovan Kolbly. -- 1. srfi/srfi-64.scm is a SRFI-64 implementation for Guile 2.0.