Monday, October 21, 2013

just a RANT: The world is not sequential. ACID is nice to have, baby.

DISCLAIMER: Sorry, there is no content on ACID here.

I love the Erlang programming language.
It is a kind of functional programming language, but it is not the reason why I love it.

It is based on communication. That's real. So I love it.

'Lazy evaluation' is a bad conception, I think.
An evaluation is a transaction between a caller and  a callee.
In Quantum Physics, 'entangled state of quantum model' is encapsulated most of the case.

Non-deterministic logic is hard to implement (easy to make a permutational / combinational explosion).

Functional language also have same weak point in pattern matching / search trees.

So, real power in Erlang is to make enoumerous number of process(agent)s and support their overwhelming scale of communicaiton.
The magic is there in the simpleness of messages and actions.

Each message goes to requester.
Requester wants messages which he can process only.
The reasons to separate message and process are,
1) scalability
2) parallelism
3) thin connection API

Call tree is just a tree. Not so flexible structure than N x M producer/consumer model.


Now I need more flexibility than N x M connection mesh, especially in time dimension. But extending that way is rather easy for me with Erlang. That is the most important feature for me, right now.

Friday, October 4, 2013

A loop is not a data-structure, but a phenomenon, stupid!

I've lost my way to whether Loop shall be a class or such-a-name of phenomenon.
To track loops are copied, joined, paraphrased, and deleted etc., I need a Class (of Java) or such a programming jargon.
But it would do harm to (the (ability|performance)  to emulate the virtual machine of INTELLIGENCE. | clarity of model).

Loop is not bound by a priori structure. Vivid and lively sequence of firing of synapses are stuck in some limit-cycle or attracted in some patterns, we just say 'I found a loop'.
So I need some criteria to call something as 'loop'.

Here is my idea on API.

Criterion:
Network.isLoop(time-coverage t, place-coverage p) : Network object instance method

Matching:
metric-type Network.similar(Network.coverage a, Network.coverage b): Network Class static method

Copy (Dup?):
void Network.map(Network.coverage c): Network object instance method

for Join (concatenate),  Divide, Connect, Merge, Overlap, Head, Tail, Cur, Cdr can be given if Loop is just a sequence of objects as Lisp. But I want to see how a loop is established, long-run, diminished,, the dynamics of it.
Dynamics and structure of (dynamic and plastic) network is the key, I think.

So, I need to see the very moment of 'birth of the loop', in various type of network model.

Syntax rules the world

If it were loops (echo chamber memorization system) are storage system of brain (or Virtual machine of brain), syntax of spoken sentence would affect the structure of loop.

+ a b
a b +
I love you
WATASHI wa ANATA wo AISURU

loop could be rehearsed as sound 'sequence'.

There is another problem.
How to 'match' each sequence (loop).
Pattern matching? meaning equality?

Anyway, 'translation' can be 'memorization of matching between some loops'.

loop of translation : 'the fact loop A = loop B' to memorize
Thus, yet another loop 'A = B' 

How to match 'partially'?
A B +
C D +
How to detect some compatibility between above loops?

Matching of '+'?

If syntax is not compatible, hard to detect?
(in this case 'containing' matching)
A B +
A + B

Note: Matching problem can be the problem of 'definition of distance'.

Element of loop may be matched.

'+' would be the very popular and significant element (loop) in arithmetic context.
Thus '+' and both loops('A B +' and 'A + B') could be connected and compiled yet another loop.

////

I/O system may affect loop system

Handwriting, Typing keyboard, Speak directly your idea, Thin in mind, etc.
may affect loop construction.

loop is memory of sequence.
Mixture of thinking (loop rehearsal) and IO (body movement) are compiled the loop.

Visual image, music, smell of environment etc. also compiled (make linkages to each element:loop).

Thursday, October 3, 2013

imagine there is no OS, nor DataCenter

no center: P2P (Mob to Mob)
multiplexed, and democratic consensus based decision,
dynamic, random, and stochastic networked,
computing.

maybe encrypted, but if the data is scattered in random pattern with timestamp and window offset, and processed at very high-speed, and in very fat volume,
there would be no decryption scheme to rival.

No OS: no specific boundary other than working sets.
There only are computation units, Data and Recipe.
Data calls process, or wait for in queue.

No architecture on backend. Just API.
Just Virtual Queues and Virtual Coolies there.
Queues are multiplexed and Issuer satisfied by one result. one after another (and even better) result may come later, but first one clears queue. (ticket maybe 2-part, recipe and return address/answer space to call contentment checker)

Tuesday, October 1, 2013

Chorus of loops: how to hear my thoughts

Loops are murmuring random song in random rhythm.  Some are the same, and others are completely different.

When it becomes to a "Chorus" by some group of loops, it comes to 'my mind' and make me move... isn't it?

I wondered how to pickup special loop from the sea of them. But, no one choose, the loudest group can be heard.
How to be louder? Sync with someone like you.

