unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* some possible bugs and getting procedure on the top of the stack
@ 2016-03-19 16:59 Alex Vong
  2016-03-19 20:54 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Vong @ 2016-03-19 16:59 UTC (permalink / raw)
  To: help-guix

Hi,

When trying to write some C binding to flex using libguile-2.0, I notice 
<https://www.gnu.org/software/guile/manual/guile.html#C-Support>
the C prototype

C Function:
SCM scm_error (SCM key, char *subr, char *message, SCM args, SCM rest)

is not correct.
It should be

C Function:
void scm_error (SCM key, char *subr, char *message, SCM args, SCM rest)

instead.

Besides, when reading
<https://libreplanet.org/wiki/Group:Guix/GSoC-2016>,
I notice librejs flags the scipts as non-free, such as,
<https://libreplanet.org/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector&*>.
Is this a known issue?

Finally, how should I get the running procedure?
Currently, I am using the following code:

(define my-proc-name
  (lambda _
    (frame-procedure (stack-ref (make-stack #t) 1))))

(my-proc-name)
==> #<procedure my-proc-name _>

Is there better way to achieve this? Can continuation be used to
implement this? My guess is no, since you can only get "the next thing
to do" but not "the current thing you are doing". Am I right?

Off-topic
=========
Also, I think I am interested in being a GSOC student. The project ideas
look tough though! Also, I need a new laptop, the '9' and '0' key
sometimes doesn't work. I guess it is because I am typing too much '('
and ')'.

Cheers,
Alex

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: some possible bugs and getting procedure on the top of the stack
  2016-03-19 16:59 some possible bugs and getting procedure on the top of the stack Alex Vong
@ 2016-03-19 20:54 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-03-19 20:54 UTC (permalink / raw)
  To: Alex Vong; +Cc: help-guix

Hello!

Did you mean to email guile-user@gnu.org?

Alex Vong <alexvong1995@gmail.com> skribis:

> When trying to write some C binding to flex using libguile-2.0, I notice 

FWIW, I’d suggest using something like Danny Dubé’s SILex instead of
writing bindings to Flex.

> Besides, when reading
> <https://libreplanet.org/wiki/Group:Guix/GSoC-2016>,
> I notice librejs flags the scipts as non-free, such as,
> <https://libreplanet.org/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector&*>.
> Is this a known issue?

No, probably worth reporting the the web site admins?

> Finally, how should I get the running procedure?
> Currently, I am using the following code:
>
> (define my-proc-name
>   (lambda _
>     (frame-procedure (stack-ref (make-stack #t) 1))))
>
> (my-proc-name)
> ==> #<procedure my-proc-name _>
>
> Is there better way to achieve this? Can continuation be used to
> implement this? My guess is no, since you can only get "the next thing
> to do" but not "the current thing you are doing". Am I right?

Right.  However, note that the above may not always work especially on
Guile 2.1/2.2.

> Off-topic
> =========
> Also, I think I am interested in being a GSOC student. The project ideas
> look tough though! Also, I need a new laptop, the '9' and '0' key
> sometimes doesn't work. I guess it is because I am typing too much '('
> and ')'.

:-)

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-19 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-19 16:59 some possible bugs and getting procedure on the top of the stack Alex Vong
2016-03-19 20:54 ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).