Re: truth of %nil

2009-06-30 Thread Daniel Kraft
Hi Neil, Neil Jerram wrote: Andy Wingo writes: Guile has treated %nil as false for quite some time: scheme@(guile-user)> ,o interp #t scheme@(guile-user)> (if %nil 1 2) $1 = 2 I'm sorry... you're completely right. Brain storm on my part. But then I don't understand the cause o

Emacs Lisp, macros

2009-07-14 Thread Daniel Kraft
Hi Andy and all, yesterday and today I implemented lambda expressions and defvar/defconst/defun for elisp as well as found a (hopefully good) solution to automatically create fluids not yet present on reference. With these additions and some basic built-ins (mainly arithmetic/numbers so far,

Re: Emacs Lisp, macros

2009-07-15 Thread Daniel Kraft
Ludovic Courtès wrote: as well as found a (hopefully good) solution to automatically create fluids not yet present on reference. Is each Elisp variable mapped to a fluid? Eventually, you may need VM instructions for fluid-{ref,set!}, to speed things up. Yes it is; and I agree that variable

%nil once again

2009-07-16 Thread Daniel Kraft
Hi, I think I got the test-suite as well as a basic macro implementation (the compiler framework is really cool, that was fairly easy to do); recursive macros do not yet work, but otherwise it looks fine. However, I want to tackle quasi-quotes (besides others) now; and in Elisp %nil is not o

Re: %nil once again

2009-07-17 Thread Daniel Kraft
Hi Neil, Neil Jerram wrote: Daniel Kraft writes: I think I got the test-suite as well as a basic macro implementation (the compiler framework is really cool, that was fairly easy to do); recursive macros do not yet work, but otherwise it looks fine. However, I want to tackle quasi-quotes

Re: %nil once again

2009-07-19 Thread Daniel Kraft
Hi Neil, Neil Jerram wrote: Daniel Kraft writes: scheme@(guile-user)> (null? %nil) #f scheme@(guile-user)> (equal? %nil (cdr (list 1))) #f I believe those work in the interpreter, and so are VM bugs. Can you check that with ,o interp #t ? The first one is indeed #t with the inter

Re: %nil once again

2009-07-20 Thread Daniel Kraft
Ken Raeburn wrote: On Jul 19, 2009, at 16:10, Neil Jerram wrote: BTW, I implemented also the function bindings of symbols using this fluid-based dynamic scoping at the moment -- but on second thought, there's no scoping at all for function slots (all are global), is there? No, I don't think th

Elisp flet construct

2009-07-20 Thread Daniel Kraft
Hi all, in the %nil thread a suggestion was brought up to support the `flet' construct (and `flet*' as well, if we choose to do so at all, I favour) in Guile's upcoming elisp implementation that behaves just like a let for function-slot bindings, enabling dynamic scoping for them. It is no "

Re: Elisp flet construct

2009-07-21 Thread Daniel Kraft
Daniel Kraft wrote: in the %nil thread a suggestion was brought up to support the `flet' construct (and `flet*' as well, if we choose to do so at all, I favour) in Guile's upcoming elisp implementation that behaves just like a let for function-slot bindings, enabling dynamic s

Re: Elisp flet construct

2009-07-21 Thread Daniel Kraft
Hi Ken, Ken Raeburn wrote: On Jul 21, 2009, at 09:10, Daniel Kraft wrote: Just a little addition to the subject of extensions: I'd very much like to add lexical-let and lexical-let* as another set of extensions, because this gives the possibility to use "fast" lexical variabl

Elisp lexical-let

2009-07-21 Thread Daniel Kraft
Hi again, I just had some doubts about the details of lexical-let for elisp, which seem to be not answered by the document I linked to... Maybe you can clarify these to me. Especially, the question is about "what happens" when a lexical variable is inside its scope again bound dynamically (

Re: Elisp lexical-let

2009-07-22 Thread Daniel Kraft
Ken Raeburn wrote: On Jul 21, 2009, at 15:48, Daniel Kraft wrote: Especially, the question is about "what happens" when a lexical variable is inside its scope again bound dynamically (say via let or a lambda expression). Oh, don't stop there... let's get some buffer-

Re: Elisp lexical-let

2009-07-22 Thread Daniel Kraft
Hi Marijn, Marijn Schouten (hkBst) wrote: Guile also has lexical and dynamic variables; the fluids[1]. Queinnec in his book LiSP also describes a system that has (default) lexical and dynamic variable, on page 44. In both cases to find the value of a non-default variable a function is used. Tran

Re: Elisp lexical-let

2009-07-23 Thread Daniel Kraft
Ken Raeburn wrote: On Jul 22, 2009, at 05:11, Daniel Kraft wrote: It seemed really hard to me to find at least *basic* information about how the lexbind things works; I did build now an emacs with lexbind from trunk, but so far as I see this is not meant to implement "lexical-let"

Re: Elisp lexical-let

2009-07-23 Thread Daniel Kraft
Hi, thanks for your comments; I'm still a bit confused, though :$ Marijn Schouten (hkBst) wrote: What's about this: (defun test () a) (let ((a 1)) (print a) ; 1 (print (test)) ; 1 (lexical-set! a 2) there is only one variable `a' in my mental model, so this changes the value of the only

Re: %nil once again

2009-07-23 Thread Daniel Kraft
Hi Andy, thanks for your comments! Andy Wingo wrote: Reviewing (and merging as much as possible of) your elisp branch is my next Guile task, after taking care of that bug recently reported by Martin Ward. Should be short work at this point. Cool! But just take your time ;) At least, is the

Re: Elisp flet construct

2009-07-23 Thread Daniel Kraft
Andy Wingo wrote: in the %nil thread a suggestion was brought up to support the `flet' construct (and `flet*' as well, if we choose to do so at all, I favour) in Guile's upcoming elisp implementation that behaves just like a let for function-slot bindings, enabling dynamic scoping for them. It i

Re: Elisp flet construct

2009-07-23 Thread Daniel Kraft
Andy Wingo wrote: On Tue 21 Jul 2009 15:10, Daniel Kraft writes: Just a little addition to the subject of extensions: I'd very much like to add lexical-let and lexical-let* as another set of extensions, because this gives the possibility to use "fast" lexical variables with

Re: Elisp lexical-let

2009-07-23 Thread Daniel Kraft
Andy Wingo wrote: I'll keep in mind also the lexbind idea of optionally making every binding lexical. Andy, can you give me a hint/example/pointer how compiler options work? This would be exactly the place to provide this, I think. Additionally we could add an option to remove the "variable is

Re: Emacs Lisp, macros

2009-07-24 Thread Daniel Kraft
Andy Wingo wrote: 1) As you suggested, try doing some parts of this with new VM operations. Like all of these in one op, or maybe just a "reference and error on void" as one op, and/or "lookup the variable in some module, and create it if not there" as another. I think we need some planning to

Re: Elisp lexical-let

2009-07-24 Thread Daniel Kraft
Hi Andy, thanks for the clarifications! It's actually fairly simple, imo. Alpha-equivalence says that (lexical-let ((x a)) x) is the same as (lexical-let ((y a)) y). (Note that this lexical-let corresponds to Scheme's let.) So your program is the same as: (lexical-let ((y 2)) y ; -> 2 (fo

lexical-let detail semantics

2009-07-27 Thread Daniel Kraft
Hi, I'm working on an implementation of elisp for GNU Guile, and want to include the lexical-let construct from the Common Lisp Extensions of elisp. There are some details of its semantics I'm not sure about and that are not clarified in the documentation of lexical-let, so I had to do some

Elisp performance

2009-07-29 Thread Daniel Kraft
Hi all, as promised, here are some performance results for the current elisp compiler. BTW, it supports now to disable checks for void-value on variable access via compiler options as well as the lexical-let/lexical-let* constructs that should mimic the ones from emacs' cl package (but in em

Re: %nil once again

2009-07-30 Thread Daniel Kraft
Hi Neil, Neil Jerram wrote: The only downside I can see to this is that if code were to be ported from elisp to Scheme there would now be code that assumed a '() return as false when #f would be false, but this could be fixed using a predicate like elisp-false? (or null-or-false? or ... somethin

Re: %nil once again

2009-07-30 Thread Daniel Kraft
Neil Jerram wrote: Andy Wingo writes: Other things needed would be for instance terminating rest-arguments by %nil rather than '() and the like. Why is that needed? I.e. Why is it important for a rest argument to be terminated with %nil instead of with () ? Well, I don't think it is "impo

Re: Elisp performance

2009-07-30 Thread Daniel Kraft
Ken Raeburn wrote: Obviously, it would help a lot to do so. On the other hand, switching to primitive-ref's would help even more, but I fear we can not easily do so, because we can not know if a symbol targets a primitive or was rebound at compile time... BTW, a quick test with Scheme: [

Re: Elisp performance

2009-07-30 Thread Daniel Kraft
Hi Neil, Neil Jerram wrote: Daniel Kraft writes: Lambda arguments are still always dynamically bound, which is quite a pity as it inhibits tail-call optimization; This prompted me to wonder if using fluids is the best way to implement dynamic binding. Perhaps I'm forgetting something

Re: Elisp performance

2009-07-30 Thread Daniel Kraft
Ken Raeburn wrote: > And maybe that's enough. There's other stuff in Emacs besides variable bindings that would require dynamic-wind support, like flet, save-excursion (preserves current buffer and position), with-output-to-string and with-output-to-temp-buffer (preserve 'standard-output'), a

Re: `(language elisp spec)' broken in `master'

2009-07-31 Thread Daniel Kraft
Hi Ludo, Ludovic Courtès wrote: `(language elisp spec)' is broken in `master', but I guess that's because Daniel's elisp branch is where things happen. Anyway, just in case, here are the issues: you're right, I think all I did ever do on elisp is on the branch -- module/language/elisp and sp

Re: Elisp performance

2009-07-31 Thread Daniel Kraft
Hi Ken, Ken Raeburn wrote: On Jul 31, 2009, at 02:02, Daniel Kraft wrote: Iterative prime sieve, (length (find-primes-to 5000)): Scheme: 0.42s Elisp, no void checks, lexical let: 3.40s Elisp, no void checks, dynamic let: 4.43s Elisp, void checks, dynamic let: 5.12s Elisp, void checks

Some more elisp aspects: Reader and documentation

2009-08-01 Thread Daniel Kraft
Hi Andy and all, as the main elisp compiler gets more and more complete (well, still a lot details missing as well as probably even most built-ins, but anyways), I think I'll also work on a real elisp reader (currently, Guile's Scheme reader is used) as well as some (internals) documentation

Re: Elisp performance

2009-08-04 Thread Daniel Kraft
Andy Wingo wrote: Daniel Kraft writes: Lambda arguments are still always dynamically bound, which is quite a pity as it inhibits tail-call optimization; Indeed, a pity. Though self-tail calls can be optimized... still, irritating. Yes, but I fear this will complicate the compiler a lot

Re: Elisp performance

2009-08-04 Thread Daniel Kraft
Andy Wingo wrote: Don't conjecture, profile ;-) I'd like to do so, but it seems that Guile does not include a profiler, does it? A search turned up some patch/code, but I didn't get the impression it would work very well -- do you have some hints, getting some real profiling would be very u

Re: Updated Guile Tutorial

2009-08-13 Thread Daniel Kraft
:), so perhaps it would work as "Guile Tutorial, by Daniel Kraft" :) That's something I usually also try to achieve in writings "like that" -- however, I liked the original's style and tried to get my own version in the same spirit. Here, I'm not sure if I

