Fixing `flush-output-port` for R6RS transcoded ports

2020-02-16 Thread Andreas Rottmann
Hi! As I reported in #39610 [0], `flush-output-port`, aka `force-output` is no longer working for R6RS transcoded ports. It was still working in Guile 2.0; the regression was introduced in Guile 2.2, via commit "8399e7af5 ("Generic port facility provides buffering uniformly"). I'd be interested

Re: Reading data from a file descriptor

2015-11-23 Thread Andreas Rottmann
<to...@tuxteam.de> writes: > On Fri, Nov 13, 2015 at 10:51:58AM -0500, Mark H Weaver wrote: >> Jan Synáček <jan.syna...@gmail.com> writes: >> >> > On Sun, Nov 8, 2015 at 12:49 AM, Andreas Rottmann <a.rottm...@gmx.at> >> > wrote: >> > &

Re: [PATCH] Add SRFI-25 implementation

2015-11-14 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver <m...@netris.org> skribis: > >> l...@gnu.org (Ludovic Courtès) writes: >> >>> l...@gnu.org (Ludovic Courtès) skribis: >>> >>>> Andreas Rottmann <a.rottm...@gmx.at> skribis: >>&

Re: Reading data from a file descriptor

2015-11-07 Thread Andreas Rottmann
(display "\n"))) (process-fd (acquire-valid-fd)) You could now just implement `acquire-valid-fd' in C and expose it to Scheme, if that is even necessary. If you have the FD available via e.g. an environment variable, `acquire-valid-fd' can be implemented in Scheme as well. Regards, Rotty -- Andreas Rottmann -- <http://rotty.xx.vu/>

Re: [PATCH] Heed the reader settings implied by #!r6rs

2015-07-29 Thread Andreas Rottmann
Mark H Weaver m...@netris.org writes: Andreas Rottmann a.rottm...@gmx.at writes: When encountering the #!r6rs directive, apply the appropriate reader settings to the port. * libguile/read.scm (read-string-as-list): New helper procedure. (scm_read_shebang): Set reader options implied

[PATCH] Heed the reader settings implied by #!r6rs

2015-07-28 Thread Andreas Rottmann
When encountering the #!r6rs directive, apply the appropriate reader settings to the port. * libguile/read.scm (read-string-as-list): New helper procedure. (scm_read_shebang): Set reader options implied by the R6RS syntax upon encountering the #!r6rs directive. * test-suite/tests/reader.test

[PATCH] Add SRFI-25 implementation

2015-07-27 Thread Andreas Rottmann
Adds an implementation of SRFI 25 on top of Guile's native arrays. The implementation does not introduce a disjoint type; Guile arrays and SRFI-25 arrays can be used interchangably, though with different, partly conflicting APIs. * NEWS: Add preliminary, incomplete section on 2.0.12, noting the

Re: [PATCH 2/3] Add C++ extern C guards to internal headers.

2015-07-16 Thread Andreas Rottmann
Taahir Ahmed ahmed.taa...@gmail.com writes: On Tuesday 14 July 2015 21:36:31 Andreas Rottmann wrote: Just a minor nitpick: it might make sense to add a pair of macros to libguile/__scm.h for the '#ifdef __cplusplus' dance, so these boilerplate additions become just two lines, e.g.: That's

Re: [PATCH 2/3] Add C++ extern C guards to internal headers.

2015-07-14 Thread Andreas Rottmann
, Rotty -- Andreas Rottmann -- http://rotty.xx.vu/

Re: Build failure (stable-2.0, make distcheck)

2013-01-07 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Andreas Rottmann a.rottm...@gmx.at skribis: It is the case; guile.info is present, but it seems that it's not newer that one of the sources it's built from: % tar --utc -tvf _build/guile-2.0.7.13-b5d83.tar.gz | grep -E '\.(info|texi)$' | awk '{ print

Re: Build failure (stable-2.0, make distcheck)

2013-01-02 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi Andreas, Andreas Rottmann a.rottm...@gmx.at skribis: mkdir: cannot create directory '.am27744': Permission denied ../../../doc/ref/guile.texi: No such file or directory make[5]: *** [../../../doc/ref/guile.info] Error 1 Normally guile.info

