1,708 karma · joined Jan 14, 2010 (16y ago) · 672 submissions
comment 16y ago · link · parent
comment 16y ago · link · parent
In comparison to this, a cipher that is both fast and also secure would be f.e. Blowfish, a 16-round cipher supporting 448-bit (56 bytes) keys, while still, on 448-bit keys, operating about 25% faster than the not quite as secure AES-128 does with its 128-bit (16 bytes) keys. Blowfish is entirely free of patents, whereas most of the cipher modes of AES are patented.
The second most important factor in a cipher's security is its keysize. If the cipher withstands all cryptoanalysis on its full amount of rounds, the last resort is brute force, and with brute force every extra bit of keysize matters to the feasibility and practical possibility of breaking the data. 128 bits of AES is today broken with modern parallel means in ridiculously short times (read: hours). Every extra bit of key theoretically (but not always practically) doubles the work required; a 129-bit key is twice as large as a 128-bit key; a 130-bit key is four times larger than a 128-bit key; a 448-bit key is 320 times larger than a 128-bit key.
comment 16y ago · link · parent
There isn't really anything "HTML5" about this demo - it only uses the Canvas feature to output the rendered image on the screen, which can also be done in other non-HTML5 ways (although not as fast):
<html>
<head>
<script type="text/javascript">
// we need to output the canvas tag here, in order to make the js engine
// instantly aware of the "R" id so that the canvas can be addressed at once
document.write( '<canvas id="R" width="64" height="64" style="width: 4in; height: 4in; background: #ffffff;">' );
// array N and object K now exposes an API for interacting with the canvas
var N = [ K = R.getContext('2d') ];
// pulls image data from x/y 0,0 w/h 64,q of canvas K into ImageData object I
for( t = B = 127, I = K.getImageData(0, 0, q = 64, q); t--; $ = Math.cos )
{
N[t] = t / 43 & 1;
}
function sponge()
{
t++;
for( i = y = -1; y < 1; y += A )
{
for( x = -1; x < 1; x += A = 1/32, I.data[i += 4] = h + h )
{
for( m = C = $(a = t / 86),
S = $(a + 8),
c = $(b = t / B),
s = $(b + 8),
u = x * C + S,
v = y * c - u * s,
u = u * c + y * s,
w = C - x * S,
X = q + 9 * $(a + b),
Y = q + 9 * $(b - a),
Z = t,
h = B; --h && m < q; X += u, Y += v, Z+= w )
{
for( m = 1; N[X * m & B] + N[Y * m & B] + N[Z * m & B] < 2 && m < q; m *= 3);
}
}
}
// render ImageData object I onto canvas K, at x/y position 0,0
K.putImageData( I, 0, 0);
}
// try to run the frame renderer, sponge(), once every 20 milliseconds
setInterval( 'sponge();', 20 );
</script>
</head>
<body bgcolor="#000000" text="#ffffff">
</body>
</html>comment 16y ago · link · parent
comment 16y ago · link · parent
comment 16y ago · link · parent
comment 16y ago · link · parent
<?php
$entries = 500000;
$db = new pdo( 'sqlite::memory:' );
$db->exec( 'create table abc (a integer, b integer, c integer);' );
$db->beginTransaction();
while( $entries-- )
{
$a = mt_rand( 1, 99 );
$b = mt_rand( 100, 999 );
$c = mt_rand( 10000, 99999 );
$db->exec( "insert into abc values ($a,$b,$c);" );
}
$db->commit();
$start = microtime( true );
$results = $db->query( "select a from abc where b=$b and c=$c;" )->fetchAll( PDO::FETCH_ASSOC );
echo count( $results ) . ' match, ' . round( microtime(true) - $start, 4 ) . 's to complete without index' . PHP_EOL;
// build an index
$db->exec( 'create index i1 on abc (c);' );
$start = microtime( true );
$results = $db->query( "select a from abc where b=$b and c=$c;" )->fetchAll( PDO::FETCH_ASSOC );
echo count( $results ) . ' match, ' . round( microtime(true) - $start, 4 ) . 's to complete with index' . PHP_EOL;
$db = null;
?>
mombook:~ hackermom$ php index_test.php
1 match, 0.1118s to complete without index
1 match, 0.0001s to complete with indexcomment 16y ago · link · parent
comment 16y ago · link · parent
Play with this a bit: http://pastebin.com/wauSARbt
1000 plots, averages to 35 fps on my 2.25ghz Macbook on Safari 4.0.3, and this requires more computational power per object plotted than a smart version of the "bouncing balls" effect he tries to do.
comment 16y ago · link · parent
comment 16y ago · link · parent
comment 16y ago · link · parent
I wonder, did any of the non-Mozilla developers, whose work spans the majority of the project today, ever see a single dime of the _tens of millions_ of USD (yes, that's their revenue) going into the Mozilla Foundation from their search engine sponsor choice? No, I didn't think so either.
comment 16y ago · link · parent
comment 16y ago · link · parent
add.: I really misread both source and addressee on this one. Seems I cannot manage both breakfast and news digest at the same time. I'll still stick with H.264, though... and breakfast.
comment 16y ago · link · parent
comment 16y ago · link · parent
The point I trying to make just flies by you; You don't KNOW what is enough, you don't KNOW what is too little. You can't say any of this based solely on the proof that _anyone_ performs BETTER when you ADD MORE. This is _not_ synonymous with a deficiency. And the research pointed to doesn't even bring up the specific vegetabilic diets held by the vegetarian subjects of the research, which is a very important detail missing for solidifying the "facts" the research is trying to bring forth. It's a very clear case of "correlation is not causation".
comment 16y ago · link · parent
We know that increased oxygen in the blood speeds up healing of damaged tissue - this is why you get a tube up your nose blowing extra oxygen into your respiratory system when you come out of surgery. Does this by your logic mean that we're persistently oxygen deficient in our natural state, just because ADDING oxygen gives a higher effect?
What IS the nominal level of creatine in the body? Do you know? I don't. Pure creatine supplement from meat ingestion can so far only be proven to be an _added aid_, rather than going by the logic that vegetarians turn dumb when they stop eating red meat.
comment 16y ago · link · parent
comment 16y ago · link · parent
Creatine is naturally produced in the human body by amino acids. Just because you're a vegetarian, it doesn't mean you suffer a shortage of the particular amino acids required for producing creatine. Most vegetarians fall under the "ovo-lacto" umbrella, meaning they will eat egg and milk, and pretty much anything else made by animals, just not the animals themselves - being a vegetarian myself, I often say: "I'll eat food made by animals, just not food made OF animals" - and many vegetarians also use various "fullworthy" protein supplements containing all the essential amino acids, guaranteeing them all the components needed to produce creatine while being a vegetarian.
I myself use protein supplements to ensure, together with food, that I get a bit more than 1 gram of fullworthy protein per kilo body weight a day, and that is an amount that actually even meat-eaters, without supplements, can have a hard time reaching on a daily basis.
Addendum:
Digging a little bit on Wikipedia, I found the three amino acids (of which only one is essential) that Creatine is produced from in the body:
Arginine (non-essential) - vegetabilic sources: "wheat germ and flour, buckwheat, granola, oatmeal, peanuts, nuts (coconut, pecans, cashews, walnuts, almonds, Brazil nuts, hazelnuts, pinenuts), seeds (pumpkin, sesame, sunflower), chick peas, cooked soybeans."
Glycine (non-essential) - synthesized in the human body from Serine, also a non-essential amino acid.
Methionine (essential) - vegetabilic (and animalic) sources: "High levels of methionine can be found in sesame seeds, Brazil nuts, fish, meats and some other plant seeds; methionine is also found in cereal grains."
Judging from this, it seems that a vegetarian has to maintain a really lousy and unhealthy diet in order to suffer a Creatine shortage. Maybe the test subjects were university students on a Ramen diet.