Re: Some more elisp aspects: Reader and documentation

2009-08-17 Thread Daniel Kraft
Hi Ludo, Ludovic Courtès wrote: Sorry for the late reply. no problem, thanks for the reply! I had a lot of other stuff to do anyways, and so didn't really get into the situation of waiting for a reply here ;) 2) Write a seperate elisp reader, possibly in Scheme (but could be C as well if

Re: Some more elisp aspects: Reader and documentation

2009-08-17 Thread Daniel Kraft
Hi Ludo, 2) Write a seperate elisp reader, possibly in Scheme (but could be C as well if that's important for performance). This helps us keep "both" readers clean and seperate, but all has to be done from ground up and the code is probably slower (when written in Scheme). This sounds like the

Status Update, Elisp Compiler

2009-08-19 Thread Daniel Kraft
Hi Andy, I'm off from tomorrow until Sunday, and as GSoC seems to 'officially' have ended, I wanted to give you a brief update on my status and plans: Well, as to the status of the elisp compiler, you probably know -- it basically works, just missing are a lot of built-ins and some special st

Elisp Reader

2009-08-27 Thread Daniel Kraft
Hi all, yesterday and today I implemented the promised elisp reader and just pushed the changes. Now Guile's elisp support in my branch should be somewhat "complete" because not only there's a compiler but also a genuine parser for elisp, handling for instance the [] vectors, all those fancy

guile-devel@gnu.org

2009-08-28 Thread Daniel Kraft
Hi Andy, Andy Wingo wrote: Awesome work on the reader! And awesome work in general. I met Neil and Ludovic last weekend, and we're all super-plussed about your work. I'm glad to hear that :) I want to get Mark's nil patch merged in, then start merging your work to master. We need to get it t

