Monday, February 15, 2016

Gallery App to display all images from SD card. Part 1

Hey friends,

It's 4:00 PM now  and I have roughly couple more hours before I start my new Android project. So, during this time, I wanted to discuss about my previous project, the gallery app. I have struggled to write the code for a gallery app because of two reasons. First of all it's been like two years without full fledged Android development. Secondly, the tutorials we find online are very rudely specific to resource drawable image galleries. I was like "Seriously? Who would want to see existing non-editable picture gallery?" I mean, don't get me wrong. Unless you wanted an app that showed art-work of Picasso or Leonardo da Vinci, resource drawable images are the way to go.

Then again, we all know that we want to see that selfie we took with Monica or that lucky click of our dog Casper chasing a butterfly or... you know OUR moments. And yes, we want to see it in our app. An app made in our laptop with our shared knowledge. If you are interested like I am, let's proceed.

The MAIN activity

package com.example.horopter.gallery;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;
import android.widget.TextView;
import android.widget.Toast;

import java.io.File;
import java.util.ArrayList;


public class MainActivity extends AppCompatActivity
{
    GridView lv;
    TextView tv;
    Context context;
    String file;
    ArrayList paths;
    ArrayList imageNames;
    ArrayList listFile;
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        paths = new ArrayList<>();
        imageNames = new ArrayList<>();
        if (!Environment.getExternalStorageState().equals(
                Environment.MEDIA_MOUNTED))
        {
            Toast.makeText(this, "Error! No SDCARD Found!", Toast.LENGTH_LONG)
                    .show();
        }
        else
        {
            file = "/storage/sdcard1/Images";//Environment.getExternalStorageDirectory().getAbsolutePath();
            listFile = new ArrayList<>();
            Toast.makeText(this,String.valueOf(file),Toast.LENGTH_LONG).show();
            Log.d("Santosh", String.valueOf(file));
        }
        listf(file,listFile);
        getImages(listFile);
        context = this;
        lv = (GridView) findViewById(R.id.lv1);
        tv = (TextView) findViewById(R.id.tv1);
        tv.setText(tv.getText()+" ("+listFile.size()+" files)");
        ScrollAdapter ga = new ScrollAdapter(this, paths, imageNames);
        lv.setAdapter(ga);
        lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView parent, View view,
                                    int position, long id) {
                Intent i = new Intent(MainActivity.this, ImageViewer.class);
                i.putExtra("filepath",paths);
                i.putExtra("filename", imageNames);
                i.putExtra("position", position);
                startActivity(i);
            }

        });
    }
    public void listf(String directoryName, ArrayList files)
    {
        File directory = new File(directoryName);
        File[] fList = directory.listFiles();
        if(fList!=null)
        for (File file : fList)
        {
            if (file.isFile())
            {
              if(file.getName().endsWith(".jpg")||file.getName().endsWith(".jpeg")||file.getName().endsWith(".png")||file.getName().endsWith(".gif"))
                files.add(file);
            }
            else if (file.isDirectory())
            {
                listf(file.getAbsolutePath(), files);
            }
        }
    }
    public void getImages(ArrayList file)
    {
        for (File f : file)
            {
                paths.add(f.getAbsolutePath());
                imageNames.add(f.getName());
            }
    }
}

The MAIN layout

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.horopter.listgallery.MainActivity">

    <TextView
        android:id="@+id/tv1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textStyle="bold"
        android:textSize="25dp"
        android:text="Gallery" />
    <GridView
        android:id="@+id/lv1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/tv1"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:stretchMode="columnWidth"
        android:numColumns="auto_fit"
        android:drawSelectorOnTop="true"
        android:columnWidth="100dp"
        android:fastScrollEnabled="true"
        android:isScrollContainer="true">
    </GridView>
</RelativeLayout>

[Draft update:] I think I shouldn't be doing this while I am working. I will explain the code next time. [4:21 PM] 

Wednesday, February 3, 2016

Being an Intern

I don't even know if I am allowed to blog from my workplace. This might be the shortest post I have ever posted. This is totally meta but I am getting the hang of it. The people are very nice. I feel like I am learning something after a long time. I hope I get into this company. I love it here.

I mean who knew learning would be so fun? 

Saturday, January 16, 2016

Am I wrong?

