Re: PEG Patches

2011-03-31 Thread Noah Lavine
, Andy Wingo wi...@pobox.com wrote: On Tue 29 Mar 2011 14:47, Noah Lavine noah.b.lav...@gmail.com writes: (define-peg-matcher and cg-and) That's doable. But if we're going to choose what to do entirely based on the first element of the list, then we could also just not define peg-sexp-compile

Re: GSoC 2011

2011-04-03 Thread Noah Lavine
Hello, Your ideas sound neat, but there are a few things I am not familiar with. On Thu, Mar 31, 2011 at 10:31 AM, Diogo F. S. Ramos diogo...@gmail.com wrote: What do you want to do in this area?  There is important work to do with introspection, but we would need to see your ideas and your

Re: GSOC Advice

2011-04-04 Thread Noah Lavine
Hello, Thanks for the advice! I am in America (in the Eastern Time Zone, to be precise). I'm a relatively new committer, which is why I haven't been advertising for people to mentor, but I would be happy to help with anything I could. Noah On Mon, Apr 4, 2011 at 5:50 PM, Phil

Re: Problem with GCC as a Scheme compiler: tail calls

2011-04-07 Thread Noah Lavine
H Weaver m...@netris.org wrote: Noah Lavine noah.b.lav...@gmail.com writes: There is one _very_ serious problem with using GCC to compile Scheme, or at least there was the last time I researched this issue: tail calls. I might be wrong about this, but I thought that GCC supported multiple

Re: [PATCH] Fix the R6RS exact-integer-sqrt and import into core guile

2011-04-08 Thread Noah Lavine
Hello,  1. I think we shouldn’t augment the C API unless strictly necessary,     because the idea is to write Scheme, not C, and because of the     maintenance cost. Why would we not want to augment the C API? It seems like a natural complement to augmenting the Scheme API, since Guile is a

Re: Problem with GCC as a Scheme compiler: tail calls

2011-04-11 Thread Noah Lavine
Hello, Regarding GCC, I have spoken to GCC folk, and they are not averse to making GCC into a more modular thing.  There are obvious licensing concerns, but these are surmountable: Guile and GCC could work together somehow.  The problem, as I understood it last year, was that GCC doesn't

Re: soc mentor?

2011-04-12 Thread Noah Lavine
Hello, I would be happy to mentor for SoC! I think it's a great program. I can also promise that I'll have a lot more time to work on Guile stuff over the summer than I do now, which should be perfect for SoC. :-) My only questions are about logistics. Do I have to do any paperwork or something

A Modest Proposal

2011-04-13 Thread Noah Lavine
Hello Guile and Clisp developers, I'm writing to talk about vague big-picture ideas, but please bear with me for a minute, because I think this could be useful. I noticed in the recent GNU Summer of Code applications (I'm a mentor for Guile) that CLisp wants to become embeddable, and embed into

Re: Avoiding variable clashes

2011-04-13 Thread Noah Lavine
I think that mechanism is all that Guile uses at present. However, it should be general enough to resolve all situations where variables of the same name refer to different entities, assuming you set up the environments correctly. Are you planning on implementing a theorem prover for Guile? That

Re: A Modest Proposal

