Zac Bowling’s Blog

Human Code Generator

Archive for July, 2008

Monoport Pastbin update

without comments

The pastebin for mono, monoport.com, now has captcha. The spam was to much.

JB updated his “monoporter” ruby script for it. You can see the source and download it here.

Written by zbowling

July 20th, 2008 at 10:31 pm

Posted in Mono & .NET

Tagged with

Mono on Openmoko and iPhone

with 2 comments

I’ve been hacking this week and I did it on both phones!

First I’ve got Openmoko running Mono. Not sure if anyone else beat me too and already did it but it pretty much worked out of the box, after some environment variable tweaking. Hello World at the shell is alive! After I got it running, I stopped. This isn’t so much a challenge in that this runs Linux, up to par with the Maemo OS on the Nokia 770/N800/N810 and we already have decent ARM support for that. It was surprisingly uneventful.

On the iPhone side, I’ve got something that is working to some extent. I’m cheating in some evil ways to make it load so I feel weird calling this officially “running” Mono yet, but I thought it was blog worthy since I did get it to call me back with a string that contains the all to classic “hello world” (totally heart stopping moment). This is different then the earlier effort in that my way is fully within the rules of the official SDK from Apple (other one ran on jail broke phones). I have to give credit to the previous effort because if it wasn’t for that work to get it working on the jail broken version months ago, I wouldn’t have this working as well as I do now. Lots of issues still to overcome still but Mono is looking to be a really viable option for development needs on the iPhone.

It’s hard to post pics to get everyone excited because right its just me sitting in front a really cryptic terminal and debugger, but trust me, it works!

In the mean time I’m still working on my PocketWiki application. Finding bugs in the SDK but there are some interesting things you can do.

This little sniplet sets the content of a webview, and then a button on the window is wired up to execute a function in that HTML and get the result back and display it in an NSAlertView:

- (void)awakeFromNib {
	[webView loadHTMLString:
	 @"<html><head><title>Hello HTML</title>\n"
	 @"<meta name=\"viewport\" content=\"width = device-width, user-scalable = no\" />\n"
	 @"<script>\n"
	 @"function getText(){\n"
	 @"return document.testform.test.value + \"\\n\";\n"
	 @"}\n"
	 @"</script>"
	 @"</head><body>TEST <form name=\"testform\">"
	 @"<input name=\"test\" type=\"text\" value=\"example\" id=\"test\" />"
	 @"</form></body></html>"
					baseURL:nil];
}

- (IBAction)buttonPush:(UIButton *)sender {
	NSString* var = [webView stringByEvaluatingJavaScriptFromString:@"getText()"];
	if (var != nil)
	{
		UIAlertView *alert = [[UIAlertView alloc]
		    initWithTitle:@"The text box says "
			message:var // bug? they will release our string
			delegate:nil
			cancelButtonTitle:@"OK"
			otherButtonTitles:nil];
		[alert show];
		[alert release];
	}
	//[var autorelease];
}

Shameless plug: If your company wants to break into this hot market while it lasts and deploy a rich client app for the iPhone that ties into your business’s existing web services or applications so that you enrich them with features like quick auto-login (and other data stored locally on the the phone), offline capabilities, camera, and location apis, and the upcoming push services API Apple is soon to release, you can contact me through my site. :-)

Update:
I jumped the gun. What I was seeing was a EXC_BAD_ACCESS error releasing my thread and returning my callback I was expecting when it worked. I didn’t see the crash because of another bug. The memory on the iPhone can’t be executable and writable at the same time. This is a iPhone 2.0 change. iPhone Mono will only work if we get Mono full AOT (or someone brings back the Mono interpreter from the dead).

Written by zbowling

July 19th, 2008 at 2:36 am

Posted in Mono & .NET, iPhone

Tagged with ,

Email to Apple iTunes support

without comments

I have heard of Apple letting you re-download your music but you have to contact support, give them a good excuse and they will only do it once. Here is my email to them (trying to sound like “normal” user so they take pity on me).

I bought this brand new MacBook Pro after my Windows machine cratered about 2 weeks ago. I had all my music on an external hard drive. After connecting to my new Mac, I was able to load all the files into iTunes fairly painlessly.

The irony is that I wanted to setup Time Machine using that hard-drive as the backup device but I had to reformat. So I went to copy all the files to my local drive. What I didn’t notice was that the copy would be to big for the partition I was coping to until after it had already started, so I stopped. Not completely up on Mac usage pardime differences, I didn’t notice I was actually doing a “move” and not a “copy”, until I noticed half my files were in on the local drive and the on the external drive. Used to how Windows works, I knew that dragging the one folder to one of the same name in a different location will merge the contents of those folders, but on Mac that actually means deletes the destination folder and replace it with your source folder. (ARGGG!!!)

