Re: [ANN] An enhanced REPL for Guilers

2013-05-03 Thread Daniel Hartwig
On 4 May 2013 10:01, Nala Ginrut nalagin...@gmail.com wrote: On Fri, 2013-05-03 at 13:17 -0700, Mike Gran wrote: From: Stjepan Horvat zvanste...@gmail.com ls /usr/share/guile/site colorized.scm shell.scm src.scm I guess they probably should have been put in /usr/share/guile/site/nala/

Re: [ANN] An enhanced REPL for Guilers

2013-05-03 Thread Daniel Hartwig
On 4 May 2013 12:20, Nala Ginrut nalagin...@gmail.com wrote: Oops, sorry for my bad English. I mean I thought it installed to nala/shell.scm but the 'make install' seems not. Oops indeed :-) Anyway, it works fine for me: cut---

Re: [PATCH] web: allow uri-encode to uppercase the percent-encoding

2013-05-02 Thread Daniel Hartwig
On 3 May 2013 09:00, Daniel Hartwig mand...@gmail.com wrote: On 2 May 2013 23:27, Aleix Conchillo Flaqué aconchi...@gmail.com wrote: This patch allows uri-encode to uppercase the percent-encoded part. So, (uri-encode /) = %2f (uri-encode / #:uppercase #t) = %2F Hi Why make

Re: [PATCH] web: allow uri-encode to uppercase the percent-encoding

2013-05-02 Thread Daniel Hartwig
On 2 May 2013 23:27, Aleix Conchillo Flaqué aconchi...@gmail.com wrote: This patch allows uri-encode to uppercase the percent-encoded part. So, (uri-encode /) = %2f (uri-encode / #:uppercase #t) = %2F Hi Why make this optional, it seems like unnecessary fluff? Both cases are equivalent,

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Daniel Hartwig
On 30 April 2013 17:27, Nala Ginrut nalagin...@gmail.com wrote: hi guys! A discussion on IRC about adding 'mmap' raised, and I will share some ideas on this topic: 1. Complex one or simple one? The simple one is just a simple wrapper taking advantage of (system foreign). The complex one is

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Daniel Hartwig
On 30 April 2013 21:49, Nala Ginrut nalagin...@gmail.com wrote: If I use bytevector instead, it means I have to read all the content from a file first. I don't think it's the same with mmap in POSIX. mmap is used for very large data I/O, if we decide to read them all, we lose the game. mmap

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Daniel Hartwig
On 30 April 2013 21:49, Nala Ginrut nalagin...@gmail.com wrote: 6. other helper functions also available: If you want a port, use a port. Likewise for strings, bytevectors. For an instance, in a multi-thread program, if we use port and need to move the cursor, we have to remember/restore

Re: [Feature Request] Some ideas on 'mmap'

2013-04-30 Thread Daniel Hartwig
On 30 April 2013 22:23, Nala Ginrut nalagin...@gmail.com wrote: But I still recommend that store 'size' 'flags', which need a new record-type and to write some helper functions, but very less code. And have you considered that you can munmap only some sections, how is that going to work with

Re: The 2.0.9 VM cores in enqueue (threads.c:309)

2013-04-29 Thread Daniel Hartwig
On 29 April 2013 14:56, Andrew Gaylard a...@computer.org wrote: On 04/28/13 03:07, Daniel Hartwig wrote: On 28 April 2013 03:57, Andrew Gaylard a...@computer.org wrote: Those 0x304 values look dodgy to me, and explain why the SCM_SETCDR causes an invalid memory access. 0x304 is SCM_EOL

Re: The 2.0.9 VM cores in enqueue (threads.c:309)

2013-04-27 Thread Daniel Hartwig
On 28 April 2013 03:57, Andrew Gaylard a...@computer.org wrote: Those 0x304 values look dodgy to me, and explain why the SCM_SETCDR causes an invalid memory access. 0x304 is SCM_EOL. Is this even related to the use of queues, Not (ice-9 q) or (container async-queue). The ‘enqueue’

Re: Guile lisp code style (was: [guile] Re: Guile and Swig)

2013-04-19 Thread Daniel Hartwig
On 19 April 2013 14:15, Dmitry Bogatov kact...@gnu.org wrote: Daniel Hartwig mand...@gmail.com writes: Also, question of style of Lisp code. It seems, that most common style is `(action object arg1 ...)` and I find making object callable is more elegant: `(object #:action arg1

Re: Guile and Swig

2013-04-18 Thread Daniel Hartwig
On 17 April 2013 13:28, Dmitry Bogatov kact...@gnu.org wrote: Hello, list! Hello now Is using SWIG[1] is endorsed for writing Guile wrappers to C library? I make such bindings for libircclient[2] for my project, but it would be nice, if it would find way to official Guile tree. Are here

Re: Incorrect guile pkg-config --libs and --cflags

2013-04-15 Thread Daniel Hartwig
On 15 April 2013 16:26, Jan Synacek jsyna...@redhat.com wrote: Hello list, This part of guile-2.0.pc is quite confusing and I think it's wrong: ... Libs: -L${libdir} -lguile-2.0 -lgc ... Cflags: -I${pkgincludedir}/2.0 -pthread Shouldn't the '-pthread' be in Libs, instead of Cflags?

Re: vectors are something else

2013-04-15 Thread Daniel Hartwig
On 15 April 2013 19:29, Daniel Llorens daniel.llor...@bluewin.ch wrote: [1] have vector- ops only accept vector- types. … [2] force all vector objects into arrays. … For example in [1], you'd prefer vector- to *reject* strided rank-1 arrays (inc!=1), because those require a descriptor and

Re: Incorrect guile pkg-config --libs and --cflags

2013-04-15 Thread Daniel Hartwig
On 15 April 2013 19:58, Daniel Hartwig mand...@gmail.com wrote: or peculiar to the linker, libguile on your system, other? I see that this is related to the linker in fedora, which debian seems also in the process of supporting. Indirect linkage like this is out (apparently), and LIBS should

Re: Incorrect guile pkg-config --libs and --cflags

2013-04-15 Thread Daniel Hartwig
On 15 April 2013 21:45, Daniel Hartwig mand...@gmail.com wrote: On 15 April 2013 19:58, Daniel Hartwig mand...@gmail.com wrote: or peculiar to the linker, libguile on your system, other? I see that this is related to the linker in fedora, which debian seems also in the process of supporting

Re: vectors are something else

2013-04-15 Thread Daniel Hartwig
On 15 April 2013 22:08, Daniel Llorens daniel.llor...@bluewin.ch wrote: On Apr 15, 2013, at 14:28, Daniel Hartwig wrote: Is it really much faster to do one or the other: if lbnd != 0: error index = … vs: index = lbnd + ... The second should actually be just index = ... You do

Re: vector types poll

2013-04-15 Thread Daniel Hartwig
On 15 April 2013 22:10, Daniel Llorens daniel.llor...@bluewin.ch wrote: Let's please agree on a behavior so we can start closing bugs. These are all the objects accepted by the array interface. I've filled the table with some ready-made choices that I think are at least internally

Re: [PATCH] Add ',run' and ',!'

2013-04-12 Thread Daniel Hartwig
On 12 April 2013 14:29, Nala Ginrut nalagin...@gmail.com wrote: On Fri, 2013-04-12 at 07:55 +0800, Daniel Hartwig wrote: On 11 April 2013 13:37, Ian Price ianpric...@googlemail.com wrote: So, what do you think? This is the sort of thing that belongs in a .guile rather than in guile IMO

Re: vectors are something else

2013-04-12 Thread Daniel Hartwig
On 12 April 2013 15:23, Daniel Llorens daniel.llor...@bluewin.ch wrote: Right. I want [0] (vector-ref #@1(1 2 3 4) 1) = 2 to fail with a type error, which is consistent with r5rs. Ah. I should have read more the later part of your mail. However my proposal is also to produce the same

Re: vectors are something else

2013-04-12 Thread Daniel Hartwig
On 12 April 2013 18:15, Daniel Hartwig mand...@gmail.com wrote: From your original mail: a. the array implementation can rely on all [vector] types having known base=0 and inc=1. Is that not already the case? Ah right, not when ‘vector?’ answers #t to compatible arrays.

Re: vectors are something else

2013-04-12 Thread Daniel Hartwig
we end up deciding. Yes, bugs :-) Message: 8 Date: Fri, 12 Apr 2013 18:15:05 +0800 From: Daniel Hartwig mand...@gmail.com Too restrictive IMO, you may as well just not permit any array passed to vector interfaces. Being restrictive would be my preference, yes. [Besides, you can

Re: vectors are something else

2013-04-11 Thread Daniel Hartwig
On 11 April 2013 07:07, Daniel Llorens daniel.llor...@bluewin.ch wrote: After the array-map patches, I've gone through the vector/array implementation and there's some stuff I'd like to fix. In stable-2.0 today: (define a (make-typed-array ''f64 0 '(1 2)) a = #1f64@1(0.0 0.0) so far so

Re: [PATCH] Add ',run' and ',!'

2013-04-11 Thread Daniel Hartwig
On 11 April 2013 13:37, Ian Price ianpric...@googlemail.com wrote: So, what do you think? This is the sort of thing that belongs in a .guile rather than in guile IMO. Right, and since you can already do this with more control via the posix interface, adding this 'shortcut' to the repl adds

Re: [PATCH] Add backlog option to http-open

2013-04-07 Thread Daniel Hartwig
On 6 April 2013 12:14, Nala Ginrut nalagin...@gmail.com wrote: Resend patch, added the example for #:backlog. Since there's no docs for all run-server open-params, but examples. So I just added the example. I think it's enough to explain the usage. You missed to add it to the preceding

Re: Record type printers for SRFI 45 promises and SRFI 41 streams

2013-04-07 Thread Daniel Hartwig
On 8 April 2013 00:49, Chris K. Jester-Young cky...@gmail.com wrote: Hi all, I've attached record type printers for SRFI 45 promises and SRFI 41 streams. I've tried to make promise-visit more self-documenting with the use of keyword arguments; let me know if you think that's an improvement!

Re: Record type printers for SRFI 45 promises and SRFI 41 streams

2013-04-07 Thread Daniel Hartwig
On 8 April 2013 07:13, Daniel Hartwig mand...@gmail.com wrote: On 8 April 2013 00:49, Chris K. Jester-Young cky...@gmail.com wrote: Hi all, I've attached record type printers for SRFI 45 promises and SRFI 41 streams. I've tried to make promise-visit more self-documenting with the use

Re: [PATCH] Add backlog option to http-open

2013-04-04 Thread Daniel Hartwig
On 4 April 2013 12:39, Nala Ginrut nalagin...@gmail.com wrote: I don't think it's necessary to add the docs since it's explicit. It may help for some guys like me. ;-) Every part of the API must be documented. How else do guys like you know this is there?

Re: [PATCH] Add backlog option to http-open

2013-04-04 Thread Daniel Hartwig
On 4 April 2013 12:39, Nala Ginrut nalagin...@gmail.com wrote: Here's a patch to add backlog option to http-open, users may use it like: ---cut (run-server (lambda (r b) ...) 'http '(#:port 1234 #:backlog 1024))

Re: Extremly slow for format string-join

2013-04-01 Thread Daniel Hartwig
On 1 April 2013 14:58, Nala Ginrut nalagin...@gmail.com wrote: On Mon, 2013-04-01 at 13:35 +0800, Daniel Hartwig wrote: 2013/4/1 Nala Ginrut nalagin...@gmail.com: Anyway, string-join is so slowly beyond my expectation. Also note that ‘string-concatenate’ (less general than ‘string-join

Re: Extremly slow for format string-join

2013-04-01 Thread Daniel Hartwig
On 1 April 2013 14:59, Daniel Llorens daniel.llor...@bluewin.ch wrote: Hello, From: Daniel Hartwig mand...@gmail.com (define (str* str n) (call-with-output-string (lambda (p) (let lp ((n n)) (unless (zero? n) (display str p) (lp (1- n))) Out

Re: redo-safe-variables and redo-safe-parameters

2013-03-31 Thread Daniel Hartwig
On 1 April 2013 05:16, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: Note two things * it's better to pile up the redo-safe-variables with a parameter then the clumsy version in the previous mail which will not work well. * A continuation that backtracks from down the stack back to

Re: [PATCH] Add inspection command source (, src) which shows Scheme code of loaded module

2013-03-31 Thread Daniel Hartwig
On 1 April 2013 11:54, Mark H Weaver m...@netris.org wrote: Daniel Hartwig mand...@gmail.com writes: these two points are enough information to obtain the unmodified source from the file. This is enough to get the original characters, but then there's the other problem I mentioned: reader

Re: Extremly slow for format string-join

2013-03-31 Thread Daniel Hartwig
2013/4/1 Nala Ginrut nalagin...@gmail.com: I've tried to implement a function to mimic string multiply like Python: asdf * 10 --code (define (str* str n) (format #f ~{~a~} (make-list n str))) or (define (str* str n) (string-join (make-list n str) ))

Re: Extremly slow for format string-join

2013-03-31 Thread Daniel Hartwig
2013/4/1 Nala Ginrut nalagin...@gmail.com: Anyway, string-join is so slowly beyond my expectation. Also note that ‘string-concatenate’ (less general than ‘string-join’) performs better for the same case, you could use that directly instead of my prior suggestion for similar results. Especially

Re: [PATCH] Add inspection command source (, src) which shows Scheme code of loaded module

2013-03-30 Thread Daniel Hartwig
On 31 March 2013 05:17, Mark H Weaver m...@netris.org wrote: Nala Ginrut nalagin...@gmail.com writes: + +(define (print-src p) + (define (get-program-src p) +(let ((source (program-source p 0))) + (cond + ((not source) It's inner procedure implemented with C) I'm not sure

Re: [PATCH] Add-native-hashtable-helper-functions

2013-03-26 Thread Daniel Hartwig
On 27 March 2013 08:47, Nala Ginrut nalagin...@gmail.com wrote: 在 2013-3-27 AM5:59,Ludovic Courtès l...@gnu.org写道: Nala Ginrut nalagin...@gmail.com skribis: Hi now * hash-items: get the amount of items in the hash table There’s already ‘hash-count’, recently added. If I need to

Re: GOOPS and hash-tables - ie. hash-table

2013-03-23 Thread Daniel Hartwig
On 23 March 2013 19:18, Brent Pinkney b...@4dst.com wrote: Hi, I desperately need to write a generic method that binds to a hash-table. I have noticed that native scheme types like pair, list, and vector are automagically recognised in GOOPS as pair, list, and vector. Even SRFI-19 dates are

Re: GOOPS and hash-tables - ie. hash-table

2013-03-23 Thread Daniel Hartwig
On 23 March 2013 23:15, Brent Pinkney b...@4dst.com wrote: On 23/03/2013 16:09, Daniel Hartwig wrote: On 23 March 2013 19:18, Brent Pinkney b...@4dst.com wrote: Hi, I desperately need to write a generic method that binds to a hash-table. I have noticed that native scheme types like pair

Re: GOOPS and hash-tables - ie. hash-table

2013-03-23 Thread Daniel Hartwig
On 23 March 2013 23:19, Daniel Hartwig mand...@gmail.com wrote: On 23 March 2013 23:15, Brent Pinkney b...@4dst.com wrote: Ok, so you have confirmed that you can merrily make my enumerate! method ? I still fail to. Which hash tables are you using? scheme@(guile-user) (define t (make-hash

Re: Special variables to relax boxing

2013-03-22 Thread Daniel Hartwig
On 23 March 2013 06:33, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: (define (f x) (let ((s 0)) (with-special-soft ((s 0)) (let lp ((i 0)) (cond ((= i 100) s) ((= i 50) (abort-to-prompt 'tag) (lp (+ i 1))) (else (set!

New `print' REPL option.

2013-03-16 Thread Daniel Hartwig
** New `print' REPL option. See REPL Commands in the manual for information on the new user-customizable REPL printer. Since adding this option I have noticed that reader is also customizable, using the undocumented variable ‘repl-reader’. The interface here is different. A custom printer

Re: bug#10522: Patch: Improve optional variable and keyword notation in manual

2013-03-09 Thread Daniel Hartwig
On 9 March 2013 16:25, Andy Wingo wi...@pobox.com wrote: Should we remove the brackets entirely? i.e I would not. The brackets are fairly standard for optional arguments.

Re: bug#10522: Patch: Improve optional variable and keyword notation in manual

2013-03-08 Thread Daniel Hartwig
On 9 March 2013 09:58, Daniel Hartwig mand...@gmail.com wrote: On 3 March 2013 17:45, Andy Wingo wi...@pobox.com wrote: On Sun 03 Mar 2013 02:07, Daniel Hartwig mand...@gmail.com writes: Can I ask whether it is preferred to use, e.g. @code{#f}, for the default values, as some places seem

Re: bug#10522: Patch: Improve optional variable and keyword notation in manual

2013-03-02 Thread Daniel Hartwig
On 3 March 2013 03:36, Andy Wingo wi...@pobox.com wrote: Hi Bake, On Fri 03 Feb 2012 14:28, Andy Wingo wi...@pobox.com writes: Hi Bake, This patch looks great. I do have a couple of comments before applying. It would probably be useful to have input from others as well, so I'm copying

Re: [PATCH] Tweak web modules, support relative URIs

2013-02-24 Thread Daniel Hartwig
On 24 February 2013 18:45, Mark H Weaver m...@netris.org wrote: Hi Daniel, Daniel Hartwig mand...@gmail.com writes: * Terminology The terminology used in latest URI spec. (RFC 3986) is not widely used elsewhere. Not by Guile, not by the HTTP spec., or other sources. Specifically

Re: goops - accessors, methods and generics

2013-02-21 Thread Daniel Hartwig
Hi It seems you are expecting some CLOS behaviour in a language that can not support it. The accessors are generic functions, but each of your modules creates a unique generic function, there is no implicit namespace sharing in Scheme. Define a base module with an appropriate superclass or

Re: propose deprecation of generalized-vector-*

2013-02-18 Thread Daniel Hartwig
On 19 February 2013 00:25, Mike Gran spk...@yahoo.com wrote: From: Noah Lavine noah.b.lav...@gmail.com Hello, On Wed 23 Jan 2013 13:20, Daniel Llorens daniel.llor...@bluewin.ch writes: In [2]: a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) In [4]: a[1] Out[4]: array([4, 5, 6]) In [5]: a[1,

Re: [Potluck] a lightweight web framework

2013-02-16 Thread Daniel Hartwig
On 17 February 2013 13:03, Nala Ginrut nalagin...@gmail.com wrote: PS: and I have to mention that bug, I believe it's a bug. When the server-handler get the request, I found the uri in request have no 'host', it's #f. It causes trouble for me to implement url redirect mechanism, which used to

Re: [Potluck] a lightweight web framework

2013-02-16 Thread Daniel Hartwig
On 17 February 2013 13:03, Nala Ginrut nalagin...@gmail.com wrote: I put here: https://gitorious.org/glow/artanis The examples you mentioned make this look very interested. Nice job.

[PATCH] update old references in FFI doc

2013-02-13 Thread Daniel Hartwig
* doc/ref/api-foreign.texi (Foreign Types): Replace references to the old foreign-bytevector and bytevector-foreign with the new procedure names using pointer. --- doc/ref/api-foreign.texi |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ref/api-foreign.texi

Re: [PATCH] add web/mime support

2013-02-11 Thread Daniel Hartwig
On 11 February 2013 17:38, Nala Ginrut nalagin...@gmail.com wrote: But there's a different for MIME, since it should be a part of web module IMO (or not?). So I'm hesitated again. There is no pressing need to include or not. While it is a work in progress it is easier to distribute and inspect

Re: About Guile crypto support

2013-02-11 Thread Daniel Hartwig
On 11 February 2013 23:23, Greg Troxel g...@ir.bbn.com wrote: (First, all mainstream distros is only talking about Linux.) This .so=devel does not make sense to me. I thought the point was that -devel split things that people who wanted to compile against the package needed, but not things

Re: About Guile crypto support

2013-02-11 Thread Daniel Hartwig
On 12 February 2013 12:20, Nala Ginrut nalagin...@gmail.com wrote: Put that link .so in guile rather than guile-devel is the exception I mentioned. The regular packaging policy not allow it. [Again, referring only to Debian.] Right. This applies only to libguilereadline-v-18.so, not

Re: [PATCH] add web/mime support

2013-02-09 Thread Daniel Hartwig
On 6 February 2013 21:13, Nala Ginrut nalagin...@gmail.com wrote: /usr/share/mime is contained in 'shared-mime-info' package, at least for openSUSE. The suggestion you gave means Guile will depend on this package. Personally, I don't think that's what you want. ;-P Hi The suggestion was to

Re: About Guile crypto support

2013-02-08 Thread Daniel Hartwig
On 9 February 2013 00:21, Ludovic Courtès l...@gnu.org wrote: Yeah, apparently there are several half-baked bindings around. Let’s just polish one of them, and submit it for inclusion in libgcrypt. I have already submitted some additions to one, but I may just continue in a new repository.

Re: About Guile crypto support

2013-02-05 Thread Daniel Hartwig
On 5 February 2013 23:48, Ludovic Courtès l...@gnu.org wrote: The gcrypt-guile project is doing so, I'll help it if I can. But my original thought is orthogonal with gcrypt-guile, just put some common digest algorithm in libguile rather than a full-stack crypto-lib. We could actually use the

Re: About Guile crypto support

2013-02-05 Thread Daniel Hartwig
On 6 February 2013 12:18, Daniel Hartwig mand...@gmail.com wrote: Avoiding duplication and feature creep /in the core/ is highly desirable. Guildhall makes it convenient enough to pull in additional features; guile-lib has md5 and industria provides also sha and others. During yesterday's

Re: guile-lib 0.2.2 released

2013-02-04 Thread Daniel Hartwig
On 4 February 2013 18:58, Andy Wingo wi...@pobox.com wrote: On Mon 04 Feb 2013 03:07, Daniel Hartwig mand...@gmail.com writes: Is guile-lib interested in receiving new code? Dunno! I'm not sure. Now that we have the guildhall starting up, I would be inclined to say no. Better

Re: About Guile crypto support

2013-02-03 Thread Daniel Hartwig
Hello On 3 February 2013 20:55, Nala Ginrut nalagin...@gmail.com wrote: As mentioned in another thread about digest algorithm support in Guile, my plan is use part of implementation of libgcrypt and make a wrapper, then put into libguile. But now I found weinholt's Scheme industria lib, which

Re: About Guile crypto support

2013-02-03 Thread Daniel Hartwig
On 4 February 2013 11:12, Nala Ginrut nalagin...@gmail.com wrote: If your goal is only to provide crypto. support to Guile programs, then time is better spent providing a wrapper to the existing library. Concerns about adding an external dependency do not hold much weight next to the

[PATCH] add ssize_t

2013-02-01 Thread Daniel Hartwig
* libguile/gen-scmconfig.c: Determine the size of ssize_t (POSIX). * libguile/foreign.c: New symbol is an alias for a signed integer type. * module/system/foreign.scm: Export the new symbol. * doc/ref/api-foreign.texi (Foreign Types): Document. --- doc/ref/api-foreign.texi |1 +

Re: [PATCH] md5: fix errors when input size modulo 64 is 55 bytes

2013-01-31 Thread Daniel Hartwig
On 31 January 2013 13:31, Daniel Hartwig mand...@gmail.com wrote: On 22 January 2013 05:16, Andy Wingo wi...@pobox.com wrote: Any chance on getting a test case as well? :-) -- http://wingolog.org/ Updated with tests from RFC 1321. Confirmed that the new test fails pre-patch. Please

Re: [PATCH] md5: fix errors when input size modulo 64 is 55 bytes

2013-01-31 Thread Daniel Hartwig
On 22 January 2013 05:16, Andy Wingo wi...@pobox.com wrote: Any chance on getting a test case as well? :-) -- http://wingolog.org/ Updated with tests from RFC 1321. Confirmed that the new test fails pre-patch. 0001-md5-fix-errors-when-input-size-modulo-64-is-55-bytes.patch Description:

Re: digest modules (was [PATCH] md5: fix errors when input size modulo 64 is 55 bytes)

2013-01-12 Thread Daniel Hartwig
On 12 January 2013 16:35, Nala Ginrut nalagin...@gmail.com wrote: I suggest add a 'digest' module implemented in C code in Guile to provide common see 'digest algorithm', since these things are very useful nowadays. I believe they should be in ice-9. Like Ruby does. I've started a project

Re: [PATCH] Colorized REPL

2013-01-11 Thread Daniel Hartwig
On 11 January 2013 14:29, Nala Ginrut nalagin...@gmail.com wrote: On Thu, 2013-01-10 at 16:19 +0800, Daniel Hartwig wrote: I changed these: string-in-color = colorize-string display-string-in-color = colorized-display What do you think? Nicer anway. Also, the “/” in “1/2” appears

Re: [PATCH] Colorized REPL

2013-01-11 Thread Daniel Hartwig
On 11 January 2013 22:33, Ludovic Courtès l...@gnu.org wrote: +(define *color-list* + `((CLEAR . 0) +(RESET . 0) +(BOLD. 1) +(DARK. 2) Would it make sense to define a new type for colors? Like: (define-record-type color (color

Re: [PATCH] Colorized REPL

2013-01-11 Thread Daniel Hartwig
On 11 January 2013 18:40, Nala Ginrut nalagin...@gmail.com wrote: Yes, that's a good point, and the test case could move out of the module itself. It should. I suppose the original comments were not so clear. It is not only the string but other members such as “data” that do not fit the

Re: ‘http-get*’ and all that

2013-01-11 Thread Daniel Hartwig
On 12 January 2013 02:49, Andy Wingo wi...@pobox.com wrote: ‘http-get*’ was added in 2.0.7, so it doesn’t seem wise to deprecate it just a couple of months later, no? In many ways it's better to deprecate early while there are few users, and the change was recent. It's not like the

[PATCH] md5: fix errors when input size modulo 64 is 55 bytes

2013-01-11 Thread Daniel Hartwig
= 5b19445b70b493c78f3bc06eb7962315 Regards From 47c92db862ce846dbcc5d27843bc9d26b7708d5d Mon Sep 17 00:00:00 2001 From: Daniel Hartwig mand...@gmail.com Date: Sat, 12 Jan 2013 14:34:26 +0800 Subject: [PATCH] md5: fix errors when input size modulo 64 is 55 bytes * src/md5.scm (md5-finalize): Fix typos

Re: [PATCH] md5: fix errors when input size modulo 64 is 55 bytes

2013-01-11 Thread Daniel Hartwig
On 12 January 2013 14:43, Daniel Hartwig mand...@gmail.com wrote: Originally reported as http://bugs.debian.org/437214. Triggered when input has size modulo 64 is 56–63 bytes. scheme@(guile-user) (use-modules (md5)) … from guile-lib, of course!

Re: [PATCH] Colorized REPL

2013-01-10 Thread Daniel Hartwig
Hello again Some comments in addition to Ludo's below. I have not inspected the code of your latest submission thoroughly, but enough to agree that there are many stylistic and algorithmic issues. I will probably not be looking in to it any more, and remain a satisfied user of emacs+geiser. I

Re: Why 'inexact' and 'exact' doesn't check 'number?' first?

2012-12-11 Thread Daniel Hartwig
On 12 December 2012 11:21, Nala Ginrut nalagin...@gmail.com wrote: It's weird to see that: (exact? 'a) err msg=== ERROR: In procedure exact?: ERROR: In procedure exact?: Wrong type argument in position 1: a ==end= And I have to do

Re: bug#13077: guile: add repl-option for customized print

2012-12-11 Thread Daniel Hartwig
[No need to Cc the bug report] On 12 December 2012 12:03, Nala Ginrut nalagin...@gmail.com wrote: Seems (fluid-ref *repl-stack*) is not a pair/list when REPL is just started? Correction: is not a pair/list when /guile/ is just started. The program, guile, is not a REPL, that is only an

Re: bug#13077: guile: add repl-option for customized print

2012-12-11 Thread Daniel Hartwig
On 12 December 2012 14:01, Daniel Hartwig mand...@gmail.com wrote: On 12 December 2012 13:49, Nala Ginrut nalagin...@gmail.com wrote: repl-default-option-set! seems didn't make sense. Works fine for me. I believe people more like to activate the colored-REPL automatically when ~/.guile

Re: Why 'inexact' and 'exact' doesn't check 'number?' first?

2012-12-11 Thread Daniel Hartwig
On 12 December 2012 13:55, Nala Ginrut nalagin...@gmail.com wrote: Are you suggesting I use (is-a? obj fraction) for 'fraction?' ? Absolutely not. Use inexact? if you wish to determine that the *storage* of a value is using floating point format.

Re: Why 'inexact' and 'exact' doesn't check 'number?' first?

2012-12-11 Thread Daniel Hartwig
On 12 December 2012 14:32, Mark H Weaver m...@netris.org wrote: Daniel Hartwig mand...@gmail.com writes: On 12 December 2012 13:55, Nala Ginrut nalagin...@gmail.com wrote: Are you suggesting I use (is-a? obj fraction) for 'fraction?' ? Absolutely not. Use inexact? if you wish to determine

Re: [PATCH] Colorized REPL

2012-12-08 Thread Daniel Hartwig
On 9 December 2012 05:35, Ian Price ianpric...@googlemail.com wrote: Or, you could use the package manager I keep pimping :) Yes indeed, it works quite well. As does just adding such files to a site- or user-local module path. (os process) might be reasonable, since we are forever complaining

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 5 December 2012 15:21, Nala Ginrut nalagin...@gmail.com wrote: Hi folks! Here's a patch to add colorized-REPL. Some comments :-) diff --git a/module/ice-9/colorized.scm b/module/ice-9/colorized.scm new file mode 100644 index 000..fe42a9a --- /dev/null +++ b/module/ice-9/colorized.scm @@

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 5 December 2012 16:48, Nala Ginrut nalagin...@gmail.com wrote: Is there some advantage to using the GOOPS classes rather than equivalent predicates, which are more universal? Of course, the order of the tests matters highly in both cases. GOOPS classes covered all the possible types in

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 5 December 2012 17:50, Daniel Llorens daniel.llor...@bluewin.ch wrote: I think that (os process) should be merged in Guile in some form, run-with-pipe has appeared in the lists a few times. Yes, this was ACK during one of those discussions. I believe most of the problem with open-pipe may

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 5 December 2012 18:27, Nala Ginrut nalagin...@gmail.com wrote: I can understand this too. So your suggestion is to write a (term ansi-color) compatible interface. I think it's easy to do. But I'm afraid that Guile don't integrate (term ansi-color). In your code, one uses (light-blue

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 6 December 2012 10:43, Nala Ginrut nalagin...@gmail.com wrote: But if we need the original author to assign the copyright, I'm not sure how long will it be. Last time I assigned the copyright took about one month, since it's long way to send a hand-written assignment to USA. Or I just

Re: [PATCH] Colorized REPL

2012-12-05 Thread Daniel Hartwig
On 6 December 2012 12:28, Nala Ginrut nalagin...@gmail.com wrote: I was aimed to patch pretty-print for coloring. But I changed my mind because an independent module is easy to develop and debug. Yes, I thought as much. Do keep the eventual integration in mind, since I'm sure the maintainers

Re: bug#13077: guile: add repl-option for customized print

2012-12-03 Thread Daniel Hartwig
On 4 December 2012 13:19, nalaginrut nalagin...@gmail.com wrote: Hi Daniel! I believe this patch simplified my work, and 'colorized' module has been finished, I'm testing and debugging. I'll post it when it's all done. Glad to hear it. Attached is an alternate patch that handles

Re: bug#13077: guile: add repl-option for customized print

2012-12-03 Thread Daniel Hartwig
On 4 December 2012 14:30, nalaginrut nalagin...@gmail.com wrote: And I'll update it to repl-option version after ludo/andy accepts your patch. Or I should post it include your patch altogether? ;-) Separate is easier to work with.

Re: bug#13077: guile: add repl-option for customized print

2012-12-03 Thread Daniel Hartwig
On 4 December 2012 14:39, Thien-Thi Nguyen t...@gnuvola.org wrote: () Daniel Hartwig mand...@gmail.com () Tue, 4 Dec 2012 13:34:52 +0800 patch that handles [...] *unspecified* Can ‘unspecified?’ (the procedure) be used? I seem to recall people wanting to avoid using ‘*unspecified

Re: About REPL hook

2012-12-01 Thread Daniel Hartwig
On 2 December 2012 00:31, nalaginrut nalagin...@gmail.com wrote: I think a colorized REPL is useful for our users. Will you accept a patch to 'pp' for colorized REPL? Or an easy way, a module with hook to do the same job, but output twice? Perhaps rather implement this as a separate,

Re: web: New ‘http-get*’ and ‘response-body-port’ procedures

2012-11-29 Thread Daniel Hartwig
On 29 November 2012 06:00, Ludovic Courtès l...@gnu.org wrote: Hi, I just added two web client procedures: ‘response-body-port’ and ‘http-get*’, both of which return an input port from which to read a response’s body. Hi This is a very useful and tidily done addition. Makes sense, diff

Re: Guile Lua

2012-11-19 Thread Daniel Hartwig
On 20 November 2012 08:24, Ian Price ianpric...@googlemail.com wrote: I'm no expert on lua, so I can't give you a huge long list, but Phil did make a post titled Creating a Lua Roadmap at http://article.gmane.org/gmane.lisp.guile.devel/12291 The first issues would be them. There appears to be

Re: [PATCH] Futures: Avoid creating the worker pool more than once

2012-11-07 Thread Daniel Hartwig
On 7 November 2012 21:46, Mark H Weaver m...@netris.org wrote: Here's an improved version the patch that gracefully handles the case where creation of the worker pool is unsuccessful due to an exception or cancelled thread. What do you think? Looks clean. Nice work picking up on this race

Re: regexp-split for Guile

2012-10-21 Thread Daniel Hartwig
On 20 October 2012 22:16, Mark H Weaver m...@netris.org wrote: Honestly, this question makes me wonder if the proposed 'regexp-split' is too complicated. If you want to trim whitespace, how about using 'string-trim-right' or 'string-trim-both' before splitting? It seems more likely to do

Re: [PATCH] In string-split, add support for character sets and predicates.

2012-10-12 Thread Daniel Hartwig
Patch with .texi updated also. 0001-In-string-split-add-support-for-character-sets-and-p.patch Description: Binary data

Re: [PATCH] In string-split, add support for character sets and predicates.

2012-10-09 Thread Daniel Hartwig
On 10 October 2012 01:48, Mark H Weaver m...@netris.org wrote: + if (!SCM_CHARSETP (char_pred)) { - last_idx = idx; - while (idx 0 buf[idx-1] != SCM_CHAR(chr)) -idx--; - if (idx = 0) -{ - res = scm_cons

Re: [PATCH] In string-split, add support for character sets and predicates.

2012-10-09 Thread Daniel Hartwig
On 10 October 2012 10:14, Mark H Weaver m...@netris.org wrote: Your latest patch looks good, but I just remembered one more thing: doc/ref/api-data.texi needs to be updated. I had assumed that was updated automatically from the doc strings, which are in the right format. ?

Re: [PATCH] In string-split, add support for character sets and predicates.

2012-10-09 Thread Daniel Hartwig
On 10 October 2012 11:25, Mark H Weaver m...@netris.org wrote: Daniel Hartwig mand...@gmail.com writes: On 10 October 2012 10:14, Mark H Weaver m...@netris.org wrote: Your latest patch looks good, but I just remembered one more thing: doc/ref/api-data.texi needs to be updated. I had assumed

[PATCH] In string-split, add support for character sets and predicates.

2012-10-08 Thread Daniel Hartwig
Following up on the thread from last time regexp-split was discussed. On 8 January 2012 07:05, Andy Wingo wi...@pobox.com wrote: On Sat 31 Dec 2011 06:54, Daniel Hartwig mand...@gmail.com writes: * [Vanilla `string-split' expanded to support the CHAR_PRED semantics of `string-index' et al

Re: [PATCH] In string-split, add support for character sets and predicates.

2012-10-08 Thread Daniel Hartwig
Hi Mark Thanks for the speedy response. General ACK on all your comments. Some additional notes: On 8 October 2012 23:40, Mark H Weaver m...@netris.org wrote: [which vs. that] This was straight out of the doc string for string-index. Changed. + if (SCM_CHARP (char_pred)) +{ +

Re: Growable arrays?

2012-06-14 Thread Daniel Hartwig
On 14 June 2012 22:47, David Kastrup d...@gnu.org wrote: Mark H Weaver m...@netris.org writes: David Kastrup d...@gnu.org writes: Scheme/Guile vectors are fixed size.  [...]  It is a bit of a nuisance that one can grow a hashtable efficiently and on-demand, but not so an array. Although

Re: Growable arrays?

2012-06-14 Thread Daniel Hartwig
On 14 June 2012 23:34, David Kastrup d...@gnu.org wrote: Daniel Hartwig mand...@gmail.com writes: The guile core provides already a solid set of fundamental types which are very easy to compose to produce *exactly* the type required for any particular situation. Except when they don't

  1   2   >