Every now and then something happens that makes me really think twice about the affects of social networking and the social software that we use so heavily. A guy I know recently attend a funeral and ,although I sincerely give my deepest condolence for his loss, I strongly feel the urge to question his motives for making multiple twitter posts during the event. I understand the thought of twitter, and other (micro)blogging services, being used as an expression of the human experience but isn't there a point where it starts to disconnect you as well?
To tweet something you have to go through a process that requires a lot of attention and focus. You have to take your device, maneuver to the place to post, type up the post (usually the longest part) and submit it. Doing all of that, even if it only takes a minute or two, takes time away from the actual event and situation that you are experiencing.
It is the same reason that many people don't take cameras or video recorders during labor. The time and energy spent on preparing the device, getting everything ready for a shot and taking those shots takes time away from actually experiencing it. It blows my mind to think that in our attention starved society we don't stop and actually do things instead of telling others that we are/will/won't be.
Last night I started an Erlang Twitter client. The module allows you to start a twitter_client process with a username and password and then make Twitter API calls from that process. Implemented API calls include verify_credentials, public_timeline and friends_timeline with more on the way. I'd also like to add API throttling and content caching.
Creating an application release file should be as easy as possible. For the ErlyFlux project I use this little snippet to develop/build/test on my local MacBook Pro and then build/test/deploy on the Debian machine that it runs on. Ideally there are very few differences between the libraries used but in the real world it happens and you have to work around it.
The example below is taken from the fluxhp/src/fluxhp.erl module.
%% @spec build_rel() -> ok
%% @doc Creates a .rel script for the project.
build_rel() ->
{ok, FD} = file:open("fluxhp.rel", [write]),
RootDir = code:root_dir(),
Patterns = [
{RootDir ++ "/", "erts-*"},
{RootDir ++ "/lib/", "kernel-*"},
{RootDir ++ "/lib/", "stdlib-*"},
{RootDir ++ "/lib/", "sasl-*"},
{RootDir ++ "/lib/", "crypto-*"},
{RootDir ++ "/lib/", "inets-*"},
{RootDir ++ "/lib/", "mnesia-*"}
],
[Erts, Kerne, Stdl, Sasl, Cryp, Inet, Mnes] = [begin
[R | _ ] = filelib:wildcard(P, D),
[_ | [Ra] ] = string:tokens(R, "-"),
Ra
end || {D, P} <- Patterns],
RelInfo = {release,
{"fluxhp", fluxhp:version()},
{erts, Erts}, [
{kernel, Kerne},
{stdlib, Stdl},
{sasl, Sasl},
{crypto, Cryp},
{inets, Inet},
{mnesia, Mnes},
{fluxhp, fluxhp:version()}
]
},
io:format(FD, "~p.", [RelInfo]),
file:close(FD),
systools:make_script("fluxhp", [local, {path, ["./ebin"]}, {path, ["./src"]}, {path, ["./src/components"]}]),
ok.
The Makefile has a 'dist' command that executes that function from the command line and prepares the application for deployment.
erl -s make all load -run fluxhp build -run fluxhp build_rel -s init stop
Works like a charm.
I've moved the FluxHP project from Google Code to GitHub. I've also renamed the project to ErlyFlux and it will include the other applications in the same project repos.