Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

K&R C is the best book ever

Name: Anonymous 2010-01-01 21:49

Holy shit, it's teaching me how to make a Reverse Polish Notation calculator!

Name: Anonymous 2010-01-01 22:01

SICP is the best book ever. Holy shit, it's teaching me how to conjure the spirits of the computer with my spells!

Name: Anonymous 2010-01-01 22:07

GEB is the best book ever. Holy shit, it's teaching me music and Zen and math!

Name: Anonymous 2010-01-01 22:17

Inspiration for the Interactive Generation is the best book ever.
Holy shit, it's teaching me how to deliver innovative concepts that simply cannot be found anywhere else!

Name: Anonymous 2010-01-01 22:19

Holy shit, I saw OP's task and the thought of how easy it would be to implement it made me write the following:

(deftype operation () '(member + - * /))
(defun rpn-eval (exp &aux (stack nil)) 
  (dolist (e exp (first stack))
    (push
     (typecase e
       (integer e)
       (operation
        (let ((v1 #1=(pop stack)) (v2 #1#)) (funcall e v2 v1))))
     stack)))
; (rpn-eval '(5 1 2 + 4 * + 3 -)) => 14

It doesn't check if the stack is empty, but that would only be like 2 extra lines of code for an added assert.

Name: Anonymous 2010-01-01 22:26

>>5
>making an RPN calculator in lisp

That's like implementing a brainfuck interpreter in brainfuck.

Name: Anonymous 2010-01-01 22:33

>>6
I think you have S-expressions and reverse-polish notation confused.

Name: Anonymous 2010-01-01 23:37

XKCD is the best book ever
Holy shit, it's teaching me how to make a Reverse Polish Sausage![1]





                 
1. http://xkcd.com/645/

Name: sage 2010-01-01 23:47

oh man haha randall is so whacky! xD

Name: Anonymous 2010-01-02 0:28

>>7
I think you have sex and poland confused.

Name: Anonymous 2010-01-02 12:55

Bible Black is the best book ever.
Holy shit, it's teaching me how to summon demons and make little girls into my sex slaves!

Name: Anonymous 2010-01-02 13:04

>>11
Just wait till you get to the chapter on being anally raped by a she-male

Name: Anonymous 2010-01-02 13:42

>>8
I find this utterly offensive

Name: Anonymous 2010-01-02 13:54

>>13
I don't

Name: Anonymous 2010-01-02 14:34


Name: Anonymous 2010-01-03 3:03

Boku no Pico is the best book ever.
Holy shit, it's teaching me how to have sex with transsexual children!

Name: Anonymous 2010-01-03 3:13

>>16
transsexual
That word doesn't mean what you think it means!

Name: Anonymous 2010-01-03 3:33

>>16
I prefer Boku no Emacs

Name: Anonymous 2010-01-03 14:25

>>17

Obviously, you haven't watched Boku no Pico.

>>18

I prefer Boku no Notepad++ myself.

Name: Anonymous 2010-01-03 15:30

>>19
Transvestite != Transexual

Name: Anonymous 2010-01-03 16:14

>>15
I find this utterly offensive.

Name: Anonymous 2010-01-03 16:20

>>20

Anus != hax

Name: Anonymous 2010-01-03 16:34


<prog>:1262400592:22
    Couldn't match expected type `Anus'
           against inferred type `Anus -> Anus'
    In the second argument of `(!=)', namely `hax'
    In the expression: Anus != hax
    In the definition of `it': it = Anus != hax

Name: Anonymous 2010-01-03 16:39

>>3
what is GEB?

Name: Anonymous 2010-01-03 16:41

>>24
I dunno. What is Wikipedia? What is Google?

Name: Anonymous 2010-01-03 16:41

>>24
godel escher and bach i guess

Name: Anonymous 2010-01-03 18:37

>>26
DON'T HELP HIM!

Name: Anonymous 2010-01-03 22:36

>>23
Anus haxxing requires IO. Did you put the anus into a monad?

Name: Anonymous 2010-01-10 4:54

>>28
MONADS MY GONADS

Name: Anonymous 2010-01-10 12:16

>>28
No, the nomad already had his anus.

Name: Anonymous 2011-02-03 4:55

Don't change these.
Name: Email:
Entire Thread Thread List