unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Re: good papers on graphics in scheme/lisp?
@ 2022-03-04 18:18 Blake Shaw
  0 siblings, 0 replies; 10+ messages in thread
From: Blake Shaw @ 2022-03-04 18:18 UTC (permalink / raw)
  To: Matt Wette; +Cc: guile-user

Matt Wette <matt.wette@gmail.com> writes:

> On 3/3/22 11:29 AM, Blake Shaw wrote:
>> <tomas@tuxteam.de> writes:
>>
>>> On Wed, Mar 02, 2022 at 12:34:32PM -0500, Olivier Dion via General
>>> Guile related discussions wrote:
>>>> On Wed, 02 Mar 2022, Blake Shaw <blake@nonconstructivism.com> wrote:
>>> [...]
>>>
>>>>> 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>.
>>>>
>>>> There's also <https://www.nongnu.org/nyacc/> that can be helpful if
>>>> you're familiar with LALR(1) parsers.
>>> Actually NYACC comes with a pretty complete C99 compiler [1], which is
>>> used to generate FFI bindings. So perhaps using that as a stepping stone
>>> towards GLSL doesn't sound that crazy...
>>>
>>> Cheers
>>>
>>> [1] https://www.nongnu.org/nyacc/nyacc-c99-ug.html
>> oh wow i didn't see that it ships with a c99 parser, I have only touched
>> the FFI helper -- thanks for pointing me here, this is a massive leg up.
>>
>> sounding less and less crazy by the minute :)
>>
>
> Note nyacc comes with a c99 parser, not compiler.  mes has the back end.
>
> The best paper I read on C++ for FFI was the one wrapping Qt for python,
> but that was many years ago.  I found this more recent link:
>     https://doc.qt.io/qtforpython/shiboken6/shibokengenerator.html
> Maybe it can be helpful..
>
> Matt
>
This looks like great help, thanks!

ez,
b

-- 
“In girum imus nocte et consumimur igni”



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

* Re: good papers on graphics in scheme/lisp?
  2022-03-03 22:35 ` Matt Wette
@ 2022-03-04  5:42   ` tomas
  0 siblings, 0 replies; 10+ messages in thread
From: tomas @ 2022-03-04  5:42 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

On Thu, Mar 03, 2022 at 02:35:09PM -0800, Matt Wette wrote:
> On 3/3/22 11:29 AM, Blake Shaw wrote:
> > <tomas@tuxteam.de> writes:

[...]

> > > Actually NYACC comes with a pretty complete C99 compiler [1], [...]

> Note nyacc comes with a c99 parser, not compiler.  mes has the back end.

Oops. I did write `compiler', did I?

Sorry for the confusion.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: good papers on graphics in scheme/lisp?
  2022-03-03 19:29 Blake Shaw
@ 2022-03-03 22:35 ` Matt Wette
  2022-03-04  5:42   ` tomas
  0 siblings, 1 reply; 10+ messages in thread
From: Matt Wette @ 2022-03-03 22:35 UTC (permalink / raw)
  To: guile-user

On 3/3/22 11:29 AM, Blake Shaw wrote:
> <tomas@tuxteam.de> writes:
>
>> On Wed, Mar 02, 2022 at 12:34:32PM -0500, Olivier Dion via General
>> Guile related discussions wrote:
>>> On Wed, 02 Mar 2022, Blake Shaw <blake@nonconstructivism.com> wrote:
>> [...]
>>
>>>> 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>.
>>>
>>> There's also <https://www.nongnu.org/nyacc/> that can be helpful if
>>> you're familiar with LALR(1) parsers.
>> Actually NYACC comes with a pretty complete C99 compiler [1], which is
>> used to generate FFI bindings. So perhaps using that as a stepping stone
>> towards GLSL doesn't sound that crazy...
>>
>> Cheers
>>
>> [1] https://www.nongnu.org/nyacc/nyacc-c99-ug.html
> oh wow i didn't see that it ships with a c99 parser, I have only touched
> the FFI helper -- thanks for pointing me here, this is a massive leg up.
>
> sounding less and less crazy by the minute :)
>

Note nyacc comes with a c99 parser, not compiler.  mes has the back end.

The best paper I read on C++ for FFI was the one wrapping Qt for python,
but that was many years ago.  I found this more recent link:
     https://doc.qt.io/qtforpython/shiboken6/shibokengenerator.html
Maybe it can be helpful..

Matt



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

* Re: good papers on graphics in scheme/lisp?
@ 2022-03-03 19:29 Blake Shaw
  2022-03-03 22:35 ` Matt Wette
  0 siblings, 1 reply; 10+ messages in thread
