Lightning Bindings

2010-05-28 Thread Noah Lavine
available as a regular module in addition to using it to speed up the language.) My current prototype just mimics the Lightning API, but it's not necessarily the best way to do this. Is there a better way? Thank you Noah Lavine

Re: Lightning Bindings

2010-05-28 Thread Noah Lavine
reason I bring it up is because it seems to be more popular than Lightning and already has some third-party language bindings. On Thu, May 27, 2010 at 4:03 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Dear Guile Developers, After watching the discussion of native code generation on this list

Re: Lightning Bindings

2010-05-31 Thread Noah Lavine
Hi Ludo, I didn't realize guile-lightning existed! It looks like that project already has most of the code for Lightning bindings, so it might be better to try to update it to work with Guile 2.0. I also saw your idea for JIT, which I could work on as well. However, all three projects use

Re: Lightning Bindings

2010-06-01 Thread Noah Lavine
On Tue, Jun 1, 2010 at 5:06 AM, Andy Wingo wi...@pobox.com wrote: Hi Noah, Hi Andy! I feel quite strongly that the calling convention for native code should be the same as that of bytecode, and that it should use the same stack. This way we don't have to maintain separate stack walkers or

Re: Lightning Bindings

2010-06-01 Thread Noah Lavine
is trying to replace. We could offer them a well-tested, more-feature-complete extension language, and they could offer us interfaces to good code generation. Noah On Sat, May 29, 2010 at 4:09 PM, Thien-Thi Nguyen t...@gnuvola.org wrote: () Noah Lavine noah.b.lav...@gmail.com () Thu, 27 May

Re: Lightning Bindings

2010-06-01 Thread Noah Lavine
They claim that MELT is tightly integrated with GCC, but after reading http://gcc.gnu.org/wiki/MiddleEndLispTranslator, I don't believe it. The MELT compiler implementation description suggests that it's a pretty simple-minded sexp-to-C translator. I also notice that none of the examples has

Allocating Executable Memory

2010-06-05 Thread Noah Lavine
This issue is somewhat related to the question of how to build a JIT, but will also apply later when we try to attach GCC or some other system to Guile. The question is, how does one modify the Guile memory allocation system so that you can request that some memory be executable? You could make

Re: Adding New C Files

2010-06-15 Thread Noah Lavine
, Andy Wingo wi...@pobox.com wrote: On Sun 13 Jun 2010 16:26, Noah Lavine noah.b.lav...@gmail.com writes: How does one add new C files to libguile? Look for e.g. all the lines that start with alist. in the Makefile.am, and copy them to your new file. If you don't use SCM_DEFINE et al, you might

Re: Adding New C Files

2010-06-17 Thread Noah Lavine
what this might be? Thanks Noah On Tue, Jun 15, 2010 at 4:34 PM, Andy Wingo wi...@pobox.com wrote: On Tue 15 Jun 2010 16:06, Noah Lavine noah.b.lav...@gmail.com writes: I've tried this, but I still get the error. Currently my files are in every long list of files (.c, .doc, .x, and .h), and I

Static Asserts

2010-06-19 Thread Noah Lavine
Hello, I discovered that my previous build failure was not because of a Makefile issue but because my modifications had changed the size of struct scm_objcode, which broke other parts of the program. I found several files where structs are cast from bytes using #define'd values, which are most

[PATCH] Verify size of object code headers.

2010-06-20 Thread Noah Lavine
Add static checks to make sure that the statically-generated object code headers in continuations.c, control.c, foreign.c, gsubr.c and smob.c are the same length as the struct scm_objcode data type in objcodes.h. --- libguile/continuations.c |4 libguile/control.c |3 +++

Re: [PATCH] Verify Size of Objcode Headers

2010-06-20 Thread Noah Lavine
Thanks for the corrections. I think this patch addresses them. Noah Add static checks to make sure that the statically-generated object code headers in continuations.c, control.c, foreign.c, gsubr.c and smob.c are the same length as the struct scm_objcode data type in objcodes.h. ---

Troubles with Objcode and Storing JIT Pointers

2010-06-21 Thread Noah Lavine
Hello all, I have hit a snag in my attempt to add a JIT backend to Guile: I don't know where to store the JITed code. There was a discussion of this a few weeks ago in which it was decided to try to make a simple and quick JIT engine that would be invisible to Scheme, hoping to eventually make a

