Post AG0SXsTMfV0Wt8Pd6O by wolf480pl@mstdn.io
(DIR) More posts by wolf480pl@mstdn.io
(DIR) Post #AG0SHRxFUgRM0jYbi4 by pfm@edolas.world
2022-01-31T17:33:13.176694Z
0 likes, 2 repeats
If you were going to implement a new daemon/service for POSIX-compliant systems, which would you pick?If you feel like explaining why you'd pick that option, please reply with details.Also: please boost!
(DIR) Post #AG0SXsTMfV0Wt8Pd6O by wolf480pl@mstdn.io
2022-01-31T17:35:40Z
1 likes, 0 repeats
@pfm Zig, if I had enough time that I could contribute any bugfixes to the compiler and stdlib that I need for my daemon to work.Otherwise, C.Though I'd consider Rust if I knew it.
(DIR) Post #AG0SXt1OcyEIagKo9A by wolf480pl@mstdn.io
2022-01-31T17:36:13Z
1 likes, 0 repeats
@pfm Unless you need it done very quickly and pinky-promise to throw it away in half a year, then Python
(DIR) Post #AG0SnP3nn3l2IirJSK by lanodan@queer.hacktivis.me
2022-01-31T17:38:58.472820Z
0 likes, 0 repeats
@pfm > for POSIX-compliant systemsShell and C would be the only true POSIX ones. Go, Perl and Python could be considered, Rust would be out, it's not portable.And if POSIX doesn't really matters I would tend to use Elixir (which is still more portable than Rust).
(DIR) Post #AG0U2AqF2NDeV57hAm by pfm@edolas.world
2022-01-31T17:52:54.645950Z
0 likes, 0 repeats
@lanodan OK, maybe I should've put it differently, like "a daemon/service that runs on different flavours of un*x".Why would you use Elixir, if I may ask? I'm interested in the reasoning behind the choices too.
(DIR) Post #AG0UHqSmZU01vncgYS by niplav@schelling.pt
2022-01-31T17:55:45Z
0 likes, 0 repeats
@pfm if I need to be finished quickly: pythonIf I need to be finished quickly and it needs to be fast: cIf it needs to be secure and I can take as long as I want: Rust
(DIR) Post #AG0VFdJ2cNqGV4ZkX2 by lanodan@queer.hacktivis.me
2022-01-31T18:06:28.651751Z
1 likes, 0 repeats
@pfm Depends a lot of what the daemon is.If it's prone to complexity and should retain a very good uptime I would definitely pick Elixir because thanks to Erlang, it nicely architecturally avoids subroutines/subprocesses crashing the entire thing. And the language and librairies are quite nice for handling network requests. Limitation of it would be that it's rather hard to package.If it can afford a bit of unplanned downtime from time to time, then Go.If it's a very simple one then Shell or C.Perl would be for when the others don't really fit, like C/Shell being too annoying.And to be honest I would avoid Python a lot, the way the language is handled means a lot of maintenance which isn't really a thing I would pick for a daemon but more for quick and dirty scripts that you're not going to keep for a long time.
(DIR) Post #AG0WdJdFW8IuO0stWK by sjb@mstdn.io
2022-01-31T18:21:32Z
0 likes, 0 repeats
@wolf480pl @pfm My thoughts were C or Rust. You want a system daemon to be fast (so native code), but perhaps you also want really high protection against buffer overruns etc. So that points to a compiled language with more checks/safety than C.
(DIR) Post #AG21HUtoEm70hGfNJo by crc@toot.forth.works
2022-01-31T18:35:44.696203Z
1 likes, 0 repeats
@pfm Being me, I'd write in Forth.
(DIR) Post #AG21HVoWptTxXBCfj6 by pfm@edolas.world
2022-02-01T11:40:08.153785Z
0 likes, 0 repeats
@crc That didn't come as a surprise. :)However, certain non-functional requirements may lead to using other tech. For example, a service required to process incoming requests/messages with external software doesn't seem natural for Forth.I am aware that RETRO provides a facility to run external programs, but my Forth "skills" are far from ready to write any meaningful piece of software.
(DIR) Post #AG21PXolGnZU478tEG by pfm@edolas.world
2022-02-01T11:41:36.785313Z
0 likes, 0 repeats
@kensanata This actually sounds like a good idea, thanks for the reply.(Side note: I've recently found out my PerlMonks account is almost 20 years old!)
(DIR) Post #AG21TkCVAl35d2FWKW by goo@tech.lgbt
2022-01-31T18:28:31Z
1 likes, 0 repeats
@pfm With my current knowledge, I would only be comfortable using Rust or Python, and possibly C with some effort. Assuming it's a long-lived, possibly network-facing, likely important system process, I'd choose Rust.
(DIR) Post #AG21YCIkdW2fwLIPOC by theruran@hackers.town
2022-01-31T17:40:04Z
1 likes, 0 repeats
@pfm Ada+SPARK, of course :ameowbongo:
(DIR) Post #AG21dENqK3V3qU4sds by pfm@edolas.world
2022-02-01T11:44:06.083275Z
1 likes, 0 repeats
@theruran Of course, why didn't I think of Ada?! :blobfoxlul:
(DIR) Post #AG21muCwBtHoAPadwe by pfm@edolas.world
2022-02-01T11:45:49.915204Z
0 likes, 0 repeats
@devtop How much of that code is going to be deployed and handling internet-originating traffic? How well is Plan9 suited for such cases?
(DIR) Post #AG22NJLUCqC6YVwq7U by pfm@edolas.world
2022-02-01T11:52:24.384678Z
0 likes, 0 repeats
@lanodan Elixir is definitely an interesting option.OTP does seem like a solid base to build on. Thanks!Thanks for mentioning Elixir's packaging issue, I'll read about it some more. Have got some references I could follow? (It's OK if not, I'll search myself anyway.)
(DIR) Post #AG22WHVeOygrT2yo9g by lanodan@queer.hacktivis.me
2022-02-01T11:53:57.602244Z
1 likes, 0 repeats
@pfm For elixir packaging I think you can look at NixOS (has a package for pleroma for example) and FreeBSD (has a lot of elixir librairies being packaged), I don't think there is much more I could point to for this.
(DIR) Post #AG2AsReIBSJGv06Kpc by xgqt@fosstodon.org
2022-02-01T13:27:31Z
0 likes, 0 repeats
@pfm If it has to run on posix-like system I would pick a scheme implementation that compiles to c. this in fact would be good exercise as I wrote "larger" software only in guile and racket.would be good to try cyclone, gambit or chicken and write a system daemon, maybe reimplement from but with lisp syntax?
(DIR) Post #AG2B4H6JE9Fxg9qYlc by xgqt@fosstodon.org
2022-02-01T13:29:49Z
1 likes, 0 repeats
@pfm If it has to run on posix-like system I would pick a scheme implementation that transpiles to c. This in fact would be good exercise as I wrote "larger" software only in guile and racket.One could try cyclone, gambit or chicken.
(DIR) Post #AG3m1AhKT2uKPjVQae by theruran@hackers.town
2022-02-01T14:21:35Z
0 likes, 0 repeats
@pfm no love for Ada :grrcry: it even has its own library repository now - https://alire.ada.dev/
(DIR) Post #AG3m1BHqHI7AEyaaVE by pfm@edolas.world
2022-02-02T07:58:31.688278Z
0 likes, 0 repeats
@theruran I didn't mean to kick your puppy, it's just that I haven't written a line of Ada ever. Though I am aware of its use in military environments, at least in the past.Do you write Ada code?Are there any notable FOSS projects written in Ada? Something for the curious to study?
(DIR) Post #AG4W9JOfHZfa9fOwj2 by theruran@hackers.town
2022-02-02T15:17:52Z
1 likes, 0 repeats
@pfm haha no I'm not upset at you. it's just that everyone forgets about Ada or doesn't care about it even though it's been around for decades and has a GCC frontend.the Muen separation kernel is a nice example of a large SPARK project. you can check out a lot of projects at https://github.com/ohenley/awesome-ada
(DIR) Post #AG4XDogH0kZMIELj5U by pfm@edolas.world
2022-02-02T16:47:28.479035Z
0 likes, 0 repeats
@theruran To me, Radalib seems like a cool project:https://github.com/sergio-gomez/RadalibThanks a lot for the link! I still don't think I'd choose it because I need to make sure someone could take over maintenance of my project (I'm not super young anymore and sometimes things just happen).
(DIR) Post #AG4Ysn8LlgHzK0aIAi by theruran@hackers.town
2022-02-02T16:59:12Z
0 likes, 0 repeats
@pfm nice, this is some good looking code!what you said is an important consideration. the FOSS Ada community seems to be quite small and constrained by the usual 9-5. like, there's Qt4 bindings but it's abandoned and no one seems to have the bandwidth to revive it and update it to Qt5. as @nytpu discovered, Unicode UTF-8 support is limited atm although there are some libraries available.Ada needs some fancy-pants SV startups to adopt it and push it forward for modern general-purpose usage. but like, Rust seems risky since every version seems to have breaking changes and their community support team (?) recently resigned en masse due to irresolvable disagreements with the core dev team. meanwhile, Ada 2022 and it SPARK counterpart are carrying on in the standards process.
(DIR) Post #AG4YsnaM5Ygsirgep6 by pfm@edolas.world
2022-02-02T17:06:04.495052Z
0 likes, 0 repeats
@theruran Then I'm left with Forth! :charliechaplinsmug: