Live data from Hacker News

Rewriting my blog in Rust for fun and profit

jonashietala.se

111–116 of 116 posts

Re: Rewriting my blog in Rust for fun and profit

#111
post #62

Earlier quoted context omitted.

We think alike. I started out with Hugo because it's very popular and relatively easy to use. It has a bunch of features that I had to read about but didn't have a use for -- overhead. One of the most annoying aspects of working with hugo was the friction from idea to publishing it. I decided to go a completely different route and built https://prose.sh With prose all I have to do is to create a markdown file and the…

Can you use `hugo server` (much like `jekyll/zola serve`) and a local Git repo to polish up the content locally, explore various permutations, before pushing to a cloud-based host?

No but that's a really interesting idea. I'll have to think about how we could implement that. Thanks!

Re: Rewriting my blog in Rust for fun and profit

#112

Why even bother with a static generator when you can run rust code at essentially wire speed and dynamically generate all the required formatting on the fly? Because Rust binaries are so secure, you can expose them over the internet safely. With a little bit of glue, you can automatically recompile the CGI binary every time the rs source is touched, for a dev experience similar to interpreted web scripts.

[deleted]

Re: Rewriting my blog in Rust for fun and profit

#113
post #99

Earlier quoted context omitted.

Is that important in a static site generator? In a server-rendered site you have to worry about injection attacks, but that's not really relevant when you're statically generating a site from content that's fully under your control

But then you'll need to watch for ` ` in examples of your articles, so you dont need to write it as `<script>`. And how you are going to get the second in your blog? How do you like to write `<script>`? It is very convenient to have an automatic escaping of everything.

Depends on the site I guess. My actual blog content is written in Markdown, which already handles escaping stuff between backticks, and that's the only place I'm likely to run into that sort of thing

Re: Rewriting my blog in Rust for fun and profit

#114
post #51

I really liked the reactive pattern, so one of the best static site generators I found was docpad. It used (backbone?) collections, so you could subscribe to changes on things like "new files under this path" and then rerender the part of the page that needed to change. I haven't seen this done in others. Then docpad was rewritten in ES6, and I lost all love for it. Things were so expressively concise in Coffeescript…

It's kind of ironic and uncool that DocPad's website is made using GitBook.

The author is a pretty interesting guy, but I just didn't want to follow him into ES6 land. Coffeescript is still the ranking king on concision, and so many features didn't make it in. I'm going to be sad when I can't support the transpile in my projects anymore :(

Re: Rewriting my blog in Rust for fun and profit

#115
post #65

Earlier quoted context omitted.

While his vocabulary might be a inflammatory, it's hard to argue that any language has an evangelistic community anywhere near the level of rust's. No other community is pushes their favorite language for every single use case. No other language has a rewrite it in rust meme. No other language attacks people for unsafe code.

You want to see criticism of Rust? Here’s the best, most accurate criticism of Rust, written by avid Rustaceans. - Why Not Rust? ( https://matklad.github.io/2020/09/20/why-not-rust.html ) - A Rust match made in hell ( https://fasterthanli.me/articles/a-rust-match-made-in-hell ) Compare these with the superficial criticism that benreesman was making. He couldn’t even link to the proper issue, a fact he realised 10 hou…

I don't think I made any criticisms of rust. I just pointed out it clearly has the most evangelical communit, a point which I think you helped support. I didn't even mention GP or his criticism.

None of those languages had as many rewrites as rust (which is a testament to how good the language actually is) nor did they have the same eventually obnoxious meme.

And yes, I am making sweeping generalizations about the community based on a couple of incidents. Incidents that have never happened in any other language communities I've participated in. Didn't official rust moderation team essentially quit relaticely recently because some business with the core team? I don't really care about the details. Rust is too smart for me, but I like using it anyway. I'm happy to stay separate from the community around it though.

Re: Rewriting my blog in Rust for fun and profit

#116

Earlier quoted context omitted.

I ended up making mine with Pandoc + Make. At first i used Nextjs and Remark/Unifiedjs but then I had a realization that all that is not even needed.

Have you come across Soupault yet? I'm considering using Pandoc with Soupault to my website markup agnostic by being dependent on Pandoc. Soupault can act as a HTML processor although I'm not sure if that's enough to not need a template langauge. Or maybe I'm mistaken about Soupault. https://soupault.app/

Looks pretty cool, thank you! My makefile is pretty simple (3 lines) but I'll see if maybe this is more suitable. :)
Post reply on HN