Re: Status Update, Elisp Compiler

2009-09-06 Thread Daniel Kraft
Mark H Weaver wrote: Daniel Kraft wrote: 4) I've not done anything yet regarding converting '() -> %nil in lists that are seen from elisp; I think the final conclusion was that we want such a conversion, and so I will do that. But maybe I can try if it is reasonably poss

Re: Updated Guile Tutorial

2009-09-20 Thread Daniel Kraft
Neil Jerram wrote: Daniel Kraft writes: Hi Andy and all, here's the promised revised version of my Guile tutorial; Hi Daniel, I've now added this to the Guile web pages, and linked to it from http://www.gnu.org/software/guile/docs/docs.html. Sorry for taking so long about it.

Status on Elisp and special variable handling

2009-10-06 Thread Daniel Kraft
Hi all, it's been some time since I last worked on guile/elisp, but I hope to get back to it soon (gcc recently went to bug-fix only mode before the next release and I wanted to implement some stuff before the dead-line over the last weeks). Andy, what's your status on looking through my eli

Re: Status on Elisp and special variable handling

2009-10-07 Thread Daniel Kraft
Ken Raeburn wrote: On Oct 6, 2009, at 16:05, Daniel Kraft wrote: If any such value is hit when reading/setting a variable, we do the needed stuff for handling aliases/foolocal variables instead of doing the operation directly. While this should work, I fear that it hits performance once

