Path: csiph.com!1.us.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!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 14:30:21 -0300 Organization: A noiseless patient Spider Lines: 45 Message-ID: <87ede8klea.fsf@example.com> References: <87v87la7zs.fsf@example.com> <878r4h9o4m.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="1456332"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18L5AsKMq2McdjFgozRW63IPEFj4v959Ek=" Cancel-Lock: sha1:Nnc91Sl8CAndGmdG5ab1eS/QlhY= sha1:/vTfzkNxLS2ii8uDwov0ufxMVBs= Xref: csiph.com pt.comp.programacao:187 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. Por que você escolheria uma linguagem de programação que não te apresenta esses obstáculos históricos? If you know your history You know where you're coming from -- Robert Marley, 1978.