Re: [PATCH] Add scandir procedure

2011-08-30 Thread Ludovic Courtès
Hi! nalaginrut nalagin...@gmail.com skribis: I found there isn't scandir in current Guile. And we may use ftw to instead. I guess ftw traverse all sub-directoies. Yes, we may use nftw to filter the level we don't need, but ftw seems always traverse all sub-directories. If my guess is

Re: guild hall update

2011-08-22 Thread Ludovic Courtès
Hi Andy, This all sounds great, but I wanted to contribute on the most important point: Andy Wingo wi...@pobox.com skribis: Another big change is that I renamed the package. The problem was that the package itself isn't really a guild hall -- it marks you as a member of the guild, giving

Re: Difference letrec environment binding (again)

2011-08-21 Thread Ludovic Courtès
Hello! Hans Aberg haber...@telia.com skribis: So letrec is transformed to something else. What might that be? I believe you’re seeing the “Fixing letrec” algorithm in action (see the paper of that name by Dybwig et al.) Thanks, Ludo’.

Re: Parallel Guile code called from parallel C code

2011-08-21 Thread Ludovic Courtès
Hi, pablo r...@uzy.me skribis: The Guile doc says Internally, a fixed-size pool of threads is used to evaluate futures, (...) the pool contains one thread per available CPU core, minus one, to account for the main thread. Then how does this work in the situation I described? Do the two

Re: Cross compiling guile 2.0.2 on openwrt MIPS architecture.

2011-08-21 Thread Ludovic Courtès
Hi Jiva, I’ve reproduced the error message you posted below: --8---cut here---start-8--- i18n.c: In function 'str_upcase_l': i18n.c:874:12: error: dereferencing pointer to incomplete type i18n.c:874:12: error: dereferencing pointer to incomplete type i18n.c:

Re: [bug #33996] 2.0.2: Crash related to ports and threads

2011-08-21 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribis: Oh dear, this is a nasty one. The issue is that Guile's ports are not threadsafe. I hadn't thought about this one... I am adding guile-devel to the Cc for input. Any fix to this will be pretty big, I think. I think that the right fix here is

Re: uninterned symbols as Tree-IL constants

2011-08-21 Thread Ludovic Courtès
Hi, BT Templeton b...@hcoop.net skribis: I noticed that when uninterned symbols are used as Tree-IL constants, I thought literal (constant) symbols in Elisp were interned. You seem to imply this isn’t always the case; can you explain? Thanks, Ludo’.

Re: uninterned symbols as Tree-IL constants

2011-08-21 Thread Ludovic Courtès
Hi, BT Templeton b...@hcoop.net skribis: l...@gnu.org (Ludovic Courtès) writes: Hi, BT Templeton b...@hcoop.net skribis: I noticed that when uninterned symbols are used as Tree-IL constants, I thought literal (constant) symbols in Elisp were interned. You seem to imply this isn’t

Re: (define-module (foo) #:import (...)), a la r6rs

2011-07-28 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribis: So what do you all think about: (define-module (foo) #:import ((bar) (only (baz) qux foo) ...)) Or even: (define-module (foo) (import (bar) (only (baz) qux foo) ...)) I’d prefer

Re: Fluids vs parameters: which API is better?

2011-07-25 Thread Ludovic Courtès
Hi BT, BT Templeton b...@hcoop.net skribis: Andy Wingo wi...@pobox.com writes: [...] Here I disagree. From the perspective of semantics and security, it's important to be able to make assertions as to the type of value returned by a procedure -- that (current-input-port) returns a port.

Re: ELisp Implementation?

2011-07-22 Thread Ludovic Courtès
Hi BT! BT Templeton b...@hcoop.net skribis: It is! Here's a quick summary of what I've worked on so far: * Buffer-local variable support * Condition handling, property lists, other new subrs * Variable and function aliases * Emacs-compatible lexbind * Compatibility fixes * Most subrs and

Re: site %load-compiled-path

2011-07-22 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribis: I realized in the discussion with Ian Hulin that a number of my projects are installing their .go files in the wrong place -- to the datadir instead of to the libdir. That's silly, because the datadir isn't in the load-compiled-path. To Guile’s

Re: new module: (web client)

2011-07-18 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com skribis: I wrote a simple HTTP client and dropped it in (web client). It's synchronous, so it's a bit lame. I'm attaching it here for review. Feedback welcome. This looks great! ;;; (web client) is a simple HTTP URL fetcher for Guile. ;;; ;;; In its

Re: guildhall status

2011-07-18 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribis: So, the status: 1) Builds. 2) Passes make check. 3) Can update the available list. 4) Everything else is untested :-) Sounds like great news! I will see if I can get work to sponsor a server that we can use, and see if we can get it