From: Blake Shaw @ 2022-03-03 19:29 UTC (permalink / raw)
  To: tomas; +Cc: Olivier Dion, guile-user

<tomas@tuxteam.de> writes:

> On Wed, Mar 02, 2022 at 12:34:32PM -0500, Olivier Dion via General
> Guile related discussions wrote:
>> On Wed, 02 Mar 2022, Blake Shaw <blake@nonconstructivism.com> wrote:
>
> [...]
>
>> > 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>.
>> 
>> There's also <https://www.nongnu.org/nyacc/> that can be helpful if
>> you're familiar with LALR(1) parsers.
>
> Actually NYACC comes with a pretty complete C99 compiler [1], which is
> used to generate FFI bindings. So perhaps using that as a stepping stone
> towards GLSL doesn't sound that crazy...
>
> Cheers
>
> [1] https://www.nongnu.org/nyacc/nyacc-c99-ug.html
oh wow i didn't see that it ships with a c99 parser, I have only touched
the FFI helper -- thanks for pointing me here, this is a massive leg up.

sounding less and less crazy by the minute :)

-- 
“In girum imus nocte et consumimur igni”



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

* Re: good papers on graphics in scheme/lisp?
@ 2022-03-03 19:10 Blake Shaw
  0 siblings, 0 replies; 10+ messages in thread
From: Blake Shaw @ 2022-03-03 19:10 UTC (permalink / raw)
  To: Olivier Dion; +Cc: guile-user

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”



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

* Re: good papers on graphics in scheme/lisp?
@ 2022-03-03 11:36 Blake Shaw
  0 siblings, 0 replies; 10+ messages in thread
From: Blake Shaw @ 2022-03-03 11:36 UTC (permalink / raw)
  To: Aleix Conchillo Flaqué; +Cc: guile-user

Hi Alex!

Aleix Conchillo Flaqué <aconchillo@gmail.com> writes:

> On Wed, Mar 2, 2022 at 8:57 AM Blake Shaw <blake@nonconstructivism.com
>> wrote:
>
>     Hiya Guilers,
>
> Hi!
>
>     But anyway, thats not actually what I came here to discuss. I
>     usually
>     like to use these commissions to dive into some good literature
>     and
>     experiment with novel techniques along the way. I know I have read
>     in
>     in the past that Lisp actually has quite a long history of being
>     used
>     in VFX, and I'm wondering if anyone here knows of any decent
>     papers that
>     discuss the use of Lisp in general, and perhaps Scheme in
>     particular,
>     for rendering graphics. Having some nice literature to dig into
>     along
>     the way makes doing this kind of work all the more enjoyable.
>
> I don't really know what I'm talking about but maybe you find some
> inspiration in https://github.com/libfive/libfive
> Aleix
>

Yes, I have looked at it a bit. Very cool/impressive project! But it
seems very-specifically oriented toward the domain of parametric
design. I still need to do a proper dive into the C++, but I'm sure it
will be a very useful reference to steal ideas from.

Thanks for the heads up :)

-- 
“In girum imus nocte et consumimur igni”



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

* Re: good papers on graphics in scheme/lisp?
  2022-03-02 16:56 Blake Shaw
  2022-03-02 17:34 ` Olivier Dion via General Guile related discussions
@ 2022-03-02 18:12 ` Aleix Conchillo Flaqué
  1 sibling, 0 replies; 10+ messages in thread
From: Aleix Conchillo Flaqué @ 2022-03-02 18:12 UTC (permalink / raw)
  To: Blake Shaw; +Cc: guile-user

On Wed, Mar 2, 2022 at 8:57 AM Blake Shaw <blake@nonconstructivism.com>
wrote:

> Hiya Guilers,
>
>
Hi!

