Re: [pollen] Using generated pagetree as an index pagetree

2019-02-28 Thread Brendan Stromberger
Thanks for the advice, Matthew. So far, I've been splitting the difference 
between the two approaches (vertical/horizontal), but as time goes on, 
leaning into the horizontal :) I very much appreciate all your help so far 
and hope to someday contribute.


On Thursday, February 28, 2019 at 1:40:01 PM UTC-5, Matthew Butterick wrote:
>
> Sometimes there's a misapprehension among new users that Pollen represents 
> a monolithic "take it or leave it" system. (Not a surprise, because many 
> page-making systems are like that.) Pollen tries to make simple projects 
> easy (by providing non-astonishing default behavior) while not inhibiting 
> complex or ambitious projects (by being hackable & mixing smoothly with 
> Racket at large). 
>
> Of course, these projects require more heavy lifting from the author. My 
> free advice to anyone in your position would be to work "horizontally" by 
> making an end-to-end prototype of the project (e.g., simple Pollen source 
> files that produce simple HTML). Then iteratively improve.
>
> This is in contrast to working "vertically" where one tries to design the 
> whole project from the top down, like a snake swallowing a goat. This tends 
> to be harder, less rewarding, and takes more time (because it's easier to 
> develop faulty intuitions when things are unfamiliar).
>
>
> On Feb 28, 2019, at 10:07 AM, Brendan Stromberger  > wrote:
>
> Thanks Matthew. My apologies for using the "M" word – at this moment, a 
> lot about Racket *feels* magical simply because I don't understand it yet ;)
>  
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pollen] Using generated pagetree as an index pagetree

2019-02-28 Thread Matthew Butterick
Sometimes there's a misapprehension among new users that Pollen represents a 
monolithic "take it or leave it" system. (Not a surprise, because many 
page-making systems are like that.) Pollen tries to make simple projects easy 
(by providing non-astonishing default behavior) while not inhibiting complex or 
ambitious projects (by being hackable & mixing smoothly with Racket at large). 

Of course, these projects require more heavy lifting from the author. My free 
advice to anyone in your position would be to work "horizontally" by making an 
end-to-end prototype of the project (e.g., simple Pollen source files that 
produce simple HTML). Then iteratively improve.

This is in contrast to working "vertically" where one tries to design the whole 
project from the top down, like a snake swallowing a goat. This tends to be 
harder, less rewarding, and takes more time (because it's easier to develop 
faulty intuitions when things are unfamiliar).


> On Feb 28, 2019, at 10:07 AM, Brendan Stromberger 
>  wrote:
> 
> Thanks Matthew. My apologies for using the "M" word – at this moment, a lot 
> about Racket *feels* magical simply because I don't understand it yet ;) 

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pollen] Using generated pagetree as an index pagetree

2019-02-28 Thread Brendan Stromberger
Thanks Matthew. My apologies for using the "M" word – at this moment, a lot 
about Racket *feels* magical simply because I don't understand it yet ;) 

On Thursday, February 28, 2019 at 12:57:52 PM UTC-5, Matthew Butterick 
wrote:
>
>
> On Feb 28, 2019, at 9:09 AM, Brendan Stromberger  > wrote:
>
> Side question but related: is `doc` a magical export from ptree files? How 
> do I know what is being exported from any given Pollen file (*.ptree, *.p, 
> *.pm)?
>
>
>
> `doc` and `metas` are exported from every Pollen source file. (Meaning, a 
> file that starts with `#lang pollen` or one of its dialects — not a *.p 
> file, which is just a source-control convenience.) You can examine the 
> values of these exports on the DrRacket REPL.
>
> There isn't anything magical about the pagetree subsystem. It's just a way 
> of streamlining the common housekeeping of a) maintaining a tree-shaped 
> list of things and then b) querying into that list of things, while c) 
> staying consistent with the authoring conventions of other Pollen files. 
> You could do it your own way.
>
> Likewise, zooming out further, there isn't anything magical about Pollen 
> at large. It's just a convenient way of writing Racket programs that 
> involve a lot of text.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pollen] Using generated pagetree as an index pagetree

2019-02-28 Thread Matthew Butterick

> On Feb 28, 2019, at 9:09 AM, Brendan Stromberger 
>  wrote:
> 
> Side question but related: is `doc` a magical export from ptree files? How do 
> I know what is being exported from any given Pollen file (*.ptree, *.p, *.pm)?


`doc` and `metas` are exported from every Pollen source file. (Meaning, a file 
that starts with `#lang pollen` or one of its dialects — not a *.p file, which 
is just a source-control convenience.) You can examine the values of these 
exports on the DrRacket REPL.

There isn't anything magical about the pagetree subsystem. It's just a way of 
streamlining the common housekeeping of a) maintaining a tree-shaped list of 
things and then b) querying into that list of things, while c) staying 
consistent with the authoring conventions of other Pollen files. You could do 
it your own way.

Likewise, zooming out further, there isn't anything magical about Pollen at 
large. It's just a convenient way of writing Racket programs that involve a lot 
of text.

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pollen] Using generated pagetree as an index pagetree

2019-02-28 Thread Brendan Stromberger
Side question but related: is `doc` a magical export from ptree files? How 
do I know what is being exported from any given Pollen file (*.ptree, *.p, 
*.pm)?

On Tuesday, February 19, 2019 at 6:13:58 PM UTC-5, Matthew Butterick wrote:
>
>
> On Feb 19, 2019, at 2:35 PM, Evžen Wybitul  > wrote:
>
> And I'd like to somehow include it in the index.ptree file (i.e. use it 
> both to render the files and on the webserver as the default ptree). How do 
> I go about this?
>
>
> You can `require` (or `dynamic-require`) a ptree source into another ptree 
> source. The `doc` export will contain the nodes.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[pollen] Using generated pagetree as an index pagetree

2019-02-19 Thread Evžen Wybitul
I have a generated pagetree in the following form, which is an output from 
(generate-ptree) in pagetree.rkt:

'((./doc/analyza/lecture-page.html
   ./doc/analyza/analyza-1.html
   ./doc/analyza/analyza-2.html)
  (./doc/neproceduralko/lecture-page.html))

And I'd like to somehow include it in the index.ptree file (i.e. use it 
both to render the files and on the webserver as the default ptree). How do 
I go about this?

The final index.ptree should have the form of

./doc/analyza/lecture-page.html{
./doc/analyza/analyza-1.html
./doc/analyza/analyza-2.html
}
./doc/neproceduralko/lecture-page.html

Thanks a lot for any help.

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.