partiallydisassembled.net

Snow Leopard WiFi

2009-09-02 08:27:47

Something's very, very wrong. Command-line programs like ping and curl work fine. Safari, Camino, Firefox routinely think they have no internet connection and give up trying. Some things that help: - Flushing the DNS cache (fixes problem for one web page fetch) - Restarting WiFi, or creating a new "location" in system preferences (an oft-quoted solution to this problem on the forums) -- fixes problem for nearly a minute - Restarting computer (which, incidentally, is an insanely fast 10 seconds) -- fixes problem for about a minute. This is on a late 2008 model MacBook connecting to a NetGear router. Things I've yet to try: - Put the kernel in 64-bit mode - Try another router (I have an old Apple one) - Downgrade to Leopard (clean install I imagine -- shudder).

Javascript types

2009-05-27 23:21:08

Javascript has won the language wars, and look what we've got. A single Number type (hooray), which is internally represented by a 64-bit IEEE float (erm, ok) unless you're doing bitwise operations, in which case it's: - violently coerced to a 32-bit signed integer in JS <= 1.1 (NaN if out of range) - silently coerced to a 32-bit signed integer in JS > 1.1 (truncated fractional and high bits) What have we done to deserve this? (Disclaimer: I haven't been bitten by this design decision of doom, because I don't do any Javascript programming. But I find myself strangely compelled not to even bother, given the risks apparent).

Austin writes:

I would argue against the goodness of a single Number type. There needs to be at least two; an integral type and a real/floating type.

Matthew Marshall writes:

Javascript has its problems, but I think we're lucky it's as good as it is. (closures!) We very well could have been stuck with VBScript in the browser. MWM

About Reader

2009-05-05 09:18:27

I said that comments on Reader really suck in my last post, and I want to explain why. Google Reader has changed my life (this is no big statement; lots of things change my life; including whichever bastard on one of the many overcrowded trains I catch coughed on me and gave me this cold; keeping me home from work and thus with too much time to blog inanities, like this one). Reader started out as a feed aggregator. Technologically, this means checking the timestamps of a predetermined list of remote files, and downloading any that have changed. The point of which was to keep up-to-date with news (real news, from newspapers; tech news, from procrastination web sites; or friends' news, from blogs). When Reader was released, there were hundreds of desktop applications that did exactly the same thing -- Reader's advantage was that it followed you between desktops, being online. But it's so much more now. Reader is how I keep in contact with friends. People of my generation don't actually want to talk to their friends, or even SMS or email them. That kind of contact is far too personal and touchy. All we need is some way of indicating that we thought about each other, if only for a moment. This can be achieved on Facebook with a nudge, on MySpace with a chain letter, on Twitter with a 140-character brain broadcast, and on Reader by sharing something. To each their own (or, in the case of some people I know, all of them). When you share an article on Reader, you're telling them, "Hey, I saw this and think you should read it." Which is how most conversations go anyway. Except for Austin, who mostly shares pictures of animals, but mostly talks about compilers. Originally you could only share articles from feeds; typically ones you'd subscribed to. But some time recently Google added the ability to share any URL with a single click. This has changed my friend's sharing habits from keeping each other up-to-date on the few blogs that we don't subscribe to in common, to keeping each other up-to-date with what we're doing all day. For example, based on Sofie's shares from yesterday, I can surmise that she was passing the time by reading about penises and Star Trek cakes. This tells me much more about Sofie than I could ever have learned by actually talking to her. And then there's commenting. In response to a friend's share, you can write something back. Usually "hahaha", with the number of "ha"'s being proportional to the amount of enjoyment you received. This comment is then viewable by any other friend looking at that shared item. Occasionally one of us tries to start some discourse via the comments. Say, if you didn't agree with the shared article, you might comment, "lolz no way ps3 is teh better than poniez". But this is where it all breaks down, because anyone who's already read that item will not see your comment, unless they specifically go looking for it. There isn't even a flag or a number to indicate that articles you've read have since been commented on. At the moment Reader is like a party where everyone is telling jokes, and everyone is hearing the jokes, but no-one can hear all the laughter, which is isolated. If comments were integrated into the main view -- say, given first-class status as another article, then we'd be able to continue the discussion past a single retort, and have a real argument. It makes me think of Slashdot, except that the posting of articles and comments would be restricted to just the people on your friends list. It's what I want! (Side note: apparently whatever spell-check dictionary I have loaded on my Mac at the moment understands "MySpace" but not "Facebook" or "Google". Figure that one out!)

Biccy writes:

I like the "Except for Austin" part :3

Austin writes:

I try my best... So I've been thinking of Hugh Laurie, goats, and tapeworms recently... cool! I think you should file a bug, as it is one, imo.

Austin writes:

Also, there is the "Comment View" at the top, that does go bold if there are new comments. But that isn't enough to be usable.

Alex Holkner writes:

Er, my comment view is on the left, and it doesn't go bold ever.

Device removal on Windows

2009-05-04 08:19:04

In response to: http://blogs.msdn.com/oldnewthing/archive/2009/05/01/9581563.aspx which Sofie shared from a Digg post. I'd reply with a Reader comment, but they really suck. Raymond Chen (MS genius) writes that users inadvertently get presented with the "advanced" device removal menu when right-clicking on the device removal notification icon, when all they should've done is left-click, which brings up the simpler menu. The simple menu presents one menu item for each device, alongside the drive letter, making it relatively easy to find the usb stick you're trying to remove. The advanced menu shows a device/bus tree that makes it near-impossible to find the device you're after. What's amazing is that first Raymond, then all the commentators, blame the user for choosing the wrong menu ("oh, silly me, I didn't realise there was a left-click menu"). No-one points out that nowhere else in Windows does a left-click activate a menu. (There is also a half-second delay in bringing up the simple menu, compared to the advanced menu, causing many to try both and end up with just the advanced one after the simple one doesn't appear to do anything). Secondly, no-one points out that the "advanced" menu is pointless. It has no more functionality than the simple menu, because you are still removing the same devices, they're just listed in a different format (one that is opaque). Finally, the whole interface is completely insane. Internal hard drives are listed alongside USB sticks, it asks for confirmation before ejecting the disk (something which is easily undoable and has no consequence), and everything in the menu is a "Mass Storage Device". But the real kicker -- why doesn't Windows flush data to USB devices as soon as there's an idle IO period (say, after 1 second); and show a warning icon only when the device is in use? That way, it's always safe to remove the device, except for the few seconds (at most) after writing to it, which would be indicated by a red warning symbol or some such, telling you to hold off for a second. Hell, they could've put that light on the stick itself. "Don't pull the stick out while the light is on". Sounds like floppy disk technology. Genius!

vectypes

2009-04-09 23:19:51

I had some free time because my thumbs were sore from playing Wipeout HD, so I wrote another vector/matrix module for Python. http://vectypes.googlecode.com/ This one has a better design than euclid. * The API is almost identical to the GLSL API, supporting all the same vector and matrix types and functions (but not the scalar or component-wise functions). * There are no methods on vectors or matrices, so we don't get confused by writing imperative code and thinking it's functional, or vice-versa. * There's a big test suite. Because of the arrangement of matrix data (as a list of column vectors), it's probably less efficient in both time and space than euclid. On the other hand, it's more likely to give the right answer, and doesn't have the Point/Vector distinction^H^H^H^H^H^Hconfusion that euclid does. I wrote a small templating engine to generate the code. I think it's quite neat. It needs no explanation; just run the makefile and look at the generated files, you'll see how it works.
login