December 11, 2011

dot xsession for laptop with two external monitors

Hi,

Docked laptop configuration with two headed card need to:
- rearrange outputs using xrandr
- start power manager and screensaver
- set secondary kayboard and modify kaymap
- start windows manager

All this can be done from xsession configuration only iff `gdm3' deactivated on startup.



$ cat .xsession

xrandr --output LVDS1 --off
xrandr --output DVI1 --auto --rotate normal --pos 0x0 --output VGA1 --auto --rotate normal --left-of DVI1

#if [ -x /usr/bin/nm-applet ] ; then
#   nm-applet --sm-disable &
#fi

gnome-power-manager > /dev/null &

xrdb $HOME/.Xdefaults
xset -b
xhost +
xset r 130
xset r 103


xsetroot -solid midnightblue
xsetroot -cursor_name left_ptr

xscreensaver -no-splash &

setxkbmap -layout us,ru\(phonetic\) -option "grp:alt_shift_toggle,grp_led:scroll"

xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "keysym Caps_Lock = Control_L"
xmodmap -e "add Control = Control_L"


gnome-terminal &
#gnome-session
exec xmonad


October 12, 2011

Launch external editor (VIM) from SlickEdit

Launch external editor (VIM) from SlickEdit: "name_info(','VSARG2_EDITORCTL|VSARG2_READ_ONLY|VSARG2_ICON|VSARG2_REQUIRES_MDI_EDITORCTL|VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_EDITORCTL)
{
external_cmd ( "gvim", "--servername SRC --remote-silent +:" :+ p_line :+ " \"" :+ p_buf_name :+ \" , 0, 0 )
message("Launching " :+ p_buf_name :+ " in VIM...")
}"

'via Blog this'

my edit for emacsclient here

#include "slick.sh"

_command goto_emacs() name_info(','VSARG2_EDITORCTL|VSARG2_READ_ONLY|VSARG2_ICON|VSARG2_REQUIRES_MDI_EDITORCTL|VSARG2_MACRO|VSARG2_MARK|VSARG2_REQUIRES_EDITORCTL)
{
external_cmd ("emacsclient", " -n +" :+ p_line :+ ":" :+ p_col :+ " " :+ p_buf_name , 0, 0 )
message("Launching " :+ p_buf_name :+ " in Emacs...")
}

Enjoy it doing F12; goto_emacs; Edit; CopyPaste; F12 again and finally bind it to shortkeys or use Esc > got_emacs.





June 19, 2011

Graphical notation for Erlang processes

Hi,


Reading Maurice Castro "Towards an Event Modeling Language" ..
I remembered that Umlet has custom components but it was flexible enough to accommodate for Maurice's notation.

I brushed new Palette for Erlang process notation:
- Process definition with StartUp, ProcessLife and Interfaces
- Incarnation with and without link
-Synchronous and Asynchronous message passing 

It doesn't look close to original but feels more modern to me.


  9
  
    com.umlet.element.Class
    
      27
      90
      189
      162
    
    <<gen_server>>
X::erst
{T < 10 min}
--
{M,F,A}
_S=#state{val, another}_
--
/mod:start/0/
/mod:stop/1/
--
Responsibilities
- Coordinator
    
  
  
    com.umlet.element.Relation
    
      18
      234
      170
      63
    
    lt=.>
spawn
    27;45;153;45
  
  
    com.umlet.element.Relation
    
      18
      261
      170
      63
    
    lt=<x.>>>>>
spawn link
m2=1..n

    27;45;153;45
  
  
    com.umlet.element.Relation
    
      18
      306
      170
      63
    
    lt=<-
async msg
    27;45;153;45
  
  
    com.umlet.element.Relation
    
      18
      333
      170
      63
    
    lt=<<-
sync msg
    27;45;153;45
  
  
    com.umlet.element.Note
    
      9
      18
      279
      63
    
    - Process definition with StartUp, 
     ProcessLife and Interfaces
- Incarnation with and without link
- Synchronous and Asynchronous messages
fg=blue
    
  


June 6, 2011

Erlang, Testing and TDD

EUnit Testing gen_fsm – Part 1 | Erlang, Testing and TDD

Nice tutorial. TO support it with 'rebar on console we can use
$ while true; do inotifywait -r -e close_write --exclude ".*_flymake.*" */*.erl; rebar eunit; done

Works on linux.

March 4, 2011

Associative photography

Casual photographer snapshots done like (a) `I spy with my little eye.. ` something; and then putting camera between self ans something and taking a shot. Or (b) pick a subject; put a camera somewhere; imagine stranger come by and look in you camera; adjust; take a shot.

(b) is disassociative. This way impressionists work. You have to walk near their pictures to find that exactly spot where `camera was. (a) is associative method. It is all about creator. If in (b) most work is with light and sometime with color (usually DSLR get it right), going with (a) brings emotions, context and influence of stuff behind focal point to consideration.

It's hard to get `associative right. Nevertheless 8 from 10 images on `flickr taken this way.

March 3, 2011

Continuous Integration Corporate way

Hi,

I can think about differentiation in 9 ways and able to explain it to adult at least in 6 distinkt approaches.
It is because I have degree in physics and master my skills for quite a time.

Curiously, middle management in place where I get my salary, understand continuos integration in software project by reading few books, no hand on experience and not even asking experts (not me).

They did everything wrong in epic way...

Nevertheless I expressed my opinion constructively in requirement document.

This maretial is for internal use only, unless somebody care to know programers view on subject.

Problem with 150 cm fitting 152 size

My daughter is 150 cm height. I brought her trouthers of 152 size.
They did not fit perfectly.
It took her some time to decide how much she have to fold them.
What would your advice?

a) 1 cm
b) 2 cm
c) 4 cm

MurrayHill2011 - Vlad K. - Picasa Web Albums

Hi,


I tripped to NYC in work scope but since there no work happens I enjoyed my time with NYC people.

February 5, 2011

Erlang application file


%%--------------------------------------------------
%% Make directory structure:
%% for i in doc ebin include priv src; do mkdir $i; done
%%--------------------------------------------------
{application, simple_cache,
[{description, "A simple caching system"},
{vsn, "0.1.0"},
{modules, [
sc_app,
sc_sup
]},
{registered, [sc_sup]},
{applications, [kernel, stdlib]},
{mod, {sc_app, []}}
]}.

January 6, 2011

Stack discipline for actor base system

Q. How to traverse tree if processor receive data by querying XML storage one element at a time.
A. Reintroduce stack-discipline and use recursive algorithm as usually.

Stack need to store only variables  which `recursive algorithm would use. In case of XML traverse it is
tuple of (parentIndex, childName, childIndex) which defines any XML node uniquely.

foldActor () {
stack.pop(parentIndex, childName, childIndex) // restore stack

do stuff

push((parentIndex, childName, childIndex)) // push recurse step
}



January 1, 2011

The ENSIME

One more reason to take Scala seriously is port of SLIME.

The ENSIME Blog

I never hacked under SLIME and it make me inferior in some way.

I tried few keystrokes today. It feels great.

I learned Scala just to grasp syntax in one paper on CPS,
today I would do it again just to hack under ENSIME.

Autojump

You need to show it just once your favorite places.

autopilot / autojump




Console 2 and maybe more terminal tabs

Console | Download Console software for free at SourceForge.net

and it will save lots of mouse clicks under Windows.

(*cygwin is not mandatory*)