changeset 47:6202b866d72c

Cleaned up constructor names and merged some other changes in to support the Rhope website
author Mike Pavone <pavone@retrodev.com>
date Tue, 22 Dec 2009 01:22:09 -0500
parents 429b5f441381
children a24eb366195c
files basicweb.rhope extendlib.rhope extendlib.vistxt framework.rhope interp.c nworker.rhope parser.vistxt webserver.rhope
diffstat 8 files changed, 260 insertions(+), 186 deletions(-) [+]
line wrap: on
line diff
--- a/basicweb.rhope	Tue Dec 01 03:59:31 2009 -0500
+++ b/basicweb.rhope	Tue Dec 22 01:22:09 2009 -0500
@@ -9,7 +9,7 @@
 {
 	Print["Starting webserver"]
 	//Since we're just serving static files we don't need to setup any handlers
-	handlers <- New@Dictionary[]
+	handlers <- Dictionary[]
 	//Start listening on port 80
 	Listen on Port[80,["Connection Start"]Set Input[1, handlers]]
 	Wait Forever[]
--- a/extendlib.rhope	Tue Dec 01 03:59:31 2009 -0500
+++ b/extendlib.rhope	Tue Dec 22 01:22:09 2009 -0500
@@ -57,7 +57,7 @@
 
 New Like@Dictionary[in:out]
 {
-	out <- New@Dictionary[]
+	out <- Dictionary[]
 }
 
 Key Value Map[list,worker:out]
@@ -254,7 +254,7 @@
 
 Dict Split[string,keydelim,entrydelim:out]
 {
-	out <- Fold[["_Dict Split"]Set Input[3, keydelim], New@Dictionary[], [string]Split[entrydelim]] 
+	out <- Fold[["_Dict Split"]Set Input[3, keydelim], Dictionary[], [string]Split[entrydelim]] 
 }
 
 Previous@List[list,index:prev index,not found]
@@ -485,7 +485,7 @@
 							fieldlist <- [Blueprint Of[value]]Get Fields
 							[fieldlist]First
 							{
-								list <- _Object to Dict[value, fieldlist, ~, New@Dictionary[]]
+								list <- _Object to Dict[value, fieldlist, ~, Dictionary[]]
 								out value <- Val[list]
 							}{
 								out value <- value
@@ -566,7 +566,7 @@
 
 Keys[container:out]
 {
-	out <- Fold["_Keys", New@List[], container]
+	out <- Fold["_Keys", (), container]
 }
 
 And[left,right:out]
--- a/extendlib.vistxt	Tue Dec 01 03:59:31 2009 -0500
+++ b/extendlib.vistxt	Tue Dec 22 01:22:09 2009 -0500
@@ -8,7 +8,7 @@
 |:
 	newval <- [
 		[worker(2)]Do[  
-			[New@List[]]Append[ [list(0)]Index[index(1)] ]
+			[List[]]Append[ [list(0)]Index[index(1)] ]
 		]
 	]Index[0]
 	
@@ -32,18 +32,18 @@
 
 New Like@List(1,1)
 |:
-	out(0) <- New@List[]	
+	out(0) <- List[]	
 :|
 
 New Like@Dictionary(1,1)
 |:
-	out(0) <- New@Dictionary[]
+	out(0) <- Dictionary[]
 :|
 
 Key Value Map Helper(4,1)
 |:
 	[worker(3)]Do[  
-		[[New@List[]]Append[ [list(0)]Index[index(1)] ]]Append[index(1)]
+		[[List[]]Append[ [list(0)]Index[index(1)] ]]Append[index(1)]
 	]
 	|:
 		newval <- [~]Index[0]
@@ -85,7 +85,7 @@
 
 Dict Split(3,1)
 |:
-	Out(0) <- Dict Split Helper[ [string(0)]Split@String[entrydelim(2)] , keydelim(1), 0, New@Dictionary[]]
+	Out(0) <- Dict Split Helper[ [string(0)]Split@String[entrydelim(2)] , keydelim(1), 0, Dictionary[]]
 :|
 
 In Helper(2,1)
@@ -215,7 +215,7 @@
 |:
 	newval <- [
 		[worker(3)]Do[  
-			[[[New@List[]]Append[ start(2) ]]Append[ [list(0)]Index[index(1)] ]]Append[index(1)]
+			[[[List[]]Append[ start(2) ]]Append[ [list(0)]Index[index(1)] ]]Append[index(1)]
 		]
 	]Index[0]
 	
@@ -262,7 +262,7 @@
 |:
 	newval <- [
 		[worker(3)]Do[  
-			[[[New@List[]]Append[ start(2) ]]Append[ [list(0)]Index[index(1)] ]]Append[index(1)]
+			[[[List[]]Append[ start(2) ]]Append[ [list(0)]Index[index(1)] ]]Append[index(1)]
 		]
 	]Index[0]
 	
@@ -346,7 +346,7 @@
 	If[[current]Starts With["{"]]
 	|:
 		,first <- [current]Slice[1]
-		list entry, index, bracketnum <- Unserialize Helper[ [parts(0)]Set[index(1), first], index(1), New@List[]]
+		list entry, index, bracketnum <- Unserialize Helper[ [parts(0)]Set[index(1), first], index(1), List[]]
 		If[[bracketnum] = [0]]
 		|:
 			[parts(0)]Next[index]
@@ -393,9 +393,9 @@
 	parts <- [serialized(0)]Split[","]
 	[parts]First
 	|:
-		out(0) <- Unserialize Helper[parts, ~, New@List[]]
+		out(0) <- Unserialize Helper[parts, ~, List[]]
 	:||:
-		out(0) <- New@List[]
+		out(0) <- List[]
 	:|
 :|
 
@@ -458,7 +458,7 @@
 							fieldlist <- [Blueprint Of[value(0)]]Get Fields
 							[fieldlist]First
 							|:
-								list <- _Object to Dict[value(0), fieldlist, ~, New@Dictionary[]]
+								list <- _Object to Dict[value(0), fieldlist, ~, Dictionary[]]
 								value(4) <- Val[list]
 							:||:
 								value(4) <- value(0)
@@ -517,7 +517,7 @@
 
 As List@String(1,1)
 |:
-	out(0) <- [New@List[]]Append[string(0)]
+	out(0) <- [List[]]Append[string(0)]
 :|
 
 As List@List(1,1)
@@ -571,7 +571,7 @@
 |:
 	filter? <- [
 		[worker(2)]Do[  
-			[New@List[]]Append[ [list(0)]Index[index(1)] ]
+			[List[]]Append[ [list(0)]Index[index(1)] ]
 		]
 	]Index[0]
 	If[filter?]
@@ -593,7 +593,7 @@
 |:
 	[list(0)]First
 	|:
-		out(0) <- Filter Helper[list(0), ~, worker(1), New@List[]]
+		out(0) <- Filter Helper[list(0), ~, worker(1), List[]]
 	:||:
 		out(0) <- list(0)
 	:|
@@ -683,7 +683,7 @@
 
 Keys(1,1)
 |:
-	out(0) <- Fold["_Keys", New@List[], container(0)]
+	out(0) <- Fold["_Keys", List[], container(0)]
 :|
 
 
--- a/framework.rhope	Tue Dec 01 03:59:31 2009 -0500
+++ b/framework.rhope	Tue Dec 22 01:22:09 2009 -0500
@@ -2,8 +2,8 @@
 
 Framework Handler[con,path,request type,queryvars,headers,handler,title,use session]
 {
-	page <- New@Page[title, path, use session, queryvars, headers]
-	out list <- [handler]Do[ [[New@List[]]Append[page]]Append[path] ]
+	page <- Page[title, path, use session, queryvars, headers]
+	out list <- [handler]Do[ [[List[]]Append[page]]Append[path] ]
 	handler page <- [out list]Index[0]
 	If[[request type] = ["POST"]]
 	{
@@ -52,7 +52,7 @@
 	Data
 }
 
-New@Web Event[name,origin,data:out]
+Web Event[name,origin,data:out]
 {
 	out <- [[[Build["Web Event"]]Event Name <<[name]]Origin <<[origin]]Data <<[data]	
 }
@@ -67,18 +67,20 @@
 	Named Children
 	Session
 	Use Session
+	Preformatted
 }
 
-New@Web Container[class:out]
+Web Container[class:out]
 {
-	out <- [[[[[[[Build["Web Container"]
+	out <- [[[[[[[[Build["Web Container"]
 	]Tag Name <<["div"]
 	]Class <<[class]
 	]Propagate Events <<[No]
-	]Children <<[New@List[]]
-	]Named Children <<[New@Dictionary[]]
-	]Handlers <<[New@Dictionary[]]
+	]Children <<[List[]]
+	]Named Children <<[Dictionary[]]
+	]Handlers <<[Dictionary[]]
 	]Use Session <<[No]
+	]Preformatted <<[No]
 }
 
 Name@Web Container[cont:out,none]
@@ -91,6 +93,27 @@
 	out <- [start]Append[[container]Render]
 }
 
+_Preformatted[child,val:out]
+{
+	If[[Type Of[child]] = ["Web Text"]]
+	{
+		out <- [child]Preformatted <<[val]
+	}{
+		If[[Type Of[child]] = ["Web Container"]]
+		{
+			out <- [child]Preformatted[val]
+		}{
+			out <- child
+		}
+	}
+}
+
+Preformatted@Web Container[cont,preformatted?:out]
+{
+	out <- [[cont]Children <<[ Map[[cont]Children >>, ["_Preformatted"]Set Input[1, preformatted?]] ]
+	]Preformatted <<[preformatted?]
+}
+
 Set Session@Web Container[container,session:out]
 {
 	out <- [
@@ -107,13 +130,21 @@
 
 Render@Web Container[container:out,headers]
 {
+	If[[container]Preformatted >>]
+	{
+		newline <- ""
+		tab <- ""
+	}{
+		newline <- "\n"
+		tab <- "\t"
+	}
 	out <- [[[[[[["<"]Append[ [container]Tag Name >> ]
 		]Append[Get Class[container]]
-		]Append[">\n\t"]
+		]Append[[[">"]Append[newline]]Append[tab]]
 		]Append[Fold[["Render Child"]<String@Worker, "", [container]Children >>]]
-		]Append["\n</"]
+		]Append[[newline]Append["</"]]
 		]Append[ [container]Tag Name >> ]
-		]Append[">\n"]
+		]Append[[">"]Append[newline]]
 }
 
 Container Event Handler[container,events,index:cont,out events]
@@ -122,7 +153,7 @@
 	[[container]Handlers >>]Index[ [event]Event Name >>]
 	{
 		result list <- [~]Do[
-				[[New@List[]]Append[container]]Append[event]
+				[[List[]]Append[container]]Append[event]
 		]
 		new container <- [result list]Index[0]
 		[result list]Index[1]
@@ -141,7 +172,7 @@
 		cont, result events <- Container Event Handler[new container, events, ~]
 	}{
 		cont <- Val[new container]
-		result events <- New@List[]
+		result events <- List[]
 	}
 }
 
@@ -171,16 +202,16 @@
 {
 	[[container]Children >>]First
 	{
-		out, postback events <- Container Postback Helper[container, post data, ~, New@List[]]
+		out, postback events <- Container Postback Helper[container, post data, ~, List[]]
 		If[[container]Propagate Events >>]
 		{
 			events <- Val[postback events]
 		}{
-			events <- New@List[]
+			events <- List[]
 		}
 	}{
 		out <- container
-		events <- New@List[]
+		events <- List[]
 	}
 }
 	
@@ -228,17 +259,16 @@
 	out <- [container]Handlers <<[ [[container]Handlers >>	]Set[event name, handler] ]
 }
 	
-New@Page[title,url,use session,queryvars,headers:out]
+Page[title,url,use session,queryvars,headers:out]
 {
 	page <- [[[[[[[Build["Page"]
 	]Title <<[title]
 	]URL <<[url]
-	]CSS <<[[New@List[]]Append["/default.css"]]
-	]Children <<[New@List[]]
-	]Named Children <<[New@Dictionary[]]
-	]Handlers <<[New@Dictionary[]]
+	]CSS <<[[List[]]Append["/default.css"]]
+	]Children <<[List[]]
+	]Named Children <<[Dictionary[]]
+	]Handlers <<[Dictionary[]]
 	]Use Session <<[use session]
