Re: Threading / Pipe Macro

2019-07-07 Thread Mark H Weaver
Hi Chris, Chris Vine writes: > I have a pipeline macro which sort-of mimics ML's |> pipeline operator > which I use a lot: > > (define-syntax -> > (lambda (x) > (syntax-case x () > [(k exp0 . exps) >(let* ([reversed (reverse (cons (syntax->datum #'exp0) >

Re: Threading / Pipe Macro

2019-07-07 Thread Mark H Weaver
Hi Chris, Here's a complete, unedited transcript with Guile 2.2.6: --8<---cut here---start->8--- mhw@jojen ~$ guile GNU Guile 2.2.6 Copyright (C) 1995-2019 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This

Re: Threading / Pipe Macro

2019-07-07 Thread Mark H Weaver
Hi Chris, Chris Vine writes: > My version was hygienic when used in functions, but not when used as a > macro in a macro. The word "hygienic" should not be used to describe your original macro. It would be more accurate to say that although your original version was unhygienic, in practice it wo

Re: Threading / Pipe Macro

2019-07-07 Thread Mark H Weaver
Hello again, Chris Vine writes: > My version was hygienic when used in functions, but not when used as a > macro in a macro. Not to belabor the point, but I wanted to mention that the unhygienic '->' macro may fail when used in procedures, even when '->' is never used in the definition of anothe

