Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:The real issue: U.S. government corruption. (Score 1) 555

So the bigger question is: why doesn't truecrypt have an option for multiple hidden partitions, so you can have your "encrypted" partition with your personal correspondence, then a "hidden partition" with something legal but more sensitive (e.g. soft erotic pictures), a "superhidden partition" with something questionable (movies 'in action' with your mistress), and a "megahidden partition" with the stuff you actually care about. How can they know how many partitions you have?

What would be better, however, is to have an encrypted filesystem based in "data files", e.g. excel sheets or csv files with plausible column names (case no, var0001 ... var0090) and random seeming numbers, so you can claim that they are measurements or analysis files or whatever. Since the file (or files) is contained in your regular file system, no need to explain missing hdd space and no fear that you accidentally overwrite the sensitive data as you risk (iirc) when using truecrypt with the hidden partition hidden.

Comment Re:How accurate is the sea level rise figure? (Score 4, Informative) 137

The sea level rises because the stuff covering Greenland is ice. When it melts it flows into the ocean, raising sea levels. Greenland is around 2M km2, and the ice sheet is around 2km thick, so we're talking about 4 million cubic kilometers of water. Earth has around 361 sq kilometers of water, so spreading the water around the earth gives around 10 meters of ice on each meter of water, or around 9 meters of water. In other words, (1) greenland is huge, and (2) the sea level rise is purely ice flowing into sea and has nothing to do with geological changes.

Greenland rebounding does absolutely nothing because the "extra" volume is not taken out of the ocean. The water doesn't suddenly jump back up on the land.

(arctic ice melting does not affect sea levels because the weight of the ice is already displacing water. Antarctic ice and glaciers on land are in the same situation as greenland ice)

Comment Re:Useless academic is useless. (Score 1) 462

Harvesting the energy is not necessary the problem: the problem is transmitting it to the Earth surface.

Perhaps do it as we do currently - do the stuff that needs a lot of energy near the energy source. Blast furnaces are built near coal (athough there are chemical as well as energy reasons to use the coal), aluminium smelters near hydro power and so on.
Transmit it to the Earth's surface or wherever it is needed as manufactured items. That's still not trivial since it requires a huge change in velocity to land stuff undamaged, and atmospheric friction isn't going to be enough on it's own, but we've got more of an idea of how to do that than transmitting terawatts of electromagnetic radiation around.

So you think that bringing aluminum ore into orbit and then dropping the smelted aluminum down is a good idea?

From good old wikipedia: "The most modern smelters achieve approximately 12.8 kWh/kg". This is the maximum gain.

However, you first need to send up aluminum oxide (Al2O3). Chemistry is a while ago but I think that means that the aluminum:oxide weight ratio is 2*29 : 3*16 = 1.2. So, for every kg of Al you need to send up 1.8kg of aluminum oxide.

Assuming that this happens in geosynchronous orbit, the aluminum oxide needs to gain around 60 MJ per kg, so around 100MJ for every kg of Al. 100 MJ is around 28 KWh, so more than twice the cost of smelting it on earth, and this is assuming that we don't need any energy for sending up the rocket, fuel etc, ie we can fling it into orbit using a catapult. Low earth orbit is a bit cheaper (ardound 33%) but not so much that this becomes feasible.

So, even ignoring the problem of getting the stuff down (which doesn't need to cost any energy I suppose), the suggestion doesn't make any sense unless you can harvest the orbital energy again from the falling aluminum...

(The only way in which it could make sense is if the aluminum was used in space to build spaceships, and the "waste" oxygen was used for breathing, but even then I'm not convinced that mining the stuff on earth is a wise choice in the first place...)

Comment Re:To answer GvR's question (Score 2) 169

And in theory you can write all the compute-expensive routines in C++.

Sure, but then that's not Python being fast, it's C++ being fast. "You could write the expensive parts in C or C++" can be said of nearly any language. :-)

Not quite. In java and most other languages I know, you would have to make quite some changes to the rest of the code to get it to communicate with something written in C.

In CPython, you can replace a module and the rest of the code won't notice, e.g. in

import mymodule
 
x = mymodule.compute_answer()

mymodule can be a python module or a c module and you really don't need to know or care. You can build the prototype in python and later replace it with a C module, and unittest and benchmark both. You can even do it conditionally, e.g. replace mymodule by something like

try:
  from mycmodule import compute_answer
except ImportError:
  from myfallbackmodule import compute_answer

And the same original code would use the c module if available, and otherwise the fallback module.

Even if you don't do any of this, you do get benefits, since the expensive parts of the standard library and 'computational libraries' like numpy are written in C. If you can write your problem with efficient use of these functions, especially turning loops into vector/matrix calculations that are done by numpy, you can get the speedup without writing a single line of C. I've actually sometimes encountered a slowdown after reimplementing in C because all the expensive bits were in library calls that were apparently better written than my rewrite.

Finally, there are tools like cython which allow you to add type hints to your python code that compile to C code. This will be slower than hand written C code, but require a lot less changes to the module and is less error prone, and in my experience can easily give a 10x speedup with a couple of "int" hints, especially in nested loops.

Comment Re:Broaden your functional horizons, Guido! (Score 1) 169

+1, I'm a big python fan, but I think the whitespace is a mistake, for a number of reasons:

1) a snippet of whitespace-blocked code has an absolute indentation level; while a piece of curly bracket style code has relative levels. This makes copy paste and refactoring clumsy. A 'python aware editor' does not really solve this since there is not 'end of block' mark except for the indentation