2011-04-13 Thread Noah Lavine
Hello, I think we should first compare the virtual machines. If no obvious impossibility is observed, then perhaps modifying the compiler of clisp to generate guile VM code would be an easy path to obtain a CL implementation running on guile VM.  (This would disable the interpreter in

Re: Avoiding variable clashes

2011-04-14 Thread Noah Lavine
The fact that we represent different variables as gensyms is an implementation detail, and unimportant. (In fact, I might like to change that detail at some point to get better error messages, but it's not high on my to-do list.) What are you referring to here? It's just part of my mental

PEG CHanges

2011-04-15 Thread Noah Lavine
Hello all, I just pushed some changes to the wip-peg branch. They eliminate the last remaining circularity in the module imports and then add everything to the Makefile. It passes all tests on my machine. This is my first time pushing something, so I hope I did it correctly. If the patches

Re: A Modest Proposal

2011-04-16 Thread Noah Lavine
These are all good points. Integrating different languages is hard. Quite frankly, I am not yet sure that sharing a VM would be a good idea for us, but as we talk more about it it is seeming more and more reasonable. I sent my original message because I saw that CLisp was becoming an embeddable

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

2011-04-17 Thread Noah Lavine
Hello all, I'm afraid this email is coming much later in the planning process than it should, and quite possibly we won't be able to do any of this for SoC, and that's fine with me. But I was thinking about what we could do that would be a killer feature for Guile's CPAN - something that isn't

Re: Guile virtual machine targets

2011-04-18 Thread Noah Lavine
Hello, Let me clarify a bit about Lightning and the stuff I've been doing: Lightning is a very low-level assembler framework. It is embeddable, and Guile could certainly target it, but targeting Lightning would be just a speed enhancement - it wouldn't make us more compatible with anything else.

Re: Just to mention: Why there's still not any guile-2.0 packages in linux distributions?

2011-04-18 Thread Noah Lavine
I don't know about the packaging, but I think the .go files depend on the endianness of the machine but nothing else. So you should be able to move them between different little-endian or big-endian machines (unless I'm wrong). But it seems much safer to me to just compile things. You shouldn't

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

2011-04-20 Thread Noah Lavine
Well, IIRC, it's not a feature that dorodango does not have ;-): dordango's package container format (referred to as a bundle) can contain multiple packages.  So it is possible to pack all your dependencies in a single ZIP, and install them in one go using that bundle.  There's a bit of text

Re: New feature proposal: Support C-code inline?

2011-04-22 Thread Noah Lavine
I just looked at the code. It's really cool! This looks like a way to write modules that use C and Scheme together in such a way that the code is all in one place. I think it could be much easier to read code written this way than code in separate C and Scheme files. What do other people think?

Re: Indexing Scheme and C identifiers separately

2011-04-24 Thread Noah Lavine
Hello, I do not know how you are reading the Guile Reference Manual, but the printed version is about 809 pages long. At present, the indices run from page 755 to 809, so the revision that is suggested, above, would not be small. What would be of some help to get this project started is a

Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.

2011-04-29 Thread Noah Lavine
Is anyone interested in implementing a path library? Andy I might be able to work on it. I haven't done much for Guile lately, but I expect to have a lot more free time once my semester ends on May 7th. However, I don't know much about how Windows paths work. Are there any special

Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.

2011-05-01 Thread Noah Lavine
Yep!  Check that racket web page I linked to.  You don't have to implement all of it, but it should be possible to implement, given the path abstraction. Okay, I've read it. It doesn't seem very complicated. Should we strive for API compatibility? I don't see any programs needing it right now,

Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.

2011-05-03 Thread Noah Lavine
Hello all, I have another issue to raise. I think this is actually parallel to some of the stuff in the (web) module, as you will see. I've always thought it was ridiculous and hackish that I had to escape spaces in path strings. For instance, I have a folder called Getting a Job on my desktop,

Re: early termination for `map'

2011-05-05 Thread Noah Lavine
That makes sense. On Thu, May 5, 2011 at 11:24 AM, Andy Wingo wi...@pobox.com wrote: Hello, If you call `map' or `for-each' with more than one list, our versions of these operators will detect if the lists are of unequal length, and throw an error in that case. However, SRFI-1 has long

Re: Some guile-unify activities

2011-05-06 Thread Noah Lavine
Cool! On Fri, May 6, 2011 at 5:18 PM, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: Hi, Just wanted to chime in and tell you a little about what I'm doing with the guile-unify package. First off, this is a tool to do backtracking effectively e.g. tree searches and make heavy use

Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.

2011-05-17 Thread Noah Lavine
. Noah On Wed, May 4, 2011 at 5:24 AM, Ludovic Courtès l...@gnu.org wrote: Hi Noah, Noah Lavine noah.b.lav...@gmail.com writes: The reason this strangeness enters is that path strings are actually lists (or vectors) encoded as strings. Conceptually, the path ~/Desktop/Getting\ a\ Job

ELisp Implementation?

2011-06-25 Thread Noah Lavine
Hello, Guile's Summer of Code project this summer was an implementation of Emacs Lisp. I am curious - what is happening with that? Is it progressing? I follow the list, but haven't heard anything since the decision on which project we wanted. Noah

Re: Patch to add (define-syntax (foo bar) ...) support

2011-07-03 Thread Noah Lavine
Hello, I agree that this is much shorter, but I'm worried about defining the short syntax in a way that forces you to choose between syntax-rules and syntax-case. What I mean is that you could just as easily have (define-syntax (foo bar) ...) expand to (define-syntax foo (syntax-rules ()

Re: Patch to add (define-syntax (foo bar) ...) support

2011-07-03 Thread Noah Lavine
Except, it doesn't. My version doesn't insert either syntax-case or syntax-rules; it just inserts the lambda and lets you do whatever. Oh, I must have been temporarily insane. My apologies. :-) Your idea makes a lot of sense. Noah