-
 	If[use session]
 	{
 		Load@Session[queryvars, headers]
@@ -276,15 +306,15 @@
 		]Append["\t</form>\n\t</body>\n</html>"]
 	If[[page]Use Session>>]
 	{
-		headers <- [[page]Session >>]Finalize[New@Dictionary[]]
+		headers <- [[page]Session >>]Finalize[Dictionary[]]
 	}{
-		headers <- New@Dictionary[]
+		headers <- Dictionary[]
 	}
 }
 
 Clear Children[page:out]
 {
-	out <- [[page]Children <<[New@List[]]]Named Children <<[New@Dictionary[]]
+	out <- [[page]Children <<[List[]]]Named Children <<[Dictionary[]]
 }
 
 Set@Page[page,key,val:out]
@@ -314,7 +344,7 @@
 
 Clear CSS@Page[page:out]
 {
-	out <- [page]CSS <<[New@List[]]	
+	out <- [page]CSS <<[List[]]	
 }
 
 Decode Helper Decode[list,destlist,index:out]
@@ -345,7 +375,7 @@
 	parts <- [val]Split["%"]
 	[parts]First
 	{
-		out <- [Decode Helper Straight[parts, New@List[], ~]]Join[""]
+		out <- [Decode Helper Straight[parts, List[], ~]]Join[""]
 	}{
 		out <- val
 	}