Re: Fix reader options for R6RS `get-datum'

2012-12-17 Thread Andreas Rottmann
Mark H Weaver m...@netris.org writes: Andreas Rottmann a.rottm...@gmx.at writes: Mark H Weaver m...@netris.org writes: Section 8.3 defines 'read' as follows: Reads an external representation from textual-input-port and returns the datum it represents. The read procedure operates

Re: Fix reader options for R6RS `get-datum'

2012-12-13 Thread Andreas Rottmann
Mark H Weaver m...@netris.org writes: Hi Andreas, Andreas Rottmann a.rottm...@gmx.at writes: Mark H Weaver m...@netris.org writes: Andreas Rottmann a.rottm...@gmx.at writes: This patch series addresses the problem that `get-datum' is using the global reader options, even for those options

Re: Fix reader options for R6RS `get-datum'

2012-12-12 Thread Andreas Rottmann
Mark H Weaver m...@netris.org writes: Hi Andreas, Andreas Rottmann a.rottm...@gmx.at writes: This patch series addresses the problem that `get-datum' is using the global reader options, even for those options that have to have fixed values to make the reader behave in an R6RS-compatible way

Fix reader options for R6RS `get-datum'

2012-12-09 Thread Andreas Rottmann
This patch series addresses the problem that `get-datum' is using the global reader options, even for those options that have to have fixed values to make the reader behave in an R6RS-compatible way. * [PATCH 1/3] Split r6rs-ports.c according to module boundaries Needed by the last patch,

[PATCH 2/3] Add internal API to specify reader options at reader invocation

2012-12-09 Thread Andreas Rottmann
* libguile/private-options.h: Introduce a new enum indexing the read options, and use its values as indices for scm_read_opts. * libguile/read.c: Get rid of the bit field offsets #define-s, and instead use the enum values to caculate them. * libguile/read.c (enum t_keyword_style,

[PATCH 3/3] Make `get-datum' conform more closely to R6RS semantics

2012-12-09 Thread Andreas Rottmann
With Guile's default reader options, R6RS hex escape and EOL escape behavior is missing. This change enables the former via the `r6rs-hex-escapes' option, and gets us closer to the latter by setting `hungry-eol-escapes'. * libguile/r6rs-ports.c (R6RS_READ_OPTION_MASK): New macro, defines which

Re: Adding to the end of the load path

2012-11-15 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi! Sorry for the delay. Andreas Rottmann a.rottm...@gmx.at skribis: Ian Price ianpric...@googlemail.com writes: [...] Andreas Rottmann suggested something similar in February[1]. I've attached a patch implementing that suggestion, FWIW. I

Re: thoughts on native code

2012-11-15 Thread Andreas Rottmann
, Rotty -- Andreas Rottmann -- http://rotty.xx.vu/

Re: [PATCH] Add missing R6RS `open-file-input/output-port' procedure

2012-11-13 Thread Andreas Rottmann
Mark H Weaver m...@netris.org writes: Hi Andreas, This patch looks good to me! Thanks for the quick review, also for the other patches! I've pushed this one now. Cheers, Rotty -- Andreas Rottmann -- http://rotty.xx.vu/

Re: [PATCH] Fix `get-string-n!' i/o-decoding exception behavior

2012-11-12 Thread Andreas Rottmann
Mark H Weaver m...@netris.org writes: Andreas Rottmann a.rottm...@gmx.at writes: Mark H Weaver m...@netris.org writes: Why not leave the API as-is, and in the event of an error, just raise the proper R6RS exception from within 'scm_get_string_n_x'? The problem here is that we have no easy

[PATCH] Add missing R6RS `open-file-input/output-port' procedure

2012-11-12 Thread Andreas Rottmann
* module/rnrs/io/port.scm (r6rs-open): New internal helper procedure for opening files. (open-file-input-port, open-file-output-port): Make use of `r6rs-open'. (open-file-input/output-port): Implement in terms of `r6rs-open', add to exported identifiers list. * module/rnrs.scm

