From: Daniel Kraft <d@domob.eu>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Updated Guile Tutorial
Date: Thu, 13 Aug 2009 09:43:10 +0200 [thread overview]
Message-ID: <4A83C40E.3010206@domob.eu> (raw)
In-Reply-To: <m3ljlollb7.fsf@pobox.com>
Hi Andy,
thanks for your comments and checking over my revised tutorial!
Andy Wingo wrote:
> A few comments, IMO of course. Neil probably has a better perspective.
I agree with you in general on those, and will try what I can improve on
them; so please wait with a commit in any case ;) Should I think that
the current version is best of all my trials, I'll also let you know...
> 1) It would be better to have a more neutral narrator -- not a
> first-person narrator. If you feel like you need to speak from the
> first person, use "we". OTOH your style is infectious :), so perhaps
> it would work as "Guile Tutorial, by Daniel Kraft" :)
That's something I usually also try to achieve in writings "like that"
-- however, I liked the original's style and tried to get my own version
in the same spirit. Here, I'm not sure if I can get rid of first person
entirely; and I think I tried to use "we" wherever possible, but for
stuff like "I wanted to use Gtk+ but resided finally to Gnuplot
because..." I'm not sure how to do this; overall, it's really meant from
the author's perspective and not something like "we're going to do that
now".
I'll still try to work over the text when I find time and maybe I can
reformulate it -- concrete suggestions are welcome, if you stumble upon
certain passages, of course.
> 2) Don't mention the history of the tutorial. Just have it be a current
> document.
I wanted to give credits to the original author, but you're right that I
should probably move this to some concluding section. As you make me
think about that, I also need to add a GNU FDL note somewhere.
> 3) In general, use short sentences. Let your words breathe.
Ok, I'll see what can be done there; I just fear that this is a
remainder of German being my native language, so I'm usually not content
with short sentences...
> 4) If you're forking to run gnuplot, why not do so from Scheme? Of
> course if you did that it would obviate the whole "extending C"
> story, but still, if given this particular problem, that's what I'd
> do.
I've never tried this actually myself, but I think it would not be too
hard to implement all of this in Scheme alone; but as you mentioned, I
just needed something to write in C ;)
But if you've got a suggestion as what I could reasonable still change
(maybe some final remarks that this example would also be possible in
Scheme) I'll consider it.
> 5) Running a main loop (as gtk+ does) and a REPL is indeed an
> interesting problem. See event-repl.scm or graphical-repl.scm in
> guile-gnome for a couple of takes.
I imagine the "correct" solution would be to start the REPL in a
seperate thread and do drawing by updating some shared data structure
that is read and rendered from the Gtk+ loop's exposed-callbacks; or
something alike.
This shouldn't be too hard if we wanted to implement a clean program
anyways, but for means of the tutorial I think the current version is
better.
> 6) I wish we had a better Scheme->C story; our C->Scheme story is fine,
> but a better FFI would be nice.
I'm not sure about that... For all I did so far, the Scheme->C stuff I
regard also as quite good. The only thing is that you need to write
wrappers for each function; so maybe we could try to get a FFI where you
can just define the interface of a C function and Guile does the SCM
boxing/unboxing accordingly on calls. Are there already plans (or at
least the concrete desire) to do stuff like this? I think at least for
some very basic functionality it should not be too hard to do?
Cheers,
Daniel
--
Done: Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri
next prev parent reply other threads:[~2009-08-13 7:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 18:34 Updated Guile Tutorial Daniel Kraft
2009-08-12 22:27 ` Andy Wingo
2009-08-13 7:43 ` Daniel Kraft [this message]
2009-08-24 15:39 ` Daniel Kraft
2009-09-20 16:35 ` Neil Jerram
2009-09-20 20:31 ` Daniel Kraft
2010-08-19 5:41 ` Andy Wingo
2010-08-21 14:38 ` Daniel Kraft
2010-08-28 18:46 ` Andy Wingo
2009-09-20 16:42 ` Neil Jerram
2009-09-20 17:17 ` Chris Bryant
2009-09-20 21:13 ` Neil Jerram
2009-09-20 17:18 ` Chris Bryant
-- strict thread matches above, loose matches on Subject: below --
2010-09-07 13:17 Daniel Kraft
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A83C40E.3010206@domob.eu \
--to=d@domob.eu \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).