OK I need an OSX Webview/Webkit expert…

So I have a little app that hosts the Webview control and doesn’t do a whole lot more. I am running it on a MacBook Pro Retina display. I’ve enabled fullscreen display, I’ve set the window in the xib to be full retina 2880×1800.

But the webview seems to think it is running at 1440x790ish or so. Basically half res. As reported by NSScreen. And it is pretty clearly running at half resolution.

The same web page looks fine in Chrome, full retina resolution.

Ah interestingly, in Safari, it is also running at half resolution. Hmmm.

Nothing obvious on StackOverflow. Nothing obvious in Apple developer doc (tho I certainly probably missed something).

UPDATE: Mr. Sobeski gave me some ideas. The retina devicePixelRatio is probably involved. Apparently this creates some problems in some configs. http://stackoverflow.com/questions/4405710/uiwebview-w-html5-canvas-retina-display might be a direction to try.

Why is OSX terminal so much better than Windows command prompts?

http://www.flickr.com/photos/n3wjack/One of the simple reasons why I do most of my dev work on a Macbook is because OSX terminal windows just work way better than Windows command prompts. Notably for copy paste. I can for instance easily copy a command and paste it and re-execute on OSX, or copy it and paste it into an editor window, etc. The normal system-wide copy/paste keyboard commands just work.

Contrast with Windows, where every terminal window has that stupid edit window, and that stupid Mark command, and stupid paste command with no keyboard equivalent (or none that I know). Even the fancy new powershell prompts still have this same old stupid behaviour. it is the behaviour that the dos box had in Windows 95, probably even Windows 3.x before that. In 20 years it can’t be fixed??

Sorry, just in a grumbly mood this morning.

UPDATE: and hey to be clear I am just sshing from either OSX or Windows into Linux VMs. I don’t give a hoot about the native command line tools, except for needing SSH to be present WHICH WINDOWS SCREWS UP AS WELL. C’mon guys, show some pride in your work.

MORE UPDATE: Sadly the Quick Edit setting mentioned in the comments doesn’t really seem to work. Probably why it is off by default. Supposedly it enables Ctrl-C/Ctrl-V Copy/Paste but it doesn’t seem to work on my Win8 machine. Ctrl-C does something — the current selection in the window is forgotten — but doesn’t seem to put the selection into the clipboard. And Ctrl-V just sends a Ctrl-V to the input line, no change. This is true in both the command prompt and the powershell prompt.

installed both ios7 and osx mavericks last night

ios7 first impressions:

  • the mail app i think i will like, seems a little easier to dispose of messages, and viewing messages is a lot cleaner
  • i never used game center, mostly because i don’t care about the feature, but a little bit because it was so horribly ugly. nice to see that fixed
  • sometimes you can be too subdued and too flat. the weather app doesn’t work for me, the difference between a sunny and rainy forecast is now so muted.
  • all the new swipe from the bottom, side, etc behavior will take a while to get used to. tho quick access to airplane mode is nice.
  • i’m interested in the new photo library features and sharing, tho at first glance, the whole collection thing doesn’t really work for me. collections are too small or too big.
  • i hope i can airdrop easily between my mac and my phone. haven’t tried that yet.

osx first impressions:

  • laggy. wish i hadn’t installed. i am sure it will get better.
  • maps app is cool i guess tho i will have to see how much i use it versus the browser alternatives. the “send to iOS” feature will be great, obviously not a new idea, but still i will be happy with.
  • i suspect i will like finder tabs a lot. tags? i just don’t know. evidence from other domains suggests i won’t use them.
  • books, keychain — yawn. hard to get excited about when there are great 3rd party solutions that work everywhere.

Software (mostly) on my to-play-with list — Circuitlab, Paintcode, Pressgram, Tabular, …

  • CircuitLab — worth watching. Today it is kind of a toy, but if this could grow, say, into a tool that would let me design and emulate SOC-based systems, and then outsource the parts supply, circuit board mfr, and even assembly of them, well that could be cool.
  • PaintCode — if I was doing iOS/osx app development, this seems like a must have. Laying out visuals and then creating all the boilerplate framework is tedious and boring.
  • Pressgram — Love this idea. Never understand why people gift content to other branded services, this lets people own and control their own content.
  • Some Ecards Store — I’d like to buy a bunch of the coffee mugs and stock our office with them.
  • Tabular — I don’t have enough time (or, to be honest, enough skill) to engage in my secret desire to compose music, but if I did…
  • 2 factor Apple ID auth — purportedly you can turn this on but it has been a failure for me, apple claims i set some security question answers that i have never seen before, and now I am locked out of my account after too many tries. Awesome.
  • WindowsRT jailbreak tool — something to do with my stupid surface machine