@@ -376,22 +406,23 @@
 {
 	[[page]Children >>]First
 	{
-		out, events <- Container Postback Helper[page, post data, ~, New@List[]]
+		out, events <- Container Postback Helper[page, post data, ~, List[]]
 	}{
 		out <- page
 	}
-	events <- New@List[]
+	events <- List[]
 }
 	
 Blueprint Web Text
 {
 	Text
 	Enclosing Tag
+	Preformatted
 }
 	
-New@Web Text[text,tag:out]
+Web Text[text,tag:out]
 {
-	out <- [[Build["Web Text"]]Text <<[text]]Enclosing Tag <<[tag]
+	out <- [[[Build["Web Text"]]Text <<[text]]Enclosing Tag <<[tag]]Preformatted <<[No]
 }
 
 Name@Web Text[text:out,none]
@@ -406,7 +437,13 @@
 	
 Render@Web Text[text:out,headers]
 {
-	processed text <- [Escape HTML Text[[text]Text >>]]Replace["\n","<br>\n\t"]
+	escaped <- Escape HTML Text[[text]Text >>]
+	If[[text]Preformatted >>]
+	{
+		processed text <- Val[escaped]
+	}{
+		processed text <- [escaped]Replace["\n","<br>\n\t"]
+	}
 	If[[[[text]Enclosing Tag >>]Length] = [0]]
 	{
 		out <- Val[processed text]
@@ -418,17 +455,17 @@
 Postback@Web Text[text,post data:out,events]
 {
 	out <- text
-	events <- New@List[]
+	events <- List[]
 }
 
 Set Session@Web Text[text,session:out]
 {
-	out <- session
+	out <- text
 }
 
 Render@String[string:out,headers]
 {
-	out <- [New@Web Text[string,""]]Render	
+	out <- [Web Text[string,""]]Render	
 }
 
 Name@String[string:out,none]
@@ -439,7 +476,7 @@
 Postback@String[in,post data:out,events]
 {
  	out <- in
- 	events <- New@List[]
+ 	events <- List[]
 }
 
 Set Session@String[in,session:out]
@@ -460,7 +497,7 @@
 	name <- [field]Name >>	
 }
 
-New@Web Field[name,value,type:out]
+Web Field[name,value,type:out]
 {
 	out <- [[[[Build["Web Field"]]Name <<[name]]Value <<[value]]Type <<[type]]Class <<[""]
 }
@@ -489,13 +526,13 @@
 
 		If[[[field]Value >>] = [~]] 
 		{
-			event <- New@List[]
+			event <- List[]
 		}{
-			event <- [New@List[]]Append[ New@Web Event["change", [field]Name >>, [field]Value >>] ]
+			event <- [List[]]Append[ Web Event["change", [field]Name >>, [field]Value >>] ]
 		}
 	}{
 		out <- field
-		event <- New@List[]
+		event <- List[]
 	}
 }
 
@@ -506,7 +543,7 @@
 	Class
 }
 
-New@Web Button[name,label:out]
+Web Button[name,label:out]
 {
 	out <- [[[Build["Web Button"]]Name <<[name]]Label <<[label]]Class <<[""]	
 }
@@ -526,9 +563,9 @@
 	out <- button
 	[post data]Index[[button]Name >>]
 	{
-		events <- [New@List[]]Append[ New@Web Event["click", [button]Name >>, 0] ]
+		events <- [List[]]Append[ Web Event["click", [button]Name >>, 0] ]
 	}{
-		events <- New@List[]
+		events <- List[]
 	}
 }
 
@@ -543,6 +580,7 @@
 	IP Address
 	Use Cookies
 	Data
+	Dirty
 }
 
 Get Unique ID[:out] uses Session
@@ -551,9 +589,9 @@
 	::ID <- [::ID]+[1]
 }
 
-New@Session[:out]
+Session[:out]
 {
-	out <- [[[Build["Session"]]Session ID <<[Get Unique ID[]]]Use Cookies <<[No]]Data <<[New@Dictionary[]]
+	out <- [[[[Build["Session"]]Session ID <<[Get Unique ID[]]]Use Cookies <<[No]]Data <<[Dictionary[]]]Dirty <<[No]
 }
 
 Load@Session[queryvars,headers:out] uses Session
@@ -581,7 +619,7 @@
 	
 	Val[makenew]
 	{
-		out <- New@Session[]
+		out <- Session[]
 	}
 }
 
@@ -597,7 +635,7 @@
 
 Set@Session[session,key,val:out]
 {
-	out <- [session]Data <<[ [[session]Data >>]Set[key, val] ]
+	out <- [[session]Data <<[ [[session]Data >>]Set[key, val] ]]Dirty <<[Yes]
 }
 
 Index@Session[session,key:out,not found]
@@ -618,13 +656,21 @@
 Init Sessions[:out] uses Session
 {
 	::ID <- 1
-	::Sessions <- New@Dictionary[]
+	::Sessions <- Dictionary[]
 	out <- 0
 }
 
-Finalize@Session[session,headers:out headers] uses Session
+Save@Session[session:out] uses Session
 {
 	::Sessions <- [::Sessions]Set[[session]Session ID >>, session]
+}
+
+Finalize@Session[session,headers:out headers]
+{
+	If[[session]Dirty >>]
+	{
+		Save[session]
+	}
 	out headers <- [headers]Set["Set-Cookie", ["session_id="]Append[[session]Session ID >>]]
 }
 
@@ -636,15 +682,15 @@
 	Query Params
 }
 
-New@Web Link[text,target:out]
+Web Link[text,target:out]
 {
-	out <- [[[[Build["Web Link"]]Text <<[text]]Target <<[target]]Class <<[""]]Query Params <<[New@Dictionary[]]	
+	out <- [[[[Build["Web Link"]]Text <<[text]]Target <<[target]]Class <<[""]]Query Params <<[Dictionary[]]	
 }
 	
 
 With Session@Web Link[text,target,session:out]
 {
-	New@Web Link[text, target]
+	Web Link[text, target]
 	{
 		out <- [~]Query Params <<[[[~]Query Params >>]Set["session_id", [session]Session ID >>]]
 	}
@@ -658,14 +704,14 @@
 	}{
 		queryvars <- ""
 	}
