2/28/14

I was describing pima's encryption to someone, and they mentioned that I might consider using b-crypt or s-crypt to generate the AES password from the plaintext password provided by the user, since the plaintext password is likely to be relatively small.

I'm considering doing this, but there is a time consideration in JavaScript. That is, JavaScript is slow, so I wonder how long it will take to b-crypt or s-crypt a password, especially on the phone.

So I tested b-crypt with "12 rounds" for the hardness parameter, which is just a number I've seen thrown around the internet. This gives us:

MacBook Air: 1.798 seconds
Droid Razr Max HD: 10.379 seconds

I also tested s-crypt with "2^14" as the hardness parameter, which I've read is appropriate for interactive logins, whereas "2^20" is appropriate for file encryption, which is what I want, but "2^20" fails to run at all:

MacBook: 0.835 seconds
Droid: 2.379 seconds

Hm.. I think I'll go with s-crypt for now. It will at least be better than what I've got, and not too slow on the phone..

right to die

I have taken to the idea that people have a right to die.

The biggest argument I've heard against suicide is that it hurts other people, presumably by causing them a sense of grief and loss. But when someone chooses to move away for a long time, they also cause a sense of grief and loss, yet their friends and family believe it is their job to accept this loss because they love the person moving away, and want to let them do what they think is best for themselves. So when someone says "I've decided to commit suicide", it seems like their friends and family should say "aww, we're really gonna miss you! but we support you in your decision."

It also seems like cruel and unusual punishment to keep someone alive who wants to die. In fact, it is blatantly thought of as such in movies when the heroes rush in to the bad guy's lair as they are trying to commit suicide — because the bad guy knows they've lost — and the heroes prevent them from doing so with a line like "we're not gonna let you get away that easy!" That is, we think of life as punishment for this person. And it is. And it's cruel and unusual.

Also, we all do things that might kill ourselves, or reduce our life expectancy. We drive. We live on fault lines. We drink alcohol. We do challenging things that cause stress. We're not always optimizing for length-of-life, and it seems fine that we don't. We don't actually care about long lives as much as we care about great lives. Many influential historical figures committed suicide, or died pursuing their interests, and in any case, we don't rank historical figures by how long they lived but by what they accomplished.

And sometimes accomplishing great things is dangerous. And sometimes it alienates people from the society they live in, and they don't want to live there anymore. And sometimes the source of great inspiration in the mind is also the source of great depression, yet we cherish artifacts and knowledge drawn from such sources even though they may have ultimately led their creators to kill themselves.

volcano

I mentioned before a regret of not going with some people to see lava. I was afraid it might be dangerous.

Some people went again, and I went with them. After walking for an hour and a half through rainforest and mud, and then an hour and a half over brittle lava fields with stream coming out at various places through cracks, we saw the main active point.

We could see redness, like a furnace, 100 yards away, maybe less. That's as far as we went. It was just to scary to proceed. We didn't know how lava worked -- might we break through the brittle surface into lava, or a deep air pocket? The surface seemed to get more brittle closer to the redness, and there were many large stream vents around it.

Anyway, we headed back. I broke through the surface at one point, scrapping my knee, our group's only injury. We had a scare on the way back -- we felt heat. We hadn't felt it on our way up, and for a bit it seemed that there was no safe way back, but we managed to go around the hot place. It was probably safe, but we didn't know how this place worked.

I thought it would be dangerous, and I think it was. We were all grateful to get back to the rainforest alive.

Part of me wishes we had gotten closer, so we could clearly see molten flowing lava.. Part of me is glad we didn't.

I would still like to see flowing lava before I die. Perhaps a safer opportunity will present itself someday.

2/27/14

NOTE: you probably want Control instead of Command
this image is for MY machine which has those buttons switched

Ho ho, so I like to lock my screen when I leave my computer, and I couldn't find a hotkey for it on my mac, so I made moving my mouse to the lower-left corner bring up the password protected screen saver, but I always felt like I needed to wait a second, because if I moved my mouse right away after the screen saver started, it would go away without asking for a password..

..but I learned of mashing control, shift, fn, and the power button — which on my machine is command instead of control since I switch those buttons — which instantly puts the computer in a password protected state :)

it's ALIVE!



PIMA works on the phone! I pushed back todo items while walking around, and in the Bathroom!!
Bwhahahaha!!!!!

And it has a life of it's own! It's hosted on github, though people need to press a scary "Proceed anyway" button:


..because github.io has https, so it will serve encrypted content, but the certificate is for github.com, not io. I've heard github wants it this way so people aren't fooled with phishing sites hosted on github.io. Anyway. Whatever.

And it needs to store data, but it's stored in Dropbox, so I don't need to host file storage for people, and they don't need to trust me with their precious personal data, and they don't even need to trust Dropbox, since the data is encrypted and decrypted client side.

And it even fetches starred emails from gmail using a Google Apps Script that I don't need to pay for or maintain :)

It's just ugly:


I love the red "https" with a slash through it.

2/26/14

blah! BLAH! I mean.. I just started using pima-online!! It still has quirks, but I can work through them while using it — hopefully ;)

quirk the first: doesn't work on phone yet. Or rather, it does, but isn't optimized for phone. I think it will help to get it on the phone, since then I can sort of go through todos while waiting for stuff on my phone..


