Re: Double-precision floating point arithmetics behaves differently in Guile and in C

2021-09-27 Thread Panicz Maciej Godek
niedz., 26 wrz 2021 o 21:11 Matt Wette napisał(a): > Your post is a little vague. Are you comparing singular values vectors > of A vs > eigenvalues, eigenvectors of A'*A ? Also, SVD is iterative and > different algorithms may yield > different results (and some of the SVD algorithms out there a

Re: Double-precision floating point arithmetics behaves differently in Guile and in C

2021-09-26 Thread Panicz Maciej Godek
sał(a): > > From: Panicz Maciej Godek > > Date: Sun, 26 Sep 2021 13:55:20 +0200 > > > > I forgot to mention that I run Guile in an Emacs session running in a WSL > > console on Windows 10. > > The tests of the C code that I've been performing so far were exe

Re: Double-precision floating point arithmetics behaves differently in Guile and in C

2021-09-26 Thread Panicz Maciej Godek
I forgot to mention that I run Guile in an Emacs session running in a WSL console on Windows 10. The tests of the C code that I've been performing so far were executed in an MSYS terminal, but I have just tried running them in WSL console, and the radii get ridiculous values. While the values used

Double-precision floating point arithmetics behaves differently in Guile and in C

2021-09-26 Thread Panicz Maciej Godek
Hi, I recently ran into a very weird problem. I am using code for computing Singular Value Decomposition that's been ported do Scheme by Gerald Sussman as a part of the scmutils package (more specifically, I use some bits of code extracted from guile-scmutils

Re: Permissive html parser for guile

2019-01-23 Thread Panicz Maciej Godek
I believe that the canonical way of working with XML documents in Guile is through the (sxml simple) module (and others): https://www.gnu.org/software/guile/manual/html_node/SXML.html It contains xml->sxml function which allows to convert XML strings to a more familiar s-expression based format.

Re: Help with lambda-procedure

2018-12-16 Thread Panicz Maciej Godek
Hi, I don't have much time to look at this, but from a glimpse it seems that the cluprit is this line: (let* ((version (split (string-drop version 1))) it should probably be (let* ((version (split (string-drop (version) 1))) - version is a procedure that produces string, and string-drop expe

Re: Send/link your favorite guile script

2018-12-11 Thread Panicz Maciej Godek
Hi! pon., 10 gru 2018 o 20:13 napisał(a): > Dear guilers > > RMS once said "to become a programmer you should read lots of code and > write lots of code". > > To make this easier I thought out the following: > > I would like to receive a link/attached guile script that you are proud > of. > > I

Re: A value for "nothing"

2018-08-27 Thread Panicz Maciej Godek
pon., 27 sie 2018 o 10:17 napisał(a): > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Mon, Aug 27, 2018 at 02:17:06AM +0200, Panicz Maciej Godek wrote: > > niedz., 26 sie 2018 o 16:09 HiPhish napisał(a): > > > > > Hello Schemers, > > &g

Re: A value for "nothing"

2018-08-26 Thread Panicz Maciej Godek
niedz., 26 sie 2018 o 16:09 HiPhish napisał(a): > Hello Schemers, > > I am writing an implementation of MessagePack [1] for Guile and a part of > the > spec is the presence of a "nil" data type. What would be a good value to > express "nothing" in Guile? I cannot use '() because that would be > i

Re: Python-style doctests in Guile (implemented, please comment)

2017-07-31 Thread Panicz Maciej Godek
2017-07-31 14:51 GMT+02:00 Mark H Weaver : > Hi Arne, > > Arne Babenhauserheide writes: > > > I implemented doctests in Guile which allow writing SRFI-64 tests > > directly in the docstring. Here’s a minimal example: > > > > > > (import (examples doctests)) > > > > (define (one) > >

Re: dynamic-wind

2017-06-30 Thread Panicz Maciej Godek
2017-06-30 22:33 GMT+02:00 Catonano : > On the irc channel I was suggested that it might have been a good fit for > my use case > > I took a look at it in the manual > > I'm perplexed. I don't understand it > > How is it supposed to be used ? > > It's very simple (at least from the point of view o

Re: good tutorial on extending a c++ project with Guile ?

2017-06-26 Thread Panicz Maciej Godek
2017-06-26 15:03 GMT+02:00 Panicz Maciej Godek : > > > 2017-06-26 14:45 GMT+02:00 Samuel Barreto : > >> Hi everyone, >> >> I want to create a Guile extension to a big C++-based project called >> Bio++ (dedicated to bioinformatics and computational biology). &

Re: good tutorial on extending a c++ project with Guile ?

2017-06-26 Thread Panicz Maciej Godek
2017-06-26 14:45 GMT+02:00 Samuel Barreto : > Hi everyone, > > I want to create a Guile extension to a big C++-based project called > Bio++ (dedicated to bioinformatics and computational biology). > > However I failed to find a good and simple example on how to extend a > C++ program with Guile. M

Re: ?-suffix for booleans... good-idea? or bad-idea?

2017-04-27 Thread Panicz Maciej Godek
2017-04-27 12:39 GMT+02:00 Jan Nieuwenhuizen : > Christopher Allan Webber writes: > > > I've noticed that it's common in Guile modules to use "foo?" for > > variable names involving booleans. It's tempting, > > > But is it a good idea? > > It's an idea that I like and use. Not sure that says any

Re: ?-suffix for booleans... good-idea? or bad-idea?

2017-04-25 Thread Panicz Maciej Godek
Hi :) 2017-04-24 19:01 GMT+02:00 Christopher Allan Webber : > Hello everyone! Here's a little bikeshed for us to paint. > > I've noticed that it's common in Guile modules to use "foo?" for > variable names involving booleans. It's tempting, because this looks > an awful lot like you're asking