Installing NumPy/SciPy on OSX

Updated my Python install and NumPy/SciPy on my Mountain Lion machine. A couple of sites provided great guidance:

* “Python, NumPy, SciPy instructions”:http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/ provide good guidance on getting python, brew, virtualenv, and bumpy up to date on osx 10.8. The scipy instructions are busted tho
* “SciPy instructions on StackOverflow”:http://stackoverflow.com/questions/12092306/how-to-install-scipy-with-pip-on-mac-mountain-lion-os-x-v10-8. Once you have Python and Numpy installed, these steps solved the SciPy install. OK well no they didn’t. Still working on.
* UPDATE: Back to a later post from the first author: “Compiling SciPy on Mountain Lion”:http://www.thisisthegreenroom.com/2012/compiling-scipy-on-mountain-lion/ — and I have SciPy working now.

Trying to get set up a Raspberry Pi dev environment on OSX

I’ve been trying to get a Raspberry Pi dev environment set up on OSX. I’d like to have a cross compiler, a full linux build, an emulator all operational.

There is a pretty clear outline at “RPIforum from earlier this summer”:http://www.rpiforum.net/forum/tutorials/article/16-a-raspberry-pi-emulated-environment-on-osx-lion/. I’ve had partial success:

* Install Xcode and Xcode command line tools. No problem, I had these around anyway
* Install “homebrew”:http://mxcl.github.com/homebrew/. A package manager for OSX, a good thing to have. Installing this is what finally “broke my existing flawed OSX install”:http://theludwigs.com/2012/09/beware-the-osx-migration-assistant/ and drove me to reinstall OSX. But installed super cleanly once I had a fresh OSX
* Install the dependencies for ARM toolchain: brew install mpfr gmp libmpc libelf texinfo. There is a known error with mpfr compilation, so reinstall that with flags “per homewbrew wiki”:https://github.com/mxcl/homebrew/issues/15061.
* Then install the Arm tools. BTW, you can’t just copy and past the script from the RPI forum page because of the damn smart quotes — echo “export PATH=$HOME/rpi/arm-cs-tools/bin:$PATH” » ~/.bash_profile will utterly fail
* Then compile kernel. This step is unfortunately failing late in the process, I think at the linking stage. Still digging into. I have tried an alternative recipe at “the elinux site”:elinux.org/RPi_Kernel_Compilation, it fails as well, in both cases unhappy with the vmlinux file.
* Then install the qemu emulator. the rpi forum recipe is missing a dash, should be a double dash in front of the use-gcc flag i believe. works fine with that change

So I feel close. Just need to dig into the kernel compile problem. Here are the details, I need to study the make file to figure out exactly where this occurs:

==> make ARCH=arm CROSS_COMPILE=~/rpi/arm-cs-tools/bin/arm-none-eabi- -k > compile.txt
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
size: file: arch/arm/boot/compressed/../../../../vmlinux is not an object file
arch/arm/boot/compressed/vmlinux.lds:77: undefined symbol `__OBJC' referenced in expression
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[1]: Target `arch/arm/boot/zImage' not remade because of errors.
make: *** [zImage] Error 2
make: Target `_all' not remade because of errors.

Beware the OSX Migration Assistant

When I got my Retina Macbook Pro, I used the migration assistant to transfer over all my docs and apps. I had used it in the past and it had worked fine.

But this time, my experience was different. First, it struggled with the amount of picture and music content I tried to transfer over, something about 200G+ of data didn’t make it happy. I ultimately just copied over my iTunes and Aperture libraries manually.

But the bigger problem is that the migration utility refused to copy apps and docs from the “John” account on my old macbook pro to the “John” account on the new machine. It mumbled about the account already existing and demanded I used a new account.

And this ended up being a disaster. I’ve suffered thru a couple months of a constant chown/chmod fest and I have given up. Nothing wants to run, and sudo doesn’t even reliably solve.

So yesterday I nuked the whole SSD and put a fresh install of Mountain Lion on the machine. I downloaded Mountain Lion from the app store, used “Lion Diskmaker”:http://blog.gete.net/lion-diskmaker-us/ to put it on a usb key, rebooted in rescue mode, formatted the SSD, and reinstalled Mountain Lion. And then reinstalled the 50 or os apps, reconnected mail/cal/contacts to all my accounts, reinstalled plugins for xcode, aperture, safari, etc, copied over my Aperture and iTunes library and docs from a network store, and am pretty much back up and running.

Lesson learned. I’m not the only person in the world that has hit this, here is a “good description of the core problem”:http://pondini.org/OSX/MigrationProblems.html and the many ways you can try to solve. One wonders why anyone thought this was a reasonable way for the migration assistnat to act.

Finally got my new Retina MacBook Pro and it seems a little squirrelly

OK it is wonderfully fast, the 768G SSD is awesome, Aperture opens in seconds. I love the speed. Love.

But — one spontaneous reboot. Address Book hangs on first run. The migration utility took forever and silently gave up trying to transfer my music and photos over, I had to do those manually. Had to boot into the repair utility to fix some “strange permission problem”:http://osxdaily.com/2011/11/15/repair-user-permissions-in-mac-os-x-lion/. Software Update tool failed updating iTunes twice.

Not conclusive yet but something seems a little off.

Software tips

* “How to unhide your Library in Lion”:http://tidbits.com/article/12306?rss — chflags nohidden ~/Library. Yay.
* “Making desktop web apps with Automator”:http://ihnatko.com/2011/07/22/making-desktop-webapps-in-lion/. All kinds of goodness in here.
* “BBEdit 10 is out”:http://www.barebones.com/products/bbedit/bbedit10.html. Purchased.
* “Marked”:http://markedapp.com/ seems like a super useful companion to BBEdit.
* “Billguard is now free-er”:http://www.avc.com/a_vc/2011/07/billguard.html.

Recent software trials — Camino, Shuffler, GIT, Wisestamp, Microsoft Windows Live Sync

* Firefox is feeling increasingly bloated, maybe because I’ve got a bunch of plugins jammed in. But trying out “Camino”:http://db.tidbits.com/article/11548?rss&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+tidbits_main+(TidBITS%3A+Mac+News+for+the+Rest+of+Us)&utm_content=Google+Reader on the Mac, seems cleaner and lighter.
* “Shuffler.FM”:www.shuffler.fm. Eh, streaming music just doesn’t work for me. My primary listening time is while driving and I need music that I can put on an ipod or cd. When I am at an actual computer I am too busy doing other things. But I like music discovery tools and guides, I just don’t want them bound into streaming.
* “GIT for the lazy”:http://www.spheredev.org/wiki/Git_for_the_lazy. Perfect for me.
* “Terminal tips and tricks for OSX”:http://superuser.com/questions/52483/terminal-tips-and-tricks-for-mac-os-x and in general SuperUser seems helpful.
* I want to love “WiseStamp”:http://www.wisestamp.com/ but I don’t get email addins that assume you are only sending email from a browser. iPhone? iPad? OSX Mail? How can I commit to this thing if I can’t use it consistently? Sigh.
* I’m super late to “Windows Live Sync”:https://sync.live.com/home.aspx?wa=wsignin1.0 but it is very useful. I do have a quibble with the naming, once upon a time MSFT was confident enough in its products to give them simple iconic names — Word, Excel, Windows. The company seems to have lost its confidence in products and jams these crazy names on them to try to ride on the coattails of other products. Mistake.

Airbook SSD full…

Not sure why, the Mac Airbook SSD was reporting full.  Tried to delete a bunch of apps, nothing seemed to help.  I kind of wonder if it isn’t a time machine problem. I don’t have great OSX intuition and so an examination of the directory structure and process list didn’t really mean much to me.

Decided to just reinstall the OS.  40G free again.  we’ll see what happens.  Rennie pointed me towards The Omni Group – OmniDiskSweeper – Download or Tinkertool as decent utilities to use if it happens again.