Build Bug in wip-peg

2011-09-03 Thread Noah Lavine
Hello all, It's been a while, but I just got the wip-peg branch from the main repository and tried to build it. After doing make clean make, I get this error: Undefined symbols: _rpl_open, referenced from: _scm_open_file in libguile_2.0_la-fports.o _scm_load_objcode in

Re: Build Bug in wip-peg

2011-09-06 Thread Noah Lavine
is a bit lossy :) Cheers, Andy On Tue 06 Sep 2011 04:25, Noah Lavine noah.b.lav...@gmail.com writes: I have fixed this. There is currently a branch on Savannah called wip-peg-fixed which has all of the peg changes rebased on top of stable-2.0. It builds fine on my machine and runs

Re: The wonders of partial evaluation

2011-09-08 Thread Noah Lavine
This is excellent! Congratulations! An interesting note from my current project: a partial evaluator means you don't have to use macros to define the PEG parser (while keeping exactly the same efficiency as now): instead of having (define-peg pattern) be a macro that analyzes pattern and outputs

More PEG

2011-09-08 Thread Noah Lavine
Hello all, It looks to me like the last thing needed before the peg branch can be used is to change some of the S-expression representations of the components. Here are the five that I think need changing, taken from the manual, with suggested replacements. -- PEG Pattern: zero or more a

Re: More PEG

2011-09-09 Thread Noah Lavine
Hello, The syntactic changes you propose all make sense to me, FWIW. Great! Then I will push an implementation soon unless someone else objects. A more general question about PEG: how do you bind a variable to the result of a pattern?  For instance, if you want the result of (* a) to be

Re: More PEG

2011-09-17 Thread Noah Lavine
. I hadn't really looked at this part of the module, but it looks to me now like the names aren't descriptive enough. Maybe we should change them before putting this in a release. Noah On Sat, Sep 10, 2011 at 5:35 PM, Ludovic Courtès l...@gnu.org wrote: Hi! Noah Lavine noah.b.lav...@gmail.com

Re: More PEG

2011-09-19 Thread Noah Lavine
for people to learn and forwards-compatible with whatever our future plans for parsing are. I will try to send an email soon with some thoughts on that. Noah On Sat, Sep 17, 2011 at 9:09 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Hello, Can you give an example of what ‘peg-parse’ and ‘peg:tree

Defining Functions With Syntax

2011-09-20 Thread Noah Lavine
Hello all, I was just going through updating the PEG documentation when I encountered a very weird situation, and I don't know how to solve it. As you probably know, the PEG system can take an s-expression representation of a PEG grammar (a peg s-exp) and turn it into a function that can parse

Re: Defining Functions With Syntax

2011-09-21 Thread Noah Lavine
Hello, It is complicated though.  The other option is to write a PEG interpreter or compiler in Scheme.  An interpreter would interpret the s-expressions directly, or some simplified form of them.  A compiler would pre-process the s-expressions to produce a procedure, built from closures.

Re: Defining Functions With Syntax

2011-09-21 Thread Noah Lavine
Hello, If the s-expression is a compile-time constant, and if the PEG compiler is written in purely-functional style and confined within a single top-level form, then peval should be able to produce the parser procedure at compile-time.  Otherwise, it would be produced at run-time. This is

Re: Defining Functions With Syntax

