Wednesday, December 7, 2011

Tips to Avoid Titanium Desktop Errors and Crashes

My P2P-Docs project is a desktop app currently written in Titanium where I can code the UI in HTML and JavaScript and the business logic in Ruby.  Unfortunately, it's very prone to errors and crashes when things get complicated; fortunately, the problems I've seen have been in the interface between JavaScript and Ruby, and I feel like I can keep progressing with this platform if I follow these conventions.
  • Only pass strings between JavaScript and Ruby, encoding in JSON strings if necessary.
    • In JavaScript, call Ruby methods with String arguments.  JavaScript ints become Ruby Floats, so just use Strings to avoid potential confusion; JSON arguments will probably work and become hashes, but then you'll have to beware of the types of all the nested objects... if I need multiple values then I either supply them as more arguments or I call the Ruby method multiple times.
    • In Ruby, check arguments for RubyKObject type.  Sometimes arguments don't have the expected String type, so you'll want to convert them:

      if (term.class.name == "RubyKObject")
        term = term.toString()
      end

    • In Ruby, return String objects; if necessary, encode in JSON.  Here's a simplistic method that works for me:

      # takes an argument which is any nesting of String, Array, Hash (and nil)
      # return a String holding JSON representation of the argument
      def self.strings_arrays_hashes_json(arg)
        if (arg == nil)
          "null"
        elsif (arg.class.name == "String")
          result = arg
          result = result.gsub("\"","\\\"")
          result = result.gsub("\\","\\\\")
          result = result.gsub("\/","\\/")
          result = result.gsub("\b","\\b")
          result = result.gsub("\f","\\f")
          result = result.gsub("\n","\\n")
          result = result.gsub("\r","\\r")
          result = result.gsub("\t","\\t")
          "\"" + result + "\""
        elsif (arg.class.name == "Array")
          recurse = arg.map { |elem| strings_arrays_hashes_json elem }
          "[" + recurse.join(", ") + "]"
        elsif (arg.class.name == "Hash")
          hashes = arg.to_a.map { |key, val|
            "\"#{key}\":#{strings_arrays_hashes_json(val)}" }
          "{" + hashes.join(", ") + "}"
        else
          "#{arg}"
        end
      end
      

  • In JavaScript, call any Ruby methods before playing with the DOM.  I've found that, if I have a lot of DOM manipulation, Ruby calls will work up to some point and then WHAM! after that point you get errors or crashes.

BTW, the direct-to-console debugging is your friend; the Ruby puts calls may not get flushed immediately, but this will:
Titanium.API.print("stuff\n");

When you start working this way, you'll notice that you're really pushed into a paradigm where you do simple visual manipulations in the browser as much as possible, but for any substantive changes to data you do a page-submit to pass the values to the same page, then you run your logic during the page initialization and then you rerender the whole page.  It's unfortunate, but now I never have troubles.  (... at least very few!  Just kidding.  I haven't had any mysterious Ruby errors or app crashes wherever I take these approaches.)

BTW, every time I hit a glitch, I look more closely at other approaches... but since I figure every tool will have its issues, I'm still sticking with the devil I know.  Feel free to ask me later if I'm still sticking to it.

Saturday, November 19, 2011

debugging a Titanium problem


This is my response to Alan's comment here.

What I'm seeing is that my app will completely stop.  Here is a video that shows how it stops.

