|
[26 May 2012|08:19pm] |
I chatted with Sean today for a while and he left me with a cute types puzzle. The puzzle is, assign types to the ?s in the signature
sig
val blank : ?
val binop : (int * int -> int) -> ?
val unop : (int -> int) -> ?
val const : int -> ?
val eval : ?
end
and implement it in a structure S such that the following makes sense:
open S
(* expression with holes: [ ] + (~[ ] + (2 * [ ])) *)
val f = eval (binop (op+) blank (binop (op+) (unop (op~) blank) (binop (op *) blank (const 2))))
val _ = print (Int.toString (f 100 2 3000)) (* prints 100 + (~2 + (2 * 3000)) = 6098 *)
val _ = print "\n"
What's going on here is f builds up an expression tree out of binary and unary operators and integer constants and blank holes, calls eval on it, and this has the type int -> int -> int -> int which is a curried type with three integer arguments, equal to the number of occurrences of "blank" in the definition of f.
But how can you get eval to have a type that always has one curried argument for each blank, and in fact evaluates the right expression? ( my solution; spoilers! )
|
|
|
[25 May 2012|07:21pm] |
|
The awesomest kind of performance bug is when you realize it's taking a long time to render an image because you're accidentally rendering it all over again once per pixel in the image. Nothin' like a good ol' O(n4) algorithm.
|
|
| PUNCH THE DOG! |
[26 May 2012|02:19pm] |
Odd that Gaines dog food would promote (although they don't really say it) a punching bag toy with a dog on it.
|
|
|
[24 May 2012|02:01pm] |
|
Watched some more Freaks and Geeks with K. There was a great moment where the nerd heroes of the show triumphantly did a Successful Sports Thing (i.e., caught a fly ball, yielding one out) --- but only one such thing. Which was nice, because it was more realistic than Winning The Entire Important Sports Game.
|
|
| MEAT (well, Beer, actually) |
[26 May 2012|08:09am] |
Carling's Red Cap Ale
If you want some fun, colorful, slightly weird ads, take a look at the Red Cap ads. Take for example the red cap they're about to grill!

|
|
| Look what else Ford made |
[26 May 2012|08:05am] |
Ford Charcoal Briquets
From the waste wood of Model A production, or so I read.

Well that's 13 uses... I'm not sure I can think of 87 more. Can you?
|
|
| let's get an opening line for our summer story!!! |
[26 May 2012|09:58am] |
Since our contest starts June 1st, let's have our first story day Thursday May 31st and then we'll have day 2 on Friday June 8th, day 3 Saturday June 16th (and we'll go progressively one day further each week through the summer, that way people who only get online on certain days have an opportunity to join in the fun...).....
This of course will be our opening ad....So how shall our story start?? Please post opening sentence suggestions in the comments here, if you like a suggestion, comment and say so; and i'll post a list of them to vote on Monday and then post the winner Wednesday.....Thursday morning I'll post this ad with our winning sentence!
It doesn't have to be a complete sentence, it probably shouldn't be actually so the story can continue....yes, you can post more than one suggestion!! (ETA: i just posted 3 :)
|
|
|
[26 May 2012|08:41am] |
|
|
| My tweets |
[26 May 2012|12:00pm] |
- Fri, 12:15: Amusement watching Ziggy trying to 'rub her collar off' on the scratch post. Doesn't like wearing it. It's the price for her Houdini act.
|
|
| And they wonder why Support Staff get a bad rap? |
[26 May 2012|09:10am] |
| [ |
mood |
| |
annoyed |
] |
I use Corel PaintShopPro along with other stuff, because I have yet to find ONE program that does it all for me. So, I have been having problem with it opening RAW files from my Mini Canon and my Big Gun Canon (pun intended) aka the G1X and the 5DMkIII
I told them at the outset what cameras, and they kept having me tweak this, reset that, uninstall this, reinstall that, so after weeks of jumping through all these hoops, they say "Oh! Our bad! Your cameras aren't supported yet."
That's what you get because they scan to find a term, copy and paste from their FAQ (even though I had told them I read it, and had already done everything listed) instead of READING THE $#@*&@%$ SUPPORT REQUEST!
|
|
| News Post: Disruptive Technology |
[25 May 2012|08:05pm] |
|
http://penny-arcade.com/2012/05/25/disruptive-technology Tycho: Whenever we come up with something dumb, something that’s supposed to be a joke like the game in the strip, a lot of times it starts to grow on me. I don’t know! I think there’s a lot of headroom there. I do have a Kickstarter problem, though, and it may require a technology a sophisticated as Gabriel’s to bring this irresistible drive to its conclusion. Part of it is that… yeah. Right? Arimaa is cool, and a beautiful set that honors Arimaa is wanty, that is to say, it generates want. I think that I could elaborate
|
|
|
[25 May 2012|03:21pm] |
|
|
| Masonite |
[25 May 2012|11:25am] |
I want one!
|
|
| Build your OWN Barbecue |
[25 May 2012|07:51am] |
As a profitable business! Cash in on the "national rage for outdoor eating"!
Shapely lady not included!

It might look like this! Lucy did it, and so can you!

what do I tag this? can we get a bbq tag, or business tag?
|
|
| navigation |
| [ |
viewing |
| |
most recent entries |
] |
| [ |
go |
| |
earlier |
] |
|
|
|
|