> But anyway, thats not actually what I came here to discuss. I usually
> like to use these commissions to dive into some good literature and
> experiment with novel techniques along the way. I know I have read in
> in the past that Lisp actually has quite a long history of being used
> in VFX, and I'm wondering if anyone here knows of any decent papers that
> discuss the use of Lisp in general, and perhaps Scheme in particular,
> for rendering graphics. Having some nice literature to dig into along
> the way makes doing this kind of work all the more enjoyable.
>
>
I don't really know what I'm talking about but maybe you find some
inspiration in https://github.com/libfive/libfive
Aleix


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

* Re: good papers on graphics in scheme/lisp?
  2022-03-02 17:34 ` Olivier Dion via General Guile related discussions
@ 2022-03-02 17:42   ` tomas
  0 siblings, 0 replies; 10+ messages in thread
From: tomas @ 2022-03-02 17:42 UTC (permalink / raw)
  To: Olivier Dion; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

On Wed, Mar 02, 2022 at 12:34:32PM -0500, Olivier Dion via General Guile related discussions wrote:
> On Wed, 02 Mar 2022, Blake Shaw <blake@nonconstructivism.com> wrote:

[...]

> > 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>.
> 
> There's also <https://www.nongnu.org/nyacc/> that can be helpful if
> you're familiar with LALR(1) parsers.

Actually NYACC comes with a pretty complete C99 compiler [1], which is
used to generate FFI bindings. So perhaps using that as a stepping stone
towards GLSL doesn't sound that crazy...

Cheers

[1] https://www.nongnu.org/nyacc/nyacc-c99-ug.html

-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: good papers on graphics in scheme/lisp?
  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é
  1 sibling, 1 reply; 10+ messages in thread
From: Olivier Dion via General Guile related discussions @ 2022-03-02 17:34 UTC (permalink / raw)
  To: Blake Shaw, guile-user

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).

> 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>.

There's also <https://www.nongnu.org/nyacc/> that can be helpful if
you're familiar with LALR(1) parsers.

Regards,
old

-- 
Olivier Dion
Polymtl



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

* good papers on graphics in scheme/lisp?
@ 2022-03-02 16:56 Blake Shaw
  2022-03-02 17:34 ` Olivier Dion via General Guile related discussions
  2022-03-02 18:12 ` Aleix Conchillo Flaqué
  0 siblings, 2 replies; 10+ messages in thread
From: Blake Shaw @ 2022-03-02 16:56 UTC (permalink / raw)
  To: guile-user

Hiya Guilers,

Blake here, who delivered the presentation on the Guile documentation
for Guix Days recently[1]. I'm in the process of gathering a summary
of the proposed changes which I'll send out in the next week or two,
but in the meantime I was hoping I can pick your brains on other
matters.

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, which I have a fair amount
of production experience with, to create something equivalent to
Clojure's Quil which wraps Processing, but I won't decide until I do a
little solo hackathon this weekend to compare the two options. 

But anyway, thats not actually what I came here to discuss. I usually
like to use these commissions to dive into some good literature and
experiment with novel techniques along the way. I know I have read in
in the past that Lisp actually has quite a long history of being used
in VFX, and I'm wondering if anyone here knows of any decent papers that
discuss the use of Lisp in general, and perhaps Scheme in particular,
for rendering graphics. Having some nice literature to dig into along
the way makes doing this kind of work all the more enjoyable. 

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, and
figure that could be a good source, as GLSL is C-like. Does anybody know
what project I'm talking about, and where I can find it? I've searched
quite a bit but can't find it -- nevertheless, I'm convinced it was a
guile project and I wasn't merely mixing things up.

thanks & happy hacking!

Footnotes:
----------
[1] https://xana.lepiller.eu/guix-days-2022/guix-days-2022-documentation.mp4
[2] it's discussed in the above video within the first 20 min for those
    interested
[3] https://openframeworks.cc/
[4] http://wiki.call-cc.org/eggref/5/glls

ez,
b

-- 
“In girum imus nocte et consumimur igni”



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

end of thread, other threads:[~2022-03-04 18:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 18:18 good papers on graphics in scheme/lisp? Blake Shaw
  -- strict thread matches above, loose matches on Subject: below --
2022-03-03 19:29 Blake Shaw
2022-03-03 22:35 ` Matt Wette
2022-03-04  5:42   ` tomas
2022-03-03 19:10 Blake Shaw
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é

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).