-	out <- [[[[[[["<a href=\""]Append[[[link]Target>>]Replace["\"", "%22"]]]Append[queryvars]]Append["\""]
+	out <- [[[[[[["<a href=\""]Append[[link]Target>>]]Append[queryvars]]Append["\""]
 				]Append[Get Class[link]]]Append[">"]]Append[Escape HTML Text[[link]Text>>]]]Append["</a>"]
 }
 
 Postback@Web Link[in,post data:out,events]
 {
 	out <- in
-	events <- New@List[]	
+	events <- List[]	
 }
 
 Name@Web Link[link:name,none]
@@ -694,7 +740,7 @@
 	Data
 }
 
-New@Web Table[headers,data:out]
+Web Table[headers,data:out]
 {
 	out <- [[Build["Web Table"]]Headers <<[headers]]Data <<[data]
 }
--- a/interp.c	Tue Dec 01 03:59:31 2009 -0500
+++ b/interp.c	Tue Dec 22 01:22:09 2009 -0500
@@ -1636,7 +1636,7 @@
 	aworker->input_types[0] = BUILTIN_TYPE_LIST;
 	//add_method(this_comp, aworker);
 	
-	aworker = create_worker(prog, "New@List",0, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "List",0, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_list_new;
 	//add_method(this_comp, aworker);
 	
@@ -1685,7 +1685,7 @@
 
 	//add_method(this_comp, aworker);
 	
-	aworker = create_worker(prog, "New@Dictionary",0, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Dictionary",0, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_dict_new;
 	//add_method(this_comp, aworker);
 	
@@ -1842,7 +1842,7 @@
 	aworker->input_types[1] = BUILTIN_TYPE_WHOLE;
 	aworker->input_types[2] = BUILTIN_TYPE_WHOLE;
 	
-	aworker = create_worker(prog, "New@Worker", 1, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Worker", 1, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_worker_new;
 	aworker->input_types[0] = BUILTIN_TYPE_STRING;
 	
@@ -1851,7 +1851,7 @@
 	
 	this_comp = create_company(prog, "Window", 3, 0, FALSE);
 	
-	aworker = create_worker(prog, "New@Window", 3, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Window", 3, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_window_new;
 	aworker->input_types[0] = BUILTIN_TYPE_STRING;
 	aworker->input_types[1] = BUILTIN_TYPE_REAL;
@@ -1912,7 +1912,7 @@
 	current_method = 0;
 	create_company(prog, "Button", 2, 0, FALSE);
 	
-	aworker = create_worker(prog, "New@Button", 3, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Button", 3, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_button_new;
 	aworker->input_types[0] = BUILTIN_TYPE_STRING;
 	aworker->input_types[1] = BUILTIN_TYPE_REAL;
@@ -1929,7 +1929,7 @@
 	current_method = 0;
 	create_company(prog, "Input Box", 2, 0, FALSE);
 		
-	aworker = create_worker(prog, "New@Input Box", 3, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Input Box", 3, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_inputbox_new;
 	aworker->input_types[0] = BUILTIN_TYPE_STRING;
 	aworker->input_types[1] = BUILTIN_TYPE_REAL;
@@ -1945,7 +1945,7 @@
 #endif
 #ifndef NO_NET
 	this_comp = create_company(prog, "Net Client", 3, 0, FALSE);
-	aworker = create_worker(prog, "New@Net Client", 2, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Net Client", 2, 1, WORKER_TYPE);
 	aworker->implement_func =(custom_worker *)net_client_new;
 	aworker->input_types[0] = BUILTIN_TYPE_STRING;
 	aworker->input_types[1] = BUILTIN_TYPE_WHOLE;
@@ -1985,7 +1985,7 @@
 	
 	create_company(prog, "Program", 5, 0, FALSE);
 	
-	aworker = create_worker(prog, "New@Program", 0, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Program", 0, 1, WORKER_TYPE);
 	aworker->implement_func = (custom_worker *)vis_program_new;
 	
 	aworker = create_worker(prog, "New Worker@Program", 2, 2, WORKER_TYPE);
@@ -2016,7 +2016,7 @@
 #ifdef SYLLABLE
 	create_company(prog, "Custom Widget", 2, 0, FALSE);
 	
-	aworker = create_worker(prog, "New@Custom Widget", 3, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Custom Widget", 3, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_customwidget_new;
 	aworker->input_types[0] = BUILTIN_TYPE_STRING;
 	aworker->input_types[1] = BUILTIN_TYPE_REAL;
@@ -2095,7 +2095,7 @@
 #endif
 	create_company(prog, "Buffer", 7, 0, FALSE);
 	
-	aworker = create_worker(prog, "New@Buffer", 1, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Buffer", 1, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_buffer_new;
 	aworker->input_types[0] = BUILTIN_TYPE_WHOLE;
 	
@@ -2151,7 +2151,7 @@
 
 	create_company(prog, "Blueprint", 4, 0, FALSE);
 	
-	aworker = create_worker(prog, "New@Blueprint", 1, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Blueprint", 1, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_blueprint_new;
 	aworker->input_types[0] = BUILTIN_TYPE_STRING;
 	
@@ -2193,7 +2193,7 @@
 #ifdef SYLLABLE
 	create_company(prog, "Checkbox", 2, 0, FALSE);
 
-	aworker = create_worker(prog, "New@Checkbox", 4, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Checkbox", 4, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_checkbox_new;
 	aworker->input_types[0] = BUILTIN_TYPE_STRING;
 	aworker->input_types[1] = BUILTIN_TYPE_REAL;
@@ -2208,7 +2208,7 @@
 
 	create_company(prog, "Dropdown", 4, 0, FALSE);
 
-	aworker = create_worker(prog, "New@Dropdown", 3, 1, WORKER_TYPE);
+	aworker = create_worker(prog, "Dropdown", 3, 1, WORKER_TYPE);
 	aworker->implement_func=(custom_worker *)vis_dropdown_new;
 	aworker->input_types[0] = BUILTIN_TYPE_LIST;
 	aworker->input_types[1] = BUILTIN_TYPE_REAL;
@@ -3073,7 +3073,7 @@
 		DEBUGPRINTF( "Magic method: %s\n", process_def->name);
 		if(!params || !params[0])
 		{
-			ERRORPRINTF("Error: null first parmeter or null parameter array for worker %s\n", process_def->name);
+			ERRORPRINTF("Error: null first parmeter or null parameter array for worker %s, params: %X, params[0]: %X\n", process_def->name, params, params[0]);
 			print_stack_trace(worker_entry.instance);
 			execute_active = FALSE;
 			return -1;
--- a/nworker.rhope	Tue Dec 01 03:59:31 2009 -0500
+++ b/nworker.rhope	Tue Dec 22 01:22:09 2009 -0500
@@ -172,7 +172,7 @@
 
 Worker Ref[name,convention,inputs,outputs,ismethod?:out]
 {
-	out <- [[[[[Build["Worker Ref"]]Name <<[name]]Convention <<[convention]]Inputs <<[inputs]]Outputs <<[outputs]]Is Method ? <<[ismethod?]
+	out <- [[[[[Build["Worker Ref"]]Name <<[name]]Convention <<[convention]]Inputs <<[inputs]]Outputs <<[outputs]]Is Method? <<[ismethod?]
 }
 
 Blueprint Node Ref
@@ -300,7 +300,7 @@
 
 NWorker[convention:out]
 {
-	out <- [[[[[[[[Build["NWorker"]]Convention <<[convention]]Nodes <<[()]]Inputs <<[()]]Outputs <<[()]]Input Types <<[()]]Output Types <<[()]]Name <<["Anonymous"]]Builtin <<[No]
+	out <- [[[[[[[[Build["NWorker"]]Convention <<[convention]]Nodes <<[()]]Inputs <<[()]]Outputs <<[()]]Input Types <<[()]]Output Types <<[()]]Name <<["Anonymous"]]Builtin? <<[No]
 }
 
 Add Node@NWorker[worker,type,data,inputs,outputs:out,node index]
@@ -345,7 +345,11 @@
 		new type <- Val[type]
 		new count <- 1
 	}
-	new node <- [node]Input Types <<[  [[node]Input Types >>]Set[[dest]IO Num >>, new type] ]
+	new node <- [node]Input Types <<[  
+		[[()]Append[
+				[ [node]Input Types >> ]Set[ [dest]IO Num >>, new type ]
+		]]Append[new count] 
+	]
 	out <- Infer Types Node[[nodelist]Set[[dest]Index >>, new node], new node, [dest]Index >>, prog, worker]
 }
 
@@ -361,9 +365,14 @@
 		//Temporary hack
 		If[[Type Of[[node]Data >>]] = ["Whole Number"]]
 		{
-			outtype <- Type Instance["Whole Number"]
-		}{
-			outtype <- Type Instance[Type Of[[node]Data >>]]
+			outtype <- Type Instance["Int32"]
+		}{
+			If[[Type Of[[node]Data >>]] = ["Type Instance"]]
+			{
+				outtype <- Type Instance["Blueprint"]
+			}{
+				outtype <- Type Instance[Type Of[[node]Data >>]]
+			}
 		}
 		nextnode <- [node]Output Types <<[ [()]Append[outtype] ]
 		
@@ -1135,7 +1144,7 @@
 
 Compile Program@NProgram[prog, backend:out]
 {
-	out <- Fold["_Compile Program", Fold["_Compile Program BP Special", Fold["_Compile Program BP", backend, [prog]Blueprints >>], [prog]Blueprints >>], [prog]Workers >>]
+	out <- Fold["_Compile Program", Fold["_Compile Program BP Special", Fold["_Compile Program BP", backend, [prog]Blueprints >>], [prog]Blueprints >>], Map[[prog]Workers >>, ["Infer Types"]Set Input[1, prog]] ]
 }
 
 Register Method@NProgram[prog, name, convention, inputs, outputs: out]
@@ -1146,14 +1155,18 @@
 Register Worker@NProgram[prog, name, convention, inputs, outputs: out]
 {
 	Print[["Register Worker "]Append[name]]
-	after reg <- [prog]Worker Refs <<[ [[prog]Worker Refs >>]Set[name, Worker Ref[name, convention, inputs, outputs, No]]]
-	parts <- [name]Split["@"]
-	[parts]Index[1]
-	{
-		out <- [after reg]Register Method[[parts]Index[0], convention, inputs, outputs]
-	}{
-		out <- Val[after reg]
-	}
+	after reg <- [prog]Worker Refs <<[ 
+		[ [prog]Worker Refs >> ]Set[name, 
+			Worker Ref[name, convention, inputs, outputs, No]
+		]
+	]
+		parts <- [name]Split["@"]
+		[parts]Index[1]
+		{
+			out <- [after reg]Register Method@NProgram[[parts]Index[0], convention, inputs, outputs]
+		}{
+			out <- Val[after reg]
+		}
 }
 
 Register Builtins@NProgram[prog:out]
@@ -1174,81 +1187,81 @@
 	]Bind Worker["+@Int32", 
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("left","right")]
-		]Input Types <<[ [[()]Append[Type Instance["Int32"]]]Type Instance["Int32"] ]
+		]Input Types <<[ [[()]Append[ Type Instance["Int32"]]]Append[Type Instance["Int32"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Int32"]] ]
-		]Builin? <<[Yes]]
+		]Output Types <<[ [()]Append[Type Instance["Int32"]] ]
+		]Builtin? <<[Yes]]
 	]Bind Worker["-@Int32", 
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("left","right")]
-		]Input Types <<[ [[()]Append[Type Instance["Int32"]]]Type Instance["Int32"] ]
+		]Input Types <<[ [[()]Append[ Type Instance["Int32"]]]Append[Type Instance["Int32"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Int32"]] ]
-		]Builin? <<[Yes]]
+		]Output Types <<[ [()]Append[Type Instance["Int32"]] ]
+		]Builtin? <<[Yes]]
 	]Bind Worker["*@Int32", 
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("left","right")]
-		]Input Types <<[ [[()]Append[Type Instance["Int32"]]]Type Instance["Int32"] ]
+		]Input Types <<[ [[()]Append[ Type Instance["Int32"]]]Append[Type Instance["Int32"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Int32"]] ]
-		]Builin? <<[Yes]]
+		]Output Types <<[ [()]Append[Type Instance["Int32"]] ]
+		]Builtin? <<[Yes]]
 	]Bind Worker["/@Int32", 
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("left","right")]
-		]Input Types <<[ [[()]Append[Type Instance["Int32"]]]Type Instance["Int32"] ]
+		]Input Types <<[ [[()]Append[ Type Instance["Int32"]]]Append[Type Instance["Int32"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Int32"]] ]
-		]Builin? <<[Yes]]
+		]Output Types <<[ [()]Append[Type Instance["Int32"]] ]
+		]Builtin? <<[Yes]]
 	]Bind Worker["LShift@Int32", 
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("left","right")]
-		]Input Types <<[ [[()]Append[Type Instance["Int32"]]]Type Instance["Int32"] ]
+		]Input Types <<[ [[()]Append[ Type Instance["Int32"]]]Append[Type Instance["Int32"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Int32"]] ]
-		]Builin? <<[Yes]]
+		]Output Types <<[ [()]Append[Type Instance["Int32"]] ]
+		]Builtin? <<[Yes]]
 	]Bind Worker["RShift@Int32", 
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("left","right")]
-		]Input Types <<[ [[()]Append[Type Instance["Int32"]]]Type Instance["Int32"] ]
+		]Input Types <<[ [[()]Append[ Type Instance["Int32"]]]Append[Type Instance["Int32"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Int32"]] ]
-		]Builin? <<[Yes]]
+		]Output Types <<[ [()]Append[Type Instance["Int32"]] ]
+		]Builtin? <<[Yes]]
 	]Bind Worker["<@Int32", 
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("left","right")]
-		]Input Types <<[ [[()]Append[Type Instance["Int32"]]]Type Instance["Int32"] ]
+		]Input Types <<[ [[()]Append[ Type Instance["Int32"]]]Append[Type Instance["Int32"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Int32"]] ]
-		]Builin? <<[Yes]]
+		]Output Types <<[ [()]Append[Type Instance["Int32"]] ]
+		]Builtin? <<[Yes]]
 	]Bind Worker[">@Int32", 
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("left","right")]
-		]Input Types <<[ [[()]Append[Type Instance["Int32"]]]Type Instance["Int32"] ]
+		]Input Types <<[ [[()]Append[ Type Instance["Int32"]]]Append[Type Instance["Int32"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Int32"]] ]
-		]Builin? <<[Yes]]
+		]Output Types <<[ [()]Append[Type Instance["Int32"]] ]
+		]Builtin? <<[Yes]]
 	]Bind Blueprint["Boolean", NBlueprint[]]
 	]Bind Worker["If@Boolean",
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("condition")]
 		]Input Types <<[ [()]Append[Type Instance["Boolean"]] ]
 		]Outputs <<[("isyes","isno")]
