unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Simple picture language
@ 2018-03-26 21:51 Ricardo Wurmus
  2018-03-27  1:18 ` Christopher Lemmer Webber
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2018-03-26 21:51 UTC (permalink / raw)
  To: guile-devel

Hi Guilers,

I wrote a simple SVG-based picture language.  To try it:

    wget https://elephly.net/downies/pict.scm

Then start geiser in Emacs and load the module:

    M-x run-guile
    (add-to-load-path (getcwd))
    ,use (pict)

Let’s play!

    (circle 100)
    (colorize (circle 100) "red")

    ,use (srfi srfi-1)
    ,use (srfi srfi-26)
    (apply hc-append (map (cut circle <>) (iota 10 2 4)))

    (apply cc-superimpose (map (cut circle <>) (iota 10 2 4)))

    (apply hc-append (map (cut rotate (rectangle 10 30) <>) (iota 36 0 10)))

    (apply cc-superimpose (map (cut rotate (triangle 100 300) <>) (iota 36 0 10)))

And so on.

There’s also “blur”, but it doesn’t show up right in Geiser; it seems
that Emacs doesn’t render SVG filters.

What do you think?

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





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

* Re: Simple picture language
  2018-03-26 21:51 Simple picture language Ricardo Wurmus
@ 2018-03-27  1:18 ` Christopher Lemmer Webber
  2018-03-27 12:40 ` Thompson, David
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Christopher Lemmer Webber @ 2018-03-27  1:18 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guile-devel

Hey Ricardo!  Super cool that you were able to get this working so fast!
:)  I look forward to trying it when I get some spare cycles to breathe.


Ricardo Wurmus writes:

> Hi Guilers,
>
> I wrote a simple SVG-based picture language.  To try it:
>
>     wget https://elephly.net/downies/pict.scm
>
> Then start geiser in Emacs and load the module:
>
>     M-x run-guile
>     (add-to-load-path (getcwd))
>     ,use (pict)
>
> Let’s play!
>
>     (circle 100)
>     (colorize (circle 100) "red")
>
>     ,use (srfi srfi-1)
>     ,use (srfi srfi-26)
>     (apply hc-append (map (cut circle <>) (iota 10 2 4)))
>
>     (apply cc-superimpose (map (cut circle <>) (iota 10 2 4)))
>
>     (apply hc-append (map (cut rotate (rectangle 10 30) <>) (iota 36 0 10)))
>
>     (apply cc-superimpose (map (cut rotate (triangle 100 300) <>) (iota 36 0 10)))
>
> And so on.
>
> There’s also “blur”, but it doesn’t show up right in Geiser; it seems
> that Emacs doesn’t render SVG filters.
>
> What do you think?



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

* Re: Simple picture language
  2018-03-26 21:51 Simple picture language Ricardo Wurmus
  2018-03-27  1:18 ` Christopher Lemmer Webber
@ 2018-03-27 12:40 ` Thompson, David
  2018-03-27 12:47   ` Matt Wette
  2018-04-01 21:04 ` tomas
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Thompson, David @ 2018-03-27 12:40 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guile-devel

On Mon, Mar 26, 2018 at 5:51 PM, Ricardo Wurmus <rekado@elephly.net> wrote:
> Hi Guilers,
>
> I wrote a simple SVG-based picture language.

Wow! I never would have thought to use sxml to generate svg files. I
always thought we would have to use cairo or some custom renderer in
order to have a picture language. This is a great hack!

- Dave



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

* Re: Simple picture language
  2018-03-27 12:40 ` Thompson, David
@ 2018-03-27 12:47   ` Matt Wette
  2018-03-31 20:51     ` Neil Jerram
  0 siblings, 1 reply; 9+ messages in thread
From: Matt Wette @ 2018-03-27 12:47 UTC (permalink / raw)
  To: guile-devel



On 03/27/2018 05:40 AM, Thompson, David wrote:
> On Mon, Mar 26, 2018 at 5:51 PM, Ricardo Wurmus <rekado@elephly.net> wrote:
>> Hi Guilers,
>>
>> I wrote a simple SVG-based picture language.
> Wow! I never would have thought to use sxml to generate svg files. I
> always thought we would have to use cairo or some custom renderer in
> order to have a picture language. This is a great hack!
>

Read Andy Wingo's paper on tree fold (mentioned in the Guile Manual).
I also use sxml for svg but never realized images could be rendered with 
Geiser.
Pretty sweet.

Matt





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

* Re: Simple picture language
  2018-03-27 12:47   ` Matt Wette
@ 2018-03-31 20:51     ` Neil Jerram
  0 siblings, 0 replies; 9+ messages in thread