2011-09-21 Thread Noah Lavine
For instance, what about doing   (compile (peg-sexp-compile some-s-expression) #:from scheme-syntax #:to value) ? That seems like a nice API to me. You could do the same with #:from 'scheme, no? I don't think so, because I think #:from 'scheme expects an S-expression, but peg-sexp-compile

Re: Defining Functions With Syntax

2011-09-21 Thread Noah Lavine
Oh, excellent! I had assumed it did not. I will update the PEG documentation. On Wed, Sep 21, 2011 at 3:22 PM, Andy Wingo wi...@pobox.com wrote: On Wed 21 Sep 2011 20:44, Noah Lavine noah.b.lav...@gmail.com writes: I think #:from 'scheme expects an S-expression, but peg-sexp-compile returns

Names for PEG Functions

2011-09-21 Thread Noah Lavine
Hello all, As the PEG module nears some reasonable level of completion, we should figure out what all of the functions need to be named so everyone can reasonably understand them. At first I thought the names should be consistent wtih the LALR and regexp modules, so all of the parsing modules

Re: Names for PEG Functions

2011-09-22 Thread Noah Lavine
Hello, define-peg-sexp - define a nonterminal from an s-expression define-peg-string - define a set of nonterminals from a string To me this sounds like you are defining an sexp or a string, which doesn't make much sense.  I don't think that we need to preserve symmetry here, because the

A Plan for Hacking

2011-09-24 Thread Noah Lavine
Hello all, It looks to me like the PEG project is wrapping up. We're talking about what to name things now, which means the library is likely pretty close to inclusion in Guile. After this I will want another Guile project to work on. My original intention was to work on a JIT compiler for Guile,

Re: A Plan for Hacking

2011-09-25 Thread Noah Lavine
Hello,   - You write a function that assumes its arguments are of a certain type. You'd like to be sure this is true, so your program won't throw exceptions in the middle. That would be cool.  However, I suspect that for best results you’d want procedures to have type annotations, as in

Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32

2011-09-27 Thread Noah Lavine
Hello, (Though I think that the term ‘constant’, as used by GCC, is confusing. I don’t have a better name to propose, though.) How about 'algebraic'? As in functions in basic algebra. (I know it has a different meaning, though.) Or alternatively, something referencing the lambda calculus,

Re: A Plan for Hacking

2011-09-28 Thread Noah Lavine
Hello, I think it can be done effectively, but I'm not quite sure what you mean by dynamic module composition. Do you mean that this might prevent you from making modules that use arbitrary other modules? Or that it might not work if you loaded modules at runtime from the REPL? I was

Re: Guile 2.0.x for cygwin, debian, ubuntu

2011-09-30 Thread Noah Lavine
I believe debian maintainers are responsible for packaging Guile for Debian. You should contact whoever maintains the Guile package there. I don't know anything about cygwin. On Thu, Sep 29, 2011 at 6:38 AM, roman ro...@web.de wrote: Hello, the last version of guile available for cygwin and

Re: Names for PEG Functions

2011-10-03 Thread Noah Lavine
Hello, I hate to make more work for people, but I think the PEG module is almost ready for merging, and could probably be merged if we resolved this names issue. Any other thoughts? Noah On Thu, Sep 22, 2011 at 1:56 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Hello, define-peg-sexp

ELisp?

2011-10-08 Thread Noah Lavine
Hello all, Could anyone tell me the status of the ELisp implementation since July 21st (the last update)? I'm especially interested now because of a thread on emacs-devel - http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00753.html. People were talking about adding multithreading to

Re: ELisp?

2011-10-09 Thread Noah Lavine
happening or where to look. If you set up a branch, I for one would love to check it out and perhaps contribute some patches. Do you need permission from the Emacs maintainers to do that, or anything else? Noah On Sun, Oct 9, 2011 at 9:37 AM, joa...@verona.se wrote: Noah Lavine noah.b.lav...@gmail.com

Tree-IL Questions

2011-11-16 Thread Noah Lavine
Hello again, I've been working on the compiler issue and I've had to start looking at processing Tree-IL. As a result, I realized that the Tree-IL documentation is a bit out-of-date. I would like to fix it, but there are some things I don't understand. - It looks like every Tree-IL type has a

Re: Tree-IL Questions

2011-11-17 Thread Noah Lavine
Hello, Record-case parses slots by name, not by position. Match destructures by position, not by name. Oh, interesting. - On a related note, why do most of the Tree-IL record type not appear in the define-type statement in tree-il.scm line 133, and is that connected with the

Re: Tree-IL Questions

2011-11-17 Thread Noah Lavine
Then I have a new goal: understand that. :-) The deal is that macroexpansion produces tree-il.  The usual macroexpander is provided by psyntax.  But before psyntax is loaded, when the first bits of Scheme are seen, there is a boot expander written in C that produces tree-il, with support for

