It's funny that you should say this, and then go on to talk about InfoZip, a program full of precisely the problems that good software engineering practices are supposed to prevent.
Okay, fair point. But Infozip is an extreme case.
It sounds like porting doesn't enforce these practices -- rather, it raises the cost of not following them!
Well, you could just as well say the police don't enforce the law, they just raise the cost of not obeying it:-)
Porting to minor platforms exposes bugs, real bugs, that might not have been found otherwise. It enforces good software engineering practices.
Of course, you can overdo it. Take a look at InfoZip for example. No, seriously, take a look at it. It works on every platform you can think of, but the price is that the code is almost unreadable. The biggest problem is all the cruft needed to maintain 16-bit compatibility. It desperately needs updating to handle non-ASCII filenames intelligently, but the last thing that code needs is another layer of #ifdef's.
There comes a time when you just have to say "fuck the Amiga".
Where are the FPS bad guys who can adapt their strategy on the fly? Enemies who themselves have six different guns and switch up according to what the situation calls for? Bad guys who work in teams, who strategize, who create diversions to distract you? Where's the enemy Solid Snake who sneaks up on you with the silence of a ninja's church fart?
The answer to these questions, as with so many others, is "in my pants".
I was thinking huge pipe = huge pump, but of course, you're right. An army of small robotic pumps would be much easier to develop. Weights to go down, parachutes to go up, tiny propellers to steer into their position in the massively-redundant power grid at the bottom.
Actually, I'm wondering if it wouldn't be better to hook each one on a steel wire, so they could be literally yanked up from the surface when they broke down. I don't know if lots of wires in the pipe would cause turbulance though.
You put the pump at the bottom, that way the pressure is slightly higher in the pipe than outside, and the walls are under tension , not compression. Its much easier to build that than a pipe that won't collapse under suction.
Holy crap, I think you're right. Though this raises yet another question: how in hell do we build a pump that can fill a 100m diameter pipe and survive the pressure at the bottom of the ocean? And be reliable enough to be profitable?
It seems to me to make much more sense to put the actual plant out in the deep ocean, like an oil platform, and then just pump fresh water and electricity through pipes to the mainland. You lose the benefit of the free air-conditioning, but you're much less likely to run afoul of nimbyism if your cubic-kilometer turbines are out of sight.
The more I think about this, the more practical it seems. A trillion dollar 2% efficient engine that breaks down once a month will never break even. A trillian dollar 0.1% efficient engine that breaks down once every ten years is an express highway to a post-scarcity world.
Even 100-meter diameter pipes raising cold water from the deep,
You don't think small, do you? Is it even possible to build a 100-metre diameter pipe? Bear in mind that it has to be rigid and withstand the pressure of the siphon process.
It sure would be awesome if someone did build one though. Anyone know if Dubai has a continental shelf?:-)
I always thought American houses were crappily built, now I know why! Seems like Britain is the opposite... new houses here always seem to have an outer layer of brick *just for decoration*. It's the breeze blocks inside that actually hold the roof up. Maybe it's just because Britain is colder?
why the hell my informative parent post gets modded to only a "2" just because people do not like the truth is astounding.
Have you ever considered the possibility that you might be wrong? Your position seems to be "yes, drives have been ignoring sync commands for years, but it's not a bug, it's a FEATURE, and anyway it's all the driver writer's fault, and oh sorry you didn't know you were supposed to use undocumented calls if you want your database's ACID features to actually work? but you're an idiot anyway, you couldn't be trusted with these technical matters, next thing you'll be trying to ensure your email server actually maintains the guarantees mandated in the SMTP protocol, GOOD LUCK! HAH!"
I recently wrote a cool search caching thing for a web application, to avoid re-allocating memory for the search results every time. When I was done, I looked to see how much memory I was saving: a cool 10k per request. Wow.
Given the potential for bugs in the code, I should probably trash the whole thing and replace it with an simpler implementation, but having spent 2 hours writing it I haven't the heart.
The moral of this story is what we all already know: avoid premature optimisation. The bottlenecks in your application aren't going to be where you're expecting anyway, so just choose the simplest implementation that could possibly work. If it turns out to be too slow or inflexible later, then fix it later.
Parent either doesn't know what he's talking about, or is a troll. Pity there isn't an "incoherent rant" moderation option, or we could avoid the ambiguity.
but why doesn't the UK share the same locale as the US?
Specifically, the broken mm/dd/yyyy date format you use in the US torpedoes any idea of using the same locale. Once you get into the nitty-gritty of things like currency, there are a lot of minor differences. And the American spelling of words like "colour" really bugs some people.
Personally, I like to think of Sunday as being the zeroeth day of the week. I'm guessing if you polled non-programming Britishers, you'd probably find the general consensus is that Monday is the first day of the week.
Because obviously Microsoft has put all their work into the way Longhorn looks, rather than under-the-hood things.
Your theory holds water right up until you actually look at the screenshots. It looks like shit!
Even if one of Microsoft's new patents is on "having icons in several completely different styles on the same desktop" I think I've had prior art on my Linux desktop for about 10 years.
Please note that the fish version will work with any files, but the bash version you posted will break on files with spaces because of the braindead tokenizing support in Bourne shells.
I was aware of that when I posted it, but I left the bug in there for the sake of realism (I make that mistake on a regular basis; probably most people do). I don't think Bash is braindead, I think it's just a case of bad defaults--most of the time when people write $tif in bourne shell, they mean "$tif".
I've noticed a couple of points in what you wrote: I assume from your example that the (basename $tif.tif) part is expanded after tokenisation, and hence will always work even if the filename has a space in. But in that case, how do you do something like:
mv `egrep '\.jpg$' filelist.txt` jpegfiles/
? This relies on tokenisation happening on the subshell output.
Also, since () now means what `` used to mean, how do we do what we used to do with ()? ie. stuff like
(echo From: me; echo To: you; echo Subject: the file; echo ""; cat thefile.txt) | sendmail -t
I don't like the fact that if blocks end with 'fi', case blocks with 'esac', but loop block end with 'done'. Even more disturbing is the subblocks of a case statment. they end with ';;'.
Can't disagree with you there. I get these moments of anxiety when I'm writing sh-code... "what the hell does this block end in?"
Here's the kind of thing I end up doing a lot of on the command-line:
for tif in *.tif; do
tiftoppm $tif | cjpeg >`basename $tif.tif`.jpg
done
If I where to use a syntax using '=', it would be '$foo = bar', since a variable should not be allowed as the first token of a command anyway. If you _want_ to execute the contents of a variable, use eval.
It's common in scripts to run a command named in a variable, particularly on Solaris, where there seems as a rule to be at least two versions of any given command, one of which is hideously broken, and getting the right one is critical.
But then, I get your point that for interactive use that doesn't really matter. Which is just as well, because eval tends to turn quoting into a minefield.
Cool. I think I tried it briefly when I was looking for a replacement for tcsh that would play nice with Japanese characters.
IIRC, zsh was not significantly less frustrating for a long-time tcsh user than bash was, and bash's i18n support was better.
At the moment I mostly use bash and put up with the frustration when Ctrl-R and Esc-? and Esc-p don't do what I expect. Now that you mention it, it sucks. grrrr.
You went to all the trouble to write a shell because you couldn't be bothered to figure out the difference between "$foo" and '$foo'?
It's a pity, because I've been wanting a shell that can tab-complete wildcards, but as someone who makes use of the difference between "", '' and ``, using your shell would be an exercise in frustration.
Could someone had an option to Slashcode to filter out any story containing the word "prefrosh"? I don't have to know what it means to know I don't like it.
According to an independent study, it takes an average of four months to watch the latest episodes of top-rated shows like Lost and Desperate Housewives.
Are they watching this stuff on buffering... 10%...20%... 30%... 15%... RealPlayer or something?
You really were mad to try this with MySQL. But I can kinda understand where you're coming from. After all, nowhere on the MySQL site does it say "MySQL sucks at big joins".
Don't get me wrong, what MySQL does well it does very, very, well, and I think some of its critics are living in a dream world. I've used a bunch of databases, and they all suck in unique and interesting ways. But I have serious doubts whether MySQL will *ever* be suitable for this sort of workload.
Actually, with something this hairy, I'd be inclined to say "if it ain't broke, don't fix it", with a possible postscript of "if it is broke, buy Oracle".
Am I the only one who read that as "Google Launches Summer of Choad"?
Guess I've been reading Urban Dictionary too much.
Of course, you can overdo it. Take a look at InfoZip for example. No, seriously, take a look at it. It works on every platform you can think of, but the price is that the code is almost unreadable. The biggest problem is all the cruft needed to maintain 16-bit compatibility. It desperately needs updating to handle non-ASCII filenames intelligently, but the last thing that code needs is another layer of #ifdef's.
There comes a time when you just have to say "fuck the Amiga".
I was thinking huge pipe = huge pump, but of course, you're right. An army of small robotic pumps would be much easier to develop. Weights to go down, parachutes to go up, tiny propellers to steer into their position in the massively-redundant power grid at the bottom.
Actually, I'm wondering if it wouldn't be better to hook each one on a steel wire, so they could be literally yanked up from the surface when they broke down. I don't know if lots of wires in the pipe would cause turbulance though.
It seems to me to make much more sense to put the actual plant out in the deep ocean, like an oil platform, and then just pump fresh water and electricity through pipes to the mainland. You lose the benefit of the free air-conditioning, but you're much less likely to run afoul of nimbyism if your cubic-kilometer turbines are out of sight.
The more I think about this, the more practical it seems. A trillion dollar 2% efficient engine that breaks down once a month will never break even. A trillian dollar 0.1% efficient engine that breaks down once every ten years is an express highway to a post-scarcity world.
It sure would be awesome if someone did build one though. Anyone know if Dubai has a continental shelf? :-)
I always thought American houses were crappily built, now I know why! Seems like Britain is the opposite... new houses here always seem to have an outer layer of brick *just for decoration*. It's the breeze blocks inside that actually hold the roof up. Maybe it's just because Britain is colder?
I'm guessing that's why you're only a "2".
I recently wrote a cool search caching thing for a web application, to avoid re-allocating memory for the search results every time. When I was done, I looked to see how much memory I was saving: a cool 10k per request. Wow.
Given the potential for bugs in the code, I should probably trash the whole thing and replace it with an simpler implementation, but having spent 2 hours writing it I haven't the heart.
The moral of this story is what we all already know: avoid premature optimisation. The bottlenecks in your application aren't going to be where you're expecting anyway, so just choose the simplest implementation that could possibly work. If it turns out to be too slow or inflexible later, then fix it later.
Parent either doesn't know what he's talking about, or is a troll. Pity there isn't an "incoherent rant" moderation option, or we could avoid the ambiguity.
Personally, I like to think of Sunday as being the zeroeth day of the week. I'm guessing if you polled non-programming Britishers, you'd probably find the general consensus is that Monday is the first day of the week.
Even if one of Microsoft's new patents is on "having icons in several completely different styles on the same desktop" I think I've had prior art on my Linux desktop for about 10 years.
I've noticed a couple of points in what you wrote: I assume from your example that the (basename $tif .tif) part is expanded after tokenisation, and hence will always work even if the filename has a space in. But in that case, how do you do something like:
mv `egrep '\.jpg$' filelist.txt` jpegfiles/
? This relies on tokenisation happening on the subshell output.
Also, since () now means what `` used to mean, how do we do what we used to do with ()? ie. stuff like
(echo From: me; echo To: you; echo Subject: the file; echo ""; cat thefile.txt) | sendmail -t
That's not a great example, but you get the idea.
Here's the kind of thing I end up doing a lot of on the command-line:
for tif in *.tif; do .tif`.jpg
tiftoppm $tif | cjpeg >`basename $tif
done
How does that work out in fish?
But then, I get your point that for interactive use that doesn't really matter. Which is just as well, because eval tends to turn quoting into a minefield.
Cool. I think I tried it briefly when I was looking for a replacement for tcsh that would play nice with Japanese characters.
IIRC, zsh was not significantly less frustrating for a long-time tcsh user than bash was, and bash's i18n support was better.
At the moment I mostly use bash and put up with the frustration when Ctrl-R and Esc-? and Esc-p don't do what I expect. Now that you mention it, it sucks. grrrr.
You went to all the trouble to write a shell because you couldn't be bothered to figure out the difference between "$foo" and '$foo'?
It's a pity, because I've been wanting a shell that can tab-complete wildcards, but as someone who makes use of the difference between "", '' and ``, using your shell would be an exercise in frustration.
Could someone had an option to Slashcode to filter out any story containing the word "prefrosh"? I don't have to know what it means to know I don't like it.
"x = 1.0" => 0.95 <= x < 1.05
I have a horrible suspicion you are right. How disturbing. This becomes 1.04999... + 1.004999... = 2.054999..., which rounded off to one decimal place is 2.1. Yes. I always hated that "show your working" crap myself.Don't get me wrong, what MySQL does well it does very, very, well, and I think some of its critics are living in a dream world. I've used a bunch of databases, and they all suck in unique and interesting ways. But I have serious doubts whether MySQL will *ever* be suitable for this sort of workload.
Actually, with something this hairy, I'd be inclined to say "if it ain't broke, don't fix it", with a possible postscript of "if it is broke, buy Oracle".