Re: [PATCH] Fix `get-string-n!' i/o-decoding exception behavior

2012-11-11 Thread Andreas Rottmann
Mark H Weaver m...@netris.org writes: Hi Andreas, Thanks for the patch. See below for my comments. Andreas Rottmann a.rottm...@gmx.at writes: diff --git a/libguile/ports.c b/libguile/ports.c index 55808e2..b653af4 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -1392,12

Re: Adding to the end of the load path

2012-11-11 Thread Andreas Rottmann
Mark H Weaver m...@netris.org writes: Hi Andreas, Andreas Rottmann a.rottm...@gmx.at writes: Ian Price ianpric...@googlemail.com writes: From 1f72ddd3971a796a6f83a68ebedde7d7324c50b5 Mon Sep 17 00:00:00 2001 From: Andreas Rottmann a.rottm...@gmx.at Date: Thu, 8 Nov 2012 01:59:56 +0100

Re: [PATCH] Add .guile.sls and .sls to the default %load-extensions

2012-11-08 Thread Andreas Rottmann
prepend, but also append to the compiled-in load path, as implemented by the patch I posted [0]. [0] http://lists.gnu.org/archive/html/guile-devel/2012-11/msg00056.html -- Andreas Rottmann -- http://rotty.xx.vu/

[PATCH] Fix `get-string-n!' i/o-decoding exception behavior

2012-11-07 Thread Andreas Rottmann
Previously, `get-string-n!' from `(rnrs io ports)' would not throw the exception required by R6RS, and could not easily do so due to being implemented entirely in C. This change fixes this by introducing a corresponding internal C function reporting errors by return value and reimplementing the

Re: [PATCH] Make `get-datum' conform more closely to R6RS semantics

2012-11-06 Thread Andreas Rottmann
Mark H Weaver m...@netris.org writes: Hi Andreas, Andreas Rottmann a.rottm...@gmx.at writes: * module/rnrs/io/ports.scm (get-datum): Set reader options to be more compatible with R6RS syntax. With Guile's default reader options, R6RS hex escape and EOL escape behavior is missing

Re: Release time!

2012-11-06 Thread Andreas Rottmann
of distribution). Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: [PATCH] Add .guile.sls and .sls to the default %load-extensions

2012-11-04 Thread Andreas Rottmann
using command-line switches (-x .guile.sls -x .sls), so I don't know... Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: [PATCH] Add .guile.sls and .sls to the default %load-extensions

2012-11-04 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi! Andreas Rottmann a.rottm...@gmx.at skribis: For performance reasons, it *might* make sense to not enable this behavior by default, but provide a command-line switch; however, enabling this behavior is *already* possible using command-line switches

Re: Our temporary guildhall package repository down?

2012-05-27 Thread Andreas Rottmann
this will eventually happen. Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: Psyntax security hole prevents secure sandboxing in Guile

2012-05-07 Thread Andreas Rottmann
that achieves sandboxing (with the above property of CPU and RAM usage bounds), i believe: http://docs.racket-lang.org/reference/Sandboxed_Evaluation.html Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: Comments on ‘wip-nio’

2012-03-31 Thread Andreas Rottmann
been looking a bit at C event loop libraries, and just wanted to note that libev[0] seems like a viable alternative to libevent. [0] http://software.schmorp.de/pkg/libev.html Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: Non-stack-copying call-with-current-continuation?

2012-03-02 Thread Andreas Rottmann
(and probably other Schemes) provide this primitive under the name call-with-escape-continuation (call/ec): http://docs.racket-lang.org/reference/cont.html?q=call/ec#%28def._%28%28quote._~23~25kernel%29._call-with-escape-continuation%29%29 Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: Non-stack-copying call-with-current-continuation?

2012-03-02 Thread Andreas Rottmann
(and probably other Schemes) provide this primitive under the name call-with-escape-continuation (call/ec): http://docs.racket-lang.org/reference/cont.html?q=call/ec#%28def._%28%28quote._~23~25kernel%29._call-with-escape-continuation%29%29 Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Extending default %load-path via environment variable

2012-02-06 Thread Andreas Rottmann
) the command-line options in stable-2.0, and make the `parse-path' changes in master only. Suggestions for option naming welcome! WDYT? -- Andreas Rottmann -- http://rotty.yi.org/

Re: guild hall update

2011-08-23 Thread Andreas Rottmann
, when updating a package. Yeah, that's indeed a feature I'd really like to add to dorodango, but I'm currently very short on personal hacking time. Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: guildhall status

2011-07-25 Thread Andreas Rottmann
. Perhaps I will implement the ocelotl HTTPd API on top of Guile's webserver -- this would allow code to be shared quite seamlessly. I can push both, if there's interest, but the web interface is in its very early stages ATM. Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: guildhall status

2011-07-23 Thread Andreas Rottmann
. Yeah, it would be cool if someone took care of this. I can help with any dorodango-related issues. Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

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

2011-06-30 Thread Andreas Rottmann
David Pirotte da...@altosw.be writes: Le Sun, 26 Jun 2011 22:15:23 +0200, Andreas Rottmann a.rottm...@gmx.at a écrit : ... The solution (other than just removing the offending .la files) would be to re-build and re-install all software depending on libgc-dev, including g-wrap, as to get

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

2011-06-29 Thread Andreas Rottmann
for a dynamic extent save for using that (assumably) private API. How about (especially since it looks like R7RS will include a subset of it in the small language) moving SRFI 39 into the core and using that? Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

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

2011-06-26 Thread Andreas Rottmann
g-wrap, as to get rid of the stale references to libgc's .la file. [0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625187 Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

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

2011-06-09 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: 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

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

2011-05-14 Thread Andreas Rottmann
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 Rottmann a.rottm...@gmx.at writes: commit 2252321bb77fe83d98d5bcc9db1c76b914e9dd6a Author: Andreas Rottmann a.rottm

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

2011-05-13 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi Andreas, Thanks for taking care of this, and thanks for the great doc too! Andreas Rottmann a.rottm...@gmx.at writes: commit 2252321bb77fe83d98d5bcc9db1c76b914e9dd6a Author: Andreas Rottmann a.rottm...@gmx.at Date: Sat May 7 23:40:14 2011 +0200

[PATCH] Set the FD_CLOEXEC flag on the runtime's file descriptors

