Forgot your password?
typodupeerror

Comment Re:Well of course (Score 1) 584

RIGHT up until you need to visit another city for any reason.

Catch a plane, and get a taxi when you get there. Any reason why you can't take a plane?

Now try living in a real city and not being a rich motherfucker who can afford to live that close to their job (the most affordable housing, alas, is OUTSIDE the work zone by a good 15 miles for most large metropolitan areas)

That's the real problem. Why is work so far from home? Why do so many businesses and government offices cluster into one small city area? If they would spread their offices out to near where people live, people could travel a short distance to work. Most people want somewhere to live, something to drink, something to eat, a job, some entertainment. Why have we set up a society where people regularly travel 50 miles a day to go to work? People going to and fro for no good reason.

Comment Re:Powers of Two (Score 5, Informative) 280

Computer math doesn't work like regular math, like for example SATA2 which is 3Gbps. Now if I showed you a cargo ship with a capacity of 3000 tons, you'd think you could actually load 3000 tons right?

No, you wouldn't necessarily expect to be able to load 3000 tons. Firstly, what type of tonnage are you talking about? In shipping, there are several different types of tonnage, or in other words, different values for the same thing, with at best slightly different names. For example, Gross Register Tonnage, Net Tonnage, Gross Tonnage, Thames tonnage, Panama Canal tonnage, Net Register Tonnage, and who knows what else.

Secondly, suppose a ship has a "capacity of 3000 tons". Could you fit more pillows or gold bars into the ship? Which one will fill the hold first? Can you fit 3000 tons of pillows into a ship with a capacity of 3000 tons? Can you fit 3000 tons of helium in? 3000 tons of depleted uranium? What if the ship is to be sailed from a salt water port into a freshwater lake? Does that affect anything?

Why would you pick tonnage of shipping as an example of regular math? Shipping measurements are all over the place. For example, how long is a ship? Well it depends on the shape of the ship, and where you measure it. Length at the waterline or length overall? With the ship loaded or empty? Heeling or sitting level? Salt water or fresh?

Just about everything to do with computers is simpler and more regular than just about anything related to boating.

Comment Re:Amazing! They've invented... (Score 1) 438

Use your imagination, it's a way to turn electricity into drinking water. It would be useful on a lifeboat for example, you could run it off solar power. People can survive for a month with no food but only a couple of days without water.

If you've got an electricity supply on your lifeboat, why not use it for a radio to call for help? Or an electric motor to drive the boat to a port?

Comment Re:This perpetual motion machine just keeps gettin (Score 1) 315

Looking at very large scale projects, you can conclude that there's always wind somewhere, so placing many windturbines around the country will substitute a conventional powerplant.

Will it? What about the losses in electricity distribution? If it's windy in New York but not windy in Los Angeles, can you send the necessary gigawatts of power all the way across the country?

For the "it's windy somewhere" idea to work, you need superconductors going across the country so that you don't lose large amounts of power. And currently, it takes too much energy to make a superconductor, so it still won't work. If somebody could invent a room-temperature superconductor, or some other form of long-distance lossless electricity transmission, then building wind turbines all over the place will work.

Comment Re:Isn't the explanation completely wrong? (Score 1) 97

Why would a rotating heat conductor be better than a stationary one? Why not just stick a big heat sink with fins all over it in there. The metal could transfer the heat from the inside air to the outside air. There must be some reason why rotating would make it better. The article says they mix the air, which you wouldn't have to do with a solid metal heatsink heat exchanger.

Comment Re:Lots of them (Score 1) 412

I think there's probably a better way, but describe-bindings (also accessible from the help menu, describe, list key bindings) will list all current bindings, then you can search for the command.

Since describe-bindings is bound to C-h b, you can see the bindings by typing in C-h b. You can also find out what some key sequence is bound to by using describe-key (C-h k) and then enter the key sequence you want to check. It will tell you which function that key sequence is bound to. For example, try this: C-h k C-h b

There are various other useful things you can find out about with C-h ?, or help-for-help.

Comment Re:Replacement (Score 1) 702

You can use colon-number to go to a line in a file. Open a file and type ':777' to go to line 777, or the last line if there are less than 777 lines.

To quickly duplicate a line, put the cursor on that line, and type 'yyp', which means yank line, and then 'put' the yanked thing into the buffer.

You can use slash to search for things in a file. For example, you might search for a puppy: /puppy.

Suppose you had a config file for a webserver, and you wanted to change the webserver root. Here is the starting file:

# blah blah blah
server.document-root = "/var/www/"
# blah blah blah

You search for the line with the webserver root (using slash /root), and duplicate the line (yyp). Then comment out the first line by going up a line and inserting a hash at the start (k i # escape). Go to the bit you want to change (/var n). Here you type /var, which searches for var. It gets the var on the commented out line. Then you type 'n', which gives you the next match forward, or the next match in reverse if you use ? to search backwards. So now you should have your cursor at the start of var. You want to change three words, 'var', '/', and 'www', so you do (3cw home/web escape). Happy with the results, use ":x" to write and exit. That saves one keystroke over the prolix ":wq". The file now looks like this:

# blah blah blah
#server.document-root = "/var/www/"
server.document-root = "/home/web/"
# blah blah blah

Job done quickly and easily, thanks to vi!

Comment Re:Replacement (Score 5, Informative) 702

One of vi's best features is the '.' command to repeat what you last did. You can do 'dd' to delete a line, then press '.' (dot) to do it again. Or '100.' to do it 100 times. Typing in numbers before a command repeats the command. Typing in '100ihello[esc]' will insert 'hello' 100 times. Then typing dot will give you 100 more.

On a modern vi you can press up-arrow after pressing colon to get your previous colon command back for editing.

Some examples of changing things on various lines:

# add 'gronk' to the end of every line
# 1 is line 1, $ is the last line
:1,$ s/$/gronk/
# put 'bing' at the start of lines 5-10
:5,10 s/^/bing/
# change foo to bar for all occurrences in the rest of
# the file from where the cursor is
:s/foo/bar/g

Comment Re:Last argument (Score 2, Informative) 2362

Suppose you did this: ls -la filename, then you can do this: man !:0 which converts the !:0 into the zeroth word on the previous command, namely ls. So man !:0 would be man ls. Similarly, !:1 changes to -la, and !:2 is filename. You may also like !:1* or !:2*. !:1* would be the first word and all after it, !:2* is the second word and all after it. So !:1* changes to -la filename in this case. There is also !:0-2 for a range of words. Here is an example:

sl -la file1 file2 file3 file4
# oops i put sl instead of ls
ls !:1*
# same as ls -la file1 file2 file3 file4
less !:3 # same as less file2
ls -la file1 file2 file3 file4
echo !:1-2 # echo -la file1

More information can be found in the HISTORY EXPANSION section of the bash manpage. Specifically, the Word Designators subsection. Enjoy!

Comment Re:Find / Grep (Score 1) 2362

Here's a locate, backticks, and bangbang trick. Suppose you have a file somewhere that you know the name of, but not the location of. You can use locate to find it: locate filename. But then suppose you want to look at the file. Here's an example:

locate myspecialfile.txt
/home/iggy/some/dir/myspecialfile.txt

#then, in the next command:
less `!!`
# use backtick bangbang backtick, which expands to less `locate myspecialfile.txt`,
# which expands to less /home/iggy/some/dir/myspecialfile.txt

Slashdot Top Deals

Experiments must be reproducible; they should all fail in the same way.

Working...