omegazero's comments

omegazero | 15 years ago | on: Level 3 outbid Akamai on Netflix by reselling stolen bandwidth

Look at both ends of the transmission: If both endpoints are inside Comcast's network, Comcast receives payments from both the sender and receiver to cover the costs. If one end point is in Level3's network and Level3 refuses to pay, only one side is paying for the connection.

Or consider just the part of the transmission that occurs within Comcast's network. Case 1: data is sent from Comcast-user-A to Comcast-user-B, both pay a share of the costs. Case 2: data is sent from Comcast-user-A to Level3-Border-Router, only Comcast-user-A pays.

omegazero | 15 years ago | on: Lisk — Lisp and Haskell

I don't see how it's tackling the 'where' block--or it that would even be possible under this scheme. I find that my code is much more legible with the housekeeping and other less important helper-functions defined after the important bits. The clunky code that the author complains about can be much improved using where clauses to break it into chunks.

Taking the authors example and moving some of the processing to a where clause makes the flow much easier to follow:

    someFunction conn (Foo n) (K {x=zot}) plib = do
      withTransaction conn $ \db ->
         coconut <- sizzleQuery [Foob n]
         potato  <- sizzleQuery [Foob n]
         let sizzle = (zotify coconut) ++ potato ++ gravy
             record = fasterize $ makeRecord' sizzle
             date = dateOrError sizzle
          in catch handler $ insertIntoDB sizzle plib

      where sizzleQuery = queryTheDB "select * from sausages where sizzle = ?"
            zotify c = zot (plib $ zip [1..] c)
            dateOrError d = error "Unable to parse date"
                            `fromMaybe` parseDate d "date"
            handler e = do something `with` (k $ the exception)
            makeRecord' s = (MakeRecord { recName = sizzle "name"
                                            , recAge  = sizzle "age"
                                            , recDate = date
                                            })
                                $ Plib </> (fromMaybe "" $ sausages >>= bacon)

Also one of my favorite features of Haskell is using the $ as an unmatched left parenthesis, saving you from that blob of closing parenthesis that every lisp expression accumulates.

One last thing, the author complains about the ambiguity of the indentation, but doesn't make any comment about the brace & semi-colon syntax. I personally don't like it, but it should be explained why it isn't an acceptable solution.

omegazero | 16 years ago | on: Overweight students forced to take fitness course or not graduate

I don't get it. My college required 3 credits of physical education/nutrition to graduation and we didn't have newspapers bemoaning that we were forced to take these courses. The point of controversy seems that they only require the course for overweight students--but on the other hand students who can demonstrate proficiency in other subjects (by placement tests or AP scores for example) can skip otherwise mandatory classes. (on the third hand BMI is probably a lot closer to bullsht than an AP score)

"Forced" seems a bit strong a word though when it's your choice where (or if) you attend college.

omegazero | 17 years ago | on: Instead of charging $X, why not charge $2X with prob 1/2 and $0 with prob 1/2?

To sell your good a consumer must be both willing and able to pay. Under this system that would be the 2X price since he doesn't know which price he will actually get (if he knew ahead of time, or could back out of the deal after learning the price, you'd always be giving them away).

There's always going to be less people you can afford 2X than X.

page 1