I'll bet it's tough to get error info from the third-party languages; I'm sure that's where the problem lies, because I put console debug output around lines like this one and I see that it gets up to the Ruby method but no further.  (I realize this example is a method... if it would help, I'll try to retrieve a problem involving a variable reference.)  Even if I wrap it in a try-catch, the app stops, so it never gets to the catch, and I don't get any other info.

You can duplicate this problem in my app; look on that page for the "Test many repos in app" to see duplication steps.  (Note that that is a specific point in time in November; I've worked around the problem, but it's definitely not ideal and the problem still stands.)

Below is a stack from OSX.

It could be interesting to help enhance the interface and error reporting in the Kroll system (I assume that's the third-party language interface); if you have any suggestions for getting started, or for other ways that I can help you, I'm all ears.

Thanks.

____________________________________________
Family History P2P Docs appears to have encountered a fatal error and cannot continue.

The application has collected information about the error in the form
of a detailed error report. If you send the crash report, we will
attempt to resolve this problem.



 
... then I click on the "Send Report" button to see the following:

____________________________________________
Problem Report for Family History P2P Docs

This report will be sent to Apple automatically.

Problem Details and System Configuration

Process:         Family History P2P Docs [71611]
Path:            /Users/tlarson/Documents/dev/p2pdocs/p2pdocs/Family History P2P Docs/dist/osx/Family History P2P Docs.app/Contents/MacOS/Family History P2P Docs
Identifier:      info.familyhistories.p2pdocs
Version:         ??? (7.0)
Code Type:       X86 (Native)
Parent Process:  ??? [1]

Date/Time:       2011-11-18 20:50:29.623 -0700
OS Version:      Mac OS X 10.6.8 (10K549)
Report Version:  6

Interval Since Last Report:          451670 sec
Crashes Since Last Report:           32
Per-App Interval Since Last Report:  31828 sec
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      8EC49F5A-C2D0-4019-9318-8634B3D2552C

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000081be0f79
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Application Specific Information:
objc_msgSend() selector name: localizedDescription


Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                   0x97806f87 objc_msgSend + 23
1   info.familyhistories.p2pdocs      0x000221b5 main + 549
2   info.familyhistories.p2pdocs      0x000032ea start + 54

Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib                 0x96675382 kevent + 10
1   libSystem.B.dylib                 0x96675a9c _dispatch_mgr_invoke + 215
2   libSystem.B.dylib                 0x96674f59 _dispatch_queue_invoke + 163
3   libSystem.B.dylib                 0x96674cfe _dispatch_worker_thread2 + 240
4   libSystem.B.dylib                 0x96674781 _pthread_wqthread + 390
5   libSystem.B.dylib                 0x966745c6 start_wqthread + 30

Thread 2:
0   libSystem.B.dylib                 0x96674412 __workq_kernreturn + 10
1   libSystem.B.dylib                 0x966749a8 _pthread_wqthread + 941
2   libSystem.B.dylib                 0x966745c6 start_wqthread + 30

Thread 3:
0   libSystem.B.dylib                 0x96674412 __workq_kernreturn + 10
1   libSystem.B.dylib                 0x966749a8 _pthread_wqthread + 941
2   libSystem.B.dylib                 0x966745c6 start_wqthread + 30

Thread 4:
0   libSystem.B.dylib                 0x96674412 __workq_kernreturn + 10
1   libSystem.B.dylib                 0x966749a8 _pthread_wqthread + 941
2   libSystem.B.dylib                 0x966745c6 start_wqthread + 30

Thread 5:
0   libSystem.B.dylib                 0x9667caa2 __semwait_signal + 10
1   libSystem.B.dylib                 0x966a89c5 nanosleep$UNIX2003 + 188
2   libSystem.B.dylib                 0x966a8903 usleep$UNIX2003 + 61
3   com.apple.AppKit                  0x9910ae2d -[NSUIHeartBeat _heartBeatThread:] + 2039
4   com.apple.Foundation              0x9404a4c4 -[NSThread main] + 45
5   com.apple.Foundation              0x9404a474 __NSThread__main__ + 1499
6   libSystem.B.dylib                 0x9667c259 _pthread_start + 345
7   libSystem.B.dylib                 0x9667c0de thread_start + 34

Thread 6:
0   libSystem.B.dylib                 0x9664eafa mach_msg_trap + 10
1   libSystem.B.dylib                 0x9664f267 mach_msg + 68
2   com.apple.CoreFoundation          0x952612df __CFRunLoopRun + 2079
3   com.apple.CoreFoundation          0x952603c4 CFRunLoopRunSpecific + 452
4   com.apple.CoreFoundation          0x952601f1 CFRunLoopRunInMode + 97
5   com.apple.Foundation              0x94083224 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 329
6   com.apple.Foundation              0x9404a4c4 -[NSThread main] + 45
7   com.apple.Foundation              0x9404a474 __NSThread__main__ + 1499
8   libSystem.B.dylib                 0x9667c259 _pthread_start + 345
9   libSystem.B.dylib                 0x9667c0de thread_start + 34

Thread 7:  com.apple.CFSocket.private
0   libSystem.B.dylib                 0x9666dac6 select$DARWIN_EXTSN + 10
1   com.apple.CoreFoundation          0x952a0c53 __CFSocketManager + 1091
2   libSystem.B.dylib                 0x9667c259 _pthread_start + 345
3   libSystem.B.dylib                 0x9667c0de thread_start + 34

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x9780c7e2  ebx: 0x0001f0de  ecx: 0x9977f99e  edx: 0x81be0f59
  edi: 0xbfffec80  esi: 0x00223690  ebp: 0xbfffecb8  esp: 0xbfffec28
   ss: 0x0000001f  efl: 0x00010286  eip: 0x97806f87   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0x81be0f79

Binary Images:
    0x1000 -    0x96ff7 +info.familyhistories.p2pdocs ??? (7.0) <4672C033-55EC-71AC-C49D-7CE6190630DC> /Users/tlarson/Documents/dev/p2pdocs/p2pdocs/Family History P2P Docs/dist/osx/Family History P2P Docs.app/Contents/MacOS/Family History P2P Docs
   0xb6000 -   0x16bfe7  libcrypto.0.9.7.dylib 0.9.7 (compatibility 0.9.7) /usr/lib/libcrypto.0.9.7.dylib
  0x7fb000 -   0x7fcff5 +com.vmware.FusionVMDKPlugIn ??? (416484) /Library/Contextual Menu Items/FusionVMDKPlugIn.plugin/Contents/MacOS/FusionVMDKPlugIn
0x8fe00000 - 0x8fe4162b  dyld 132.1 (???) <1C06ECD9-A2D7-BB10-AF50-0F2B598A7DEC> /usr/lib/dyld
0x90003000 - 0x90045ff7  libvDSP.dylib 268.0.1 (compatibility 1.0.0) <8A4721DE-25C4-C8AA-EA90-9DA7812E3EBA> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x900a5000 - 0x900a8fe7  libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <1622A54F-1A98-2CBE-B6A4-2122981A500E> /usr/lib/system/libmathCommon.A.dylib
0x900a9000 - 0x901e6fe7  com.apple.audio.toolbox.AudioToolbox 1.6.7 (1.6.7) <2D31CC6F-32CC-72FF-34EC-AB40CEE496A7> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x901e7000 - 0x902a0fe7  libsqlite3.dylib 9.6.0 (compatibility 9.0.0) <52438E77-55D1-C231-1936-76F1369518E4> /usr/lib/libsqlite3.dylib
0x903cf000 - 0x9040cff7  com.apple.SystemConfiguration 1.10.8 (1.10.2) <50E4D49B-4F61-446F-1C21-1B2BA814713D> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x905af000 - 0x905d5ffb  com.apple.DictionaryServices 1.1.2 (1.1.2) <43E1D565-6E01-3681-F2E5-72AE4C3A097A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x905e4000 - 0x90648ffb  com.apple.htmlrendering 72 (1.1.4) <4D451A35-FAB6-1288-71F6-F24A4B6E2371> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering
0x90649000 - 0x9064eff7  com.apple.OpenDirectory 10.6 (10.6) <0603680A-A002-D294-DE83-0D028C6BE884> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x9082e000 - 0x90838ffb  com.apple.speech.recognition.framework 3.11.1 (3.11.1) <7486003F-8FDB-BD6C-CB34-DE45315BD82C> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x90839000 - 0x90843fe7  com.apple.audio.SoundManager 3.9.3 (3.9.3) <5F494955-7290-2D91-DA94-44B590191771> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
0x90844000 - 0x90851ff7  com.apple.NetFS 3.2.2 (3.2.2) /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
0x90982000 - 0x90a4dfef  com.apple.CoreServices.OSServices 359.2 (359.2) <7C16D9C8-6F41-5754-17F7-2659D9DD9579> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x90be4000 - 0x90e49feb  com.apple.security 6.1.2 (55002) <7F00A51B-F22A-0EBC-A321-923472D686BD> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x90ed1000 - 0x90f6efe3  com.apple.LaunchServices 362.3 (362.3) <15B47388-16C8-97DA-EEBB-1709E136169E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x911b0000 - 0x911c8ff7  com.apple.CFOpenDirectory 10.6 (10.6) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
0x911c9000 - 0x911eafe7  com.apple.opencl 12.3.6 (12.3.6) /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
0x9122c000 - 0x9167dfef  com.apple.RawCamera.bundle 3.7.1 (570) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera
0x91686000 - 0x916d9ff7  com.apple.HIServices 1.8.3 (???) <1D3C4587-6318-C339-BD0F-1988F246BE2E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x9179a000 - 0x917dbff7  libRIP.A.dylib 545.0.0 (compatibility 64.0.0) <80998F66-0AD7-AD12-B9AF-3E8D2CE6DE05> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x917dc000 - 0x91839ff7  com.apple.framework.IOKit 2.0 (???) <3DABAB9C-4949-F441-B077-0498F8E47A35> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x9183a000 - 0x918e2ffb  com.apple.QD 3.36 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x91c35000 - 0x91c40ff7  libCSync.A.dylib 545.0.0 (compatibility 64.0.0) <287DECA3-7821-32B6-724D-AE03A9A350F9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x91c48000 - 0x91c4bff7  libCGXType.A.dylib 545.0.0 (compatibility 64.0.0) <4D766435-EB76-C384-0127-1D20ACD74076> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib
0x91c4c000 - 0x91c68fe3  com.apple.openscripting 1.3.1 (???) <2A748037-D1C0-6D47-2C4A-0562AF799AC9> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x91c69000 - 0x91ce3fff  com.apple.audio.CoreAudio 3.2.6 (3.2.6) <156A532C-0B60-55B0-EE27-D02B82AA6217> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x91f4d000 - 0x91f5dff7  libsasl2.2.dylib 3.15.0 (compatibility 3.0.0) /usr/lib/libsasl2.2.dylib
0x91fac000 - 0x920dafe7  com.apple.CoreData 102.1 (251) <87FE6861-F2D6-773D-ED45-345272E56463> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x920db000 - 0x920dbff7  com.apple.ApplicationServices 38 (38) <8012B504-3D83-BFBB-DA65-065E061CFE03> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x920dc000 - 0x921defe7  libcrypto.0.9.8.dylib 0.9.8 (compatibility 0.9.8) <015563C4-81E2-8C8A-82AC-31B38D904A42> /usr/lib/libcrypto.0.9.8.dylib
0x921df000 - 0x921e2ff7  libCoreVMClient.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
0x921e3000 - 0x9227bfe7  edu.mit.Kerberos 6.5.11 (6.5.11) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x9227c000 - 0x922a6ff7  com.apple.shortcut 1.1 (1.1) /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut
0x922f7000 - 0x92379ffb  SecurityFoundation ??? (???) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x9286e000 - 0x92890fef  com.apple.DirectoryService.Framework 3.6 (621.11) /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService
0x92891000 - 0x92893ff7  com.apple.securityhi 4.0 (36638) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x92894000 - 0x92896ff7  libRadiance.dylib ??? (???) <5920EB69-8D7F-5EFD-70AD-590FCB5C9E6C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x92897000 - 0x92901fe7  libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <411D87F4-B7E1-44EB-F201-F8B4F9227213> /usr/lib/libstdc++.6.dylib
0x92902000 - 0x92935ff7  com.apple.AE 496.5 (496.5) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x9293c000 - 0x9297fff7  com.apple.NavigationServices 3.5.4 (182) <8DC6FD4A-6C74-9C23-A4C3-715B44A8D28C> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices
0x92ac7000 - 0x92b0dff7  libauto.dylib ??? (???) <29422A70-87CF-10E2-CE59-FEE1234CFAAE> /usr/lib/libauto.dylib
0x92b47000 - 0x92b6fff7  libxslt.1.dylib 3.24.0 (compatibility 3.0.0) <315D97C2-4E1F-A95F-A759-4A3FA5639E75> /usr/lib/libxslt.1.dylib
0x92b70000 - 0x92bc8fe7  com.apple.datadetectorscore 2.0 (80.7) /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
0x92bc9000 - 0x92c12fe7  libTIFF.dylib ??? (???) <579DC328-567D-A74C-4BCE-1D1C729E3F6D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x92c13000 - 0x93402557  com.apple.CoreGraphics 1.545.0 (???) <1D9DC7A5-228B-42CB-7018-66F42C3A9BB3> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x93485000 - 0x938baff7  libLAPACK.dylib 219.0.0 (compatibility 1.0.0) <5E2D2283-57DE-9A49-1DB0-CD027FEFA6C2> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x938bb000 - 0x938cfffb  com.apple.speech.synthesis.framework 3.10.35 (3.10.35) <0DBE17D5-17A2-8A0E-8572-5A78408B41C9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x93d20000 - 0x93d5bfeb  libFontRegistry.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
0x93eb9000 - 0x93ecaff7  com.apple.LangAnalysis 1.6.6 (1.6.6) <3036AD83-4F1D-1028-54EE-54165E562650> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x93ecb000 - 0x93f83feb  libFontParser.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
0x93f84000 - 0x93fe5fe7  com.apple.CoreText 151.10 (???) <5C2DEFBE-D54B-4DC7-D456-9ED02880BE98> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
0x93fe6000 - 0x94033feb  com.apple.DirectoryService.PasswordServerFramework 6.1 (6.1) <136BFA48-D456-B677-3B5D-40A6946C3A09> /System/Library/PrivateFrameworks/PasswordServer.framework/Versions/A/PasswordServer
0x94034000 - 0x942a5fef  com.apple.Foundation 6.6.8 (751.63) <69B3441C-B196-F2AD-07F8-D8DD24E4CD8C> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x943b7000 - 0x94463fe7  com.apple.CFNetwork 454.12.4 (454.12.4) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x94560000 - 0x94569ff7  com.apple.DiskArbitration 2.3 (2.3) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x945d8000 - 0x948f8ff3  com.apple.CoreServices.CarbonCore 861.39 (861.39) <5C59805C-AF39-9010-B8B5-D673C9C38538> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x94975000 - 0x94976ff7  com.apple.TrustEvaluationAgent 1.1 (1) <2D970A9B-77E8-EDC0-BEC6-7580D78B2843> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
0x94977000 - 0x94977ff7  com.apple.vecLib 3.6 (vecLib 3.6) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x94978000 - 0x94a34fff  com.apple.ColorSync 4.6.6 (4.6.6) <7CD8B191-039A-02C3-EA5E-4194EC59995B> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x94a35000 - 0x94e4bff7  libBLAS.dylib 219.0.0 (compatibility 1.0.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x94e58000 - 0x94e9cfe7  com.apple.Metadata 10.6.3 (507.15) <460BEF23-B89F-6F4C-4940-45556C0671B5> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x94e9d000 - 0x94eafff7  com.apple.MultitouchSupport.framework 207.11 (207.11) <6FF4F2D6-B8CD-AE13-56CB-17437EE5B741> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
0x95224000 - 0x9539ffe7  com.apple.CoreFoundation 6.6.6 (550.44) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x953a0000 - 0x953f0ff7  com.apple.framework.familycontrols 2.0.2 (2020) /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls
0x953f1000 - 0x953f4ffb  com.apple.help 1.3.2 (41.1) <8AC20B01-4A3B-94BA-D8AF-E39034B97D8C> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x953f5000 - 0x953f5ff7  com.apple.CoreServices 44 (44) <51CFA89A-33DB-90ED-26A8-67D461718A4A> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x954a0000 - 0x954a0ff7  liblangid.dylib ??? (???) /usr/lib/liblangid.dylib
0x954d2000 - 0x955d3fe7  libxml2.2.dylib 10.3.0 (compatibility 10.0.0) /usr/lib/libxml2.2.dylib
0x955d4000 - 0x955d8ff7  libGIF.dylib ??? (???) <2123645B-AC89-C4E2-8757-85834CAE3DD2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x955d9000 - 0x9561dff3  com.apple.coreui 2 (114) <2234855E-3BED-717F-0BFA-D1A289ECDBDA> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x9561e000 - 0x956b0fe7  com.apple.print.framework.PrintCore 6.3 (312.7) <7410D1B2-655D-68DA-D4B9-2C65747B6817> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x956d3000 - 0x956e1fe7  libz.1.dylib 1.2.3 (compatibility 1.0.0) <33C1B260-ED05-945D-FC33-EF56EC791E2E> /usr/lib/libz.1.dylib
0x956e2000 - 0x95715fff  libTrueTypeScaler.dylib ??? (???) <0F04DAC3-829A-FA1B-E9D0-1E9505713C5C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib
0x95716000 - 0x957c4ff3  com.apple.ink.framework 1.3.3 (107) <233A981E-A2F9-56FB-8BDE-C2DEC3F20784> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x96560000 - 0x96596fff  libtidy.A.dylib ??? (???) <0FD72C68-4803-4C5B-3A63-05D7394BFD71> /usr/lib/libtidy.A.dylib
0x965de000 - 0x9664dff7  libvMisc.dylib 268.0.1 (compatibility 1.0.0) <595A5539-9F54-63E6-7AAC-C04E1574B050> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x9664e000 - 0x967f5ff7  libSystem.B.dylib 125.2.11 (compatibility 1.0.0) <2DCD13E3-1BD1-6F25-119A-3863A3848B90> /usr/lib/libSystem.B.dylib
0x967f6000 - 0x96902ff7  libGLProgrammability.dylib ??? (???) <04D7E5C3-B0C3-054B-DF49-3B333DCDEE22> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib
0x96f98000 - 0x96fc9ff7  libGLImage.dylib ??? (???) <0EE86397-A867-0BBA-E5B1-B800E43FC5CF> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x96fca000 - 0x96fcaff7  com.apple.Carbon 150 (152) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x96fcb000 - 0x96febfe7  libresolv.9.dylib 41.0.0 (compatibility 1.0.0) /usr/lib/libresolv.9.dylib
0x96fec000 - 0x96fedff7  com.apple.audio.units.AudioUnit 1.6.7 (1.6.7) <838E1760-F7D9-3239-B3A8-20E25EFD1379> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x96fff000 - 0x9736aff7  com.apple.QuartzCore 1.6.3 (227.37) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x9736d000 - 0x97382fff  com.apple.ImageCapture 6.1 (6.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x97383000 - 0x9745dfff  com.apple.DesktopServices 1.5.11 (1.5.11) <800F2040-9211-81A7-B438-7712BF51DEE3> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x97477000 - 0x9747bff7  libGFXShared.dylib ??? (???) <801B2C2C-1692-475A-BAD6-99F85B6E7C25> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
0x9747c000 - 0x9748aff7  com.apple.opengl 1.6.13 (1.6.13) <025A905D-C1A3-B24A-1585-37C328D77148> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x974ec000 - 0x974f2fe7  com.apple.CommerceCore 1.0 (9.1) <521D067B-3BDA-D04E-E1FA-CFA526C87EB5> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore
0x97801000 - 0x978aefe7  libobjc.A.dylib 227.0.0 (compatibility 1.0.0) <9F8413A6-736D-37D9-8EB3-7986D4699957> /usr/lib/libobjc.A.dylib
0x978af000 - 0x978c3fe7  libbsm.0.dylib ??? (???) <821E415B-6C42-D359-78FF-E892792F8C52> /usr/lib/libbsm.0.dylib
0x978c4000 - 0x978ceff7  com.apple.HelpData 2.0.5 (34.1.1) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData
0x978cf000 - 0x978cfff7  com.apple.Accelerate 1.6 (Accelerate 1.6) <3891A689-4F38-FACD-38B2-4BF937DE30CF> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x97b05000 - 0x97be5fe7  com.apple.vImage 4.1 (4.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x97cb8000 - 0x97cbfff3  com.apple.print.framework.Print 6.1 (237.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x98dcf000 - 0x98e12ff7  libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x98e64000 - 0x98f58ff7  libiconv.2.dylib 7.0.0 (compatibility 7.0.0) <061ABF36-8BA9-79C1-6CE7-EC69A4998F51> /usr/lib/libiconv.2.dylib
0x98f59000 - 0x9983cff7  com.apple.AppKit 6.6.8 (1038.36) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x99876000 - 0x998f6feb  com.apple.SearchKit 1.3.0 (1.3.0) <2F5DE102-A203-7905-7D12-FCBCF17BAEF8> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x998f7000 - 0x99916ff7  com.apple.CoreVideo 1.6.2 (45.6) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x99917000 - 0x999b2fe7  com.apple.ApplicationServices.ATS 275.19 (???) <9FA31967-CF14-B033-EB8D-570561D12A13> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x99b36000 - 0x99b3aff7  IOSurface ??? (???) /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x99c62000 - 0x99c62ff7  com.apple.Cocoa 6.6 (???) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x99ceb000 - 0x99e6dfe7  libicucore.A.dylib 40.0.0 (compatibility 1.0.0) /usr/lib/libicucore.A.dylib
0x99e6e000 - 0x9a030feb  com.apple.ImageIO.framework 3.0.4 (3.0.4) <027F55DF-7E4E-2310-1536-3F470CB8847B> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x9a0e8000 - 0x9a0e8ff7  com.apple.Accelerate.vecLib 3.6 (vecLib 3.6) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x9a0e9000 - 0x9a40dfef  com.apple.HIToolbox 1.6.5 (???) <21164164-41CE-61DE-C567-32E89755CB34> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x9a40e000 - 0x9a448ff7  libcups.2.dylib 2.8.0 (compatibility 2.0.0) <6875335E-0993-0D77-4E80-41763A8477CF> /usr/lib/libcups.2.dylib
0x9a449000 - 0x9a46dff7  libJPEG.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x9a4a8000 - 0x9a4aefff  com.apple.CommonPanels 1.2.4 (91) <2438AF5D-067B-B9FD-1248-2C9987F360BA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x9a4af000 - 0x9a4baff7  libGL.dylib ??? (???) <3E34468F-E9A7-8EFB-FF66-5204BD5B4E21> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x9ab3c000 - 0x9ab57ff7  libPng.dylib ??? (???) <25DF2360-BFD3-0165-51AC-0BDAF7899DEC> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x9ab58000 - 0x9ab64ff7  libkxld.dylib ??? (???) <9A441C48-2D18-E716-5F38-CBEAE6A0BB3E> /usr/lib/system/libkxld.dylib
0xffff0000 - 0xffff1fff  libSystem.B.dylib ??? (???) <2DCD13E3-1BD1-6F25-119A-3863A3848B90> /usr/lib/libSystem.B.dylib

Model: MacBookPro6,1, BootROM MBP61.0057.B0C, 2 processors, Intel Core i7, 2.66 GHz, 8 GB, SMC 1.57f17
Graphics: NVIDIA GeForce GT 330M, NVIDIA GeForce GT 330M, PCIe, 512 MB
Graphics: Intel HD Graphics, Intel HD Graphics, Built-In, 288 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x93), Broadcom BCM43xx 1.0 (5.10.131.42.4)
Bluetooth: Version 2.4.5f3, 2 service, 19 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: APPLE SSD TS256B, 233.76 GB
Serial ATA Device: MATSHITADVD-R   UJ-898
USB Device: Hub, 0x0424  (SMSC), 0x2514, 0xfa100000 / 2
USB Device: Apple Internal Keyboard / Trackpad, 0x05ac  (Apple Inc.), 0x0236, 0xfa120000 / 4
USB Device: BRCM2070 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 3
USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8218, 0xfa113000 / 5
USB Device: Hub, 0x0424  (SMSC), 0x2514, 0xfd100000 / 2
USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0xfd120000 / 4
USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8507, 0xfd110000 / 3


Friday, November 18, 2011

Last 2 SLC Tech Breakfasts



"Selfish Reasons to Have More Kids" (Trent) surveys twin-adoption studies and asserts that nature surpasses nurture in most long-term qualities of life
EconTalk podcast interviewed that author, and other researchers to get the economists view

Henry Shrapnel invented bombs (Josh)

Recent Ping Identity Summit (Josh, from Rearden Commerce)
- OpenSSL, Josso
- potential for OpenID providers to manage the user's identity

AccountChooser.com is Google's widget for easy site authentication

"Hitchhiker's Guide to The Galaxy", where engineered livestock has desire to be eaten

SOPA is yet another piece of legislation to empower the RIAA to shut down websites


Project VRM by Doc Searles aims to build consumer-oriented identity management
Other consumer-centered projects (which aggregate demand): Google Offers, Groupon.com, HomeRun.com

Interesting projects from Rearden Commerce: enterprises typically use SAML, and there are problems trying to pass customers between sites who shouldn't have info from each other

Wouldn't it be nice to have things centralized!  (But that's what we're avoiding.)

Internet Identity Workshop is an influential conference in the identity field


_____________________________________________________________
These notes are from last month:


Ryan: using git submodules (like svn externals) vs subtree merges
Linux started with BitKeeper, then wrote his own git
http://xkcd.com/963/
The daily WTF

The best way to run a company is to not only encourage loyalty and
staying with the company but also encourage people to grow and
possibly leave.

Ryan: open-source RockBox project, with great audio features for old
iPods and trying to migrate it to modern players (iPhone, Android)

Seniors: won't use a computer, but will use email on their phone
'cause it's easier; there's a service that gives you a printer connected
to the network and downloads and prints emails from some account

Wednesday, September 21, 2011

Using rsync when scp keeps failing


Sometimes I'm trying to scp a file from a less-than-reliable server that drops my connection so that I can never get the whole thing.  Here is Kem's answer to that problem:


#!/usr/bin/env ruby while true do puts `rsync -av --progress --inplace --rsh='ssh' --bwlimit=100 #{ARGV[0]} #{ARGV[1]}` result = $? if (result.exitstatus == 0) puts "file copy done, exiting" break; end puts "retrying again -- result: #{result}" end

Tuesday, September 13, 2011

SSL installation checkers

Here are the two SSL checkers recommended by Kem & Makani:
  • http://www.digicert.com/help/
  • http://www.sslshopper.com/ssl-checker.html (because Makani says this one found a problem the other one missed)

Friday, August 19, 2011

Today's SLC Tech Breakfast



Dan: Where is virtual reality?

Video search
One big part is speech recognition Sphinx (CMU) http://cmusphinx.sourceforge.net/
Why store text?  There are good reasons (Josh and Matt are doing a project on all this)

Augmented reality
- SixthSense from MIT http://www.pranavmistry.com/projects/sixthsense/
- Dan recommends Robert Heinlein - Double Star

Phones seem to be changing how we do things, eg. calling rather than working independently

The G2X phone is fabulous - Matt

There are headphones that stick near the ear so you can feel vibrations (without bugging someone).

There's a higher ratio of female engineers in India vs America

Other events
- Utah Code Camp http://pcamputah.org/ (though it may just be more ads; not a good impression of Newmont by people)
- Product Camp Utah http://pcamputah.org/
- Roots Tech http://rootstech.familysearch.org/
- UTOS Project Day http://project-day.utos.org/

Chromebook is out, about $500
Google is offering it for about $28/chromebook/year for organizations ($20 for schools)

Google says Javascript is not the bottleneck any more
- Trent is using knockout.js (also looked at backbone.js)
- Matt uses GXT (GWT version of ext.js), though the rendered code can be confusing (with synchronous events)

Wednesday, August 17, 2011

concatenating lines in a pipe


I often have to munge multiple lines together, and I finally found a good way:

echo -e "1\n2" | awk '{ ORS="+"; print; }'

Note that this adds the separator on the end, so I have to  handle that:

echo -e "1\n2" | awk '{ ORS="+"; print; }' | awk '{ print $1 "0" }' | bc

Friday, July 15, 2011

Today's SLC Tech Breakfast

Bitcoin, the distributed currency

Technical pioneers that suddenly went dark:
- Satoshi Nakamoto (Bitcoin)
- why the lucky stiff (Ruby)

What motivates us?  Dan Pink says Autonomy, Mastery, Purpose: http://www.danpink.com/drive

New OSX features in Lion, such as versioned filesystem and saving to the cloud

The Obviousness of Anarchy: http://faculty.msb.edu/hasnasj/GTWebSite/Obvious.pdf

Friday, June 17, 2011

Today's SLC Tech Breakfast

From today's SLC Tech Breakfast:

Ruby fibers vs threads, and a web server Goliath that allows you to write in a more comfortable linear fashion.

Testing methodology and unit tests, and how we improve software and really engineer while handling business needs and reality.

Dan: can we train developers to schmooze with managers? See maker's schedule vs manager's schedule
(See the video on "the internet in a box".)

Developers get better with age.

Friday, May 20, 2011

Today's SLC Tech Breakfast

From today's SLC Tech Breakfast:

Staying secure with guns; Dan recommends TheBoxOTruth.com for gun education

passwords and sharing
- SpiderOak (Makani doesn't recommend for UI)
- LastPass.com (password sharing)
- locking password file: KeePassX, OnePassword, LastPass

For security, Dan wants a hand-held retina-scanner (not a hand-held-retina scanner)

Quantum entanglement, Dan will look up whether a recent experiment that supposedly allowed faster-than-light communication

Sharing code from different languages
- one way is to use JVM-based languages that can be compile-time checked (Josh)
- in C# shop, wants to use Java tool (Flying Saucer) to convert documents, used IKVM.net, also see JNBridge.com (Dan)
- make web-services the architectural organization (Josh)... that's how we organize in FLUX networking (Ryan)

Enterprise security: we share an encrypted DB (KeePassX), but if an employee leaves...?
The best solution is an OAuth-style, revokable auth

OAuth is recommended for phones, too... including web auth (Josh)

How good are your unit tests? (Dan)
- We have over 10% coverage with Sonar (Josh)
- Continuous build: Hudson, Cruise Control

How do we manage DB versioning? (Dan)
- custom system, which builds at any version (Makani)
- each DB change represented by create SQL and hopefully reverse SQL, table with version number in DB (Josh & Makani)
- potentially: make each change a non-breaking change with previous version, so code roll-back is easy, eg. rename is add followed by drop later (Makani)


"No fluff just stuff" conference downtown SLC (Josh)
Jsconf JavaScript conferences
Defrag conference in Denver (Trent)
Javascript libraries: Require, Promise interface, dojo for apps (Josh)

Friday, February 11, 2011

Today's SLC Tech Breakfast

 From today's SLC Tech Breakfast:

create a secure internal network, still open to neighbors:
- use two routers, a secure internal one behind an external open one
- open WRT or DDRT
- by default they're all bridged, which can be changed
- might be easier to do with multiple SSIDs

RiffTrax (funny running movie commentary) came up again... maybe we should create our own

parselet, a PEG (vs LALR, etc) parser

Payvment.com: your own shopping cart with items from other sites with a rich API

pidye.com, with this (beta) that's 100% client-side javascript cart

Google create specifications for searching/indexing rich AJAX web-pages
(Update: I just noticed a storm of complaints about the hash-bangs, eg. Tim Bray.)

HtmlUnit: java testing for web-pages

search engines for the large invisible web (eg. where structured data may take a few steps to access)

blekko.com (which Josh mentioned but I had to leave... can anyone summarize in the comments)