Re: [PATCH, v2] Fix build on ia64

2020-02-09 Thread Stefan Monnier
>> I have actually signed the copyright assignment for the FSF already, but
>> only for gdb/binutils. I asked back then whether it would be possible to
>> sign the copyright assignment for all GNU projects but that was rejected.
> Yeah, that’s not possible.

Companies can do that for their employers's contributions, but
apparently individuals can't do it.  Not sure why that is.


Stefan




Re: Removal of hppa support

2020-01-27 Thread Stefan Monnier
> Initially in Guile I planned to use GNU Lightning, in part because of
> its great platform support.  However it turned out to not be the right
> thing, and reluctantly I ended up doing something that was more like a
> rewrite than a refactor.
[...]
> If someone would like to write an IA64 backend for Lightening, I would

So, do I understand correctly that Light*e*ning is the name you chose
for Guile's rewrite of GNU Lightning?

Do you think it could be useful separately from Guile?


Stefan




Re: Rename GNU fdisk to GUILE diskutils

2017-12-13 Thread Stefan Monnier
> I'm sorry but I do not agree. Guile is not an implementation detail in
> this case. It means that the package is based on Guile. It's like xterm
> (a terminal for x window), gnome-terminal (a terminal based on the GNOME
> framework) and so on.

Hence many users who don't use Gnome won't use gnome-terminal.
Do you really want to use a name which will make users think
"Guile Diskutils ... nope, not for me, I don't use Guile".


Stefan


PS: Also `xterm` indeed only works with the X Window System (contrary to
gnome-terminal which works fine in this here XFCE session).




Re: guile 3 update: more number unboxing improvements

2017-11-29 Thread Stefan Monnier
>   (define (out-of-range x) (error "out of range" x))
>   (define (not-int x) (error "expected an integer" x))
>   (cond
>((fixnum? x)
> (if (<= -10 x 100)
> (* x 2)
> (out-of-range x)))
>((bignum? x)
> (if (<= -10 x 100)
> (* x 2)
> (out-of-range x)))
>(else
> (not-int x)))

Looks a bit like the result of "splitting tails", in this case,
tho selectively.


Stefan




