Live data from Hacker News

Pollen: the book is a program

docs.racket-lang.org

81–90 of 97 posts

Re: Pollen: the book is a program

#81
post #7
post #5

At the end of the day, how is this an improved experience for the reader?

There's nothing from a readers perspective that you can accomplish with Pollen that couldn't be accomplished in some other way. But if it makes author's lives easier they'll publish more which improves the reader's experience.

Making texts that are active is currently a hard job. There is a fairly large set of technologies to know, and an author can worry that each of those will have a limited life.

People who have something to say, and who know all the techs, and who are willing to keep their work up, may well be a small set.

Re: Pollen: the book is a program

#82
post #52

Earlier quoted context omitted.

> Racket by default also doesn’t use the keyword "lambda", but instead uses "λ". I'm not sure that's true: Welcome to Racket v6.10.1. > (define foo (lambda (x) (+ x 1))) > (foo 1) 2

As I mentioned, both are possible, but (λ ...) is strictly preferred.

I am using lambda as I hate small symbols. I have to stop and process what λ is.

Re: Pollen: the book is a program

#83
post #14

Earlier quoted context omitted.

If you read it and follow the instructions, you will see how to access the original link without needing to purchase anything.

So i follow a link, supposedly about a book, and i see a wall of text trying to sell me something with no information what that something is. That reminds me of this: “But look, you found the notice, didn’t you?” “Yes,” said Arthur, “yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying ‘Beware of the Leopard.”

It is checking the referrer value and only displaying it to people from reddit, HN, etc. -- because when traffic spikes due to those communities, it can be expensive.

Given the choice between this and advertisements, I much prefer this.

Re: Pollen: the book is a program

#84
post #39
post #30

Earlier quoted context omitted.

You can also change the lozenge operator to a different character. Its just convenient to pick one you won't ever have to escape

That is until you find an obscure enough example that uses it.

Presumably your usage is limited enough not to cover the entire unicode space, and even if you hit the current operator, it should be trivial to update all previous work with a new character, since its prior usage was unambiguous (literally character replacement).

Tbh if you're assuming unicode input (which pollen does), and assuming its easy to write the character (which it is, given that system hotkeys for unicode are available or can be made available on most/all target systems), then it seems to me absurd to use the normal ascii character + escape character operators for embedding functionality in text

Re: Pollen: the book is a program

#85
I'm a CS teacher and use Pollen to write my assignments (sample: https://drive.google.com/file/d/0B9DAZWpkQIDuUlA4SU5lcHItRDg...). It allows me to type assignments as fast as I can think them, in a specialized mark-up language for exactly the type of assignments I give. I can then apply various post-processing operations (like doing syntax highlighting, converting straight quotation marks to curly but not when inside sample code, numbering of problems, inserting special CSS to make the assignments print with nice margins / without breaking up headings and paragraphs that belong with them, etc.) all with very little pain.

It's also neat to show students, after they've spent months learning Racket, that all sorts of useful things -- including the writing of their assignments! -- can be automated with their new skills.

Re: Pollen: the book is a program

#86
post #85

I'm a CS teacher and use Pollen to write my assignments (sample: https://drive.google.com/file/d/0B9DAZWpkQIDuUlA4SU5lcHItRDg... ). It allows me to type assignments as fast as I can think them, in a specialized mark-up language for exactly the type of assignments I give. I can then apply various post-processing operations (like doing syntax highlighting, converting straight quotation marks to curly but not when insid…

This is great. I would love to see the source for this. Would you consider posting it?

Re: Pollen: the book is a program

#87

It's interesting to see a somewhat widespread shift away from the separation of code, templates, styles, and text model of publishing things (mostly websites, but most publishing can be boiled down to that if you squint), where code/templates/style get merged into one. React does this. Pollen seemingly takes it even further and sticks the text in the code, too. Or, rather sticks the code in the text, I guess. It's a…

I don't find it that surprising. It's the Literate Programming Knuth came up with ages ago. I own a book called 'Physically Based Rendering' which deals with rendering images through, essentially, simulation of the physics of light which is written in the same manner. As far as I know, Knuths work and the Physically Based Rendering book are the only ones published which are of that type... well until I saw this posti…

There are others as well. "A Retargetable C Compiler: Design and Implementation" by David R. Hanson, Christopher W. Fraser is the first that comes to mind.

But sure, there aren't a lot of them out there.

Re: Pollen: the book is a program

#88
post #28

these short descriptions I've read don't seem to answer this question for me - how is this different from orgmode + org-babel + HTML/PDF export? See like reinventing the wheel for one language, or am I missing something?

Pollen is a Racket language, and gets parsed into an AST and evaluated. You can programmatically generate correct markup using all of Racket. Org Babel is more about evaluating code snippets in a variety of languages. Even if you can evaluate to produce org markup that's processed it doesn't have the same level of structural integration.

I get that it's cleaner that it's an AST but when would you ever want to generate markup? Seems like a weird use-case

Re: Pollen: the book is a program

#89

Earlier quoted context omitted.

> When you mouse over the paragraph, which indicates you are intending to click, the contrast increases. What would you suggest in the case of touchscreens? Increased contrast while scrolling with a slow fade-out afterwards?

Ooh, that's a great question. I haven't thought about that (though I do generally try to make my designs responsive and mobile-friendly). I like your idea of a slow fade after scroll.

> I like your idea of a slow fade after scroll.

Things blinking/fading/shifting/changing when I'm taking completely unrelated actions (or, worse, all on their own) is one of the most unreadable/unusable design decisions I regularly face. It's a good way to get me to close a tab, regardless of any other factors.

Re: Pollen: the book is a program

#90
post #20

Earlier quoted context omitted.

Yes. I spent many years doing that for games. AMA.

So, how'd it turn out? Did you ship any games?

Yes, the "Uncharted" series and "The Last of Us". Our team built a large system in Racket that built all kinds of data for the game. The front end could and often did have many layers of DSLs using Racket syntax macros.

Overall it enabled us to do many things that would have required lots of specialized tools. The downsides were things like people ramping up on editing s-expressions in text files and lots of gotchas with hygienic macros.

Post reply on HN