Re: guildhall status

2011-07-18 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribis: On Mon 18 Jul 2011 15:06, l...@gnu.org (Ludovic Courtès) writes: I will see if I can get work to sponsor a server that we can use, and see if we can get it aliased to guildhall.gnu.org -- unless someone else would like to provide the server. It would

Re: guildhall status

2011-07-18 Thread Ludovic Courtès
Andy Wingo wi...@pobox.com skribis: Yeah that would be nice. I have not had much luck with FSF folk in the past though. I was just thinking about gcc.gnu.org which I believe is hosted by others. I see you’ve emailed them in the meantime, thanks! Ludo’.

Re: VM jump table address kept in a register

2011-07-07 Thread Ludovic Courtès
Hi, Andy Wingo wi...@pobox.com skribis: I looked at specifying registers for the IP, SP, and FP as well. I got positive improvements with IP and FP but not (oddly) with SP. Should we try this? #define IP_REG asm (r13) #define FP_REG asm (r14) I tried, and it’s noticeably worse

VM jump table address kept in a register

2011-07-06 Thread Ludovic Courtès
Hello! Commit 37a5970c19ca7ad2b5de2f667748c840c199f878 changes the VM engine such that the jump table address is kept in a register, at least on x86_64. Using GCC 4.6.0 on x86_64, before the change, the dispatch code looked like this: movzbl 0x0(%rbp),%edx;; %edx - *IP lea

Release process for Guile 2.0

2011-07-06 Thread Ludovic Courtès
. Ludo’. #+TITLE: Release Process for GNU Guile 2.0 #+AUTHOR: Ludovic Courtès #+EMAIL: l...@gnu.org * Preparing uploading the tarball ** Update Gnulib The commit log's first line should be Update Gnulib to X, where X is the output of `git describe' in the Gnulib repo. This allows us to keep track

Re: GNU Guile 2.0.2 released

2011-07-02 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribis: There were 155 changesets in this release, touching 284 files. 27326 lines were removed, and 20388 deleted. Woow! Is there any code left? :-) Ludo’.

Re: How can I tell guile to shut up? ;)

2011-07-01 Thread Ludovic Courtès
Andy Wingo wi...@pobox.com skribis: Basically I appreciate the concerns but have not found a way to solve the whole problem nicely, so I kept it simple. As it seems we agree on the need for higher-level solutions based on a warning port accessible in (guile) and C, I'm going to see about

Re: when and unless

2011-07-01 Thread Ludovic Courtès
Andy Wingo wi...@pobox.com skribis: One place you might want to use them though is in type checks for Scheme code. We currently don't do very much of that, but probably should in the future. As in: (define (parameter-fluid p) (unless (parameter? p) (wrong-type-arg p 'parameter))

Re: How can I tell guile to shut up? ;)

2011-07-01 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com skribis: Third time's the charm, as they say... here's the deal. `with-fluids' is fairly efficient, because its body does not need to be allocated as a closure, but it doesn't provide you any guarantees about the values bound to the fluids. Parameter

Lock ordering mismatch

2011-07-01 Thread Ludovic Courtès
Hello, As seen in ccb80964cd7cd112e300c34d32f67125a6d6da9a, there’s a lock ordering mismatch between ‘do_thread exit’ and ‘fat_mutex_lock’ wrt. ‘t-admin_mutex’ and ‘m-lock’. I thought this commit solved the problem, but now I think it doesn’t because it leaves a small window during which a mutex

GNU Guile 2.0.2 released

2011-07-01 Thread Ludovic Courtès
We are pleased to announce GNU Guile release 2.0.2, the next maintenance release for the 2.0.x stable series. The Guile web page is located at http://gnu.org/software/guile/ . Guile is an implementation of the Scheme programming language, with support for many SRFIs, packaged for use in a wide

Re: Building without posix

2011-06-30 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com skribis: I think we should focus on the GNU system, using gnulib to adapt other systems to look like GNU. Disabling POSIX bindings helps no one on the GNU system -- if the question is one of library size, the solution should be loadable modules, not

Re: How can I tell guile to shut up? ;)

2011-06-30 Thread Ludovic Courtès
Hi Andy, Andy Wingo wi...@pobox.com skribis: After some thinking, the base thing to do is just to add a warning port, and make warnings (non-fatal informative messages) write to that port. I have done this in the attached patches. Any objections? Ideally I’d preferred to keep

Re: How can I tell guile to shut up? ;)

2011-06-30 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribis: 4) Our fluids currently have problems with threads: if a thread not spawned by a Guile thread enters Guile, its fluids are bound to #f. This should be fixed; in the meantime though we hack around that with the (or ...) clause, which

Re: when and unless

2011-06-30 Thread Ludovic Courtès
Hello comrade! Andy Wingo wi...@pobox.com skribis: I think we should add `when' and `unless' to the default environment. [...] These are pretty uncontroversial What?! http://lists.r6rs.org/pipermail/r6rs-discuss/2007-March/thread.html#1856 Here’s another argument: these macros are about

