Archive of January 2012
http://hugin.sourceforge.net/tech/icvs2007_presentation.pdf
09:30 AM | research | 0 Comments“on a single core at 3Gz
you have ~3 billion instructions per second..
“
really?
wikipedia says:
The number of instructions per second for a processor can be derived by multiplying the instructions per cycle and the clock speed (measured in cycles per second or Hertz [Hz]) of the processor in question
ES-1
8 cpus
1600 mips
1600 max mflops
super computer built in 1989 for $8M
hp
3000/980/200
2 cpu
50 mips
1990 $1M
the mass of light
At a wavelength of 1 mm, there are approximately 5×1018 photons per second in a watt. Conversely, also at 1 mm, 1 photon has an energy of 2×10–19 joules (watt-sec)
from
http://www.optics.arizona.edu/palmer/rpfaq/rpfaq.htm
now to
http://futureboy.us/fsp/frink.fsp
scripting tip
This make much more sense (at least to me) than using the Applescript Editor’s dictionary
if only because it’s more in the same form as the Obj-C type specs..
I am trying to learn both MacRuby and Cocoa at the same time and finding a consistent style of header file helps a lot
from
F-Script/Documentation/SystemWideScriptingWithFScript/index.htm
F-Script is cool = Occupy the CPU!
To get more information about the scripting interface of an application, we can generate an Objective-C interface file (that is, a .h file) that describes the application scripting interface. This is done by using together the sdef (scripting definition extractor) and sdp (scripting definition processor) commands provided by Mac OS X . We first use sdef to asks an application for its scripting definition, and we then pass this definition to sdp to produce an Objectice-C interface file. For example, to get a detailed description of how iTunes can be controlled with the Scripting Bridge, we can execute the following command in a UNIX shell:
sdef /Applications/iTunes.app | sdp -fh —basename “iTunes”
This will create a file named iTunes.h. Here is a short extract of this file, as displayed by Xcode:

The sdp command might not work well with some applications. In such cases, looking at the output of sdef can still provide useful information about an application interface.
this process will place a file in your home directory
with the name given in the “—basename”
then after that – here is a seperate way to see what the current methods available are
object.methods(true,true)
think here something like
#!/usr/local/bin/macruby
framework "ScriptingBridge"
puts "loaded ScriptingBridge"
itunes = SBApplication.applicationWithBundleIdentifier("com.apple.itunes")
puts itunes.methods (true,false).sort
will return the Macruby (ruby) methods
and the
“puts itunes.methods (false,true).sort” returns the scripting methods
#!/usr/local/bin/macruby
framework "ScriptingBridge"
puts "loaded ScriptingBridge"
itunes = SBApplication.applicationWithBundleIdentifier("com.apple.itunes")
puts itunes.methods (false,true).sort
itunes.run
puts "******"
puts "******"
puts itunes.currentTrack
12:43 AM
|
programming
|
0 Comments
|
Tags: macruby
use macruby in textmate
uugh this took too long to find
answer:
Install MacRuby
Go to TextMate->Preferences->Advanced->Shell Variables and add a variable named TM_RUBY set to /usr/local/bin/macruby.
from:
http://stackoverflow.com/questions/4909335/how-do-i-get-textmate-to-use-macruby