We took the Shinkansen from Kyoto back to Tokyo and it’s fast, it’s OMG fast. The line going the opposite way passes you on rails six feet away and so quickly, just a rush of air, one heartbeat and gone, a quarter-mile of train snapping away like a rubber band.
It’s basically impossible to take pictures of it, but if you like I can show you my white blur collection. I’m used to travelling on ViaRail in Canada, and the Kyoto Shinkansen trip was a bit of a long slow shock. Both cities are huge, Tokyo in particular is vast and high-density and the rail line runs mostly parallel to the coast, so instead of spending your time looking out the window at hours of forests and farmland there’s only about twenty minutes on the three hour trip that don’t feel like you’re rocketing through the middle of a city, scattered around in five-minute chunks. On the trip out from Tokyo, I just kept staring out the window at the passing buildings thinking, Jeebus, does this place ever end?
I’ve never seen a city like Tokyo before, and it’s hard to believe that it can exist at all as it is. 12 million people or so, and it’s clean enough that you could eat off the roads, none of which are in straight lines and many of which don’t even have names or even unique identifiers. But every morning it seemed like a brand new city had been cut out of its shrinkwrap and carefully placed around us, pristine and barely used; I felt like I’d have to be a powerful man with powerful enemies and a shadowy past just to be able to find somebody willing to put gum on a sidewalk.
The thing that kept reinforcing this impression was that a lot of the time Tokyo is quiet, eerily quiet. Step off a main road into any of the narrow, labyrinthine little streets that make up much of the city and you might as well have stepped onto the moon; the background hum you can hear in every city I’ve ever known is gone, baffled right down by the tall buildings and enthusiastically non-Roman road plan. So, is this when the ninjas jump out, I kept thinking? I can’t hear my theme music, so if they jump me now, I might not win.
Sadly I didn’t see any ninjas, but I suppose if I had they’d be sad ninjas indeed. Akihabara was enough of a letdown, I didn’t need to get randomly jumped by a bunch of second-rate martial artists. Next time, I’ll have to pack one of these, which I wouldn’t have thought would ever work, but now it’s hard to believe that it wouldn’t. I don’t think that I was more than twenty meters from a vending machine the entire trip.
But when we did find ourselves on a major road, near a train station or somewhere like Ginza or Harajuku, we’d find ourselves in the middle of a huge, noisy, frothing, enthusiastic mess of people, and every day it felt like I was in crowd surfing in the world’s most polite riot. Harajuku was particularly awesome, some of the finest people-watching in the world. There were weekend Elvises (one of whom had procured an enormous pink ‘57 Cadillac from somewhere), crunchy-looking Goth girls, elaborately coiffed Harajuku Maids, cosplayers and vending machines that served iced coffee and beer.
There was even what looked like an impromptu battle-of-the-bands going on, though whoever won that, it was a pyrrhic victory for sure. From what I could make out, there was some boy-band signing session going on nearby, so the cosplayers were out in force, hundreds where there would “normally” only be dozens. It hit me there that all fashion is a strict subset of cosplay, and that the people who embrace that will be able to push at boundaries the rest of us can’t even see, and make the world a lot more colorful, interesting and fun for all of us.
And it also occurred to me, as I was crossing a bridge beer in hand and patient wife in tow to take some pictures a horde of girls in goth-lolita outfits that life had somehow brought me to a point that I was in Japan with a beer in my hand and my wife humoring me as I went to take some pictures of a horde of girls in goth-lolita outfits, and I just started laughing , because being me is awesome.
DNA Lounge update, wherein we network with a socialness.
- Music:The Kills -- Run Home Slow
- Mood:
amused
Why, Debian, Why!?
There are a bunch of good items (many of which are in very good shape, many of which aren't) at my house in Champaign. As I am not in Champaign anymore, I don't have access to them; but I want them out of the house ASAP. So, if you would like any of these, please give my mother (Margie) a call at 377-4554; they will be given away on Wednesday between 5 and 8pm:
- Couch
- dresser
- washer and dryer
- lawn mower (needs tune-up)
- 2 wooden desks
- 1 metal desk
- blue stuffed chair
- office chair
- several stacking padded kitchen chairs
- nightstand
- 2 coffee tables
- round end table
- several plastic patio chairs
- queen sized bed frame and headboard
- queen sized mattress and box springs
- double bed frame & headboard
- small bookcase
- black floor lamp
- brass floor lamp
- small artificial christmas tree
- ladder
- electric clothes steamer
- various cleaning items - brooms, mops
- garden tools
Yet pretty much all programs that involve format strings ought to have the format strings known statically. Even a mini-language like printf turns out to have enough power to not be able to safely process untrusted input, as the "poke" instruction (named
%n) demonstrated by creating a completely new class of security vulnerabilities. And without the compiler to help with type coercions, it's easy to write something invalid, especially when you're playing fast and loose with integer and pointer sizes across platforms.Perl and Ruby neatly sidestep this problem by using string interpolation: at parse/compile time, the compiler scans the strings for bits to be expanded and just rewrites the "format" string to the equivalent concatenation of literal strings and variable values, which then uses the normal language's support for pasting strings together. (Prove it to yourself:
perl -e 'use strict; print "$x";' aborts with a "compilation error".) But sometimes you really just want something like printf, and both those languages fall back on "figure it out at runtime" for that.Supporting printf at all proves to be pretty difficult in more strict languages which generally require all types to be known. OCaml's compiler does some crazy hacks where sometimes a quoted string is interpreted as a
format, a six-parameter type that, for example, needs its own concatenation operator. Haskell at least encodes it in the user-available language with some typeclass magic that gets you to more or less to feature parity with dynamic languages -- failure at runtime if the parameters don't properly line up.But it turns out there's a nice paper that provides a type-safe encoding of printf that doesn't rely on any fancy language features. The paper is structured like this: (1) "wouldn't it be nice if printf worked like this?" (2) "oh wow check it out, here are the functions!" I've been staring at it for a week and though I can sorta see how it works, it's unclear to me how anyone would come up with it. Here's an overview from a person who lacks sufficient brain to say much smarter (me).
To start with, you don't use a string for the format string. This sorta seems like you've already given up, but you could imagine a macro expanding a format string into the proper expression here, much like how Perl/Ruby's interpolation works. Since this is functional code we're talking about, it ends up being an expression involving some functions. Format string concatenation ends up being encodable as composition, which means you end up with the same operator as Perl (
.) for pasting them together.The basic task then is that you need
print (some magic here) to be able to give you a function of varying types, depending on what the magic is, so that print format1 3 "foo" can be type-checked that format expects an int and a string. So the type of printf must be (some magic type involving an a) -> a, where the polymorphic a is a function produced by the magic. And here's where the magic drops, painful in its simplicity:lit :: String -> (String -> a) -> String -> a
lit text k s = k (s ++ text)
int :: (String -> a) -> String -> Int -> a
int k s val = k (s ++ show val)
printf :: ((String -> String) -> String -> a) -> a
printf fmt = fmt id ""And that's it.
lit is what converts a literal string into a format, while int is the placeholder for an int. So "my int is %d\n" would be expressed as lit "my int is " . int . lit "\n". If you drop this in to GHC you'll see that the type of printf (lit "my int is " . int . lit "\n") really is, as you'd expect, Int -> String -- it's waiting for you to give it an int so it can dump out the formatted string. The result of printf is just a plain function, so you do all the normal sorts of things you'd want, like partially apply it or pass it to map. The formatters are plain functions, too, so you can add your own formatter that, for example, can accept a list (as he does in the paper).So how's it work?
Look at the two formatters,
int and lit. The k parameter to the formatters is a continuation: it's where each formatter should pass the string constructed so far when the formatter is done. Then the s input parameter is thestring as constructed so far. You can mentally expand
printf (lit "foo" . int) as (lit "foo" (int (id))) "", where that empty string is your starting string and id is the innermost continuation which just gives you back the string that's beenconstructed.
You can also look at
int like this, just with some added parens for clarity: (String -> a) -> (String -> (Int -> a)). It takes the continuation as a parameter, and the function it returns is sorta the same shape as the continuation but with Int -> a in place of a -- that's how it tacks on its need for an int to the greater formatting requirement.But from there... uh, the types just work out. I don't know. It's pretty much magic.
* Though I'd argue you're in a pretty bad place if printf performance is your bottleneck.
Cutest. Thing. Ever. Six tiny little kittens nursing alongside six tiny little golden retriever pups! Awww!
(link from
- Mood:endeared
- Location:Utila, Honduras
Faculty Advisors: Rosa Arriaga and Santosh Vempala
http://www.cc.gatech.edu/~vempala/u
( details )
( Very cute. )
He's been doing well, even though he's recently lost his best buddy. I think that we are spoiling him a bit though... He is definatly in the house more often, and mum is buying him treats left right and center. He's sleeping in our room at night now, and I think that we're going to keep it that way.
We are taking him to the vet on Friday, to make sure that he doesn't have what Artaemus had. Also to just have a physical, since he's probably past due.
Things are going.. Well, as well as they can be with the loss of Art. We buried him under a tree on the hill behind our place. He grew up here, and I think that coming back made him very happy. So it was a suitable place to put him to rest. Cinder was with us when we buried him, and I think that he understands that he isn't coming back. He doesn't look for him, like you would expect a dog to do when something is missing. Originally, before Art got sick, we would talk about "When Artaemus goes, we'll probably get a new pal for Cinder..." but I don't think that we will any time soon. That wasn't something that we expected to do for years.
Anyway, babbling now. I know that I didn't reply to any comments in my last post. I'd just like to say thank you all for the well wishes, and kind thoughts. I hope that you and your puppies are doing well.
I was just wondering if anyone has any experience with them or know of anyone who has? I've been searching around and am unable to find many reviews for it. They have apartments in all the places that I am traveling - Kiev, Krakow, Budapest, Vienna, Prague, and if I could find a cheap apartment rather than a hostel, I would prefer it.
Also, can anyone recommend some hostels in Kiev specifically, that have airport pick-up? All of the reviews have been mixed from what I can see.
Thanks.
Now,
- I was wondering where I can book a flight from NY to Canada?
- Where in Canada I should go.. What places do you recommend and why?
- Any tips and tricks? Hostels/food/money/safety/etc..
- I hear a lot of people say a week New York is enough, is it? And why?
- Maybe other places in America I should go (already been to California)? And how (train, plane, bus)?
Thanks in advance! :)
Am I being singled out, or is there a new plague of AIM bots going around? I used to get prodded by these stupid things every couple of weeks, but I've blocked a dozen of them in the last week. This time it's usually a bot with "salmon" in its name.
- Music:The Kills -- No Wow (Mstrkrft Remix)
We’re home. No disrespect to our gracious hosts but two weeks away is slightly more than plenty, it turns out.
I’m well behind on my blogging, of course, and have to sort through several thousand pictures to figure out which ones are worthwhile, but the last few days in Japan and a week in Hong Kong are on the way.
But it did lead me to learn inner soles for your shoes are amazing, it saves your feet from so much pain.
Tonight, I am going to Nancy's to find a dress for the reception.
However, after saturday sugar high bratty-ness I have decided to *try* to cut back on some of the sugar I eat... however, you never realize how much sugar you eat in a day until you try to cut it out.
Reality testing ... involves performing an action with results that will be different if the tester is dreaming. By practicing these tests during waking life, one may eventually decide to perform such a test while dreaming, which may fail and let the dreamer realize that they are dreaming. Common reality tests include:(wikipedia on Lucid Dream)
* Looking at one's digital watch (remembering the time), looking away, and looking back. As with text, the time will probably have changed randomly and radically at the second glance or contain strange letters and characters. ...
* Flipping a light switch. Light levels rarely change as a result of the switch flipping in dreams.
* Looking into a mirror; in dreams, reflections from a mirror often appear to be blurred, distorted or incorrect.
* Looking at the ground beneath one's feet or at one's hands. If one does this within a dream the difference in appearance of the ground or one's hands from the normal waking state is often enough to alert the conscious to the dream state.
Open to: All, results viewable to: All
The ladybug Docs sold for $41.99.
That's larceny!![]()
![]()
3 (23.1%)
That's okay for gently used shoes.![]()
![]()
4 (30.8%)
You'll take what you get and you'll be happy! Do you hear me?![]()
![]()
6 (46.2%)
- Location:The Swan
- Mood:meh
Beyond the ABCs of AVCs : robust and adaptive strategies for future communication systems
Anand D. Sarwate
Advisor : Michael Gastpar
Department of Electrical Engineering and Computer Sciences
University of California, Berkeley
Thursday, May 15
1-2 PM
521 Cory Hall
( abstract )
- Mood:
nervous
Managing to be somewhat productive, though. But it will be nice to not be sick.
[1] But still fun, of course. 5x (7 pullups, 7 thrusters 65#, 7 ring dips (assisted), 7 burpees), 12:47.
Since the web browser is the new OS, it should really, really, have the equivalent of a process list. I almost always have a whole bunch of tabs open, and firefox is most of the time using a nontrivial amount of CPU doing not much of anything. I have to guess which tab is causing the problem when the CPU gets pegged, and sometimes it seems that even shutting down all tabs doesn't completely fix the problem. Could somebody please implement metrics on how much CPU each tab/window is using, and get the process separation right so that whenever a tab/window is shut down all remnants of it are completely toast?
- If you are going to use and require a programming style which is necessitate extra whitespace for aesthetic or "readability" reasons, it is absolutely key that you be entirely consistent in the use of that style. Once somebody warps their brain to accept the bizarre infix indentation of expressions, it will be jarring for them to run into code within, say, the same translation unit (i.e. file) which is different. One of the key requirements for implementing non-jarring, reliable code style rules are to come up with rules that are aligned with the syntax of the language itself, and which can be explained in a breath or two. For example, "newline at the end of every statement, no excessive parentheses, whitespace after any reserved keyword not at the end of a line and after commas and between all pairs of non-comma operators and non-operators, indent nested statements and blocks" is fairly logical and straightforward. "Newline at the end of every statement, excessive parentheses, whitespace after any reserved keyword not at the end of a line and after commas (ideally newlines after commas, with indentation to the same level as the opening parenthesis or brace the commas are inside, but sometimes not), whitespace after and before parentheses that "do something" (i.e. which are used to invoke a function or which are part of an if statement) and indent some assignments and all declarations to the same level as nearby assignments and declarations," however, is a bunch of shit that people will screw up and which reflects all sorts of things other than syntax, like a lot of indecision about whether to write if statements like a function call.
- Duplicated code has duplicated bugs. Duplicating code from a common code-path to an uncommon one leads to duplicated bugs that never get fixed in the uncommon path. You're old enough (i.e. over 12) to be able to architect your code to avoid duplication. Shim layers that always perform sets of calls to lower levels with a consistent set of checks in between, now single functions which are nearly identical can instead use systems of passing flags around, and an interface more granular, to require only implementing the real logic for each module. At the very least, reduce diffs between the common and uncommon code if possible. For example, don't do gratuitous variable renames (from the generic InfoPtr to the specific BlahBlahBlahBlahBlorkBlaxPtr) and reformatting of comments. Please. You'll thank yourself.
- You can create wrappers for any system feature you want in the name of portability, but I beg of you: do not create your own threading model. Unless you are laughing at the memory of all the bad home-grown threading models you've seen, you aren't ready. If you don't realize how futile and perilous it is, you aren't ready. Especially don't do it within a kernel that's had a good threading model for a few years and which has had a wonderful process model that you could've used instead since inception. Oh hooray yet another "cooperative threading by way of lots of macros and you-don't-want-to-know under the surface." I thought those were banned in the Geneva Conventions.
- Add an error code for "not yet implemented" for anything that can be triggered trivially by the remote end rather than an explicit panic of the system. Some of us don't like losing all of our work because (1) your tool didn't check its arguments (2) your kernel code didn't check its arguments (3) your kernel code has things unimplemented which it could fail on gracefully. Don't have a good error that it could return per the spec that you are so laboriously implementing? Have you met my friend SIGSYS? Fantastic! Much better than a panic. Kill the user process in a way that it can catch and turn into "huh, feature not yet implemented, chum" rather than fucking me over.
html(
head(title("ryan's web page"))
body(
h1("sign my guest book!")
form(action="/guestbook",
p(
label(for="name", "name")
input(name="name", type="text")
)
p(
label(for="msg", "msg")
textarea(name="msg", "")
)
input(type="submit",value="sign")
)
h2("here is a list of numbers!")
ul( 5 repeat(j,
li("item number #{j}" interpolate)
))
)
)Does anyone care? Probably not :)- Music:pandora.com
If I have the time, I should look into implementing this for my phone, assuming I can actually get the access to the phone's settings and mic/accelerometer to do the proper determinations. I still don't know why it isn't already build in to any phone. Seems like a no-brainer to me.
- Location:work
As a side note, we also have an HP Itanium2 with 4GB of RAM and a dual cpu P3 (not dual core, dual chip) to give away. We prefer to give these (rackmounts) to an open source project, or another non-profit.
Achewood posts a comic showing wikipedia lying about Finland.