I was playing this game called "That Dragon, Cancer". It's more like a video than a video game, interactive of sorts and I felt really terrible. Like four years ago or sometime around... my Physics teacher said... correction! cursed "You are a terrible person. Death, darkness and despair will follow you around wherever you go."The context wasn't even related. I just proved him wrong in lacking imagination that being complete atheist is idiotic as there's something to learn always and being a physicist, he should know better that our assumptions are a small part in an ocean of knowledge. There! He went berserk and as if he was possessed or something... he. just. cursed.

Now you may be thinking that it's just a story but what followed looks like straight out of a fairy tale. I met an old guy in a very ill maintained temple. Now me, I don't believe in a crap they say in that temple but I was there for the deity, not the crap they said in the name of the deity. It was supposed to be a joke but somehow... I ended up asking my fate. You know horoscopes, an attempt to feel ready for what's coming. When someone says like, yo! you are gonna win a million dollars, you wouldn't be like 'hell yeah! I'm going to help the destitute or poor or someone suffering' and in all cases including me, we'd be like 'money for me and my people'. The thing is, we ask for future because inherently we know that something is going to happen and in most cases it's bad. We'll I had that feeling too. What the old guy said absolutely stunned me. He didn't even twitch saying it to me. He clearly said that three deaths are gonna happen in an year and I couldn't prevent it even if I wanted to.

In 8 months I lost 3 people who are very close in a variety of ways that I couldn't even fathom imagining. That pain stayed for a while and time apparently patched it up. Had I only remembered the thoughts that were going through my brain that day I would have been in a better position. I pushed everyone away. I wanted everyone to hate me. I just wanted someone to blame me for those deaths... give me the responsibility just so that I could have the reason for why I was suffering. Everyone didn't believe my story as it was a joke when it happened and I left everyone. I looked into my past. I lied, I cheated, I misguided. I was never a good friend, a good teacher, or a good student for that matter. I was having this wavering superiority and inferiority pulses that made my life an emotional ferry. There were times, I asked 'why couldn't this person just die?' and unfortunately I still do. I don't know if this is my OCD or something.

During those deaths I found the real people who were so different at the other times. The death is just a phase for some people. As simple as it may be to say that people can't mourn all their life for one person, it is also true that we shouldn't forget what impact their lives cast on us. We forget and for a good reason. Scrape all the bad memories but at least retain the good ones. There are people who are so impacted by Mahatma Gandhi that they adopted him as their lifestyle. I could even call it a religion, but then again so is church of Scientology and I'm going to consider it a cult. Why don't our own family members leave that impact. I have seen wives wipe off their 'obligatory my husband is dead' face in a matter of minutes but brothers have recalled memories from long past. I get it that I am being partial of sorts but shouldn't a wife grieve more? She's a life partner for God's mercy. Sometime later the daughters forget. Some sons son't give a fuck. And 2 months due... everyone forgets that a person was there. He was replaced like a piece of furniture occasionally remembered during close hours or despair and trust me... to distract a person.

It happened again but this time with a baby. She's the most beautiful baby I had ever seen. A pathetic misunderstanding as I am told it was wrecked a family to whatever is less than shreds, perhaps dust. Adult world seemed so idiotic with fights and quarrels that could have been decided over a table minus all the yelling and ego. Perhaps I am too young to understand or I was or may be I am right and they are all a bunch of idiots. I'll tell you what's true. The baby's death affected no one. Literally numero zero. I even heard the most vicious words one could ever say... 'the parents deserved it'. As long as my fury was building up, I controlled a nuke attack within myself fighting with my own consciousness not to burst out. Then again, I felt totally responsible as somebody believed in my theory. That was my sister. She was frightened that the curse (which I had forgotten about) was true indeed and if it was this was number two on the list. I had erased everything people said and focused on calculating on who could be the next. I was actually hoping that it should be me so that I could be relieved of this pain. I knew people never cared for me so, it shouldn't be surprising if no one turned up. I was afraid if I had at least some impact so that I could have a proper funeral and not some rotting body. I just chuckled thinking how I was thinking of this flesh knowing one day it would be a shell. Then, I saw the impact. I saw a shrine built by a father to a daughter who couldn't tell apart anything from anything else. Being mentally challenged didn't help as still... people dissed at her so much that I almost felt that she's better off with God than these filthy people.

