changeset 18:a0e66161bde0

for bug investigation
author William Morgan <bill@mrgn.org>
date Fri, 09 Aug 2013 12:55:38 -0700
parents 566960135ea1
children 5a025e6c6f89
files src/requests.tp
diffstat 1 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/requests.tp	Fri Aug 09 04:31:14 2013 -0700
+++ b/src/requests.tp	Fri Aug 09 12:55:38 2013 -0700
@@ -1,11 +1,21 @@
 #{
-	evalRequest <- :args {
+
+	quote <- :str {
+		"\"" . str . "\"" 
+	}
+
+	evalRequest <- :_id args {
 		#{
-			id <- "a"
-			arguments <- args
+			id <- _id
 			string <- {
-				temp <- ""//arguments fold: "" with: :acc el {acc . el}
-				"id" . id . "arguments" . temp
+//				idStr <- id// method not implemented
+//				idStr <- _id//method not implemented
+// 				idStr <- "a"//good
+//				idStr <- quote("id") . quote(id)//segfault
+//				idStr <- "\"id\":\"" . id . "\""// method not implemented
+//				argsStr <- ""//arguments fold: "" with: :acc el {acc . el}
+				argsStr <- "b"
+				"{" . idStr . "," . argsStr . "}"
 			}
 		}
 	}
@@ -13,7 +23,6 @@
 	guessRequest <- :id :prog {
 		#{
 			string <- {
-				//remove the second escaped quote, it will compile.
 				idStr <- "\"id\":\"" . id . "\""
 				progStr <- "\"program\":\"" . prog . "\""
 				"{" . idStr . "," . progStr . "}"
@@ -22,7 +31,7 @@
 	}
 
 	main <- {
-		//print: ((evalRequest: #[1 2 3]) string)
+		print: ((evalRequest: #[1 2 3]) string) . "\n"
 		print: ((guessRequest: "someId" "someProg") string) . "\n"
 	}
 }