Hi everyone... I'm writing this in my advanced text editor app, Nanim. (You 
can get to all of the applications from the "Applications" folder on the 
desktop.) It's supposed to be a hybrid of the best aspects of nano and vim. 
There are many things that you can do in Nanim, and to go through all of 
them now would take several hours of my time. The easiest way to save files 
is just with alt+s. It's like nano because you can just start typing, and 
have your key presses show up on the screen. But there are many things you 
can do as far as selecting text and moving around blocks thereof. It also 
has a table mode which allows for data binding and JSON object creation. 
But again, that would be getting WAY too in depth for this introductory 
post. 

I guess my major motivation is simply that there is so much wasted 
potential in the world because web developers, in general, insist on using 
JavaScript in the most trivial of ways. But it is a wonderful -- some might 
even say, beautiful -- programming language. Doug Crockford has called it 
LISP without all the godawful parens. 

So anyone who has spent any amount of time looking at the theoretical 
underpinnings of the language is fully aware of what is possible, in terms 
of client-side JS applications.  But no one, it seems to me, really wants 
to go "all in" with this idea.  There seems to be some invisible force that 
causes web development to be not quite all that it CAN be. 

Now, with the client-side APIs that are coming fast and furious at us every 
six-weeks with the Chrome release cycle, there is truly no reason to not 
start taking client-side development seriously.  In fact, I would consider 
it a crime not to start programming more like this. 

Okay anyway, back to the good stuff... 

You click on the desktop in order to invoke the System menu at the top.  Go 
to System->Settings.  (You can do this easily by hitting alt+escape and 
then using the arrow keys.)  From the Settings window, you can ask for a 
higher storage quota, customize the dock, and switch between named 
desktops. 

Here are a couple of very useful hotkeys: 
- alt+b to toggle dock hiding, so that you can pop it up when your mouse 
hovers near the bottom 
- ctrl+alt+b to toggle dock disablement, so that it just stays hidden no 
matter where your mouse is. 

(By the way, I have not really done much testing on anything other than a 
pure X11 session in Linux, so I don't really know what other operating 
systems might do with these hotkeys.) 

Now, let's start having some real fun... 

I've only recently started integrating this thing with the backend, which 
is actually just a python script on Google's app engine. It took me quite a 
while to get a basic gameplan for how I wanted the server side to be 
constructed. I settled on the idea of having a basic object called 
"DomainUser", which maps one-to-one with Google user accounts. In order to 
do anything with the backend, you have to click on the logo at the top left 
corner, and then login. When you are logged in, the python script knows 
somehow which google user you are. 

In order to create your own DomainUser object on the back end, you open up 
a trusty terminal and run the command: 

$ adduser <username> 

The username you select is freely chosen, and is basically a stand-in for 
the huge integer that Google uses to permanently identify their users. In 
other words, the username you pick is nothing more than an internal 
reference to your Google id.  And this username is the thing that will 
allow you to give your urdesk.net "address" to people without having them 
to be able to positively identify which Google account it belongs to. 

But in order to actually do anything, you need a SiteUser object, which is 
just a child of DomainUser.  You can think of a DomainUser as being a user 
of the naked domain, urdesk.net, while a SiteUser is a user of some 
subdomain thereof, e.g. www.urdesk.net or dev.urdesk.net or whatever. 

So you only need to create a DomainUser once, and the "adduser" command 
above automatically creates a SiteUser for whatever subdomain you happen to 
be on (which will probably be 'www' for most of you). 

Say you've already created a DomainUser on www.urdesk.net.  Say you now 
type in blahblah.urdesk.net in Chrome's address bar.  You will need to run: 

$ addsiteuser

In order to create a SiteUser object for the subdomain, blahblah.

Say your Google user id us 123456789 (the real one is much longer than 
that).

You will have a DomainUser object with a path that looks like this: 

/DomainUser:123456789

...and you will have two SiteUsers that look like this:

/DomainUser:123456789/SiteUser:www
/DomainUser:123456789/SiteUser:blahblah

(In this convention, the stuff before the colon is the python db.Model 
class name, and the stuff after it is the keyname that is used to identify 
a specific instance of this class.) 

Now, all of the user-centric application level objects exist as SiteUser 
children.  For example, there are Socket and Message classes that 
respectively allow for realtime messaging and email-like messaging. 

You can create a Socket like this:

$ makesocket <socket_name> <num_minutes>

This will create a Socket object that has a token that allows users to push 
realtime messages to other users.  <socket_name> can be anything you want, 
and other users will need to know it in order to contact you. 
 <num_minutes> can be aything up to 24 hour's worth of minutes. 

If the socket has been successfully created, a popup box should alert you. 
 You can then test it out with the command: 

$ ping self

But before I continue, let me just advise you to go to File->"Create 
persistent session" while in the Terminal. This allows you to save the 
command-line history (so that you can use up/down arrows to use commands 
from earlier sessions) and it also saves an ENV object that attaches to the 
terminal window (I will get into ENV some other time). A persistent session 
just means that an icon will be created on the desktop that will allow you 
to reload all of that state. 

You can run the command:

$ sys

To see some of the system-level values that are held internally in ENV. 
After successfully running "makesocket", you should see a bunch of 
key/value pairs that the terminal app uses in order do all of the socket 
creation stuff. 

Back to "ping".  If everything is going okay, you should see a ping delay 
of something around 500 ms or so.  But in order to ping someone else, you 
will need to run the command 

$ ping <username> <socket_name>

This will let you know that the lines of communication are open.  If for 
some reason there is a problem with your connection, the "ping" command 
will timeout after 5000 ms. 

Now, about email-like messaging...  At the moment, the easiest way to send 
a message is by opening TextEdit (in the Applications folder) and then 
hitting ctrl+alt+shift+m in order to toggle messaging mode.  My username is 
Dennis, so you should be able to easily figure out how to send me a message 
(ie, you just need to type "Dennis" in the 'To' field in order to address 
it to me.) 

In order to retrieve meta-information about the messages that have been 
sent to you, just run: 

$ getmessages

The response will be the number of new messages that are available to view. 
 In order to read individual messages, you just need to run: 

$ listmessages

...which will automatically put you into "select mode".  Now you can move 
the cursor around the screen.  To view a message, just move the cursor onto 
the appropriate line and press enter.  This should pop up a TextEdit window 
with the message inside of it.  You can then respond to the message by 
hitting ctrl+alt+shift+m, and all of the necessary fields should be 
automatically filled in.  (You can always toggle the terminal's select mode 
with ctrl+alt+shift+s.  You will need to do this after running 
"listmessages" in order to get back to the normal CLI mode.) 

To try this out, just send a message to "Dennis" that I can then respond to.

Okay, I wrote this entire post in Nanim, and I have to say it was quite a 
pleasing experience :-) (I'll teach you guys how to really put it to use 
sometime later.) 


On Wednesday, January 22, 2014 8:28:16 AM UTC-5, Dennis Kane wrote:
>
> It has been kind of an obsession for me to create the kind of end-user 
> experience that will really allow node to start actually being put to use. 
>  I've spent pretty much an entire year of full time coding getting this 
> thing ready for prime time.  The only caveat is that you need a Chrome 
> browser, as it crucially depends on the filesystem API.  I won't get into 
> the details of how to user it.  For now, just go there and start clicking 
> around.  As people show interest, I'll start giving instructions.
>
> Where is "there"?
>
> HERE --> http://urdesk.net
>
> urdesk means: "yoUR DESK" and "Uniform Resource DESK".
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to