Re: upcoming patches

2009-10-19 Thread Daniel Kraft
Hi Andy, Andy Wingo wrote: 3) Merge Daniel's work This will involve some updating for the case-lambda tree-il changes, but the ecmascript and brainfuck changes have not been difficult to make. I've not yet done so but plan to keep on working there with some stuff (as I alrea

Getting BDW-GC

2009-11-11 Thread Daniel Kraft
Hi all, I'm probably very stupid on this, but I wanted to finally build a new version of guile again to make elisp work with it -- but it fails because bdw-gc is missing. So I wanted to install that package and found the bdwgc project on sourceforge (nothing else which seems like it); but th

Re: Getting BDW-GC

2009-11-14 Thread Daniel Kraft
Ludovic Courtès wrote: Hello, Daniel Kraft writes: [/usr/src]# cvs -d:pserver:anonym...@bdwgc.cvs.sourceforge.net:/cvsroot/bdwgc login Logging in to :pserver:anonym...@bdwgc.cvs.sourceforge.net:2401/cvsroot/bdwgc CVS password: cvs login: authorization failed: server bdwgc.cvs.sourceforge.net

Re: Potential Lua implementation for Guile?

2010-03-11 Thread Daniel Kraft
Neil Jerram wrote: No Itisnt writes: I want to apply for GSOC this year. Since Guile has recently obtained a compilation/language framework, I was thinking that an implementation of the Lua language for Guile, under the auspices of the GNU Project, would be a good fit. Yes, I think that's a

Re: guile-emacs for gsoc

2010-04-07 Thread Daniel Kraft
Hi Brian, Brian Templeton wrote: I'm preparing Summer of Code applications and am considering working on Emacs-Guile integration. Here's my understanding of the current situation, from skimming list archives, source code, etc.: this sounds great! I did the current elisp implementation in last

Re: our nil story

2010-04-16 Thread Daniel Kraft
Hi Andy, sounds good! With regards to some elisp details (like dynamic binding or others), IIRC there's still some info about implementation details and other stuff that may be interesting in the module/languages/elisp/README file. You probably are aware of it anyway, though ;) Yours, Dan

Re: Updated Guile Tutorial

2010-08-21 Thread Daniel Kraft
Hi Andy, Andy Wingo wrote: Daniel Kraft writes: here's the promised revised version of my Guile tutorial; I've now added this to the Guile web pages, and linked to it from http://www.gnu.org/software/guile/docs/docs.html. Sorry for taking so long about it. Please let me know i

Re: Updated Guile Tutorial

2010-09-07 Thread Daniel Kraft
I forgot to CC, so here again. Original Message Subject: Re: Updated Guile Tutorial Date: Tue, 07 Sep 2010 15:15:34 +0200 From: Daniel Kraft To: Andy Wingo References: <4a7b223e.6050...@domob.eu> <4a92b446.2090...@domob.eu> <87tyyxsheh@os

Re: About the old Guile tutorial

2010-09-11 Thread Daniel Kraft
Anton Vidovic wrote: Hello all, I've noticed that you removed the old tutorial from the website because it used 1.6 APIs. I think you should keep it visible on the main website for several reasons: 1. gunplot, as nice it is, and I basically use it daily, is not a GNU package. 2. It is not GPL

Issuing deprecation warnings

2008-12-28 Thread Daniel Kraft
Hi, I've just tried to build latest-git guile with --disable-deprecated (full configure was --enable-maintainer-mode --disable-nls --disable-deprecated), and it refuses to compile because (at least) in libguile/gc-mark.c a deprecation warning is issued without checking if deprecation is enabl

Re: Issuing deprecation warnings

2008-12-28 Thread Daniel Kraft
2008-12-28 Daniel Kraft * configure.in (enable_deprecated): Set SCM_WARN_DEPRECATED_DEFAULT even when --disable-deprecated is passed. * libguile/deprecation.h: Declare deprecation-issuing methods even if SCM_ENABLE_DEPRECATED is not set. * libguile/dep

Copyright assignment

2009-03-25 Thread Daniel Kraft
Hi Ludovic and others, I got finally my copyright assignment processed! I will resubmit the patch I posted here some months ago when I find time to do so :) Yours, Daniel

