Pillar multiline comment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Pillar multiline comment

Peter Uhnak
Is it possible to create multiline comments in Pillar?

For example I want to add code that I used to create a visualization, but I want to show the user only the image (but want to keep the code so I can regenerate if needed).

Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Pillar multiline comment

stepharo
Pillar is line based.
You can put a comment to each of the line beginning.


Le 7/3/15 19:32, Peter Uhnák a écrit :
> Is it possible to create multiline comments in Pillar?
>
> For example I want to add code that I used to create a visualization,
> but I want to show the user only the image (but want to keep the code
> so I can regenerate if needed).
>
> Thanks,
> Peter


Reply | Threaded
Open this post in threaded view
|

Re: Pillar multiline comment

Peter Uhnak
H
If pillar is line based, how I can make code examples?

Actually, maybe this could work, I'll try it later.
{{{comment:
My
Multiline
Comment
}}}

From: [hidden email]
Sent: ‎3/‎8/‎2015 8:21 AM
To: [hidden email]
Subject: Re: [Pharo-users] Pillar multiline comment

Pillar is line based.
You can put a comment to each of the line beginning.


Le 7/3/15 19:32, Peter Uhnák a écrit :
> Is it possible to create multiline comments in Pillar?
>
> For example I want to add code that I used to create a visualization,
> but I want to show the user only the image (but want to keep the code
> so I can regenerate if needed).
>
> Thanks,
> Peter


Reply | Threaded
Open this post in threaded view
|

Re: Pillar multiline comment

kilon.alios
code examples are made like this

[[[ Transcript show: 'hello";
                     show: ' world";
                     cr;]]]

There is also additional syntax if your language is not smalltalk and some other stuff. Take a look at pillar docs.

you can also have a workaround for multi line comments. Damien has created a pillar mode for emacs, and there is shortcut to comment multiple lines. So you could write your comment in multiple lines , select those lines and use the shortcut. The shortcut is the regular shortcut that emacs uses in all modes to comment things out for multiple lines.

I use this technique to disable part of the pillar code when I try to find bugs.

On Sun, Mar 8, 2015 at 12:09 PM, Peter Uhnak <[hidden email]> wrote:
H
If pillar is line based, how I can make code examples?

Actually, maybe this could work, I'll try it later.
{{{comment:
My
Multiline
Comment
}}}

From: [hidden email]
Sent: ‎3/‎8/‎2015 8:21 AM
To: [hidden email]
Subject: Re: [Pharo-users] Pillar multiline comment

Pillar is line based.
You can put a comment to each of the line beginning.


Le 7/3/15 19:32, Peter Uhnák a écrit :
> Is it possible to create multiline comments in Pillar?
>
> For example I want to add code that I used to create a visualization,
> but I want to show the user only the image (but want to keep the code
> so I can regenerate if needed).
>
> Thanks,
> Peter



Reply | Threaded
Open this post in threaded view
|

Re: Pillar multiline comment

Peter Uhnak
Sure I can make a shortcut but I don't like that if there is already something.

So my question is why can't I do

{{{comment:

my
multiline
comment

}}}

We already have the syntax, and we already have conditional rendering; so comment is just something that doesn't end up in any of the output formats.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Pillar multiline comment

Damien Cassou

Better write something like:

[[[render=false
...
]]]

and fix pillar to ignore those blocks

On Mar 8, 2015 3:55 PM, "Peter Uhnák" <[hidden email]> wrote:
Sure I can make a shortcut but I don't like that if there is already something.

So my question is why can't I do

{{{comment:

my
multiline
comment

}}}

We already have the syntax, and we already have conditional rendering; so comment is just something that doesn't end up in any of the output formats.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Pillar multiline comment

stepharo
In reply to this post by Peter Uhnak
Because

[[[

]]]

is special and if we need some others environments we will keep them for
something more important than comments :)

> Sure I can make a shortcut but I don't like that if there is already
> something.
>
> So my question is why can't I do
>
> {{{comment:
>
> my
> multiline
> comment
>
> }}}
>
> We already have the syntax, and we already have conditional rendering;
> so comment is just something that doesn't end up in any of the output
> formats.
>
> Peter


Reply | Threaded
Open this post in threaded view
|

Re: Pillar multiline comment

Offray
In reply to this post by Peter Uhnak
Hi Peter,

El 07/03/15 a las 13:32, Peter Uhnák escribió:
> Is it possible to create multiline comments in Pillar?
>
> For example I want to add code that I used to create a visualization, but I want
> to show the user only the image (but want to keep the code so I can regenerate
> if needed).
>
> Thanks,
> Peter
>


Talking about keeping the code for a visualization and making it
executable, here is an small project with a long blog post about
exploring this possibilities within Moose at [1] and an updated video at
[2]. Instead of Pillar it uses pandoc's markdown[3][4][5], which I think
could have more early adopters, but may be can be helpful in someway for
what you're looking for.

Cheers,

Offray


[1]
http://mutabit.com/offray/static/blog/output/posts/grafoscopio-idea-and-initial-progress.html
[2] https://archive.org/details/gfcp-alpha-saving-playgrounds-1.mp4
[3] https://github.com/scholmd/scholmd/wiki
[4]
http://blog.martinfenner.org/2014/03/03/six-misunderstandings-about-scholarly-markdown/
[5] http://blog.martinfenner.org/2013/06/17/what-is-scholarly-markdown/