2) the python whitespace system is redundant in itself by requiring both a colon and a increase-indent token as a block starter. Why is the colon required if the increase-indent makes it obvious that a block is starting (and all the block statements, ie if for def class etc, require the colon anyway, there is 0 information in the colon)? In fact, since the end of a 'block statement' always starts a new block

3) why replace a somewhat redundant system that works relatively well and is used by the majority of languages by a new redundant system that is not really tested? I am sure they didn't really anticipate the snippet copy/paste or refactor difficulty - in the motivations they talk about easy to learn for beginners, but I don't think you should sacrifice usefulness of the language for a slightly gentler learning curve. Also, with curly brackets existing editors/ide's would be more or less useful, with basic highlighting, folding, structure-display, etc still working; while this requires completely new modes/editors to be developed

4) it doesn't really solve a problem, since any ide or (almost) trivial preprocessor can 'correct' the indentation based on curly brackets

5) it is keeping some people from using the language, which is a shame, because they might contribute to the language or community; and it is distracting the discussion away from a true discussion of the merits/drawbacks of the language, e.g. static vs dynamic typing, but also having classes and functions be true first level citizens without the need for clumsy introspection, yet not choosing the obvious next step of making class and def functions instead of statements.

(PS I have no problems whatsoever with newlines ending statements. You can still use semicolons to put multiple statements on a line (generally a bad idea even in C) and since open parentheses suppress statement ends it almost never leads to problems. I think a '\n' is a more intuitive statement ender that a ';'. )

Comment Re:Gawd (Score 1) 434

Java -> python programmer, both around 5-10 years (partially overlapping and with some R thrown in)

Although the skill and character of the programmer is absolutely the primary thing, I do think that language makes a difference, moreso than tools. If I'd have to rank, I would rank programmer > API/libraries > language > tools. I used to write java in Eclipse and could not live without autocomplete, templates etc. I write python in vanilla emacs and don't miss it at all. Without need for both memory management and "type management", you need a lot less cruft in python so less names, classes etc to remember, and certainly no WidgetConstructorFactoryInterface3. Also, having to reference the real documentation frequently is also a boon, as good documentation (e.g. python stdlib, django) contains very important information that might be missed by relying on autocomplete and assuming you know what something means.

If someone would write a good autocomplete for a dynamic language with metaclasses and other magic I would be game, but I fear that that is either theoretically impossible to do completely & correctly, or somehow requires running the whole program dynamically while typing, which just sounds painful. I tried PyCharm a while ago but it was clunky and incomplete. But in any case, I choose python+plain editor over java+eclipse for any project unless I know that java has an excellent library for something I need, which rarely happens.

(and just to defuse the compiler catches errors argument: unit tests + code checkers > compiler errors, especially given the horrible workarounds that are sometimes needed in Java to satisfy the typing system that enables the compiler to catch errors)

Comment Re:Which has multiple benefits (Score 1) 775

It's also way more efficient.

See, that's what I thought as well, but it turns out it is simply not true.

Power stations have a heat efficiency of around 40-45%, electric engines are around 90% efficient. Modern gas engine are 35-40% efficient. So, in total the direct efficiencies are quite comparable.

http://www.eia.gov/tools/faqs/faq.cfm?id=107&t=3
https://en.wikipedia.org/wiki/Engine_efficiency
http://in.answers.yahoo.com/question/index?qid=20100628191919AAh0mSc

Comment Re:Depends on the energy source duh! (Score 1) 775

Right. There are two pertinent questions.

(1) How much total pollution does driving a set distance generate, and how easy is it to reduce this pollution?

For gas cars, the pollution comes from burning gas, and it can be reduced by increasing ICE efficiency and by burning renewable sources like ethanol or hydrogen. Both are quite limited since ICE efficiency is limited by heat engine physics and has been optimized quite effectively already for around 100 years, and alternative sources require non-renewable energy and/or a limited resource like agricultural land to produce.