Why Ice-9?

2010-07-09 Thread Noah Lavine
I am not completely sure this is the right place to ask this, but why do many of the module names in Guile start with 'ice-9'? I can tell you that as a newcomer this is quite unintuitive. Noah

C Struct Interface

2010-07-11 Thread Noah Lavine
Hello, I'm trying to use Scheme structures, as defined in struct.c and struct.h, and I have a question about the interface. It seems from the code that scm_c_make_structv(vtable, ntail, ninit, inits) is the main function for creating structs. I'm assuming that ntail is the number of elements in

Re: Storing JIT Code

2010-08-19 Thread Noah Lavine
Very interesting patches. They are a good start. Have you gone further with them? Thanks! I'm trying to, but it's not working yet. (Currently it'll print Jit code called! a couple times and then segfault.) We should be able to coalesce the fd field of objcode with parent, as they are

An Error in Early Boot

2010-10-14 Thread Noah Lavine
Hello, I got into a situation just now when Guile was generating an error very early in the boot process (it was loading some objcode from scm_init_eval_in_scheme(), I think, although I haven't looked enough to be sure). The fun part is, instead of printing an error message, it got into an

Re: An Error in Early Boot

2010-10-14 Thread Noah Lavine
wrote: From: Noah Lavine noah.b.lav...@gmail.com Hello, I got into a situation just now when Guile was generating an error very early in the boot process (it was loading some objcode from scm_init_eval_in_scheme(), I think, although I haven't looked enough to be sure). The fun part

A Working (but Minimal) JIT

2010-10-21 Thread Noah Lavine
to have after people decide that the general design is what Guile needs.) So, this is a possible way to get a JIT engine in Guile. What do people think of it? Noah Lavine

[PATCH] LALR Parser Documentation Fix

2010-10-26 Thread Noah Lavine
The documentation for the LALR parser currently says that the tokenizer procedure passed to the parser should be a unary procedure taking a port, but the documentation at http://code.google.com/p/lalr-scm/wiki/ParserDefinition says it should be a thunk. The following patch fixes this: Noah diff

Re: [PATCH]

2010-10-27 Thread Noah Lavine
*eoi* is what the LALR parser generator would need as input, so it seems more consistent with the Guile API to make it return '*eoi*. Noah On Wed, Oct 27, 2010 at 2:27 PM, Neil Jerram n...@ossau.uklinux.net wrote: I have a program that calls (read-elisp) in a loop, to read in a BBDB file.  

Re: A Working (but Minimal) JIT

2010-10-27 Thread Noah Lavine
Hello! Interesting.  Dealing with end-of-buffers situation is indeed tricky with lightning, and register allocation is lacking (I thought this wouldn’t necessarily be a problem because we can do a reasonable job with a fixed set of statically allocated registers.) That seems true, yes. Given

Re: The progress of hacking guile and prolog

2010-11-03 Thread Noah Lavine
Hello all, Not to derail the thread of discussion, but I've had an idea for a feature bouncing around that I think might hook into this. I think that Guile should offer optional static checking - not just of types, but of everything that we can check. It could be used partly for optimization, but

Re: The progress of hacking guile and prolog

2010-11-11 Thread Noah Lavine
Hello, I think that we have similar synaptical fireworks here. The actual implementation and syntax should be a result of understanding the line of reasoning in these theorem povers and checkers. So let my try to explain what I'm heading. I will try to write a little about where I am in a few

Re: The progress of hacking guile and prolog

2010-11-11 Thread Noah Lavine
of Scheme to this language). I was thinking of something more like register transfer language, so the compiler will be very simple. Noah On Thu, Nov 11, 2010 at 11:26 AM, Ludovic Courtès l...@gnu.org wrote: Hi, Noah Lavine noah.b.lav...@gmail.com writes: On a completely different note, I'm now

Re: The progress of hacking guile and prolog

2010-11-11 Thread Noah Lavine
Interesting.  I thought you were going rather to compile a subset of Scheme to C, which could be used to implement VM instructions, no? Yes, that was my plan, sorry. I want to compile things to C, not from C to machine code. Also, to clarify, I am looking at compiling not a subset of C, but

Loading R6RS Libraries

2010-11-14 Thread Noah Lavine
Hello all, I encountered some behavior I didn't expect, and I'm not sure if it's intended or not. The following code works fine: (use-modules (rnrs base)) However, the next two lines both give errors: (use-modules (rnrs base (6))) (use-modules (rnrs base 6)) I didn't expect this because the

Re: The progress of hacking guile and prolog

2010-11-23 Thread Noah Lavine
not possible in general, but I think it will work for a subset of procedures that will include some interesting ones.) Noah On Sat, Nov 20, 2010 at 6:25 AM, Andy Wingo wi...@pobox.com wrote: Hi Noah, On Thu 04 Nov 2010 03:40, Noah Lavine noah.b.lav...@gmail.com writes: I think that Guile