Loops are stored and repeat its song endlessly/randomly  in the long-term storage: Frontal lobe.
But when some of them sync in Chorus, it sounds loud and clear and attract more synchronous peer.

The 'Sound' of Chorus of loops may affect my sensor-connected part of brain like Scenery from my eyes or Music from my ears.
... is it a DREAM?

Chorus of loops may not be heard as the real sound, but memories of sound.
Loop pattern may be constructed chain of other loops.

Chorus of loops can be 'memorized' as another loop. It may differ from original one (some member of Chorus) or mean value of them.

Items of loop may be visual memory, and others may be audible memory.
Then, Chorus memorization process may cause some error to change type of memory. (coded value nearly the same,, but type bit is wrong,,etc.) 
In such a case, visual / audio /smell context may be mixed. I believe some part of my memories are such a mixture/mutation of loop-chains.

Monday, September 30, 2013

A virtual machine of Thinking

Unfortunately, I have nothing innovative findings on human brain.
But I have some ideas on architecture of (yet another) Thinking.

Here are some thoughts on how Virtual Machines work.

Thinking maybe implemented countless echos of event-loops and kinetic-I/O for human(or yet another intelligent object) body.

Loops and kinetic-I/O connection are dynamic, stochastic and in some degree repeatable.

In this model, the sense of self consciousness is a series of Loop-rehearsal.

Loop subjective view :

 loop gets access to kinetic-I/O

Kinetic-system subjective view:

 some condition of kinetic-system and loop variance choose some (always roaring) loops.

The group of loops is activated (adopted to kinetic-I/O to control behaviour of body, and other loops to activate).

Loop is a series of operation to change kinetic-system and signal some other synapses and activate/de-activate other loops.

So, I'd like to design loop-VM.

To descrive how 'act', I used the model of interaction between kinetic-system and pool of loops. Which is inspired by human-body and cerebellum-nerve system (older part of human brain to control body dynamics).
But, at some point, loop-loop interaction can be emerged, I guess.

loop-loop interaction and self ignition mechanism is my next target.
But I have no clear idea for now.

Sunday, September 22, 2013

resemblance means neighborhood

thinking about the concept of distance...

In a sea of dynamic balance,
resemblance means neighborhood.

Like text search inverted-indices. resemblance is neighborhood.

In neighborhood each (virtual) synapse affects others, vice versa.

Synapses affects neighborhood, in some sense. (But is there any 'environmental factor' other than synapse, while you are thinking about behavior of synapse connection dynamism? )


Tuesday, September 10, 2013

random, dynamic and plastic network is my tool to seek the number 42

hopefully, I'll post some articles on some networks which are
random,
dynamic,
plasitic,
stochastic.

For randomness of network, I have such an idea like this.

Here are 2 agents 'A' and 'B', and 1 key-value database.

'A' puts some data to the database.
'B' gets the data from the database.

The relationship of 'put'-'get' for 'A' and 'B' can be a 'network'.

When so many agents are out there, 'put'-'get' relation (network linkage) would not be stable. Sometime 'A' puts, and 'C' gets. or 'B' gets again.

If 'A'-'B' linkage were stable, there would be some reason.
1) 'A' and 'B' share almost same timing of 'get', 'put' operation.
2) Only 'A' and 'B' are connected the same database.
Then, I'd like to define 'distance' or 'closeness' on the "network" of 'A' and 'B' nodes.
For 1) case, time dimension may be used to measure the 'distance'.
For 2) case, connection (physical distance) may be used to measure the 'distance'.

So, I modeled some "random" network and distance (inverse of linkage strong).
Then I'd like to expand them to the limit.

Thursday, August 22, 2013

tangled in PowerShell scripts

Recently bogged some Windows Power shell codes.
It does following batch jobs according to the file list on AWS S3 storage. To make the list, I've modified a sample code of AWS S3 Java SDK.
  1. invoke Java code (slightly modified AWS S3 Java SDK sample, too) which downloads netsh-made network trace log file which zipped in .cab or .gz format from AWS S3
  2. unzip .cab or zipped trace file,
  3. invoke Microsoft Network Monitor 3.4 with command line options to extract KerberosV5 specific packets and save to another network trace file
  4. invoke Network Monitor again to extract more detail KerberosV5 error packets, and saved its counts to 'YYYYMMDD-HH-krb-err-ERRTYPE.txt' file. This process is iterated for each ERRTYPE.
Most of difficulties come from PowerShell specific features to handle command pipeline and asynchronous unzip process execution. Later on, I may have time to describe details of them.

bye for now.

Monday, January 14, 2013

donno why .bash_login is not used in OSX 10.8

So, I made a tweak. Please don't repeat after me. There shall be better way.

Here is my .bash_profile fragment.

ppid=`ps l $$ | awk '$3 ~ /[0-9]+/{print $3}'`
isloginshell=`ps l $ppid | awk '$13 ~ /login/{print $13}'`
if [ "$isloginshell" != "" ]
then
  /usr/bin/script ~/worklogs/`/bin/date +%Y%m%d-%H%M`.$$.console.log
fi