I need a word that means: "I'm writing an idea here just so I can get it out of pima and have it somewhere that maybe I'll see it again." And it might be nice if I could search for it. Actually, a friend uses "NIDEA". I'll just use that.

NIDEA: password thing with pictures — generate xkcd style passwords, e.g. 3 or 4 random words in a row drawn from a large dictionary, say 5000 words. It would be great if it could generate the password, and also show the password in pictorial form to help me remember it.

2/25/14

programming strategy note

I wrote some code to merge todo items in pima. It is about 44 lines — no need to read it, I just put it here so I can copy from it if I need — but the story continues after the code:

function mergeCards(c1, c2, parentC) {
    if (!parentC) {
        if (c1 && c2) throw 'how could two cards get generated with the same id?'
        return c1 || c2
    }

    function cardDiff(c, parent) {
        if (!x) return { deleted : true }
        var d = {}
        if (x.text != parent.text) d.text = true
        if (x.createTime != parent.createTime) d.createTime = true
        if (x.showTime != parent.showTime) d.showTime = true
        if (x.touchTime != parent.touchTime) d.touchTime = true
        return _.keys(d).length > 0 ? d : null
    }
    var d1 = cardDiff(c1, parentC)
    var d2 = cardDiff(c2, parentC)

    function merge(d1, d2, c1, c2, func) {
        if (!d1 && !d2) return c1
        if (d1 && !d2) return c1
        if (!d1 && d2) return c2
        return func(c1, c2)
    }
    return merge(d1, d2, c1, c2, function (c1, c2) {
        if (d1.deleted || d2.deleted) {
            if (d1.deleted && d2.deleted) return null
            var c = _.deepClone(d1.deleted ? c2 : c1)
            c.text = 'CONFLICT----DELETED\n' + c.text
            return c
        }
        return {
            id : c1.id,
            text : merge(d1.text, d2.text, c1.text, c2.text, function (c1, c2) {
                return 'CONFLICT----\n' + c1 + '\nCONFLICT----\n' + c2
            },
            createTime : merge(d1.createTime, d2.createTime, c1.createTime, c2.createTime, Math.min),
            showTime : merge(d1.showTime, d2.showTime, c1.showTime, c2.showTime, function (_, __) {
                return c1.text == c2.text ? Math.min(c1.showTime, c2.showTime) : 0
            },
            touchTime : merge(d1.touchTime, d2.touchTime, c1.touchTime, c2.touchTime, Math.max)
        }
    })
}

Now I was proud that this code seemed like it would handle lots of merging cases in elegant ways, but I was concerned that it would be hard to test, especially since the most smarts were in the least likely things to happen..

..so I decided to make it less smart, but easier to test — no need to read this either, it's about 33 lines — story concludes after the code:

function mergeCards(c1, c2, parentC) {
    if (!parentC) {
        if (c1 && c2) throw 'how could two cards get generated with the same id?'
        return c1 || c2
    }

    function dirty(c, parent) {
        return !c ||
            c.text != parent.text ||
            c.createTime != parent.createTime ||
            c.showTime != parent.showTime ||
            c.touchTime != parent.touchTime
    }
    var d1 = dirty(c1, parentC)
    var d2 = dirty(c2, parentC)

    if (!d2) return c1
    if (!d1) return c2

    if (!c1 || !c2) {
        if (!c1 && !c2) return null
        var c = _.deepClone(!c1 ? c2 : c1)
        c.text = 'CONFLICT----DELETED\n' + c.text
        return c
    }
    return {
        id : c1.id,
        text : 'CONFLICT----\n' + c1.text + '\nCONFLICT----\n' + c2.text,
        createTime : Math.min(c1.createTime, c2.createTime),
        showTime : 0,
        touchTime : Math.max(c1.touchTime, c2.touchTime)
    }
}

Anyway, I find that I do this a lot. I write a bunch of complicated code, and then decide that it would be easier to rewrite the code to do less stuff than to test the code ;)

lucid dream! again!

An external observer may have forgotten that I'm even still trying to have lucid dreams, since I mainly fail, and it just looks like I sleep more.

Notes from today's success:

  • I wasn't trying to have a lucid dream, I was trying a form of meditation where I just maintain non-judgmental awareness of what's happening in my mind. I'm pretty sure I eventually fell asleep, and then became lucid inside of a dream. I'm not sure what triggered the lucidity.
  • Maybe I should keep a dream journal. I feel like I recall dreams pretty well, but I think I could do a lot better. I don't recall as much from this one as I hoped I would.
  • A few interesting things that happened in the dream:
    • I was trying to put on a sort of hat for some reason, but it was very heavy, and I couldn't lift it, but I kept trying and it was frustrating, but eventually I just decided to stop trying, and I set the hat aside — this may have been when I became lucid.
    • At one point I was walking, but my visual of my foot was that it was still, which was strange — I suppose the visual was more accurate than the proprioception in this case, except that my eyes were closed.
    • At one point I was outside a door, and I willed a person to be inside the room that I was entering, but I was a bit concerned about who I would meet, and nobody was there, and I had the thought: "I'm too afraid still to will a person into existence here."
    • At one point I stepped into a place that was vividly and strangely colored with purples and greens, with strange smooth rock formations, and trees.
..ever closer to online pima.. ooh, it seems cleaner to keep track of a parent and do a merge with the parent as a reference, rather than trying to keep track of "dirty" cards..

I've been dancing, not in front of people, but where people could, and have seen.. getting closer to feeling completely comfortable doing that :) ..

..ugg, logistics.. the month is nearing an end, and this house will vanish

2/24/14

notes

still working on integrating pima-online with a google apps script to fetch starred gmails.. I had intended to redirect to a page to authenticate with google, but I just realized that going away from the original page may lose data, if it hasn't been saved.. I could make the button just warn the user if this is the case, but it seems a bit fragile.. I could open the authentication window as a separate window, but I currently want it to send a token when it redirects back to pima, which it wouldn't do if it didn't need to redirect back to pima.. hm..

ok, this is a bit silly, but I can have the new window redirect back to the original page, but with a token parameter, and when the page sees that parameter, it can set it in localStorage, and then tell the user to close the page..

hm.. jQuery is magical, somehow it knows when a jsonp request has returned, even if it failed..

sweet! phew.. got some subject lines from gmail successfully into pima from the google apps script :)