10:32, May 13.
Wikipedia begins to lie.

Minor edit-war follows.
13:55, May 13.
Wikieditor Wafulz semi-protects page.

All such edits are reverted.
- Mood:
busy
I replied right away, explaining that I didn't think I could see everything in one day: we have over 20 properties on our "interested" list, although we could possibly pare that down with some more detailed feedback from him. (I included a list of all the places we are looking at, so that he could provide this feedback.) Plus, I will be traveling with a baby, so I can't keep up a frenetic pace, although my mom will be along to help. I asked him if he had at least a certain time period or two on Sunday that would work so that we would have more than one day.
Well, it's been over 24 hours and I haven't heard back from him. Am I HORRIBLY high-maintenance? Isn't working weekends a given when you are a realtor? Shouldn't I be planning more than one day to look at houses?
I emailed my contacts in Eau Claire, asking if they can recommend anyone in particular. I am about ready to jump ship. I hate to do it, but he hasn't spent too much time working with us, and he's not giving me what I need, and I need to MAKE SOME PLANS.
- Mood:
anxious
I wrote a Missile Command clone for the multi-touch wall at Obscura Digital. Just like the original, except you can fire by touching the wall with your fingers. Save the Golden Gate Bridge from ICBMs. Fun for the whole family!
- Music:Spacemen 3 -- Suicide (Live)