Re: How to make GNU Guile more successful

2017-03-13 Thread Panicz Maciej Godek
2017-03-13 16:55 GMT+01:00 Nala Ginrut : > Well, I like tofu :-) > > Thien-Thi Nguyen 于2017年3月11日周六 16:48写道: > > > > > () Panicz Maciej Godek > > () Fri, 10 Mar 2017 16:08:23 +0100 > > > >Essentially the power of this idea is that it suddenly tur

Re: How to make GNU Guile more successful

2017-03-10 Thread Panicz Maciej Godek
2017-03-10 15:27 GMT+01:00 : > That's very cool :) And also supports my point that there should be > something > like a wiki for publishing information about Guile packages. It'd be hard > for me to find this on my own. > > [...] >> > > Yeah, for one I don't think the URLs should go directly into

Re: How to make GNU Guile more successful

2017-03-10 Thread Panicz Maciej Godek
2017-03-10 10:55 GMT+01:00 Arne Babenhauserheide : > > Vítor De Araújo writes: > > > (Or maybe package _names_ could be URLs pointing to an index in a > > well-defined format, which tells how to download each version of a > > package; then we could have even dependency management without a > > cen

Re: How to make GNU Guile more successful

2017-02-14 Thread Panicz Maciej Godek
2017-02-13 23:54 GMT+01:00 Arne Babenhauserheide : > > Panicz Maciej Godek writes: > > > 2017-02-13 12:06 GMT+01:00 Arne Babenhauserheide : > > There's also this problem with Scheme that it is a very diverse > > community with plethora of implementations. And whi

Re: How to make GNU Guile more successful

2017-02-13 Thread Panicz Maciej Godek
2017-02-13 12:06 GMT+01:00 Arne Babenhauserheide : > Hi Amirouche, > > Thank you for your nice writeup! > > Amirouche writes: > > > I don't know why Racket is successful probably because > > it has a very good documentation and also a documentation > > generator written in scheme. > > > > => Thi

Re: name an array function

2016-11-21 Thread Panicz Maciej Godek
2016-11-21 11:32 GMT+01:00 Daniel Llorens : > > Hello, > > version 2.2 of Guile will (I hope) include rank-polymorphic versions of > array-ref, array-set! and array-for-each. What this means is that instead > of requiring as many indices as the rank of the array, with these functions > you can giv

Re: Core Guile bindings

2016-10-13 Thread Panicz Maciej Godek
2016-10-13 20:19 GMT+02:00 Arne Babenhauserheide : > > What would be possible without breaking backwards compatibility is > moving them ino a module which is imported by default, with a way to > suppress those default imports. > > I think it is a very nice idea. Guile could install with "configura

Re: Core Guile bindings

2016-10-12 Thread Panicz Maciej Godek
2016-10-12 20:21 GMT+02:00 Thompson, David : > > My understanding is that these symbols have been part of the default > environment for so long that a lot of code would break if they were > removed, so they will be staying for the foreseeable future. > > On the other hand, the fix would usually be

Core Guile bindings

2016-10-12 Thread Panicz Maciej Godek
I've noticed that Guile core contains some bindings that shouldn't necessarily be globally available. In particular, it provides a set of socket-related functions with very general names, such as "select" or "bind", that some programmers may want to use for their own purposes. It is obvious that t

Re: Prevent keyword argumets from appearing in the rest

2016-09-21 Thread Panicz Maciej Godek
For the record, I eventually came up with the following code: (define-module (extra define-keywords) #:use-module (ice-9 nice-9) #:use-module (extra attributes) #:replace ((define/keywords . define*))) (define-syntax define/keywords (lambda (x) (define* (required args #:optional (gath

Prevent keyword argumets from appearing in the rest

2016-09-21 Thread Panicz Maciej Godek
Hi, is there any way to prevent the defined keyword arguments from appearing in the "rest" argument list? For example, if I have a definition (define* (f #:key (a 1) (b 2) (c 3) #:allow-other-keys . rest) rest) I would like (f #:a 5 #:d 6) to return (#:d 6) rather than (#:a 5 #:d 6)

Re: There is no SCAN (introducing Compan)

2016-09-18 Thread Panicz Maciej Godek
2016-09-18 16:17 GMT+02:00 Pascal J. Bourguignon : > Panicz Maciej Godek writes: > > > Therefore, I wrote Compan, which is meant to be a "Community Package > > Manager" for Guile. > > Unfortunately, it's specific to guile. > > I admit that I wrot

There is no SCAN (introducing Compan)

2016-09-18 Thread Panicz Maciej Godek
Probably everybody's heard about the Comprehensive Perl Archive Network, or CPAN. From the pragmatic standpoint, it seems to be adding a lot of value to the programming system, because it allows to avoid reinventing the wheel, and many popular programming systems manage to develop their counterpart

Re: Passing objects between threads

2016-09-15 Thread Panicz Maciej Godek
> > I could of course communicate between the threads using a global variable > and assignment, but this is nasty. Instead I thought of the following > interface: I would like to have two functions, let's call them "exposed" > and "snapshot". The first one would behave like identity (or values), >

Re: Passing objects between threads

2016-09-12 Thread Panicz Maciej Godek
2016-09-11 20:34 GMT+02:00 Andy Wingo : > On Sat 10 Sep 2016 11:37, Panicz Maciej Godek > writes: > > > is there any easy way to create a channel (queue) that could be used to > > communicate between threads? In particular, if the queue is empty, I > would > > l

Re: Passing objects between threads

2016-09-10 Thread Panicz Maciej Godek
10 16:30 GMT+02:00 Chris Vine : > On Sat, 10 Sep 2016 11:37:55 +0200 > Panicz Maciej Godek wrote: > > Hi, > > is there any easy way to create a channel (queue) that could be used > > to communicate between threads? In particular, if the queue is empty, > > I would like

Re: Passing objects between threads

2016-09-10 Thread Panicz Maciej Godek
guile-termite looks like a great project, fingers crossed :) thanks! 2016-09-10 13:18 GMT+02:00 Chaos Eternal : > As part of my (dont know when to finish) guile-termite project, I have a > thread-mailbox impletement. > https://github.com/ChaosEternal/guile-termite/tree/master/thread-mailbox > > O

Re: Passing objects between threads

2016-09-10 Thread Panicz Maciej Godek
Looks very nice, thanks. I'll certainly draw some inspiration from it! 2016-09-10 12:35 GMT+02:00 Diogo F. S. Ramos : > > Hi, > > is there any easy way to create a channel (queue) that could be used to > > communicate between threads? In particular, if the queue is empty, I > would > > like the c

Passing objects between threads

2016-09-10 Thread Panicz Maciej Godek
Hi, is there any easy way to create a channel (queue) that could be used to communicate between threads? In particular, if the queue is empty, I would like the consumer to wait until something appears in it (pretty much like the channels in Clojure) regs, Panicz

Re: Example usages of guile-cairo

2016-07-16 Thread Panicz Maciej Godek
Hi, thanks for your reply -- I think I have solved it (although I took a slightly different approach*) -- the problem was probably that the scale was too small for anything to be visible, and it was sufficient to enlarge the values of points. Of course, if you publish your examples, as it is alway

Example usages of guile-cairo

2016-07-06 Thread Panicz Maciej Godek
Hi, I've been trying to cooperate with guile-cairo. However, the documentation serves as a reference rather than a tutorial, and I've been trying to agree the tutorial from the Cairo website with guile bindings, to no avail. After evaluating the following code, the svg (or pdf) file gets generated

Re: get all available symbols in scheme

2016-06-13 Thread Panicz Maciej Godek
I don't think it is a very portable solution, but you can use "module-obarray" procedure that returns an appropriate hash table, for example: (hash-map->list cons (module-obarray (current-module))) (You can use resolve-module with quoted module name for other modules) Best regards, Panicz 2016

Re: load-extension fails with "file not found" message

2016-05-19 Thread Panicz Maciej Godek
2016-05-19 14:38 GMT+02:00 Matt Wette : > > > On May 12, 2016, at 5:01 AM, Panicz Maciej Godek > wrote: > > It seems that guile finds the proper library file, but when it tries to > > open it, dlopen cannot find a dependency library, so -- faced with a > > failure

Re: load-extension fails with "file not found" message

2016-05-12 Thread Panicz Maciej Godek
3092e000, 2266520) = 0 open("/usr/lib/x86_64-linux-gnu/physics.la", O_RDONLY) = -1 ENOENT (No such file or directory) ... I think that the error message is a bit confusing -- it would be much more helpful if it informed that it found some file (or files), but none of them s

load-extension fails with "file not found" message

2016-05-12 Thread Panicz Maciej Godek
Hi, I recently made update of ubuntu, and I've been trying to get my guile-based framework to work. First, the guile 2.0.11 installed through Guix caused core dumps on initialization, so I switched to the version from the ubuntu repository. Now I've been trying to load some of the extensions neede

Re: anyone define port types?

2016-03-30 Thread Panicz Maciej Godek
2016-03-30 19:53 GMT+02:00 Marko Rauhamaa : > I like OOP, only I don't like GOOPS. Its classes and generic functions > seem so idiomatically out of place, unschemish, if you will. > > This is how OOP ought to be done: > > https://www.gnu.org/software/guile/manual/html_node/OO-Closure.htm > l#

Re: anyone define port types?

2016-03-30 Thread Panicz Maciej Godek
2016-03-30 13:18 GMT+02:00 Jan Nieuwenhuizen : > Panicz Maciej Godek writes: > > > I also used GOOPS, which I regret to this day, and so the > > whole framework needs a serious rewrite > > What is it that you do not like about GOOPS? Most specifically, I dislike its m

Re: anyone define port types?

2016-03-29 Thread Panicz Maciej Godek
Hi Andy, I have been using soft ports to implement a text widget in my GUI framework. I also used GOOPS, which I regret to this day, and so the whole framework needs a serious rewrite, but if you're collecting various species to the museum of make-soft-port, you can have a look: https://bitbucket.

Re: How to define user reader macro in guile?

2016-03-20 Thread Panicz Maciej Godek
2016-03-20 11:38 GMT+01:00 Park SungMin : > > is it possible to expand via squared-bracket. > > i.e... [1 2 3] => (list 1 2 3) [(+ 1 2) 3] => (list (+ 1 2) 3) > > > I know (read-enable 'square-brackets) ...but It just same paren. > > [1 2 3] => (1 2 3) > > is it possible? > The closest thing

[potluck dish] Extremely simple Recursive Descent Parser

2016-02-15 Thread Panicz Maciej Godek
Sorry that I didn't have time to prepare anything better, but here's a little appetizer. It is my implementation of recursive descent parser. Perhaps it isn't as expressive as bison or yacc, but it is considerably shorter :) It implements backtracking through the mechanism of exceptions. The code

Re: [ANN] An impudent introduction to Guile

2016-02-10 Thread Panicz Maciej Godek
:) 2016-02-09 19:41 GMT+01:00 Lawrence Bottorff : > Good, good. > > >> 3. I'm not quite convinced whether \texttt{equivalence-classes} should >> be replaced with \textit{equivalence-classes}. If we actually decide >> to do so, I think it would be better to replace it as >> \textit{equivalence cla

Re: An impudent introduction to impudence

2016-02-08 Thread Panicz Maciej Godek
2016-02-08 21:31 GMT+01:00 Keith Wright : > Panicz Maciej Godek writes: > > > (I wonder whether we should switch to private correspondence, or > > doesn't anyone mind having such updates here?) > > I would think so. Thanks for telling us about > this project, i

Re: [ANN] An impudent introduction to Guile

2016-02-08 Thread Panicz Maciej Godek
2016-02-07 22:51 GMT+01:00, Lawrence Bottorff : > I've got this fork going where I've > done some editing (grammar, style, spelling, etc.) on the book (up to > "Reporting bugs." Let me know what you think. I'm really impressed! Thanks! :) However, I do have so

Re: [ANN] An impudent introduction to Guile

2016-02-05 Thread Panicz Maciej Godek
Hi 2016-02-06 1:47 GMT+01:00 Cao Jin : > It's interesting. I have used Matlab for many years, but never tried R. As > for as I know, there are tons of state-of-the-art library in R and Matlab. > > After skimming your paper, I wander that > 1) Are these library used in your code example implemente

Re: [ANN] An impudent introduction to Guile

2016-02-05 Thread Panicz Maciej Godek
Hi Amirouche, thanks for these nice words! 2016-02-05 19:55 GMT+01:00 Amirouche Boubekki : > > I skimmed over the book and it's really good, my take away: > > - I should probably study better how you introduce match > I have to admit that I've rushed off with the patern matcher rather quickly, b

Re: [ANN] An impudent introduction to Guile

2016-02-05 Thread Panicz Maciej Godek
2016-02-05 17:44 GMT+01:00 Christopher Allan Webber : > Panicz Maciej Godek writes: > > >> CC BY-SA 4.0 is actually what I've been thinking about. > > I will add the legal notice by the end of the day (I only realized the > lack > > of it while I was writing t

Re: [ANN] An impudent introduction to Guile

2016-02-05 Thread Panicz Maciej Godek
2016-02-05 20:46 GMT+01:00 Lawrence Bottorff : > Say, would you like me to suggest some editing changes? Your English is > great, but I've noticed a few errors. > Sure, that would be awesome! I don't think that I ever manage to work out anything comparable to native profficiency in English, but I

Fwd: [ANN] An impudent introduction to Guile

2016-02-04 Thread Panicz Maciej Godek
-- Forwarded message -- From: Panicz Maciej Godek Date: 2016-02-05 8:21 GMT+01:00 Subject: Re: [ANN] An impudent introduction to Guile To: Christopher Allan Webber Hello Chris 2016-02-05 1:30 GMT+01:00 Christopher Allan Webber : > Panicz Maciej Godek writes: > > &g

[ANN] An impudent introduction to Guile

2016-02-04 Thread Panicz Maciej Godek
Hi, I am pleased to announce that I just finished my booklet titled A Pamphlet against R Computational Intelligence with Guile Scheme The pamphlet introduces (in a truly impertinent manner) a set of libraries that I have been developing over the last few months, including topics like: - genetic

Re: Request for feedback on SRFI-126

2015-10-01 Thread Panicz Maciej Godek
2015-10-01 0:16 GMT+02:00 Arne Babenhauserheide : > Am Mittwoch, 30. September 2015, 08:39:44 schrieb Panicz Maciej Godek: > > > > others), then it would be most harmful to the Scheme community, > because > > > > that would increase code enthropy and force programmer

Re: Request for feedback on SRFI-126

2015-09-30 Thread Panicz Maciej Godek
2015-09-30 1:44 GMT+02:00 Arne Babenhauserheide : > Am Mittwoch, 30. September 2015, 01:02:50 schrieb Panicz Maciej Godek: > > 2015-09-29 22:05 GMT+02:00 Arne Babenhauserheide : > > > I wrote SRFI-119, not because I want Scheme to become more like > > > Python, but

Re: Request for feedback on SRFI-126

2015-09-30 Thread Panicz Maciej Godek
2015-09-29 22:05 GMT+02:00 Arne Babenhauserheide : > Am Montag, 28. September 2015, 22:02:42 schrieb Panicz Maciej Godek: > > Even within the Scheme community there appear voices complaining on the > > Lisp syntax, like SRFI-105, SRFI-110 or SRFI-119. > > I wrote SRFI-11

Re: Request for feedback on SRFI-126

2015-09-28 Thread Panicz Maciej Godek
2015-09-28 10:13 GMT+02:00 Taylan Ulrich Bayırlı/Kammer < taylanbayi...@gmail.com>: > Panicz Maciej Godek writes: > > > > Maybe you should explain why there are so many implementations of > > Scheme in the first place? (That isn't the case for Python, Java or >

Re: Request for feedback on SRFI-126

2015-09-27 Thread Panicz Maciej Godek
> > > > I've made pretty fine experiences with R7RS-small so far[0][1][2] > > [3], and after seeing people's disdain towards R7RS-large's > > direction and agreeing with them (although I wouldn't trust my own > > judgment alone), I've decided to try pushing R7RS-large in a > > s

Re: Request for feedback on SRFI-126

2015-09-27 Thread Panicz Maciej Godek
Hi, while I have nothing to say regarding the details of your SRFI, I find some of your motivations questionable, and therefore I decided to write this reply. Forgive the somewhat "negative" tone of this e-mail, despite my intentions being positive. > I've made pretty fine experiences with R7RS-s

Re: Using in C a function defined in guile

2015-09-06 Thread Panicz Maciej Godek
2015-09-06 16:10 GMT+02:00 Vladimir Zhbanov : > Hi, guilers. > > After speaking with a man who doesn't like scheme and wants to make all > his work in C, I wonder if there is an easy way to make the procedures > wholly written in Guile available in C, besides any kind of 'eval'. > Looking through

Re: (ice-9 nice-9) module update

2015-09-03 Thread Panicz Maciej Godek
I inform that I eventually resigned from publishing the "publish" form, as it might be considered too idiosyncratic to some (mostly in its implementation). It now exports exactly 9 bindings, 7 of which are the core bindings (lambda, define, define-syntax, let, let*, let-syntax, letrec-syntax), one

Strange error from syntax transformer

2015-09-02 Thread Panicz Maciej Godek
Hi, As I wrote in another post, I've cut out some more mature pieces of my personal library to a separate module. The module uses (ice-9 match) library and replaces the lambda binding with mlambda (the greek letter came from emacs, but they're just regular words): (define-syntax mlambda (λ (stx)

Re: (ice-9 nice-9) module update

2015-09-02 Thread Panicz Maciej Godek
other email: > > Panicz Maciej Godek writes: > > > * blends named-let with match-let and srfi-71-style let for multiple > > values, legalizing usages like > > > > (let loop ((a (b c) (values 1 (list 2 3 > > ... > > (loop (values 4 (list 5 6 &

Re: (ice-9 nice-9) module update

2015-09-02 Thread Panicz Maciej Godek
2015-09-02 16:11 GMT+02:00 Taylan Ulrich Bayırlı/Kammer < taylanbayi...@gmail.com>: > > Maybe it would be good to make define and define-syntax more symmetric. > So if > > (define (foo . rest) . body) > > is equivalent to > > (define foo (lambda rest . body)), > > then > > (define-synt

Re: (ice-9 nice-9) module update

2015-09-02 Thread Panicz Maciej Godek
Also, I've just noted that now (ice-9 nice-9) exports only 8 bindings, so there's surely a slot for defining some new ones. Perhaps it would make sense to liberate letrec or letrec-syntax, so that it would be possible to use it in a manner similar to let and letrec. However, I don't think that usi

(ice-9 nice-9) module update

2015-09-02 Thread Panicz Maciej Godek
As a follow-up to the thread https://lists.gnu.org/archive/html/guile-devel/2015-06/msg00023.html I announce that I made an update to the (ice-9 nice-9) module. It no longer re-exports every, any and count, but instead it replaces two other bindings: - define-syntax is now blended with define-synt

Re: Executing Arbitrary Machine Code in Guile

2015-08-21 Thread Panicz Maciej Godek
2015-08-22 1:31 GMT+02:00 Elzair : > The other day I came across a page on Rosetta Code showing how to directly > execute x86 instructions across several languages: > http://rosettacode.org/wiki/Machine_code > > I wrote an extension that allows to do that on Linux. You can check it out here: https

Re: Expansion of a macro

2015-04-20 Thread Panicz Maciej Godek
Or you can (use-modules (system base compile) (srfi srfi-11)) and then (define* (expand-form e #:key (opts '())) (let-values (((exp env) (decompile (compile e #:from 'scheme #:to 'tree-il #:env (c

Re: advice on how to use syntax transformers

2015-03-06 Thread Panicz Maciej Godek
2015-03-06 15:51 GMT+01:00 Federico Beffa : > Hi, > > I'm writing to ask for help in understanding syntax > transformers. Specifically, I'm trying to construct a function of the > following form > > (define (key->value meta) > (match meta > (() '()) > "name") value) rest ...) >

[potluck dish] 3d robot programming and simulation environment

2015-02-16 Thread Panicz Maciej Godek
Hello everyone! I'm happy to announce the initial release of Robot Programming and Simulation Environment, available with the release of 1.1.0 version of SLAYER: http://puszcza.gnu.org.ua/software/slayer/ Currently it allows to set arbitrary poses to a humanoid robot, and simulate its behavior in

Any potluck party this year?

2015-02-03 Thread Panicz Maciej Godek
Hi! Although the new major release is on the way, I wonder if there's going to be a potluck party this year to celebrate the fourth birthday of Guile 2.0? :) [I'm asking, because I'm definitely preparing something!]

Clobbering second?

2015-01-14 Thread Panicz Maciej Godek
Hi, what does it mean if I get a "(clobbering second)" message while compiling a module (in guile 2.0.5)?

Re: perplexing syntax-rules bug

2014-12-20 Thread Panicz Maciej Godek
2014-12-20 8:39 GMT+01:00 Marco Maggi : > > > The problem is that ASSQ-SET! mutates the result of the literal > expression: > >'((name . ) (title . #f)) > > this problem is not related to SYNTAX-RULES. The form: > >'((name . ) (title . #f)) > > is a "literal expression", it is a

Re: perplexing syntax-rules bug

2014-12-19 Thread Panicz Maciej Godek
It doesn't seem to be a bug in syntax-rules. It seems to appear whenever two consecutive let forms are used with an assoc list argument which starts with identical elements: (begin (let ((l '((a . X)(b . Y)(c . 7 (assoc-set! l 'b 'Z)) (let ((l '((a . X)(b . Y l)) ===> ((a . X)

Re: docstrings in the reference manual

2014-12-16 Thread Panicz Maciej Godek
2014-12-16 12:42 GMT+01:00 John Darrington : > > Why murder the English language more than necessary? "Docstrings" is a > cliche > which has come from other projects. Peope for whom English is not their > first > language can be confused by such aliterations. They won't find the word > in any >

Re: docstrings in the reference manual

2014-12-16 Thread Panicz Maciej Godek
> > > > I agree though that it can be difficult to find, and it would be a bit > > better if it used the word "docstring" (like "that string is assumed to > > contain documentation for that procedure (so-called 'docstring')"), to > make > > it easier to find, and that there should be a "docstring"

Re: docstrings in the reference manual

2014-12-15 Thread Panicz Maciej Godek
Hello jamil 2014-12-15 23:48 GMT+01:00 jamil egdemir : > > Hi, > > I'm almost afraid to ask this one but I've been poking around the > reference manual at: > > https://www.gnu.org/software/guile/manual/html_node/index.html > > for a while now and for the life of me I can't find a description of >

Re: 2.4 Writing Guile Extensions Example - Mac Build Problem

2014-11-06 Thread Panicz Maciej Godek
2014-11-06 8:06 GMT+01:00 Roger Mc Murtrie : > I have just started learning Guile on my Mac OS X 10.10 (Yosemite) but my > attempt to build the Writing Guile Extensions example failed with: > > gcc `pkg-config --cflags guile-2.0` -shared -o libguile-bessel.so -fPIC > bessel.c > Undefined symbols f

Re: Weird module behaviour

2014-09-25 Thread Panicz Maciej Godek
2014-09-25 16:25 GMT+02:00 Taylan Ulrich Bayirli/Kammer : >> [...] > > Just a tip: you can do e.g. (use-modules ((foo) #:prefix foo-)). It > seems many people don't know of it. No wonder, since there's not a single mention in the documentation, which is perceived as the document that makes things

Weird module behaviour

2014-09-25 Thread Panicz Maciej Godek
Hi all, I'm trying to use Aleix Conchillo's guile-redis module for my project, and it revealed a surprising use-case. Namely, guile-redis consists of several modules that are put together in one meta-module, which looks more or less like this: (define-module (redis) #:use-module (redis main) #

Re: Syntactic significance of dot

2014-09-22 Thread Panicz Maciej Godek
A little more errata :) [sorry for the confusion] > This behaviour is coherent in the context of quasiquote: > (let ((a 1) (b 2) (c 3)) > `(,a ,b . ,c)) > yields > (1 2 3) > Should be: yields (1 2 . 3)

Re: Syntactic significance of dot

2014-09-22 Thread Panicz Maciej Godek
A little errata: > The limitation is that only one element can (and has to) appear after the > period, and at least one element needs to appear before it. Otherwise you > get a syntax voilation: > > '(1 2 . 3) > ===> (1 2 3) > Should be: ===> (1 2 . 3) Also, the dotted pair syntax and its eqiva

Re: Syntactic significance of dot

2014-09-22 Thread Panicz Maciej Godek
2014-09-22 20:12 GMT+02:00 Richard Shann : > I've come across some (working) scheme code whose meaning I can't > unravel. The problem is there is a "." character whose significance > eludes me. The guile reference doesn't index this character, and I can > only find references to it in writing lite

Re: emacs interaction

2014-09-19 Thread Panicz Maciej Godek
2014-09-20 5:33 GMT+02:00 Matt Wette : > I have searched the archives for information on using guile in emacs and > not much besides the guile-emacs project. > > Q1) I have used GDS to run guile in emacs. Not perfect but usable. > Comments? I'm using with the emacs "scheme" mode. > > The best pa

Re: syncase code issue 1.8.8 -> 2.0.11

2014-09-18 Thread Panicz Maciej Godek
2014-09-18 3:18 GMT+02:00 Matt Wette : > Hi Folks, > > Anyone interested in looking at my syntax-case code? I wrote this > several years ago under 1.8.8. Now moving to 2.0.11: not working :(. > > Matt > > > [...] > In 1.8.8, I get the above output. In 2.0.11 I get > > Syntax-case macros are

Re: A couple of questions about goops method parameters

2014-09-06 Thread Panicz Maciej Godek
2014-09-06 13:27 GMT+02:00 Marko Rauhamaa : > Panicz Maciej Godek : > >> However, I'd rather say that the lack of any type system in Guile is >> an inconvinience, because static type checking allows to avoid a huge >> class of software errors, and a good type syste

Re: A couple of questions about goops method parameters

2014-09-06 Thread Panicz Maciej Godek
2014-09-06 0:14 GMT+02:00 Marko Rauhamaa : >>> * [GOOPS] introduces a very strong, almost Linnaean, type system to >>>Scheme, where it seems out of place. I see no principal reason for >>>such classification. I don't declare my numbers in Scheme; why >>>should I declare my object type

Re: A couple of questions about goops method parameters

2014-09-05 Thread Panicz Maciej Godek
2014-09-05 22:44 GMT+02:00 Marko Rauhamaa : > Panicz Maciej Godek : > >> I think that it is a big problem of Scheme, that it does not have any >> noncontroversial and commonly accepted way for creating named tuples. > > That's what alists are. They may not be the most

Re: A couple of questions about goops method parameters

2014-09-05 Thread Panicz Maciej Godek
2014-09-05 22:18 GMT+02:00 Taylan Ulrich Bayirli/Kammer : > Panicz Maciej Godek writes: > >> [...] I think that it is a big problem of Scheme, that it does not >> have any noncontroversial and commonly accepted way for creating named >> tuples. > > Does SRFI-9 not

Re: A couple of questions about goops method parameters

2014-09-05 Thread Panicz Maciej Godek
: >> http://elm-lang.org/learn/What-is-FRP.elm >> >> Using FRP, we can model with mutable state in a pure, functional way. OTOH, when you take a look at the example code (Mario), you can trace the notion of objects. E.g. mario = { x = 0, y = 0, vx = 0, vy = 0, dir = "right" } What else is that, i

Re: A couple of questions about goops method parameters

2014-09-05 Thread Panicz Maciej Godek
2014-09-05 21:12 GMT+02:00 David Thompson : > Panicz Maciej Godek writes: >> >> So perhaps you could tell me how to design a GUI framework in FP and >> without OOP. To me it seems that GUI is the main domain the OOP was >> crafted for, but if you have some nice fu

Re: A couple of questions about goops method parameters

2014-09-05 Thread Panicz Maciej Godek
2014-09-05 10:32 GMT+02:00 Nala Ginrut : > Hi Carlos! > > On Tue, 2014-09-02 at 23:05 -0300, Carlos Pita wrote: > >> 2) What is the relationship between the lambda* family and methods? >> Are methods restricted in the sense that they can't aspire to get the >> greater flexibility of lambda* paramet

Re: A couple of questions about goops method parameters

2014-09-03 Thread Panicz Maciej Godek
Howdy, > How do you typically implement a custom initialization method, then? > Using pattern matching? Maybe ice-9 optargs? Maybe apply? Maybe you > directly call initialize? In any case, why is this so? Wouldn't it be > better for initialize to just get the "unpacked" argument list? This > perpl

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

2014-08-14 Thread Panicz Maciej Godek
2014-08-14 14:59 GMT+02:00 Marko Rauhamaa : > Panicz Maciej Godek : > >>> I disagree. S-expressions far surpass whatever the others have to offer. >> >> You disagree on which point exactly? >> - that using dictionaries is programmers' daily bread? >

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

2014-08-14 Thread Panicz Maciej Godek
2014-08-14 12:36 GMT+02:00 Marko Rauhamaa : > Panicz Maciej Godek : > >> Using dictionaries is programmers' daily bread, yet Scheme has no >> common way for doing that (unlike Perl, PHP, Python, JavaScript, >> Clojure and other popular languages). > > I disagree.

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

2014-08-14 Thread Panicz Maciej Godek
2014-08-14 11:53 GMT+02:00 Marko Rauhamaa : >> Scheme already has a nice representation for associactions, namely the >> assoc lists. However, they are a bit problematic, because they are >> ordered by nature and hence there's not much one can do with their >> linear access time. > > When we are ta

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

2014-08-14 Thread Panicz Maciej Godek
2014-08-13 21:59 GMT+02:00 Jan Nieuwenhuizen : > Ludovic Courtès writes: > >> The problem is that SRFI-10 itself does not specify an external >> representation for hash tables, nor does Guile. Thus this patch cannot >> be applied. > > Yes, I understand that...Still, "wouldn't it be nice" if Scheme

Re: Need a simple graphics lib

2014-04-15 Thread Panicz Maciej Godek
2014-04-15 8:43 GMT+02:00 康桥 : > Hi, I want to write a guile program to help me extract some music scores > from a few MOD files. > I wish to store the scores as image files.But I don't know much about > graphics libs in guile. > Any advice? I think guile-cairo might be what you're looking for: ht

Re: GNU Guile 2.0.10 released

2014-03-26 Thread Panicz Maciej Godek
2014-03-26 20:22 GMT+01:00 Eli Zaretskii : [...] > Last June I reported many details about the hang, you might find there > something about this stuff. See, for example, these messages: > > http://lists.gnu.org/archive/html/guile-user/2013-06/msg00030.html > http://lists.gnu.org/archive/html/g

  1   2   3   >