-		]Output types <<[ [[()]Append[Type Instance["Boolean"]]]Append[Type Instance["Boolean"]] ]
-		]Builin? <<[Yes]]
+		]Output Types <<[ [[()]Append[Type Instance["Boolean"]]]Append[Type Instance["Boolean"]] ]
+		]Builtin? <<[Yes]]
 	]Bind Worker["Print",
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("value")]
 		]Input Types <<[ [()]Append[Type Instance["Any Type"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Int32"]] ]
-		]Builin? <<[Yes]] 
+		]Output Types <<[ [()]Append[Type Instance["Int32"]] ]
+		]Builtin? <<[Yes]] 
 	]Bind Worker["Build",
 		[[[[[NWorker["rhope"]
 		]Inputs <<[("type")]
 		]Input Types <<[ [()]Append[Type Instance["Blueprint"]] ]
 		]Outputs <<[("out")]
-		]Output types <<[ [()]Append[Type Instance["Any Type"]] ]
-		]Builin? <<[Yes]] 
+		]Output Types <<[ [()]Append[Type Instance["Any Type"]] ]
+		]Builtin? <<[Yes]] 
 }
 
 Find Worker@NProgram[prog, name:out,notfound]
--- a/parser.vistxt	Tue Dec 01 03:59:31 2009 -0500
+++ b/parser.vistxt	Tue Dec 22 01:22:09 2009 -0500
@@ -69,7 +69,7 @@
 	]Global Separator <<["::"]
 	]Hex Escape <<["x"]
 	]Uses <<["uses"]
