b a d p o p c o r n

BlackBerry Pearl and Mac

Written by Ben on May 24, 2007 | No Comments

It’s called tethering, and the two websites you should look at:

  1. http://www.taniwha.org.uk/
  2. http://www.fibble.org/archives/000508.html

The BlackBerry Modem Scripts found on both sites are essentially the same (diff). I won’t bore you with the details, but just follow those instructions… and you’ll like getting internet wherever you go. I just have two things to iron out: I get disconnected after a few minutes of inactivity, and I get a “Bluetooth Model Resource Busy” error after I’ve uploaded pictures from my phone to the Mac. For the former, I just reconnect; To get around latter, I have to go through the stupid process of repairing my device and setting it all up again. :(

In fact, I wrote this post over the thether. :)

Posted in Life Stuff

No Comments

MacPorts and Gambit-C

Written by Ben on May 22, 2007 | 1 Comment

The Gambit-C MacPorts Portfile was finally committed a couple days ago, and I just got around to trying it out. Just do a `sudo port -d selfupdate`, and `port install gambit-c`. Worked like a charm! Great Job Arto! :)

Just a few notes about the installation for those that are trying out the examples from the Gambit-C user manual:

  • gsc needs “-l /opt/local/lib/gambit-c/_gambc” when generating link files.
  • Pass the following to gcc for gambit.h: -I/opt/local/include

Using an example taken from the users manual:

Here is for example how a program with three modules (one in C and
two in Scheme) can be built. The content of the three source files
(`m1.c’, `m2.scm’ and `m3.scm’) is:

/* File: “m1.c” */
int power_of_2 (int x) { return 1<<x; }

; File: “m2.scm”
(c-declare “extern int power_of_2 ();”)
(define pow2 (c-lambda (int) int “power_of_2″))
(define (twice x) (cons x x))

; File: “m3.scm”
(write (map twice (map pow2 ‘(1 2 3 4)))) (newline)

The compilation of the two Scheme source files can be done with
three invocations of `gsc’:

$ gsc -c m2.scm # create m2.c (note: .scm is optional)
$ gsc -c m3.scm # create m3.c (note: .scm is optional)
$ gsc -link m2.c m3.c # create the incremental link file m3_.c

We, instead, use the following command lines:

# optional compile into C files.
$ gsc -c m2.scm # create m2.c (note: .scm is optional)
$ gsc -c m3.scm # create m3.c (note: .scm is optional)
# creates the link file (m3_.c) and creates m1.c m2.c if they don’t exist.
$ gsc -link -l /opt/local/lib/gambit-c/_gambc m2 m3
# Compiles the code into a.out
gcc -I/opt/local/include m1.c m2.c m3.c m3_.c -L/opt/local/lib/gambit-c -lgambc

Posted in OpenSource, Technology

1 Comment

Not Being Evil

Written by Ben on May 5, 2007 | 4 Comments

Just a note to everyone: I’ve started a job where I’m not supposed to be Evil– as the motto goes. Anyways, I just finished my first week of orientation up in the Bay Area and am set to head back to their satelite office in Santa Monica. I’m spending my last moments hanging with friends in San Francsisco playing foosball… Yes… Foosball. Don’t laugh, I like playing this game while drinking with friends.

So, I won’t be blogging as much about the tech I work on. I’ll, instead, blog about random life stuff that doesn’t conflict with NDAs.

Peace!

Posted in Life Stuff

4 Comments