Live data from Hacker News

The Shepherd 1.0.0 released

guix.gnu.org

11–20 of 58 posts

Re: The Shepherd 1.0.0 released

#11
post #2

Taking a quick look at this, the first thing I notice is that the configuration file syntax is obtuse and nigh-illegible unless you already know what things are, and even then it's cumbersome and looks frustrating to write. e.g. instead of systemd's simple: Exec=/path/to/ntpd -n -c /etc/ntpd.conf -u ntpd -g We have this mess: #:start (make-forkexec-constructor (list "…/bin/ntpd" "-n" "-c" "/…/…-ntpd.conf" "-u" "ntpd"…

I mean, they're pretty much the same right? You can't abstract away the services and you need to pass arguments to the executable (ntpd in this case).

I don't see more or fewer issues, but I also don't see the value to using Scheme instead of a conf. file like format.

At the end, there's talk about adding the possibility to live reconfigure services, which is pretty cool but I don't really see what kind of users are targeted by that use-case, at least not regular users like me who's running Linux on a single laptop.

The link at the end (https://spritely.institute/news/spritely-nlnet-grants-decemb...) is IMO much more interesting since it would make it possible to orchestrate several machines and their services as well. If you have live reloading as well, I think it would make for good developer experience.

My main gripe with Guile is its ergonomics and tooling: no LSP, no linter, no step-debugger that I know of and the docs are often unhelpful imo.

Maybe I'm not Scheme brained enough but I think it's a shame because there are some really cool projects out there (anything https://spritely.institute/ really).

P.S: I know that some people will tell me to get used to REPL based development which I think is fine for small-ish projects but I can't understand the flow one uses for larger projects where many components might need to talk to each other.

Re: The Shepherd 1.0.0 released

#13
post #9
post #2

Taking a quick look at this, the first thing I notice is that the configuration file syntax is obtuse and nigh-illegible unless you already know what things are, and even then it's cumbersome and looks frustrating to write. e.g. instead of systemd's simple: Exec=/path/to/ntpd -n -c /etc/ntpd.conf -u ntpd -g We have this mess: #:start (make-forkexec-constructor (list "…/bin/ntpd" "-n" "-c" "/…/…-ntpd.conf" "-u" "ntpd"…

Guile has been the scripting language of choice for GNU before the Internet was called Internet. It hasn't even been disliked, it's been simply ignored, for the most part.

I know that's true, having heard it talked about a lot over the years. But why, though? What is it about Guile that made GNU pick it over CL or Scheme (or TCL or Lua or...)?

NM, answered my own question. It’s literally Scheme.

Re: The Shepherd 1.0.0 released

#14
post #10
post #8

Earlier quoted context omitted.

You don't have to be an expert, but knowing the basics of Lisp helps. The full definition of the example "ntpd" service is clear to read. > the actual guile scheme documentation didn't seem to explain that syntax at all It does, here: https://www.gnu.org/software/guile/manual/html_node/Expressi... It's a basic concept of Lisp. Everything is evaluated, unless quoted. Code is data is code!

> Code is data is code! Which nowadays is 'yaml is code is yaml is code is yaml' in the devops world. The wheel turns.

...only with more parsing gotchas :(

Re: The Shepherd 1.0.0 released

#15
post #2

Taking a quick look at this, the first thing I notice is that the configuration file syntax is obtuse and nigh-illegible unless you already know what things are, and even then it's cumbersome and looks frustrating to write. e.g. instead of systemd's simple: Exec=/path/to/ntpd -n -c /etc/ntpd.conf -u ntpd -g We have this mess: #:start (make-forkexec-constructor (list "…/bin/ntpd" "-n" "-c" "/…/…-ntpd.conf" "-u" "ntpd"…

[deleted]

Re: The Shepherd 1.0.0 released

#16
Shepherd is a wonderful little service manager. The project has been integrating the good features of systemd (socket activation, timers, etc.) while retaining the hackability of using a fully featured programming language for configuration. Been happily using it with Guix for over a decade!

NLnet has funded a really cool project to turn Shepherd into a distributed system that enables a fleet of Shepherds to cooperate. https://nlnet.nl/project/DistributedShepherd/

Re: The Shepherd 1.0.0 released

#17
post #10
post #8

Earlier quoted context omitted.

You don't have to be an expert, but knowing the basics of Lisp helps. The full definition of the example "ntpd" service is clear to read. > the actual guile scheme documentation didn't seem to explain that syntax at all It does, here: https://www.gnu.org/software/guile/manual/html_node/Expressi... It's a basic concept of Lisp. Everything is evaluated, unless quoted. Code is data is code!

> Code is data is code! Which nowadays is 'yaml is code is yaml is code is yaml' in the devops world. The wheel turns.

I tell ya, it was sometimes difficult to be a lisp guy doing devops full-time.

Re: The Shepherd 1.0.0 released

#18
post #2

Taking a quick look at this, the first thing I notice is that the configuration file syntax is obtuse and nigh-illegible unless you already know what things are, and even then it's cumbersome and looks frustrating to write. e.g. instead of systemd's simple: Exec=/path/to/ntpd -n -c /etc/ntpd.conf -u ntpd -g We have this mess: #:start (make-forkexec-constructor (list "…/bin/ntpd" "-n" "-c" "/…/…-ntpd.conf" "-u" "ntpd"…

Interesting take. As a hobbyist, I get special characters and escapes wrong in systemd all the time, because they try to look like regular shell but aren't. And systemd-escape (or whatever it's called) just makes an ugly mess that makes it hard for me to read.

I don't know lisp, but the idea of having each argument be part of a list (kind of like launchd's xml format) resonates with me.

Re: The Shepherd 1.0.0 released

#19
"give a man an inch and they'll take a mile" and what not, but,

I wonder how hard this would be to port to Hoot, a web assembly/wasm-ified Guile Scheme. https://spritely.institute/hoot/

It would be neat to have some real management APIs for the things running on a page, to be able to manage long running processes & workers.

A bit more niche than for general webapps, but systemgo comes to mind; a re-impl of some of systemd in go, specifically designed to be run on the web in Browsix. https://github.com/plasma-umass/systemgo

Re: The Shepherd 1.0.0 released

#20
post #2

Taking a quick look at this, the first thing I notice is that the configuration file syntax is obtuse and nigh-illegible unless you already know what things are, and even then it's cumbersome and looks frustrating to write. e.g. instead of systemd's simple: Exec=/path/to/ntpd -n -c /etc/ntpd.conf -u ntpd -g We have this mess: #:start (make-forkexec-constructor (list "…/bin/ntpd" "-n" "-c" "/…/…-ntpd.conf" "-u" "ntpd"…

To be fair the Guile one is properly quoted and specifies the log file. make-forkexec-constructor is a really terrible name though, and Guile is a poor choice.
Post reply on HN