23 ms·
Pollen: the book is a program
- hellbanner 9y agoThis looks very cool. Have you (jdoliner or anyone else) used this to publish a book?
- jdoliner 9y agoI have not used it at all. I posted it moments after learning about it. I've been looking for something like this though so I will likely being playing around with it in the near future.
- soapdog 9y agoMatthew Butterick uses it to publish all his current books (as far as I know), check out some of them at: * https://beautifulracket.com/ https://beautifulracket.com/ (and this about making it https://beautifulracket.com/appendix/racketcon.html https://beautifulracket.com/appendix/racketcon.html) * https://practicaltypography.com/ https://practicaltypography.com/
- grzm 9y agoPractical Typography is gorgeous. I have a lot of respect for what Butterick's accomplished. He does great font work as well. I also admire his experiments (hopefully successful) in making this worth his while: https://practicaltypography.com/how-to-pay-for-this-book.html https://practicaltypography.com/how-to-pay-for-this-book.htm...
- MikusR 9y agoOne of your links https://practicaltypography.com/ https://practicaltypography.com/ redirects to this https://practicaltypography.com/graylist.html https://practicaltypography.com/graylist.html a site that has no content and asks to pay for something.
- empthought 9y agoIf you read it and follow the instructions, you will see how to access the original link without needing to purchase anything.
- MikusR 9y agoSo 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.”
- empthought 9y agoIt 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.
- criddell 9y agoI understand his argument against ebooks[1], but I still wish I could buy a copy in that format. On a Kindle you do give up something with respect to typography and you have to accept non-standard formats, but you gain something in readability. I respect his choices though and I hope future devices eliminate his typography and format concerns. [1]: https://practicaltypography.com/why-theres-no-e-book-or-pdf.html https://practicaltypography.com/why-theres-no-e-book-or-pdf....
- alex_g 9y agoAt the end of the day, how is this an improved experience for the reader?
- jdoliner 9y agoThere'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.
- jimhefferon 9y agoMaking 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.
- Tehnix 9y agoHmm, is there a cheatsheet or crash course for it? Not particularly interested in reading a book just to get my editing game on. Just throw me in the deep water with the basics, and then I'll jump around to what I need. Would consider using this instead of LaTeX for my thesis, but not so much if the time investment is too much.
- wodenokoto 9y agoMarkdown to Latex (via pandoc) might be a better option if you don't want to write/compose in latex.
- Tehnix 9y agoGreat suggestion! I'm gonna see if I can get a template set up to use :)
- wodenokoto 9y agoIf I were to do my thesis all over, I would definitely look at how these people use plaintext/markdown to get things done. http://wcm1.web.rice.edu/plain-text-citations.html http://wcm1.web.rice.edu/plain-text-citations.html https://programminghistorian.org/lessons/sustainable-authorship-in-plain-text-using-pandoc-and-markdown https://programminghistorian.org/lessons/sustainable-authors... Good luck!
- peatmoss 9y agoIf your university has requirements around formatting (most do), then you'll likely spend many hours making anything that isn't LaTeX (or, blech, Word) do the right thing. For a thesis, your best case is to just use a university provided LaTeX template and then spend as little time bike shedding as humanly possible.
- Tehnix 9y agoLuckily they don’t :) My Bsc thesis I did in a template another student had made years ago, which swims around, but honestly LaTeX is quite tedious and time wasting to write in for most non math heavy content, which is why I’d prefer something else, that stills allows the same flexibility if needed.
- grzm 9y agoDiscussion from 3 years ago (at time of release?) (53 comments): https://news.ycombinator.com/item?id=7822057 https://news.ycombinator.com/item?id=7822057
- geokon 9y agothese 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?
- setr 9y agoI'm not sure about that combination of tooling, but I consider pollen to be useful as markdown + customization. Ofc its a full general-purpose language to work with, but I myself just wanted it to solve adding sidenotes, footnotes and simple references. I also noted others using to handle blog publishing tasks like latest post pages and tags and such I guess in total its a general html publishing framework, and at least partly notable for being built in a lisp, given htnl's usage of basically s-expressions
- fantispug 9y agoPollen 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.
- geokon 9y agoI 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
- SwellJoe 9y agoIt'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 surprising shift. "Separation of concerns" is still a thing everybody wants to do, it's just flipping the idea of what should be the same "concern", where React considers every piece of a component to be one concern...and, it seems to work. I'm not sure I'm on board with this for writing, but the results certainly do look very nice; the books the author has published with Pollen all look gorgeoues and are very navigable. I've been tinkering with Hugo for converting my projects docs to something that isn't in a wiki or a CMS (because I find I dread working with either a wiki or a CMS for large documents). I think it's probably "enough" for all of my needs, so I doubt I'll take the time to learn a bigger system like Pollen...but, it's hard to argue with the quality of the results.
- dfischer 9y agoWhen I learned HTML in the 90's and early 2000's you got a strong notion that they were separate concerns. When I was learning react when it came out I had such a visceral reaction I just wanted to run away. After coding within react for the past couple years I strongly feel that react has got it right. A concern is after all a generality that has the potential to generate a strong bias. My lesson is that concerns should be taken with a grain of salt, and be willing to try new things with as little as bias as possible; and then form a new opinion, maybe a slightly different concern. P.s I have also started writing CSS in our presentational focuses react components and I couldn't be happier. It naturally did a BEM-like architecture. I highly recommend it. I say this with extensive experience of CSS architecture for applications.
- jv22222 9y agoAt the moment my favorite thing to do is think about each web page as a cohesive collection of components that are the sum of what it takes to make that web page work. ie css, html and javascript for that page contained within that page. Then, as you notice common use cases accross pages start to abstract them to a central library (be it js, css). This way it makes it easy to develop any size application because each page is coded as needed and code relevant to each page is always right there with it. I've worked on plenty of codebases that start out with a central library and then build outward but they always seem harder to maintain due multiple layers of abstraction. I guess, in summary, this method is a way to lazy load abstraction.
- choxi 9y agoCool idea. Has anyone else used Racket to make DSL's for specific business applications?
- oxryly1 9y agoYes. I spent many years doing that for games. AMA.
- SwellJoe 9y agoSo, how'd it turn out? Did you ship any games?
- oxryly1 9y agoYes, 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.
- SwellJoe 9y agoWell, that wasn't the answer I expected! Super cool, I wouldn't have guessed any AAA titles were using a Lisp/Scheme heavily in their toolchain (but I'm not particularly knowledgeable about the game industry). I'm fascinated by procedural generation and constrained randomness in games, and I'd think something like Racket would be a fun choice for that. Do you reckon you'd make the same choice if you were starting today?
- tudelo 9y agoThat's awesome. Do you think this is still a viable career? I know very little about what sort of DSL you would make for games, what would they even cover? map gen? Also, why Racket?
- whalesalad 9y agoIs the ‘lozenge’ a Racket-ism or is it unique to this project? I understand the logic around using a character that’s hardly used in regular writing – to avoid escaping – but it seems as though it would be hard to use in practice.
- gyrgtyn 9y agoI might be remembering wrong since it's been a while since I went through the tutorial, but I think you can use any character you want for the delimiter because lisp. He just likes the lozenge.
- zeamaize 9y agoYeah, even just <> would be better.
- blevs 9y agoIt's unique to Pollen. In my experience I just remapped a key to insert it and forgot about it.
- kuschku 9y agoIt’s a racket-ism to use unicode characters wherever possible, yes. Racket by default also doesn’t use the keyword "lambda", but instead uses "λ". You can obviously use something different, if you want to, but the default, and recommended solution, is using unicode characters. As Racket is frequently written in the DrRacket IDE, this also makes sense.
- Xophmeister 9y ago> 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
- kuschku 9y agoAs I mentioned, both are possible, but (λ ...) is strictly preferred.
- zeamaize 9y ago> I chose the lozenge as the command character because a) it appears in almost every font, b) it’s barely used in ordinary typesetting, c) it’s not used in any programming language that I know of, and d) its shape and color allow it to stand out easily in code without being distracting. > If you’re using DrRacket, you can use the Insert Command Char button at the top of the editing window to — you guessed it — insert the command character. > If you’re using a different editor, here’s how you type it: > Mac: Option + Shift + V > Windows: holding down Alt, type 9674 on the num pad > GNU/Linux, BSD: Type Ctrl + Shift + U, then 25CA, then Enter > For more information on entering arbitrary Unicode glyphs, see Wikipedia. Jesus Christ that's a terrible design.
- wodenokoto 9y agoHe also advocate not using underline to denote links. In his practical typography book he practically hides all hyperlinks. I also find his redesigns of documentation pages uninviting to read. I find Butterick to be a passionate, opinionated, hard working, but ultimately a poor designer.
- paulriddle 9y agoI agree. His book Practical Typography is very hard on the eyes, even looking at the text is uncomfortable. I think he fell into a trap of overdoing things. Like some people when they learn about what you can do with javascript and css add all sorts of annoying visual effects with no unified theme to the whole. They just enter some sort of trance and keep adding.
- deleted 9y ago[deleted]
- munificent 9y ago> He also advocate not using underline to denote links. >In his practical typography book he practically hides all hyperlinks. I think that's a fine, defensible stylistic choice. When reading a paragraph of prose, I find it INTERRUPTS MY FLOW if there is a jarring style change in the middle of a sentence, as in this one. The visual style of a hyperlink is only relevant to the point that you know the hyperlink is there and can find it when you want to click on it. Most of the time, that's not a goal, so you want it to fade into the background unless the user has indicated that is their goal. So my preferred style for hyperlinks in prose is a color that's right at the just-noticeable difference [1] relative the normal text. When you mouse over the paragraph, which indicates you are intending to click, the contrast increases. [1]: https://en.wikipedia.org/wiki/Just-noticeable_difference https://en.wikipedia.org/wiki/Just-noticeable_difference
- shalabhc 9y agoI realize it's the norm, but anyone wonder why we're pushing around static content about dynamic programs? Why the dynamic program snippets do not work inline, even though the computer you're reading them on is fully capable of running them?
- gosub 9y agoYou should watch "stop drawing dead fish" by Bret Victor https://www.youtube.com/watch?v=ZfytHvgHybA https://www.youtube.com/watch?v=ZfytHvgHybA
- wiz21c 9y agoIs it me or this is like Knuth's Literate Programming ?
- unkown-unknowns 9y agoThe idea of literate programming is to write explanations of programs in human language as the primary form of communicating what a program does to others. OP link is about using code to create a document. Probably you could use OP tool to write literate programs but that is not the primary intention.
- pathsjs 9y agoApparently, books written in Pollen do not support scrolling (or it's just me? I am using Firefox on a Mac)
- Chiba-City 9y agoThis looks lovely and near perfect. But what happened to Docbook? I worry about tool longevity and thus ongoing editability of source assets. I imagine groff still might grind old tbl and nroff and docs into Postscript.
- TuringTest 9y ago> But what happened to Docbook? What, isn't everybody using DITA nowadays? /s
- jimhefferon 9y agoLike many computer things, Docbook had (and as I understand it still has) a life in a certain domain. But, for reasons that are perhaps not perfectly clear, it never made the jump to hyperspeed. It just never became the thing.
- stefanwlb 9y agoThe web browser display is very beautiful. But how would I go about seeing it offline? Is there a PDF sample of Pollen I can try on my eBook reader?
- inetsee 9y agoOne thing that disappoints me about Pollen is that I haven't seen any easy way to produce output in the Epub format.
- a3n 9y ago"the book is a program" Quibble after scanning, but the book as produced appears to be a standard web page, no more or less a "program" than any other web page.
- baldfat 9y agoQuibble all ebooks were produced by programs in a computer? Your looking at it as if the output is the programming piece. Heck markdown outputs to HTML. You wouldn't look at markdown as a programming language in the general sense? Look a little closer my friend and you will see that this is very unique and special. "Pollen gives you access to a full programming language (Racket) with a text-based syntax that makes it easy to embed code within your documents."
- a3n 9y agoSure, it goes farther than, say, Pandoc, in giving you access to an underlying programming environment as a writer. But to double down on my quibble, when I go into a bookstore, or on O'Reilly (or now, Amazon, sniff), what's on offer are books. Even if on github and similar, what's on offer there is source of various languages and markup, which go to produce a book. I just can't see any final, static rendering of source as a "program." I would consider Stephenson's Young Lady's Illustrated Primer, or anything that aspires to that, as a program. https://en.wikipedia.org/wiki/The_Diamond_Age https://en.wikipedia.org/wiki/The_Diamond_Age
- contravariant 9y agoI was kind of hoping for a Knut's "The TEXbook" kind of "the book is a program". Unfortunately it doesn't seem to be.
- Sir_Cmpwn 9y agoSee also werc [1] and my crappy POSIX sh rip-off of werc [2] [1] http://werc.cat-v.org/ http://werc.cat-v.org/ [2] http://git.agunix.org/wersh/ http://git.agunix.org/wersh/
- ai_ia 9y agoHow can I integrate pollen with my Meteor-React Stack website?
- alew1 9y agoI'm a CS teacher and use Pollen to write my assignments (sample: https://drive.google.com/file/d/0B9DAZWpkQIDuUlA4SU5lcHItRDg/view?usp=sharing 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.
- xrayspec 9y agoThis is great. I would love to see the source for this. Would you consider posting it?
- alew1 9y agoThanks! Happy to :-) Here's the code for this assignment, as well as the pollen.rkt and HTML template/CSS files. (Disclaimer: this was written as code to get something done, not for others to see, so it's not always pretty!) https://gist.github.com/alex-lew/883ee382a697b39f0f6b49561a0542f1 https://gist.github.com/alex-lew/883ee382a697b39f0f6b49561a0... By the way, I use Atom, which has an excellent Pollen plugin, to write. Typing '@' then pressing tab turns into ◊{}, with the cursor between the lozenge and the braces.