Paste: fix osx not displaying filename
Author: | trevor |
Mode: | factor |
Date: | Fri, 4 Feb 2011 06:16:30 |
Plain Text |
USING: accessors assocs io io.directories io.files.info
io.monitors kernel sequences sorting ;
IN: file-watcher
: a ( path -- assoc )
dup
[
dup [ file-info modified>> ] map zip
] with-directory-files
sort-values last first append ;
: watch-loop ( monitor -- )
dup next-change path>> a print flush watch-loop ;
: watch-directory ( path -- )
[ t [ watch-loop ] with-monitor ] with-monitors ;
Author: | trevor |
Mode: | text |
Date: | Fri, 4 Feb 2011 06:28:32 |
Plain Text |
The die word was called by the library. Unless you called it yourself,
you have triggered a bug in Factor. Please report.
Starting low level debugger...
Basic commands:
q -- continue executing Factor - NOT SAFE
im -- save image to fep.image
x -- exit Factor
Advanced commands:
d <addr> <count> -- dump memory
u <addr> -- dump object at tagged <addr>
. <addr> -- print object at tagged <addr>
t -- toggle output trimming
s r -- dump data, retain stacks
.s .r .c -- print data, retain, call stacks
e -- dump environment
g -- dump generations
data -- data heap dump
words -- words dump
tuples -- tuples dump
refs <addr> -- find data heap references to object
push <addr> -- push object on data stack - NOT SAFE
code -- code heap dump
READY
==== DATA STACK:
"/Users/trevor/Library/Safari/"
{ io.monitors:+modify-file+ }
T{ destructors:already-disposed T{ io.monitors.macosx:macosx-monitor syntax:t f "/Users/trevor" T{ concurrency.mailboxes:mailbox T{ dlists:dlist f f } T{ dlists:dlist T{ dlists.private:dlist-node io.monitors.private:monitor-disposed f f } T{ dlists.private:dlist-node io.monitors.private:monitor-disposed f f } } } f T{ core-foundation.fsevents:event-stream syntax:t f #<type 6 @ 10de38ff6> #<type 6 @ 10de3a886> } } }
==== RETAIN STACK:
7939
{ { "/Users/trevor/Library/Safari/lock/" 0 #<type 5 @ 10e1b0245> } { "/Users/trevor/Library/Safari/" 0 #<type 5 @ 10e1b02a5> } }
T{ io.monitors.macosx:macosx-monitor syntax:t f "/Users/trevor" T{ concurrency.mailboxes:mailbox T{ dlists:dlist f f } T{ dlists:dlist T{ dlists.private:dlist-node io.monitors.private:monitor-disposed f f } T{ dlists.private:dlist-node io.monitors.private:monitor-disposed f f } } } f T{ core-foundation.fsevents:event-stream syntax:t f #<type 6 @ 10de38ff6> #<type 6 @ 10de3a886> } }
2
1
T{ io.monitors.macosx:macosx-monitor syntax:t f "/Users/trevor" T{ concurrency.mailboxes:mailbox T{ dlists:dlist f f } T{ dlists:dlist T{ dlists.private:dlist-node io.monitors.private:monitor-disposed f f } T{ dlists.private:dlist-node io.monitors.private:monitor-disposed f f } } } f T{ core-foundation.fsevents:event-stream syntax:t f #<type 6 @ 10de38ff6> #<type 6 @ 10de3a886> } }
==== CALL STACK:
frame: 1289cffc8
executing: ( callback )
scan: f
word/quot addr: 105a70e7c
word/quot xt: 10ee45d80
return address: 10ee45fc1
frame: 1289cff78
executing: io.monitors.macosx:enqueue-notifications
scan: f
word/quot addr: 105a8a1bc
word/quot xt: 10ee303f0
return address: 10ee304e3
frame: 1289cff58
executing: io.monitors:queue-change
scan: f
word/quot addr: 105a349cc
word/quot xt: 10ee28910
return address: 10ee2899e
frame: 1289cff38
executing: destructors:already-disposed
scan: f
word/quot addr: 10196793c
word/quot xt: 10e9f9860
return address: 10e9f98d3
frame: 1289cff18
executing: object=>throw
scan: f
word/quot addr: 101b688dc
word/quot xt: 10e642560
return address: 10e6425a6
frame: 1289cfef8
executing: continuations:rethrow
scan: f
word/quot addr: 1018709dc
word/quot xt: 10e9b29d0
return address: 10e9b2a4e
frame: 1289cfed8
executing: [ threads:self threads:error-in-thread threads:stop ]
scan: 1
word/quot addr: 103909704
word/quot xt: 10f1103c0
return address: 10f1103de
frame: 1289cfeb8
executing: thread=>error-in-thread
scan: f
word/quot addr: 103cc40ec
word/quot xt: 10e8b7b90
return address: 10e8b7bd2
frame: 1289cfe98
executing: kernel:die
scan: 1
word/quot addr: 101b55d4c
word/quot xt: 10e635a20
return address: 10e635a5b
([0x0-0x823823].org.factorcode.Factor[90282]) Exited with exit code: 1
New Annotation