bug in syntax-case in master

2012-05-16 Thread Stefan Israelsson Tampe
I'm trying to port syntax-parse to master. And get into the following trubble (syntax-case x (integrate) ((integrate a b) ...)) fails, but (syntax-case x (integrate) ((_ a b) ...)) does not fail looking at the code for syntax-case I would expect that the datum integrate is match against and

Re: stack closures for guile-log

2012-05-16 Thread Stefan Israelsson Tampe
and Cheers! On Tue, May 15, 2012 at 10:37 PM, Andy Wingo wi...@pobox.com wrote: On Tue 08 May 2012 21:16, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: I have three stacks 1. a control stack that stores undo information scheme hooks aka dynamic-wind and stack references

Re: syntax parse link

2012-05-16 Thread Stefan Israelsson Tampe
Thx, I have a few things I would like to do first but maybe after this weekend I will make the linkage! /Stefan On Tue, May 15, 2012 at 10:33 PM, Andy Wingo wi...@pobox.com wrote: On Tue 08 May 2012 17:46, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: I would like to add a link

problems evaluating code depending on version

2012-05-16 Thread Stefan Israelsson Tampe
hi, I'm trying to use this as a way to defined different versions of the code depending on the guile-version. So here it is, (eval-when (compile load eval) (define (ver) (let ((v (version))) (cond ((string-match ^2.0 v) 'v2.0) ((string-match ^2.1 v)

bug in syntax-case in master

2012-05-16 Thread Stefan Israelsson Tampe
I have found the bug, It was because of the bug fixed in master got a bug in my code visible! /Stefan -- Forwarded message -- From: Stefan Israelsson Tampe stefan.ita...@gmail.com Date: Wed, May 16, 2012 at 8:57 PM Subject: bug in syntax-case in master To: guile-devel guile-devel

Re: problems evaluating code depending on version

2012-05-17 Thread Stefan Israelsson Tampe
-version! /Stefan On Thu, May 17, 2012 at 10:20 AM, Andy Wingo wi...@pobox.com wrote: On Wed 16 May 2012 23:32, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: (define-syntax guile-stuff (lambda (x) (syntax-case x () (_ (let ((q (ver))) (cond

Re: problems evaluating code depending on version

2012-05-17 Thread Stefan Israelsson Tampe
PM, Andy Wingo wi...@pobox.com wrote: On Thu 17 May 2012 14:47, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: I tried cond-expand, just to see if it worked and no the export clause does not fall through and the symbols are not exported. I can fix this as you say by using

Re: how to implement mutual recursive parsers in syntax-parse

2012-05-18 Thread Stefan Israelsson Tampe
Stefan On Tue, May 15, 2012 at 8:38 PM, Andy Wingo wi...@pobox.com wrote: On Mon 14 May 2012 21:13, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: (begin (define parser-a code-a ...) (define-syntax a spec-a)) (begin (define parser-b code-b ...) (define-syntax b

Re: how to implement mutual recursive parsers in syntax-parse

2012-05-18 Thread Stefan Israelsson Tampe
2012 21:13, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: (begin (define parser-a code-a ...) (define-syntax a spec-a)) (begin (define parser-b code-b ...) (define-syntax b spec-b)) In racket they manage to evaluate the define-syntax forms before the define

Re: syntax parse link

2012-05-20 Thread Stefan Israelsson Tampe
, Stefan Israelsson Tampe stefan.ita...@gmail.com skribis: I have a few things I would like to do first but maybe after this weekend I will make the linkage! Please add it to gnu-guile-projects.html (under template/ first, as Andy mentioned), and using the same format as other entries

Re: how to implement mutual recursive parsers in syntax-parse

2012-05-21 Thread Stefan Israelsson Tampe
Jolly nice, this is perfect! Den 21 maj 2012 10:59 skrev Andy Wingo wi...@pobox.com: On Sat 19 May 2012 00:05, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: (define (f x) (c)) (define-syntax c (lambda (x) (pk 'c) #t)) These expressions are expanded in order, not together

Re: syntax parse link

2012-05-22 Thread Stefan Israelsson Tampe
Ok, those issues are now fixed! On Tue, May 22, 2012 at 6:18 PM, Ludovic Courtès l...@gnu.org wrote: Hi! Thanks! There are a few typos: guile - Guile racket - Racket an hygienic - a hygienic recomending - recommending Also, could you move it above, to keep the list alphabetically

Re: patch to guile to allow c-code closure interaction for logic programming

2012-05-22 Thread Stefan Israelsson Tampe
, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: I post here a directory of patches and code that can be used to enhance guile to interact nicely with logic programming code written in C. I can reach very good performance using this tool please have a look and comment on it. Would you

assembler in scheme

2012-05-26 Thread Stefan Israelsson Tampe
I got an idea, why not design a portable assembler that have a unifying simple core and try to model a VM on that e.g. simple things will be naitive and complex instructions can be dispatched via a named goto. The solution would fix a few registers like the bp and then have enough instructions

The future of guile-log

2012-05-27 Thread Stefan Israelsson Tampe
Hi all, I feel that the basic technology is now in place when it comes to guile-log. It's future proof code base meaning that other technologies has to be in place before tweaking it further. I know that it can handle multiple threads and be speedy when native compilation becomes a reality. So I

Re: ballpark rtl speeds

2012-06-07 Thread Stefan Israelsson Tampe
Great! So If you code the new VM interpreter you get 2x improvement If you generate code and compile with no optimization about another 3x If you are able to generate code that compiles with optimisation bsically using a register you will get ? Using a register as a storage on my machine yields

progress with native code generation in guile

2012-06-09 Thread Stefan Israelsson Tampe
Hi, On linux, x86-64 I can now write, (use-modules (native aschm)) (define b (asm (inst mov rbx 10) ;rbx = 1000,000,000 loop: (inst cmp rbx 0) (inst jmp #:eq out:) (inst dec rbx) (inst jmp loop:) out:

Re: Growable arrays?

2012-06-11 Thread Stefan Israelsson Tampe
Maybe this could be a first stub for a table structure that is uses both an array and a hash-table. I do think that implementing this might need fine tuning in order to have good defaults and so on. So in that sense one probably need to check out reference implementations. But this is for

Re: patching gcc to allow other calling conventions

2012-06-21 Thread Stefan Israelsson Tampe
Why not specify the logic in scheme and output it either to C or Assembler :-) /Stefan On Tue, Jun 19, 2012 at 12:30 AM, Noah Lavine noah.b.lav...@gmail.comwrote: Hello, But the used sbcl derivative although not gnu is either in the public domain or bsd so we should be able to publish

Re: patching gcc to allow other calling conventions

2012-06-21 Thread Stefan Israelsson Tampe
Israelsson Tampe stefan.ita...@gmail.com wrote: Why not specify the logic in scheme and output it either to C or Assembler :-) That sounds very cool, and would be very cool, I thought first, but then I realized that you wouldn't be able to bootstrap guile anymore :-/ - Daniel

Re: patching gcc to allow other calling conventions

2012-06-21 Thread Stefan Israelsson Tampe
the possibility to compile to native code by some kind of just in time mechanism. Cool! I will try to start investigating this approach. /Stefan On Thu, Jun 21, 2012 at 7:57 PM, Daniel Krueger keen...@googlemail.comwrote: On Thu, Jun 21, 2012 at 7:50 PM, Stefan Israelsson Tampe stefan.ita

Re: Enhancement to the syntax system?

2012-07-02 Thread Stefan Israelsson Tampe
:28 PM, Ludovic Courtès l...@gnu.org wrote: Hi Stefan, Stefan Israelsson Tampe stefan.ita...@gmail.com skribis: Hygiene is harder to maintain. e.g. I kept on hitting this kind of code snippets #'(let ((x v)) #,(f rest #'x)) The problem with this code is hygiene, I need

Re: A vm for native code in guile

2012-07-03 Thread Stefan Israelsson Tampe
On Tue, Jul 3, 2012 at 12:16 AM, Andy Wingo wi...@pobox.com wrote: On Mon 02 Jul 2012 09:53, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: Anyway I can now compile simple functions to native sequences of machine code but with some tools around it so let me explain the setup

Re: Enhancement to the syntax system?

2012-07-03 Thread Stefan Israelsson Tampe
wrote I needed to do (with-syntax ((x (datum-syntax stx (gensym x #`(let ((x 2)) #,(f #'x)) Hope that this makes things clear! /Stefan On Tue, Jul 3, 2012 at 11:33 PM, Ludovic Courtès l...@gnu.org wrote: Hey! Stefan Israelsson Tampe stefan.ita...@gmail.com skribis: Stefan

Re: Enhancement to the syntax system?

2012-07-04 Thread Stefan Israelsson Tampe
:47 AM, Marijn hk...@gentoo.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Stefan, On 03-07-12 23:52, Stefan Israelsson Tampe wrote: You do not need gensyms if you try to mimic or implement my suggested #. . On the other hand when if you do this (define (f stx) #`(let ((x 1

Re: A vm for native code in guile

2012-07-07 Thread Stefan Israelsson Tampe
Hi, Branching now works and a big enough subset of the VM is translatable for some interesting benchmarks to be done. So by skipping the goto structure a the win is maybe 3-4x for simple numerical loops. I do expect these loop ta be another factor of 2 when the wip-rtl is translated in the same

Re: Enhancement to the syntax system?

2012-07-10 Thread Stefan Israelsson Tampe
...@gnu.org wrote: Hi! Stefan Israelsson Tampe stefan.ita...@gmail.com skribis: | It’s true that it’s annoying that the wrong binding is silently used. | Do you think it’s common enough to justify new syntax? Yes this highlights a comon problem when implementing racket match

Re: [racket-dev] Enhancement to the syntax system?

2012-07-10 Thread Stefan Israelsson Tampe
samth made a pointer to http://srfi.schemers.org/srfi-72/srfi-72.html It does not look like guile racket etc. have implemented this yet. Am I wrong? This is precisely what I'm after! On Tue, Jul 10, 2012 at 5:26 PM, Ludovic Courtès l...@gnu.org wrote: Hi, Matthew Flatt mfl...@cs.utah.edu

srfi-72

2012-07-10 Thread Stefan Israelsson Tampe
Hi, I have thought about what abstraction is needed to be supported by psyntax in order to implement srfi-72. Consider macro expansion of code #'C, ideally we would like to write the expansion as E#'C with E an expansion operator. For two expansion operators E,F we would expect to support this

Re: wip-rtl return location

2012-08-03 Thread Stefan Israelsson Tampe
Hi interesting thoughts Mark, The below refere to to (very) simplistic vm compiler I'm working on right now. The current overhead found in function call's, function setup and function return means that it's hard to factor in the lowest level of optimizations. I view the call overhead so large

Re: wip-rtl return location

2012-08-03 Thread Stefan Israelsson Tampe
overhead it's maybe a non issue but I think we should time current setup with a version where we grovel the callee information from the program datastructure. /Stefan On Fri, Aug 3, 2012 at 2:38 PM, Andy Wingo wi...@pobox.com wrote: On Fri 03 Aug 2012 13:54, Stefan Israelsson Tampe stefan.ita

wip-rtl native closure creation

2012-08-05 Thread Stefan Israelsson Tampe
Hi, I was thinking how to mix rtl-VM and native compilation with respect to closure creation currently in the code we layout the program as ((nfree :16 | flags:8 | ?:7 | tag:0), code, freevar1 ) Then at closure creation we just set first slot, the code to point to a relative adress

Re: wip-rtl native closure creation

2012-08-06 Thread Stefan Israelsson Tampe
stage we may leave the VM and perhaps enter into a Native only mode. Then we can restructure. /Stefan On Mon, Aug 6, 2012 at 11:32 AM, Andy Wingo wi...@pobox.com wrote: On Sun 05 Aug 2012 17:19, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: Probably it is best to have the first

wip-rtl native patch

2012-08-09 Thread Stefan Israelsson Tampe
Hi, DO you think that this will do as an initial patch to wip-rtl in order to introduce the possibility to execute native code or JIT:ed code. We reserve the first two indexes in the ip text area to fit a pointer to native code to be executed. There is changes to two parts of the code 1.

overhead of soem accessors

2012-08-11 Thread Stefan Israelsson Tampe
Hi! I was looking at the code for bytevector-ref, vector-ref, struct-ref and it's pretty conclusive that there is a hugh overhead of implementing those. We are talking of 30-40 instructions that has to be put into native code. Now most of this code is working with registers so it's not that bad.

wip-rtl extra space at allocation of frame at call's

2012-08-12 Thread Stefan Israelsson Tampe
Hi, Currently if we want to compile to native code in the rtl branch the call instruction is very heave to inline directly. I would like to, when the number of arguments is less then 20 arguments jump to global code segment where all the nessesary heavy lifting is done. Else the whole call

wip-rtl: nargs logic in call/values op looks weird

2012-08-14 Thread Stefan Israelsson Tampe
Hi, In wip-rtl vm-engine.c around line 1047 in opcode call/values tehre seams to be some strangeities with the use of the nargs variable in, SCM_FRAME_SET_DYNAMIC_LINK (fp, old_fp); SCM_FRAME_SET_RTL_MV_RETURN_ADDRESS (fp, ip + 2 + nargs); SCM_FRAME_SET_RTL_RETURN_ADDRESS (fp, ip + 3 + nargs);

Re: Extensible vm ops?

2012-08-26 Thread Stefan Israelsson Tampe
Hi, I have now implemented most of the rtl oops and in the phase where i am testing the ops so that all generate assembler .e.g. generate not run, I will run them later. I have a few problems usng the rtl codebase, namely I don't know how to tell the program where the rtl bytecode ends, I would

Re: Ang.: Will guile support R7RS terminating equal? in the presence of cycle?

2012-09-01 Thread Stefan Israelsson Tampe
Typed Guile? Did I miss something? :-) https://gitorious.org/typed-guile It's a type system implemented using guile-log! By the way, I do not think the overhead is that dramatic. I guess that guile's equal would be any slower with this feature added. you typically does a circularity check via

rtl - native

2012-09-02 Thread Stefan Israelsson Tampe
Hi all, The rtl native environment is close to a usable state for linux x86-64. Most instructions have been translated to assembler and it remains to debug them and write test cases which will take some time. Consider the simple code, (define (f n) (let loop ((n n) (s 0)) (if (eq? n 0)

Re: Will guile support R7RS terminating equal? in the presence of cycle?

2012-09-02 Thread Stefan Israelsson Tampe
The cycle detection for a tree would probably look something like, SCM scm_equal_cons(SCM x, SCM y, SCM slow, int move) { SCM res; if(scm_is_pair? (x) scm_is_pair (y)) { if(scm_is_eq (x, slow)) cycle_detection_hit(); if(move) if(scm_is_pair? (SCM_CAR (slow)))

Re: Will guile support R7RS terminating equal? in the presence of cycle?

2012-09-03 Thread Stefan Israelsson Tampe
00:08 skrev Ludovic Courtès l...@gnu.org: Hi, Stefan Israelsson Tampe stefan.ita...@gmail.com skribis: The cycle detection for a tree would probably look something like, Tortoise-and-hare would have to be applied to arbitrary data structures, AIUI. Ludo’.

Re: Will guile support R7RS terminating equal? in the presence of cycle?

2012-09-03 Thread Stefan Israelsson Tampe
I actually implemented an algorithm to handle infinite trees that we could use if we like. Enjoy! On Mon, Sep 3, 2012 at 12:07 AM, Ludovic Courtès l...@gnu.org wrote: Hi, Stefan Israelsson Tampe stefan.ita...@gmail.com skribis: The cycle detection for a tree would probably look

things are eq? but not generated at the same time

2012-09-05 Thread Stefan Israelsson Tampe
Hi, I found that this optimization can lead to dangerous bugs. If I put, (define a #(1)) (define b #(1)) , load the file. Then (eq? a b) #t Is this an optimization we need. I can figure out applications where you do not want this behavior e.g. I wan't to make distinct objects and add

Re: things are eq? but not generated at the same time

2012-09-05 Thread Stefan Israelsson Tampe
Yes, I can agree om that. But this should be very stated clearly and perhaps added to a pitfall's section. /Stefan On Wed, Sep 5, 2012 at 9:13 PM, Ian Price ianpric...@googlemail.com wrote: Stefan Israelsson Tampe stefan.ita...@gmail.com writes: Is this an optimization we need. I can

wip-rtl, non-immediate constants like lists and arrays does not have a 64bit aligned address!

2012-09-08 Thread Stefan Israelsson Tampe
Hi, I was a bit surprised when I coded the native versions of rtl-sinstruction, make-non-immediate I just assumed that alignement meant 64bit on 64bit platforms. It doesen't in for example, (define const (assemble-program `((begin-program test-bind-rest) (assert-nargs-ee/locals 0 2)

Re: Will guile support R7RS terminating equal? in the presence of cycle?

2012-09-08 Thread Stefan Israelsson Tampe
: On 09/03/2012 09:55 AM, Stefan Israelsson Tampe wrote: To note here is that if we had one bit to spare for every cons representation we could do use that bit to mark conses as been touched and abort the ordinary equal if we find a mark. For x86-64 we have one such bit available which is cool

Re: Will guile support R7RS terminating equal? in the presence of cycle?

2012-09-09 Thread Stefan Israelsson Tampe
Israelsson Tampe stefan.ita...@gmail.com wrote: You are right! That will only work for one thread! Remain to see how much the overhed there is to linearize the search and use tourtoues - hare, should be much less overhead then using a map to mark the objects though! See http

typed-guile

2012-09-29 Thread Stefan Israelsson Tampe
Hi all, I've been reworking my little type-checking library built on guile-log. It now works on some pretty recent guile-2.0 repo and a recent guile-log. It has subtypes it has recursive types allow for or and and not in the spec for the type. You can check it out at

compile-rtl

2012-10-14 Thread Stefan Israelsson Tampe
Hi, I'm right now trying to port compile-glil to compile-rtl and I would say that what's hindering me is what design choices to take? 1. The main problem is that we do not have a stack pointer the same way as before. Of cause we still need to store temporary values and we will simply have to use

Re: More RTL Tests

2012-10-14 Thread Stefan Israelsson Tampe
On Sun, Oct 14, 2012 at 9:59 PM, Noah Lavine noah.b.lav...@gmail.comwrote: Hello, I have been working on understanding RTL, and I wrote the following tests. They're mostly to illustrate for myself how calling works in RTL, but they also serve to test it. Any objections if I commit them as

Re: Fixing the slib mess

2012-10-22 Thread Stefan Israelsson Tampe
Hi Mikael and welcome back! *But*, the proper implementation of syntax-toplevel? requires modification of psyntax.scm and adding it to the (system syntax) module. I didn't want to do this until I've had your comments, so the present patch has its own syntax-object accessors (which breaks

Re: Fixing the slib mess

2012-10-22 Thread Stefan Israelsson Tampe
Yes in that case this stands on it's own! /Stefan On Mon, Oct 22, 2012 at 9:11 PM, Mikael Djurfeldt mik...@djurfeldt.comwrote: On Mon, Oct 22, 2012 at 8:31 PM, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: Comments? Can I add syntax-toplevel? to psyntax.scm and (system syntax

progress

2012-10-30 Thread Stefan Israelsson Tampe
Hi, OK, the last progress for the rtl compilation is make it work to something as close as the current RTL VM, I have added a few variables that can control the kind of compilation strategy we would like to have as an output. I can for example now do (define f ((c (lambda (x) (let loop ((s 0)

Re: thoughts on native code

2012-11-10 Thread Stefan Israelsson Tampe
out more how to do this, if you have any pointers or ideas, please help out. Cheers Stefan On Sat, Nov 10, 2012 at 3:41 PM, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: Hi all, After talking with Mark Weaver about his view on native code, I have been pondering how to best model

Re: thoughts on native code

2012-11-11 Thread Stefan Israelsson Tampe
this method to try vary C over the graph somewhat. What do you think? Happy Mathing!! /Stefan On Sat, Nov 10, 2012 at 11:06 PM, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: I would like to continue the discussion about native code. Some facts are, For example, consider

Re: thoughts on native code

2012-11-12 Thread Stefan Israelsson Tampe
it a couple years ago for a JIT project that we never fully implemented. I chose it over GNU Lightning specifically because it did register allocation. It implements a full assembler, not just calls, which could also be nice later. Noah On Sat, Nov 10, 2012 at 5:06 PM, Stefan Israelsson Tampe

Re: thoughts on native code

2012-11-15 Thread Stefan Israelsson Tampe
(such as missing labels or calls to guile procedures...) Sjoerd On 11/12/2012 10:50 PM, Stefan Israelsson Tampe wrote: Thanks for your mail Noah, Yea libjit is quite interesting. But playing around with an assembler in scheme I do not want to go back to C or C++ land. The only problem is that we

Re: thoughts on native code

2012-11-15 Thread Stefan Israelsson Tampe
Hi, Yes this is pre-work and what i'm doing is an investigation trying out things. bare that in mind :-) For the assembler it can be really good to support one that comes with guile so I do not find this work as a research work but as a service work to propose components that can be included in

register allocation

2012-11-17 Thread Stefan Israelsson Tampe
Hi all, If I've not miss - understood wingo's and Marks intention for native code, there need to be a intermediate format to output from tree-il that is different from the rtl bytecode. One of the reason's for this is that one need a better format in order to do register allocations well. What I

Re: CPS and RTL

2012-11-17 Thread Stefan Israelsson Tampe
Hi Noha, very clean code indeed, nice work, (mine rtl compiler is much more a bit of a hack btw :-)) One thing to think about from the beginning is how to protect variables from gc and at the same time offer unreachable vars to be gc:d at an early state. In guile-2.0 we kept using a stack for

Re: Guile Lua

2012-11-21 Thread Stefan Israelsson Tampe
Hi, In terms of strategy, I think Guile’s focus should remain primarily on Scheme variants, and ELisp. Other language front-ends are of course welcome, but we must keep an eye on what the demand is. What about common lisp is scheme a lisp or is CL a scheme :-) Anyway to support CL I would

Bug int rtl.scm in wip-rtl

2012-11-24 Thread Stefan Israelsson Tampe
Hi, I just found a bug in rtl.scm, it's triggere by compiling larger rtl codes. In rtl.scm, we have the function (define (link-text-object asm) (let ((buf (make-u32vector (asm-pos asm (let lp ((pos 0) (prev (reverse (asm-prev asm (if (null? prev) (let ((byte-size (*

Re: More RTL Tests

2012-11-28 Thread Stefan Israelsson Tampe
to write rtl assembler refering to toplevels in a nice way /Stefan On Sun, Oct 14, 2012 at 10:57 PM, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: On Sun, Oct 14, 2012 at 9:59 PM, Noah Lavine noah.b.lav...@gmail.comwrote: Hello, I have been working on understanding RTL, and I

Re: More RTL Tests

2012-11-28 Thread Stefan Israelsson Tampe
for accessing variables. I imagine he was thinking of something like this too, so the best thing would be to get that patch merged into the regular wip-rtl branch. Noah On Wed, Nov 28, 2012 at 2:13 PM, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: Hi Noah, I have a fix to rtl.scm

Re: A proper tail version of with-fluids

2013-01-04 Thread Stefan Israelsson Tampe
that fluid is changed by with-fluids. But that seems tricky to implement. I haven't looked at how Stefan did it, but I'm impressed. Noah On Thu, Jan 3, 2013 at 6:36 PM, Ludovic Courtès l...@gnu.org wrote: Hi Stefan, Stefan Israelsson Tampe stefan.ita...@gmail.com skribis: (define f (lambda

Re: Guile Lua

2013-01-14 Thread Stefan Israelsson Tampe
Hi, To note is that in order to implement common lisp one need to bypass tree-il and generate directly to glil, the reason is that tagbody is poorly represented by tree-il. If we intend to be multilingual it would be nice to be able to effectively represent those ideoms. Any thoughts on it?

Re: wip-rtl native patch

2013-01-21 Thread Stefan Israelsson Tampe
compile the module directly to native code this will be a non issue and I completely agree with your approach. Cheers! Stefan On Mon, Jan 21, 2013 at 2:21 PM, Andy Wingo wi...@pobox.com wrote: On Thu 09 Aug 2012 20:59, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: DO you think

Re: native compilers

2013-01-21 Thread Stefan Israelsson Tampe
in scheme that I couldn't resist hacking this together. Regards Stefan On Mon, Jan 21, 2013 at 5:53 PM, Andy Wingo wi...@pobox.com wrote: On Sat 22 Sep 2012 23:28, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: I've now coded two version of native compilers for x86-64 linux

Re: compile-rtl, II

2013-01-21 Thread Stefan Israelsson Tampe
On Mon, Jan 21, 2013 at 6:39 PM, Andy Wingo wi...@pobox.com wrote: On Mon 15 Oct 2012 16:05, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: (arg1, return-address, old-frame, program, arg2 ...) This way we do not need to copy the program field at a tail call What would you do

Re: native compilers

2013-01-21 Thread Stefan Israelsson Tampe
I guess I need to consolidate the RTL branch now, and we need to make sure that we can plug in a JIT. I don't want to incorporate all of this code at once, so ideally we can make it so that you can load your code as a module and Guile will have the needed hooks to run JITted code if it is

Re: syntax closures

2013-01-22 Thread Stefan Israelsson Tampe
Hi On Tue, Jan 22, 2013 at 1:56 PM, Andy Wingo wi...@pobox.com wrote: Hi, On Thu 17 Jan 2013 21:51, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: Hi all, I wanted to resurrect the idea of a syntactic closure. I did some thinking and Meta: I seem to be receiving your mails

Re: syntax closures

2013-01-22 Thread Stefan Israelsson Tampe
, I tried to get gnus working but cannot send mail from it :-( /Stefan On Tue, Jan 22, 2013 at 5:38 PM, Andy Wingo wi...@pobox.com wrote: On Tue 22 Jan 2013 17:19, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: (read-hash-extend #\_ syntax-closure-reader) Have you tried having your

Re: syntax closures

2013-01-22 Thread Stefan Israelsson Tampe
, Andy Wingo wi...@pobox.com wrote: On Tue 22 Jan 2013 17:19, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: (read-hash-extend #\_ syntax-closure-reader) Have you tried having your srfi-72 module export a binding for unsyntax? I would like to use that of cause, but does it mix well

Re: syntax closures

2013-01-23 Thread Stefan Israelsson Tampe
it was a fun hack, thanks! /Stefan On Tue, Jan 22, 2013 at 5:38 PM, Andy Wingo wi...@pobox.com wrote: On Tue 22 Jan 2013 17:19, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: (read-hash-extend #\_ syntax-closure-reader) Have you tried having your srfi-72 module export a binding for unsyntax

Re: syntax closures

2013-01-23 Thread Stefan Israelsson Tampe
Hi Alex! Note SRFI-72 is not an implementation of syntactic-closures. It's an alternate hygiene algorithm closer to the R6RS one which includes a compatible syntax-case and some convenience utilities. To comments to this: 1. The main reason for SRFI-72 is to e.g. capture the let bound y in

Re: compile-rtl

2013-01-26 Thread Stefan Israelsson Tampe
Andy Wingo wi...@pobox.com writes: Now when we are tail-calling in rtl, we just fill the argument slots with the new function arguments directly and then tail-call by filling in number of arguments and function. This is very smart and just some simple features added would mean that a lot of

splicing macros

2013-01-26 Thread Stefan Israelsson Tampe
Hi all, This is something fun to implement using ck-macros and local-syntax-value. The idea is to patch guile's quasisyntax.scm in ice-9 to implement splicing of macros. If we assume a reader macro #.code == (macro-splicing code), with the proposed hack I can now write:

Re: splicing macros

2013-01-28 Thread Stefan Israelsson Tampe
Yes, I can add documentation for it. /Stefan On Sun, Jan 27, 2013 at 11:17 AM, Andy Wingo wi...@pobox.com wrote: On Sat 26 Jan 2013 14:03, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: I will assume that you are familliar with th ck macro, included in recent guile releases

Re: syntax closures

2013-02-14 Thread Stefan Israelsson Tampe
, Mikael D. On Thu, Jan 24, 2013 at 9:45 AM, Alex Shinn alexsh...@gmail.com wrote: On Thu, Jan 24, 2013 at 4:11 PM, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: 2. I was actually hesistant to call this srfi-72 because of trying to do what it want more than what it say's. A main

Re: syntax closures

2013-02-15 Thread Stefan Israelsson Tampe
try to implement a solution for. So in this light I would say that I practically cover 90% of srfi-72 intention. But from a theoretical standpoint I would just say 10%. /Stefan On Fri, Feb 15, 2013 at 5:16 AM, Mark H Weaver m...@netris.org wrote: Stefan Israelsson Tampe stefan.ita...@gmail.com

Re: CPS Update

2013-02-15 Thread Stefan Israelsson Tampe
Hey Noha, Great work indeed. Isn't the primitiveness decided by tree-il? you wil get a (primcall ...) tree il element and then should know how to emit a corresponding primitive instruction(s). Anyway I think that your conclusion is right, it would not make sense to support overwriting these

potluck

2013-02-15 Thread Stefan Israelsson Tampe
Hi all, for what it's worth, I have been playing, for this potluck, with guile-zmq. I compiled a small layer on top of that library that should make it easy to implement some simple applications consisting of many concurrent small programs by sending messages between them. You can find it at

Re: CPS Update

2013-02-19 Thread Stefan Israelsson Tampe
, 2013 at 2:39 AM, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: Isn't the primitiveness decided by tree-il? you wil get a (primcall ...) tree il element and then should know how to emit a corresponding primitive instruction(s). Oh, you're right. I was thinking about that because I

Re: goops - accessors, methods and generics

2013-02-23 Thread Stefan Israelsson Tampe
For the mg-3 case, Actually, only (merge-generics) in mg-3 is needed, the accessors are automatically generics. /Stefan

Re: Programming racket like in guile

2013-02-23 Thread Stefan Israelsson Tampe
On Saturday, February 23, 2013 08:54:09 AM Daniel Hartwig wrote: For those parts specific to racket, did you consider the (language racket ..) namespace, where an eventual language definition could be placed also? Hmm, my problem with this is that to cover the racket lang is a monumental

Re: Programming racket like in guile

2013-02-23 Thread Stefan Israelsson Tampe
Let me illustrate the problem. Consider macro syntax-parse written in (language racket). My view is that the sourcecode for that code should just have been copied from the racket sources in order to keep the code maintainable. Could we use that macro from whithin a guile scheme program?

Re: Programming racket like in guile

2013-02-24 Thread Stefan Israelsson Tampe
On Sunday, February 24, 2013 10:07:36 PM Ludovic Courtès wrote: What would have been nice IMO is to import, say, ‘syntax-parse’ and contracts, without having to pull in a whole compatibility layer. Ludo’. I would say that I tried more to make syntax-parse independent. contracts on the other

Better generator and iterator support in guile w.r.t. speed

2013-03-05 Thread Stefan Israelsson Tampe
Hi guilers! Inspired by wingo's recent blogage on wingolog in combination with my portings of racket and cl loop frameworks, I did some thinking about generators. Especially inlining. 1. Can we make stubs like this inlinable (iterate (generator g (iterate (for x in l-i-s-t)

Re: Better generator and iterator support in guile w.r.t. speed

2013-03-06 Thread Stefan Israelsson Tampe
Hi all, In my previous mail I did some discussions about what structure to use in order to allow efficient implementatin og generators and one main observation is that the curretn rtl strategy can be used. Now Have you all thought about the stack beeing a must to execute funcitons. Well we have

Re: set! semantics

2013-03-17 Thread Stefan Israelsson Tampe
. Is that right? Best, Noah On Sun, Mar 17, 2013 at 9:07 AM, Stefan Israelsson Tampe stefan.ita...@gmail.com wrote: Dear all, I just noted an issue with a programming style, that I suspect schemers try to avoid but still is quite common in the lisp community and actually makes

Special variables to relax boxing

2013-03-19 Thread Stefan Israelsson Tampe
Hi, I wouldl like to start a discussion of introducing a way to mark variables as special, and by that mean that set! variables does not nessesary get boxed. This is a deviation from the scheme standard but it's pretty useful if one want to set! local variables but make sure that the state of the

Re: Special variables to relax boxing

2013-03-21 Thread Stefan Israelsson Tampe
Weaver m...@netris.org wrote: Hi Stefan, Stefan Israelsson Tampe stefan.ita...@gmail.com writes: I wouldl like to start a discussion of introducing a way to mark variables as special, and by that mean that set! variables does not nessesary get boxed. I don't think you fully understand

Re: Special variables to relax boxing

2013-03-21 Thread Stefan Israelsson Tampe
On Thursday, March 21, 2013 11:35:19 AM Noah Lavine wrote: (lambda () (let ((x 5)) (set! x (compute-1 x)) (set! x (compute-2 x)) x)) becomes (lambda () (let ((k1 (lambda (x) (k2 (compute-2 x (k2 (lambda (x) x))) (k1 (compute-1 x However, this

Re: Special variables to relax boxing

2013-03-21 Thread Stefan Israelsson Tampe
On Thursday, March 21, 2013 03:03:06 PM Mark H Weaver wrote: Stefan, you're still describing your proposal in terms of low-level implementation details such as stacks. In the general case, we cannot store environment structures on the stack. Furthermore, in the general case *all* variables

Re: Special variables to relax boxing

2013-03-22 Thread Stefan Israelsson Tampe
Hi list, Mark and Noah, Yesterday I noticed that the sematics for special variables are quite close to fluids and decied to see if I could model special variables ontop of that with-fluids semantics. That was pretty easy. The basic difference between fluid and special variables is that with

Re: Special variables to relax boxing

2013-03-23 Thread Stefan Israelsson Tampe
Hi guiler, Hi Daniel. I lost this thread in my mail application, sorry, so I try to continue this way instead. * This feature for scheme is mainly for macro writers which knows what they are doing and which only guard state varibles not seen to the application programmer. This is how I use

Re: Special variables to relax boxing

2013-03-23 Thread Stefan Israelsson Tampe
Ok, I have felt your punches against the idea and have thought about it somewhat more. 1. I can only conclude that today it's already difficult to reason about code with respect to multiple restarts of continuation and the main reason is that at least I have been sloppy to add a ! to the macros

Logic programming with prompts

2013-03-24 Thread Stefan Israelsson Tampe
Dear friends, I think that the current state of guile is in a sad state for logic programming with prompts in guile. I really think that we should fix the most pressing issues or stop touting prompts as a way to implement logic programming and direct to kanren or guile-log instead. Issues. 1.

redo-safe-variables and redo-safe-parameters

2013-03-26 Thread Stefan Israelsson Tampe
Dear friends, 1. I will change the name special variables to redo-safe-variables. And the parameter semantic I'm using to redo safe parameters. Itis clumsy but descriptive. 2. To implement these in a good way we need to touch the fundamentals of scheme. If we want to. But the concept is

<    1   2   3   4   5   >