-	]Escape Map <<[[[[New@Dictionary[]]Set["n","\n"]]Set["r","\r"]]Set["t","\t"]]
+	]Escape Map <<[[[[Dictionary[]]Set["n","\n"]]Set["r","\r"]]Set["t","\t"]]
 :|
 
 Company Output Reference
@@ -87,7 +87,7 @@
 |:
 	reflist <- [refs(0)]Index[name(1)] |::|
 	|:
-		reflist <- New@List[]
+		reflist <- List[]
 	:|
 	out(0) <- [refs(0)]Set[name(1), [reflist]Append[reference(2)]]
 :|
@@ -113,9 +113,9 @@
 New@Parse Program(0,1)
 |:
 	out(0) <- [[[Build["Parse Program"]
-	]Workers <<[New@Dictionary[]]
-	]Imports <<[New@Dictionary[]]
-	]Blueprints <<[New@Dictionary[]]
+	]Workers <<[Dictionary[]]
+	]Imports <<[Dictionary[]]
+	]Blueprints <<[Dictionary[]]
 :|
 
 Company Blueprint Definition
@@ -141,7 +141,7 @@
 
 New@Parse Worker(4,1)
 |:
-	out(0) <- [[[[[[Build["Parse Worker"]]Name <<[name(0)]]Inputs <<[inputs(1)]]Outputs <<[outputs(2)]]Line Number <<[line(3)]]Trees <<[New@List[]]]Uses Stores <<[New@List[]]
+	out(0) <- [[[[[[Build["Parse Worker"]]Name <<[name(0)]]Inputs <<[inputs(1)]]Outputs <<[outputs(2)]]Line Number <<[line(3)]]Trees <<[List[]]]Uses Stores <<[List[]]
 :|
 
 Company Worker Node
@@ -155,7 +155,7 @@
 
 New@Worker Node(2,1)
 |:
-	out(0) <- [[[[Build["Worker Node"]]Name <<[name(0)]]Params <<[params(1)]]Assignments <<[New@List[]]]Blocks <<[New@List[]]
+	out(0) <- [[[[Build["Worker Node"]]Name <<[name(0)]]Params <<[params(1)]]Assignments <<[List[]]]Blocks <<[List[]]
 :|
 
 Add List Helper(6,3)
@@ -351,7 +351,7 @@
 
 New@Field Node(3,1)
 |:
-	out(0) <- [[[[[Build["Field Node"]]Name <<[name(0)]]Assignments <<[New@List[]]]Blocks <<[New@List[]]]Set? <<[set(2)]]Params <<[params(1)]
+	out(0) <- [[[[[Build["Field Node"]]Name <<[name(0)]]Assignments <<[List[]]]Blocks <<[List[]]]Set? <<[set(2)]]Params <<[params(1)]
 :|
 
 Add to Worker@Field Node(5,3)
@@ -405,7 +405,7 @@
 
 New@Named Pipe Node(1,1)
 |:
-	out(0) <- [[[Build["Named Pipe Node"]]Name <<[name(0)]]Assignments <<[New@List[]]]Blocks <<[New@List[]]
+	out(0) <- [[[Build["Named Pipe Node"]]Name <<[name(0)]]Assignments <<[List[]]]Blocks <<[List[]]
 :|
 
 Add to Worker@Named Pipe Node(5,3)
@@ -478,7 +478,7 @@
 
 New@Global Node(2,1)
 |:
-	out(0) <- [[[[Build["Global Node"]]Store <<[store(0)]]Name <<[name(1)]]Assignments <<[New@List[]]]Blocks <<[New@List[]]
+	out(0) <- [[[[Build["Global Node"]]Store <<[store(0)]]Name <<[name(1)]]Assignments <<[List[]]]Blocks <<[List[]]
 :|
 
 Add to Worker@Global Node(5,3)
@@ -516,7 +516,7 @@
 
 New@Literal Node(1,1)
 |:
-	out(0) <- [[[Build["Literal Node"]]Value <<[value(0)]]Assignments <<[New@List[]]]Blocks <<[New@List[]]
+	out(0) <- [[[Build["Literal Node"]]Value <<[value(0)]]Assignments <<[List[]]]Blocks <<[List[]]
 :|
 
 Add to Worker@Literal Node(5,3)
