Wednesday, January 4, 2017

Reinventing the world without reinventing the wheel

I just made this up. Dibs.

"Reinventing the world without reinventing the wheel" - Tatarize.

Thursday, December 22, 2016

Flaw in VelocityTracker changes to a diagonal.

Velocity is the direction and speed of an object. Changing the direction because of the maximum velocity was reached must be considered a defect. This also clearly causes a flaw in that a diagonal velocity is faster than the orthogonal one.

The problematic bit of code akin to:
mXVelocity = accumX < 0.0f ? Math.max(accumX, -maxVelocity) : Math.min(accumX, maxVelocity);
mYVelocity = accumY < 0.0f ? Math.max(accumY, -maxVelocity) : Math.min(accumY, maxVelocity);

The flaw here is that if your velocity in the X direction exceeds the maxVelocity it is changed equal maxVelocity and the same for the Y. But, that means that if we are going at 20° angle and at a speed of 200, and our maxVelocity is 20. Our velocity is changed to be 20*sqrt(2) at a 45° angle. The correct answer is to scale the mXVelocity and mYVeloicity by the ratio of the actual velocity and maxVelocity.

mXVelocity = accumX;
mYVelocity = accumY;
double actualVelocitySq = mXVelocity * mXVelocity + mYVelocity * mYVelocity;
double maxSpeedSq = maxVelocity * maxVelocity;
if (actualVelocitySq > maxSpeedSq) {
    double excessFactor = Math.sqrt(maxSpeedSq)/Math.sqrt(actualVelocitySq);
    mXVelocity *= excessFactor;
    mYVelocity *= excessFactor;

Sunday, September 18, 2016

Scaryish fact of the day

Each and every moment half of this solar system's life-ending cataclysmic asteroids get closer to Earth.

Saturday, August 27, 2016

Wow the Table Talks are total bullshit.

I checked a few of the Table Talk quotes and found the same thing Richard Carrier found. That they were generally bullshit. But, I didn't know how far the rabbit hole went or how crap they were to start with.

Tuesday, July 12, 2016

Fastest Pure Code Java Box Blur

----- Behold. Admittedly it'll fill the side two garbage pixels on the right with looped garbage but it doesn't bother to slow down to check when those happen. Stride is typically equal to width.

private static void applyBlur(int[] pixels, int stride) {
    int v0, v1, v2, r, g, b;
    int pos;
    pos = 0;
    try {
        while (true) {
            v0 = pixels[pos];
            v1 = pixels[pos+1];
            v2 = pixels[pos+2];

            r = ((v0 >> 16) & 0xFF) + ((v1 >> 16) & 0xFF) + ((v2 >> 16) & 0xFF);
            g = ((v0 >> 8 ) & 0xFF) + ((v1 >>  8) & 0xFF) + ((v2 >>  8) & 0xFF);
            b = ((v0      ) & 0xFF) + ((v1      ) & 0xFF) + ((v2      ) & 0xFF);
            pixels[pos++] = r << 16 | g << 8 | b;
    catch (ArrayIndexOutOfBoundsException e) { }
    pos = 0;
    try {
    while (true) {
            v0 = pixels[pos];
            v1 = pixels[pos+stride];
            v2 = pixels[pos+stride+stride];

            r = ((v0 >> 16) & 0xFF) + ((v1 >> 16) & 0xFF) + ((v2 >> 16) & 0xFF);
            g = ((v0 >> 8 ) & 0xFF) + ((v1 >>  8) & 0xFF) + ((v2 >>  8) & 0xFF);
            b = ((v0      ) & 0xFF) + ((v1      ) & 0xFF) + ((v2      ) & 0xFF);
            pixels[pos++] = r << 16 | g << 8 | b;
    catch (ArrayIndexOutOfBoundsException e) { }

Monday, March 14, 2016

The SVG 2.0 Specification adds a 'b' command to path for bearing.

This is going to make some pretty interesting L-System fractals pretty trivial to generate. F, F:=F-F-F+ then at the end replace all F with h10 all + with b90 and all - with b-90, and you're totally done.

Sunday, February 21, 2016

As a GMO myself...

I've started calling myself a GMO in some conversations where it's useful the reason being is that the placental mammal syncytin gene is not ancestral to the line but evolved as a part of a virus and was inserted by a virus. Just like in some GMOs.

Tuesday, December 1, 2015

Hiding your God doesn't make atheism unreasonable.

Making God pointless doesn't render God real. Trying to hide your deity from the light of science and reason and sneak it under new rocks and in deeper holes, doesn't make atheism the wrong answer. Or people who who aren't intimately aware of the various places you've tried to hide your feeble and now pointless god, ill-informed. Even a child who drew a correct analogy to Santa Claus, and lost her faith accordingly, got the right answer without reading excessive amounts of prattle. And failing to do that reading, doesn't make the conclusion in error.

Saturday, November 14, 2015

Olsen Noise Implicit Boxiness, or Causing Artifacting With Interpixel Levels

If for whatever reason you need something that does a full range of levels rather than discrete levels, you'll find Olsen Noise to cause artifacting, if you try to achieve that by doing a non-floored division on the blur. The problem is within the scopes it does a few operations:

upsample & adjusts position for scoping.
applies blur,
applies noise.

Well, the upsample are squares and the blur is a box blur, applied for each given level. The blur could well just be a high sigma gaussian of upsampled and speckled landscape (infinite scoped field).

Without blurring the pixels at various level become apparently. It's a bunch of noisy pixels and different levels (and thus sizes) which then gets blurred successively, rather than something like midpoint displacement in diamond squared. This works, but only if the edges are not allowed to propagate. Typically this is because the number of blurs will clip out the error so that the topmost iteration, none of it could persist. Well, if you're doing things where the difference between 0 and 1 matters to you, something other than voxel height maps or images where very tiny but ultimately discrete distances from one pixel to the next matter, then the obvious seeming desire is to have the blur (total / 9) rather than floor(total/9). As this will result in a non-boxy set of levels and give you artifacting as you cannot fully clip the edge of the giant deep-level pixels.

For clipped floored blur between the areas.

Without clipping during the blur process.

The latter method causes artifacting from those boxes being blended but not clipped. So the impact of the difference between one pixel and the next at the iteration=0, will *still* exist in the final image. Rather than be guaranteed to be eaten by the rounding in the blur. Since every pixel transition will always have a non-zero effect on the final image, and pixels are square. It produces square artifacts if you don't clip. If you do, then you get boxes. You could apply a final blur that doesn't clip to the end result.

So get the boxy version, then blur that, and get it looking smooth and artifact free.

Thursday, October 15, 2015

Renderscript Olsen Noise

Converted Olsen Noise to Renderscript for speed purposes. Then cheated and added caching. Made it into a live wallpaper somewhere.

Thursday, September 10, 2015

Android Memory Compact Draw Segments drawLines();

if (count >= 4) {
    if ((count & 2) != 0) {
        canvas.drawLines(pointlist, 0, count-2, linePaint);
        canvas.drawLines(pointlist, 2, count-2, linePaint);
    else {
        canvas.drawLines(pointlist, 0, count, linePaint);
        canvas.drawLines(pointlist, 2, count - 4, linePaint);

If anybody needs to draw a bunch of lines from a float[] of points (not segments). Somebody is going to go OMG that's way better than how I was doing it!

Wednesday, September 2, 2015

Clever, even for me.

If you do deny me life, liberty or property, I do not care if you believe that a space-turtle on a mountain gave you religious permission to do that, you don't have that right. And if you do that to all black people, all gay people, all woman on equally nebulous grounds; you have no right, and you're a bigot.

Wednesday, August 19, 2015

Matthew 20:29, Mark 10:46-47 Why add a blind man?

I think Matthew just changed it to fit better with the two brothers of Zebedees. The parallel in Mark is largely that of the blind seer. The idea is that the apostles are dumb as a sack of hammers and don't see that Jesus is the Messiah. But, the blind man without eyes proclaims him "son of David" and asks to be healed and then follows him. Whereas the Apostles see with their eyes him feeding thousands and do not see at all. In the Odyssey the blind seer warns Odysseus of the suffering to come as he returns home. Here we have Jesus just before the passion.

It was a pretty common theme in many Greek myths that the blind seer would see what the seeing people could not. In Oedipus it's followed by the extra irony of him blinding himself after the seer's prophecy came true. Here Jesus keeps doing miracles extremely giant miracles and the apostles don't understand no matter how many times they are told. But, the blind man instantly knows and completely understands.

The change that Matthew made goes less towards the allusion to the Greek myth and more directly parallels the brothers of the Zebedees who just before are asked to sit at the right and left of Jesus. And Jesus says that that isn't up to him. Then Jesus heals the two blind men who follow him without ambition and see what the apostles cannot. One presumes they follow him on the right and left to Jerusalem, and towards the coming passion.

Rather than just an unassociated blind seer that basically is cribbed from Homer. We get phantom parallel and reversed James and John (Zebedee). The apostles are see but are blind to the truth. They ask for honors that are not earned. The blind men cannot see but already know the truth. And they follow, where the apostles shall scatter.

It really is brilliant mythology.

Saturday, August 15, 2015

Anti-suffragette's argument.

"A stranger from another planet, ... would certainly be led to believe that Christians are, and always have been, unable to tolerate so cruel and inhuman an institution. It is even suggested that it was the Church of Christ which finally abolished this unholy practice. Christianity abolish slavery! Why, slavery was maintained under Christianity for over eighteen hundred years; while in America after all those centuries a Christian people fought a bitter and bloody war, lasting four long years, and suffered the loss of a millions of men and money before they would give it up!" - Mrs. John Martin (1910)

Sunday, July 26, 2015

Anti-suffragettes and progress.

So I decided to study up on the arguments against women's suffrage and the people who argued and rallied for that point of view. I've run into a number of time when my arguments for slavery as given by the people who argued it during antebellum has come in handy.

It turns out, not at all to my surprise, that a lot of them were women. Like basically all the big hitters were woman.

They were often depicted as hating immigrants and thus not wanting them to get the vote and being puppets of their husbands, but they were generally socially conscious. The founder of largest group there was also important with the implementation of the earliest kinds of day care (day nursery). And generally were maligned as backwards and overly clinging to Victorian ideas of gender roles. Women do the housework, child care, and social work. Men do the dirty works of politics. They weren't oddly enough, just prissy rich bitches hating on people. They, like basically everybody, thought they had a genuine point.

I quickly ran into National Association Opposed to Woman Suffrage (NAOWS) and some of their meetings as such: "Feminism and the woman's movement last night received such a drubbing as only a sister woman could give, when some 200 active members and friends of the New York State Association Opposed to Woman Suffrage gathered in the home of Mrs. Henry Seligman at 30 West Fifty-sixth Street to hear Mrs. John Martin, the Charlotte Perkins Gilman of the No-votes-for-women movement, tear to tatters the great new Cause."

30 West 56th is still there and is a five story mansion, though today it's between D&S Market and a Sushi place.

So who was this Mrs. John Martin?
"The most important question in the world." Is mankind advancing? - "Mrs. John Martin"

Apparently she was quite intelligent and quite wrong. She wrote the above book, which basically argued that we are not advancing because despite all our high technology and discovery it paled in comparison to the art and science of the ancient Greeks as measured by the number of notable figures in the past. Clearly she knew far more well-known geniuses in the past than she knew of in the future. And nobody can carve a picture on a gem worth a damn anymore. Clearly we aren't progressing!

Pablo Picasso - Girl-with-Mandolin (1910)

This was written in 1910. So Picasso had just entered his cubism period and Einstein was just made a professor and had five year earlier set forth the basis for relativity, quantum mechanics, explained brownian motion while proving atomic theory, and explained the photoelectric effect which is how solar panels work.

Update: So I don't forget the posters.

Tuesday, June 30, 2015

Social Justice, Gay Marriage, Rightness.

I've supported gay marriage for decades (literally since 1993 when I first heard it was a thing) and thought the constitutional argument was pretty cut and dry. I mean it's the exact argument in Loving applied to gender rather than race. But, nothing happened. All the court cases were against it and every time people voted, they voted against it. Then, a couple years back. Support crept into a majority and like a whirlwind it all came crumbling down.

As much as I would like to believe that a minority with justice on their side can win for the sake of justice itself, I must say that the truth is getting more than half of the citizens in a democracy on your side, seems more effective with regard to social change than being right.

Friday, June 19, 2015

Pareidolia in computers.

This is actually pretty awesome. If you train computers to see things, they dream them out of noise.

Thursday, June 11, 2015

Religion, science, the pursuit of truth and accountability.

Written elsewhere but to brilliant to let stagnate on some dinky youtube comment.

A) I do craft my replies in part for onlookers rather than the person. I did vaguely assume you were Christian. But, if you compare my reply to you with mine to Wayne, you'll see the distinction of vaguely citing "your religion" and my references to early Christian beliefs was to show that the belief in the Flying Spaghetti Monster was on just as strong of theological grounds. Especially with regard to the spiritual reflections of earthly things in the realms of heaven. That in so far as there was an early spiritual belief there would have been divine bodies. As such there could be divine spaghetti which isn't made but for which the spaghetti on Earth is just a fallen flawed reflection of that which is in heaven. My point here wasn't specifically to assign you a religion, but to say that any religion you claim is going to be justifiable as any false religion is justifiable. -- And that's actually a problem.

I will say, however, that there are some forms of pantheism which accept reality as it is, and simply call reality God. Which claims no spiritual nature to reality beyond the numinous, and a personal apotheosis of the universe itself without any claims of personification therein. That religion has a god that exists, and is backed by acceptable evidence; I do not agree that the universe should be a God, but there are those within Scientific Naturalistic Pantheism who don't care they take it only as a personal decision on their part. -- That religion is actually justified well beyond the magical man in the sky kinds of religion or those who think prayers are answered by telepathically interested personal deities. But, for most of the religions whose gods don't actually exist, who have no better evidence for their truth than false religions have for their truth, my argument stands.

What you appear to be describing is awe which the universe actual inspires which doesn't actually seem to require worship of a Judeo-Christian God or Jesus, or actually any sort of magic, just an understanding that we are star stuff and the universe comprehending itself made manifest. Though, I don't see how this doesn't agree that Mormonism and Islam are false religions. Are we really going to be brought before Allah and asked to defend our actions on Earth? Or sent to the lesser of the celestial kingdoms, by God, Jesus and Joseph Smith? These are just things people would make up. And as far as I can tell, even a casual stroll through an insane asylum would prove that faith proves nothing. -- I've never seen faith move mountains, but I have seen what it can do to skyscrapers.

B) Actually they tend to use spirit with things that are clearly false. If Adam and Eve don't die the same day they ate the fruit from the tree of knowledge then they died a spiritual death while they lived on another thousand years or so. Harold Camping's rapture didn't come as May 19th came and went, so it became a Spiritual Rapture. The same reply that some of the Millerites had. The word itself doesn't really reflect anything, so it basically means magically X ~= X. It's X is spiritual therefore X = X AND X ~= X. So yeah, Spaghetti on Earth is made of matter. But, Spiritual Spaghetti is not made of matter it's made of spirit and is *still* spaghetti, because why not? The word itself doesn't actually mean anything.

I know the meaning of the words in the various languages. I said in Hebrew it meant breath, soul, etc. I was referring to nĕshamah. (Strong's H5397 rather than H7307). Namely the bit about God breathing in the nostrils of his golem like critter of Adam and making him a living soul/breath/spirit. Pneuma is Greek but has later theological connotations namely that it was said to be the substance of spiritual stuff, such as the Stoics, and with regard to early Christian theology the Greek and Roman philosophical ideas here matter, dating back to Aristotle who held that the Pnuma within sperm caused them to move. I was trying to invoke this tradition when I said "made out of Pneuma".

Matter is made by the Higgs field and the slowing down of baryonic matter with regard to gravity. The standard model is pretty clear here. As well as relativity which correctly notes that matter is made out of energy. We actually have a complete view of this now, and know that it doesn't require spirit (whatever that means) it requires quarks. Originally it was certainly a search for understanding. You will find no lack of knowledge or understanding on my part of that reality. I could go on endlessly about how even some absurd early ideas were actually really good and amazing searches for knowledge. While it might seem strange to look at Aristotle's view that Pnuma caused sperm is part of a long tradition towards ideas of Preformation and attempting to explain how reproduction work. Rather than scoff at these ideas I happily accept that they were great ideas. That Ptolemy was a genius for his theories. That for most of human history any rational logical thinker would have to look at the argument from design and conclude as Paley did that there was, in fact a designer. That even with the holes in it, that was by far the obvious conclusion that rational people would have to take. Views which I have taken a lot of flack for, I'm more than happy to accept that people are simply biased towards knowing what they know. And take for granted that children know more of medicine than the Father of Medicine, that our understanding of the world is not just better today but many millions of times better. People often mistake the ancients for imbeciles and their wrongness for stupidity, but they were geniuses and drawing the best conclusions they could from incomplete data, and if you properly understand that our understanding of the world is largely a *result* of their search for truth and understanding rather than superior to their flawed reasonings we can see that even them going around shooing demons out of people was simply their best explanations at play. That people like Nicolas Malebranche was brilliant when he proposed that the little people who lived in sperm had within them little people in their sperm and on and on back like Russian nesting dolls all the way back to the Fall of Man as explaining not just how biology worked but why the fall of Adam and Eve also doomed all of mankind (because all of mankind was within them). I can show pretty easily that even a lot of great mistakes where brilliantly made, and that there was no malice in the errors. In fact, we all make errors and the faster we accept that they were not stupid for being wrong, and that being wrong is the fastest way to becoming right, and that being wrong feels exactly like being right, we do ourselves a very great favor.

The problem here isn't being wrong. Or claiming that those who looked up in the skies and saw the works of gods embedding little stars on a dome of heaven that must be as strong as metal to keep out the waters of heaven from drowning them. I actually am very happy to accept that given what they knew, those are entirely reasonable conclusions to make. And that merely being wrong is blameless. That Paley's argument was well written and justified. That Hume was right to object to many of the issues in the watchmaker argument and finally to concede that he could find no better explanation. That Ptolemies planets flowing around on circles in circles, as they revolved about the Earth was entirely less wrong than the theories before them. That wrongness is not an absolute but a scale of sorts and religion was once a honest and noble extension of this search.

I am not apathetic on the topic. You will find that I'm actually quite passionate with regards to history and our search for the truth.

The problem here is that religions are false. If one views them in that light we must accept that their time has gone the way of geocentric models. That Jesus shooing demons out of people would have made sense to those people but that isn't how diseases actually work. That the all powerful creator of the world wouldn't have told people that washing their hands and plates was completely unneeded and then later in the very same chapter went to shoo away a demon from people after they admit they are bitches (Mark 7). It isn't that geocentrism is wrong. But, that if religions were true they might have know the way the stars go. And while theology has made a goodly number of attempts to forgive themselves. To say that the Bible teaches how one should go to heaven, and not how the heavens go. It's simply not the case that many of the thoughts and truths are the best that exist today. Most are not really worth our time because we have a much better understanding of reality. We can go ahead and insist that souls exists because ancient people understood that when people stop breathing they lost their lives, they "gave up the ghost" they "exhaled the pneuma". But, we know that bodies are well evolved machines that do and should stop working eventually. That genes combine and operate in such a way to actually build bodies from scratch each time and don't have a little homunculi living within them, that there was no global flood four thousand years ago, but that local cultures invent flood stories because they live near waters and the one in the Bible dates back to the Assyrian story of a man who traveled the world as the gods tried to drown it to save his friend. That there was no vast Israeli empire. That the universe is billions and not thousands of years old. That there is no cosmic ocean in the sky or hard firmament dome which a tower tall enough could reach. -- One should not blame a person for coming to the most reasonable conclusion they had given then information they had at the time. As such, I will defend to no end that Galen was right to think that perhaps sperm was made in the kidneys. But, that when Muhammad copied Galen's work and had Allah the all-powerful all-knowing God explain that sperm comes from the kidneys. It's clear that Muhammad didn't know any better, but also that he was just making it up. That's how gods are formed, they are made up by people within those cultural context. So Vikings make viking gods who reward them for being good vikings, people on volcanic islands invent angry fire gods and providing ocean gods, and the Jews go from an eye for an eye to maybe we should symbolically spill this blood and just pay you in meat for the transgressions against your family, to maybe we should appease the king who lives in the sky with blood sacrifice. And then they run into the Roman pagans who had endless stories about the sons and daughters of the gods. And they invent the blood sacrifice of the son of God. This is exactly what that culture would invent. In actual reality, the blood sacrifice of the creator of the the universe's human body to himself to appease himself doesn't make any sense. What the heck would the creator of the entire universe with more stars in the sky than grains of sand on all the beaches of earth need with the oxygen carrying cells of some well evolved primate on this one dinky planet? -- There would be no need. But, we can easily show that this *is* what people would invent.

My objection isn't the religion was once man's efforts seeking the truth. It's that it's shown itself to be as filled with truth as astrology or alchemy. It makes sense why people might think such things, but our knowledge is so much greater than this now, that accepting such things is not mere wrongness, it requires accepting things that a two minute search on google would easily refute, because our knowledge has come so much further than the nomatic goat farmers who thought every animal in the world would be within walking distance of Noah's boat.

Wednesday, May 27, 2015

Tat's Trivia Bot V.3.7

Tat's Trivia Bot v. 3.7

Added WPM questions.

WPM*The quick brown fox jumps over the lazy dog
WPM*What a todo to die today at a minute or two to two
WPM*The world beyond the stars is full of stumps.
WPM*The night is long and full of terrors
WPM*Winter is coming
What is the chemical symbol for gold=*Au

Fixed /ask command. It was wonky and I never realized till I tried to use it to test /ask WPM: This is a test of the trivia bot.

The added = formatting indicates that it should use exact mode. Which uses neither fix nor case insensitivity. This is also used for WPM questions Where failing to capitalize the letters results in a fail.

Added /openquestions as a secret command that opens the question file.

Monday, May 25, 2015

Coining a new word: Spirograph = Cyclocycloid.

I needed a generic name for the curve of a cycloid traveling on a circle whether epi- or hypo- and there isn't really one. So I'm just going, circle, circle, -like. Cyclocycloids will be part of my android app in the future.