Live data from Hacker News

Pollen: the book is a program

docs.racket-lang.org

61–70 of 97 posts

Re: Pollen: the book is a program

#61

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…

Note that e.g. TeX is a programming language, and for a reason.

Personally, I quickly become disillusioned about "separation of concern". It was a webdev slogan that ignored the fact that form is also content. I mean, it makes sense if all you're doing is hyperlinked free-form documents. But the web ended up being used for web sites (and later web apps), where how you say something matters just as much as what you say. Separation of concerns is not an adequate rule for those kinds of works. You could see its death in every site that had its HTML littered with divs that existed only to hang JS code and CSS rules off them (and for some reason people still believed they're "separating concerns" there).

And books, again, are different from free-form documents. Their layout/typesetting decisions are often important part of the content.

I think the shift you noticed is a welcome breath of sanity into this space.

Re: Pollen: the book is a program

#62
post #20
post #11

Cool idea. Has anyone else used Racket to make DSL's for specific business applications?

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

That'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?

Re: Pollen: the book is a program

#63
post #45

Earlier quoted context omitted.

When 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 sh…

Of course React got it right because there's no violation of separation of concerns involved. JSX is just syntactic sugar on top of method calls. One is perfectly free to extract the `render` functions into separate files and call them "templates". Unless the argument is that virtual DOM libraries are an inherently bad idea, I don't see what's to complain about separation of concerns.

Separation of concerns is about both the structure of a piece of code (which is what you refer to) and about how it is organized in files, folders and mentally (which is what others refer to).

Re: Pollen: the book is a program

#64
post #45

Earlier quoted context omitted.

Of course React got it right because there's no violation of separation of concerns involved. JSX is just syntactic sugar on top of method calls. One is perfectly free to extract the `render` functions into separate files and call them "templates". Unless the argument is that virtual DOM libraries are an inherently bad idea, I don't see what's to complain about separation of concerns.

Separation of concerns is about both the structure of a piece of code (which is what you refer to) and about how it is organized in files, folders and mentally (which is what others refer to).

As I said, you're free to do this to yourself. Put every function that calls `React.createElement` in a separate file/directory and import it.

Re: Pollen: the book is a program

#65

Earlier quoted context omitted.

> 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 ther…

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

Re: Pollen: the book is a program

#66

Earlier quoted context omitted.

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

> 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 ther…

> hyperlinks in prose is a color that's right at the just-noticeable difference

The problem with trying to achieve JND for online publishing formats is that you have to account for variable monitor settings and lighting conditions. What stands out on my monitors at home might be barely noticeable on the crap displays at the office or my laptop under some lighting conditions or when I have it set to low power.

On top of technological differences, you also need to contend with variances in people's eye-sight.

Underlining is far simpler and more reliable. Perhaps highlighting with an underline as the link is drawn or scrolls into view, and fading the underline out soon after, to be drawn again if the pointer hovers over the paragraph or the page scrolls, would work?

Re: Pollen: the book is a program

#67
post #57

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

I was kind of hoping for a Knut's "The TEXbook" kind of "the book is a program".

Unfortunately it doesn't seem to be.

Re: Pollen: the book is a program

#69
post #50

Earlier quoted context omitted.

I've never seen a vaguely popular programming language use ¬ and that is available on all keyboards (for some weird reason).

It surely is not avaiable on mine. Maybe it's a local thing?

I believe UK keyboards?

I say this because when installing a new OS and it defaults to en-UK locale, some of my buttons on the right side of the keyboard do unexpected things (US here), and I always have to look up where exactly the single-quote button is. I believe sometimes that angle pops up.

Re: Pollen: the book is a program

#70
post #54

Earlier quoted context omitted.

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

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

My masters thesis had strict formatting requirements, and I bikeshedded the hell out of building my own LaTeX template in part because I needed an excuse to distract myself from... writing my thesis. And of course there were some ambiguities in the formatting spec that resulted in me needing to track down an advisor to resign a page in my thesis before she boarded a plane to Europe.

If I had it to do over again, I'd have spent the time I spent bikeshedding doing something more properly restorative such as exercising or video games or... anything else other than grokking the internals of my home-built LaTeX template :-)

Then again, if there are no formatting requirements, a digital version will suffice, and writing Pollen rather than your thesis brings you joy, then go for it.

Post reply on HN