Updates from December, 2007 Toggle Comment Threads | Keyboard Shortcuts

  • Kevin Chiu 4:35 pm on December 31, 2007 Permalink | Reply
    Tags: , , leopard   

    iPhone Toolchain for Leopard – Version 0.30 

    By popular demand…

    Here’s a script to make your Apple OS X Leopard 10.5.1-based toolchain setup easier. Be sure your iPhone (Heavenly) directory is extracted to /usr/local/share/iphone-filesystem before using the script.

    Move the script to the directory of your choice, and in that directory try:

    sudo bash ./leopard_toolchain.sh

    If you’re feeling lucky, run the script straight from this website:

    curl http://kevinchiu.org/leopard_toolchain.sh|sudo bash

    Here’s a repository that you’re welcome to contribute changes to: http://github.com/kevinchiu/iPhone-Toolchain/tree/master

     
    • wolf 10:50 pm on January 27, 2008 Permalink

      Hey Kevin,
      thanks a lot for providing this. It seems like the combination of Mac OS X 10.5.1 and the toolchain do not allow anymore to compile C++ programs.
      From what I understand the sjlj exception handling is not supported by LLVM … this did not show up with XCode 2.5 and Mac OS X 10.4.11 … strange.

    • wolf 11:30 pm on January 27, 2008 Permalink

      so it turns out the workaround is to specify

      CFLAGS= -DDEBUG -Wall -fno-exceptions

      in the makefile

    • Milan 3:53 am on January 31, 2009 Permalink

      Hello, thank you for the tool. Unfortunately I just managed to compile the toolchain on my own :). I am a bit confused though, because theiphonewiki.com mentions TWO toolchains. One named “toolchain” is made this way from scratch, the other one being named “toolchain 2.0″ and only available by using iPhone SDK. Does that mean this toolchain is not preferred / good for building binaries on iPhone OS 2.x ?

    • Kevin Chiu 2:50 pm on February 1, 2009 Permalink

      Hi Milan,

      This tool chain was created before the existence of the iPhone SDK; so, I’m not sure if it’s compatible with iPhone OS 2.0. I suggest using the official SDK if you can spare the $99.

    • cycologist 6:40 am on June 29, 2009 Permalink

      I tried to build using Sauriks description, and your script and fixes here.

      Both ways I get stuck with an error message when linking, using a vfdecrypted iphone-filesystem from version 3.0: The error message says:…

      BUILD_PREFIX=”" \
      BUILD_PREFIX_1=”loser-” \
      LANGUAGES=”" \
      LIBGCC2_CFLAGS=”-O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-pro
      totypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -
      pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED ” \
      MULTILIB_CFLAGS=”" T= crt3.o
      make[3]: `crt3.o’ is up to date.
      /Users/matthias/home/iphone-dev/iphone-dev/build/llvm-gcc-4.0-iphone/gcc/xgcc -B
      /Users/matthias/home/iphone-dev/iphone-dev/build/llvm-gcc-4.0-iphone/gcc/ -mmaco
      sx-version-min=10.1 -B/usr/local/arm-apple-darwin/bin/ -B/usr/local/arm-apple-da
      rwin/lib/ -isystem /usr/local/arm-apple-darwin/include -isystem /usr/local/arm-a
      pple-darwin/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-proto
      types -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pi
      pe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -dynamiclib -no
      defaultlibs -install_name /usr/lib/libgcc_s`if test . = ppc64 ; then echo _. ; f
      i`.1.dylib -single_module -o ./libgcc_s.1.dylib.tmp -Wl,-exported_symbols_list,l
      ibgcc/./libgcc.map -compatibility_version 1 -current_version 1.0 libgcc/./_udiv
      si3_s.o libgcc/./_divsi3_s.o libgcc/./_umodsi3_s.o libgcc/./_modsi3_s.o libgcc/.
      /_dvmd_tls_s.o libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o libgcc/./_lshrdi3_s.o l
      ibgcc/./_ashldi3_s.o libgcc/./_ashrdi3_s.o libgcc/./_cmpdi2_s.o libgcc/./_ucmpdi
      2_s.o libgcc/./_floatdidf_s.o libgcc/./_floatdisf_s.o libgcc/./_fixunsdfsi_s.o l
      ibgcc/./_fixunssfsi_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_fixdfdi_s.o libgcc/./
      _fixunssfdi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixxfdi_s.o libgcc/./_fixunsxfdi
      _s.o libgcc/./_floatdixf_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixtfdi_s.o libg
      cc/./_fixunstfdi_s.o libgcc/./_floatditf_s.o libgcc/./_clear_cache_s.o libgcc/./
      _enable_execute_stack_s.o libgcc/./_trampoline_s.o libgcc/./__main_s.o libgcc/./
      _absvsi2_s.o libgcc/./_absvdi2_s.o libgcc/./_addvsi3_s.o libgcc/./_addvdi3_s.o l
      ibgcc/./_subvsi3_s.o libgcc/./_subvdi3_s.o libgcc/./_mulvsi3_s.o libgcc/./_mulvd
      i3_s.o libgcc/./_negvsi2_s.o libgcc/./_negvdi2_s.o libgcc/./_ctors_s.o libgcc/./
      _ffssi2_s.o libgcc/./_ffsdi2_s.o libgcc/./_clz_s.o libgcc/./_clzsi2_s.o libgcc/.
      /_clzdi2_s.o libgcc/./_ctzsi2_s.o libgcc/./_ctzdi2_s.o libgcc/./_popcount_tab_s.
      o libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o libgcc/./_paritysi2_s.o li
      bgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o libgcc/./_powidf2_s.o libgcc/./_powi
      xf2_s.o libgcc/./_powitf2_s.o libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o libgcc/.
      /_mulxc3_s.o libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.o libg
      cc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o
      libgcc/./_udivdi3_s.o libgcc/./_umoddi3_s.o libgcc/./_udiv_w_sdiv_s.o libgcc/./_
      udivmoddi4_s.o libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-darwin_s.o libgcc
      /./unwind-sjlj_s.o libgcc/./unwind-c_s.o -lc
      /usr/local/bin/arm-apple-darwin-ld: /usr/local/share/iphone-filesystem/usr/lib/l
      ibc.dylib unknown flags (type) of section 4 (__TEXT,__dof_magmalloc) in load com
      mand 0
      collect2: ld returned 1 exit status
      make[2]: *** [libgcc_s.dylib] Error 1
      make[1]: *** [stmp-multilib] Error 2
      make: *** [install-gcc] Error 2

    • Kevin Chiu 1:51 am on June 30, 2009 Permalink

      @cycologist

      You should probably just install XCode. It’s free now.

    • palav 7:44 am on July 8, 2009 Permalink

      @cycologist,

      R u able to solve the issue?
      I am also getting same error (I have already installed XCode)

    • ole2 3:38 am on August 21, 2009 Permalink

      hello Kevin
      you’ve forgot to mention to extract MacOSX10.4.Universal.pkg/Payload into /Developer folder before running your script too.

    • Kevin 4:00 am on August 21, 2009 Permalink

      @ole2
      Thanks for the reminder. I must have already had that in place for some reason.

    • ole2 5:15 am on August 21, 2009 Permalink

      hello Kevin
      thanks for keeping interest on feedbacks on your helpful script.
      I have another suggestion is to remove sudo out of your script.
      it’s better to have it executed like:
      sudo bash ./leopard_toolchain.sh
      cause some systems (like cygwin for ex.) do not own/handle sudo properly

      I’m testing cygwin based builds of your script, also going to run it against MacOSX10.4u.sdk as well as MacOSX10.5.sdk.

      I’ll let you know what else was missing.

    • Kevin Chiu 4:42 pm on August 21, 2009 Permalink

      @ole2

      I’ve created a repository (I added a link at the bottom of the article), and I’d be grateful for any updates you’d like to provide.

    • ole2 9:14 am on August 22, 2009 Permalink

      hello Kevin
      here is cygwin edition of build script:
      git://gist.github.com/172795.git
      no problem if you put or merge it with yours.

      I basically reached the point, described by cycologist and see no way to bypass it yet.
      if you’ll find the way, please inform.
      thanks

    • ole2 9:23 am on August 22, 2009 Permalink

      actually this link will be probably better one:
      http://gist.github.com/172795#

      I’d like to hear review feedback from you first before doing any merges and may be good to be able to exchange e-mails about.

    • Kevin Chiu 10:47 pm on August 23, 2009 Permalink

      When I built this script – iPhone 3.0 wasn’t out yet – I’ll check in a bit.

  • Kevin Chiu 6:30 am on December 26, 2007 Permalink | Reply
    Tags:   

    YouTube Hidden Feature 

    youtube hidden feature

    Here’s something I just discovered about YouTube. You can access a special view when using the full screen mode by pressing the three-sphered button in the bottom left of the player. This brings up a bubble view.

    Recap:

    1. Go to YouTube.
    2. Press full screen button (lower right)
    3. Press bubbles button (lower left)

    Mousing over any particular bubble assigns that bubble a new color tag and causes related bubbles to appear, which are conveniently color coded to match the whatever bubble they spawn from.

    Digg it?

    UPDATE: The feature has launched! http://youtube.com/warp_speed

     
    • Xsama 12:20 am on January 15, 2011 Permalink

      1.pause at 0:00

      2.hold? left arrow? key

      3.press up? arrow key

      4.enjoy playing SNAKE

  • Kevin Chiu 5:23 am on December 13, 2007 Permalink | Reply
    Tags: , ,   

    PolarScape 

    My team and I have just finished our final HCI project.

    Unlike most course assignments, this one has a dramatic back story. When the project was announced, I started throwing around the idea of making a multitouch display. I lined up sponsors and some great deals on some hardware. Unfortunately, after I had gathered the team and made the project proposal, it was immediately shot down by the professor for being “too difficult.”

    After the original project idea met its untimely demise, we decided to move on. Eric took the initiative to go to Professor Steven Feiner’s office hours and came up with the idea of having a “pile” interface, where images would be stacked on top of and physically interact with each other.

    On Tue, 27 Nov 2007 at 4:40pm, ______@columbia.edu wrote:

    Project Name: Polarscape

    Our plan is to support a radial graph incorporating polar coordinates, in which the distance from the origin acts as one axis, and the angle around the origin acts as the other.

    On the y axis, the axis mapped to the radius of the radial graph, we plan to place images based on the popularity of their tags within the image collection. The more popular an image?s tags are within the collection, the closer to the center the object will be placed.

    We also give the user the option of displaying temporal data along that axis in terms of newest images go in the center and oldest images are displayed in the outer rings.

    We also give the user the option of displaying the images at a given angle proportional to their time of year so pictures in winter will all be grouped together in a quarter of the pile.

    We plan to group images in a “pile” in which images are thrown on top of others, as the navigator moves the cursor over a pile, images in the currently relevant local area will be brought to the top of the pile and will be spread out using a custom layout algorithm to give the navigator a better view of the area around the location of interest. .

    In order to give the user the ability to define and axis and place tags along it, we have two ideas, either we use the pile idea and allow the user to put tags at a given radius from the origin and place images in rings that given distance, or build a pile per tag and place the piles along a linear axis. Suggestions would be appreciated.

    Time went on, we occasionally met and talked about the “pile,” and before we knew it, we only had the weekend to complete the project from scratch. On Friday, we met, but instead of working, we somehow ended up listening to Indian popular music from yesteryear and arguing whether or not we should even follow our own project proposal. On Saturday, I sent out emails and scoured the campus, but my teammates were nowhere to be found. On Sunday, I was at the library at 4 AM because I had accidentally burned a Teflon pan in my apartment in a futile attempt to boil water, and was waiting for the noxious fumes to dissipate.

    I decided to check my email. I noticed that none of my team members had responded to emails I sent out Saturday about the project. I panicked, checked the SVN repository, and was relieved to discover that Tejas had submitted something late Saturday night.

    I updated my local repository, and to my dismay, discovered that the basic framework Eric had made earlier no longer compiled. NetBeans’s automagically generated, non-Mac compatible GUI Builder code had polluted our fledgling implementation.

    At that point, I decided something drastic needed to be done. There was no way we were going to fulfill our project proposal with some form elements pasted together in a Swing interface. I sent out an email telling my team where I was in case they wanted to meet, and I started to code. At 7:21 AM, I had the Picasa API interface set up (thanks to Google’s Java gdata client and Scott from Google) and a psuedo-database layer to locally store the pictures and information fetched from gdata queries. By 8:40 AM, I had tag, month-of-the-year, and hour-of-the-day searches working. By 10:48 AM, I had started working on the UI, and had thumbnail caching working.

    At this point, I started to get somewhat hungry. I took a break and went across the street to M2M. I tried to order my usual Kimchi Udon, but they politely informed me that lunch did not start until noon. I decided to start coding in their dining area while I waited. Before lunch, I had figured out how to tell a Java app to go full screen, and started working on displaying and interacting with images.

    After lunch, Eric met me at the CS Lounge, and I started coding the interfaces between what was going to be the view/controller and the database. I got keyboard input to work, and then started echoing the typed letters to the screen in a large serif font — without relying on a swing widget. I had query submission working. Eric continued to work on the original framework.

    At 2:17 PM, Tejas responded to one of my earlier emails about having a meeting.

    Hi lets meet up tonite…around 12am ? Me and Divya are currently working from a different State (NJ). We can try to integrate our code tonite…

    A different state?

    It turned out they were worried more about filling the generic assignment requirements and had gone ahead and created their own project to meet them, but they planned to ignore the original project proposal. Tejas is probably the highest scoring student in our user interface design class. So, I trusted that he would be able to meet the generic project requirements to the letter. I felt relieved that we now had the basics covered, but still uneasy, since I knew he was using NetBeans’s automatic GUI builder, which would make the project nearly impossible to merge.

    Just after our midnight teleconference, something strange happened to Eric’s aging Dell, and he lost all of the work since his last commit – which meant all he had left was the code to render a 3d-looking electric-blue ring in the middle of the screen.

    We decided that Eric should continue writing the required documentation while I continued coding, since I was more familiar with the rapidly mutating code base. We integrated his ring-drawing code and then started creating the information spaces.

    Creating the Seasons / Day and Night visualizations was quite straight forward. The cyclical nature of the data fit well with our radial graphing requirement. Brightness was also simple, since it was merely a one-dimensional value from 0 to 255, which I mapped to a spiral.

    When we arrived at sorting the images by the average of their three color components, we hit a mental block. How do you visualize 3D data on a 2D plane and have it makes sense to normal people? While Eric thought about that question, I worked on the “custom view” requirement. About this time, Tejas came back to New York to remind us that PolarScape was doomed and that his splinter project was our savior.

    We decided to split for a little while. I continued to work on the application, and Eric attended his vegetarian cooking class, promising to bring me back something from Roti Roll afterwards. I was going to implement a physics engine for pushing things around the pile, get panning and zooming working, and make the custom view. When he returned two hours later, I had wasted two hours working on the hardest part, the physics engine, only to get stumped by the constant appearance of strange Java2D artifacts. I told Eric that physics probably wasn’t going to happen before the deadline, which loomed just a few hours away, and we dropped the feature.

    The food was delicious.

    Implementing panning and zooming took about five minutes. Eric fell asleep.

    I woke him up and he took over coding — creating the view for the color breakdown — while I thought about how to design the custom view. After a few moments, he came up with the idea of replacing the blue ring with a ring generated by iterating through the color space of integers. The result looked like a 3D rendered ring of structured rust — it didn’t turn out too well. So, instead of generating the color information space background, we decided to make three primary-colored Gaussian blobs in Photoshop. Eric created a simple affinity expression to render the pictures near their respective dominant average primary color values. I added calculations for primary color image statistics to the database, and the color view was complete.

    At about this time, less than two hours before we had to turn in the project, Eric kept saying, “We’re DOOOOoooomed!.” His unwavering confidence in the team’s ability to meet the deadline was an extraordinarily effective motivational tool.

    To implement the custom view, I simply made it such that the user would specify a tag, place the tag by clicking somewhere on the display, and we would fetch the appropriately tagged pictures from the database. For several minutes, I was at a loss as to why no images were appearing. It turns out that very few people on Picasa actually tag their images. Thinking quickly, I decided to try to get the search keywords instead, but the gdata API only returned “null” when asked for keywords associated with every piece of media I tried. As a simple workaround, I had our tag table automatically tag photos with their respective queries as they were downloaded off the web. This turned out to work quite well. Finally, I came up with a simple equation to draw a radial distance indicator for each tag — a circle with a circumference that intersects the point where the tag is placed along with a radius intersecting at the same user-specified point. For a while I tried to get the tag to draw a drop shadow, but then I gave up because there just wasn’t enough time to waste one something that could be hand-waved during the presentation.

    We were almost finished. I handed off my zipped “dist” directory to Tejas, who packed both submissions into the same final turn-in. It took a couple tries to get right, but we eventually got everything in on time. Some parts were turned in seperately, but in the end, I think the course staff figured out all the submissions were from the same team.

    For our presentation on Wednesday, Divya worked her “positive person” magic and spun a story that made us look good (2 projects instead of 1! Twice the Value!). After we presented our projects to the class, someone actually came to the front of the lecture room afterwards and told me the PolarScape interface “rocked!” That felt good. Then someone came up to me after class and said the interface was really awesome. That felt good too. I relayed the good news to my team and we all laughed and shook hands. I guess we weren’t doomed after all.

    You can download PolarScape under the Apache 2.0 license

    The program is super hackish, but it has a neat story and might be useful to others.

     
  • Kevin Chiu 2:58 am on December 7, 2007 Permalink | Reply
    Tags: , rails,   

    Ruby on Rails 2.0 is OUT! 

    Get it now.

    gem install rails -y
     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel