3 ms·
I decided to port all my old perl scripts to guile scheme recently and got to add a bunch of nicities (like properly cleaning up on ctrl-c). Not because I reall
by bjoli 3y ago
I decided to port all my old perl scripts to guile scheme recently and got to add a bunch of nicities (like properly cleaning up on ctrl-c). Not because I really needed to, but because I haven't written perl seriously since 2010 and updating the scripts has started becoming hard.
The guile manual is pretty nice, but having something like this will always help people get started. For people that don't know about things like how non-local exits work getting started and doing it correctly can really take some time to figure out.
- rcarmo 3y agoDid you post an example gist someplace, perchance?
- em-bee 3y agohow is guile for scripting? how well does it interact with other programs (running them, getting their output, piping to them, etc)
- LanternLight83 3y agotbh it's no janet-sh, but of course you can make your own macros. I'd love to see either provide native support for additional file descriptors, bash `<()` style. I often wrap a shell around commands just for that. https://www.gnu.org/software/guile/manual/html_node/Pipes.html https://www.gnu.org/software/guile/manual/html_node/Pipes.ht... https://github.com/andrewchambers/janet-sh https://github.com/andrewchambers/janet-sh
- nerdponx 3y agoI think Gauche is better than Guile. Its manual is easier to navigate, its standard library is huge, and it's fast enough for anything I'd ever need it to do. Both tools are fine, but personally I'd choose Gauche of Guile every time.
- bjoli 3y agoIt is definitely nicer to do shell scripts in, but I have other things written specifically for guile using delimited continuations and guile-fibers. Since concurrentML is the only way of writing concurrency that I like I am pretty much stuck with guile since it has what is probably the best implementation. Guile is noticeably faster as well, but that is not really surprising considering the implementation differences.
- em-bee 3y agothe nice thing about guile is that on GNU systems it is pretty much installed by default, so scripts depending on it would be easy to distribute
- yakubin 3y agoI don’t think that’s true for any mainstream Linux distros like Debian, Fedora or Arch.
- em-bee 3y agowell, at least any machine used for development. when i try to remove guile on my fedora machine, then the following get removed too: abrt akmods cargo clang cmake gcc gdb golang kernel-devel make rpm-build rpmdevtools rust vcpkg also several python3 packages and many others that were installed as dependencies from the above that i didn't check if they too depended on something that depends on guile. strictly speaking it is just make and gdb that depend on guile, but gcc depends on make and many other packages depend on gcc. it appears that on debian make does not depend on guile. but since i mainly use fedora, all my machines are likely to have guile installed.
- nerdponx 3y agoI believe Guile scripting is an optional (compile-time) GNU Make extension, so whether or not it's a dependency will depend on how GNU Make is packaged. The others I have no idea about, but I do wonder if these are mostly transitive dependencies via Make.