2011-05-07 Thread Andreas Rottmann
This is supposed to prevent Guile to leak internal file descriptors across an exec* system call. The Guile user has still to take care of setting the CLOEXEC flag on all ports (e.g., using `port-for-each'). Linux's LVM tools are a nice test case for this, as they emit a warning line for each

[PATCH] Set the FD_CLOEXEC flag on the runtime's file descriptors

2011-05-07 Thread Andreas Rottmann
* libguile/_scm.h (scm_set_fd_cloexec): New convenience macro for setting the FD_CLOEXEC flah on platforms that support it; on other platforms it's a no-op. * libguile/objcodes.c (scm_load_objcode): Mark the objectcode's FD as close-on-exec. * libguile/scmsigs.c

Re: g-wrap - fresh git clone - can't find libguile.h:

2011-05-03 Thread Andreas Rottmann
, and try again? Also make sure ACLOCAL_FLAGS is set in a way so that the matching guile.m4 gets picked up; if you have installed Guile into /usr/local, that would be: export ACLOCAL_FLAGS=-I /usr/local/share/aclocal ./autogen.sh make HTH, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: g-wrap - fresh git clone - can't find libguile.h:

2011-05-03 Thread Andreas Rottmann
Andreas Rottmann a.rottm...@gmx.at writes: David Pirotte da...@altosw.be writes: Le Tue, 03 May 2011 12:43:07 +0200, Andy Wingo wi...@pobox.com a écrit : On Mon 02 May 2011 20:57, David Pirotte da...@altosw.be writes: After having just installed a guile fresh git clone, g-wrap [fresh

Re: binary-port?

2011-04-25 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi, Andreas Rottmann a.rottm...@gmx.at writes: - Ikarus and Ypsilon definitly have disjoint ports. - Racket natively has ports that will accept both binary and textual operations, but it's R6RS support wraps these ports so that the resulting

Re: [PATCH] Several tweaks for R6RS ports

2011-04-20 Thread Andreas Rottmann
Andy Wingo wi...@pobox.com writes: Hi Andreas, On Thu 24 Mar 2011 01:47, Andreas Rottmann a.rottm...@gmx.at writes: l...@gnu.org (Ludovic Courtès) writes: Could you send a patch to update the manual? I have started working on this, but I'm notorious (at least to myself) for starving

Re: CPAN-type thing: specifications, wishes, thoughts?

2011-04-20 Thread Andreas Rottmann
a similiar strategy would work for Guile's repository as well. [1] http://www.debian.org/doc/developers-reference/pkgs.html#nmu How will packages be nominated / selected for inclusion? I'd imagine a discussion on guile-devel beforehand would work. Regards, Rotty -- Andreas Rottmann -- http

Re: CPAN-type thing: specifications, wishes, thoughts?

2011-04-20 Thread Andreas Rottmann
for this has to be present in the conception of the package/bundle format, so indeed it's important that taking this feature into account from the beginning. I think this could be a part of a package manager that also does the other things Paul was listing. Indeed! Regards, Rotty -- Andreas

Re: CPAN-type thing: specifications, wishes, thoughts?

2011-04-20 Thread Andreas Rottmann
CRLF0710 crlf0...@gmail.com writes: Something like the Planets of Racket-lang? Should be able to install offline, though~ FWIW, dorodango supports local filesystem-based repositories, so you can just mirror your favorite repository, and then install offline. Regards, Rotty -- Andreas

Re: CPAN-type thing: specifications, wishes, thoughts?

2011-04-20 Thread Andreas Rottmann
Andreas Rottmann a.rottm...@gmx.at writes: I was thinking that most of this project could be written in Guile. I think all of it can be written in Scheme, except for some low-level code interfacing with things like libzip (if ZIP is adopted as a package format). Let me restate: *all

Re: define-inlinable

2011-04-11 Thread Andreas Rottmann
) -- it just feels wrong, but sometimes performance numbers are seductive... Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: Hi! Interested in GSoC. Feedback on these ideas?

2011-04-07 Thread Andreas Rottmann
thought it would make sense to try to write a GUILE specific package-manager. Could you be more specific? What exactly in the code base did make you think so? Thanks, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: [PATCH] Undeprecate read syntax for uniform complex vectors

2011-04-06 Thread Andreas Rottmann
Thanks to Andreas Rottmann a.rottm...@gmx.at for the bug report. Thanks! What bug does it fix? Sorry for being obtuse :) A test suite failure in srfi-4.test when building with --disable-deprecated, see also: http://rotty.yi.org/irclogs/freenode/%23guile/2011-04-06/#e18 Regards, Rotty

Re: define-inlinable

2011-04-06 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hello! Andreas Rottmann a.rottm...@gmx.at writes: Subject: Move `define-inlinable' into the default namespace +@node Inlinable Procedures +@subsection Inlinable Procedures + +You can define an ``inlinable procedure'' by using Use @dfn{inlinable

Re: GSoC 2011

2011-04-05 Thread Andreas Rottmann
to yield good and schemely bindings, there might still be some corners in the API that profit from some glossing over, and sbank provides such glossing where and when such cases are identified. Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: Take some lowhanging fruit to speed up R6RS fixnum operations

2011-04-04 Thread Andreas Rottmann
Andy Wingo wi...@pobox.com writes: On Wed 30 Mar 2011 12:58, Andreas Rottmann a.rottm...@gmx.at writes: unzip times the unzipping of a not-so-large (675KiB) ZIP file using Göran Weinholts ZIP implementation. How long does the standard unix utility take, for the record? On a tmpfs

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

2011-04-04 Thread Andreas Rottmann
back to the `fixnum?' VM primitive when it's clear where its corresponding Scheme binding should go. 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

R6RS fixnum arithmetic optimizations

2011-04-02 Thread Andreas Rottmann
After getting no feedback on my last mail so far, here is a series of proposed patches for the stable-2.0 branch. In total, they speed up the unzip benchmark by a factor of about 4.7, but it's still about 1.8 times slower than what we'd get for using generic (non-fixnum) operations.

[PATCH 2/3] Several optimizations for R6RS fixnum arithmetic

2011-04-02 Thread Andreas Rottmann
* module/rnrs/arithmetic/fixnums.scm (assert-fixnum): Is now a macro. (assert-fixnums): New procedure checking a the elements of a list for fixnum-ness. All callers applying `assert-fixnum' to a list now changed to use this procedure. * module/rnrs/arithmetic/fixnums.scm (define-fxop*):

[PATCH 1/3] Add a few benchmarks for R6RS fixnum arithmetic

2011-04-02 Thread Andreas Rottmann
* benchmark-suite/benchmarks/r6rs-arithmetic.bm: New file containing some benchmarks for R6RS fixnum operations. * benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add benchmarks/r6rs-arithmetic. --- benchmark-suite/Makefile.am |1 +

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

2011-04-02 Thread Andreas Rottmann
This primitive can be used to significantly speed up the operations in `(rnrs arithmetic fixnums)'. * libguile/r6rs-arithmetic.c: New file containing `fixnum?' procedure implementation as a new extension. * libguile/r6rs-arithmetic.h: New file with prototypes for the above. *

Re: Take some lowhanging fruit to speed up R6RS fixnum operations

2011-03-30 Thread Andreas Rottmann
Andy Wingo wi...@pobox.com writes: On Wed 23 Mar 2011 00:20, Andreas Rottmann a.rottm...@gmx.at writes: In porting dorodango[0], I have noticed that Guile's R6RS fixnum operations are quite slow; here's a patch to remedy that a bit. What is the state of things here? I'm a bit lost

Re: Take some lowhanging fruit to speed up R6RS fixnum operations

2011-03-30 Thread Andreas Rottmann
[ Sorry for the incomplete mail I just sent; hit the wrong key combo ] Andy Wingo wi...@pobox.com writes: On Wed 23 Mar 2011 00:20, Andreas Rottmann a.rottm...@gmx.at writes: In porting dorodango[0], I have noticed that Guile's R6RS fixnum operations are quite slow; here's a patch to remedy

Re: Take some lowhanging fruit to speed up R6RS fixnum operations

2011-03-29 Thread Andreas Rottmann
Andy Wingo wi...@pobox.com writes: On Wed 23 Mar 2011 00:20, Andreas Rottmann a.rottm...@gmx.at writes: In porting dorodango[0], I have noticed that Guile's R6RS fixnum operations are quite slow; here's a patch to remedy that a bit. What is the state of things here? I'm a bit lost

Re: CPAN for Guile

2011-03-28 Thread Andreas Rottmann
Andy Wingo wi...@pobox.com writes: On Mon 07 Mar 2011 21:13, Andreas Rottmann a.rottm...@gmx.at writes: I'm (very slowly) working on getting dorodango[0] to work on Guile. In principle, nothing in Dorodango is inherently tied to R6RS -- it should very reasonably be possible to use

Re: summer of code project: cpan

2011-03-28 Thread Andreas Rottmann
? Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: Fmt Module

2011-03-26 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hello, Andreas Rottmann a.rottm...@gmx.at writes: l...@gnu.org (Ludovic Courtès) writes: However, even if I think based on your criteria nothing speaks against including fmt in Guile, there is still the argument of code duplication: if some external

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

2011-03-25 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hello! Andreas Rottmann a.rottm...@gmx.at writes: l...@gnu.org (Ludovic Courtès) writes: Hi! Andreas Rottmann a.rottm...@gmx.at writes: +SCM_DEFINE (scm_fixnum_p, fixnum?, 1, 0, 0, +(SCM x), +Return @code{#t} if @var{x

Re: [PATCH] Take some lowhanging fruit to speed up R6RS fixnum operations

2011-03-25 Thread Andreas Rottmann
Andreas Rottmann a.rottm...@gmx.at writes: l...@gnu.org (Ludovic Courtès) writes: Hi Andreas, I’m all for your suggestion. Andreas Rottmann a.rottm...@gmx.at writes: + (define-syntax define-fxop* +(syntax-rules () + ((_ name op) + (define name +(case-lambda

Re: [PATCH] Take some lowhanging fruit to speed up R6RS fixnum operations

2011-03-24 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi Andreas, I’m all for your suggestion. Andreas Rottmann a.rottm...@gmx.at writes: + (define-syntax define-fxop* +(syntax-rules () + ((_ name op) + (define name + (case-lambda + ((x y) +(assert-fixnum x y

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

2011-03-24 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi! Andreas Rottmann a.rottm...@gmx.at writes: +SCM_DEFINE (scm_fixnum_p, fixnum?, 1, 0, 0, +(SCM x), +Return @code{#t} if @var{x} is a fixnum, @code{#f} otherwise.) +#define FUNC_NAME s_scm_fixnum_p +{ + return

Re: [PATCH] Several tweaks for R6RS ports

2011-03-23 Thread Andreas Rottmann
along, so don't hold your breath ;-). Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Take some lowhanging fruit to speed up R6RS fixnum operations

2011-03-22 Thread Andreas Rottmann
In porting dorodango[0], I have noticed that Guile's R6RS fixnum operations are quite slow; here's a patch to remedy that a bit. The patch contains a benchmark for `fxxor', which experiences a performance improvement of 2 with the patch. [0] http://home.gna.org/dorodango/ I also used real code

[PATCH] Take some lowhanging fruit to speed up R6RS fixnum operations

2011-03-22 Thread Andreas Rottmann
* module/rnrs/arithmetic/fixnums.scm (assert-fixnum): Is now a macro. (assert-fixnums): New procedure checking a the elements of a list for fixnum-ness. All callers applying `assert-fixnum' to a list now changed to use this procedure. * module/rnrs/arithmetic/fixnums.scm (define-fxop*):

[PATCH] Add `fixnum?' VM primitive

2011-03-22 Thread Andreas Rottmann
This primitive can be used to significantly speed up the operations in `(rnrs arithmetic fixnums)'. * libguile/numbers.c (scm_fixnum_p): New predicate. * libguile/numbers.h: Add prototype. * libguile/vm-i-scheme.c (fixnump): New VM primitive; renumbered subsequent operations. *

fixnum? VM primitive, increasing fixnum operation speed

2011-03-22 Thread Andreas Rottmann
This is another piece of my attempt at getting more speed out of the `(rnrs arithmetic fixnums)' library. The idea is that this patch would be applied to master. I think, at least in the current form, it is not eligible for 2.0.x, as it messes up the VM opcode numbers, which breaks all .go files,

Re: Fmt Module

2011-03-13 Thread Andreas Rottmann
_at_ \\2 str #t)) - +#; (define mangle-email (make-string-fmt-transformer string-mangle-email)) Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: [PATCH] Don't mix definitions and expressions in SRFI-9

2011-03-07 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi, Andy Wingo wi...@pobox.com writes: On Sun 06 Mar 2011 23:26, l...@gnu.org (Ludovic Courtès) writes: Andreas Rottmann a.rottm...@gmx.at writes: The expansion of `define-inlinable' contained an expression, which made SRFI-9's `define-record-type

Re: [PATCH] Several tweaks for R6RS ports

2011-03-07 Thread Andreas Rottmann
Andreas Rottmann a.rottm...@gmx.at writes: Hi! Here's a few patches related to R6RS port support, in short: - Add missing `get-string-n!' and `get-string-n' - Fix a few missing exports - A bit of work on transcoder-related stuff Attached is an updated version of the rnrs-transcoders patch

Re: [PATCH] Don't mix definitions and expressions in SRFI-9

2011-03-06 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi Andreas, Andreas Rottmann a.rottm...@gmx.at writes: The expansion of `define-inlinable' contained an expression, which made SRFI-9's `define-record-type' fail in non-toplevel contexts (definition used in expression context). SRFI-9 says “Record

Re: FFI on OS X?

2011-03-03 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hi Andreas, Andreas Rottmann a.rottm...@gmx.at writes: Another related issue that has come up in IRC is versioning: If I understand correctly, it is currently impossible to specify the version of the shared object to be used (as one cannot even pass

Re: FFI on OS X?

2011-03-02 Thread Andreas Rottmann
, it would work something like this: (dynamic-link libSDL-1.2 '(0)) ;; calls: lt_dlopen(libSDL-1.2.so.0) [0] http://docs.racket-lang.org/foreign/Loading_Foreign_Libraries.html?q=ffi-lib#(def._((lib._ffi/unsafe..rkt)._ffi-lib)) Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

[PATCH] Add `get-string-n' and `get-string-n!' for R6RS ports

2011-03-02 Thread Andreas Rottmann
These are missing currently; the attached patch adds them. From: Andreas Rottmann a.rottm...@gmx.at Subject: Add `get-string-n' and `get-string-n!' for R6RS ports * libguile/r6rs-ports.c (scm_get_string_n_x): Implement `get-string-n!' in C for efficiency. * libguile/r6rs-ports.h: Add

Handling of the actively-maintained branches (master, stable-2.0)

2011-03-02 Thread Andreas Rottmann
, as git seems to handle duplicate changes quite well (just tried, except for a conflict in GUILE-VERSION, stable-2.0 merged cleanly into master, even with the duplicate changeset). Thoughts? Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: One config issue solved, only to trip over another.

2011-02-28 Thread Andreas Rottmann
in the same package as the .so and .a files; apparently their package is incomplete. Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

[PATCH] Fix linker error on Debian sid

2011-02-27 Thread Andreas Rottmann
Hi! Attached is a patch that fixes a linker error in the test suite when using the default toolchain on Debian sid. It should be applied to both master and stable-2.0, I think. From: Andreas Rottmann a.rottm...@gmx.at Subject: Fix linking for test suite wrt. --no-add-needed See http

Re: hygiene and macro-introduced toplevel bindings

2011-02-27 Thread Andreas Rottmann
wonder what you (and others) think about my idea as outlined above -- could such a thing possibly work? Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: [PATCH] guile-snarf: allow multiple init actions on one line

2011-02-24 Thread Andreas Rottmann
=shformat=html Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

[PATCH] R6RS exception printing -- take #2

2011-02-07 Thread Andreas Rottmann
Andy Wingo wi...@pobox.com writes: Heya Andreas, You proposed a choice between two options: [...] I forgot to attach the patch in my last mail, here it is: From: Andreas Rottmann a.rottm...@gmx.at Subject: Show R6RS exceptions in a reasonable way in the debugger * module/ice-9/boot-9.scm

Re: R6RS exception printing -- take #2

2011-02-07 Thread Andreas Rottmann
options: On Tue 01 Feb 2011 01:19, Andreas Rottmann a.rottm...@gmx.at writes: exception-printer := port key args exception-printer - nothing exception-printer := port args thunk The `key' argument is necessary, at least if you want one printer to handle multiple keys (as the default printer

R6RS exception printing -- take #2

2011-01-31 Thread Andreas Rottmann
: it looks like it /might/ make sense to contemplate deprecating passing the frame information to `display-error' and untangle displaying the exception object and displaying a backtrace completely. ] Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: R6RS exception printing -- take #2

2011-01-31 Thread Andreas Rottmann
Andreas Rottmann a.rottm...@gmx.at writes: Hi! I've started refreshing the patch[0] to improve exception presentation for R6RS exceptions, initially discussed in [1]. I'd like to solicit clarification on a few points. Sorry, forgot the link (it's both the same URL): [0] [1] http

Fix for the ,show REPL meta-command

2011-01-30 Thread Andreas Rottmann
Hi! As indicated by Mark Harig[0], the ,show REPL meta-command is broken (my fault, oversight in 8fdd85f83..). The attached patch should make it work again. From: Andreas Rottmann a.rottm...@gmx.at Subject: Fix `show' REPL meta-command * module/system/repl/command.scm (warranty, copying

Re: trying to make fmt work under guile

2011-01-03 Thread Andreas Rottmann
; it does not allow a literal in the rest arg. Maybe there's another incompatibility which is causing `fmt' to break. I'd just use the `let-optionals*' implementation provided with `fmt', or go with the Wak R6RS adaption. Regards, Rotty -- Andreas Rottmann -- http://rotty.yi.org/

Re: R6RS exception printing at the REPL

2010-12-02 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: Hello there! Andy Wingo wi...@pobox.com writes: On Sat 27 Nov 2010 01:08, Andreas Rottmann a.rottm...@gmx.at writes: to not lose current functionality, `print-exception' and exception printer procedures would need a `frame' argument as well, right

  1   2   >