News for hackers. Stuff that matters.
Re:Soupault is a tool that helps you create and manage stati... by tomcam on Saturday October 09, 2021 @08:25PM (#28814626)
Mysteriously, their glossary contains this definition.

    chim
      The secret syllable of royalty.
Re:Soupault is a tool that helps you create and manage stati... by peanut_worm on Saturday October 09, 2021 @08:31PM (#28814664)
Thats a rather obscure reference to a concept in the story for The Elder Scrolls III: Morrowind.
Re:Soupault is a tool that helps you create and manage stati... by 1MachineElf on Saturday October 09, 2021 @10:41PM (#28815322)
The CHIM entry in the Unofficial Elder Scrolls Pages Wiki: https://en.uesp.net/wiki/Lore:CHIM
Re:Soupault is a tool that helps you create and manage stati... by dmbaturin on Saturday October 09, 2021 @11:20PM (#28815468)
I'm glad someone recognized the CHIM reference, but I'm surprised that the entry for AASR (Ancient and Accepted Scottish Rite) hasn't caught anyone's eye as being just as out of place. :)
Re:Soupault is a tool that helps you create and manage stati... by gopiandcode on Saturday October 09, 2021 @07:11PM (#28814184)
An interesting thing about this application is that it's written in OCaml.
Re:Soupault is a tool that helps you create and manage stati... by nine_k on Saturday October 09, 2021 @07:24PM (#28814263)
OCaml, invented in France, is taught and is reasonably popular there.

If you get past the quirks of the syntax, it's a really nice language, deserving more popularity in the industry (it's already popular in CS circles).

Re:Soupault is a tool that helps you create and manage stati... by zdragnar on Saturday October 09, 2021 @07:50PM (#28814395)
Eh, it has it's charms, but I don't really see a place for it where another language wouldn't be an equally good or better fit. There is a glut of good choices, and only so many novel problems that 95% of industry ever actually faces.

Maybe when multicore sees the light of day, there might be some interesting possibilities. It is really hard to not say "why not just use go/node/racket/haskell/fsharp/rust/zig/etc. when you are on a timeline and you aren't Jane Street...

Re:Soupault is a tool that helps you create and manage stati... by Zababa on Saturday October 09, 2021 @09:23PM (#28814956)
> I don't really see a place for it where another language wouldn't be an equally good or better fit.

Parsers/interpreters/compilers/static analyzers. It's solidly established here. The Web Assembly reference implementation is written in OCaml for example.

> "why not just use go/node/racket/haskell/fsharp/rust/zig/etc"

I think Python, Java, C# or even PHP will come up before F#, Rust, Zig, Racket and Haskell. As for the answer, you can just use the same language pretty much everywhere. I think OCaml is probably the most versatile language of the lot. You can program in any way you want, target pretty much anything you want. How important is it, to be able to use the same language everywhere? I honestly don't know.

> when you are on a timeline and you aren't Jane Street...

I'm not sure what you mean exactly with "on a timeline", I guess it's a reference to the lack of libraries/documentation? If that's the case, I don't know how much it matters once you're experienced with the language. I'm not saying libraries don't matter at all, that would be silly. You don't want to do JSON parsing or a HTTP server yourself. But for small stuff, you can just write a bit more code that you would usually do. It's going to be way smaller than a full library, and it's going to be easier to use since you don't have to learn a new library. This is however just me thinking about it, I don't have any hard data on this, and would love to know if some exists.

Re:Soupault is a tool that helps you create and manage stati... by dmbaturin on Saturday October 09, 2021 @11:58PM (#28815629)
For soupault, library availability was actually a key factor: lambdasoup [1] is one of the best HTML parsing libraries if you want to automatically edit element trees, not just extract data from them.

The single case when I couldn't find a library that would really suit my needs is a TOML parser. The only TOML library for OCaml that existed when I started soupault (To.ml) has incompatibilities with the TOML spec and I categorically disagree with its design.

My solution was to write a new TOML library [2] for my own use and for the benefit of the community. It uses OCaml functors to allow the user to plug their own bignum and calendar libraries if needed and I think it's much easier to use.

Well, the topological sort library [4] also counts (sort of): there are generic graph libraries that already implement sorting, I wanted it to produce user-friendly error messages about cycles or non-existing dependencies, and to take a simple assoc list rather than a custom graph type, so I also made my own.

It's used for sorting "widgets" (page processing steps) according to dependency lists that users can specify in the config (like `after = ["foo", "bar"]`).

Other than that, one thing I really like about OCaml is that the compiler team and most library maintainers are considerate towards downstream users with respect to compatibility.

The Lua interpreter [3] that soupault uses for its plugin API is a revived 20 year old research project. It only needed minor modifications to build with recent compiler versions.

[1] https://github.com/aantron/lambdasoup

[2] https://github.com/dmbaturin/otoml

[3] https://github.com/lindig/lua-ml

[4] https://github.com/dmbaturin/ocaml-tsort

Re:Soupault is a tool that helps you create and manage stati... by Zababa on Sunday October 10, 2021 @08:47AM (#28818002)
Thank you for sharing that, that was interesting!

> The Lua interpreter [3] that soupault uses for its plugin API is a revived 20 year old research project. It only needed minor modifications to build with recent compiler versions.

That's one of the other strengths of OCaml that I didn't mention, especially compared to more recent languages. The language has been around for a long time, and is probably going to be around for a long time.

Re:Soupault is a tool that helps you create and manage stati... by nine_k on Saturday October 09, 2021 @11:46PM (#28815586)
OK, give me one that has: (1) A Hindley-Milner type system with type inference, (2) Native or JIT compilation with good runtime speed, (3) Easy-to-understand execution model, and (4) garbage collection.

- OCaml has all of them, hands down. It is even getting reasonable parallel processing support as of recently.

- Haskell has beautiful implementations of 1, 2, and 4, but definitely not 3, which often leads to hilarious memory leaks.

- Rust has 1, 2, and 3, but 4, while possible, is not really ergonomic, and compile times are the longest.

- Typescript (with Ramda for kicks) has 3 and 4, and almost 3, but still not really 1.

- Java has 2, 3, and 4, but sadly not 1, and programming with immutable values is possible but the stdlib often resists it.

Re:Soupault is a tool that helps you create and manage stati... by zdragnar on Sunday October 10, 2021 @11:15PM (#28824264)
Common Lisp with Coalton added on will get you all of those.

I have dreams that the new java record classes will take the world by storm, but I imagine years of refuctoring getters and setters will be a hard habit to break for the community.

Re:Soupault is a tool that helps you create and manage stati... by nickcox on Sunday October 10, 2021 @01:26AM (#28815983)
F#
Re:Soupault is a tool that helps you create and manage stati... by mro_name on Sunday October 10, 2021 @04:26AM (#28816758)
what sold it to me, is the long time it is around already, so it is reliable for long-term endevours.

And it can be used functionally and statically compiled on even the smallest devices like the raspberry pi zero.

That combination appeared unique to me.

Edit + Spoiler: and they sport friendly discussions on https://discuss.ocaml.org/u/mro

Re:Soupault is a tool that helps you create and manage stati... by ShamblingMound on Saturday October 09, 2021 @10:45PM (#28815335)
If anyone knows of a flexible static site generator that can process Rmarkdown files, I'd be interested to know about it.

There is `rmarkdown::site` (see [0]), but I had to mess with the internals to get it to do what I wanted.

[0]: https://rmarkdown.rstudio.com/lesson-13.html

Re:Soupault is a tool that helps you create and manage stati... by dmbaturin on Saturday October 09, 2021 @11:32PM (#28815520)
The key idea of soupault is that it works on the HTML element tree level and can automatically call external convertors on pages (based on page file extensions, see [1]), so the input format doesn't matter to it.

You can bring your own convertors and pass any options to them. I'm not saying it's a perfect SSG for everyone, but at least uncommon input format support isn't an intractable problem for it.

[1] https://github.com/dmbaturin/soupault-website/blob/master/so...

Re:Soupault is a tool that helps you create and manage stati... by ShamblingMound on Sunday October 10, 2021 @01:23PM (#28820175)
Thanks, that is a great feature.
Re:Soupault is a tool that helps you create and manage stati... by florg on Sunday October 10, 2021 @03:57AM (#28816638)
On jamstack.org's list of static generators[0] you can filter by template language. For "R markdown" it only has: Bookdown[1], Rmarkdown as you mentioned, and Blogdown[2].

I've never looked at R markdown before. Thanks for sending me down the rabbit hole with Bookdown. It might solve one of the questions I'm currently thinking about.

[0]: https://jamstack.org/generators/ [1]: https://bookdown.org/ [2]: https://bookdown.org/yihui/blogdown

Re:Soupault is a tool that helps you create and manage stati... by radus on Saturday October 09, 2021 @06:57PM (#28814101)
Any example sites? Having a hard time seeing how everything comes together.
Re:Soupault is a tool that helps you create and manage stati... by dmbaturin on Saturday October 09, 2021 @11:26PM (#28815495)
There's a users page (https://soupault.app/users/), most come with source code links.

ocamlbook.org may be the most illustrative one: it exploits soupault's ability to pipe HTML element content through an external program to automatically type-check code examples in <code> tags with the compiler and also syntax-highlight them with an external tool. The approach would translate to any language without a need for language-specific tools.

Re:Soupault is a tool that helps you create and manage stati... by nathcd on Saturday October 09, 2021 @07:06PM (#28814149)
Looks like its own website is built with Soupault: https://github.com/dmbaturin/soupault-website

The main repository also has directories called 'sample-site' and 'examples': https://github.com/dmbaturin/soupault

Re:Soupault is a tool that helps you create and manage stati... by toastal on Sunday October 10, 2021 @01:23AM (#28815964)
I have been slowly rewriting my static blog from Hakyll to Nix + Soupault to simplify the tools used, remove Stack, and make the outputs reproducible. The maintainer is quick to respond to any questions and suggestions as well.
[dead]
Re:Soupault is a tool that helps you create and manage stati... by karagenit on Saturday October 09, 2021 @06:01PM (#28813704)
I guess it's named after the French writer of the same name [1], hence the French pronunciation. I agree though, if I told my friend "hey check out that new tool called soup-oh" they definitely wouldn't know how to spell it.

[1] https://en.m.wikipedia.org/wiki/Philippe_Soupault

Re:Soupault is a tool that helps you create and manage stati... by Naga on Saturday October 09, 2021 @05:59PM (#28813687)
-ault is a common French word ending that is pronounced 'oh'.
Re:Soupault is a tool that helps you create and manage stati... by 0des on Saturday October 09, 2021 @06:15PM (#28813798)
French speaker here, when browsing HN I read with an inner dialog that is in English, it threw me off too.
Re:Soupault is a tool that helps you create and manage stati... by Zababa on Saturday October 09, 2021 @06:27PM (#28813903)
French speaker too, I had no issues.
Re:Soupault is a tool that helps you create and manage stati... by gdy on Saturday October 09, 2021 @06:17PM (#28813814)
Tell that to Renault too.
Re:Soupault is a tool that helps you create and manage stati... by faut_reflechir on Saturday October 09, 2021 @05:59PM (#28813686)
it is standard french pronunciation and he is providing a useful english guide