Live data from Hacker News

Bashblog – a single bash script to create blogs

github.com

61–70 of 93 posts

Re: Bashblog – a single bash script to create blogs

#61

Nice idea but I don't understand why people write bash scripts more than a few lines long. There's absolutely 0 advantage, especially when AI can write simple code like that easily, over using any other language. It makes reading and maintaining much more complex. Hell, even GitHub's syntax highlighting (and VS Code's) breaks in many places throughout the script. It's just a terrible developer experience, even for yo…

> Nice idea but I don't understand why people write bash scripts more than a few lines long.

From a pragmatic perspective I agree. But I think you’re missing the point here. A lot of the most entertaining, and dare I say inspiring content, found on Hacker News is about exactly things like this. Things that seem silly, but are also very intentionally pushing the boundaries to the extreme/absurd.

Re: Bashblog – a single bash script to create blogs

#62
post #7

Mmm, good ol’ bash. I like it.

Awful old Bash. I hate it. Seriously I don't know why you'd do this in Bash. Crazy choice.

Really? I think there's a nice niche for tools like nb that Just Work. Ubiquity is a feature!

https://xwmx.github.io/nb/

Re: Bashblog – a single bash script to create blogs

#63
post #60

Not a bash script, but I built my own small blog generation engine to use with AI agents if anyone is interested https://github.com/trebaud/let-an-agent-build-your-blog

Nobody's interested because everyone is one prompt away from exactly the same thing catered to their specific needs.

Re: Bashblog – a single bash script to create blogs

#64
post #63
post #60

Not a bash script, but I built my own small blog generation engine to use with AI agents if anyone is interested https://github.com/trebaud/let-an-agent-build-your-blog

Nobody's interested because everyone is one prompt away from exactly the same thing catered to their specific needs.

Wow that was pretty passive agressive lol, sure you're probably right

Re: Bashblog – a single bash script to create blogs

#65
post #56

It's so interesting to me how people consider writing bash scripts to be some sort of absurdist gimmick. I've made some scripts like this for blogging, as well as many other things. It's often not the best choice. There are situations where, I'd argue, it is. One of the main reasons, in my experience, is for very lightweight servers. I don't want python or node or anything. I want to run a web server with 128mb of ra…

Its very niche. This is a static site generator so you could run something a lot heavier and then rsync the output to the server. Even lighter on the server than running bash there.

It is also limited so you might have to add other things. The README suggests using markdown.pl for markdown support.

Re: Bashblog – a single bash script to create blogs

#66
post #19

Its time to invent something lightweight and good which runtime is so small that it becomes a system default. like a microvm with normal language features. Something you can and want to actually attach a debugger onto it. Something independent of architecture too. I just hate bash :| Even just using bash and curl and checking if its a website or an error page...

Go has a fast enough compile speed I feel like you could syntactically sugar it to be a command line.

Why would you compile it each time? You would compile the binary once and the use it. This is what Go equivalents of this already do (e.g. Hugo).

Re: Bashblog – a single bash script to create blogs

#67

This is a good example of a program I would like to use if it was distributed in the standard repo of my OS, rather than totally unvetted on the Microsoft Github page of a random developer. PS: I don't know why HN allows downvoting seeing how it is always so abused. Nothing I wrote here is factually false, and what remains is just my personal opinion as a principled user of FOSS. A bit of tolerance for others' viewpo…

for what we need downvoting and upvoting? I thought: - upvote if you like/agree - downvote if you dont like/disagree Am I wrong?

I can't speak for others, but I downvote to recommend other readers that the post is not worth reading. Not because I disagree with it, but because it's off topic in a way or another.

If TFA is about a tool, I tend to downvote comments that don't talk about the merits of tool but rather about the hosting website, the language it's written in, whether or not it "smells AI", English mistakes in the readme, and so on.

On the other side, if I reply to a comment I always upvote it, even if my reply is to refute it. In fact if I felt the need to add anything to it, it was by definition worth dealing with it!

Re: Bashblog – a single bash script to create blogs

#69

A single 1200 line bash script to create blogs. I love bash for quick hacks. I abhor it for things like this.

Why? If it works and it gives you the features you require that where's the issue? If all 1200 lines of code are utilised and provides you with the blog stack then that's pretty efficient.

How is this any different of someone including multiple python modules to create the same stack for which probably amount to more lines of code if you were to copy and paste in to a single document.

It's like react, a stack with stupid amount of LoC only for the developer to use 1% of and the rest sits unused and bugs the site.

You can source bash scripts so if it's lines of code, break them in to chunks.

Re: Bashblog – a single bash script to create blogs

#70

A single 1200 line bash script to create blogs. I love bash for quick hacks. I abhor it for things like this.

Why? If it works and it gives you the features you require that where's the issue? If all 1200 lines of code are utilised and provides you with the blog stack then that's pretty efficient. How is this any different of someone including multiple python modules to create the same stack for which probably amount to more lines of code if you were to copy and paste in to a single document. It's like react, a stack with st…

Note that I didn't say anything about "If it works and gives you the features you require", you added that.

If you remove that from your reply you're on your way to understanding why I don't like an absolute unit of a bash script.

Post reply on HN