@@ -599,7 +599,7 @@
 |:
 	If[[block count(3)] > [0]]
 	|:
-		after, before <- [string(0)]Get DString[[[New@List[]]Append[begin comment(1)]]Append[end comment(2)]] |::| |::|
+		after, before <- [string(0)]Get DString[[[List[]]Append[begin comment(1)]]Append[end comment(2)]] |::| |::|
 		|:
 			If[[~] = [begin comment(1)]]
 			|:
@@ -686,7 +686,7 @@
 	:|
 :|
 
-Blueprint(4,1)
+PBlueprint(4,1)
 |:
 	,whitespace name <- [string(0)]Get Comment DString[[params(1)]Block Begin >>, params(1)]
 	|:	
@@ -697,7 +697,7 @@
 		|:
 			body lines <- [body]Split["\n"]
 			more lines <- [[[body lines]Length] - [1]] + [name lines]
-			fields <- Fold[["Process Blueprint Field"]Set Input[2, [params(1)]Blueprint Type Delim >>], New@List[], Filter[Map[body lines, ["Trim"]Set Input[1,"\n\r\t "]], "Filter Empty"]]
+			fields <- Fold[["Process Blueprint Field"]Set Input[2, [params(1)]Blueprint Type Delim >>], List[], Filter[Map[body lines, ["Trim"]Set Input[1,"\n\r\t "]], "Filter Empty"]]
 			new tree <- [tree(2)]Blueprints << [ [[tree(2)]Blueprints >>]Set[name, New@Blueprint Definition[name, fields]] ]
 			out(0) <- Null[~, params(1), new tree, [lines(3)] + [more lines]]
 		:| |::| |:
@@ -730,7 +730,7 @@
 	If[[check block]Starts With[[params(1)]Block Begin >>]]
 	|:
 		,begin block <- [check block]Slice[[[params(1)]Block Begin >>]Length]
-		trees, after block <- Worker Body[begin block, params(1), New@List[]]
+		trees, after block <- Worker Body[begin block, params(1), List[]]
 		blocks(0), after(1) <- Get Expression Blocks[after block, params(1), [blocks(2)]Append[trees]]
 	:||:
 		If[[check block]Starts With[[params(1)]Empty Block >>]]
@@ -762,7 +762,7 @@
 
 Parse String(3,2)
 |:
-	delims <- [[New@List[]]Append[[params(1)]String End >>]]Append[[params(1)]String Escape >>]
+	delims <- [[List[]]Append[[params(1)]String End >>]]Append[[params(1)]String Escape >>]
 	after, before, delim <- [string(0)]Get Comment DString[delims, params(1)]
 	|:
 		If[[delim] = [[params(1)]String End >>]]
@@ -839,7 +839,7 @@
 		If[[name]Starts With[[params(1)]List Begin >>]]
 		|:
 			,list start <- [name]Slice[[[params(1)]List Begin >>]Length]
-			value,after(1) <- Parse List[list start, params(1), New@List[]]
+			value,after(1) <- Parse List[list start, params(1), List[]]
 		:||:
 			If[[[name]Slice[1]]In["-0123456789"]]
 			|:
@@ -933,7 +933,7 @@
 
 Postfix or Infix(2,2)
 |:
-	args, after args <- Parse Arguments[string(0), params(1), New@List[]]
+	args, after args <- Parse Arguments[string(0), params(1), List[]]
 	delims <- [[[[[{"\n"}]Append[[params(1)]Arg Begin >>]]Append[[params(1)]Empty Block >>]]Append[[params(1)]Block Begin >>]]Append[[params(1)]Arg End >>]]Append[[params(1)]List Delim >>]
 	after,before,delim <- [after args]Get Comment DString[delims, params(1)]
 	|:
@@ -971,7 +971,7 @@
 					after expression <- [after literal]Append[[delim]Append[after]]
 					expression, after literal <- Named Pipe or Literal[Right Trim[before, "\r\n\t "], params(1)]
 				:||:
-					expression, after expression <- Prefix[after, params(1), maybe name, New@List[]]
+					expression, after expression <- Prefix[after, params(1), maybe name, List[]]
 				:|
 			:|
 		:||:
@@ -1003,7 +1003,7 @@
 		:|
 		//Any expression can be followed by one or more blocks mapping the inputs of other expressions
 		//to the outputs of the current one
-		blocks,after blocks(1) <- Get Expression Blocks[after expression, params(1), New@List[]]
+		blocks,after blocks(1) <- Get Expression Blocks[after expression, params(1), List[]]
 		final expression(0) <- [expression]Blocks <<[blocks]
 	:|
 :|
@@ -1043,7 +1043,7 @@
 		worker name <- Trim[whitespace name, "\n\r\t "]
 		in out <- [params(1)]In Out Delim >>
 		arg end <- [params(1)]Arg End >>
-		delims <- [[New@List[]]Append[in out]]Append[arg end]
+		delims <- [[List[]]Append[in out]]Append[arg end]
 		after <- [~]Get Comment DString[delims, params(1)] |::| 
 		|:
 			arglist <- Trim[~,"\r\n\t "]
@@ -1067,7 +1067,7 @@
 			|:
 				body text, modifiers <- [after arglist]Get Comment DString[[params(1)]Block Begin >>, params(1)]
 				modified <- Process Modifiers[~, params(1), modifiers]
-				expression trees, after body <- Worker Body[body text, params(1), New@List[]]
+				expression trees, after body <- Worker Body[body text, params(1), List[]]
 				worker <- [modified]Trees <<[expression trees]
 				new worker dict <- [[tree(2)]Workers >>]Set[worker name, worker]
 				out(0) <- Null[after body, params(1), [tree(2)]Workers <<[new worker dict], 0]
@@ -1084,7 +1084,7 @@
 	current line <- 0//[lines(3)] + [Count Substring[whitespace, "\n"]]
 	If[[trimmed]Starts With[ [params(1)]Blueprint >> ]]
 	|:
-		out(0) <- Blueprint[trimmed, params(1), tree(2), current line]
+		out(0) <- PBlueprint[trimmed, params(1), tree(2), current line]
 	:||:
 		If[[trimmed]Starts With[ [params(1)]Import >> ]]
 		|:
@@ -1109,13 +1109,13 @@
 
 Add Wires Helper(5,1)
 |:
-	worker(0) <- [node(1)]Add Wires[worker(0), New@List[], parse worker(3), assignments(4)]
+	worker(0) <- [node(1)]Add Wires[worker(0), List[], parse worker(3), assignments(4)]
 :|
 
 Add Contents(3,2)
 |:
 	worker <- [[program(2)]Find Worker[name(1)]]Uses[[parse worker(0)]Uses Stores >>]
