Re: anyone define port types?
On Mon, 20 Jun 2016 10:01:57 +0100 Chris Vinewrote: > On Mon, 20 Jun 2016 09:34:26 +0200 > Andy Wingo wrote: > [snip] > > I must not be communicating clearly because this is definitely not > > what I am proposing. The prompt doesn't service anything, and it's > > just the one user-space thread which is suspended, and when it > > suspends, it suspends back to the main loop which runs as usual, > > timers and all. > > > > prompt > >/--\ /\|/---\ /\ /--\ > >| main --> run-thread -|>(user code)--> read-char --> waiter | > >| loop | |||| | || | | > >\--/ \/|\---/ \/ \--|---/ > > ^| > >\---/ > >stack grows this way -> > > > > The current-read-waiter aborts to a prompt. That prompt is instated > > when the thread is run or resumed. When you abort to that prompt, > > you add the FD to the poll set / main loop / *, remember the > > delimited continuation, and return to the main loop. When the fd > > becomes readable or the gsource fires or whatever, you reinstate the > > delimited continuation via a new invocation of run-thread (prompt > > and all). > > Ah right, that is clearer, thank you. There would indeed be a prompt > for each user glib event source comprised in the "thread" abstraction, > which the read-waiter (or whatever) aborts to. It is that abstraction > that I was missing and will need to look at. I have stirred myself and installed guile-2.1.3. On looking more at the suspendable ports code it became obvious and I haven't needed to adopt anything like ethreads with its "thread" abstraction: instead I have kept the approach already adopted in the guile-a-sync library. However, the consequence of using suspendable ports instead of C ports is that the await-getline! procedure (as an example) has been reduced to a mere 16 lines of code, mainly because it is possible to use (ice-9 rdelim)'s read-line procedure with non-blocking ports. I have made a new repository for guile-a-sync for use with guile-2.2 and when I am happy with the new interfaces (and assuming nothing else goes wrong) I will put it up on github. This is very nice. Thanks for taking the time to go through it with me. Chris
a draft for the top of the NEWS for 2.0.12
Heya, Here below a draft for the top of the NEWS file for Guile 2.0.12 It needs review, in particular the 'Notable changes - Goops entry', see FIXME in the text. Cheers, David Guile NEWS --- history of user-visible changes. Copyright (C) 1996-2016 Free Software Foundation, Inc. See the end for copying conditions. Please send Guile bug reports to bug-gu...@gnu.org. * Changes in 2.0.12 (since 2.0.11): ** Notable changes *** Dependencies Guile 2.0.12 needs libunistring >= 0.9.3 This check is now part of the configure step. *** Goops Two major changes have been made: 1- #:init-value on class-allocated slots: allocating an instance of a class with a #:class or #:each-subclass slot allocation should not re-initialize the class-allocated slot. 2- accessor methods only apply to subclasses with their slot FIXME (a) let users know that it will break Goops user code relying on previsouly inherited getters, setters and accessors ... (b) why this: so that Guile 2.x.x behave like guile-1.8 wrt Goops. But the full picture is rather strange, and will be (re)fixed soon, see this discussion http://thread.gmane.org/gmane.lisp.guile.user/11218/focus=11813 for some details. ENDFIXME *** FFI: Add support for functions that set 'errno' When accessing POSIX functions from a system's libc via Guile's dynamic FFI, you commonly want to access the ‘errno’ variable to be able to produce useful diagnostic messages. This is now possible, check the Guile's dynamic FFI documentation for the details, in paticular the following entries have been updated accordingly: pointer->procedure, scm_pointer_to_procedure and scm_pointer_to_procedure_with_errno. *** Add SRFI-25 implementation 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. *** Add SRFI-28 implementation Adds an implementation of SRFI 28 Basic Format Strings. *** The #!r6rs directive now influences read syntax The #!r6rs directive now changes the per-port reader options to make Guile's reader conform more closely to the R6RS syntax. In particular: - It makes the reader case sensitive. - It disables the recognition of keyword syntax in conflict with the R6RS (and R5RS). - It enables the `square-brackets', `hungry-eol-escapes' and `r6rs-hex-escapes' reader options. *** SRFI-14 character data set SRFI-14 character data set has been regenerated for Unicode 8.0.0. *** Web modules The (web server) module now exports 'server-impl' procedures, (web server http) exports the 'http' server implementation. Also, http location header accepts URI-reference, not just absoluteURIs. *** Strings The following 2 new procedures have been added: 'string-utf8-length' and 'scm_c_string_utf8_length'. 'string-hash' has been optimized: this yields a 50% improvement on the "narrow string" benchmark of 'hash.bm', 41% on "wide string", and 76% on "long string". 'write' has been optimized: this shows a 19% improvement on the "string without escapes" micro-benchmark of 'write.bm', and 12% on "string with escapes". 'read-string' speed up: this yields a 20% improvement on the "read-string" benchmark. 'scm_string_hash' has been deprecated. 'scm_read_string_like_syntax' now accept "\(" as equivalent to "(". *** Libguile Tow new macros have been added: 'SCM_VALIDATE_SIZE_COPY' and SCM_NUM2SIZE. *** New Module Add (ice-9 unicode) module. *** SMOBs Functionalities have been added to disable automatic finalization: see the (Smobs) documentation node for the details and new functions. *** Posix 'EXIT_SUCCESS' and 'EXIT_FAILURE' added and documented. *** Architectures The following ARM target have been added: "arm.*eb", "^aarch64.*be", and "aarch64". ** Fixed Bugs The following bugs and/or 'miss behavior' have been fixed: *** 17399 - detect too-old libunistring at configure-time *** n/a - SRFI-2 (and-let*) has been re-implementated *** n/a - size measurement in bytevector_large_set *** n/a - uri-decode behavior for "+" *** 18477 - use source file permissions for compiled files *** 14347 - call-with-prompt continuation, returned value(s) *** 22406 - sizeof (long) support for LLP64 data model *** 22152 - fat_mutex, fat_mutex_unlock *** 23421 - http, date strings with a leading space for hours *** n/a - SRFI-19, update the table of leap seconds *** 22273 - http, Accept empty reason phrases *** n/a - get[set]sockopt now have their arg of type 'int' *** 20302 - seeking on binary input ports with putback buffers *** n/a - web, use 'close-port' for delimited input ports *** n/a - match-each+, non-pair syntax object in a dotted tail *** n/a - atan procedure when applied to complex numbers *** 20200 - bytevector and custom binary ports to use ISO-8859-1 *** 19646 - handle ENOSYS return for 'setaffinity' *** 19939 - http, do not buffer HTTP chunks *** 19621 - buffer overrun with
Re: bug#19439: [PATCH] gnu: Add erlang.
Backported to 2.0 in c5dac3595f42afbd76ab9110d7473bf4d16b0520 by Ludovic; closing bug. On Thu 07 Jan 2016 10:56, Andy Wingowrites: > On Wed 06 Jan 2016 17:07, l...@gnu.org (Ludovic Courtès) writes: > >> On Mon 04 Jan 2016 06:20, Steve Sprang writes: >> >>> From http://www.erlang.org/download/otp_src_18.2.1.tar.gz... >>> ERROR: Bad qstring header component: kMSMAn68110840 >> >> I think we should implement the proposed change. Could you look >> into it? > > Done on master in 6d7c09c8a9900794a855b9c69c57c3d1736506ed. I'd > cherry-pick back to 2.0 but I don't have a checkout on this machine; > please feel free :) > > Cheers, > > Andy
Re: getting started with guile dev
Tobin Hardingwrites: > My question is this, please, how to replace the system version with > the fresh build. Hi Tobin. You can run 'sudo make install' in the source directory to install the package. If you haven't specified an explicit value for $prefix when running ./configure, it will be installed in /usr/local, so you will need to export e.g. PATH=/usr/local/bin:... and possibly some more environment variables to be able to use it. To uninstall again, you need to run 'sudo make uninstall' in the source directory. (If you delete the source directory, or clean it and thus lose the Makefile, you won't be able to run that command. Though rebuilding the same version of Guile with the same ./configure options should result in the same Makefile, so you can then run 'make uninstall' again.) Alternatively: this may seem overkill, but one way to get fresh versions of Guile 2.1 and many other tools is to use GNU Guix, which can be seamlessly installed as an extra package manager on top an existing distro (it will *not* interfere with the existing system): 1. Follow the instructions at: http://www.gnu.org/software/guix/manual/html_node/Binary-Installation.html 2. Install packages via the command "guix package -i foo bar baz ..." 3. At the end of the "guix package -i ..." command, you will be told what environment variables you need to export for to be able to use those packages seamlessly. Alternatively to #3: you can run "guix environment --ad-hoc foo bar baz" to launch a shell with environment variables already set up so that the packages foo, bar, and baz are available. (They will be downloaded or locally built transparently.) BTW the Guile 2.1 package is called "guile-next" in Guix. Hope that helps, Taylan
Re: getting started with guile dev
On Wed 22 Jun 2016 06:38, Tobin Hardingwrites: > I am attempting to get started on some guile hacks. I am running Emacs, > Geiser, > Guile (2.0.11) for Scheme development. > > I have cloned the git repository for Guile (current commit d545e45). I can > configure > and build this tree. I can run the executable > > $ GUILE_TREE/libguile/guile --version > guile (GNU Guile) 2.1.3.11-d545e-dirty > Copyright (C) 2016 Free Software Foundation, Inc. Hi, This is the development branch. Probably if you are looking at building on top of Guile you want to check out the stable-2.0 branch. > My question is this, please, how to replace the system version with the fresh > build. > > make install does not achieve this. > > Also I tried running > $ GUILE_TREE/libguile/guile -L $GUILE_TREE/modules/ > > but that does not seem to load the new modules. To run Guile uninstalled, you run meta/guile from the build directory. Cheers, Andy
Re: Jenkins automated build server for Windows builds
On Wed 22 Jun 2016 06:25, Mads Elvheimwrites: > I just finished setting up a continuous integration server at > http://guile.mechcore.net:8080/ That's great! I see that there's a compile failure on Guile master for Windows; very nice to see all the output :) Looking forward to poking it. Happy hacking, Andy