Re: Guildhall

2011-12-01 Thread Noah Lavine
Hello, I am certainly not an authoritative source, but it's been a while, so here is what I know. As far as I can tell, these questions haven't been decided yet. All we know is that we want a guildhall. However, having your packages in it would be great, so please do package them up and

Re: *current-language*

2011-12-05 Thread Noah Lavine
I guess in general I'd prefer something like Racket's #!lang directives, though I'm not opposed to this approach.  Dunno! How about using language directives when available, and trying to guess the language when not? And about the directives, what should they be? ',language' is what we used to

Update and Questions

2011-12-05 Thread Noah Lavine
Hello Guile developers, Despite the long gap since my last email, I have in fact been working on the compiler project. This email has two purposes: first, to make sure that I have a basically reasonable design before I work more, and second, to ask a logistical question. First of all, I very

Re: Compiler Branch

2011-12-13 Thread Noah Lavine
Cool.  As a quick reaction, I have some doubts about this project.  But, I guess a WIP branch would be a good thing to have, and it would make the discussion more concrete. Probably so. But if you have time, what are your doubts? I would much rather talk about problems now than after I've

Re: Anything better for delayed lexical evaluation than (lambda () ...)?

2011-12-13 Thread Noah Lavine
Hello, I haven't really been contributing to this thread, so please take my opinion with a grain of salt. But it does appear to me that we should support capturing a lexical environment, as Mark and David describe. So I took a look at ice-9/eval.scm to see how difficult it would be to implement.

Re: Anything better for delayed lexical evaluation than (lambda () ...)?

2011-12-14 Thread Noah Lavine
Perhaps this is obvious to everyone else, but it just occurred to me that (capture-local-environment) is just (call-with-current-continuation), but running in the environment of the evaluator instead of the program being evaluated. It's as though the evaluator was going to look in a tree for more

Re: summary: lilypond, lambda, and local-eval

2011-12-18 Thread Noah Lavine
Hello, Indeed, only the macro expander has enough information to generate an optimal list of reachable lexicals, i.e. lexical variables that are accessible using normal symbols (as opposed to syntax objects) [more on this below]. Are you certain that you want to restrict the set of

Re: summary: lilypond, lambda, and local-eval

2011-12-18 Thread Noah Lavine
Hello, If I understand correctly, Mark wants to restrict the set of variables you can access to those you could access through normal Scheme code. This is an issue because psyntax happens to provide a way to access more variables than standard Scheme. If this is the case, I think we should

Re: [Guile-commits] GNU Guile branch, wip-compiler, updated. v2.1.0-139-gf8a333e