For electric cars, the pollution comes from producing the electricity. In most countries, this is 90% or more from burning fossil fuels. It is often said that this is much more efficient that ICE's, but he difference is quite marginal: modern cars operate at up to 35% or even 40% (diesel) while power stations operate in the low 40% efficiency and the electric engine is around 90% efficient (https://en.wikipedia.org/wiki/Engine_efficiency, http://www.eia.gov/tools/faqs/faq.cfm?id=107&t=3 and http://in.answers.yahoo.com/question/index?qid=20100628191919AAh0mSc), although gas cars have further losses in gear and transmission systems that electric engines can avoid. However, shifting to less pollution source power is easier as there are almost limitless energy sources (solar, water, wind, waves etc) that do not produce direct pollution and do not compete for e.g. agricultural land. Even nuclear is a viable option based on how you compare carbon and related pollution to nuclear pollution, including risks like spills and meltdowns (damage x probability).

The ease to switch to non-fossil fuels is really the only viable argument for total pollution.

Of course, a real calculation should estimate all indirect inefficiencies such as fuel transport and amortize all non-unit costs such as the pollution cost to build and maintain the car and the infrastructure around it including oil wells, power stations and even the extra road maintenace because of fuel trucks driving on the road. However, this probably won't change the argument that the main gain of electric vehicles is the flexibility to switch power sources.

(2) Where does the pollution go to?

We can weight pollution by location. For global warming this is not so important, although carbon dioxide near a sink (forest, ocean) might be absorbed quicker than far away from a sink, but in general a greenhouse gas is a greenhouse gas. For health considerations however, it makes a huge difference for pollutants like nitrogen oxides and micro particles (http://en.wikipedia.org/wiki/Motor_vehicle_emissions#Main_motor_vehicle_emissions). In a dense city they cause much more trouble than over the ocean or in rural areas, both because of concentration of pollutants and of people.

For this equation, electric wins hands down by shifting the pollution from the population center to the location of the power plant.

tl;dr TFA completely misses the point by focusing on comparing current pollution to current pollution, ignoring the environmental benefits of shifting pollution from cars to power plants, which are both less harmful by being out of the way and by offering a feasible path to clean energy sources.

Comment Re:Marketing babble galore (Score 2) 208

I switched to python around 10 years ago and never looked back. People who think python is all new and shiny now are missing a lot of history - 10 years ago python was almost 10 years old and already at version 2.1.

The language has evolved into an (IMHO) extremely elegant platform for >90% of my needs, from scripting and data processing to web applications. I especially like the way that decorators and generators allow elegant expression of many functions. Dynamic ("duck") typing has drawbacks (especially IDE support and compile-time checking) but this is lessened somewhat with pyling and unit testing, and it makes a lot of code so much more elegant than e.g. java, where you spent half your time and lines of code working around limitations of the type system. Obviously, python is not perfect. The whitespace is sometimes annoying and packaging is a mess, but at least they're working on the latter.

Besides python, I use R for statistics and C if things need to go fast, and for the latter python makes it really easy to integrate C and python code.

Comment Re:Net Energy Use? (Score 1) 164

Nice try.

http://en.wikipedia.org/wiki/T%C3%BBranor_PlanetSolar
Displacement: 85 tons, of which >10% batteries and "very limited" cargo capacity
Engine max power: 140 kW (2x60+2x10)

https://en.wikipedia.org/wiki/Axel_M%C3%A6rsk (to pick something big but not brand new)
Tonnage: 109.000 tons deadweight
Engine: 56,800 kW

So the "proof of concept" is a ship that is a good 1000 times smaller and has 500 times less engine power.

Was his solo rowing across the Atlantic a proof of concept as well, evoking a future in which the unemployed hordes will be rowing container ships across the ocean?

Comment Re: You keep using that word... (Score 4, Informative) 158

http://dictionary.reference.com/browse/moot says:

verb (used with object)
4. to present or introduce (any point, subject, project, etc.) for discussion.
5. to reduce or remove the practical significance of; make purely theoretical or academic.

So meaning 4 seems appropriate. Strange that a word simultaneously means to introduce it and to remove it from consideration, but it is a pretty old word I think so it has probably evolved quite a bit.

Origin:
before 900; Middle English mot ( e ) meeting, assembly, Old English gemt; cognate with Old Norse mt, Dutch gemoet meeting. See meet1

Comment Re: Geotarding? (Score 1, Troll) 153

Sorry, I messed that one up big time! It should be:

Well, if you live in Israel, Google maps doesn't have streetnames for almost half of your capital, or for your second largest city. Nor, for that matter, for the fourth and fifth largest city in your country.

And if you deny that those cities are in your country, could you kindly inform your government so that they can withdraw their troops?

Slashdot Top Deals

"It's the best thing since professional golfers on 'ludes." -- Rick Obidiah

Working...