From 1c2611c467410fbfcd9e6791f4d2dbaaa02bcd47 Mon Sep 17 00:00:00 2001 From: ayekat Date: Mon, 10 Nov 2014 17:45:49 +0100 Subject: [PATCH 1/2] Add dc http://en.wikipedia.org/wiki/Dc_(computer_program) --- d/dc.dc | 1 + 1 file changed, 1 insertion(+) create mode 100644 d/dc.dc diff --git a/d/dc.dc b/d/dc.dc new file mode 100644 index 00000000..50392e84 --- /dev/null +++ b/d/dc.dc @@ -0,0 +1 @@ +[Hello World]p From 53e11a80439b692e20bcb758f5977c8dae5d69e1 Mon Sep 17 00:00:00 2001 From: ayekat Date: Mon, 5 Jan 2015 19:09:10 +0100 Subject: [PATCH 2/2] [dc] Fix stack behaviour It's better to pop the value from the stack upon printing it. As dc does not provide any command to achieve that together with printing a newline after the value, we store the newline together with the value. --- d/dc.dc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/d/dc.dc b/d/dc.dc index 50392e84..62b3100c 100644 --- a/d/dc.dc +++ b/d/dc.dc @@ -1 +1,2 @@ -[Hello World]p +[Hello World +]n