2011-12-25 Thread Noah Lavine
Hello, Sorry it's been so long since my last reply. I've been somewhat busy around the holidays, but I hope to work more soon. Also, what about “vset” or just “set” instead of “value-set”? Yes, probably a good idea. +              (set! (a-verify-exps ret) +                    (map (lambda

Re: Guile: What's wrong with this?

2012-01-03 Thread Noah Lavine
Hello, Then it turned out that the string functions would now clear the high order bit on strings, so they are no longer byte arrays and there is no replacement but to roll my own.  I stopped supporting byte arrays.  A noticable nuisance. This is just a side note to the main discussion, but

Re: Continuation sets and order-independency

2012-01-04 Thread Noah Lavine
Let me see if I understand what you mean. I think you're talking about an expression like this: (cons (call/cc store-this-continuation) (call/cc store-this-continuation)) and you want a way to distinguish the first and the second call/cc, by guaranteeing the order they are hit. This will let

Re: Guile: What's wrong with this?

2012-01-05 Thread Noah Lavine
Hello all, I must admit that I do not know much about why R5RS says that literals are constant, but I think there is a misunderstanding. Bruce does not want `define' to always copy its result. I think what he wants is for literals embedded in source code to be mutable. This would, of course,

Re: Compiler Branch

2012-01-07 Thread Noah Lavine
Hello, I'm going to try to combine the two parallel compiler threads into one, by replying to two messages at once. I hope this makes things simpler rather than more confusing. :-) Message 1: Here is my calculus regarding this work, FWIW: it is low risk, and low cost, since it doesn't

Re: Continuation sets and order-independency

2012-01-07 Thread Noah Lavine
Kastrup d...@gnu.org wrote: Noah Lavine noah.b.lav...@gmail.com writes: On Wed, Jan 4, 2012 at 8:16 AM, David Kastrup d...@gnu.org wrote: Hi, I was just wondering about the ability for using multiple continuations in contexts that don't guarantee an order of execution.  Functions like map, list

Re: Compiler Branch

2012-01-08 Thread Noah Lavine
Hello, Interesting.  `verify' seems to be a form of contracts:  http://ftp.ccs.northeastern.edu/scheme/pubs/icfp2002-ff.pdf Does `verify' have runtime semantics?  Under what situations, if any, would the compiler insert runtime checks? It has no runtime semantics right now. I considered

Re: Names for PEG Functions

2012-01-19 Thread Noah Lavine
...@pobox.com wrote: On Wed 04 Jan 2012 19:12, Andy Wingo wi...@pobox.com writes: On Mon 03 Oct 2011 20:21, Noah Lavine noah.b.lav...@gmail.com writes: I hate to make more work for people, but I think the PEG module is almost ready for merging, and could probably be merged if we resolved this names

Re: impressions on gc

2012-01-19 Thread Noah Lavine
Hello, As long as we're pinging people for 2.0.5, I don't think this patch ever got pushed. :-) I can't build master right now. This is partly my fault for doing so little sysadmin work that I still have libgc 7.1, but I still think this one should really, really be in 2.0.5 if the GC changes

Re: Names for PEG Functions

2012-01-19 Thread Noah Lavine
I've run into trouble because of my problems building master. I'll have to work around that, so it won't happen tonight. On Thu, Jan 19, 2012 at 8:54 AM, Noah Lavine noah.b.lav...@gmail.com wrote: Sorry for the delay. I haven't thought about the PEG stuff in a long time, but looking back, I'm

Re: Names for PEG Functions

2012-01-22 Thread Noah Lavine
, because the macro could just detect whether it got a string or an s-expression and do the right thing. I can fix that if other people think it should be done. Noah On Thu, Jan 19, 2012 at 10:18 PM, Noah Lavine noah.b.lav...@gmail.com wrote: I've run into trouble because of my problems building master

Re: syntax-local-binding

2012-01-24 Thread Noah Lavine
Hello, If we can already foresee the need to deprecate an interface, wouldn't it be better not to add it in the first place? I don't see the need to deprecate them now, not more than any other identifier that we export. I think this may be the key to this argument. There are two separate

Build Error in master

2012-01-26 Thread Noah Lavine
Hello, I just checked out the latest master. I attempted to build it, but got stuck at this point: GENguile-procedures.texi /bin/sh: line 1: 75746 Broken pipe cat alist.doc arbiters.doc array-handle.doc array-map.doc arrays.doc async.doc backtrace.doc boolean.doc bitvectors.doc

Re: Build Error in master

2012-01-26 Thread Noah Lavine
, Noah Lavine noah.b.lav...@gmail.com writes: I just checked out the latest master. I attempted to build it, but got stuck at this point: Is it http://lists.gnu.org/archive/html/bug-guile/2011-12/msg00058.html ? Andy -- http://wingolog.org/

Re: unknown location: definition in expression context in subform optname-from of _^

2012-01-26 Thread Noah Lavine
Hello,        /* Read expressions from that port; ignore the values.  */        for (;;) {            SCM form = scm_read(port);            if (SCM_EOF_OBJECT_P(form))                break;            ans = scm_primitive_eval_x(form);        }        return ans;    } } Every

Re: Build Error in master