Re: Signal thread

2011-06-29 Thread Ludovic Courtès
Andy Wingo wi...@pobox.com skribis: We might have other locking order problems -- do_thread_exit takes the admin lock and then the lock of a fat mutex, whereas fat_mutex_lock does the other way around. (Yuk, fat mutexes.) Perhaps not, though. I think I fixed this one yesterday (thanks,

Re: no more *.la files in libgc-dev

2011-06-28 Thread Ludovic Courtès
Hello, Andreas Rottmann a.rottm...@gmx.at skribis: On the GNU system, there is (somewhat ironically) no real advantage of having .la files that I know of It’s needed at least when linking statically, because the .la file contains dependency info not otherwise available (what pkg-config tries

Re: Signal thread

2011-06-28 Thread Ludovic Courtès
Hello fellow Guiler of the Guild! Andy Wingo wi...@pobox.com skribis: Hello guild-comrade Courtès! On Mon 27 Jun 2011 18:00, l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com skribis: commit 3b971a59b55586a236c3621a55515d9272ee5c80 Author: Andy Wingo wi...@pobox.com Date

Signal thread

2011-06-27 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com skribis: commit 3b971a59b55586a236c3621a55515d9272ee5c80 Author: Andy Wingo wi...@pobox.com Date: Thu Jun 23 11:24:16 2011 +0200 don't spawn the signal delivery thread in a thread-exit handler * libguile/threads.c (do_thread_exit): Remove

pollfd-offset

2011-06-22 Thread Ludovic Courtès
Hello, (ice-9 poll) reads: (define-syntax pollfd-offset (syntax-rules () ((_ n) (* n 8 I guess 8 is really sizeof (struct pollfd), right? In that case, how about getting it at configure time and exporting it from C? Thanks, Ludo.

Re: Guile with win32 cross compiling

2011-06-19 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribis: On Sun 24 Apr 2011 22:22, l...@gnu.org (Ludovic Courtès) writes: Looks good to me. Could you factor it into an M4 macro, use AC_CACHE_CHECK, and move that to acinclude.m4? I tried and failed, so I pushed it anyway. Would you like to do

Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-92-gf4e45e9

2011-06-18 Thread Ludovic Courtès
Hey! Andy Wingo wi...@pobox.com skribis: On Wed 08 Jun 2011 23:05, l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com skribis: Return a new future for THUNK. Execution may start at any point concurrently, or it can start at the time when the returned future is touched

Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-40-g2252321

2011-06-08 Thread Ludovic Courtès
Hi Andreas, (Sorry for the lte reply, I'm just slowly catching up.) Andreas Rottmann a.rottm...@gmx.at skribis: Andreas Rottmann a.rottm...@gmx.at writes: l...@gnu.org (Ludovic Courtès) writes: Hi Andreas, Thanks for taking care of this, and thanks for the great doc too! Andreas

Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-92-gf4e45e9

2011-06-08 Thread Ludovic Courtès
Hello Andy! Andy Wingo wi...@pobox.com skribis: commit f4e45e91f265429ad1c42d3905dd3c05a0bc0924 Author: Andy Wingo wi...@pobox.com Date: Thu May 26 18:14:32 2011 +0200 lazily init futures worker pool * module/ice-9/futures.scm (%workers, %create-workers!)

Re: [PATCH] Configure GMP to use GC allocation functions, remove bignum finalizers

2011-06-02 Thread Ludovic Courtès
Hi, Andy Wingo wi...@pobox.com skribas: What if we get libgc to track total heap size (whether the user has malloc, g_slice_alloc, or whatever), and start doing GC more frequently if it sees the total heap size going up? That would be ideal, of course. Ludo'.

Re: Cross-compiling Guile 2.0

2011-05-31 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribas: On Sun 29 May 2011 20:10, Andy Wingo wi...@pobox.com writes: On Fri 27 May 2011 16:51, l...@gnu.org (Ludovic Courtès) writes: Sounds good, but you’d need additional data that maps triplets (well, $host_cpu) to low-level info such as endianness

Re: can't use variable in sxml-match?

2011-05-31 Thread Ludovic Courtès
Hello, Ian Price ianpric...@googlemail.com skribas: Just a note to say that we found a solution to nalaginrut's problem on IRC. Great. What was the problem? Ludo'.

Re: [PATCH] Configure GMP to use GC allocation functions, remove bignum finalizers

2011-05-31 Thread Ludovic Courtès
Hi! Mark H Weaver m...@netris.org skribas: This patch changes the way that bignums are allocated, so that digits are now allocated using the GC allocation functions instead of standard malloc/realloc/free. Without this patch, computing (factorial 10), where factorial is implemented

Re: on the importance of names

2011-05-31 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com skribas: On Thu 31 Mar 2011 11:32, l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com writes: It would be nice to add it in 2.0.x, as it's a compatible change. OK, sounds good! I guess you’ll have to add the explanation of why the name’s so

Re: Cross-compiling Guile 2.0

2011-05-27 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com skribas: After having read Using System Type again in the autoconf manual, I am convinced again that the right thing to do is to add a %target-type fluid or mutable parameter, defaulting to the %host-type. We select how to compile for the target by making

Re: possible hash deadlock with recent changes

2011-05-08 Thread Ludovic Courtès
Hi, dsm...@roadrunner.com writes: Recent changes to stable-2.0 seem to cause a deadlock in scwm. Here is the last 10 frames of a backtrace. I’m not sure if this is related but there’s this new error that has started happening from time to time: --8---cut

‘map’ and ‘for-each’ written in Scheme

2011-05-08 Thread Ludovic Courtès
Hello! Could you add benchmarks so we can see how the Scheme and C implementations compare? For the record, the results for ‘fold’: http://thread.gmane.org/gmane.lisp.guile.devel/10652. Thanks, Ludo’.

Re: Some guile-unify activities

2011-05-08 Thread Ludovic Courtès
Hey, Nice stuff! Stefan Israelsson Tampe stefan.ita...@gmail.com writes: 3. For the type-checking examples I've been working with the assumptions of having fixed declarations for lambdas and deduce types for variables and their passage through the system. The thought is that in the end one

Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-33-ga2a6c0e

2011-05-07 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com writes: commit a2a6c0e319b5c146c484cb1fe8ffc9b14b9a9876 Author: Andy Wingo wi...@pobox.com Date: Fri May 6 00:17:35 2011 +0200 avoid tls gets when handling interrupts in the vm * libguile/__scm.h (SCM_ASYNC_TICK_WITH_CODE): Redefine to take

Re: [PATCH] Fix several POSIX functions to use the locale encoding

2011-05-07 Thread Ludovic Courtès
Hi Mark, Mark H Weaver m...@netris.org writes: In particular: `system*', `execl', `execlp', `execle', `environ', and `dynamic-args-call' use scm_i_allocate_string_pointers to convert a list of SCM strings into an argv-style array of C strings. That function does a simple memcpy for narrow

Re: Reducing iconv-induced memory usage

2011-05-07 Thread Ludovic Courtès
Hello! l...@gnu.org (Ludovic Courtès) writes: Hello, l...@gnu.org (Ludovic Courtès) writes: Here’s an updated patch that strictly checks for ill-formed UTF-8 sequences, as Mark pointed out. It passes all the tests I recently added to ports.test. I committed it, though Mark rightfully

Re: pending branch: lexical-literals

2011-05-06 Thread Ludovic Courtès
Hi Andy, Sorry for the late reply. Andy Wingo wi...@pobox.com writes: I have a branch that fixes literal matching to actually compare toplevel bindings, as the RNRS suggest, rather than simply assuming that a literal that is not lexically bound can be compared symbolically. (Recall that

Re: Reducing iconv-induced memory usage

2011-05-06 Thread Ludovic Courtès
Hello, l...@gnu.org (Ludovic Courtès) writes: Here’s an updated patch that strictly checks for ill-formed UTF-8 sequences, as Mark pointed out. It passes all the tests I recently added to ports.test. I committed it, though Mark rightfully noted on IRC a non-conformance issue. I’ve added

Re: Reducing iconv-induced memory usage

2011-05-05 Thread Ludovic Courtès
Hello! Here’s an updated patch that strictly checks for ill-formed UTF-8 sequences, as Mark pointed out. It passes all the tests I recently added to ports.test. I’d like to commit it soon, when Mark approves. :-) Thanks, Ludo’. diff --git a/libguile/ports.c b/libguile/ports.c index

Re: early termination for `map'

2011-05-05 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com writes: If you call `map' or `for-each' with more than one list, our versions of these operators will detect if the lists are of unequal length, and throw an error in that case. However, SRFI-1 has long provided an extension to this, to allow for early

Re: goops proposal: proper struct classes

2011-05-05 Thread Ludovic Courtès
Hi Andy, Andy Wingo wi...@pobox.com writes: If you know GOOPS, then you know that we have classes, rooted at class. And indeed class shows up a lot in documentation and in code. But that's not how it is in CLOS: our class corresponds to their `standard-class'. They have a superclass,

Re: ‘set-cdr!’ and weak-cdr pairs

2011-05-05 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com writes: On Sun 27 Mar 2011 15:29, l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com writes: On Sun 13 Mar 2011 16:25, l...@gnu.org (Ludovic Courtès) writes: The problem is that ‘hash-create-handle!’ above created a weak-cdr pair—i.e

Re: goops proposal: proper struct classes

2011-05-05 Thread Ludovic Courtès
Hey! Andy Wingo wi...@pobox.com writes: Here's the problem, for me: scheme@(guile-user) (define-record-type foo (make-foo x) foo? (x foo-x)) scheme@(guile-user) (make-foo 10) $1 = #foo x: 10 scheme@(guile-user) (struct-vtable $1) $2 = #vtable:2356fa0

Re: early termination for `map'

2011-05-05 Thread Ludovic Courtès
Andy Wingo wi...@pobox.com writes: On Thu 05 May 2011 18:26, l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com writes: If you call `map' or `for-each' with more than one list, our versions of these operators will detect if the lists are of unequal length, and throw an error

Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.

2011-05-04 Thread Ludovic Courtès
Hi Noah, Noah Lavine noah.b.lav...@gmail.com writes: The reason this strangeness enters is that path strings are actually lists (or vectors) encoded as strings. Conceptually, the path ~/Desktop/Getting\ a\ Job is the list (~ Desktop Getting a Job). In this representation, there are no

Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.

2011-05-03 Thread Ludovic Courtès
Hi, Andy Wingo wi...@pobox.com writes: On Tue 03 May 2011 00:18, l...@gnu.org (Ludovic Courtès) writes: I still think that we need at least the ability to pass a bytevector as a path name, on GNU systems; and that if we can do so, then any routine that needs to deal with a path name would

Re: heads up: goops class export

2011-05-03 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com writes: On Tue 03 May 2011 10:50, l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com writes: Currently when you define a SMOB type or set a name on a vtable, a corresponding class is automatically exported from (oop goops). This breaks

Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.

2011-05-02 Thread Ludovic Courtès
Hi, Andy Wingo wi...@pobox.com writes: Basically I think the plan should be to add scm_from_locale_path, scm_from_raw_path, etc to filesys.[ch], and change any pathname-accepting procedure in Guile to accept path objects, producing them from strings when given strings, and pass the

Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.

2011-05-02 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com writes: On Mon 02 May 2011 22:58, l...@gnu.org (Ludovic Courtès) writes: [...] The funny thing is that this doesn't matter at all. Well, I mean that it's valid to construct pathnames with / as the separator on Windows, as / and \ are equivalent there. Oh

Re: Patch: New section Invoking Guile for chapter Programming in Scheme

2011-04-27 Thread Ludovic Courtès
Hi! Andy Wingo wi...@pobox.com writes: On Tue 26 Apr 2011 23:01, l...@gnu.org (Ludovic Courtès) writes: Neil Jerram n...@ossau.uklinux.net writes: Just one meta-thing that occurred to me: can we all agree on a value for fill-column, so as to avoid spurious M-q diffs? And, if we can agree

Re: Reducing iconv-induced memory usage

2011-04-27 Thread Ludovic Courtès
Hi Mark, Mark H Weaver m...@netris.org writes: l...@gnu.org (Ludovic Courtès) writes: So, here’s the patch. It also makes UTF-8 input ~30% faster according to ports.bm (which doesn’t benchmark output): Thanks for working on this. I haven't yet had time to fully review this patch

GNU Guile 2.0.1 released

2011-04-27 Thread Ludovic Courtès
number, e.g., 2.1.*, are unstable development versions. Even middle numbers indicate stable versions. This has been the case since the 1.3.* series. Please report bugs to `bug-gu...@gnu.org'. We also welcome reports of successful builds, which can be sent to the same email address. Ludovic

Re: binary-port?

2011-04-26 Thread Ludovic Courtès
Hi Andreas, Andreas Rottmann a.rottm...@gmx.at writes: Well, I'm not advocating making them disjoint in the sense that the textual or binary operations are only possible on matching ports. Allowing to mix binary and textual I/O on any port, is, IMHO, a fine and reasonable

Re: Patch: New section Invoking Guile for chapter Programming in Scheme

2011-04-26 Thread Ludovic Courtès
Hi Neil, Neil Jerram n...@ossau.uklinux.net writes: Just one meta-thing that occurred to me: can we all agree on a value for fill-column, so as to avoid spurious M-q diffs? And, if we can agree on that, is there a neat way of helping people to use it? - some kind of local variables setup, I

Reducing iconv-induced memory usage

2011-04-26 Thread Ludovic Courtès
Hello! As Andy noted in the past, iconv conversion descriptors associated with ports take up a lot of malloc’d memory, that only gets freed when finalizers are run. On GNU/Linux, a UTF-8 → UTF-8 C.D., which does nothing, mallocs 180 KiB (!), according to the program attached. So the problem is

Re: Reducing iconv-induced memory usage

2011-04-26 Thread Ludovic Courtès
Hi! So, here’s the patch. It also makes UTF-8 input ~30% faster according to ports.bm (which doesn’t benchmark output): * before: (ports.bm: peek-char: latin-1 port 70 user 0.36) (ports.bm: peek-char: utf-8 port, ascii character 70 user 0.35) (ports.bm: peek-char: utf-8

Re: Trouble joining with threads from C

2011-04-25 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com writes: When do you propose that the cleanup handlers for the thread be called? As far as I understand things, reliably cleaning up after the thread *requires* the use of pthread_key with a destructor. It is the only way to attach a cleanup callback to a

Re: Trouble joining with threads from C

2011-04-25 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com writes: On Mon 25 Apr 2011 15:53, l...@gnu.org (Ludovic Courtès) writes: [...] Currently they all pass, but ‘test-scm-spawn-thread’ hits a libgc assertion failure (“Duplicate large block deallocation”) once every 5 runs or so: I guess we disable this one

Re: binary-port?

2011-04-24 Thread Ludovic Courtès
Hi Marco, Marco Maggi marco.maggi-i...@poste.it writes: Ludovic Courtès wrote: However, I’m wondering whether we should not just squarely do away with the binary/textual distinction How would you handle port position? Currently port position is in bytes for all kinds of ports (info

Re: binary-port?

2011-04-23 Thread Ludovic Courtès
Hi Andreas! Andreas Rottmann a.rottm...@gmx.at writes: l...@gnu.org (Ludovic Courtès) writes: [...] However, I’m wondering whether we should not just squarely do away with the binary/textual distinction, and just write: (define (binary-port? p) #t) What do people with experience

Re: Creating a Lua roadmap

2011-04-23 Thread Ludovic Courtès
Hi, Andy Wingo wi...@pobox.com writes: On Fri 22 Apr 2011 21:48, Phil theseaisinh...@gmail.com writes: Alright, cool. Just to be clear the end goal is to include this in Guile eventually, right? Yes, if it is of good quality and compatible with other Lua implementations, I'd be happy to

binary-port?

2011-04-22 Thread Ludovic Courtès
Hello, I just pushed 96128014bfaabe9e123c4f4928ce4c20427eaa53, which makes ‘binary-port?’ deterministic for ports intended to be binary. However, I’m wondering whether we should not just squarely do away with the binary/textual distinction, and just write: (define (binary-port? p) #t) What

Re: Just to mention: Why there's still not any guile-2.0 packages in linux distributions?

2011-04-20 Thread Ludovic Courtès
Hello! Dmitry Dzhus d...@dzhus.org writes: CRLF0710 wrote: Guile 2.0 has been there for some time. Why there's still not any guile-2.0 package in linux distributions? There's a Guile 2.0 ebuild in Gentoo Portage main tree, also Lisp team provides ebuilds for building trunk version of

Re: Guile virtual machine targets

2011-04-18 Thread Ludovic Courtès
Hello, There are experience reports suggesting that LLVM is not well suited for JIT: it’s relatively slow because the main goal is AOT, not JIT, and has a large memory footprint. For example, from http://vmkit.llvm.org/publications/vmkit.html, Section 4.3 (“Startup Time”): Although LLVM has

Re: A Modest Proposal

2011-04-14 Thread Ludovic Courtès
Hi, William ML Leslie william.leslie@gmail.com writes: 0. Objects in javascript are maps from string keys to any value. If they are to be cast as hashes or dictionaries when passed to a language that allows non-string keys, and the language adds a non-string key, what happens to the

Re: after-gc-hook recently broken for bdwgc 7.2alpha CVS

2011-04-13 Thread Ludovic Courtès
Hi Mark, Mark H Weaver m...@netris.org writes: Sometime between 2.0.0 and current stable-2.0, after-gc-hook has been broken on my system: FAIL: gc.test: gc: after-gc-hook gets called. FWIW Hydra has had this problem in the GCC 3.x build job: http://hydra.nixos.org/build/1043456 It first

Re: Trouble joining with threads from C

2011-04-13 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) writes: Hi! Howdy! Andy Wingo wi...@pobox.com writes: No, the issue is elsewhere, that the thread-exit handlers were not being called I just tried with 60582b7c2a495957012f9a20cd8691dc6307a850 and ‘on_thread_exit’ /is/ called after something like ‘(call

Re: Trouble joining with threads from C

2011-04-13 Thread Ludovic Courtès
Hello, l...@gnu.org (Ludovic Courtès) writes: l...@gnu.org (Ludovic Courtès) writes: Andy Wingo wi...@pobox.com writes: No, the issue is elsewhere, that the thread-exit handlers were not being called I just tried with 60582b7c2a495957012f9a20cd8691dc6307a850 and ‘on_thread_exit

Re: Broken Mail Transport Agent at stelco.com.mv

2011-04-12 Thread Ludovic Courtès
Hey! Andy Wingo wi...@pobox.com writes: On Sun 10 Apr 2011 00:09, Mark H Weaver m...@netris.org writes: postmas...@stelco.com.mv writes: This is an automatically generated Delivery Status Notification. Delivery to the following recipients failed. shi...@stelco.com.mv Can one of

Re: Guile 2.0 eating memory on ARM

2011-04-11 Thread Ludovic Courtès
Hi Neil, Sorry for the late reply. Neil Jerram n...@ossau.uklinux.net writes: Neil Jerram n...@ossau.uklinux.net writes: I think I've successfully cross-compiled Guile (stable-2.0, e309f3bf9e) for my Freerunner phone. However, when I run it, it just keeps allocating memory until the OOM

Re: define-inlinable

2011-04-11 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com writes: Running r6rs-arithmetic-flonums.test ERROR: r6rs-arithmetic-flonums.test: fixnum-flonum: simple - arguments: ((wrong-type-arg #f Wrong type to apply: ~S (#syntax-transformer fixnum?) (#syntax-transformer fixnum?))) In practice this means that

Re: [PATCH] Fix the R6RS exact-integer-sqrt and import into core guile

2011-04-09 Thread Ludovic Courtès
Hi Mark, Mark H Weaver m...@netris.org writes: l...@gnu.org (Ludovic Courtès) writes: Why do you think the C interface should be kept internal? Most of the core arithmetic procedures provide public C interfaces. Why should exact-integer-sqrt be treated differently? Because: 1. I

Re: [PATCH] Fix the R6RS exact-integer-sqrt and import into core guile

2011-04-09 Thread Ludovic Courtès
Hi Mark! Mark H Weaver m...@netris.org writes: l...@gnu.org (Ludovic Courtès) writes: OK. I was thinking that I’d use C when dealing with fixnums or floats, and let Guile manage bignums and similar—in which case writing C doesn’t seem to help much. Do you think there are use cases

Re: [PATCH] Fix the R6RS exact-integer-sqrt and import into core guile

2011-04-07 Thread Ludovic Courtès
Hi! Mark H Weaver m...@netris.org writes: exact-integer-sqrt is broken. It is now implemented in (rnrs base) by doing an inexact sqrt and coercing the answer to exact. This fails badly for large integers: scheme@(guile-user) (use-modules ((rnrs base) #:version (6)))

Re: gnu in summer-of-code: more projects needed

2011-04-07 Thread Ludovic Courtès
Hello! BT Templeton b...@hcoop.net writes: l...@gnu.org (Ludovic Courtès) writes: BT Templeton b...@hcoop.net writes: [...] * Implement Emacs-compatible lexical binding support In what way is the current elisp implementation in Guile not Emacs-compatible? This is a trivial change

Re: [PATCH 3/3] Add `fixnum?' VM primitive

2011-04-07 Thread Ludovic Courtès
Hi! Andreas Rottmann a.rottm...@gmx.at writes: From: Andreas Rottmann a.rottm...@gmx.at Subject: Implement R6RS' `fixnum?' in a smarter way * module/rnrs/arithmetic/fixnums.scm (fixnum?): Implemented using bit-twiddling, and using `define-inlinable'. Fine with me, feel free to commit.

Re: [PATCH] Fix the R6RS exact-integer-sqrt and import into core guile

2011-04-07 Thread Ludovic Courtès
Hello! Mark H Weaver m...@netris.org writes: +SCM_API void scm_exact_integer_sqrt (SCM k, SCM *s, SCM *r); Shouldn’t it be SCM_INTERNAL? (If yes, then the doc should use @deffn instead of @deftypefn.) Why do you think the C interface should be kept internal? Most of the core arithmetic

define-inlinable

2011-04-06 Thread Ludovic Courtès
Hello! Andreas Rottmann a.rottm...@gmx.at writes: From: Andreas Rottmann a.rottm...@gmx.at Subject: Move `define-inlinable' into the default namespace * module/ice-9/boot-9.scm (define-inlineable): Moved here from SRFI-9. * module/srfi/srfi-9 (define-inlinable): Removed here. *

Re: Guile with win32 cross compiling

2011-04-06 Thread Ludovic Courtès
Hello, Volker Grabsch v...@notjusthosting.com writes: If I understand this correctly, the proposed way for cross compilation is to build the code generators (like gen-scmconfig) entirely using the build toolchain. This means that uniconv.h and others have to be available on the build system,

Re: define-inlinable

2011-04-06 Thread Ludovic Courtès
Hi! Andreas Rottmann a.rottm...@gmx.at writes: [...] +behaves the same as a regular procedure, but direct calls will result in +the procedure body being inlined into the caller. + +Making a procedure inlinable eliminates the overhead of the call, How about: Procedures defined with

Re: gnu in summer-of-code: more projects needed

2011-04-04 Thread Ludovic Courtès
Saluton Brian, BT Templeton b...@hcoop.net writes: I'd like to continue my work on the Emacs Lisp compiler. Would be great! Some areas that could use improvement: * Implement Emacs-compatible lexical binding support In what way is the current elisp implementation in Guile not

Re: on the importance of names

2011-03-31 Thread Ludovic Courtès
Howdy! Andy Wingo wi...@pobox.com writes: It would be nice to add it in 2.0.x, as it's a compatible change. OK, sounds good! I guess you’ll have to add the explanation of why the name’s so great to the manual. :-) But, there's no need for it to hold back a 2.0.1 release; there's a lot of

Re: Problems with guile-sqlite3

2011-03-31 Thread Ludovic Courtès
Hello! Andy Wingo wi...@pobox.com writes: Interesting. It seems that the string-pointer code is doing the wrong thing: It works as advertised. :-) -- Scheme Procedure: string-pointer string Return a foreign pointer to a nul-terminated copy of STRING in the current locale

Re: [PATCH] more descriptive error for dynamic-pointer

2011-03-31 Thread Ludovic Courtès
Hello, Mike Gran spk...@yahoo.com writes: + const char *lt_err = lt_dlerror (); + if (lt_err == (const char *) NULL || strncmp (lt_err, No Error, strlen (No Error))) + { + char *msg; + int ret; + ret = asprintf (msg, symbol \%s\ not found, symb); +

Re: Using libunistring for string comparisons et al

2011-03-31 Thread Ludovic Courtès
Hi, Peter Brett pe...@peter-b.co.uk writes: l...@gnu.org (Ludovic Courtès) writes: [...] My impression is that GLib co. are well-equipped to deal with UTF-8 whereas other C libraries and programs would rather work with locale encoding or ‘wchar_t’ using the standard C APIs. Yep, lots

Re: Guile 2.0 eating memory on ARM

2011-03-31 Thread Ludovic Courtès
Hello Neil, Neil Jerram n...@ossau.uklinux.net writes: I think I've successfully cross-compiled Guile (stable-2.0, e309f3bf9e) for my Freerunner phone. However, when I run it, it just keeps allocating memory until the OOM killer kills it: How much RAM does it have? What is Guile doing when

<    6   7   8   9   10   11   12   13   14   15   >