Patch: Some work towards making --disable-deprecated compile

2009-03-28 Thread Daniel Kraft
;ve got a seperate patch (but we could merge those, depending on your opinion). Even then it does not build correct, but that seems to be a problem with the manual; I will try to investigate here, too. Yours, Daniel 2009-03-28 Daniel Kraft * configure.in (enab

GSoC: Emacs Lisp support for GNU Guile

2009-03-31 Thread Daniel Kraft
interesting but they needed to find a mentor / mentors for this project; what do you (Emacs and Guile people) think about it? Thank you very much for your ideas! Daniel Your name: Daniel Kraft Your email address: d...@domob.eu Package name and title of the project: GNU Guile -- implement

Re: GSoC: Emacs Lisp support for GNU Guile

2009-04-01 Thread Daniel Kraft
Andy Wingo wrote: Hi Daniel, On Tue 31 Mar 2009 12:44, Daniel Kraft writes: as already discussed briefly with the Guile guys behind the new VM thing, I got the idea to implement Emacs Lisp as supported language for the Guile VM system. This sounds great! I'd love to assist. As the f

Re: Patch: Some work towards making --disable-deprecated compile

2009-04-07 Thread Daniel Kraft
Ludovic Courtès wrote: here's my patch from last december to fix some internal inconsistencies that prevented guile from compiling with --disable-deprecated at that time. I've now my copyright assignment in place, so when it is ok you could commit it at any time. The patch is updated to the cur

GHIL Locations

2009-05-19 Thread Daniel Kraft
Hi Andy and all, I have a question regarding compiling to GHIL: When calling functions like (make-ghil-something) there are always these two parameters environment and location to pass. For location, I did so far always use #f and it works quite well. However, I guess there's some use for t

Brainfuck experimental compiler

2009-05-27 Thread Daniel Kraft
Hi all, Neil Jerram wrote: 2009/5/27 Neil Jerram : I also had a response from Jim Meyering, about using git reflog to find and reconstruct an accidentally deleted head. I haven't fully understood that yet, but in any case I'm sure now that my worry was unfounded. So let's go ahead with write

Brainfuck branch

2009-06-06 Thread Daniel Kraft
Hi all, I just re-pushed the brainfuck branch (but should contain not much new as compared to the last push) after the savannah break-down. I think it should have gotten right this time, too, but I again had to struggle a bit with git ;) BTW, it seems that I "accidentally" included syncase-

Emacs Lisp revived

2009-06-09 Thread Daniel Kraft
Hi all, I finally started real work on implementing the elisp compiler and just pushed a first start-off code to branch elisp. It is however not yet usable for anything, but also already has some very few things done. Some important points I'd like to mention and welcome comments: 1) In imp