2012-02-02 Thread Noah Lavine
be looking for? Thanks, Noah On Wed, Feb 1, 2012 at 4:01 AM, Andy Wingo wi...@pobox.com wrote: On Wed 01 Feb 2012 03:12, Noah Lavine noah.b.lav...@gmail.com writes: In the failing call,   the SCM 'symbols' is 0x10101cff0, but the failing set is at 0x304, which has not been allocated. 0x304

Re: Build Error in master

2012-02-07 Thread Noah Lavine
, Feb 2, 2012 at 9:59 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Got it! And unfortunately, it's a GC error. Here's what happens: symbols is an SCM object defined in symbols.c. It points to an scm_cell_t which has two elements: a type tag, and a pointer to an scm_weak_set_t. That scm_cell_t

Re: Build Error in master

2012-02-07 Thread Noah Lavine
Oh, and the same will happen with GC_get_suspend_signal, which we define at scmsigs.c:155. Other than that, though, the new gc resolves the problem I had. I am willing to chalk this up to a GC bug and not worry about it more. Noah On Tue, Feb 7, 2012 at 9:07 AM, Noah Lavine noah.b.lav

Re: GNU Guile PEG-parser

2012-02-07 Thread Noah Lavine
Hello, Thanks for emailing! I suppose I am the one to talk to, since I was the last one to work on it. I didn't make the PEG parsing syntax, but I would guess the reason there isn't a string syntax for ignore is that there's no conventional way to write it, but there is for the other PEG

Re: GNU Guile PEG-parser

2012-02-09 Thread Noah Lavine
Hello, I've actually found no PEG library that has a string syntax for the equivalent of ignore. I'm guessing most people are satisfied with just specifying another nonterminal and matching that one. Probably because it is seen as less ugly than extending on the formal definition of PEG but I

Adding Identities to Peval

2012-02-15 Thread Noah Lavine
Hello, I've been working on a patch to add a new sort of optimization to peval, and I think it's almost ready. It's based on some of the ideas in Environment Analysis of Higher-Order Languages. The goal is to recognize when two quantities are equal even when we don't know what they are. My

Re: Adding Identities to Peval