..time to eat
notes

..I'm trying to get PIMA online, so I can access it from my phone. I have it working with Dropbox — more-or-less. Now I need it to work with Gmail, since I like to import starred gmails as todo items.

..I'm planning to use a Google Script for this.

note: here's where to create a google script: https://script.google.com

..ok, now I'm not sure how my page hosted on github.io is going to access to the script.. even if google scripts support CORS, which I'm guessing they don't, the script is going to need to ask the user to authenticate with google anyway, so it sort of needs to be displayed as a webpage..

..I suppose I could create an iframe with it, and the iframe should be able to reach "up" in the DOM, giving the results to my page.. let's see if that works..

note: command to run local web server: http-server -p 5000

ugg.. X-Frame-Options: DENY

DENY
deny
:(

..thoughts from the porcelain thinking throne:

  • I could open a new page which could automatically redirect back to the original page with the email information in the url.. though this might cause a very long url.. how long of urls are google scripts happy to send, and github.io pages happy to receive?
  • I could have the google script itself authorize with dropbox, and put the information into dropbox, and then redirect back to the original page.. the problem is that dropbox apps require me to enter the urls that they work on, and I'm not sure what to put for a google script, since the entry point is one url, but then once it is authorized, it seems to redirect somewhere else..
..wait, maybe the X-Frame-Options:DENY is just for the login page when the user needs to authenticate!.. nope..

hm.. JSONP requests work, so long as the user has already authenticated the script, so hopefully I can figure out a way to detect that.. also, JSONP has the issue that malicious webpages could run it — not that PIMA is popular enough that it would ever happen, but in principle, it would be nice to know people couldn't trick me into letting them see some of my e-mails..

..oh, I could redirect to google scripts and redirect back every time, just in case authentication hasn't happened yet, and if it has, it shouldn't waste too much time.. assuming I can't figure out how to detect whether authentication happened, since I'm not sure how to detect whether a SCRIPT tag has loaded it's script. Maybe there's a method for that? Hm.. it's not immediately clear from StackOverflow.

..hm.. do google scripts put the requesting domain in the doGet(request)? Looks like no..

..ok, an ugly solution, I redirect to the google script and have it redirect back, but only redirect back to a whitelist of places, and have it send a temporary token back.. hm.. let's see how easy it is to make a temporary token..

..oh good, there's a UserProperties https://developers.google.com/apps-script/reference/properties/user-properties thing, so each user can have their own token..

well.. it's ugly, but simple enough I suppose, let's give it a try..

hm.. it seems like req.parameter.auth is not allowed, like a reserved word..

arg, it seems like my redirect is not working.. but why? I feel like it's not spitting out the html that I requested.. as if it has some "filler" html around it.. hm.. it does have some extra html that I didn't request.. it also said something about a "sandbox", and I could see weird grey rectangles on the side which make me think that some mysterious "cruft" is happening.. I want it to spit out exactly what I say!!

humph, I tried <script>window.location = 'http://where-I-want-to-go'</script>, and I get "Caja does not currently support assigning to .location".. so they're using Caja to "sanitize" my HTML.. who are the protecting here? Me, from myself?

..someone suggested popping up this window, and after it authenticates, calling "close". Let's give it a try..

..and now "ignoring window.close(…). ". Great. So secure. And what is this "Sandbox mode: EMULATED". Why am I in a sandbox? I don't understand!!

..I can't find any settings related to sandboxes.. maybe it's done with code.. ahh: setSandboxMode(HtmlService.SandboxMode.NATIVE) .. let's give it a try.. nope.. still "ignores" it. Maybe it's because it's in a tab?.. nope..

..ok, what if we create a <form action="http://go-here"/> and call submit on that.. hm.. didn't seem to work.. I wonder if it will even let the user submit the form.. nope! it adds onsubmit="return false" to the form.. can I even let the user click a link? nope.. oh, wait, I used "src" instead of "href".. ok, I can click it manually, but clicking it programmatically doesn't seem to work "Object [object Object] has no method 'click' ".

hum.. hum..

..what if I load the target webpage in an iframe, and then have the iframe "bust out" to be the main window.. nope.. iframes are not supported..

ugg.. so much wasted time trying to do something that should be simple, but has been made deliberate obtuse by someone in the name of "security"..

ok, hacking the redirect seems hard — it seems like google doesn't want to allow redirects — so how about we try checking to see if the ajax call is succeeding. We could wait a certain amount of time, but it could actually take a while to grab the e-mails, so maybe we could make a special API that just returns right away, and put a timer on that.. and even if it does return after the timer, it will just mean that the user is sent away to go authenticate when they didn't really need to, and hopefully that will be rare..

oh shoot, I forgot, I need the authentication page thing so it can set a token, and hand it back to github.io, to protect against malicious jsonp use.. arggggg!!

ok, maybe I can save the token in a cookie, or localStorage, and use the new special API to verify that the token is correct..

hum de dum.. ok, I think this strategy will work-ish.. now we just need to incrementally add a few things on the pima side and the google script side until it grabs emails the way I want..

2/23/14

regret

I like to think that I don't regret things, but I do. In principle, I tend to think that regret doesn't make sense, since I don't believe in freewill, so I don't think I "could have" done things differently.

Nevertheless, I do feel regret — I have the feeling of wishing I had done things differently.

Here are some of my biggest regrets:

  • I went to Scotland for a bachelors party that I was accidentally emailed about, because my email was similar to the groom's email. I've been meaning to put that story on this blog. It is where the name "real gl" comes from. Anyway, the regret is: I didn't go to the wedding in Ireland.
  • I hired a Ukrainian singer to sing some songs I had written, and I felt she did an incredible job, and we started talking on skype. I had an opportunity to fly to Kiev and meet her, and I regret not doing so.
  • I regret not going with my friends today to see an active lava flow.

2/20/14

just read something on "goals" vs "roles".. an interesting notion.. "roles" do have the nice property that they aren't achieved, and then require a new one to replace them..

2/19/14


..in the 80/20 spirit, here's a doodle..

80/20 rule

a friend got me thinking about the 80/20 rule recently, and I was thinking about it with relation to art.. I'd love to see people posting/exchanging art that's 80% done — and more of it.


apparently suggesting faces out of plants is a thing

2/18/14

a couple notes:

  • I heard the concept of "social translucence", which I hadn't heard before. An analogy that explained it for me was a door with a window in it — when a door has a window in it, you feel more comfortable opening it without worrying that you'll hit someone on the other side, since you can see if they are there or not. Email is not very "socially translucent" for me, since I have to say quite a few things before getting any feedback about how the other person is reacting, so it takes a long time to write an email.
  • I'm increasingly convinced that one-on-one mentoring is awesome, and a really good way to spread certain kinds of ideas, like ways of thinking about things, that are difficult to express in, say, a book. I felt like my friend was mentoring me about how to express myself, and I feel like I learned much more in that brief interaction than I have in hearing about self expression in general over the course of my life, in large part because it was interactive — I danced — and some of the learning could only happen by engaging in the activity, but with someone there that I could ask questions of in real-time about my concerns, and to say things like "reach as high as you can", and also suggested that we spend some time "screaming", to break down barriers of vocal expression.
when birds walk, they move their head forward and back, and it always seemed strange, but I was looking at some birds doing it, and I recalled some video of a chicken where someone was moving the chicken, but it's head was staying in place, and I watched the birds, and they pushed their head forward when they walked, but then it stayed in the same place as they moved their bodies forward.

pop culture

so, the guy I mentioned in the previous post and I both like pop music,
and another friend didn't,
and we had a discussion about pop music, or pop culture in general,

and a few interesting things came out:

I have an emotional connection with some pop songs,
and if someone else also has an emotional connection with the same song,
then emotional bonding can take place over the song — just like I imagine it would happen talking about sports, if two people happened to like the same sport,

And I could have an emotional connection with some indie song — which might be arguably, in some people's minds, "higher art" than pop — and I do have such connections with many indie songs, but I very rarely meet anyone who has heard any of them, much less emotionally connected with them,

so.. maybe this makes pop culture useful for meeting people quickly and building an emotional bond to serve as a foundation to talk about deeper stuff..

self expression

I was talking with a gay friend in the co-living group I'm in for the month,
and he had mentioned some of his experience "coming out" as gay when he was young,

and so I told him that I was having some trouble "coming out",
not as gay, but.. being more expressive in general..
and I am a pretty effeminate male,
and I mentioned that I was wearing some polar bear pajamas,
and that I would tell people they were just what was available at the thrift store,
but really, they were as expressive as I thought I could get away with,
and if I could, I would wear My Little Pony pajamas. Which is true.

and he asked me to name a couple flamboyant pop songs that I like,
already knowing that I like pop,
because we had sung together on a previous evening,

and I said "Tik Tok" and "We Can't Stop",
which he put on,
and then suggested we dance,

which was totally awkward for me. I've danced before, alone, and I actually love dancing, alone, but I was extremely uncomfortable dancing with him, but I voiced those concerns, and he did a fantastic job reassuring me that he didn't care..

and I had a thought about "self expression".
I usually think of "self expression" as someone expressing themselves to other people,
but another way of thinking of it is: expressing myself to myself.
That is, when I dance, even with other people, I — my slow thinking / system II / left brain / whatever — is watching another part of myself dance, and learning from that through the experience itself.

and I am increasingly convinced that at least a major part of the "drug experience", at least for me, is seeing that expressive side of myself, since the drug lowers my inhibitions — and somehow alcohol doesn't do it for me, perhaps because it makes me so tired that I'm not having meta thoughts about the experience of being drunk..

..which also means that I'm increasingly convinced that the "drug experience" can be reproduced without drugs, by "expressing myself", and I've had some success testing this, including today with this dancing thing.. and maybe there's more to it, but the self-expression thing is definitely there, and I feel like I want to understand it first before trying to assess whether there's something else as well — so, more self expression is in store, more pushing my boundaries, and possibly overshooting and offending people, but the benefit of being self expressive — of knowing the things that my fast thinking / system I / right brain / whatever wants to tell me — seems.. good. I think I'll be able to think better, and probably also feel less depressed.

bridging?

I feel like I'm connecting better with myself,
but I wonder if I'm just catching up to other people..

I feel like I'm a pretty conservative, risk-averse, repressed person..
and not everyone is..

so I wonder if that repression has caused my mind to feel like two "people",
and only now is that repressed side making a big push to "come out"..

notes

so, deviantART seems like a potential solution to the google image search problem, and they even have a nice api, though I think I actually like google's search results better. Here's google's results for "interesting art" versus deviantART's results for "interesting":

google images for "interesting art"

deviantART images for "interesting"

hm.. thinking about synchronization timing issues is much easier drawing lines for time, and dots for events, even if they're just in my imagination. I think I'm finally happy with my understanding of how pima's dropbox synchronization code will look.

huh, this person can create a face with a realistic branch looking thing better than I can create a face at all:

2/17/14


huh, while uploading this image, I saw google's upload slider move backwards as I changed my wifi connection :)

anyway, this is a google search for "yellow art". I like putting on a song that I like, viewing some art, and letting my mind start to make connections and form a meaningful story.

Google image search is pretty great, but I want an even better service, that keeps out bad art, or images with watermarks.. perhaps when people click to enlarge images, that can act as a "vote" for those images as being better art..

bridging model update

old theory: part B is a separate sentient entity inside my head
new theory: part B is experienced as "me", but has some continuity of thought not shared with part A, e.g., a partially separate sense of "self"

old theory: part B communicates with part A through interpretive pattern matching
new theory: part B experiences its own thoughts as interpretive pattern matching

old theory: part B is processing all the time, and wants to share it's thoughts with part A
new theory: part B isn't processing all the time, and wants to get more time-share of attention

thoughts on feelings of transcendence
  • perhaps the feeling of becoming self aware is a feeling of transcendence
  • perhaps self awareness requires seeing patterns of one's own thoughts, which requires:
    • enough working memory to see patterns
    • enough "play" time to spend looking for such patterns
  • perhaps self awareness is easy for part A, since it has a lot of working memory, and happens at an early age, but hard for part B because it has little working memory, and:
    • it is usually used in short bursts, and doesn't have enough working memory to recall what it did in previous bursts
    • if it is used in a longer burst, like mulling over a problem, it doesn't have enough "play" time to waste examining it's own thought patterns
  • perhaps prayer, meditation or drugs can provide enough contiguous play time for part B to see itself operate, and hence induce a transcendent-feeling "aha!" moment, which can be interpreted in many ways, like hearing God, or feeling connected with a new-age Source, etc..

thoughts on people talking a lot, or writing or drawing as they think
  • when a brain is in part-B-mode, and wants to have deeper/longer thoughts, perhaps it makes up for having little working memory by saying or writing or drawing what it thinks as it thinks it, so that it can hear or see it a moment from now, and have a greater chance of remaining "on track"
  • it seems useful for a part-B-mode-brain to say things to another person so that it not only hears itself say the thought, but also may get to hear the other person repeat the thought back a bit later, like being able to look further back in one's notes

living on the edge






figure from http://arxiv.org/pdf/1401.1219v1.pdf ..


That black spot is a blister filled with blood. The blood has dried, and I'm told it will be reabsorbed by my body.

Incidentally, if one happened to be trying to smoke pot with a lighter, and they weren't good with lighters, and repeated lighting attempts had caused a blister on their thumb, and they then managed to get high right at the exact moment that the blister on their thumb started filling with blood, it might be scary and disconcerting if such a one had never had a blister fill with blood before, and didn't know whether it required medical attention or not.

It doesn't require medical attention, it turns out.. at least this one didn't.

note to self: in javascript, 1 is greater than null, but not greater than undefined

2/16/14

Dropbox, thank you!!!

Man, I sorely wanted the ability to upload a new version of a file, but only have it overrwrite the previous version if the previous version was the one I thought, as opposed to someone else having put a newer version there between when I read the file and now.

And it didn't seem like they had it. The writeFile method had a lastVersionTag option that it just said was "used for conflict resolution", but I wasn't sure what that meant, and I should have tried it out, but I assumed the net result was successfully overwriting the file.

But I discovered, from the documentation for a non-JavaScript version of the API, that if the lastVersionTag didn't match, dropbox would NOT overwrite the file, but rather add the uploaded file to the same directory as a conflicted version.

Anyway, yay! I'm so happy.. I almost resorted to writing code that could have lost data, after writing code that was sure to not lose data, but involved creating a "lock" file, and was slow, complicated, probably buggy, and vulnerable to either a slight chance of deadlock or a slight chance of inconsistency.. all my options seemed dirty and complicated.

2/15/14

bridging

I tend to think of my mind in two parts: A and B, and I usually think of myself as A, and I think of my subconscious as B.

This distinction is roughly the same as when people talk about things like: left brain vs right brain, or thinking slow vs fast, or thinking logically vs intuitively.

New Theory
  • whereas I usually think of part A as sentient, and part B as a sort of helpful external processor, maybe part B is also sentient.
  • whereas some messages from part B are essentially solutions to real world problems, like which project should I work on? hm.. that one "seems good", where the sense of "seeming good" is the form of the answer from part B — maybe some messages from part B are essentially saying "Hey! part A! I'm not 'unconscious' in the way you think, I'm intelligent, and I want to talk and be heard and such! Let's chat!"

Channel of Communication
maybe the only way part B can communication is through recognizing patterns in raw sensory inputs, like seeing faces in clouds, and maybe the channel of communication is increased with the following:
  • high ratio of ambiguous sensory input to literal input, i.e. "open to interpretation", like: vs 
    • ..where this high ratio can also be achieved by relaxing in a quite place with eyes closed, such that the dominant sensory inputs are random static from the body, eyes and ears.
    • ..ratio can also be increased by increasing modalities of input, like looking at ambiguous visual art while listening to ambiguous music
    • ..ratio can also be increased by being in an environment with a wide selection of inputs, so if the mind isn't finding good patterns in one place, with a simple turn of the head, it can search for patterns somewhere else, or find patterns between images and other things in the environment
    • ..ratio can also be increased by looking at inputs that have lots of details at different levels, like fractals, and nature, as more fodder for the mind to find patterns
  • relax, seems helpful for allowing for the next two things:
  • focus, e.g. keep looking in the same place for a while, giving part B time to find patterns that communicate the message it wants to convey
  • open, non-judgmental attitude, since the patterns found by part B will be strange, and will interpret scenes in unusual ways, and it will be easy to reject these interpretations as "not what's actually there"
  • "listening", which is sort of the opposite of judging.. actively trying to hear what part B has to say.. I think some religious people may call this "faith", an expectation that a message will present itself, because it's so easy for part A to sort of put a message somewhere that wasn't generated by part B.

Thoughts
  • all these activities seem to increase the medium of communication with part B:
    • viewing art, hearing music
    • being in nature
    • meditation
    • prayer
    • psychedelic drugs — increased focus, lower inhibitions/judgment
    • dreaming / lucid dreaming
    • hypnosis — though part B's message may not be heard, since the hypnotist will be sort of telling part B what to say
    • religious gatherings or motivational speakers — similar to hypnosis, can open communication channel, but because part B can only communicate by interpreting the raw inputs available, the preacher or speaker can manipulate those inputs to influence the interpretation by part A about what's going on
  • maybe when people say these things, they're actually hearing part B:
    • "this art speaks to me"
    • "I prayed, and God spoke to my heart"
    • "I meditated, and I could see a deeper connection between things"
    • "when I looked at the grand canyon, I was struck with a sense of awe"
    • "when I heard that song while high, I felt like it was speaking directly to ME!"
  • maybe the "hole in the soul" I've felt, described here, is part B wanting to be acknowledged, and this hole was filled with religion, because part B could masquerade as God, but was left empty when I left religion, because I no longer acknowledge part B as an entity, but rather as a tool

Misinterpretations
If this theory is true, I could see it being misinterpreted in these ways:
  • notion of God
    • maybe part B just wants to be heard, but doesn't mind being thought of as external to the mind
  • super-natural theories, astrology, psychics, conspiracy theories, etc:
    • since part B is "only human", it can be wrong
    • since part B can only communicate through patterns matched on raw inputs, its messages are open to misinterpretation by part A, and are influenced by the available raw inputs
    • since the sense of truth itself is a feeling, it can be generated by part B as a pattern matched on inputs, where part B might invoke the feeling as part of a message, not to be taken literally, or just in a wrong place that it thought was right

Consistent Interpretations
If this theory is true, it seems consistent with these other ways of saying it:
  • "you need to let lose and express yourself" — this may be literally true: part B can only communicate and express itself when I "let lose" in the sense of relaxing and opening my mind, and it very much wants to express itself, meaning that if I don't do it, part B will be unhappy and trapped, and may generate feelings of depression
  • "you need to love yourself before you can love others" — maybe part B wants to be heard and acknowledged and before that is done, most input will essentially be translated as "hey, I'm this other part of yourself, pay attention to me!"
  • "I'm trying to find myself" — usually when someone says this, they don't know quite what they mean, at least I didn't, but according to this theory, it's pretty literal, I need to discover that there's another me inside my brain that wants to be acknowledged as an entity and acknowledge it.
  • notion of "living in the now" and "stop and smell the roses" — maybe part B doesn't have memory the same way, where its "memory" is algorithms for solving problems that we might call "understanding" or "intuition", so it's only possible to really "hear" part B in the current moment, and it helps to "stop and smell the roses" to give part B sensory input to pattern-match on top of as a means of communication with part A.

Conclusion

There may literally be another sentient entity within our brains that we don't realize is there, and that wants to be acknowledged and communicated with.

2/12/14

Working on putting pima online so I can access it from my phone. Discovered the Dropbox API, which is accessible from JavaScript — this is very cool — I think it will allow a number of things I've had in mind that require storing data, but I've been worried that people won't trust storing their data with me, since my server might die.

Current issue with Dropbox API is concurrency.. in general I probably won't modify pima from my computer and phone simultaneously, but if I did, I wouldn't want to risk losing any data.. but I'm not sure how to do it elegantly. I'm currently creating a lock file, and the whole operation requires about 6 ajax calls when it should be about 1 or 2..

2/11/14

I tried to find some new music. Usually I take a recommendation from last.fm and try to listen to the whole cd. But not this time. This time, I would listen to one song, or maybe less, and kept going through bands until I found something new that I liked:

Haim!


through the fire and through the flames
you won't even say your name
only I am that I am

but who could ever live that way?

~vampire weekend

2/6/14

thinking through some discussion questions from a friend on right, and thinking through my pima todo items on left

listing todo items by what desires they satisfy, and trying to figure out what I'm stuck on for different todo items. doodles around.

I didn't draw this — a friend drew it. He was teaching me to draw. This was a while ago, at Thanksgiving time.

2/5/14

note about hypnosis: I wonder if I have managed to hypnotise myself, but didn't recognize it.. I've been in a state where my body is going along with suggestions, but my mind knows what's going on, for instance, I tried once to suggest that I wanted to pick up a tennis ball, but couldn't see it, and I did walk around "looking" for the tennis ball, but I could see where it was, and I figured I was just pretending to look around (which I was, in a sense, because I could also stop if I wanted to, and I know that because I did stop at some point thinking I had failed to hypnotise myself because, although I could pretend to walk around trying to find it, I could see it).

But this has happened a number of times, and it is, in some sense, easier in this state for my body to pretend to do whatever is suggested.. and it would also be consistent with what I've seen in hypnosis shows, because all I'm seeing is what people's bodies are doing, not what they themselves are thinking about it, and talking to people, I feel like most people say they were just going along with it for fun, but that they weren't "out of it"..

hm..

a friend's description of the essence of awakening: recognizing that whatever I'm thinking now isn't the final word
note to self: the thing I want to know about the elliptic curve public-key cryptography used in bitcoin is: can you do the same thing with the public key that you can do with RSA, namely, encrypt something such that only the person with the private key can decrypt it? It seems like no, since the public key for bitcoin is essentially just a hash of the private key, rather than a number with a special mathematical relationship to the private key..

notes

I worry about being evil → what is the correct ethic? → what do I want? → when I think I want to be "good", what I really want is respect from people around me (this desire for social approval seems hard-wired), and also not to be punished by having various desires taken away..

I identified various desires, most of which are standard, but a few new things for me:

  • the idea that different desires have different extents for pleasure and pain, for instance, the desire for air ranges from extremely uncomfortable if I don't have it, to essentially neutral if I do, whereas the desire for sex ranges from a little uncomfortable (though persistent) if I don't have it, to extremely pleasurable if I do have it.
  • sights and sounds in themselves can be somewhat pleasurable, but they can be extremely pleasurable in the form of art and music, but that pleasure seems to tap into other things, beyond the pleasure intrinsic to the sight or sound
  • I'm not sure what the raw desires around learning and progress are, but I think two of them are: 1) a desire to realize things I imagine, and 2) a desire to get new input to process
I've been trying a meditation where I try to clear my mind and simply count my breaths. However, thoughts often intrude, but these thoughts are often good, which is why I'm distracted from counting my breaths, so I'm using this as a technique to think.. I'll try to clear my mind until the next idea presents itself, and then I write that down.

2/4/14

notes:

learning about bitcoin. reading the protocol, I see that "double-SHA-256" is used.. what does that mean? they give an example, of double hashing "hello".. ahh, I can reproduce what they're showing with:

console.log(require('crypto').createHash('sha256').update('hello').digest('hex'))

console.log(require('crypto').createHash('sha256').update(require('crypto').createHash('sha256').update('hello').digest('binary')).digest('hex'))

..note that the second line has a digest('binary') in there instead of a digest('hex').

..hm.. bitcoin uses elliptic curve public-key cryptography.. reading a bit about that.. I don't understand it yet, but I think I'm going to bed..
notes:

I've tried playing poker on seals with clubs, which is bitcoin based. Now I'm cashing out, sending the money to Coinbase, to a bitcoin address that I generated for that sole purpose. The whole bitcoin thing seems pretty cool — it's just easy to move money around. I'm excited for the digital currency future.. though I do wish I understood how to price bitcoins, since they have no intrinsic value at all.

Speaking of moving money, I was going to move my stock portfolio out of the online broker that I have, which got bought out by another online broker, and has the worst password entry thing I've seen: it requires me to enter my password with an onscreen keyboard. But, stocks apparently did poorly today, so I feel like I'm "selling low"..

Hm.. I've got some sort of thing on my lip. I'm afraid it might be a cold sore. I wish I had the online medical diagnosis thing to tell me.


2/3/14

notes:

working on taxes, just to get the W2 forms out of my inbox. I bought stock options and got a form 3921 which I don't know where to enter into TurboTax. They have an answer to this, but the interface seems to have changed since that answer was posted. I'm waiting to chat with someone, but all their agents are busy, which surprises me, since who on earth would be doing their taxes this early?

I want to improve the xkcd-style password thing I made here: first, I want a better list of words. I got the words from here, which claim to be "common" words, but the second word is "abyssinian", which I claim is not common.. also, I thought there were about 5000 words, but there are less than half that many. What I want is a list of at least 5000 really common words, like "red" and "hat". Also, I want an image for each word, so it can show a sequence of images as a helper for remembering the password.

hm.. there's no indication on the Turbo Tax "Chat with a Pro" thing that I'm in a queue. It just says "Welcome to Intuit! All agents are busy assisting other customers." Where's the "we'll be with you as soon as possible, current estimated wait time is x minutes?" .. ok, they answered me.. turns out I need to switch back to a previous version of the interface, and also upgrade to "premier".

man, after entering the form 3921, my expected tax refund went from something over $2000 to me owing them money.. I thought I had done the calculation beforehand, but it looks like I calculated wrong. alas.

I feel like truths are often wrapped in greater truths that say the opposite thing.

reverse economy

we usually think of spending our own money coming up with some idea or piece of art, and then we want to own the idea or art with a patent or copyright and get money from it going into the future.

however, the game mechanics of this approach are weird, since ideas and artistic imagery are not limited resources — they can be copied easily — so we need to go through great lengths to arbitrarily limit how people use them with laws and lawsuits.

also, we lose out on all the creative mixing that could happen if all intellectual property were public domain.

so, I fancy the idea of a reverse model, like kickstarter, where people ask for money in advance to create ideas or art, and then it becomes public domain.

But how would people know who to fund?

we have this problem anyway. I said idea generators and artists spend their own money, but they usually don't actually — they get funding from a company or publisher who believes they will make something good, and plans to own and sell their work, and these sources of funding need to assess who they think will make something good.

the answer is, idea generators and artists are generally evaluated on work they've done in the past, and if you go back far enough, they're evaluated on stuff they did for free, usually during school, for the specific purpose of putting in their resume portfolio.

anyway, there are other issues with other answers and so forth, but I'm going to bed
I've been thinking a bit about high level goals to push for. Here are a couple ideas that come to mind:

  • microtransactions — I think this would allow people to make money on the internet without ads, which would be good in itself, reducing mental pollution, but would also allow services that don't lend themselves to ads, like stuff where people need to concentrate, since those aren't good times to show people ads.
  • online automated medical diagnosis — I think we could build AI systems for diagnosing people that would work really well, probably better than doctors (though the near-term would be limited by cases that require looking at stuff, but even that seems doable now given the success of the NYU image classifier thing where people could upload a picture of their rash or whatnot). I feel like this is mainly hampered by legal issues, not by technology.
I just had a philosophical conversation with someone about good and bad and such. Roughly speaking, they believe in absolute good and bad, and I don't. The understanding at the end of the conversation was roughly: we both believe that there is a sort of direction that life in the universe is heading, and the main difference is that he calls that "good", and I don't, and we both believe we get benefit from calling it good or not — the benefit that he gets from calling it "good" is a sort of motivation to do stuff that pushes in that direction, and the benefit that I get from not calling it "good" is essentially an easing of responsibility and guilt for not always going in that direction, which kinda seems bad, but the useful part of it is that it allows me to look at myself more realistically and objectively, because if I believed in "good", then I'd be fearful of the parts of me that weren't, and may be afraid to even admit to myself that those parts are there.

2/2/14

red and green

notes:

a friend pointed me at this article talking about redgreen and blueyellow.. the idea involves opponent process theory, with opponent processes between red and green, and between blue and yellow. I've been skeptical of it since an incident in high school where my psycology teacher was telling us how opponent process theory explained after images, like looking at a red square for a while, and then looking at a white background and seeing a green after image, but I tried this with my family, and everyone saw a cyan after image (I had a green and cyan box nearby for comparison), so I figured the theory was bunk.

but, I hear that they've actually identified neurons that do in-fact do the opponent process thing in other animals that see color similar to how we do. And I've also heard that after images are not evidence for the theory anyway — that is, after images are explained by cones getting tired, and not by opponent process theory. The evidence that's meant to be in favor of opponent process theory is that yellow looks like a different color than red or green, rather than a mix of the two. I sortof figured it was cultural, and thought color golf would help me see yellow as a mix of red and green, and actually, I feel like it did, though my friend thinks I just convinced myself that it did, which may be true..

here's a gradient from red to green:


..and, well.. it looks like a gradient from red to green to me, with the color in the middle being redgreen (a dull yellow). A full-brightness yellow does not appear on a linear interpolation between red and green, instead, each color is at half-brightness..

anyway, despite this, I figured I'd try staring at some red and green stripes like those described in the experiment:


..I tried a number of variations of this, adjusting the level of green to be the same brightness as the red (since green is a brighter color), and also trying a checkerboard pattern, but I don't think I saw a new color. I also tried a red and green square next to each other, and then looking past the image so the squares overlapped, so one eye was seeing green and the other red:


..in this case, I feel like I see one color or the other — the color I see switches as I stare — but they don't seem to "mix"..

anyway.. the actual experiment seems to involve an eye tracker, which I don't have, so I'm still willing for there to be a new color, and I would love to see a new color if there is one to be seen, but I'm skeptical..

idea: if I did want to pursue ideas that require lots of people, try to get a mailing list together.. or maybe there is already a community for this?

yesterday


  • first time going to clothing optional beach — opted to keep clothes on
  • first time going to the The Rocky Horror Picture Show — first time in drag — my sister has always said Tim Curry has a big mouth, and I don't think she's even seen this movie