I though it was going to somewhat ok because I had my favorite music still on my iPhone and I knew I could pull it off there. I plugged it in but I had not associated it with my new Mac. I did so and then “backed up” in iTunes just to be safe (which turns out is not really a “full back up” like it says but just copy of the settings), and synced then I synced it up (copy purchases from iPod menu was no where to be found like remember from my iPod back in version 6). It then deleted everything on the iPhone and tried to resync from scratch.

I have lost nearly all the music, movies, tv shows, and audiobooks I’ve purchased since 2005 (everything I had before then is still on my old iPod Photo).

Can you allow me to re-download my purchases, or offer any tools that will help recover files on a FAT formated drive from the mac?

Lets see if this works :-)

Written by zbowling

July 18th, 2008 at 3:02 am

Posted in iPhone

Tagged with ,

Farewell Texas Instruments…

with 2 comments

After 2 years, to much regret, I’ve decided to leave Texas Instruments and pursue other opportunities.

To everyone of my colleagues in TI’s educational technology division, I wish you the best and I will miss you all greatly. I’ve have had some really amazing experiences working with you all and I learned a lot. However the timing is best now now that we are coming to the end of this project for me to make my leave.

July 25th will be my last day. After that, I’m taking myself on a long needed vacation (haven’t had one since I started so I REALLY need one). Then its off to the next great adventure in life (and if I can just figure out that one out, I’ll be set :-))

I may be on the market soon, so if anyone is in need of a systems engineer or developer with more then 9 years of experience and proficient in cross platform, embedded, and network service based development (preferably in C, C++, Objective C, .NET, Mono, and Java), then leave me a comment. :-)

Written by zbowling

July 14th, 2008 at 7:21 pm

Posted in Mono & .NET, Personal

Tagged with

Phone Crazy (part 2)

without comments

I ran by the Apple Store again. It’s incredible still. 5 hour wait time estimate still and out of 16gb black versions. It’s straight up madness. I’ve never seen so much excitement over a product in my life. Not even the XBOX, PS3, and Wii lines ever compared to this type of crazy excitement (but maybe that’s because they ran out of stock where Apple keeps just enough coming to meet the demand).

I’m writing two applications for the iPhone at the same time (two track mind :-) but I have a good reason).

The first is a MetablogAPI based application so you can you quickly blog, edit, and delete your posts if you blogging software supports the MetablogAPI (other blog apis I’m to lazy to support). It’s a simple app but on the back end I’m using Mono to handle the XML-RPC calls (more as a proof of concept for mono so the application is not a high end app with tons of features like HTML input, geo tracking, and image uploading but maybe later). I’m using this as more of a test application rather the one I want to work on (unless people like it). I’ve got it working in the simulator and linking correctly there, but that is X86 and far easier. I’ve got lots of work to do on my build setup to deploy it to the device with having to build Mono. Before I release and production quality version I’ve got to get the size down as well so my go down the path of what Moonlight is doing with Cecil to trim down all the assemblies to a limited set. There is plenty of space for a full blow Mono install but not much memory.

The second thing I’m working on a Tomboy like notes app. Wiki-text like input on the iPhone interface is weird so I’m creating new concepts to help out with that, that I’m experimenting with now (all new ball game of user interface rules and expected norms in this world). I’m working the use interface at the moment. I’m designing my own custom text view to render the data, handle links, and handle in input events. My text view has to support handles my input and supports highlighting (which is really difficult it turns out). The text view in CocoaTouch is ok and may work (but with a lot of fighting) so rather then overloading and extending it, I’m designing my own from scratch and doing it in C. My hope is to create something more portable to other devices later. I’m abstracting all the paint calls and input event handling out to an abstraction so that when I get my OpenMoko setup going, I can reuse the same input system and rendering between the two by implementing another backend for the rendering code against whatever graphics system I use there and fit it in to whatever control/widget system I use there (hopefully it pays off because i would love to do a release for both).

Right now, I’m handling basic input and font geometry (to wrap and format the text). Since I’m only doing this for the text view area leaving everything else native and properly abstracted from my core it should be maintainable and easy to port and maintain my ability to be act like a properly native citizen on any platform I port it too.

