* delete-file ?? @ 2002-07-14 16:33 Bruce Korb 2002-07-15 6:00 ` Rob Browning 0 siblings, 1 reply; 4+ messages in thread From: Bruce Korb @ 2002-07-14 16:33 UTC (permalink / raw) Hi, Programming successfully is a task involving keeping track of a myriad of minutia and fitting all the little pieces together. Anything that reduces the amount of information that one needs to track is a good thing. The Guile library supports POSIX calls with POSIX-ly named functions. Excellent. I only need to learn one set of names and figure out some mostly obvious permutations to use the Guile function for the POSIX call. So, despite the fact that "delete-file" is far more obvious than "unlink", the rename increases the complexity of my programming life. I had to find "delete-file" by grepping the source for "unlink *\(". Ick. Please consider adding "unlink" and any other POSIX calls that got renamed. Thanks. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: delete-file ?? 2002-07-14 16:33 delete-file ?? Bruce Korb @ 2002-07-15 6:00 ` Rob Browning 2002-07-16 0:03 ` Bruce Korb 0 siblings, 1 reply; 4+ messages in thread From: Rob Browning @ 2002-07-15 6:00 UTC (permalink / raw) Cc: guile-devel Bruce Korb <bkorb@pacbell.net> writes: > Programming successfully is a task involving keeping track of > a myriad of minutia and fitting all the little pieces together. > Anything that reduces the amount of information that one needs > to track is a good thing. The Guile library supports POSIX > calls with POSIX-ly named functions. Excellent. I only need > to learn one set of names and figure out some mostly obvious > permutations to use the Guile function for the POSIX call. > So, despite the fact that "delete-file" is far more obvious > than "unlink", the rename increases the complexity of my > programming life. I had to find "delete-file" by grepping > the source for "unlink *\(". Ick. Please consider adding > "unlink" and any other POSIX calls that got renamed. That sounds like a good idea to me, though we might need another function. I'm not sure what the error/return semantics of delete-file are -- docs don't say, and whatever's bound to unlink should follow the current guile posix conventions... -- Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG=1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: delete-file ?? 2002-07-15 6:00 ` Rob Browning @ 2002-07-16 0:03 ` Bruce Korb 2002-07-16 1:56 ` Rob Browning 0 siblings, 1 reply; 4+ messages in thread From: Bruce Korb @ 2002-07-16 0:03 UTC (permalink / raw) Cc: guile-devel Rob Browning wrote: > That sounds like a good idea to me, though we might need another > function. I'm not sure what the error/return semantics of delete-file... Read the source, Luke :-( > SCM_DEFINE (scm_delete_file, "delete-file", 1, 0, 0, > (SCM str), > "Deletes (or \"unlinks\") the file specified by @var{path}.") > #define FUNC_NAME s_scm_delete_file > { > int ans; > SCM_VALIDATE_STRING (1, str); > SCM_SYSCALL (ans = unlink (SCM_STRING_CHARS (str))); > if (ans != 0) > SCM_SYSERROR; > return SCM_UNSPECIFIED; > } > #undef FUNC_NAME You're right: > SCM_DEFINE (scm_unlink, "unlink", 1, 0, 0, > (SCM path), > "Unlinks (or \"deletes\") the file specified by @var{path}.") > #define FUNC_NAME s_scm_unlink > { > int ans; > SCM_VALIDATE_STRING (1, path); > SCM_SYSCALL (ans = unlink (SCM_STRING_CHARS (path))); > return gh_int2scm( ans ); > } > #undef FUNC_NAME > > SCM_DEFINE (scm_delete_file, "delete-file", 1, 0, 0, > (SCM path), > "Deletes (or \"unlinks\") the file specified by @var{path}.") > #define FUNC_NAME s_scm_delete_file > { > SCM res = scm_unlink( path ); > return (gh_scm2int( res ) != 0) ? SCM_SYSERROR : SCM_UNSPECIFIED; > } > #undef FUNC_NAME And, yes, I know "gh_*" is deprecated. I'm sure you can fix it. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: delete-file ?? 2002-07-16 0:03 ` Bruce Korb @ 2002-07-16 1:56 ` Rob Browning 0 siblings, 0 replies; 4+ messages in thread From: Rob Browning @ 2002-07-16 1:56 UTC (permalink / raw) Cc: guile-devel Bruce Korb <bkorb@pacbell.net> writes: >> That sounds like a good idea to me, though we might need another >> function. I'm not sure what the error/return semantics of >> delete-file... > > Read the source, Luke :-( Umm. I would have except that it was 1AM here, and I was kinda tired, having been working since the previous morning. I made that comment intending it to be a heads up for anyone else who felt like looking in to the issue sooner. -- Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG=1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-07-16 1:56 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-07-14 16:33 delete-file ?? Bruce Korb 2002-07-15 6:00 ` Rob Browning 2002-07-16 0:03 ` Bruce Korb 2002-07-16 1:56 ` Rob Browning
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).