Efficiency of `map` (was: [PATCH] On Hurd, don't use not implemented madvise())

2017-06-08 Thread Stefan Monnier
>   (define (map f l)
> (if (pair? l)
> (cons (f (car l))
>   (map f (cdr l)))
> '()))
>
> whereas we used to have to write code like this in order to support long
> lists without overflowing the stack:
>
>   (define (map f l)
> (let loop ((l l) (out '()))
>   (if (pair? l)
>   (loop (cdr l) (cons (f (car l)) out))
>   (reverse out

Ignoring stack usage, is the first version faster or slower than the second?
[ Or is the speed difference negligible?  ]

How 'bout using a side-effecting `reverse!` (like Lisp's nreverse)?


Stefan




Re: Native code generation and gcc

2016-12-11 Thread Stefan Monnier
> The original GOOPS implementation had a somewhat crazy feature that an
> application of a generic function to a specific argument list first
> resulted in the standard MOP procedure for finding a set of applicable
> methods and, second, from this/these generated something called a "cmethod"
> (compiled method) which, in turn, was stored in a cache as well as applied
> to the list of arguments.

Sounds like the traditional implementation of CLOS, so I wouldn't call
that "crazy".  The reaon is/was that finding the set of applicable
methods and combining them into the resulting "cmethod" was expensive,
hence the need for a cache.


Stefan "who does the same in Emacs's CLOS implementation"




Re: Imporved cons representatoin in guile

2015-07-10 Thread Stefan Monnier
 To compress even further we need a way to could use
 x -[SCM/2/SCM/2], witt SCM/2 the same tagging half the size as the normal

Note that this is not specific to cons-cells.  I've been meaning to try
and experiment with such a box-compression scheme for several years, but
it never got high enough on the todo list (tho I did get a student to
look at it, but he gave up his MSc before getting far enough).

Note that because of set-car! and set-cdr! you need those SCM/2 fields
to be able to hold *any* value.  So an SCM/2 field can hold 3 different
things:
- an immediate value.
- a compressed reference, typically using relative addressing, where
  you'll want the GC to know about them, so it tries to keep/bring
  related objects near each other.
- a proxy reference, which identifies a full SCM cell which contains
  the actual value.  It can be a relative pointer or an index in some
  table.

I imagined it working by dividing the heap into zones whose size
corresponds to the reachability of an SCM/2 relative pointer (so an
SCM/2 field can point to any other object within the same zone without
going through a proxy), and have each zone come with an array
of proxies.

I was thinking about this mostly in the context of 64bit boxes where the
SCM/2 references would basically only ever need to go through proxies once
the process size passes the 4GB limit.  But for small-memory systems
using 32bit pointers, the same idea might work as well.

Interestingly, this split into zones+proxies would also allow the GC to
operate on each zone independently (you don't need to trace the objects
in the other zones, only their proxies).


Stefan




Re: [PATCH] Correct docstring of 'symlink'

2015-03-09 Thread Stefan Monnier
 - Create a symbolic link named @var{oldpath} with the value\n
 - (i.e., pointing to) @var{newpath}.  The return value is\n
 + Create a symbolic link named @var{newpath} with the value\n
 + (i.e., pointing to) @var{oldpath}.  The return value is\n

This is weird terminology.

First the new vs old is meaningless for a symlink since the target may
not even exist.  In man ln the terminology used is link-name vs
target which I think is a lot more clear (Elisp's `make-symbolic-link'
uses filename vs linkname which is not as good).

Second, the GNU coding standards says:

   Please do not use the term pathname that is used in Unix
   documentation; use file name (two words) instead.  We use the term
   path only for search paths, which are lists of directory names.

so none of the two args should be named somethingpath.


Stefan




Re: GNU Thunder

2014-08-27 Thread Stefan Monnier
 This is a link to the PDF which is a Google drive doc:
http://goo.gl/ioTpR7

No, it's not a link to a PDF document.  It's a link to an
HTML+Javascript page that tries to render in your browser some PDF
document (to which I don't seem to have direct access).


Stefan




Re: [PATCH] Initial Guile REPL (guiler) debugger support for GUD.

2014-08-09 Thread Stefan Monnier
   * progmodes/gud.el (guiler): New function.  Starts the Guile REPL;
   add Guile debugger support for GUD.

Looks OK, tho please use the new `setq-local' when setting variables
buffer-locally.


Stefan



Re: [PATCH] Support Guile backtraces in compilation mode.

2014-08-08 Thread Stefan Monnier
 +* Guile backtraces

Please add the Guile version here (ideally, the latest version known to
generate such backtraces).

 +(guile-file ^In \\(.+\\):\n 1)

AFAICT this will mark those lines as errors (aka red) whereas I think
these should be marked as supplemental info (aka green).

Other than that, it looks OK, so if someone wants to install it,
go ahead.


Stefan



Re: GSoC: Emacs Lisp support for GNU Guile

2009-04-06 Thread Stefan Monnier
 ... And notice how the syntax in that message isn't even close to valid Agda!

That is unfair: I copied the type annotations from random places in the
Agda library (and then edited them to make them more interesting).


Stefan


PS: Of course, any sequence of chars (especially funny Unicode symbols)
is potentially valid Agda code (as long as you provide the appropriate
context).




Re: GSoC: Emacs Lisp support for GNU Guile

2009-04-01 Thread Stefan Monnier
 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.

I won't have time to mentor it, but I'd like to point out some relevant
directions in Emacs's future: as some of you know, other than hacking on
Emacs and its weakly typed C code and dynamically typed Lisp code, my
day job revolves around static typing and type theory, which makes for
some frustrations.  But while thinking of how to integrate Miles's
lexical scoping branch, it occurred to me that it would be a good
opportunity to try and combine both lives: with modern type systems (as
seen in Coq, Agda, TSCB, and friends), we can easily accomodate any
valid Lisp code.  While the plan is not fully fledged out yet, I've been
talking to Richard and Chong about it and we'll probably end up using
a variant of Agda's type system in Emacs-24: the code should be 100%
backward compatible, except that to take advantage of the newer features
(like closures, unboxed values, tail recursion, ...), you might need to
add a few simple type annotations at key places, like:

   (defun append (l1 l2)
 (declare (type _∷_ ↓ x ⊛ sequence Γ))
 (if (null l1)
 (withtype l2 ∃ \i - sequence (i ⊕ (1 + max bal)))
   (cons (car l1) (append (cdr l1) l2

As I said, it's not fully fledged out, so take the above example with
a grain of salt.  I didn't really want to talk about it in public yet,
but figured that maybe now would be the right time after all, especially
since Guile people might be interested in it as well.


Stefan