That day, an old man cried and cried when everyone else including the father was asking for rest. I should only assume his heart broke. He asked to get relieved from this painful life like I did. I saw myself in him as I could have been the mirror reflecting him. I was born because evolution picked me to be his grandchild. It should be no surprise as I was thinking like him. We had a moment where we were not visibly crying but we could see each other sobbing at the loss of the dearest. We both saw the angst that we were suffering through but couldn't help it in any way. We were both welcoming death as a close friend, the real friend who knocks at your door mercilessly until you agree to play with him. We all know how good he's at games now, don't we? Looking at his eyes, I felt a sudden sense of liberation like never before. I saw around and saw the foolishness of the people. The foolishness of resting when there is so much work to do, evils to fight, most of them within us than outside. My father was just tethered as he had faced the grim of the reality himself months earlier.
Unbeknownst to us, it was my grandfather who took the turn. Worst, I wasn't even there. I still blame me for not being there. I was too busy with my "exams" when truly I should have been saying farewell to my life's guide. I am not saying that none of above should have lived longer or didn't deserve death but I am mourning on the fact that people just ignored what they stood for.

I know I am an evolutionary failure for not having sufficient emotional energy to be a normal person. Neither am I diseased when I could throw an excuse of being diseased. Every action that I did, do or will do is totally under my control but then again, I chose not to. I let my body control me. I am really sorry to not being able to impact people around me. That really makes me paranoid. That made me think about the only thing I can do with my life. I have decided to be a stepping stone for next step in the evolution. I have decided to be a better father and I'll tell my kids to live a life that counts. I want them to be the one kind I am never capable of achieving. I won't force them to do my bidding and neither will I let them taste the darkness I was seduced into. It really seems highly philosophical for a guy of my age but I have seen and done things that the guy of my age should never see or do. I always thought that I was the person who was alienating others but I just felt that I am a mirror. People are getting what they are. They didn't try to help me or guide me because they are so puny to be busy with their own lives of achieving something which is nothing worth saying when faced with death. They bent my back and vision over and over and now I have become a mirror facing itself. Now I can see an infinite of me and each possibility reflecting on itself to create a new one and then a new one and so forth. Somewhere during that point of reflection, I had realized something far greater.

I had realized what those deaths meant to me and what despair does to a person. I had realized about something I had preached before but never tried in my life. I had time. I felt so pathetic of my despair. I had realized what it made me do. I have a couple of pet dogs about whom I have cared out of a fatherly affection for some reason. I felt responsible for their diet and promised myself to care for them. One of them just became dirty with the filth in which they were playing. I am sorry that I began to alienate that one. I saw the other one who was quite innocent for a dog. That one likes to be fed and plays so gracefully. Recently some idiotic human (may pain be upon him) hit the latter in the eye. The dog was fine but now he has a visual impairment. I just couldn't watch him and I was in a soup of emotions. Hatred was on but I didn't know upon whom it was. I just went away from the puppy. It was probably thinking that I valued him for his external beauty and for not who he was. He probably thought I couldn't handle imperfection. Fact was, I couldn't handle any more people getting hurt because of me. That's what despair made me think. It made me feel responsible for things I could have controlled but just didn't. It made me mope around when instead I could have been healing. Healing myself and people around me. I have the time.

Watching a four year old go through cancer and the emotional turmoil the parents took prepared me for who I wanted to be. I sprinted to my dogs and hugged them. I just hoped that they didn't feel alienated for what terrible thing I have done and will excuse me for the same. They did. I hoped that it could have been similar with people. I know that this resolution will not last longer because these transitions just don't happen in a snap. I am just trying to hold on long enough to create an impact out of this experience which could possibly be my buddy till the end of the time. I don't wish to be the alpha male but if I could impact the pride somehow, that would be enough to trigger a smile in face of a certain death. I just hope that I am not wrong thinking this way.

Sunday, December 27, 2015

All we need is search

I should be habituated to get proven wrong I guess. This week's been crazy stupid in learning that I can be wrong in more than one way. Okay, may be being wrong is not so bad or may be it is bad. Anyway, what's completely wrong is my presumption of people looking and behaving so differently based on the context. I mean being a programmer, I can understand the diversity that exists in humans and that which doesn't in the machines. I am not talking about that. We all have certain presumptions about people and their inner nature but the art of secret keeping tells you something more vibrant.

