unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Blake Shaw <blake@nonconstructivism.com>
To: Olivier Dion <olivier.dion@polymtl.ca>
Cc: guile-user@gnu.org
Subject: Re: good papers on graphics in scheme/lisp?
Date: Fri, 04 Mar 2022 02:10:15 +0700	[thread overview]
Message-ID: <871qzilunc.fsf@nonconstructivism.com> (raw)

Olivier Dion <olivier.dion@polymtl.ca> writes:

> On Wed, 02 Mar 2022, Blake Shaw <blake@nonconstructivism.com> wrote:
>
>> Next week I will start working on my installation /Scribble Jam/ for
>> iLight Singapore[2], and I'm planning to do it all in Guile OpenGL +
>> GLSL. I've started fiddling with Guile OpenGL and it seems pretty
>> complete and performant (I haven't experienced any GC hiccups from the
>> small stress tests I've put it through, but its still only minor
>> stuff).
>
>> There is still a chance I might choose to create a Guile
>> interface to a subset of the C++ OpenFrameworks[3] library
>
> FFI for C++ is a real pain to do.  You can't juste use plain Scheme (at
> least I don't know how for C++).  If you go that route, I have C++
> templates that can help you for the glue between Scheme and C++
> (e.g. std::vector, std::map, std::string).

Thanks for this heads up, I've been curious about the C++ FFI experience
in Guile (while less excited about actually getting into the
weeds). If I go this route, I'll probably wind up approaching it from
using libguile, adding a guile interpreter as an abstraction layer over 
the creative coding I'm doing in C++, as my experience with that has so
far been pretty straight forward (in pure C). But I also worry that if
I go down this route, out of habit and familiarity I'll for the most
part just end up doing the whole thing in C++, with Guile acting as more
of a sort of controller for livecoding. Which could end up really great!
I'll be putting a couple days aside this coming week to take it for a
test drive with old projects to see how it feels.

But after some hacking tonight I'm feeling pretty excited about the
pure-Scheme route, so if it appears feasible after weighing my options
it will certainly be the direction I head in.
>
>> Also, one last thing, I'm considering attempting to create a DSL that
>> compiles to a subset of GLSL like Chicken's GLLS library[4], as I'm
>> becoming more and more interested in compilation. I remember reading
>> somewhere about a Guile library that allows you to write C in Guile,
>
> I think you are refering to
> <http://sph.mn/computer/guides/c/c-indent.html>.
>
Yes! thank you so much, this is it. And looking through the code base I
can see there are already some pieces there that seem to illustrate how
to work out formatting issues I was confused by as a newcomer to
srfi-159 (which is amazing, I might add for folks searching the
archive. go check it out ASAP:). I've also come across srfi-166, which
is Alex Shinn (same author)'s monadic formatting procedure that deprecates
fmt/srfi-159 in order to improve accuracy and safety, which apparently
caused some minor headaches in glls. so I'll probably be porting
srfi-166 to guile as well :)

I've actually gone ahead and started porting GLLS to Guile and to my
astonishment its been a piece of cake so far. If I keep up this pace I
could even have a working prototyp by the end of the weekend -- but that
just seems to good to be true (am I finally acquiring the famed lisp
super powers? tbd) 
> There's also <https://www.nongnu.org/nyacc/> that can be helpful if
> you're familiar with LALR(1) parsers.
>
> Regards,
> old
yes! nyacc has been extremely helpful. great software, my thanks to the
authors, I was even able to use it to wrap glValidateProgram, which
seems to be fine "out of the box", so to speek.

thanks!
b

-- 
“In girum imus nocte et consumimur igni”



             reply	other threads:[~2022-03-03 19:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 19:10 Blake Shaw [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-04 18:18 good papers on graphics in scheme/lisp? Blake Shaw
2022-03-03 19:29 Blake Shaw
2022-03-03 22:35 ` Matt Wette
2022-03-04  5:42   ` tomas
2022-03-03 11:36 Blake Shaw
2022-03-02 16:56 Blake Shaw
2022-03-02 17:34 ` Olivier Dion via General Guile related discussions
2022-03-02 17:42   ` tomas
2022-03-02 18:12 ` Aleix Conchillo Flaqué

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=871qzilunc.fsf@nonconstructivism.com \
    --to=blake@nonconstructivism.com \
    --cc=guile-user@gnu.org \
    --cc=olivier.dion@polymtl.ca \
    /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).