Subject: Re: Here we go again. More CMUCL/ACL pathname differences. From: Erik Naggum <erik@naggum.no> Date: 1999/01/12 Newsgroups: comp.lang.lisp Message-ID: <3125141537094847@naggum.no> * robert_m_miles@yahoo.com | I would have liked if the Common Lisp pathname stuff didn't leave so much | to the implementation. so you want more access to the native file system, is that it? that's OK -- every Common Lisp programmer does that, and gets it. what _I_ don't get is why you are surprised that you cannot do this _portably_. Common Lisp is not a Unix language, nor a Bill Gates "innovation". it predates both, see? at the time Common Lisp was defined file systems far superior to what we are used to were the norm, and they differed greatly amongst themselves. the Bill Gates "innovation" doesn't differ from Unix except in stupid details like / vs \, so it's easy for someone today to think that he should have access to all these things. the fact is: he has, but not in the COMMON-LISP package. | For example, how do you find out portably whether or not a pathname is a | valid logical pathname namestring without possibly signalling an error | (calling translate-logical-pathname on it would do the trick but if it's | not valid you get an error)? you are confusing pathnames and namestrings. that's a particularly stupid thing to do considering your clamoring about how crappy the stuff you obviously don't understand is. your particular case is pretty damn easy: call PARSE-NAMESTRING, if the result is of type LOGICAL-PATHNAME, it was a valid logical pathname namestring. of course, you catch parsing errors with a simple IGNORE-ERRORS wrapper around that call. | How do you find out portably if a supplied physical pathname namestring | is a directory or a file? again, you call PARSE-NAMESTRING. then you see if FILE-NAMESTRING is NIL. | There is no `directory-p'. oh, you mean whether a Unix filename really names a directory? well, this is one of the great mysteries of Unix. originally, you could use `cat' on a directory and look at the bytes. you can no longer do that. Unix's very famous "everything is a file" concept has broken down, but not quite. on other operating systems, you had to specify a different pathname to get at the actual directory file, it wasn't just a matter of using a different operation on the same pathname. Unix's simplicity has fooled you into believing something that simply does not _portably_ hold and now you blame Common Lisp for it. how fucking intelligent of you. | How do you portably map all files with an unspecified type to default | type? so you've had a little problem here. let's solve that problem for you, provided that you want it solved and don't just want an eternal excuse. some other whining losers who have posted here don't really want their solutions solved, they want something to whine about, so they can go back to write in Perl. all they need is an _excuse_ not to go Common Lisp, and latching onto some stupid little thing that isn't "portable" is enough for them to discard Common Lisp entirely. pretty amazing, really, and probably worth a PhD in psychology. | How do you portably list all files and directories recursively from a | given point? well, what have you tried? show us. why did it fail? | All of these features are provided natively to nearly every file system | around and a portable API to these features that every file system has | could have been implemented but instead we have what I think is total | crap. the problem is primarily your attitude. this is a technical problem, so it has technical solutions. getting it into the standard is a _separate_ issue. | I'd love to use CL instead of PERL or the 50% solution for scripting but | I have to use PERL or SH as the glue between the CL modules e.g: | | #!/bin/sh | lisp -eval '(load ...)' | | So that I have real filesytem control. so you're incompetent at using your Common Lisp system. how surprising. | No Erik, I don't want you to waste your time fixing anything. fixing things isn't a waste of time. | It's beyond fixing. you're not the person I'd trust with such a clear-cut technical answer. you simply confuse politics with engineering, and that is not conducive to either technical or political answers. | I remember someone mentioning that Genera had a truly sophisticated | portable file-system API but it was deemed too complex for inclusion into | Common Lisp. Maybe someone should get the documentation for the API and | then make an implementation for it that can with some work run on all the | major systems and thus allow it's use to be pervasive and then provide a | "Naggum" license for it that makes it free for non-commercial use and | allows reasonable licensing negotiations for unrestricted commercial use | while ensuring that one standard is maintained. How about you, Erik? it isn't horribly difficult to write your own wrappers around the Unix file system cruft and make it portable for _your_ code. your fixation with having somebody else do it for you is _really_ digusting. I actually have all I need in Allegro CL, so I have no urgent need to do this in the first place. however, I have been working on various pieces in what should become a Common Lisp "wrapper" for all the insanely non-portable cruft in the various Unixes, not much different from what Perl has done for Unix in principle, only this time in a programming language and with a spec. I call it CLUNIX, pronounced "clue? nix!". | What's going on with the language specification anyways? Is there going | to be another revision or ANSI update in a few years? Could this crap | get fixed then? look, dude, you are in serious need of attitude readjustment. you don't get people to work on anything, and especially not for free, if you call what they do "crap". reserve expressions of your attitude problem till _after_ you have worked on some of this stuff yourself and have been turned down for stupid reasons. | Yes, if what I'm bitching about gets fixed then I'll be truly satisfied. I see no evidence of that, since you haven't even bothered to learn to use your existing Common Lisp system. so even if I fix this, I don't _expect_ you to sit down and learn how to use it properly, but still come back with whining complaints. | Other than this filesystem crap CL is the greatest language there is. and when we fix the filesystem crap, you'll whine about something else you'll call crap, too, I'm sure. there are lots of flaws and problems in any environment. your moral stature is measured by whether you have a constructive element to what you do, and whether somebody else can get at that constructive element and suggest things you can do. if constructive suggestions don't work, there is legitimate cause to believe you have no constructive element at all, and therefore must be treated as destructive. until next time, your homework assignment is to write a specification for the file system interface you want. I will call it crap without reading it, in the spirit of your treatment of the CL pathname system. then we can discuss it "openly". and finally, we send it all to Scott Adams. #:Erik