Case in point, one of my ex-classmates. She was so brilliant in linguistics and verbal logic that I was mesmerized by her performance. You see art of speech is something different and art of persuasion using the speech is entirely different. The language is a means of communication, the part I agree and the art of vocabulary is a means for understanding, the part which befuddled me on more than one occasion. I was really utterly jealous of the attention span one could achieve just by speaking.
Then the truth dawns after like what 6 years now? Turns out, she used to write her essay assignments in layman terms and use a thesaurus app to sound fucking smart. Then after once understanding what she could to substitute instead of common terminology, she just did exactly that to throw everyone off the radar. No wonder she used to overuse same word-set again and again.

Enough talk about that bitch, let's get to the point. No... you know what example 2 is on the way. Just the other day, one of my batch-mates from 3 years ago, met me online. I used to be so amused to find a person who was really interested in science and coding. We often shared same thoughts and ideology. The two places of my absolute interest was all I needed to try wanna make friends with that guy. He, on the extreme opposite end, used to talk in sarcastic tone and what not. See, I respect the arrogance that comes with the knowledge. It's usually healthy because by showing people what they are not, we induce the curiosity to learn more. Only wise people know the difference between a healthy arrogance and you know, plain stupidity. I took that guy in good nature and even though he treated me like shit, I couldn't resist being around him because knowledge. You should listen people calling me faggot for being curious. I admit that I had overdone and taken some liberties but you don't find that many people talking about Richard Feynman's work now do you? Turns out, he was a fraud too. In this case, he was parroting whatever bullshit that came out of online lectures. Had he understood what he was doing/telling or at least had he attempted analyzing what he listened to, he would have been fucking great. Alas, he is jobless today.

Point is, there are many parrots around us. If you read my previous blog, you'd have seen that I consider them knowledge preservers. Mugging up/ heartening is good to some extent. Making it a mask for proving what one is not... that is disgusting. I don't know if I had mentioned earlier but don't take anybody's talent for granted. It's all a matter of eligibility and practice. Someone had proper resources at proper time and you didn't. It doesn't mean you are incapable. It just means, you never searched for the answers properly. It's not a sin, it's just a chance. Einstein wasn't the one who did all the work. he just asked the right question. A question that wanted to relate the speed of particle and speed of radiation. It's brilliant because of the segregation that caused the question. In conclusion, all we need to become something great is to start searching how we can do it.

Stay inquisitive
Horopter

Tuesday, December 22, 2015

Compiler design part 1 : Failure accepted buuuuut.... Esoteric programming language

Ok I am busted, 24x7 challenge didn't work.
Fine... I am like that and I am moving on.
I had this weird obsession with designing compilers. I even had a couple of blog entries, so to speak.
One of the most weird things about that I must say, is the journey. I wanted to start a series for tht sake alone but I couldn't succeed because I was going in the wrong path for me. See, everyone has their own path in reaching their destiny but for some reason some of them match and few of them stand. All we have to do is discover and compare notes. So, here I am presenting my notes.

First things first, opinion. In my opinion, compiler design is like integration. I am a fifth grade student by my knowledge in this context. So if I directly mug up integration formulae, I may very well solve the problem. Then again, use of integration is tricky now, isn't it? I mean application part and preparing for real world problems requires more than just skill, it's knowledge. Okay, what if I start from limits and gain the knowledge? It's fine and some theoretical preservation and sensitivity is needed but something else would be missing. Some call it practice, I say experience. The joy of solving a problem and solving multiple problems are different. The pain of losing and rediscovering and the loss of leaving 50 other questions is different. The first in both cases is experience and the second is practice. In short, my opinion is that designing a compiler requires more literature survey followed by immense practice.

Next, paths already followed. The best tool available online on the subject may be Compiler Design course by Stanford. It is fine and all but it is rushed. For a simple guy like me, starting off with a different LLVM based compiler is counter-intuitive and frankly, very complex. I must say that I am quite below the standards but in my defense, so are many. I mean, how many people in CSE or otherwise have thought of writing their own compiler and filtering out the passion, plagiarism and
needed-for-diploma categories, there are only a few hobbyists that actually think about this. Problem is that these people tend not be mathematicians and lack general perspective. They just give code and say voila, there you go. It's fine and all but I am still missing a piece... You didn't explain your language. There is this constant buzz about languages. Non-self-hosting ones are criticized for not being able to do so. Self hosting ones are criticized for doing just that and not being able to do anything else. This is a genuine concern for language developers. It's just not a hobby, it's an art. So the paths followed are different and not easy.