When I get Mono working on the first application and evaluate it, I’ll decide if I want to do the backend in Mono on this second one (I would love to share code from Tomboy if I can so that maybe I can do some syncing between the two but with the differences in how I can display, it may turn into a converter rather then a syncing system).

Written by zbowling

July 12th, 2008 at 5:58 pm

Posted in Mono & .NET, Personal, iPhone

Tagged with ,

Phone Crazy

without comments

Well, the same day my OpenMono FreeRunner ships (which I ordered because Apple was too restrictive on the developer program and giving me the cold shoulder) I got accepted into the iPhone Developer Program. So payed the $99 and downloaded the new SDK.

Now I’m conflicted. It’s a good kind of conflict though. All the more reason to get Mono working on both a develop something cross platform. :-)

I waited in line at the Apple store for the iPhone 3G. It was nearly 900 people thick at when I arrived at 6:00am. By 10am, it was still 300 people still in front of me (but now moved into the store) but I had to get to work so left and didn’t my any new phone hotness today. In all there were maybe 2000 in line, and a lot more trying to get a peak.

It was a weird experience though. The Apple guys where getting us into the mall early (it opened really at 9am so they had too), handing out free coffee and answering questions, while we waited which was awesome. When the doors opened, there were about 50 people in Apple shirts clapping and screaming and wanting to shake our hands and take pictures with us like we were rock stars or something. Was a little awkward. I bought my first gen iPhone at an AT&T were the reception was far from as crazy. Oh well. Try again tomorrow I guess.

Written by zbowling

July 12th, 2008 at 1:51 am

Posted in Personal, iPhone

Tagged with

Ordered Openmoko

without comments

Don’t ask me why but I just purchased an Openmoko Freerunner (and debug board). My order number is just over the three thousand marker (would of figured it would have been higher because of the international press but that could be because of anything). I’m also going to be out there to Friday morning most likely in line buying the iPhone 3G. My excuse is that I’m a software engineer and need to know the market and my options (a good enough excuse for me. got ideas and need to know the platforms :-)).

Written by zbowling

July 8th, 2008 at 9:19 pm

Posted in Personal

You should too

without comments

Written by zbowling

July 3rd, 2008 at 9:25 pm

Posted in Personal, whatever

iPhone 3G/2.0 or OpenMoko or Andriod

without comments

Two revolutionary phones coming out at the same time and a third that people will think is revolutionary (just kidding).

My thoughts coming from my thoughts a developer and what I know from my experience as a OSS developer and enlightened consumer myself. I’ve done lots of mobile development in the past. Limited by J2ME or Brew, horrible systems that limit my break in to the market put in my cell providers, having to get approval to run the software on my own phones or customers phones from the manufacture and the cell company using signatures and keys (killing open source efforts for the phones). It’s a nasty game.

OpenMoko

Very interesting. I defiantly will be ordering the OpenMoko Freerunner as soon as it comes out to evaluate after it comes out. I’ve been following the project and tinkering with the developer kit in the past. It’s Linux, I can do what I want, its not sold by the cell company, and so it’s mine to do what I want and it’s free for me to change it. This appeals to me as a developer and is great for customers because it brings variety and customization, cheaper software and better quality.

The Freerunners hardware could be better, but they are trying to use components with only hardware with publicly documented interfaces or using open standards or provide free drivers, so it’s hard. Only USB 1.1 USB, no camera, a limited to 256mb of internal flash hurt (with SD card support we may be able to get up to 8gb). The hardware is open as well as OpenMoko publishes the CAD designs for everything, and its packed full of interfaces to stick add on new things.

iPhone 2.0 and 3G

I was one of the first to stand in line to get the iPhone. I was one of the first to run the activation hacks and jailbreak it. I seen the potential of the platform for myself. When apple anonocced the developer program I was extreemly happen until I read all the restrictions. Feels like everything I faced before. I’ve signed up and have been rejected by the developer program, so no chance of my application running on through app store (thankfully the jailbreaking community wasn’t deterred by this program so I will continue my development plans.

I will still likely upgrade my iPhone to the 3G version though. One thing is that the iPhone chick magnet of hotness ( just kidding :-) ).

Andriod

Its neat, but I don’t think it will get as accepted highly by the development community. It’s going to be hard to convince people to rewrite their applications since Andriod’s system pretty requires it to run since everything must run on their VM. Sure its linux and its going to open, but its like BSD open and the people selling the phones are likely to lock it down for there versions preventing modification, so no native code will not be able to be introduced. Just not doing it for me.

howtoqk0.png

Written by zbowling

July 3rd, 2008 at 5:33 pm

Posted in Personal, iPhone

Tagged with