2012-02-16 Thread Noah Lavine
Hello, Note, we don't need to add extra identities to operands: they already have their gensyms.  So to get the effect of this patch, you could add a clause to fold-constants:  ((primcall src 'eq? (lexical _ _ x) (lexical _ _ y))   (if (eq? x y)       (make-const src #t)      

Re: Adding Identities to Peval

2012-02-16 Thread Noah Lavine
Hello, On Thu, Feb 16, 2012 at 10:06 AM, Andy Wingo wi...@pobox.com wrote: On Thu 16 Feb 2012 14:18, Noah Lavine noah.b.lav...@gmail.com writes:  (let ((x (random)))    (eq? x x)) (let* ((x (random))        (y (list x))        (z (car y))   (eq? x z)) This one should reduce to the same

Re: Adding Identities to Peval

2012-02-18 Thread Noah Lavine
it. I will send a separate email about the CPS stuff. Noah On Fri, Feb 17, 2012 at 3:13 AM, Andy Wingo wi...@pobox.com wrote: Hi Noah, On Fri 17 Feb 2012 03:22, Noah Lavine noah.b.lav...@gmail.com writes: (let* ((x (random))        (y (list x))        (z (car y))   (eq? x z)) To make

CPS and Guile

2012-02-18 Thread Noah Lavine
Hello everyone, There was some discussion in the Identities in Peval thread about using a CPS-like intermediate representation in Guile. I think that our goal with our intermediate representation should be to make things convenient for us - we shouldn't try to match any particular model unless

Re: manual examples - self contained or not?

2012-02-19 Thread Noah Lavine
Hello, My vote would be for self-contained: it can be copied directly into a file or REPL and executed, and IMO reduces confusion. I already try to do this when posting any examples on paste.lisp.org or in a gist. When you say self-contained, do you mean that if the example uses a procedure

Re: Trouble using (current-filename)

2012-02-19 Thread Noah Lavine
What about having two bits of syntax, current-filename and current-file-path? Or better yet, current-filename and current-file-directory, with the guarantee that (string-append (current-file-directory) path-separator (current-filename)) points to the file when it was compiled? It is more

Re: Adding Identities to Peval

2012-02-20 Thread Noah Lavine
Done. I added two tests, for good measure :-). Noah On Sun, Feb 19, 2012 at 4:53 AM, Andy Wingo wi...@pobox.com wrote: On Sat 18 Feb 2012 17:20, Noah Lavine noah.b.lav...@gmail.com writes: Here is another patch that fixes the first of my examples. (let* ((x (random)) (y x)) (eq? x y)) now

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

2012-03-01 Thread Noah Lavine
If I understand correctly, you only need to call the continuation once. Is that right? In that case, I think you could use either catch and throw or prompts. (And catch and throw are implemented with prompts, so really, you can just choose how you want to use prompts.) Noah On Thu, Mar 1, 2012

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

2012-03-01 Thread Noah Lavine
)) #f music)) (lambda (key music) music))) Does that work? Noah On Thu, Mar 1, 2012 at 7:42 PM, David Kastrup d...@gnu.org wrote: Noah Lavine noah.b.lav...@gmail.com writes: On Thu, Mar 1, 2012 at 7:00 PM, David Kastrup d...@gnu.org wrote: Hi, I am just

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

2012-03-01 Thread Noah Lavine
Hello, IIRC, the stack copying in Guile's continuation implementation is inevitable. Though it's inefficient, the consideration is to cooperate with other languages such as C. It's inevitable in the general case, where the continuation might return multiple times. However, in this situation,

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

2012-03-01 Thread Noah Lavine
Hello, Sure, but things like gensym and make-prompt-tag (and (list '()) for creating an eq?-unique object) are artificial hygiene coming at a cost in symbol table and symbol generation time rather than lexical hygiene.  They need _extra_ work, whereas the call-with-current-continuation

Re: [PATCH] tree-il-scheme improvements

2012-03-01 Thread Noah Lavine
This is great! Thanks for improving this so much. Noah On Thu, Mar 1, 2012 at 6:40 PM, Mark H Weaver m...@netris.org wrote: I wrote: Here's a significantly refactored version of my 'tree-il-scheme' improvements. and here are the actual patches, with the psyntax-pp.scm portions removed.  

Re: Google Summer of Code 2012

2012-03-04 Thread Noah Lavine
I do not know if that idea is still valid. However, here are two more to add to that list: - Integration with Emacs. Guile has a very-nearly-complete implementation of Elisp. We'd like to get it to the point that it can actually run Emacs, and see if we can implement GNU's editor better than the

Re: The dynamic stack

2012-03-06 Thread Noah Lavine
Hello, The “dynwind stack” actually (I misread it the first time.) Yes, it did have this name before.  (More often, the wind list.)  But since dynwind is overloaded so much (dynamic-wind operator, dynwind, scm_dynwind_*), and the dynamic stack can have other things on it like prompts, I

Build Error in Master

2012-03-07 Thread Noah Lavine
When building the latest git master, I get this error: GUILEC language/tree-il/compile-glil.go Assertion failed: (table-n_items size), function rob_from_rich, file weak-table.c, line 252. Has weak-table.c changed recently? Noah

Re: [PATCH] primitive resolution for public refs

2012-03-12 Thread Noah Lavine
Hello, Are you sure this is correct? What if someone calls the module-set! function on that module between the definition and use of whatever function you're compiling? I agree very strongly that we need to be able to do this sort of optimization, but I think we might need some sort of caching

Re: [PATCH] primitive resolution for public refs

2012-03-12 Thread Noah Lavine
Hello, I don't think I've changed the correctness wrt `module-set!' and the like -- the current, private-refs-only optimization already exhibits the problem you describe: | scheme@(guile-user) (define old-car car) | scheme@(guile-user) (module-set! (current-module) I think (current-module)

Re: Build Error in Master

2012-03-12 Thread Noah Lavine
This problem went away for me when I made distclean and built the most recent master. I don't know why that fixed it. 2012/3/9 Ludovic Courtès l...@gnu.org: Hi Noah! Noah Lavine noah.b.lav...@gmail.com skribis: When building the latest git master, I get this error:   GUILEC language/tree

<    1   2   3   4   >