diff src/rlm/meditations.clj @ 0:78a630e650d2

initial import
author Robert McIntyre <rlm@mit.edu>
date Tue, 18 Oct 2011 00:57:08 -0700
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/rlm/meditations.clj	Tue Oct 18 00:57:08 2011 -0700
     1.3 @@ -0,0 +1,155 @@
     1.4 +(ns rlm.meditations)
     1.5 +
     1.6 +(defn ten-times
     1.7 +  "Why do people have to argue so much?  I feel so alone and
     1.8 +   angry. Clojure helps me to calm down.  Just today I went to pour
     1.9 +   house, and al through the walk, there was so much negativity.  Most
    1.10 +   of this comes from Mike, I think.  He himself feels insecure
    1.11 +   because Duncan and Acrefoot were talking about inodes and he didn't
    1.12 +  know what they were.  Duncan was talking about a ray tracer which
    1.13 +  would be able to cmompute new frames in real time.  I thought that
    1.14 +  sounded neat, but I don't think 20 cores would be enough to really
    1.15 +  get it right..  You probably need a whole separate computer
    1.16 +  archeticture to actualy do it, like the ray tracing FPGA setup that
    1.17 +  some peoplle in 6.375 made last semester. When we gmade it to Pour
    1.18 +  House, there seemed to be some event going on.  We went downstairs
    1.19 +  and found that it was Amnesty International, MIT division, holding a
    1.20 +  petition for the conditional release of some journalists from
    1.21 +  somewhere.  The girl wwho introduced us to the program was drunk.
    1.22 +  There were no tables,  bbut the bar was mostly empty.  I suggested
    1.23 +  to Mike that we might sit at the bar, but he said that that would
    1.24 +  kill the experience for him since then we would be unable to talk to
    1.25 +  everyone eexcept those next to us.  Then he told me that If I wanted
    1.26 +  t sit down that I could just do that.  He was saying that I didn't
    1.27 +  care about anything but food and that it woI wasn't really part of
    1.28 +  the group anyway, so it was really just up to me wherever I wanted
    1.29 +  to sit.  I found this to be very cruel and was sad.  He didn't even
    1.30 +  realize that he made me sad, which means he can't put himself in my
    1.31 +  shoes even a bit.  Then he got into an argument with acrefoot about
    1.32 +  whether there was a croud above us or not.  Acrefood had not
    1.33 +  nnoticed the croud when we walked in, so he thought we might go up
    1.34 +  thereand see if we could get a table.  Mike kept arguing about which
    1.35 +  way was the front or back of the store because he didn't remember
    1.36 +  the orientation of the upper level after we walked down the stairs.
    1.37 +  ThBoth men were missing something that the other knew, but the
    1.38 +  difference between acrefoot and Mike was that Mike in every word he
    1.39 +  said was trying to put acrefoot down and belittle his intelligence
    1.40 +  by arguing with him, while acrefoot tried to explain which way was
    1.41 +  the front many times whithout changing the subject.  Finally
    1.42 +  acrefoot found out about the croud, but by that time, he was
    1.43 +  upsetand wanted to go up to the upper level anyway just to get away
    1.44 +  from Mike.  I wanted to go too and said so.  Mike dismissively said
    1.45 +  that it was OK to go up if we wanted, and I started to follow
    1.46 +  acrefoot to the stairs.  But then acrefoot asked Chris if he wanted
    1.47 +  to go with him.  Am I invisible or something?  Acrefood did not mean
    1.48 +  this out of malice, he just literally din't see me  and so asked
    1.49 +  chris.  Still, this made me feel bad because I was already feeling
    1.50 +  bad. Acrefoot and I went upstairs and found that the croud which was
    1.51 +  there prevented us from getting a seat.  We went back down and there
    1.52 +  was Mike, sitting at a table that had just cleared.  People started
    1.53 +  to sit down at the table, and then Duncan sat next to Mike and
    1.54 +  l positioned his body in such a way that he took up the remainder of
    1.55 +  the three person booth seat.  Yen-yu told him to move but he acted
    1.56 +  like he couldn't hear her.  I was standing right next to him and
    1.57 +  obviously (to me and most people) wating for my seat, but he would
    1.58 +  not move.  This is Duncan being his normal mildly-autustic self.  I
    1.59 +  can't blame him for it, as he just gets so focoused sometimes that
    1.60 +  he doesn't know how to deal with people.  I have some of the same
    1.61 +  problems.  I like Duncan, but what he did made me feel sad even
    1.62 +  more, because I was already feeling upset at his point.  With three
    1.63 +  random acts of meanness and inconsiderateness behind me and nothing
    1.64 +  that good to look forward to, I just left.  I didn't feel like
    1.65 +  talking to anyone anymore, but wanted to be by myself. I hate how
    1.66 +  Mike dismisses me, how his personality is alined to casual meanness,
    1.67 +  and how  he doesn't even have enough self reflection to know when he
    1.68 +  is hurting others.  I hope that he matures more and becomes a very
    1.69 +  nice person, but I worry about him.  I think I think about him too
    1.70 +  much..  I'm becomming more widthdrawsn from interacting with these
    1.71 +  nerds with half-baked social programming.  It's hard living with
    1.72 +  people who can casually just ithrow insults at you  that would
    1.73 +  demand a fight anywhere else.  Where people can ignore you if they
    1.74 +  think you're less intelligent than they are.  I don't like it on
    1.75 +  tetazoo.  I don't like myself, and I don't like the people here, so
    1.76 +  what am I supposed to do? I have to learn to deal or remove myself
    1.77 +  from this situation. I think I'd be sad if I was all alone, though.
    1.78 +  I left the resturant.  I just didn't want to talk t o anyone
    1.79 +  anymore.  I wanted to be alone.  I whish Dylan was here, or even
    1.80 +  anothere copy of myself to talk to.  I'm so lonely..  They've gotten
    1.81 +  into my head.  When I type that last sentence, I hear \"oh, the poor
    1.82 +  buy is sad, no one loves him.  you're not good enough to be loved.\"
    1.83 +  That part of me is not helpful.  It's echos of people being mean to
    1.84 +  me in the past.  If I was here to talk to, what would I say?  I
    1.85 +  would say, 'what's stopping you from just finding a new life, or
    1.86 +  just being they type of person that people like and who gets along
    1.87 +  wwith everyone?
    1.88 +  I'd like to do this but it's so hard to just do a 180 on my
    1.89 +  emotions..  As I was walking down the street, I overheard arguing
    1.90 +  people and happy people in equal measure.  At the time all I
    1.91 +  processed were the angry , arguing people, but the goodness was
    1.92 +  there too.  So, it's just a matter of who you hang out with? Maybe
    1.93 +  the clojure community can be ,y community? At least I have one good
    1.94 +  friend in Pablo.  Dylan is good but he's far away and has a mountain
    1.95 +  of his owwn problems he has to work through before he can do
    1.96 +  anything with me..I feel lame, because I've been around critical
    1.97 +  people for too long. I want to change, become more affable, but I
    1.98 +  don't know how. What should I do now? I think I'll go swimming.
    1.99 +  But, I don't think they'll let me actually go.  I loaned my ID card
   1.100 +  to pablo.
   1.101 +   This is an experiment in nested closures that makes a function that
   1.102 +   must be called ten times to yield its value. It reminds me of
   1.103 +   taylor aproximations to a sin wave, which are only accurate for a
   1.104 +   finite stretch of the reals, but that stretch can be made as long
   1.105 +   as you want by adding more terms."
   1.106 +  []
   1.107 +  (let [count 10
   1.108 +	return (fn return [n]
   1.109 +		 (if (= n 0) "the end"
   1.110 +		     (fn [] (return (dec n)))))]
   1.111 +    (return (dec count))))
   1.112 +
   1.113 +(defn onion [f n] (if (zero? n) f (recur (fn[]f) (dec n))))
   1.114 +
   1.115 +(defn onion++[f n] (if (zero? n) f (recur (fn[& _]f) (dec n))))
   1.116 +
   1.117 +(defn onion+ [f n] (reduce (fn [f _] (fn [] f)) f (range n)))
   1.118 +
   1.119 +(defn onion-n [n f] (onion f n))
   1.120 +
   1.121 +
   1.122 +(defn ttt [f & knocks]
   1.123 +  (
   1.124 +  (cond (empty? knocks) f
   1.125 +	(
   1.126 +
   1.127 +
   1.128 +(defn onion++ [f & knocks]
   1.129 +  (let[forever-onion (fn g[& _]g)]
   1.130 +    (reduce (fn [g knock]
   1.131 +	      (fn[& args] (if (=(first args) knock) g forever-onion)))
   1.132 +	    f knocks)))
   1.133 +
   1.134 +
   1.135 +
   1.136 +(defn treasure
   1.137 +  ([X n]
   1.138 +     (fn[& args]
   1.139 +       (let [k (count args)]
   1.140 +       (cond
   1.141 +	(< k n) (println "It's to your right!")
   1.142 +	(> k n) (println "It's to your left!")
   1.143 +	(= k n) (do (println "Apply force here to dig!") (delay X))))))
   1.144 +  ([X n & ns]
   1.145 +     (apply treasure (treasure X n) ns)))
   1.146 +
   1.147 +
   1.148 +(def X (treasure "I'm treasure!" 5 3 2 6))
   1.149 +(defn soln []
   1.150 +  (force ((force ((force ((force (X 1 1 1 1 1 1 ))1 1  )) 1 1 1)) 1 1 1 1 1 ) ))
   1.151 +
   1.152 +
   1.153 +(defn onion* [f n]
   1.154 +  (if (zero? n)
   1.155 +    f
   1.156 +    (fn [] (onion* f (dec n)))))
   1.157 +
   1.158 +