October 1, 2010

Google Appe Engine test

Follow the IBM tutorial part 1 and check the Resources section to download SDK, eclipse plugin, App Engine account and links to other articles.
  • Pros: most cost effective, reliable solution to host Java app.  IDE, SDK and documents/books are mature and available.
  • Cons: lock-in to GAE due to its proprietary API.

Tutorial
  1. IBM tutorial, Part 1:Rev it up!
  2. IBM tutorial, Part 2:Building the killer app
  3. IBM tutorial, Part 3:Persistence and relationships 
Part 1: Two sample apps - Hello World GAE servlet, and a simple GWT app.  No coding -- just create a project and run. Shows how to deploy it to GAE environment.  See this example: http://keith-greeting.appspot.com/

Part 2: More advanced example, uses GWT.

Part 3: Extending part 2 example, with persistence.


To Try:
  • GAE+Clojure

July 9, 2010

Setting up CVS pserver on OSX 10.4 and up (10.5, 10.6)

There's no /etc/inetd.conf, or /etc/xinetd.conf.  New version of OSX uses something called "launchd."

Read following pages for setting up pserver.

See:
Launchd - http://developer.apple.com/macosx/launchd.html

Copy & Paste from above site -- just in case :

CVS pserver launchd item for OS X 10.4
Tuesday, August 02 2005 @ 08:14 pm MDT
Contributed by: ChrisRyland
Views: 6,637
TipsInspired by the recent excellent launchd overview on afp548, I needed to set up a CVS pserver on our new Tiger Xserve box, migrating from an old Linux server.

Here's a recipe that seems to work.

You'll need to create a launchd control file, call it cvspserver.plist, and put it in /Library/LaunchDaemons (where local launch control files are supposed to live):







        Label
        com.apple.cvspserver
        UserName
        cvs
        Program
        /usr/bin/cvs
        ProgramArguments
        
                cvs
                -f
                --allow-root=/Users/cvs
                pserver
        
        Sockets
        
                Listeners
                
                        SockPassive
                        
                        SockServiceName
                        cvspserver
                        SockType
                        SOCK_STREAM
                
        
        inetdCompatibility
        
                Wait
                
        




You'll have to change the --allow-root=/Users/cvs CVS root specification above to match your actual root, but otherwise the above should work.

Next, it doesn't appear that cvs under Tiger can access the standard user/password database, so you'll have to create a password file in your $CVSHOME/CVSROOT directory:

$ cd ~cvs/CVSROOT
$ sudo htpasswd -c passwd user1
$ sudo htpasswd passwd user2 # etc.

Then, you'll need a

# launchctl load /Library/LaunchDaemons/cvspserver.list

and you should be in business. (At the next reboot, cvspserver.plist should be picked up by launchd.)

January 3, 2010

Google Go, windows version is out

There were only Linux/OSX versions – now someone built it for Windows ( http://code.google.com/p/go-windows/ ).  Go get this file - http://go-windows.googlecode.com/files/go-1.zip

To install, unzip and set the following environment variables:

set GOROOT=[the go folder]
set GOOS=mingw
set GOARCH=386 

and then add GOROOT\bin directory to PATH.


Sample Hello world source. Save below as “hello.go”:

package main
import "fmt"
func main() {
    fmt.Printf("hello, world\n")
}

How to compile:

% 8g hello.go -> produces "hello.8"
% 8l hello.8 -> produces "8.exe"  (or "8.out" in Linux)

Using Clojure in Cygwin

 

Create a shell script as below:

#!/usr/bin/bash 
CLASS_PATH=/java/lib/clojure.jar:/java/lib/jline.jar
CMD="java -cp `cygpath -wp $CLASS_PATH`"
SHELL="jline.ConsoleRunner clojure.main"
SCRIPT="clojure.main"

if [ "$1" ]; then
$CMD $SCRIPT $1
else
$CMD $SHELL
fi