Filippo A. Salustri | 6 May 2004 18:26
Picon
Favicon
Gravatar

Re: Can't compile 0.7.4.2

Weirder and weirder.

I installed the 'sandwich' patch, per your advice, but 'make' fails.  It 
seems like it's trying to call gosh before compiling it.  It's been years 
since I had to deal with C and make and maybe I'm just rusty.

Here's the first error generated by make (a fragment of make's output)

ranlib .libs/libgc.a
creating libgc.la
(cd .libs && rm -f libgc.la && ln -s ../libgc.la libgc.la)
make[2]: Leaving directory `/usr/local/src/languages/GaucheTest-0.7.4.2/gc'
make[1]: Leaving directory `/usr/local/src/languages/GaucheTest-0.7.4.2/gc'
make[1]: Entering directory `/usr/local/src/languages/GaucheTest-0.7.4.2/src'
gosh -A../lib ./builtin-syms.scm
/bin/bash: gosh: command not found
make[1]: *** [gauche/builtin-syms.h] Error 127
make[1]: Leaving directory `/usr/local/src/languages/GaucheTest-0.7.4.2/src'
make[1]: Entering directory `/usr/local/src/languages/GaucheTest-0.7.4.2/lib'

Note: I get this from configure (I have all along, but didn't notice 
previously)
 > checking whether Solaris gcc optimization fix is necessary... yes

Any ideas?

Cheers.
Fil

Shiro Kawai wrote:
(Continue reading)

Shiro Kawai | 6 May 2004 19:56
Favicon

Re: Can't compile 0.7.4.2

Yes, Gauche needs gosh to build from scrach (classical bootstrap
problem), but the tarball distribution includes the generated
files so that you don't have this problem usually.

I guess somehow the timestamp of your files changed and make
thinks it needs to regenerate those files.   Check gauche/builtin-syms.h
and if you have one, touch it:

 % touch gauche/builtin-syms.h

(If you really lost the generated file somehow, you can copy it
from the 0.7.4.2 tarball).

About 'Solaris gcc optimization fix'---it is from Boehm GC, and
I never knew that, but looking at gc/configure.in it seems that
solaris gcc doesn't work well with -O option.  Interesting.

Is it a option to update gcc?  Since I could build Gauche on
Solaris9/gcc3.3.2, it may be something in gcc that has been
solved in the recent versions.

--shiro

From: "Filippo A. Salustri" <salustri <at> ryerson.ca>
Subject: Re: [Gauche-devel] Can't compile 0.7.4.2
Date: Thu, 06 May 2004 12:26:44 -0400

> Weirder and weirder.
> 
> I installed the 'sandwich' patch, per your advice, but 'make' fails.  It 
(Continue reading)

Makoto Satoh | 7 May 2004 02:52
Picon
Favicon

Second prompt in gosh

Hi,

I think it would be better to have second prompt in gosh like;

$ gosh
gosh> (define (foo bar) [return]
gosh| 

Because users usually want to indent the lines. Users can save
the 6 white spaces.

In Python, we get;

$ python
Python 2.3.2 (#1, Apr 13 2004, 11:14:15)
[GCC 3.3.3 [FreeBSD] 20031106] on freebsd5
Type "help", "copyright", "credits" or "license" for more information.
>>> def hoge():
...

--makoto

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
Shiro Kawai | 7 May 2004 05:05
Favicon

Re: Second prompt in gosh

From: Makoto Satoh <makotosato2 <at> yahoo.co.jp>
Subject: [Gauche-devel] Second prompt in gosh
Date: Fri, 7 May 2004 09:52:42 +0900 (JST)

> Hi,
> 
> I think it would be better to have second prompt in gosh like;
> 
> $ gosh
> gosh> (define (foo bar) [return]
> gosh| 
> 
> Because users usually want to indent the lines. Users can save
> the 6 white spaces.
> 
> In Python, we get;
> 
> $ python
> Python 2.3.2 (#1, Apr 13 2004, 11:14:15)
> [GCC 3.3.3 [FreeBSD] 20031106] on freebsd5
> Type "help", "copyright", "credits" or "license" for more information.
> >>> def hoge():
> ...

I like to keep the 'core' REPL lightweight, and let other
tools handle this issue.  For example, if you're running
gosh within Emacs, you can type LF (\C-J) at the line end
and Emacs inserts suitable indent for the next line.

Also, having second prompt doesn't work well if you want
(Continue reading)

Filippo A. Salustri | 10 May 2004 23:02
Picon
Favicon
Gravatar

Re: Can't compile 0.7.4.2

Finally got it to "work" (well, not work, but at least different behavior.

Now, with the mods to src/Makefile.in and src/main.c, I get errors that all 
look like:

 > ../..//src/gosh -ftest genstub mt-lib.stub
 > ld.so.1: ../..//src/gosh: fatal: relocation error: file ../..//src/gosh: 
symbol Scm__datastart_libgauche: referenced symbol not found
 > make[2]: *** [mt-lib.c] Killed

I get these errors in the same place as I used to be the %autoload not 
found errors.

I just may have to move to a newer compiler, I guess.  I'm loathe to do 
that tho cuz I can never tell what else might break on my computer.  And 
I've not had any other trouble with gcc 3.1 before....  Maybe in June I'll 
give it a shot.

I'll advise if I come up with any other interesting information.

Cheers.
Fil

Shiro Kawai wrote:
> Yes, Gauche needs gosh to build from scrach (classical bootstrap
> problem), but the tarball distribution includes the generated
> files so that you don't have this problem usually.
> 
> I guess somehow the timestamp of your files changed and make
> thinks it needs to regenerate those files.   Check gauche/builtin-syms.h
(Continue reading)

Shiro Kawai | 11 May 2004 05:26
Favicon

Re: Can't compile 0.7.4.2

From: "Filippo A. Salustri" <salustri <at> ryerson.ca>
Subject: Re: [Gauche-devel] Can't compile 0.7.4.2
Date: Mon, 10 May 2004 17:02:28 -0400

>  > ../..//src/gosh -ftest genstub mt-lib.stub
>  > ld.so.1: ../..//src/gosh: fatal: relocation error: file ../..//src/gosh: 
> symbol Scm__datastart_libgauche: referenced symbol not found
>  > make[2]: *** [mt-lib.c] Killed
> 
> I get these errors in the same place as I used to be the %autoload not 
> found errors.

Oops, that seems libgauche.so isn't linking libgauche_head.o
Have you regenerated Makefile by running ./configure?

But anyways, I don't want to waste your time... I hope at some point
you have time to try it again.

There are some suspicious place that might cause GC problems in 0.7.4.2,
and I'm going to include fix for them in the next release.

--shiro

> I just may have to move to a newer compiler, I guess.  I'm loathe to do 
> that tho cuz I can never tell what else might break on my computer.  And 
> I've not had any other trouble with gcc 3.1 before....  Maybe in June I'll 
> give it a shot.
> 
> I'll advise if I come up with any other interesting information.
> 
(Continue reading)

Shiro Kawai | 21 May 2004 12:13
Favicon

Re: wrapper objects, more fun with the mop

I finally managed to fix the generic function application MOP,
so you don't need object-apply to use user-defined generic.
Also :class keyword is added to define-generic.

lib/object.scm,v 1.53
src/vm.c, v 1.211
src/class.c,v 1.112

Both of your examples run without object-apply and define-generic*.
See test/object.scm, v 1.35

--shiro

From: Alex Shinn <foof <at> synthcode.com>
Subject: Re: [Gauche-devel] wrapper objects, more fun with the mop
Date: Fri, 02 Apr 2004 12:59:53 +0900

> At Wed, 31 Mar 2004 08:37:23 +0900, alex wrote:
> > 
> > Another use is aspect-oriented programming, but I think the wrappers
> > makes a better example.
> 
> I just thought of another good example.  Suppose we have Perl envy and
> are tired of explicit conversions between strings and numbers.  We can
> define a generic subclass that knows how to perform automatic type
> coercions when no other method can be found:
> 
> (define-class <coercer-generic> (<generic>) ())
> 
> ;; provisional, pending a :class argument
(Continue reading)

Shiro Kawai | 23 May 2004 09:00
Favicon

Gauche 0.8

0.8 is out!

It's been for a while since the last release.  I reviewed ML 
archive and tried to fix all reported problems as much as I can,
but there may be something I missed.  If you've reported a
problem and haven't got back from me (or just got my ack and
don't see the fix), it's likely that I forget about it.  Please
remind me if so.   My GC is erroneous and sometimes it collects 
active information prematurely.

This release doesn't include many shiny new features, but lots
of small fixes and additions.

One of two obvious new features is a 'gauche-package' script.
(Another one is Andrew Wright's match macro).
It's just a tiny simple-minded script that allows installation
of Gauche extension package with one line:

  gauche-package install http://www.example.com/packages/Package-1.0.tar.gz

Check out the manual's "Porgramming in Gauche" -> "Using extension packages"
section for the details.

The release note follows.

* *New Features*

    o Auxiliary scripts: Gauche now installs a few scripts
      that help to build and install extension packages. The
      gauche-package script handles download, unpacking,
(Continue reading)

Alex Shinn | 27 May 2004 09:32

Re: wrapper objects, more fun with the mop

At Fri, 21 May 2004 00:13:03 -1000 (HST), Shiro Kawai wrote:
> 
> I finally managed to fix the generic function application MOP,
> so you don't need object-apply to use user-defined generic.
> Also :class keyword is added to define-generic.

Thanks, Shiro, I needed this!

I'm trying to use generic functions to implement a capability-based
security model.  The idea is you run untrusted code in an restricted
environment, which among other things excludes access to slot-ref and
slot-set!.  Thus objects become truly opaque and the only way to
access them is through whatever generic functions (capabilities)
you've been given.

So far I have the following [long]:

(define-class <access-generic> (<generic>) ())

(define-method apply-generic ((gf <access-generic>) args)
  (if (apply has-permission? gf args)
    (next-method)
    (error "access denied")))

(define-method has-permission? (gf . rest)
  #f)

Then for given generic functions and argument combinations you can
return #t for has-permission? thus granting the capability.  For
example, consider a kill command:
(Continue reading)

Alex Shinn | 27 May 2004 09:39

Re: wrapper objects, more fun with the mop

At Thu, 27 May 2004 02:32:36 -0500, Alex Shinn wrote:
> 
> (define-method has-permission?
>      ((gf <access-generic>) (u <user>) (p <program>))
>   (equal? (slot-ref u 'uid) (slot-ref 'p 'uid)))

Sorry, that should be

(define-method has-permission?
     ((gf <access-generic>) (u <user>) (p <program>))
  (equal? (slot-ref p 'owner) u))

--

-- 
Alex

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

Gmane