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 i

Re: Reading data from a file descriptor

2015-11-23 Thread Andreas Rottmann
writes: > On Fri, Nov 13, 2015 at 10:51:58AM -0500, Mark H Weaver wrote: >> Jan Synáček writes: >> >> > On Sun, Nov 8, 2015 at 12:49 AM, Andreas Rottmann >> > wrote: >> > >> > Also note that if there's no requirement to actually impl

Re: [PATCH] Add SRFI-25 implementation

2015-11-14 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver skribis: > >> l...@gnu.org (Ludovic Courtès) writes: >> >>> l...@gnu.org (Ludovic Courtès) skribis: >>> >>>> Andreas Rottmann skribis: >>>> >>>>> Adds an implemen

Re: Reading data from a file descriptor

2015-11-07 Thread Andreas Rottmann
lay (get-bytevector-n port 100)) (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-28 Thread Andreas Rottmann
Mark H Weaver writes: > Andreas Rottmann 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 reade

[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 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 line

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

2015-07-14 Thread Andreas Rottmann
lines, e.g.: + SCM_BEGIN_DECLS ... + SCM_END_DECLS This is done in GLib, for example, and cuts down the noise a bit. Regards, Rotty -- Andreas Rottmann -- <http://rotty.xx.vu/>

Re: [PATCH] Split r6rs-ports.c according to module boundaries

2013-11-30 Thread Andreas Rottmann
API, i.e. place the implementation of all these identifiers in (ice-9 binary-ports): eol-style native-eol-style error-handling-mode make-transcoder transcoder-codec transcoder-eol-style transcoder-error-handling-mode native-transcoder latin-1-codec utf-8-codec utf-16-codec Thoughts? -- 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 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 -

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 skribis: > >> mkdir: cannot create directory '.am27744': Permission denied >> ../../../doc/ref/guile.texi: No such file or directory >> make[5]: *** [../../../doc/ref/guile.info] Er

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

2012-12-17 Thread Andreas Rottmann
Mark H Weaver writes: > Andreas Rottmann writes: > >> Mark H Weaver writes: >> >>> Section 8.3 defines 'read' as follows: >>> >>> Reads an external representation from textual-input-port and returns >>> the datum it represents

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

2012-12-13 Thread Andreas Rottmann
Mark H Weaver writes: > Hi Andreas, > > Andreas Rottmann writes: >> Mark H Weaver writes: >>> Andreas Rottmann writes: >>>> This patch series addresses the problem that `get-datum' is using the >>>> global reader options, even for those op

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

2012-12-12 Thread Andreas Rottmann
Mark H Weaver writes: > Hi Andreas, > > Andreas Rottmann 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-compa

[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

[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, scm_t_read_op

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, since

Re: thoughts on native code

2012-11-15 Thread Andreas Rottmann
r.sls;hb=HEAD [1] http://rotty.xx.vu/gitweb/?p=scheme/avrth.git;a=summary [2] http://amforth.svn.sourceforge.net/viewvc/amforth/trunk/lib/assembler.frt?revision=1301&view=markup [3] http://amforth.sourceforge.net/ Regards, Rotty -- Andreas Rottmann -- <http://rotty.xx.vu/>

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 skribis: > >> Ian Price writes: > > [...] > >>> Andreas Rottmann suggested something similar in February[1]. >>> >> I've attached a pat

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

2012-11-13 Thread Andreas Rottmann
Mark H Weaver 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/>

[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 (open-file

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

2012-11-12 Thread Andreas Rottmann
Mark H Weaver writes: > Andreas Rottmann writes: > >> Mark H Weaver 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 prob

Re: Adding to the end of the load path

2012-11-11 Thread Andreas Rottmann
Mark H Weaver writes: > Hi Andreas, > > Andreas Rottmann writes: > >> Ian Price writes: >> >> From 1f72ddd3971a796a6f83a68ebedde7d7324c50b5 Mon Sep 17 00:00:00 2001 >> From: Andreas Rottmann >> Date: Thu, 8 Nov 2012 01:59:56 +0100 >> Sub

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

2012-11-11 Thread Andreas Rottmann
Mark H Weaver writes: > Hi Andreas, > > Thanks for the patch. See below for my comments. > > Andreas Rottmann writes: > >> diff --git a/libguile/ports.c b/libguile/ports.c >> index 55808e2..b653af4 100644 >> --- a/libguile/ports.c >> +++

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

2012-11-08 Thread Andreas Rottmann
elatedly) *indeed* lacking is a way to make native libraries take precedence to the third-party libraries installed by dorodango. This would be addressed by making the $GUILE_LOAD_PATH (and $GUILE_LOAD_COMPILED_PATH) mechanism to not only 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/>

Re: Adding to the end of the load path

2012-11-07 Thread Andreas Rottmann
n over a guildhall provided one, when this exists. Right > now, for the srfi[0] and guile-lib, I have handled this by not adding > files to the package where they have been adopted by guile (e.g. statprof). > > Andreas Rottmann suggested something similar in February[1]. > I'

[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 `g

Re: Release time!

2012-11-06 Thread Andreas Rottmann
ot as tedious as it might sound: the pkg-list.scm file would have to list each SRFI, but the collection of portable SRFIs can still be maintained in a single source repository and dorodango bundle (i.e. unit of distribution). Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>

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

2012-11-06 Thread Andreas Rottmann
Mark H Weaver writes: > Hi Andreas, > > Andreas Rottmann 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 >>

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 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* possib

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

2012-11-04 Thread Andreas Rottmann
* 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. This change enables the former via the `r6rs-hex-escapes' option, and gets us closer to the latter by

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

2012-11-04 Thread Andreas Rottmann
havior by default, but provide a command-line switch; however, enabling this behavior is *already* possible using command-line switches ("-x .guile.sls -x .sls"), so I don't know... Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>

Re: Our temporary guildhall package repository down?

2012-05-27 Thread Andreas Rottmann
he documentation, and make an initial release. However, my hacking time ATM is quite limited, so I cannot give any date of when 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
though > that would make communication harder. > Racket has a facility 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
yway, libevent for Guile is also a good idea. But I don't think libevent > should integrate into Guile. We can write > a standalone guile-libevent. > I've 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
rompts? > Just to throw my two cents in: Racket (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
rompts? > Just to throw my two cents in: Racket (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
s deemded not suitable for stable-2.0, I'd like to add (only) 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: Minimal Guile

2012-01-04 Thread Andreas Rottmann
Scheme ELF parser around somewhere, and intend to > get back to the "linker" sometime soon. > FWIW, I have written a simple ELF generator in R6RS, which can be found here: http://rotty.xx.vu/gitweb/?p=scheme/avrth.git;a=blob;f=elf.sls;hb=master Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>

G-Wrap 1.9.14 released

2011-12-04 Thread Andreas Rottmann
ards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>

Re: guild hall update

2011-08-23 Thread Andreas Rottmann
tation. Of course, an --r6rs shorthand option for Guile would help here. > Sigil doesn't currently compile files that it installs. It probably > should. It should probably recompile depending modules too, 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
itory, verifying uploaded packages (from a local directory) against a GPG keyring using detached signatures (using gpgv(1) for signature verification). - A web interface somewhat similiar to <http://packages.debian.org>, based on SSAX and the ocelotl libsoup-based HTTPd. Perhaps I

Re: guildhall status

2011-07-23 Thread Andreas Rottmann
get spells' FFI finished on Guile first. > That way you can also install dorodango on your > machine, if you wish, and also install the wak- packages, industria, > ocelotl, etc. > > I would really love for someone to take up this project. I can help > getting it to the minimally functional state. Please let me know if you > are interested. > 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 writes: > Le Sun, 26 Jun 2011 22:15:23 +0200, > Andreas Rottmann 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-wr

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

2011-06-29 Thread Andreas Rottmann
e warnings to another port 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
to re-build and re-install all software depending on libgc-dev, including 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 skribis: > >> Andreas Rottmann writes: >> >>> l...@gnu.org (Ludovic Courtès) writes: >>> >>&

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

2011-05-14 Thread Andreas Rottmann
Andreas Rottmann 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" writes: >> >>> commit 2252321bb77fe83d98d5bcc9db1c76b

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" writes: > >> commit 2252321bb77fe83d98d5bcc9db1c76b914e9dd6a >> Author: Andreas Rottmann >> Date: Sa

[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 (start_signal_delivery_thread

[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 leak

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

2011-05-03 Thread Andreas Rottmann
Andreas Rottmann writes: > David Pirotte writes: > >> Le Tue, 03 May 2011 12:43:07 +0200, >> Andy Wingo a écrit : >> >>> On Mon 02 May 2011 20:57, David Pirotte writes: >>> >>> > After having just installed a guile fresh git clone

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

2011-05-03 Thread Andreas Rottmann
ound for a (probably unrelated) issue in g-wrap. Could you update your checkout, 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: binary-port?

2011-04-25 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: > Hi, > > Andreas Rottmann 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 th

Re: binary-port?

2011-04-25 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: > Hi Andreas! > > Andreas Rottmann 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, a

Re: binary-port?

2011-04-22 Thread Andreas Rottmann
you still have to watch the order of your port type checks, testing for `binary-port?' first, whereas on systems following R6RS strictly, you'd get the same behavior regardless of type check order. I can live with the latter, but the former would be unfortunate, IMHO. Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>

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

2011-04-20 Thread Andreas Rottmann
Andreas Rottmann 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

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

2011-04-20 Thread Andreas Rottmann
CRLF0710 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 Rottmann

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

2011-04-20 Thread Andreas Rottmann
x27;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 Rottmann -- <http://rotty.yi.org/>

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

2011-04-20 Thread Andreas Rottmann
ww.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://rotty.yi.org/>

Re: [PATCH] Several tweaks for R6RS ports

2011-04-20 Thread Andreas Rottmann
Andy Wingo writes: > Hi Andreas, > > On Thu 24 Mar 2011 01:47, Andreas Rottmann 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 notorio

Re: define-inlinable

2011-04-11 Thread Andreas Rottmann
I'm reluctant to using macros as a performance hack (e.g., define-inlinable) -- 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
m what I saw of the code base, I 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: define-inlinable

2011-04-06 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: > Hello! > > Andreas Rottmann writes: > >> Subject: Move `define-inlinable' into the default namespace >> >> +@node Inlinable Procedures >> +@subsection Inlinable Procedures >> + >> +You can define an ``

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

2011-04-06 Thread Andreas Rottmann
t; "#s...", "#u..." and "#f...". >> Thanks to Andreas Rottmann 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.

Re: GSoC 2011

2011-04-05 Thread Andreas Rottmann
oting from sbank's tutorial: To stress that: if a C library provides gobject-introspection metadata, you should be able to use it via sbank without further ado. However, while the metadata provided in the .typelib file is complete enough 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: [PATCH 3/3] Add `fixnum?' VM primitive

2011-04-04 Thread Andreas Rottmann
useful one. > Apologies for being crabby here after you've done all this work :) It > could well be that something close to this is the right thing. > Well, I've attached my Plan-B solution. We can come back to the `fixnum?' VM primitive when it's clear where its corr

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

2011-04-04 Thread Andreas Rottmann
Andy Wingo writes: > On Wed 30 Mar 2011 12:58, Andreas Rottmann 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? &g

[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. * libguile/Makefile.a

[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*): N

[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 + benchmark-suite/benchmarks/r6rs-arithmeti

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.

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 writes: > On Wed 23 Mar 2011 00:20, Andreas Rottmann writes: > >> In porting dorodango[0], I have noticed that Guile's R6RS fixnum >> operations are quite slow; here's a patch to re

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

2011-03-30 Thread Andreas Rottmann
Andy Wingo writes: > On Wed 23 Mar 2011 00:20, Andreas Rottmann 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

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

2011-03-29 Thread Andreas Rottmann
Andy Wingo writes: > On Wed 23 Mar 2011 00:20, Andreas Rottmann 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 bi

Re: summer of code project: cpan

2011-03-28 Thread Andreas Rottmann
tria. So what remains as (quite) hard dependencies would be: foof-loop, fmt, and spells; the others should not be too hard to eliminate in some way or the other. WDYT? Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>

Re: CPAN for Guile

2011-03-28 Thread Andreas Rottmann
Andy Wingo writes: > On Mon 07 Mar 2011 21:13, Andreas Rottmann 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 it f

Re: Fmt Module

2011-03-27 Thread Andreas Rottmann
ndard install of Guile included > lots of modules, such as htmlprag, because it is nice to have the > batteries included when you are programming. > My opinion on that is that if it's really easy to install additional libraries (which is not yet the case, unfortunatly!), there would be

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

2011-03-27 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: > Hello, > > Andreas Rottmann writes: > >> So, that's around 5% improvment (on the ZIP benchmark) for an IMHO >> significantly more hackish implementation. I'm not sure that's worth >> it. WDYT? > >

Re: Fmt Module

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

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

2011-03-25 Thread Andreas Rottmann
Andreas Rottmann writes: > l...@gnu.org (Ludovic Courtès) writes: > >> Hi Andreas, >> >> I’m all for your suggestion. >> >> Andreas Rottmann writes: >> >>> + (define-syntax define-fxop* >>> +(syntax-rules () >>&g

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

2011-03-25 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: > Hello! > > Andreas Rottmann writes: > >> l...@gnu.org (Ludovic Courtès) writes: >> >>> Hi! >>> >>> Andreas Rottmann writes: >>> >>>> +SCM_DEFINE (scm_fixnum_p, "fixnum?",

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

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

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 writes: > >> + (define-syntax define-fxop* >> +(syntax-rules () >> + ((_ name op) >> + (define name >> + (case-lambda

Re: [PATCH] Several tweaks for R6RS ports

2011-03-23 Thread Andreas Rottmann
sting coding stuff that comes along, so don't hold your breath ;-). Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>

Re: Fmt Module

2011-03-23 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: > Hello, > > Andreas Rottmann writes: > >> Not that I have any say in that, but IMHO, it would be preferable to >> keep external libraries maintained separatly from the Guile core; >> however in this case, including it in the

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,

[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. * module/language/

[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*): N

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

Re: Fmt Module

2011-03-13 Thread Andreas Rottmann
ne-syntax test-pretty - (syntax-rules () -((test-pretty str) - (let ((sexp (with-input-from-string str read))) - (test str (fmt #f (pretty sexp))) - (test-pretty "(foo bar)\n") (test-pretty @@ -422,22 +407,24 @@ ;; misc extras +#; (define (string-hide-passwords str) (string-substitute (regexp "(pass(?:w(?:or)?d)?\\s?[:=>]\\s+)\\S+" #t) "\\1**" str #t)) - +#; (define hide-passwords (make-string-fmt-transformer string-hide-passwords)) +#; (define (string-mangle-email str) (string-substitute (regexp "\\b([-+.\\w]+)@((?:[-+\\w]+\\.)+[a-z]{2,4})\\b" #t) "\\1 _at_ \\2" str #t)) - +#; (define mangle-email (make-string-fmt-transformer string-mangle-email)) Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>

Re: [PATCH] Several tweaks for R6RS ports

2011-03-07 Thread Andreas Rottmann
Andreas Rottmann 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

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 writes: > >> On Sun 06 Mar 2011 23:26, l...@gnu.org (Ludovic Courtès) writes: >> >>> Andreas Rottmann writes: >>> >>>> The expansion of `define-inlinable' contained an expres

CPAN for Guile

2011-03-07 Thread Andreas Rottmann
g up with something entirely Guile-specific, but I want to point out that there's already a good amount of code out there, and even some documentation ;-). I'd be thrilled however, if some ambitious, careful hacker would join me and help me enhance dorodango to work perfectly as Guile's package manager! Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>

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 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

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

2011-03-06 Thread Andreas Rottmann
As always, see the patch header for details. From: Andreas Rottmann Subject: Don't mix definitions and expressions in SRFI-9 The expansion of `define-inlinable' contained an expression, which made SRFI-9's `define-record-type' fail in non-toplevel contexts ("defi

[PATCH] Several tweaks for R6RS ports

2011-03-06 Thread Andreas Rottmann
uot; and "rnrs-transcoders", and come back to me, so I can regenerate the remaining patches to make them apply cleanly. From: Andreas Rottmann 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!&#

Re: FFI on OS X?

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

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

2011-03-02 Thread Andreas Rottmann
n't matter, 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/>

  1   2   3   >