Re: The progress of hacking guile and prolog

2010-11-26 Thread Noah Lavine
Hello, Though I’d recommend working on JIT for Guile before you get stuck in a meta-circular Curry-Howardish enlightenment period.  :-) I agree. :-) Noah

Introducing Jitgen

2010-11-28 Thread Noah Lavine
Hello all, Attached is the first version of Jitgen, a system for writing virtual machines and matching JIT compilers without so much duplicated code. It's pretty rough, but I wanted to see what you thought of this version and ask for comments. The problem it's trying to solve is that if I made a

Re: A Working (but Minimal) JIT

2010-11-28 Thread Noah Lavine
Hi, I am concerned about complexity. I agree that complexity is a problem. I just sent an email about Jitgen, which is something I cooked up to reduce code duplication. However, I can't tell if it's going to end up reducing code complexity or increasing it. What do you think? So what I would

Re: A Working (but Minimal) JIT

2010-11-28 Thread Noah Lavine
); or something. That seems easy enough. Noah On Sat, Nov 20, 2010 at 8:37 AM, Andy Wingo wi...@pobox.com wrote: Hi, On Fri 22 Oct 2010 06:29, Noah Lavine noah.b.lav...@gmail.com writes: After not emailing for a while, I have some good news: a JIT engine is working! Great news! I have

Re: A Working (but Minimal) JIT

2010-12-01 Thread Noah Lavine
Hello, I need to apologize for some temporary insanity when I wrote that last post. I do know a way to get JITed code working correctly with tail calls. It's not quite as efficient as I would like, but it's decent. We have the JITed code be a C function that returns an enum to indicate what the

Request for Latest Gnulib

2010-12-19 Thread Noah Lavine
Hello all, I had a build error in Guile a few days ago. I did some Git bisecting and tracked it down to the last time Gnulib was updated. I emailed the Gnulib mailing list, and it turned out there was a typo in one of the Gnulib configuration scripts that is now fixed in the latest git version of

Re: How does one specify linking to 64 bit libraries when there is a choice?

2010-12-19 Thread Noah Lavine
. Therefore, I have this question for you - are you able to configure Guile to use 64-bit libs using the configure script? Noah Lavine On Fri, Dec 17, 2010 at 3:10 PM, Bruce Korb bruce.k...@gmail.com wrote: Hi Nelson, I am nearly certain we (you) have reached a point where libtool folks are going

Re: How Do I Debug a Boot Error?

2010-12-20 Thread Noah Lavine
to make it give better messages. Noah On Mon, Dec 20, 2010 at 5:52 PM, Andy Wingo wi...@pobox.com wrote: Hi Noah, On Fri 17 Dec 2010 20:33, Noah Lavine noah.b.lav...@gmail.com writes: ;;; compiling /Users/noah/Desktop/guile/guile/module/language/objcode/spec.scm guile: uncaught throw

Add Native Code Pointer to Objcode

2010-12-20 Thread Noah Lavine
Hello all, The attached patch compresses the objcode representation a bit, then adds space for a native code pointer. The whole thing ends up being four words, as it is now. The patch depends on this idea, so please let me know if it is wrong: the current objcode representation uses its last two

Re: ECMAScript support broken?

