I was writing a quick little script today... well, at least it started out as a quick little script, but it needed to be able to read the directory names from an arbitrary place in my file structure. I thought, sure, the
After spending too long experimenting with various things I checked the net to see if anybody else knew the answer to what I was starting to think I was too stupid to see. It seems many other people have come up against this deficiency in the
but that has three failings. It prints the entire path, lists the directories with a trailing slash (the -d option), and doesn't see hidden dirs (those that begin with a dot). It is easy to use
and a little more fussing with
Another common solution is to use the
This works but puts all the output on one line, precedes each file with its path, the first line is always the name of the directory being listed, and the file list is all jumbled up. I can use the -printf option of file to fix the path problem and to put each name on its own line, getting rid of the first line is just a matter of piping through the tail command, and pipe through the sort command to organise the result.
That took a lot more hassling than I expected. Weird. You'd think that the ls command would have something that basic. The Amiga does:
Simple, easy to use and understand.
GNU
Additional:
I don't seem to be able to leave it alone. Here is a weird solution that I never would have thought of: use the bash shell's wildcard expansion to do it.
This has a couple of shortcomings, but as always,
We
I'm astounded that linux doesn't have an easy solution to this. Even crappy old MSDOS can do it.
Not very readable, but at least it does it.
Additional:
I have a commandline program called
Nice.
Found where I got it. http://mama.indstate.edu/users/ice/tree/
It was written by Steve Baker (ice@mama.indstate.edu) with HTML output capability Francesc Rocher (rocher@econ.udg.es) and character sets by Kyosuke Tokoro (NBG01720@nifty.ne.jp)
ls command is bound to have an option to restrict output to only directories, right? Wrong. This turned into quite a chase.After spending too long experimenting with various things I checked the net to see if anybody else knew the answer to what I was starting to think I was too stupid to see. It seems many other people have come up against this deficiency in the
ls command. There have been a lot of suggestions to get around it. The most common is: ls -d */but that has three failings. It prints the entire path, lists the directories with a trailing slash (the -d option), and doesn't see hidden dirs (those that begin with a dot). It is easy to use
sed to get rid of the trailing slash: ls -d1 */ | sed 's/\(.*\)./\1/g'and a little more fussing with
sed can get rid of the path, but I can't find any way to list the hidden dirs along with the normal ones.Another common solution is to use the
find command: find . -maxdepth 1 -type dThis works but puts all the output on one line, precedes each file with its path, the first line is always the name of the directory being listed, and the file list is all jumbled up. I can use the -printf option of file to fix the path problem and to put each name on its own line, getting rid of the first line is just a matter of piping through the tail command, and pipe through the sort command to organise the result.
find . -maxdepth 1 -type d -printf '%f\n' | tail -n+2 | sortThat took a lot more hassling than I expected. Weird. You'd think that the ls command would have something that basic. The Amiga does:
dir . dirsSimple, easy to use and understand.
GNU
dir command has a -d option supposedly to display only directories, but it doesn't seem to work properly.Additional:
I don't seem to be able to leave it alone. Here is a weird solution that I never would have thought of: use the bash shell's wildcard expansion to do it.
echo */This has a couple of shortcomings, but as always,
sed can help: cd "$address" ; echo */ | sed 's/\/ */\n/g'We
cd to the directory that we want to list from. The echo gets expanded to everything there that ends in a slash (all the directories), then sed looks for a slash followed by none or multiple spaces (can't just be a space because the very last slash doesn't have a space) and replaces them with a newline.I'm astounded that linux doesn't have an easy solution to this. Even crappy old MSDOS can do it.
DIR /A:D /B /O:NNot very readable, but at least it does it.
Additional:
I have a commandline program called
tree though I can't remember where I got it. I don't think it is standard on linux distros, but it has a lot of nice options, including the ability to print out a list of directories. It has one tiny failing, in that it begins the list with the name of the containing directory, but as before we can simply snip that off with tail: tree -ad -L 1 -i "$address" | tail -n+2Nice.
Found where I got it. http://mama.indstate.edu/users/ice/tree/
It was written by Steve Baker (ice@mama.indstate.edu) with HTML output capability Francesc Rocher (rocher@econ.udg.es) and character sets by Kyosuke Tokoro (NBG01720@nifty.ne.jp)
no subject
Date: 2012-05-24 02:34 pm (UTC)Glad to meet you. I used to spend some time on LiveJournal communities. They have some thriving atheist communities. Since I've migrated here I don't spend much time socialising, so I'm not sure what is available.
Lately I've been listening to a lot of YouTube videos from people like ProfMTH, thunderf00t, AronRa, RichardDawkinsDotNet, BionicDance, ZinniaJones, Anubis2814, Sam Harris, TheraminTrees, TheThinkingAtheist, and much, much more. I don't have a fast net connection so I can't stream them. Instead, I use a python script called youtube-dl to grab them. I set up long lists of what I think I might like and let the computer suck them through its thin straw overnight. The next day I have a bunch of videos to watch during breakfast. :)
They have a lot of great science and math videos on YouTube too... scishow, crashcourse, the adorable ViHart, minutephysics, thunderf00t, KhanAcademy, MIT-OpenCourseWare... and heaps more.
A few of the stories that I've written on my website, http://miriam-english.org are anti-religion, such as Grace which I'm very proud of, being an atheist short story about a real god. I've written a couple of anti-religious plays, A Loving Soul and The Killer. I'm very happy with honesty, the 9th chapter of my previous story, Prescription, in which a priest and a nun discuss why churches should not be tax-exempt (that chapter only, not the whole book). I'm currently working on the final chapter of my latest story, flying, which starts out looking like it is pro-religion, but it isn't. :)
Also on my site are a few of my rants about religion, like Why there is no god. I'm rather happy with Flying Elephantism too, commenting on creationism.
I welcome any comments you might have on any of these.
Best wishes to you. :)
no subject
Date: 2012-05-24 07:23 pm (UTC)Although I'm an atheist, I don't have much to say about atheism; I hold that a word that supposedly denotes something for which there is no evidence has no meaning. Thus, anywhere one puts the word "God", one could put the word "unicorn" and one has said the same thing—the same nothing. Have you read George Smith? I think the relevant book is "Atheism, the Case Against God".
Right now, I'm not set up to do video. It's a low priority for me, since I'm very, very nearsighted and don't particularly enjoy moving pictures of any kind.
I'll look at the other items in a bit.....
no subject
Date: 2012-05-24 09:39 pm (UTC)The other thing that turns up a lot is virtual reality, which I think will end up being another big turning point for humanity.
There are many other topics too, for example my very short SF story Lessons in Reversal about why reflections in mirrors are not laterally reversed.
I've thought hard about the problems of the word "atheism". I agree that in itself it doesn't make a lot of sense to name something by what it isn't, but related to other things in the real world it does -- darkness is the absence of light, cold is the absence of heat, dry is the absence of water, and there are many more: unpleasant, inept, uncontaminated, uncivilised, and so on. If you have large numbers of religious people who endanger society and the planet and you want to make a statement that you don't agree with their lunacy, then your only logical option is to use the word "atheist" to describe that. I agree that we shouldn't have to. People who don't believe in unicorns are not a-unicornists -- they are normal and people who do believe in unicorns are delusional. Unfortunately saying that you're normal doesn't convey much in respect to religion. It should, but it doesn't. Religious people are delusional, but there are vast numbers of them and for much of history it has been "normal" to be deluded.
The best argument I've heard against describing myself as atheist is to escape some of the damage from the revolting christian propaganda against atheists. In their literature and tales they make us out to be sour, unhappy, ill-tempered, uncharitable assholes. But, as in the case of lesbians taking back the word "dyke", blacks taking back the word "nigger", and obsessive, bookish, techie types taking back the word "nerd", I think we should make "atheist" a label for those who think clearly, value life, and don't succumb to the mind-viruses of superstition.
I haven't read George Smith's "Atheism, the Case Against God". It looks interesting, and I'm surprised that I already have it here (I have thousands of books). I've added it to my must-read stack. Thanks for the pointer.
no subject
Date: 2012-05-25 04:53 am (UTC)I was looking through your site (I read nonfiction of interest and a few short fiction pieces) and noted a few minor items. I use a browser called dillo that nitpicks sites. It complained about the DOCTYPE on your home page and noted a missing # on line 14 in a color specification. Also, the value monoculture link on your waffles page is broken. Might be other stuff but I wasn't actually looking for HTML nits. :)
I looked at some of your comments on gravity and the big bang. I think you have some fundamental misunderstandings about the science. (I studied those things, oh, about 40 years ago, so I'm rusty. But I could try explaining....) Turing did not prove that a computer can simulate anything. What he actually proved is very technical but it is essentially the proposition that any general purpose computer can simulate any other general purpose computer. However, there are many things that a Turing machine cannot simulate, including (in general) analog objects. A brain being analog, there is no reason to suppose that it can be simulated on a computer. All that a computer might be able to do is simulate a digital approximation to a brain. But chaos effects might make such a simulation have no relationship to how an actual brain functions. I doubt there's any way to tell if a computer can simulate a brain other than by trying it out.
Enough nitpicking....
Androids and humanity: Have you read Jack Williamson? If memory serves, he wrote a short, "With Folded Hands", which he expanded to a longer story, "The Humanoids". There were sequels. They dealt with robots dedicated to mankind's well-being. They're old science fiction. :)
Way back when, I wrote an essay that argued that strong AI isn't possible in the sense most people wish. As I see it, true AI is only possible to a living (not necessarily organic) entity and thus a true AI would be an intelligent, valuing being—human in every sense that matters, even if it's software on my PC.
Speaking of VR and old (well, not so old) SF, have you read Vernor Vinge's "True Names"? It's arguably the first VR story.
Well, I don't actually have any problem with the word "atheist". It's merely a way to categorize people: some people think there is a god (whatever they might mean by that) and some don't. Since "theist" and "atheist" refer to actual existents, people with particular beliefs, they're legitimate words. As you note, there are many connotations to those words and calling oneself an atheist might be a bad idea in some situations but there's nothing irrational about the word itself.
"God" is an entirely different kettle of fish. The problem is illustratable by contrasting, "There is an elephant in the room" with, "There is a unicorn in the room". In the former, we have a proper concept, "elephant", and can (in theory) enumerate all the objects in the room and say that each one is or is not an elephant. We can thereby prove or disprove the proposition that there is an elephant in the room.
However, "unicorn" is a made up concept. It doesn't refer to anything. We can never really say, even in theory, if there's a unicorn in the room. Give this amorphous notion one definition and the answer might be yes; give it another and the answer might be no. The question can't be answered because there is no actual answer to it. The underlying cause is that reasoning is ultimately about real things. If made up words are put into a sentence and then reasoning rules are applied to the sentence, the result may have the form of reasoning but it is not real reasoning. So it is with any discussion about "god".
It is only when "god" is given substantive content, a meaning that refers back to real existents, that it becomes possible to meaningfully reason about "god". So, for example, you can point to reality, which certainly exists, and define "god" as, "that which created reality". Doing that allows a minimal kind of reasoning about "god" but, as you noted in one of your essays, that reasoning leads to the conclusion that the existence of reality is not evidence for the existence of "god". So it goes for all the various attempts at defining "god"; in each case, the end product of the reasoning says that there is no evidence for the existence of that particular sort of "god".
What George Smith argues is the essential reason for that conclusion, and why that conclusion must be reached for any type of proposed evidence for "god": Concepts that refer to the supernatural invariably involve self-contradiction. (That's my language, not his.) I'll leave that discussion to his essay.....
In describing the religious as delusional, I imagine that you meant that metaphorically. But I think that it's a reality. Once one drops the idiotic notion that a widespread delusion isn't a delusion (see, e.g., Wikipedia's article on "Delusional disorder"), religious belief looks pretty much like any other delusional system.
BTW, I pulled that youtube script off the net and we'll see if it works on my machine. I have plenty of bandwith but my computer is ancient; it barely runs firefox and will not run firefox with any plugins (it goes to swap Hell). But I can pull down a video and then use a stand-alone video player. We'll see how it goes.....
no subject
Date: 2012-05-25 08:25 am (UTC)I'm very grateful that you noticed "Value Monoculture" was not there. I don't know how I didn't upload that. Thank you. Uploaded now.
It is quite possible I have some misunderstandings about gravity and the big bang, but from what I've read I get the feeling that physicists may be simply deferring to people who they think are more knowledgeable than they are without actually understanding the topics themselves. My reaction is basically to say, "Hang on, I don't understand this. It seems wrong to me." I may actually be wrong, and I'm more than happy to find out that I am -- I have no emotional investment in being right and would rather find out if I'm in error so that I can fix it.
Oooops! You are quite right about Turing's idea of a Turing Machine. Good catch. Thanks. I've added a note to the "Consciousness and Immortality" waffle pointing out my error, and that you are the one who picked it up. I also added a link back to your Dreamwidth blog. If you'd like it to point elsewhere please let me know.
Ah, yes. Jack Williamson. I am a great fan of old SF. I've been an addict of it since I was a Primary School child. I can't remember if I've read "The Humanoids". I've just checked, and I have it. Another book added to my to-read list. :)
I have read Vernor Vinge's "True Names". It was was a little more creepy than I like my stories to be. Have you read Greg Egan's "Permutation City"? It is amazing. Chock-full of wonderful ideas. (Where does that saying "chock-full" come from?)
In describing the religious as delusional, I imagine that you meant that metaphorically.
No, I see religions as truly delusional. No metaphor intended. :) If someone thinks that they are being preyed upon by intangible parasites from space, then they are deluded (and scientologist). If people say "There is some, admittedly unlikely possibility, that we and our world have been created by some intelligent being or beings, but there is no way to tell" then that is not deluded. If however, they say "The world was created by some intelligent being or beings" then that is delusional.
If you want to play almost any kind of video with little burden upon your machine then check out mplayer at:
http://www.mplayerhq.hu
VLC is another very good video player:
http://www.videolan.org/vlc/
no subject
Date: 2012-05-25 02:48 pm (UTC)I disagree with the notion that values are intrinsic. Values are always relative; to say that something has a value one must implicitly or explicitly have a particular thing that values it This doesn't invalidate your value monoculture essay. If anything, it strengthens it. If a value is always relative to that which has the value, it is impossible to make your values and mine commensurable. Yet, on the money-is-the-only-value theory, money is a common denominator for all values. Thus the money monoculture can't work, because it is based on a logical contradiction.
A Turing machine is a very simple kind of computer. Turing invented it because it is mathematically tractable. What he proved is that a Turing machine can simulate any digital computer. And, since it is trivial to make a real computer simulate a (finite) Turing machine, one can simulate on one computer a Turing machine that simulates another computer. Thus, any computer can simulate any other computer. The obverse of a Turing machine's mathematical tractability is that it is horribly inefficient; you would not want to try to simulate an adding machine on one (except for fun), much less a brain. However, if a brain can be simulated at all, you could simulate it on a Turing machine.
I note that, even if the brain is digital, it can still be chaotic (and almost certainly would be). If so, it might turn out that it's possible to create an artificial mind but not to upload to one, because of unavoidable measurement errors.
Here's an answer to your "expanding balloon" objection. Think of objects as raisins embedded in the balloon. Only the rubber expands; the raisins don't. I should point out that all of these analogies are essentially worthless if one wants to really understand what's going on in cosmology; they capture the flavor of the science but almost nothing of its substance.
If you have a taste for math, it would profit you to look into Riemannian geometry, since that's the math that General Relativity is based on. If math isn't your thing, I can attempt to provide analogies that answer your other objections.
I make a distinction beyond the hypothesis/theory dichotomy you mentioned. A theory is, in essence, a relationship between facts. A model is a method of prediction. Ideally, a theory is also predictive but it doesn't have to be. Conversely, a model is ideally based on a relationship between facts but it doesn't have to be. One of my objections to modern science is that it conflates the two, and insists that a science that isn't predictive isn't science. I can sympathize with the reasons for that insistance but I can't agree with it.
Quantum Mechanics proper is a model because it is agnostic about the underlying reality. Only if one adds to QM some interpretation, such as Copenhagen or Many Worlds, does one have a theory. Why is this important? A theory, if true, tells us something about reality. Models don't. However useful a model is (and QM is very useful), it can't tell us anything about how reality actually works. So all of those claims that reality is "really" random because QM uses randomness in its predictions are simply wrong. Such a claim would only be arguable if QM were a theory, but it isn't.
What did you find creepy about "True Names"? I did read "Permutation City" but I didn't like it. There were two reasons. First, I didn't find the ideas particularly new. Second, my main interest in stories is to read about characters I enjoy spending time with and I didn't get that from the book.
When talking about "god", it's very important to distinguish two very different concepts. Most religions are based on the supernatural, a realm that differs from the natural by having no fixed nature. Scientology and the "aliens as creators" hypothesis are altogether different, in that they don't suppose anything supernatural. The arguments against the two are different, not just in details, but in kind. In the former, the arguments stem from the logical incoherency of the notion of the supernatural; in the latter, the arguments are fact-based, and amount to some variation on "there is no evidence whatsoever for that hypothesis, so it need not be considered".
I'll look at those video players; if they run on Linux they can almost certainly be run on FreeBSD.
no subject
Date: 2012-05-26 04:38 am (UTC)I'll have to think more about your conclusion that money-as-value contains a logical contradiction. Cool.
I, rather perversely, like the awful inefficiency of some Turing machines. http://srimech.blogspot.com/2011/03/turing-machine-and-maker-faire.html is wonderful, even having a steam-powered version! Other, related, gadgets that tickle me are the lovely stuff that some people have built inside LittleBigPlanet, for example, http://www.youtube.com/watch?v=ursnIpTOPDQ which demonstrates a base-4 counter using that world's physics. Ludicrous fun!
Yes, I've heard the expanding balloon illustration, but that doesn't really explain anything. If space itself is universally expanding then we don't see any change, but if, as most people argue, gravity and electromagnetism, and the strong and weak forces all overwhelm the expansion when things are close to each other then it ends up explaining nothing. One might as well say that on the grander scale all things are moving away from each other, or that gravity works differently at great distances, or something else.
I do worry that I am quite possibly missing out on important parts of the universe by being mathematically inept. I love what I can see of maths, but struggle badly with it -- perhaps resulting by being terrorised by a math teacher when I was little and my dyscalculia.
I like what you said about quantum mechanics. I consider quantum mechanics to be like Boyle's Law, where Boyle was able to find reliable information about the pressure and volume of a gas without understanding anything of the essentially random nature of the molecules beneath. I think we are at a similar stage with quantum mechanics. We can make probabilistic measurements of, for instance, the electron "cloud" around an atom. At the moment it looks impossible to see any deeper than that, but I think that is likely to be just a limitation of our current toolset. In 20 or 30 years I fully expect some bright young thing to come up with a way of going "deeper". I hope I'm right... and I hope, though I doubt, that I'll still be here to see. Curse our brief lifespans! If I could live for a thousand years it still wouldn't be enough; a bare 80 or 90 is painfully, miserably short!
I hope I'm not getting True Names mixed up with another story, but wasn't it the one where a guy gets infatuated with a young girl and lures her to a motel by pretending to be a boy of the same age then attempts to seduce her? It may be that it was only a small part of the story, but it left me with a strong feeling of revulsion at the time which probably discolored my view of the story. A pity. I have great respect for Vernor Vinge.
Scientology tries to differentiate itself from other religions, but in the end it revolves around insubstantial, supernatural spirits, making them the same as all other superstition. Using alien spirits is an example of the common religious trick of distracting people's attention with irrelevant info.
no subject
Date: 2012-05-26 02:06 pm (UTC)Though there are serious problems with the standard cosmologies, the problems you have with them are not among those serious problems. But to explain why your objections are invalid, I will have to use some math. Analogies won't do; they can only convey flavor without substance.
Science is full of good models, QM and Boyle's law among them. Science has since successfully explained why Boyle's law works but has yet to explain QM. It sure would be nice to see that explanation....
It's rather frustrating to know that I'm right at the cusp—were I even a decade younger it's a virtual certainty that I would be able to surf the wave of ever improving life extension techniques and thereby not have to expire of old age. Ah well, reality is.
I think you've got "True Names" mixed up with another story. It's worth a read, not just for the story, but for its historical value.
I don't know enough about scientology to know whether its "aliens" are merely supernatural spirits in disguise. And, frankly, I'd rather spend my time cleaning a cesspool than look into the matter. I merely give them the benefit of the doubt (as silly as that may be) by assuming that they're not supernatural.
It turns out that the video programs you mentioned are all ported to FreeBSD. I was able to download them from a standard location. However, I'm an untrusting soul and so I've got to figure out a way to run those programs without giving them a chance to infect my system.
no subject
Date: 2012-05-27 02:01 am (UTC)Yes. I too feel the frustration of likely being at the cusp of potential immortality. All we can hope is that humanity progresses, preferably faster than at present and that the demons of superstition are dispelled soon. On both points I'm hopeful, but somewhat pessimistic.
Okie dokie. I found True Names among my books and took a brief look at it. I no longer think I've read it so have added it to my enormous to-read stack. It occurs to me that I may have been mixing it up with a vaguely recalled novel about VR by Ben Bova.
...rather spend my time cleaning a cesspool than look into [scientology]...
heheheh :D Yes. Some time back I started reading, with mounting annoyance and impatience, the story of Xenu that the scientologist suckers swallow. I couldn't read the whole thing. It was such a dopey fantasy.
no subject
Date: 2012-05-27 03:13 am (UTC)As for whether happiness is a final value or a means to survival, that depends on how one chooses. Some will decide to make happiness their final goal; others will decide to seek it as a means to an end. I'm in a third camp: One should not pursue happiness as such. Rather, one should pursue certain other values and one's happiness will be one signal of one's success at that pursuit.
The main hope for those of us on the cusp is that the growth of knowledge is at least exponential. Then again, what with government meddling in the biological sciences, there's a damned good chance that important research will be stifled by religiously inspired "ethics". i have little hope that people will abandon that idiocy.
Ah, Ben Bova. He's OK but he writes too mainstream-like for me.