Next, grouping of ideas. Compiler designers differ in ideas and methodologies. Mostly because of their backgrounds. There is the lisp family and there is the C family. Lisp family has Scheme to create new languages and  itself is so huge and people daresay about creating a new one in it. Similar things can be said about Java and C# which actually provide reflections but hardly anyone knows it. Also, C has lex and yacc and Java has ANTLR. These are very good tools if you ask me but they are advanced for even beginners to fathom the knowledge that went behind in creating those things.
Also Ruby builders are creating new things but it goes against the whole idea of creating something useful. Creating qbasic from ruby is a huge back-step. Then we have esoteric programs which do not define themselves as self-hosting and are meant to be a hobby or a joke. These are languages like brainfuck or ArnoldC which are at first declared as Turing complete but lack a provision for actual programming. Python might be a better place to sit back and relax but you just can't make it possible because of python's nature of being utterly indecisive. Even the structure of python screams modern which implies, not for traditional approach.

The procedure of my approach might just be clear from now on and some might even contradict above initial assumptions but that's fine. You'll see that right away. Without further ado, I suggest to whomever reading this blog, write an interpreter for an esoteric language. The point here is not to learn compiler design. It's like teaching a fifth grade student about progressions. It is very much on that border of understanding things and also leads to limits concept. It's a joke in itself seeing from outside but nevertheless is a tool in itself for many great things. That bridge is necessary just to understand lexical analysis parsing mechanism. As a homework, if should you take this blog seriously... write an interpreter each for brainfuck, whitespace and ArnoldC. Create your own equivalent Turing complete language just by combining these ideas and interpreters should be easy.
This will teach two things for sure though. One, what in the world is a Turing complete language and two, how easy it is to make a list of commands look like a programming language.

The final step in the first course is to write a text editor. I know, this has nothing to do with the compiler but let me remind you of QBASIC and TurboC. These two programming languages came with an IDE of their own. Funny much? Yes, no body today is interested in terminals except for linux community which by the way is working on GUI wholesale. So, living by old PDP7 standards is useless. This also gives me an idea to suggest the one and only language you should use for language creation. It is again, Java. I know, I just wrote something quite against it earlier but hear me out. It gives an opportunity for packaging and GUI interface at low cost. C is a great language to implement interpreters with its simple syntax but is no where near creating a proper native GUI. I suggest polyglot programming wherever possible and I have heard that that's what professionals do.

Final notes here now. Write an interpreter before going forth on compilers and trust me, this will help in future.

Sunday, December 13, 2015

24x7 challenge

Hi guys,

I know that it's been a long time that I blogged and I have been bragging about how everything will be changed. Recently my crush said unto me to be honest for a week. Then I argued that one can not live an adult life without lying and my best defense was an awkward Jim Carrey movie and its Bollywood Ctrl+V from our favorite (?) Govinda. I politely asked her to be practical as decisions made in an instance die in an instance. Commitment comes out of necessity and not determination. At best I was using my word play to escape the inevitable truth that I can't stick to my commitments.

Then 10th Dec 2015 happened. I probably lost my exam in ECS which is arguably the nightmare of many people. Now, I had prepared expecting a fair question paper and being "honest", I didn't prepare that well either. I was knocked into my senses and as always I wanted to declare to the world that I will be back or I will change from now or some crap like that like I always say and do. But this time, my crush is monitoring me. Let me explain even though you practically understood like 95% of the story.

You see, I have lost all my friends to this menace of being supremacist. I had read Mein Kampf when I was in high school and that really influenced me, a mistake that I won't repeat with my child in future. Moving on, from that point, I used humor as my defense. I try to laugh more and as I guess I've told you in one previous blog, I kinda conquered my anger bursts. My crush apparently saw this too and she asked me if I could challenge that energy somewhere else. In this case something else. I was practically skeptical and I was genuinely thinking if she was directing me towards intercourse sessions to put as gently as possible. Well, living in a dirt bag of a college hostel, I got corrupted there for a while. In a train of thought, I just realized that the 40 year old virgin and the Batman Begins movie released in the same year. I am actually feeling the stark difference in the cinematography. Ok, coming back to the stream, apparently she was not asking about intercourse.