From: Neil Jerram @ 2018-03-31 20:51 UTC (permalink / raw)
  To: guile-devel

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

> On 03/27/2018 05:40 AM, Thompson, David wrote:
>> On Mon, Mar 26, 2018 at 5:51 PM, Ricardo Wurmus <rekado@elephly.net> wrote:
>>> Hi Guilers,
>>>
>>> I wrote a simple SVG-based picture language.
>> Wow! I never would have thought to use sxml to generate svg files. I
>> always thought we would have to use cairo or some custom renderer in
>> order to have a picture language. This is a great hack!
>>
>
> Read Andy Wingo's paper on tree fold (mentioned in the Guile Manual).
> I also use sxml for svg but never realized images could be rendered with 
> Geiser.

Likewise.

> Pretty sweet.

Yes, this is great fun - thanks Ricardo!

     Neil



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

* Re: Simple picture language
  2018-03-26 21:51 Simple picture language Ricardo Wurmus
  2018-03-27  1:18 ` Christopher Lemmer Webber
  2018-03-27 12:40 ` Thompson, David
@ 2018-04-01 21:04 ` tomas
  2018-04-06 11:58 ` Hugo Hörnquist
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: tomas @ 2018-04-01 21:04 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guile-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Mar 26, 2018 at 11:51:23PM +0200, Ricardo Wurmus wrote:
> Hi Guilers,
> 
> I wrote a simple SVG-based picture language.  To try it:

[...]

> What do you think?

Thanks for that!

This prompted me to get my Geiser setup in working order and
I must say, it was totally worth it. Thank you for my best Easter
egg ever :-)

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlrBSUMACgkQBcgs9XrR2kYxTgCbBcsiu1E+mYPvlbhvo6T8pu9C
DgwAn1EuK3qYmP95YrjvjpezxWrI3mSz
=pVkK
-----END PGP SIGNATURE-----



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

* Re: Simple picture language
  2018-03-26 21:51 Simple picture language Ricardo Wurmus
                   ` (2 preceding siblings ...)
  2018-04-01 21:04 ` tomas
@ 2018-04-06 11:58 ` Hugo Hörnquist
  2018-04-07 10:00 ` Ricardo Wurmus
  2018-04-14 17:14 ` Alex Kost
  5 siblings, 0 replies; 9+ messages in thread
From: Hugo Hörnquist @ 2018-04-06 11:58 UTC (permalink / raw)
  To: guile-devel

Good work!

I have really wanted this in guile, and this seems to do the
job really well.
-- 
hugo



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

* Re: Simple picture language
  2018-03-26 21:51 Simple picture language Ricardo Wurmus
                   ` (3 preceding siblings ...)
  2018-04-06 11:58 ` Hugo Hörnquist
@ 2018-04-07 10:00 ` Ricardo Wurmus
  2018-04-14 17:14 ` Alex Kost
  5 siblings, 0 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2018-04-07 10:00 UTC (permalink / raw)
  To: guile-devel


Thanks for all the nice comments!

> I wrote a simple SVG-based picture language.  To try it:
>
>     wget https://elephly.net/downies/pict.scm

Development continues here (until I find a better home):

    https://git.elephly.net/software/guile-picture-language.git

--
Ricardo




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

* Re: Simple picture language
  2018-03-26 21:51 Simple picture language Ricardo Wurmus
                   ` (4 preceding siblings ...)
  2018-04-07 10:00 ` Ricardo Wurmus
@ 2018-04-14 17:14 ` Alex Kost
  5 siblings, 0 replies; 9+ messages in thread
From: Alex Kost @ 2018-04-14 17:14 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guile-devel

Ricardo Wurmus (2018-03-26 23:51 +0200) wrote:

> Hi Guilers,
>
> I wrote a simple SVG-based picture language.  To try it:
>
>     wget https://elephly.net/downies/pict.scm
[...]
> What do you think?

So joyful!  Thank you, Ricardo, both for this tool and for the great
small tutorial you write!

Sorry for being late, I rarely look at this list :-) and what a nice
present I've found here!

-- 
Alex



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

end of thread, other threads:[~2018-04-14 17:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-26 21:51 Simple picture language Ricardo Wurmus
2018-03-27  1:18 ` Christopher Lemmer Webber
2018-03-27 12:40 ` Thompson, David
2018-03-27 12:47   ` Matt Wette
2018-03-31 20:51     ` Neil Jerram
2018-04-01 21:04 ` tomas
2018-04-06 11:58 ` Hugo Hörnquist
2018-04-07 10:00 ` Ricardo Wurmus
2018-04-14 17:14 ` Alex Kost

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