Re: Now crashing [was Re: guile-2.9.2 and threading

2019-07-17 Thread Mark H Weaver
Hi Linas, > Investigating the crash with good-old printf's in libguile/vm.c produces > a vast ocean of prints ... that should have not been printed, and/or should > have been actual errors, but somehow were not handled by scm_error. > Using today's git pull of master, here's the diff containing a

Re: Write a macro which defines a procedure

2019-07-20 Thread Mark H Weaver
Matt Wette writes: > On 7/19/19 3:51 PM, zelphirkaltstahl wrote: >> (module-define! (current-module) >> ;; `route` should be `/container/json` for example. >> route > > (quote route) Yes, or equivalently: 'route As an aside, is there a reason to not de

Re: Write a macro which defines a procedure

2019-07-20 Thread Mark H Weaver
Hi Zelphir, Zelphir Kaltstahl writes: > At first I had the macro use `define`, but then I thought: "What if I > want to conditionally define a route procedure?". My guess is, that then > the define form would be inside some `cond` or `if` form and then it > would not work You're right, it would

Re: srfi-9 vs make-record-type

2019-08-05 Thread Mark H Weaver
Hi Christopher, Christopher Lam writes: > Hi All > In experiments converting legacy code to use srfi-9 records, I'm finding > the latter doesn't travel well across modules. > > See simple code below -- m1.scm runs fine however m2.scm borks when > creating srfi-9 record object > > Any clue why sr

Re: syntax-case identifier name predicate in guard expression

2019-08-05 Thread Mark H Weaver
Hi Zelphir, Zelphir Kaltstahl writes: > Hi Guile Users! > > I made some progress in writing a procedure defining macro for creating > procedures which talk to an API. > > I now have working code, which checks the name of an identifier in a > guard expression: > > 8<8<8< > (use-mo

Re: yet another Guile tutorial for Linux (work in progress)

2019-08-07 Thread Mark H Weaver
Hi Basile, Basile Starynkevitch writes: > I am writing yet another Guile tutorial. It is work in progress and > available on http://starynkevitch.net/Basile/guile-tutorial-1.html > under CC-BY-SA 3 license. > > Your comments are welcome. Thanks for this. I will try to find time to review it mo

Re: Problem installing the intended version

2019-08-09 Thread Mark H Weaver
Hi Thomas, Thomas Morley writes: > recently I tested building LilyPond against guile-2.2.6 without > success[*] and tried to investigate whether the problem is on the > guile-side or at LilyPond (there are some patches which may or may not > cause the problem). > > Though I stumbled across a pro

Re: Problem installing the intended version

2019-08-10 Thread Mark H Weaver
Hi Thomas, Thomas Morley writes: > In the light of your explanations I think the current problem only > occurs for _equal_ major/minor with _different_ micro versions. > Correct? Yes. >> and finally "ldconfig" as root. > > Doing so I get: > /sbin/ldconfig.real: /usr/local/lib/libguile-2.0.so.2

Re: How to use-modules within macro?

2019-08-29 Thread Mark H Weaver
Hi Florian, "pelzflorian (Florian Pelz)" writes: > I am writing a Guile macro to manipulate Scheme code and am stuck on > what I hope is a simple problem and it would be nice if you could > explain. I try: > > (define-syntax O > (lambda (x) > (syntax-case x () > ((_) >#`(beg

Re: How to use-modules within macro?

2019-09-04 Thread Mark H Weaver
Hi Florian, "pelzflorian (Florian Pelz)" writes: > To retain unhygienic references, I am now using datum->syntax instead > of local-eval. It is much better. For example, to make a macro that > increments all numbers in a given program by one: > > (use-modules (ice-9 match)) > (define-syntax on

Re: extract documentation from (define ...

2019-09-04 Thread Mark H Weaver
Hi Jesse, Jesse Gibbons writes: > I am trying to generate documentation for a project written in guile. I > tried "guild doc-snarf" [0] but apparently it only recognizes > documentation in double-semicolon comments. A lot of the project is > documented in a string like one would document an emac

Re: How to use-modules within macro?

2019-09-04 Thread Mark H Weaver
Hello again, I wrote earlier: > So, instead of using 'match' on the result of 'syntax->datum', you > should instead use 'syntax-case' on the syntax object itself, like this > (untested): > > (let loop ((e #'exp)) > (syntax-case e () > (num >(number? (syntax->datum #'num)) >

Stepping back up as a co-maintainer

2019-10-15 Thread Mark H Weaver
Hello all, In light of recent events, I've decided to step back up as a co-maintainer of GNU Guile. Thanks, Mark

Re: Weird Guile Scheme Behaviour

2019-10-15 Thread Mark H Weaver
Hi Philip, phi...@warpmail.net (Philip K.) writes: > I was reading a thread on an imageboard[0] the other day, then I came > across a most peculiar "bug", if it even is one. Since the original > example was a bit dense (it tried to solve a problem someone else had > posted, that's not relevant he

Re: Stepping back up as a co-maintainer

2019-10-18 Thread Mark H Weaver
zx spectrumgomas writes: > It's milk > https://lists.gnu.org/archive/html/guile-devel/2019-10/msg00031.html I'm sorry, but I don't understand what this means. If you are accusing me of something, can you state your case clearly, without reference to proverbs? Mark

Re: Stepping back up as a co-maintainer

2019-10-18 Thread Mark H Weaver
zx spectrumgomas writes: > Of your words: “RMS has not yet appointed me as a co-maintainer.” , the > word “yet” I guess that means if he would have had his permission then you > wouldn't have needed it of the current maintainers, as I also deduce from > here: > “Frankly, it should not be your dec

Re: Interactive Debugging

2019-10-18 Thread Mark H Weaver
"Thompson, David" writes: > On Fri, Oct 18, 2019 at 8:40 AM Matt Wette wrote: >> >> On 10/17/19 9:39 PM, Christopher Howard wrote: >> > Hi, it seems like with the flexibility of Guile, I should be able to do >> > something like this: >> > ```(define (foo) (let ((a 1)(b 2)(c 3))

Re: Diversification [ branched from Re: conflicts in the gnu project now affect guile]

2019-10-22 Thread Mark H Weaver
Hi Todor, Todor Kondić writes: > [...] I've set up my workflows around Guix, git(lab) > and a customised Emacs installation (instead of R Studio). My small > team of science students (majority female, various cultural > backgrounds), never previously exposed to a GNU system to such an > extent,

Re: guile-user Digest, Vol 204, Issue 2

2019-11-08 Thread Mark H Weaver
John Cowan writes: > +1. If only it weren't GPL3, which makes it ineligible to be a SRFI > implementation Zelphir could propose a SRFI for the API only, with no reference implementation. The existing implementation could remain copylefted. Mark

Re: guile-user Digest, Vol 204, Issue 2

2019-11-08 Thread Mark H Weaver
I wrote: > Zelphir could propose a SRFI for the API only, with no reference > implementation. The existing implementation could remain copylefted. John Cowan replied: > Unfortunately not. A SRFI must have a sample implementation to get > finalized (otherwise it is feared there would be too many

Re: guile-user Digest, Vol 204, Issue 2

2019-11-08 Thread Mark H Weaver
Hi Aleix, Aleix Conchillo Flaqué wrote: > If at some point I decide to switch to the MIT license I assume > the projects that currently use guile-json would still be able to use it > (probably renamed to some SRFI number) the same way they use other SRFIs, > right? Yes, as long as it's GPL-compa

Re: guile-user Digest, Vol 204, Issue 2

2019-11-08 Thread Mark H Weaver
Hi John, John Cowan writes: > Distinguo. I have not *pressured* the author to dual license; that is, I > have not exercised force or undue influence (of which I have none). According to , "pressure" means: "To encourage or heavily exert force or in

Re: guile-user Digest, Vol 204, Issue 2

2019-11-08 Thread Mark H Weaver
John Cowan wrote: > Dual licensing is also a possibility, so that users who prefer the GPLv3 > license would still have it. Dual licensing with a lax license option would eliminate the main advantage of copyleft, namely that it offers an inducement to those who wish to use Guile-JSON to release t

Re: guile-json, SRIFs and licenses

2019-11-09 Thread Mark H Weaver
Hi John, John Cowan writes: > [...] There are two traditional arguments > in favor of putting libraries under the GPL: [...] > 2) "Benefit GPLed programs": if a library is GPLed, it supposedly gives > the advantages of using that library only to GPLed applications. You're mistaken. A GPLed

Re: Weird behavior of hash-table

2019-11-24 Thread Mark H Weaver
Hi Zelphir, Zelphir Kaltstahl writes: > I've noticed a strange behavior of hash tables. I put in symbols as keys > and integers as values, but when I try to get the integers out again by > using the same symbol, I get back a #f instead. Here is the code I am using: > > > (use-modules >

Re: Weird behavior of hash-table

2019-11-24 Thread Mark H Weaver
Hi tomás, wrote: > So the best thing for one's brain is to train it to read #(...) > as some weird relative of '(...)? Yes. They are both literals, and no part of a literal is evaluated. #(...) is actually a shorthand for '#(...), and incidentally, one which was not standardized until the R7RS

Re: UTF16 encoding adds BOM everywhere?

2022-07-20 Thread Mark H Weaver
Hi, Jean Abou Samra wrote: > With this code: > > (let ((p (open-output-file "x.txt"))) >   (set-port-encoding! p "UTF16") >   (display "ABC" p) >   (close-port p)) > > the sequence of bytes in the output file x.txt is > > ['FF', 'FE', '41', '0', 'FF', 'FE', '42', '0', 'FF', 'FE', '43', '0'

Re: Ignore errors while evaluating with `primitive-eval'

2013-08-19 Thread Mark H Weaver
Hi, Alexandru Cojocaru writes: > is it possible to ignore errors when evaluating a badly formed > expression? Yes. An easy way is to use 'false-is-exception', like this: (false-if-exception (primitive-eval '(this is an error))) => #f However, this won't work if you need to tell the diffe

Re: guile-2.0 on mingw: the sequel

2013-08-23 Thread Mark H Weaver
Panicz Maciej Godek writes: > 2013/8/23 Eli Zaretskii > > > > I managed to go through the compilation process, > > and (after modifying meta/Makefile.am according to Eli's > > patch) to make install. > > > This compilation process includes compiling all the Scheme

Re: [ANN] Guile-WM 0.1/Guile XCB 1.1

2013-08-24 Thread Mark H Weaver
Hi Mark, m...@markwitmer.com writes: > I feel like it's time to announce Guile-WM, my stab at an all-Guile > Window Manager. It's actually more of a toolkit for writing X > applications, with the window manager stuff being what's implemented so > far. It includes live REPL support, the usual > ke

Re: asynchronous socket library

2013-08-24 Thread Mark H Weaver
Hi Mark, Sorry for taking so long to respond. m...@markwitmer.com writes: > Mark H Weaver writes: > >> m...@markwitmer.com writes: >>> Reading and writing to a socket seems to lend itself well to custom >>> binary ports, >> >> Why do you say that? Fo

Re: guile-2.0 on mingw: the sequel

2013-08-25 Thread Mark H Weaver
Eli Zaretskii writes: > I guess you didn't configure without threads on GNU/Linux, did you? > If not, I suggest to try that, my impression is that Guile without > threads is not used too much on Posix platforms. Hydra, a continuous integration system, runs Guile's "make check" with threads disab

Re: [ANN] Guile-WM 0.1/Guile XCB 1.1

2013-08-25 Thread Mark H Weaver
mark.d.wit...@gmail.com writes: > Mark H Weaver writes: > >> * Although the README says that Guile 2.0.9 is required, the configure >> script will accept nothing less than Guile 2.2. Since 2.2 does not >> exist yet, it would be good to accept Guile 2.0 in the meant

Re: [ANN] Guile-WM 0.1/Guile XCB 1.1

2013-08-25 Thread Mark H Weaver
m...@markwitmer.com writes: > Mark H Weaver writes: > >> Here's what happens on my Debian wheezy system, starting from a pristine >> git checkout (using "git clean -dxf"): >> ... >> ice-9/boot-9.scm:106:20: In procedure #> ice-9/boot-9.scm:97:6 (t

Re: guile-2.0 on mingw: the sequel

2013-08-25 Thread Mark H Weaver
Eli Zaretskii writes: >> From: Mark H Weaver >> Cc: Panicz Maciej Godek , guile-user@gnu.org >> Date: Sun, 25 Aug 2013 12:59:43 -0400 >> >> Eli Zaretskii writes: >> >> > I guess you didn't configure without threads on GNU/Linux, did you? &g

Re: guile-2.0 on mingw: the sequel

2013-08-25 Thread Mark H Weaver
Eli Zaretskii writes: >> From: Mark H Weaver >> Cc: Eli Zaretskii , "guile-user\@gnu.org" >> Date: Fri, 23 Aug 2013 11:13:19 -0400 >> >> Of course, ideally we would allow the entire Guile install to be freely >> relocatable, as Windows users ha

Re: guile-2.0 on mingw: the sequel

2013-08-25 Thread Mark H Weaver
Mark H Weaver writes: > Eli Zaretskii writes: > >>> From: Mark H Weaver >>> Cc: Eli Zaretskii , "guile-user\@gnu.org" >>> >>> Date: Fri, 23 Aug 2013 11:13:19 -0400 >>> >>> Of course, ideally we would allow the entire Gui

Re: guile-2.0 on mingw: the sequel

2013-08-25 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > Eli Zaretskii skribis: > >>> From: Mark H Weaver >>> Cc: Eli Zaretskii , "guile-user\@gnu.org" >>> >>> Date: Fri, 23 Aug 2013 11:13:19 -0400 >>> >>> Of course, ideally we would a

Re: guile-2.0 on mingw: the sequel

2013-08-25 Thread Mark H Weaver
Eli Zaretskii writes: >> From: Mark H Weaver >> Cc: godek.mac...@gmail.com, guile-user@gnu.org >> Date: Sun, 25 Aug 2013 15:56:53 -0400 >> >> Remember that Guile is a library, not just an executable. So argv[0] >> could point to any arbitrary executable

Re: guile-2.0 on mingw: the sequel

2013-08-25 Thread Mark H Weaver
fferent version > is installed on the system. We already have a solution for this. Just run "meta/guile" from the build directory, or more generally "meta/uninstalled-env". >> From: Mark H Weaver >> Cc: godek.mac...@gmail.com, guile-user@gnu.org >

Re: guile-2.0 on mingw: the sequel

2013-08-25 Thread Mark H Weaver
I wrote: > I can think of one notable case where the program would know where > libguile is located: when the program bundles its own copy of Guile, and > therefore assumes that libguile and the program are always moved > together as an atomic unit. > > This practice is frowned upon on most POSIX

Re: SRFI-105: syntax error/warning

2013-08-26 Thread Mark H Weaver
Alexandru Cojocaru writes: > when using the SRFI-105 syntax everything works fine, but I receive > syntax warnings > > bash> cat 1.scm > (read-enable 'curly-infix) > (define a {1 + 1}) (newline) > (display a) (newline) The problem is that the expression "(read-enable 'curly-infix

Re: Emacsy: Context Sensitive Commands Design Question

2013-08-29 Thread Mark H Weaver
Shane Celis writes: > 6. Tag commands as special procedures perhaps by adding something to > their procedure properties. Implement a "command?" procedure. Export > commands and procedures to the same module. Then just pluck the > commands out of all the procedures by using command?. This is cl

Re: How to read integers from file faster?

2013-08-31 Thread Mark H Weaver
Darren Hoo writes: > It is way too slow to read numbers from a file simply by using `read' Indeed. Looking at the code, I can see a lot of room for improvement, especially in 'string->number' (which is used also by 'read'). I've added an item to my TODO list to optimize this. Hopefully by 2.0

Re: [Denemo-devel] Problem with wide characters on upgrading to guile 2.x

2013-09-04 Thread Mark H Weaver
Richard Shann writes: > On Tue, 2013-09-03 at 19:53 +0200, Thien-Thi Nguyen wrote: > [...] >>pt_BR.utf8 is not a supported locale on your system. > > yes, that is why I chose it, so as to trigger the error. It is graceful > handling of this error that I was after - it should default to > untr

Re: is (web client) ready for use even for the simplest task?

2013-09-10 Thread Mark H Weaver
Darren Hoo writes: > (use-modules (web client)) > > (http-post "http://www.google.com/";) > > the POST request is sent without the Content-Length header RFC 2616 makes it clear that the Content-Length header is optional. > OK, let's add something to the body > > (http-post "http://www.google.c

Re: is (web client) ready for use even for the simplest task?

2013-09-10 Thread Mark H Weaver
Mark H Weaver writes: >> GET / HTTP/1.1 >> Content-Type: text/plain;charset=utf-8 >> Host: www.google.com >> Connection: close > > I just applied a fix for this to the stable-2.0 branch in git. In the > meantime, the workaround is to explicitly pass a content

Re: is (web client) ready for use even for the simplest task?

2013-09-10 Thread Mark H Weaver
Mark H Weaver writes: >> (http-post "http://www.google.com/";) >> >> the POST request is sent without the Content-Length header > > RFC 2616 makes it clear that the Content-Length header is optional. Sorry, I should have qualified this statement with "i

Re: are double cells safe to use?

2013-10-29 Thread Mark H Weaver
Roland Orre writes: > I consider using double cells for efficient implementation of binary trees. > > Is this safe? (i.e. no pre-assumptions made somewhere what these are used for) > > For prototyping I intended to add > double-cons > set-cbr! > set-ccr! > cbr > ccr > > to the scheme level. Is th

Re: cond-expand-provide threads?

2013-11-03 Thread Mark H Weaver
Hi, Panicz Maciej Godek writes: > is there any way to check (most preferably at the cond-expand stage) > whether thread support is enabled in guile? (provided? 'threads) However, this is a run-time check, not a compile-time check. It has to be this way, because a scheme module could be compi

Re: [ANN] Guile-WM 0.1/Guile XCB 1.1

2013-11-29 Thread Mark H Weaver
Hi Mark, Shortly after the releases of Guile XCB 1.1 and Guile WM 0.1, some important problems were fixed in the build system. Would you be willing to produce new tarball releases? Several of us are interested in Guile WM and would like to make it easier for new users to play with and hack on.

Re: Where is the backtrace?

2014-01-03 Thread Mark H Weaver
Panicz Maciej Godek writes: > I've checked this with other implementations. Racket, Gambit and Biwa > Scheme were equally uninformative. Kawa's backtrace was a nightmare to > me, but perhaps someone with more knowledge would be able to infer the > actual location of the error. Actually, the only

Re: libguile thread safety

2014-01-03 Thread Mark H Weaver
Chris Vine writes: > I am having problems using libguile in a multi-threaded environment, > which boils down to the following small test case, which fails with a > segmentation fault with guile-2.0.9: I've recently noticed that the module loading process in Guile is not thread safe. I hope to fi

Re: libguile thread safety

2014-01-04 Thread Mark H Weaver
Panicz Maciej Godek writes: > 2014/1/4 Chris Vine : >> It seems as if top level variables in code evaluated by scm_c_eval_string() >> are shared between concurrently running threads. Is this really the >> intended behaviour (it is a significant and unexpected usability >> restriction)? Maciej (

Re: libguile thread safety

2014-01-04 Thread Mark H Weaver
Chris Vine writes: > Unfortunately, from what Mark Weaver says, the module system doesn't > initialize itself in a thread safe way either :(. That's not quite right. It initializes itself in a thread safe way. However, _after_ initialization, it does not load modules in a thread safe way. > Tha

Re: libguile thread safety

2014-01-05 Thread Mark H Weaver
Panicz Maciej Godek writes: > 2014/1/5 Chris Vine : > >> I actually have a prototype working well now, apart from the module >> issue Mark Weaver referred to, which I have to say has not yet bitten me >> but no doubt might. > > If you are worried about this, you could try to take your own > preca

Re: Filename encoding

2014-01-15 Thread Mark H Weaver
Chris Vine writes: > A number of guile's scheme procedures look-up or reference files on a > file system (open-file, load and so forth). > > How does guile translate filenames from its internal string > representation (ISO-8859-1/UTF-32) to narrow string filename encoding > when looking up the fi

Re: Converting a part of byte vector to UTF-8 string

2014-01-15 Thread Mark H Weaver
Panicz Maciej Godek writes: > Your solution seems reasonable, but I have found another way, which > lead me to some new problems. > I realised that since sockets are ports in guile, I could process them > with the plain "read" (which is what I have been using them for > anyway). > > However, this

Re: negating a number

2014-01-15 Thread Mark H Weaver
Richard Shann writes: > Is there something neater than > > (- 0 amount) > > to negate a number? Can't spot anything in the manual ... Yes: (- amount) Mark

Re: string-match error

2014-01-15 Thread Mark H Weaver
Ariel Rios writes: > Hello y'all, > > I am having problems using string-match. I have created a small script > that calls string-match and I get: > > /home/ariel/console/mce/tests/./panda.scm:4:9: In procedure > module-lookup: Unbound variable: string-match As it says in the "Regular Expressions

Re: Filename encoding

2014-01-15 Thread Mark H Weaver
Eli Zaretskii writes: >> From: Mark H Weaver >> Date: Wed, 15 Jan 2014 13:14:39 -0500 >> Cc: guile-user@gnu.org >> >> My hope is that this will become less of an issue over time, as systems >> increasingly standardize on UTF-8. I see no other good solut

Re: Filename encoding

2014-01-15 Thread Mark H Weaver
Chris Vine writes: > POSIX system calls are encoding agnostic. The filename is just a series > of bytes terminating with a NUL character. Yes, I know, but conceptually these things are strings. Unless you're going to treat these filenames as black boxes to be copied from one place to another bu

Re: Filename encoding

2014-01-16 Thread Mark H Weaver
Eli Zaretskii writes: > Windows stores file names on disk encoded in UTF-16, but converts them > to the current codepage if you use Posix-style interfaces like 'open' > and 'rename'. (There are parallel APIs that accept UTF-16 encoded > file names.) Okay, so on Windows we should use the parallel

Re: [PATCH v2 02/13] script language API for GDB: extension.[ch]

2014-01-21 Thread Mark H Weaver
Tom Tromey writes: >> "Ludovic" == Ludovic Courtès writes: > > Ludovic> I guess this is another limitation of Guile’s current signal handling > Ludovic> strategy, and something we should fix. > > FWIW I think it would be sufficient for gdb if scm_system_async_mark, or > something like it, co

Re: Geting the value of a top level scheme value from C

2014-01-24 Thread Mark H Weaver
Richard Shann writes: > Given a C string that is the name of a Scheme variable what is the call > I need to make from C to get the value? > > That is, in the Scheme I have > > (define foo "bar") > > Then in C I want to write > > SCM bar = scm_var_c_get_val ("foo");//imaginary function name SCM

Re: Writing libraries for C programs using Guile Scheme

2014-03-07 Thread Mark H Weaver
Mateusz Kowalczyk writes: > I doubt that going from a single inherently unsafe but bloody fast > language to slightly less unsafe but much slower language is an > advantage here… "Slightly less unsafe"? Seriously? > Do you feel like you can provide correctness proofs for your > implementations

Re: ‘with-exception-handler’ rationale

2014-03-09 Thread Mark H Weaver
Nikita Karetnikov writes: > I’ve expected ‘with-exception-handler’ to behave like ‘catch’, but it > doesn’t. > > scheme@(guile-user)> ,use (srfi srfi-34) > scheme@(guile-user)> (with-exception-handler (const "got it") (lambda () > (raise "boom!"))) > ice-9/boot-9.scm:106:20: In procedure # ice-9

Re: Number in a module-name

2014-03-14 Thread Mark H Weaver
Diogo Ramos writes: > Is it possible to have a number as a module-name component? > > e.g. (define-module (42 bar)) At present, module name components must be symbols. However, R7RS allows either symbols or exact non-negative integers to be module name components, so it seems likely that we'll

Re: libguile thread safety

2014-03-18 Thread Mark H Weaver
Chris Vine writes: > Has thread-safe module loading turned out to be too difficult to do, or > is it still something that is likely to happen in the future? I consider this to be an important issue, and I still intend to fix it. However, fixing it in such a way that I could confidently believe w

Re: GNU Guile 2.0.10 released

2014-03-19 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > Panicz Maciej Godek skribis: > >> Delightful to hear that. Thanks a lot for the work! >> >> However, when I'm trying to build it under mingw, I get the following error: >> >> ../lib/.libs/libgnu.a(mkstemp.o): In function `mkstemp': >> c:\dev\guile-2.0.10\l

Re: Question on mutability of argument lists

2014-03-19 Thread Mark H Weaver
Marco Maggi writes: > Niels Möller wrote: >> However, for a natural implementation which evaluates >> arguments and conses the results up to a list, this seems >> to require an extra copy of the argument list, after all >> values are evaluated and before the list is bound to the >> rest

Re: Restricting eval

2014-03-23 Thread Mark H Weaver
Panicz Maciej Godek writes: > 2014-03-23 19:07 GMT+01:00 Grant Rettke : >> On Sat, Nov 30, 2013 at 2:26 PM, Panicz Maciej Godek >> wrote: >>> And hence my question: is there any way to restrict >>> the execution environment of eval, e.g. to specify >>> which symbols should be available? (For sec

Re: 'or' and multiple values

2014-03-25 Thread Mark H Weaver
Hi Neil, Neil Jerram writes: > In the following, is the last result a bug? > > GNU Guile 2.0.9-deb+1-1 > Copyright (C) 1995-2013 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to

Re: GNU Guile 2.0.10 released

2014-03-30 Thread Mark H Weaver
Eli Zaretskii writes: > Mark told me that someone succeeded in building MinGW Guile with > pthreads, and he built pthreads himself. Someone reported having done so, but that turned out to be false. At this point, I'm not aware of anyone who has built a working threaded Guile for MinGW. Mar

Re: unicode support

2014-03-31 Thread Mark H Weaver
Игорь Гайсин writes: > Hi, dmitriy. Try to add this line to head your scripts > > (setlocale LC_ALL "") > (set-port-encoding! (current-input-port) "utf-8") > (set-port-encoding! (current-output-port) "utf-8") The 'setlocale' call is indeed important. The next two lines shouldn't be needed, and

Re: Does Guile have a thread limit?

2014-04-05 Thread Mark H Weaver
"Diogo F. S. Ramos" writes: > The following program is aborted: > > (define number-of-thread 1000) > > (do ((i number-of-thread (- i 1))) > ((zero? i)) > (call-with-new-thread (lambda () (sleep 42 I looked into this, and the issue is that for every thread that's ever put into Guile mod

Re: Does Guile have a thread limit?

2014-04-26 Thread Mark H Weaver
Hi, Taylan Ulrich Bayirli/Kammer writes: > taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes: > >> While C code using up many FDs and then calling scm_with_guile() might >> abort --which should be a rare case--, `call-with-new-thread' neatly >> raises an exception ... almost. In t

Re: #:getter procedure returns unexpected value in GOOPS

2014-04-26 Thread Mark H Weaver
"Diogo F. S. Ramos" writes: > When using GOOPS, if a class has a second slot, the #:getter procedure > of the first slot returns the value of the second slot when applied to > an instance of a subclass. > > (use-modules (oop goops)) > > (define-class () > (a #:init-form 'foo #:getter foo-a) >

Re: What is the output port of `system*'?

2014-04-26 Thread Mark H Weaver
"Diogo F. S. Ramos" writes: >> "Diogo F. S. Ramos" writes: >> >>> The following program doesn't output to a string, which I expected. >>> >>> (define foo >>> (with-output-to-string >>> (lambda () >>> (system* "ls" "/tmp" >> >> As the manual says about `system*': >>> The command i

Re: #:getter procedure returns unexpected value in GOOPS

2014-04-27 Thread Mark H Weaver
David Pirotte writes: > Hi Mark, > >> > When using GOOPS, if a class has a second slot, the #:getter procedure >> > of the first slot returns the value of the second slot when applied to >> > an instance of a subclass. >> > >> > (use-modules (oop goops)) >> > >> > (define-class () >> > (a #:in

Re: Welcome Mark as new co-maintainer

2014-05-28 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > I’m happy to announce that Mark H. Weaver has now been officially > appointed as Guile co-maintainer by the GNU Project overseers, along > with Andy and myself. Thank you all for the kind words and warm welcome. I believe that Guile is a tre

Re: Macro expansion: unknown location

2014-06-14 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > A workaround is to get location info from the outer syntax object ‘x’: > > (define-syntax zero! > (lambda (x) > (syntax-case x () > ((_ var) >(begin >(unless (identifier? #'var) > (syntax-violation 'zero! "identifier exp

Re: Macro expansion: unknown location

2014-06-14 Thread Mark H Weaver
Mark H Weaver writes: > Currently, Guile stores location info using a weak-key hash table, keyed > on the datums read from the file. This means that location info cannot > be stored for bare symbols or other immediate values (booleans, > characters, small exact integers). Sym

Re: Compiling for Android

2014-06-24 Thread Mark H Weaver
b...@beuc.net writes: > Check ./docs/text/system/libc/OVERVIEW.text from the Android NDK: [...] > pthread_once(): [...] > The current implementation of pthread_once() lacks the necessary support of > multi-core-safe double-checked-locking (read and write barriers). This is the only bit that w

Re: cannot compile: srfi-10 define-reader-ctor 'hash '#,(

2014-08-13 Thread Mark H Weaver
Jan Nieuwenhuizen writes: > I mean an standardized, ascii/utf-8 non-opaque (#) > representation of hash tables, something like > > #,(hash (key0 value0) .. (keyn valuen)) > > that upon `read', produces a hash table. This has been proposed several times before, and although it generally sounds

Re: guile-2.0.11 installation on system with 2.0.5

2014-09-15 Thread Mark H Weaver
Neil Jerram writes: > On 2014-09-15 02:16, m...@netris.org wrote: >> Federico Beffa writes: >> >>> I notice that there is an /etc/ld.so.cache file. Do I somehow need >>> to update >>> it? >> >> Yes, you update it by running "ldconfig" as root. This needs to be >> done >> when installing librari

Re: guile-2.0.11 installation on system with 2.0.5

2014-09-16 Thread Mark H Weaver
Chris Vine writes: > But quite honestly, if you want to experiment with newer software don't > use an archaic distribution such as debian stable, which is out of date > even when first released. Umm, I think it's quite reasonable to run a distribution of older software that has gone through a lon

Re: emacs interaction

2014-09-20 Thread Mark H Weaver
Matt Wette writes: > On Sep 20, 2014, at 12:30 AM, Thien-Thi Nguyen wrote: >> It would help to post an example (w/ tabs converted to spaces) >> showing what you desire. That way we have a clear goal. > > I get > (define-module (mymod) > #:export (blablabla foo bar > a b c) >

Re: smob mark functions in 2.0

2014-09-25 Thread Mark H Weaver
t word, or otherwise >>> check that other words are non-NULL. >> >> What about making that check in libguile before invoking the user’s mark >> function? > > Yes, we do that. I think you wrote that code! The problem was in a > mark function, access

Re: Guile 2.0 interpretation vs compilation

2014-10-05 Thread Mark H Weaver
Marko Rauhamaa writes: > Consider this program: > > ===begin test.scm=== > (define (hello) #f) > (format #t "~S\n" (procedure-name hello)) > > (define (xyz) > (define (hello) #f) > (format #t "~S\n" (procedure-name hello))) > > (xyz) > ===en

Re: Guile 2.0 interpretation vs compilation

2014-10-05 Thread Mark H Weaver
Marko Rauhamaa writes: > Mark H Weaver : > >> This is expected but not ideal. Our primitive evaluator does not >> preserve non-toplevel variable names, and therefore the associated >> procedure names are lost. Maybe we can fix this in Guile 2.2. > > I noticed the

Re: Guile 2.0 interpretation vs compilation

2014-10-06 Thread Mark H Weaver
Marko Rauhamaa writes: > Mark H Weaver : > >> This is expected but not ideal. Our primitive evaluator does not >> preserve non-toplevel variable names, and therefore the associated >> procedure names are lost. Maybe we can fix this in Guile 2.2. > > I noticed the

Re: Guile: passing a file descriptor

2014-10-11 Thread Mark H Weaver
Marko Rauhamaa writes: > A PF_UNIX socket can be used to pass an open file descriptor between > processes. However, the relevant control message seems to be missing in > Guile's POSIX facilities (send only accepts a data message). Indeed, we lack that functionality in core Guile. > Am I mistake

Re: iconv or something like that

2014-10-23 Thread Mark H Weaver
Konrad Makowski writes: > Is there any solution to convert charset from one encoding to another? Yes, but character encodings are only relevant when converting between a sequence of _bytes_ (a bytevector), and a sequence of _characters_ [*] (a string). These conversions happen implicitly while p

Re: guile - sending emails

2014-10-23 Thread Mark H Weaver
Konrad Makowski writes: > I use msmtp for my needs. > > (define (send-email) > (let ((port (open-pipe* OPEN_BOTH "msmtp" SMTP_MAIL_TO_SECRETARY))) > (display (smtp-body) port) > (close-pipe port))) You should use OPEN_WRITE instead of OPEN_BOTH here, but otherwise it looks good to me. M

Re: goops and equal?

2014-11-11 Thread Mark H Weaver
Jan Nieuwenhuizen writes: > In the example below, my implementation of equal? is only being > used if both types are the same. That surprised me; the manual > says equal? becomes a generic and for normal generics this works > as I expect. 'equal?' is actually a "primitive generic", which means

  1   2   3   4   >