Fine, I said unto myself and I asked her what she wanted me to ask. I mean, I wanted to ask her out but she wanted me to want to ask her a different question. The question in point being that I could be productive for 24 hours and 7 days a week. It sounds exactly like what I am doing, I thought. She had her own thoughts. She wanted me to record the events in a little book so that I can feel accomplished. On other note, every day I meet her I feel accomplished but you know what she meant. I reacted, let's say, unconventionally and it was awkward. She just wanted me to try for like just one week and habituate if it felt good.

Now, you guys know me. I start well and take a dump on my own resolutions and stuff. Quite frankly, I know that this is going to fail in the same way. Then again, this is the first time, she asked me to do something. I feel obligated and that's why, I am going to be productive starting today 13th Dec 2015 2:18 AM IST. I swear to God that if I succeed in this, I am going to ask her out, for reals this time.

Yeah and also shout out to my dumb racket which is good but has a few threads in its head a bit messed up. Please feel free to tell it go fuck itself because even after knowing how I play, it refuses to understand. I am sick and tired of being the listening person. After all I am Santosh and its racket. I guess, I lost my value to a dumb racket.

See ya
Horopter

Saturday, November 21, 2015

The stories

It is said that the history is always written by the victors. I kinda disagree on that for many reasons. Sure, journalism as in modern world is more sophisticated than ancient times but recording of an event, however exaggerated is mostly limited by the acceptance of the said story. Let me explain. See, we have comics all around right and we also have television shows and some party/fun events. Suppose tomorrow, there was a mushroom cloud lined with barium and was powerful enough to decimate human life as we know it. By sheer luck, suppose the only book/film that survived was a ten year old's iPhone. The humanity that recovers from those ashes might be teens in all probability. Now, with their limited knowledge of the world that existed before them and all the evidence they could gather, they might start a cult that speaks of superman for instance. This seed, supported by several archaeological diggings recovering books or film may start a belief that superman could really exist.
 After all movies are shot on sets and over time sets may inspire buildings in turn. This may lead to a natural instinct of a possibility of superman. This would continue until people continue to feel superman as an existing entity. His backstory is perfect and would be unquestionable in that future. Even though different editions contradict each other, they could be called as doctrines and perspectives. Any discrepancy could be snubbed while it is budding and they wouldn't know anything about what's true. My question is who's the victor? I mean, it would have become history (a comic history but for them, no difference) and by chance, if they ever recover Henry Cavill or Brandon Routh in bones (or by cloning), it would become undeniable fact. It might sound vague but added enough information and convenience that could occur triggered by a disaster, (just like we rose from dinosaurs) we could imagine a scenario where in superman could be accepted as a literal God who once walked on earth (not that there are no people living now, who actually think that but you get the point).
Moving on, let's go to a place where Gandhi is just a guy on a currency note and that's all is left of him. There is no physical evidence to support Gandhi because frankly more people know superman than Gandhi. Also, there are continuously generated comics of superman and not so competitively for Gandhi. This creates a divide. What's not to say that Gandhi is just a figment of imagination like Uncle Sam? Future people may find it strange that one normal human was able to defeat many without proclaiming blood lust ( and true to myself, I think Netaji played a greater role than Gandhi). Since the England is still ruled by a Queen, it still maintains a decree of royalty. That alone might set off alarms as England being innocent and Indians being arrogant. I mean, USSR became Russia, didn't it? In this world, how would people know which one is true and which one is false.
The answer is strictly, not possible. There is no individual Nexus point where people can agree on. If evidence is the only criteria, one should be ready to understand that the evidence can lie. If there is no way of testing it, probably other opinions do matter. I know that taking evidence is the closest way to approach an unknown but then again, falsifiable doesn't mean false and neither is the corollary or contrapositive.
There are somethings beyond comprehension. People from 18th century wouldn't probably know the importance of digital assistance because they do have a personal assistance with a human. Today we wouldn't believe that there was a civilization that foresaw eclipses more accurately with almost zero equipment when even with satellites surrounding the planet, we still have a decidable error margin. Perhaps technology existed before and got destroyed. It may not be true but how much of human history have we known, since its inception (not the movie). There are still a lot of blanks to be filled in and we will debate on some parts and agree on others. This is not because who wrote the history but how it is interpreted and by whom. It's no one to blame except for the guy who first blasted the mushroom cloud I was talking about.

Horopter