-	trees, contents worker, refs <- Add List to Worker[[parse worker(0)]Trees >>, worker, program(2), parse worker(0), New@Dictionary[]]
+	trees, contents worker, refs <- Add List to Worker[[parse worker(0)]Trees >>, worker, program(2), parse worker(0), Dictionary[]]
 	Fold[[["Add Wires Helper"]Set Input[3, parse worker(0)]]Set Input[4, refs], contents worker, trees]
 	out(0) <- [parse worker(0)]Trees <<[trees]
 	key(1) <- name(1)
@@ -1147,7 +1147,7 @@
 
 Tree to Program(1,1)
 |:
-	out(0) <- _Tree to Program[parse tree(0), [New@Program[]]Add Builtins]
+	out(0) <- _Tree to Program[parse tree(0), [Program[]]Add Builtins]
 :|
 
 Needs Imports(3,1)
@@ -1170,7 +1170,7 @@
 
 Process Imports(2,1)
 |:
-	needs import <- Fold["Needs Imports", New@List[], [parse tree(0)]Imports >>]
+	needs import <- Fold["Needs Imports", List[], [parse tree(0)]Imports >>]
 	If[[[needs import]Length] > [0]]
 	|:
 		import tree <- Fold[["Do Import"]Set Input[3, params(1)], parse tree(0), needs import]
@@ -1234,16 +1234,16 @@
 				|: _REPL[params(0), _Tree to Program[import tree, prog(1)], ~] :|
 			:|
 		:||:
-			trees <- Worker Body[[line]Append["}"], params(0), New@List[]]
-			tree <- [New@Worker Node["Val", [New@List[]]Append[[trees]Index[0]]]]Assignments <<[{"__out"}]
-			this stores <- [[tree]Gather Stores[params(0), New@Dictionary[]]]Keys
+			trees <- Worker Body[[line]Append["}"], params(0), List[]]
+			tree <- [New@Worker Node["Val", [List[]]Append[[trees]Index[0]]]]Assignments <<[{"__out"}]
+			this stores <- [[tree]Gather Stores[params(0), Dictionary[]]]Keys
 			next stores <- Fold["_Init Used Store", stores(2), this stores]
 			|:
-			pworker <- [[New@Parse Worker["__Eval", New@List[], {"__out"}, 0]]Trees <<[[New@List[]]Append[tree]]]Uses Stores <<[this stores]
+			pworker <- [[New@Parse Worker["__Eval", List[], {"__out"}, 0]]Trees <<[[List[]]Append[tree]]]Uses Stores <<[this stores]
 			:|
 			[[prog(1)]Find Worker["__Eval"]]Clear
 			|: Add Contents[pworker, "__Eval", prog(1)]
-			|: Pretty Print[[[[prog(1)]Find Worker["__Eval"]]Do[New@List[]]]Index[0], ""]
+			|: Pretty Print[[[[prog(1)]Find Worker["__Eval"]]Do[List[]]]Index[0], ""]
 			|: _REPL[params(0), prog(1), next stores] :| :| :|
 		:|
 	:|
@@ -1253,7 +1253,7 @@
 |:
 	Print["Rhope Alpha 2\nCopyright 2008 by Michael Pavone\nEntering interactive mode\n"]
 	prog <- Tree to Program[Null["Val[in:out]\n{\n out <- in\n}\n__Eval[:__out]\n{\n}\n", params(0), New@Parse Program[], 0]]
-	_REPL[params(0), prog, New@Dictionary[]]
+	_REPL[params(0), prog, Dictionary[]]
 :|
 
 Add If Store(3,1)
@@ -1313,7 +1313,7 @@
 		Null[text, params, New@Parse Program[], 0]
 		|:
 			tree <- Process Imports[~, params]
-			Init Used Stores[tree, New@Dictionary[]]
+			Init Used Stores[tree, Dictionary[]]
 			|: [Tree to Program[tree]]Run[[args(0)]Tail[1]] :|
 		:|
 	:||:
--- a/webserver.rhope	Tue Dec 01 03:59:31 2009 -0500
+++ b/webserver.rhope	Tue Dec 22 01:22:09 2009 -0500
@@ -34,7 +34,7 @@
 
 HTTP Response[client,type,content length,headers,code:out]
 {
-	start headers <- [New@Dictionary[]]Set["Content-Type", type]
+	start headers <- [Dictionary[]]Set["Content-Type", type]
 	If[[content length] < [0]]
 	{
 		default headers <- [start headers]Set["Transfer-Encoding", "Chunked"]
@@ -59,7 +59,7 @@
 HTTP Not Found[client]
 {
 	string <- "<html><head><title>Document Not Found</title></head><body>The document you requested is not available on this server.</body></html>"
-	HTTP Response[client, Get Content Type[".html"], [string]Length, New@Dictionary[], "404 Not Found"]
+	HTTP Response[client, Get Content Type[".html"], [string]Length, Dictionary[], "404 Not Found"]
 	{
 		[~]Put String[string]
 	}
@@ -75,28 +75,43 @@
 	}{
 		handlerpath <- "/"
 	}
-	[handler]Index[handlerpath]
+	host <- [headers]Index["Host"] {}
+	{
+		host <- ""
+	}
+	
+	the handler <- [handler]Index[[host]Append[handlerpath]] {}
+	{
+		the handler <- [handler]Index[handlerpath] {}
+		{
+			,newpath <- [path]Slice[1]
+			If[[newpath] = ["default.css"]]
+			{
+			file <- <String@File[newpath]
+			content length <- Length[file]
+			If[[content length] > [0]]
+			{
+				junk,data <- [file]Get FString[content length]
+				[HTTP OK[client, Get Content Type[path], content length, Dictionary[]]
+				]Put String@Net Client[data]
+			}{
+				HTTP Not Found[client]
+			}
+			}{
+				HTTP Not Found[client]
+			}
+		}
+	}
+
+	Val[the handler]
 	{
 		If[[[parts]Length] > [1]]
 		{
 			queryvars <- Dict Split[[parts]Index[1], "=", "&"]
 		}{
-			queryvars <- New@Dictionary[]
+			queryvars <- Dictionary[]
 		}
-		[~]Do@Worker[ [[[[[New@List[]]Append[client]]Append[path]]Append[type]]Append[queryvars]]Append[headers] ]
-	}{
-
-		,newpath <- [path]Slice[1]
-		file <- <String@File[newpath]
-		content length <- Length[file]
-		If[[content length] > [0]]
-		{
-			junk,data <- [file]Get FString[content length]
-			[HTTP OK[client, Get Content Type[path], content length, New@Dictionary[]]
-			]Put String@Net Client[data]
-		}{
-			HTTP Not Found[client]
-		}
+		[~]Do@Worker[ [[[[[List[]]Append[client]]Append[path]]Append[type]]Append[queryvars]]Append[headers] ]
 	}
 	
 }