2011-01-02 Thread Noah Lavine
Hi all, I looked at this. For the first error, I think the bug is in (language ecmascript compile-tree-il), where the file around line 369 says: ((object . ,args) (@impl new-object (map (lambda (x) (pmatch x

Re: ECMAScript support broken?

2011-01-02 Thread Noah Lavine
Hello again, Second problem solved as well. The attached patch fixes both issues. Anything else you notice being wrong with ecmascript? (I mean our implementation of it, of course ...) Noah On Sun, Jan 2, 2011 at 10:19 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Hi all, I looked

Re: ECMAScript support broken?

2011-01-04 Thread Noah Lavine
Yes, I agree. On Tue, Jan 4, 2011 at 11:52 AM, Kan-Ru Chen ka...@kanru.info wrote: Hi, Noah Lavine noah.b.lav...@gmail.com writes: Hello, Here's a new version. I think the commit message is better - please let me know if this is not right. There's also a test for it. +       `(apply

Re: Sputnik test result (was Re: ECMAScript support broken?)

2011-01-11 Thread Noah Lavine
Hello, The attached patch should add support for ECMAScript unicode literals. Noah On Tue, Jan 4, 2011 at 4:23 AM, Kan-Ru Chen ka...@kanru.info wrote: Hi, Noah Lavine noah.b.lav...@gmail.com writes: If you mean give guile a '.js' file have it interpret that with ecmascript, then I think

Re: Sputnik test result (was Re: ECMAScript support broken?)

2011-01-11 Thread Noah Lavine
And this fixes an error that came because Unicode 00A0 (no-break space) is supposed to be considered whitespace in ECMAScript. Noah On Tue, Jan 11, 2011 at 5:33 PM, Noah Lavine noah.b.lav...@gmail.com wrote: This patch fixes a lot of the unexpected token: rbrace errors that had been messing up

Re: Sputnik test result (was Re: ECMAScript support broken?)

2011-01-11 Thread Noah Lavine
And this fixes hexadecimal constants. Guile now parses all Sputnik tests for numeric literals. Noah On Tue, Jan 11, 2011 at 5:59 PM, Noah Lavine noah.b.lav...@gmail.com wrote: This parses decimal numbers with leading zeros correctly. Noah On Tue, Jan 11, 2011 at 5:45 PM, Noah Lavine

Re: rfi: hash set

2011-01-14 Thread Noah Lavine
Hello, I started looking into implementing this, and I ran into something strange that I'd like clarification on. Am I correct in saying that currently, hash tables can only shrink by one size index when they are rehashed? I think this because of hashtab.c, line 293. This is a part of

Re: PEG Parser

2011-01-23 Thread Noah Lavine
Hello all, It should have produced $top_builddir/guile.info, which can be used as input to LCOV to generate an HTML code coverage report (http://ltp.sourceforge.net/coverage/lcov.php). Oh, that worked. The current tests check 92.6% of the lines in peg.scm, and 90.7% of the functions. I looked

Re: Sputnik test result (was Re: ECMAScript support broken?)

2011-01-26 Thread Noah Lavine
Hi, I finally applied them and wrote the test cases by myself. Thanks a lot! Thanks again for the patches, but please do write test cases next time. I will do that. Sorry for the delay - I've been quite busy lately, and basically all of my Guile mail has been sitting in my inbox waiting to

Re: PEG Parser

2011-01-26 Thread Noah Lavine
Hello, I'm the guy that originally wrote this for GSOC, so I figured I'd jump in.  I'd be happy to help with getting the PEG module merge-ready. Great! keyword-flatten is described in api-peg.texi.  It's basically a special case of context-flatten which collapses S-expressions according to

Re: PEG Parser

2011-01-26 Thread Noah Lavine
Hi, It flattens until you have a list where each element either: 1. Is an atom. or 2. Is a list whose first element is in the list of keywords. So the car of the argument will change if it's a list that doesn't start with the right keyword.  E.g.: (keyword-flatten '(a) '((c (a b)) (a b) (b

Re: Add Native Code Pointer to Objcode

2011-01-27 Thread Noah Lavine
Great! Noah On Thu, Jan 27, 2011 at 7:12 AM, Andy Wingo wi...@pobox.com wrote: On Tue 21 Dec 2010 04:09, Noah Lavine noah.b.lav...@gmail.com writes: The attached patch compresses the objcode representation a bit, then adds space for a native code pointer. The whole thing ends up being four

Re: Sputnik test result

2011-01-27 Thread Noah Lavine
Hi all, When I was looking at this a while ago, it looked like a big issue (possibly *the* big issue) with Guile's parser is that it doesn't do automatic semicolon insertion. (In Javascript, semicolons are optional in certain contexts, when the place where the semicolon would be is followed by a

Re: PEG Parser

2011-01-27 Thread Noah Lavine
Hello again, I've run into another issue with the parser that should be addressed in the documentation (or the code?). How do you match a character that is used in the PEG grammar, like [? Can you only define such matchers via s-expressions? Noah On Thu, Jan 27, 2011 at 12:17 AM, Noah Lavine

Scheme Implementers

2011-01-28 Thread Noah Lavine
Hello all, This is unusual as it is not really a Guile-specific message, but I was reading recently about the r7rs process and then about SRFIs, and I had an idea. I think there should be a mailing list for people who implement Schemes, to sort of coordinate our non-standard features. For

Re: Native Code Again

2011-01-28 Thread Noah Lavine
Him Therefore, I think the path to a native-code VM is to leave the VM as it is (except maybe reserve an opcode for native-code calls). Then I write first a C parser for Guile and then a converter program that would take Guile's current VM and output a JIT VM like I've described. Hah, it

Re: [PATCH] First batch of numerics changes

2011-01-28 Thread Noah Lavine
Hello all, I hope to not derail this much (if at all), but I just did some checking, and I believe the following proposal was accepted as R7RS' integer division functions. So it might be worth making Guile's like that if we can. http://trac.sacrideo.us/wg/wiki/DivisionRiastradh Noah On Fri,

Re: PEG Parser

2011-01-28 Thread Noah Lavine
Hello, Indeed!  I'm looking forward to having it in Guile. Great! I don't intend to be pressuring you to merge it, by the way. I hope my message didn't come across that way. The reason I didn't merge it yet was twofold: (1) the commit logs were not in the standard style, and (2) I wasn't

Difference Between REPL and Script Usage?

2011-01-29 Thread Noah Lavine
Hello all, I have encountered a strange behavior in Guile, and I'm not sure what to do about it. It happened when I was trying to test peg.scm. I ran the test like this: ./check-guile peg.test Testing /Users/noah/Desktop/guile/guile/meta/guile ... peg.test with

[PATCH] Possible Documentation Fix

2011-01-29 Thread Noah Lavine
Hello all, I was recently reading the syntax-case documentation (as part of my project to make peg.scm use syntax-case), and I hit a paragraph that I found difficult to understand. I think I figured out what it means. The attached patch changes the paragraph to something that I think would have

Re: PEG Parser

2011-01-29 Thread Noah Lavine
Hello all, Sorry for the late notice, but I'm about halfway through porting peg.scm to use hygienic macros, so if anyone else was thinking of doing it, you might want to save your effort for something else. Or email me and I'll send you what I have. I hope no one else has already started. Noah

Re: Scheme Implementers

2011-01-29 Thread Noah Lavine
Hello, I think comp.lang.scheme is already a good place for this.  You quickly get feedback and many implementors seem to participate in it. Oh, great. I didn't know about that. Although I must say, it seems like there is a lot less coordination among Schemes right now than there should be.

Re: Scheme Implementers

2011-01-30 Thread Noah Lavine
Hello, I think several Schemes already have a dynamic FFI with a C parser. Bigloo has one (info (bigloo) Automatic extern clauses generation), and it’s GPL’d code, which we could reuse.  Larceny has something too. Oh, great. Can Guile reuse GPL'd code, though, since it is LGPL? I see that

Odd Behavior

2011-01-31 Thread Noah Lavine
Hello all, I ran into an error message in Guile, and I'm not sure how to track down the cause of it. I used a file called test.scm with the following contents: #!guile !# (define (codegen) #`(let ((message hello, world!\n)) (display message))) (define-syntax test (lambda (x)

Re: Odd Behavior

2011-01-31 Thread Noah Lavine
Nothing to debug. boot-9.scm:119 is in the definition of custom-throw-handler, which is part of the implementation of catch. Noah On Mon, Jan 31, 2011 at 1:44 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Hello all, I ran into an error message in Guile, and I'm not sure how to track down

Re: Scheme Implementers

2011-01-31 Thread Noah Lavine
Hello, What tends to happen is that people that want to do this consider themselves Scheme programmers, first and foremost, and who do not identify themselves with one Scheme system; so they release their code on their own site, with info on using it with various systems, and send mails to

Re: [PATCH] Possible Documentation Fix

2011-01-31 Thread Noah Lavine
Hi, It is correct, but I kinda liked the explicit mention of pattern variable environments in the original.  In syntax expansion, there are lexical variables, bound in lexical environments, and pattern variables, bound in syntax-expansion environments.  The confusion addressed by that

Re: Odd Behavior

2011-01-31 Thread Noah Lavine
Wow, great! On Mon, Jan 31, 2011 at 3:12 PM, Andy Wingo wi...@pobox.com wrote: On Mon 31 Jan 2011 19:44, Noah Lavine noah.b.lav...@gmail.com writes: ;;; compiling test.scm ;;; WARNING: compilation of test.scm failed: ;;; key wrong-type-arg, throw_args (#f Wrong type to apply: ~S (#f) (#f

Re: [PATCH] Handle products with exact 0 differently, etc

2011-02-01 Thread Noah Lavine
Hello Mark, I haven't read through all of the discussion yet, but it's obvious that you have good reasons for wanting (* 0 X) to be NaN when X is inexact. And yet for compatibility reasons it is nice if Guile agrees with Scheme standards. Therefore I think it would be great if you would send an

Re: [PATCH] Possible Documentation Fix

2011-02-02 Thread Noah Lavine
Hi, Looks great to me!  Would you mind submitting an updated patch? It's attached. Also, if you like, please add yourself to the Guile group on savannah. Let Ludo and I know when/if you've done this and we'll be happy to add you there.  Let's keep up the great discussion on the list, but

Re: [PATCH] Possible Documentation Fix

2011-02-02 Thread Noah Lavine
I've added you to the Guile group.  If you don't mind, please continue to post patches to the list for a little while.  Try to rebase before pushing patches to the Guile repo; merge commits are OK sometimes, but we like having a nice linear history. I guess in short the thing is to keep up

Bug in Guile's Posix Networking

2011-02-07 Thread Noah Lavine
Hello all, I think there's a bug in Guile's Posix networking capabilities. I first noticed it a few days ago when I couldn't get the example web server to work on my system (Mac OS X 10.6). I was getting an error from the bind command saying can't assign requested address. I assumed it was a

Re: Bug in Guile's Posix Networking

2011-02-12 Thread Noah Lavine
Hello, It would be interesting to see the output of a strace-like tool on both the working Python program and the equivalent failing Guile program. Apparently (according to the Interwebs), on OS X this tool is called dtruss. Sorry for the delay in replying. I got the output of dtruss easily

Re: Bug in Guile's Posix Networking

2011-02-12 Thread Noah Lavine
and it still happened. Noah On Sat, Feb 12, 2011 at 3:59 PM, Andy Wingo wi...@pobox.com wrote: On Sat 12 Feb 2011 21:33, Noah Lavine noah.b.lav...@gmail.com writes: Does guile --listen work?  It appears to use a slightly different way to set up the sockaddr. Oddly enough, it worked the first

Re: Bug in Guile's Posix Networking

2011-02-12 Thread Noah Lavine
Hello, I think that's just tracing the shell wrapper; use meta/uninstalled-env libtool --mode=execute dtruss guile to get a more proper trace. Got it, thanks! Again there's a lot of output, but the most important bit seems to be here (with some context): ;; Here Guile is finishing loading its

Re: Bug in Guile's Posix Networking

2011-02-12 Thread Noah Lavine
Hi, #x49 is 73 :) If I knew a facepalm emoticon, I would use it now. :) Could the lseek could be the problem? Maybe, but I suspect not. My man page for lseek says that lseek will fail with ESPIPE if it is called on a socket, and my errno.h defines ESPIPE to be 29, which is the error we got.

Re: Bug in Guile's Posix Networking

2011-02-12 Thread Noah Lavine
on a patch for this. Noah On Sat, Feb 12, 2011 at 8:22 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Hi, #x49 is 73 :) If I knew a facepalm emoticon, I would use it now. :) Could the lseek could be the problem? Maybe, but I suspect not. My man page for lseek says that lseek will fail

Re: Bug in Guile's Posix Networking

2011-02-12 Thread Noah Lavine
Hello again, The attached patch fixes the problem for me, and I believe zeroing some data structures before they're used won't hurt things for anyone else. Noah On Sat, Feb 12, 2011 at 8:45 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Hi all, I think I have isolated the error (although

Re: Bug in Guile's Posix Networking

2011-02-12 Thread Noah Lavine
:22 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Hello again, The attached patch fixes the problem for me, and I believe zeroing some data structures before they're used won't hurt things for anyone else. Noah On Sat, Feb 12, 2011 at 8:45 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Hi

Re: Bug in Guile's Posix Networking

2011-02-13 Thread Noah Lavine
Hello, On Sun, Feb 13, 2011 at 12:42 AM, Ken Raeburn raeb...@raeburn.org wrote: What platforms have sin_len in the generic sockaddr structure?  The one I've always seen is sa_len, and that's consistent with sa_family in terms of field name prefixes. sockaddr         - sa_ sockaddr_in      

Re: Bug in Guile's Posix Networking

2011-02-13 Thread Noah Lavine
I suspect you'd do fine if you ditched the test for sockaddr.sin_len and tested either sockaddr_in.sin_len or sockaddr.sa_len.  (And I'd expect an OS to be consistent as to whether the _len field exists for each of the various socket address structures.) Oh, and as for why I did this - the

Re: problem with trailing comment in repl

2011-02-13 Thread Noah Lavine
Hello all, I was thinking about how this might be solved. I can see two ways of doing it: - The nicer way: add a new read function (or a keyword argument to the current read function) that can tell it to stop without returning anything if it hits a newline and there's no more input ready on its

Re: Bug in Guile's Posix Networking

2011-02-13 Thread Noah Lavine
Yes, I think this is the thing to do. Can you rework your patch, Noah? Will do.

Re: Bug in Guile's Posix Networking

2011-02-13 Thread Noah Lavine
Here it is. On Sun, Feb 13, 2011 at 3:10 PM, Noah Lavine noah.b.lav...@gmail.com wrote: Yes, I think this is the thing to do. Can you rework your patch, Noah? Will do. 0001-Set-sockaddr_in.sin_len-field-when-it-exists.patch Description: Binary data

Re: problem with trailing comment in repl

2011-02-14 Thread Noah Lavine
Hello, Nice!  Can you add a test case? I've thought about it, and I'm not sure how to do it well. The trouble is that this only applies to the REPL, not scripts. So a test would have to wrap the REPL in something and make sure its output is right. I might be able to do that, but if I just

Re: PEG Parser

2011-02-23 Thread Noah Lavine
there is some interaction between modules and syntax generators that I don't understand. The patch will apply to the wip-mlucy branch. Thanks, Noah On Fri, Feb 18, 2011 at 5:03 PM, Andy Wingo wi...@pobox.com wrote: On Wed 02 Feb 2011 01:26, Noah Lavine noah.b.lav...@gmail.com writes: Here it is! All

Re: hygiene and macro-introduced toplevel bindings

2011-02-28 Thread Noah Lavine
Hello all, I believe what I'm saying is equivalent to what Andreas said, but let me put it in this way: I think the Right Thing to do is to change what we think of as a name - instead of a name being a symbol, a name would be a symbol plus the environment it was defined in (which is what a syntax

Re: PEG Parser

2011-03-04 Thread Noah Lavine
into nicer chunks. Noah On Fri, Mar 4, 2011 at 5:52 AM, Andy Wingo wi...@pobox.com wrote: On Wed 23 Feb 2011 16:10, Noah Lavine noah.b.lav...@gmail.com writes: I need to ask for help in order to work on this more. I thought I would first move the code-generating functions to their own module

Re: Welcome new contributor Mark Harig!

2011-03-04 Thread Noah Lavine
Yes, welcome! It's great to have you! On Fri, Mar 4, 2011 at 4:28 PM, Neil Jerram n...@ossau.uklinux.net wrote: Andy Wingo wi...@pobox.com writes: Hey all, Let's welcome new contributor Mark Harig!  Mark is interested in documentation, but who knows to what nooks and hollows of Guile the

Re: PEG Patches

2011-03-06 Thread Noah Lavine
Here's another patch, which in retrospect may be the most useful of the series. It adds a section called PEG Internals to the manual, and begins documenting how PEG actually works. This should make hacking PEG a lot easier. Noah On Sun, Mar 6, 2011 at 12:25 AM, Noah Lavine noah.b.lav

Re: summer of code ideas

2011-03-07 Thread Noah Lavine
I've been toying with the idea of an AOT compiler for Guile, and I think that would make a good summer project. I think you'd want to compile from Tree-IL to GCC's GIMPLE format (the highest-level intermediate representation they have, I think). One interesting possibility would be basing it on

Re: summer of code ideas

2011-03-07 Thread Noah Lavine
Also, about your CPAN for guile (CGAN?) idea - it seems like with what you said about stowfs that what you're looking for is similar to Nix, but used to install Guile packages. (www.nixos.org) Do you think it would be useful to just compile a version of Nix with a different root directory, make

Re: summer of code ideas

2011-03-07 Thread Noah Lavine
Hello, Really?  I thought you were toying with JIT.  :-) Yes, it's been a while since we talked about that :-). I still want to do it, though. The current status as I see it is that I have a prototype JIT that works, and a plausible way to integrate it into Guile's VM. What needs to happen now

Re: summer of code ideas

2011-03-07 Thread Noah Lavine
Hello, We talked about having a Scheme-based language that could compile to both plain C and JIT, but decided that would make the VM too complicated, Maybe I forgot to feed that thread, but I think it might be easier to have a high-level representation the VM opcodes as sexps (possibly a

SRFI-23

2011-03-11 Thread Noah Lavine
Hello all, Guile supports srfi-23 (the `error' procedure), and probably has forever, but it's not documented. This patch adds a note in the manual saying we support it, and also adds srfi-23 to our list of cond-expand features that we support. I think this is safe to apply to stable-2.0. Noah

Re: Fmt Module

2011-03-13 Thread Noah Lavine
Hi, Not that I have any say in that, but IMHO, it would be preferable to keep external libraries maintained separatly from the Guile core; however in this case, including it in the core might be justified by its proposed use in the JIT compiler. Yeah. I agree, actually. FWIW, there's

Modules with Circular Dependencies

2011-03-18 Thread Noah Lavine
Hello all, I recently ran up against an issue about modules with circular dependencies while working on PEG stuff. I reduced it to the following test case. Here is file test-a.scm: (define-module (test-a) #:use-module (test-b)) (define-syntax hello (syntax-rules () ((hello) Hello,

Re: Modules with Circular Dependencies

2011-03-18 Thread Noah Lavine
Hello, The problem is that modules are resolved at compile-time, in addition to run-time, so there just can’t be circular dependencies. It's true that a module couldn't depend, at compile-time, on a module that was only available at run-time. However, I think we could handle circular

Re: Using libunistring for string comparisons et al

2011-03-19 Thread Noah Lavine
Hello all, Furthermore, such a default would not restrict our users at all -- they can always use the non-_c_ variants with a symbol explicitly constructed with (e.g.) scm_from_utf8_symbol. We have those convenience functions for a reason.  You recently proposed several more convenience

Re: PEG Patches

2011-03-28 Thread Noah Lavine
Hi, I think the solution is to confront the circularity directly.  It exists because the PEG s-exp grammar also deals with the string grammar, which needs an already-build PEG parser. Let's break it instead into layers without cycles: removing the string grammar from the s-exp code

Re: PEG Patches

2011-03-28 Thread Noah Lavine
I've been working on that. The attached two patches break the circularity. The code still isn't organized brilliantly, but after applying these I think we would only want pretty minor cleanups before merging PEG into the main branch. Actually, forget this bit. I wrote it before I remembered

Re: PEG Patches

2011-03-29 Thread Noah Lavine
This last is the best.  What if we define a module that serves as a registry of PEG match behaviors, like `(ice-9 peg matchers)'.  Then we define `define-peg-matcher' or something, so that we can: (define-peg-matcher and cg-and) where define-peg-matcher is (define-syntax

Re: GSoC 2011

2011-03-30 Thread Noah Lavine
Not since the e-mail. I'm still waiting for feedback. I will tell you what I think, then, but keep in mind that many people on this list know a lot more than I do. The first idea is something I think Guile people are very interested in, and you could expect to do significant work, possibly

  1   2   3   4   >