What does HackerNews think of pandoc?

Universal markup converter

Language: Haskell

#4 in Haskell
#3 in Markdown
For instance, pandoc is written in Haskell: https://github.com/jgm/pandoc
You could do it with Pandoc (https://github.com/jgm/pandoc), it supports both Latex and Typst as input and output formats, and can use either as a PDF engine.
If you need a more featureful alternative to textutils, look for pandoc https://github.com/jgm/pandoc
I really like Pandoc codebase [0]. It is a document converter written in Haskell.

Reading it’s source code a decade ago was a turning point for me. Prior to that, I always felt an insurmountable gap between my toy codebases and real projects. All those open source software written in C++ etc. looked so unapproachable that I felt like I could not write production ready software.

Pandoc however, was written in a language I didn’t know and did something very complicated very thoroughly, yet remained accessible. It was very nicely laid out and I could easily follow how it constructs it’s internal representation of documents and converts between them. I think this made me catch the functional programming bug for the next decade that let me build way bigger things than I had any right to, without getting crushed underneath all the complexity.

Putting together something in Java or even contributing to OOP Python codebases was still like an exercise in frustration, no matter how much better I thought I’m getting at programming I would feel stupid trying to wrap my head around those abstractions and hierarchies. Somehow FP just clicked for me and made me see how I could start from a simple library call and little by little build the complete program.

Today I am comfortable with all kinds of paradigms and levels of abstraction, but I definitely owe a lot to Pandoc for showing me I was smart enough to understand and modify real world software I did not build myself.

[0] https://github.com/jgm/pandoc

A few more:

https://github.com/simonmichael/quickbench - Easily time one or more commands with one or more executables and show tabular results

https://github.com/simonmichael/shelltestrunner - Easy, repeatable testing of CLI programs/commands

https://github.com/simonmichael/hledger - Robust, fast, intuitive plain text accounting tool with CLI, TUI and web interfaces

https://github.com/haskell-game/fungen - A lightweight, cross-platform, OpenGL-based 2D game engine in Haskell

https://haskell-game.dev - a small selection of the many games written in Haskell

https://haskell-via-sokoban.nomeata.de - Haskell via Sokoban

https://lhbg-book.link - Learn Haskell by building a blog generator

https://github.com/input-output-hk - the Cardano blockchain and Daedalus wallet

https://github.com/jgm/pandoc - Universal markup converter (already mentioned above)

https://github.com/simplex-chat/simplex-chat - secure messaging platform

https://www.libhunt.com/l/haskell - more projects...

Was curious how the document conversion happened: It's using Pandoc to convert .docx files downloaded from Google Docs into markdown files.

Hadn't seen Pandoc before. It's a Haskell library/cli that supports a large number of input/output document formats in varying degrees of completeness: https://github.com/jgm/pandoc

Haskell is fantastic for programming systems where types are not just a tool, but central to the goals of the program. E.g. a program for converting one type of markup files to another (from one type to another type), like pandoc [1], which indeed is written in Haskell.

[1]: https://github.com/jgm/pandoc

A slightly different take on this. I've recently seen people combine Pandoc[1] with their own (generally quite small) shell script. It's pretty amazing how little time it can take just using Pandoc / shell to come up with something that's just right for your needs, without all the bells and whistles.

[1]: https://github.com/jgm/pandoc

The only thing that comes to mind is Pandoc [0], [1]. It is worth adding that it was originally created by John MacFarlane, a philosophy professor at the University of California, Berkeley. It's written in Haskell.

[0] http://pandoc.org/

[1] https://github.com/jgm/pandoc

Well, the original markdown.pl heavily uses regexps.

From having tilted at this windmill a little myself, I think:

1. It's tricky enough to handle correctly all the under-specified corner cases of basic markdown -- not to mention the popular extensions to it. The cognitive load of doing it with complex regexps gets heavy, quickly.

2. I'm incredibly impressed with all the work that John MacFarlane has put into the problem, for example in [Pandoc] and [Cheapskate].

[Pandoc]: https://github.com/jgm/pandoc

[Cheapskate]: https://github.com/jgm/cheapskate

Show me a BASIC program as impressive as any of:

- Elm's Time Travelling Debugger: http://debug.elm-lang.org/

- Pandoc: https://github.com/jgm/pandoc

- XMonad: http://xmonad.org/

- (GHC, should really count)