Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Patricia Ferreira Newsgroups: pt.comp.programacao Subject: Re: sobre common lisp e o sistema de arquivos Date: Tue, 23 Jan 2024 15:42:20 -0300 Organization: A noiseless patient Spider Lines: 44 Message-ID: <87zfwvki2b.fsf@example.com> References: <87v87la7zs.fsf@example.com> <878r4h9o4m.fsf@example.com> <87ede8klea.fsf@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: dont-email.me; posting-host="6360ff6ba585079f1e966f09f348dbb3"; logging-data="1481457"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+g52CcIdcBiDN33hQ0SJ+HugTGhuSfDqg=" Cancel-Lock: sha1:tp3ND4AhV8OPP3NnRCFDfi6+Ac0= sha1:c1MZCJYbhTGD0WEcEav8CftlKyQ= Xref: csiph.com pt.comp.programacao:188 Patricia Ferreira writes: > Patricia Ferreira writes: > >> Patricia Ferreira writes: >> >>> Tenho lido vários pedaços de documentação Common Lisp por aí, livros >>> incluindo. Antes de falar com o sistema de arquivos, vale a pena ler o >>> capítulo 14 de Peter Seibel ``Practical Common Lisp''. >>> >>> Files and File I/O >>> https://gigamonkeys.com/book/files-and-file-io.html >>> >>> ``When pathnames were designed, the set of file systems in general use >>> was quite a bit more variegated than those in common use today. >>> Consequently, some nooks and crannies of the pathname abstraction make >>> little sense if all you're concerned about is representing Unix or >>> Windows filenames.'' >> >> Eis o tipo de armadilha contras as quais estamos. >> >> NNTPD> (rename-file (make-pathname :name "1" :type "tmp") >> (make-pathname :name "2" :type "txt")) >> Failed to find the TRUENAME of >> "c:\\[...]\\quicklisp\\local-projects\\nntp\\groups\\1.tmp": >> >> Lol. Não consigo nem renomear um arquivo. > > Eis a próxima. > > NNTPD> (rename-file "3.txt" "3") > #P"c:/[...]/nntp/groups/local.test/3.txt" > #P"c:/[...]/nntp/groups/local.test/3.txt" > #P"c:/[...]/nntp/groups/local.test/3.txt" > > Não é fácil renomear um arquivo sem uma ``extensão'', que Common Lisp > adequadamente chama de ``type''. Tentei também um experimento aleatório > como > > (make-pathname :name "3" :type nil) > > com mesmo comportamento. Desisti de não usar extensões. Lol. /Shame on me./ Em vez de NIL, basta :type "".