[05:35:44] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has quit (Ping timeout: 276 seconds). [08:54:51] * Carisius [Carisius!~Carisius@cm-188-171-4-60.telecable.es] has joined the channel. [10:01:44] * Carisius [Carisius!~Carisius@cm-188-171-4-60.telecable.es] has quit (Remote host closed the connection). [10:19:41] * kssreeram [kssreeram!~kssreeram@106.193.95.5] has joined the channel. [11:01:06] * kssreeram [kssreeram!~kssreeram@106.193.95.5] has quit (Ping timeout: 240 seconds). [11:49:33] * kssreeram [kssreeram!~kssreeram@171.76.252.149] has joined the channel. [12:21:27] * kssreeram [kssreeram!~kssreeram@171.76.252.149] has quit (Ping timeout: 240 seconds). [14:12:45] * kssreeram [kssreeram!~kssreeram@183.83.51.38] has joined the channel. [14:17:39] * kssreeram [kssreeram!~kssreeram@183.83.51.38] has quit (Ping timeout: 240 seconds). [14:55:52] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has joined the channel. [15:09:04] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has quit (Quit: WeeChat 1.5). [15:09:23] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has joined the channel. [16:30:23] I was trying to get my logging.syslog to work and have dropped down into the assembly code to watch the args being passed to the external library libsystem_asl.dylib with both my code and some C test code. In both cases r12 has the priority and r14 the C string. However the C code version works while the factor code returns with `Memory protection fault at address 0x18' [16:42:46] Any ideas on how to fix this? [17:15:17] * kssreeram [kssreeram!~kssreeram@183.83.51.38] has joined the channel. [17:47:34] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has quit (Ping timeout: 244 seconds). [18:24:43] * rgrinberg [rgrinberg!~rgrinberg@205.189.187.4] has joined the channel. [18:43:37] * kssreeram [kssreeram!~kssreeram@183.83.51.38] has quit (Quit: My Mac has gone to sleep. ZZZzzz…). [18:53:50] tgunr: you might need to use FUNCTION: ... c-string .. ; instead of char* ? [18:53:59] tgunr: without seeing the code i dont know what's going wrong [18:54:41] pretty simple, i'll post it after trying c-tring [18:54:45] * bb010g [bb010g!uid21050@gateway/web/irccloud.com/x-gvgultcydmxhzfkh] has joined the channel. [18:55:54] well, i did already have `FUNCTION: void syslog ( int priority, c-string message ) ' [18:56:07] will try char* [18:59:31] slightly different `Memory protection fault at address 0x0` instead of `Memory protection fault at address 0x18' [19:08:52] pushed my latest to https://github.com/tgunr/factor/tree/syslog/basis/logging/syslog [19:15:37] oh, you're just calling syslog? it has varargs, which we dont really support [19:17:20] FUNCTION: void syslog ( int priority, c-string format, c-string message ) [19:17:27] 1 "%s" "hi" syslog [19:18:30] you can wrap it like : syslog-priority-1 ( str -- ) [ 1 "%s" ] dip syslog ; "log me" syslog-priority-1 [19:37:33] hmmm, ok [19:53:23] same result [20:24:54] tgunr: you can make a small c library that wraps it without varargs functions.. [20:27:16] The part I'm not understand is the actual values being passed into syslog are identical for both my factor call and a small a.out calling syslog [20:28:31] the varargs function abi needs a 0 on the stack after the last argument, but factor doesn't support this. i am not sure how to fake it except with a C library that you load [20:29:58] I see only two args being pulled in [20:30:07] `libsystem_asl.dylib`syslog: [20:30:07] -> 0x7fffaec62e2b <+20>: movq %rsi, %r14 [20:30:07] 0x7fffaec62e2e <+23>: movl %edi, %r12d [20:30:07] 0x7fffaec62e31 <+26>: testb %al, %al [20:30:09] 0x7fffaec62e33 <+28>: je 0x7fffaec62e6a ; <+83>' [20:30:42] so your saying the r14 with the message needs a 0 at the end? [20:40:01] i mean i think it reads stack locations until one is a 0, in addition to c-strings still being null-terminated [20:40:20] but you can find the varargs abi [20:54:15] * rgrinberg [rgrinberg!~rgrinberg@205.189.187.4] has quit (Ping timeout: 264 seconds). [21:01:09] looking [21:08:47] I created a wrapper library at same level, what would be the best way to just leave it there and specify the path with `add-library' ? [21:13:27] nm, guess i can't `libsyslogger.dylib signature not valid: -67050' [21:21:43] * bb010g [bb010g!uid21050@gateway/web/irccloud.com/x-gvgultcydmxhzfkh] has quit (Quit: Connection closed for inactivity). [21:40:04] * rgrinberg [rgrinberg!~rgrinberg@24-246-56-85.cable.teksavvy.com] has joined the channel. [22:00:53] placed the wrapper lib into /usr/local/lib, changed the code slightly to call wrapper, no errors now but no log message either [22:01:05] In console i see [22:01:06] Jul 23 11:16:53 mbpr logd[75]: Failed to harvest strings for binary named '/Sources/Factor/basis/logging/syslog/libsyslogger.dylib' [22:01:29] and can find no reference for that message anywhere so far [22:01:56] pushed my latest to https://github.com/tgunr/factor/tree/syslog/basis/logging/syslog [22:15:12] how bizarre, quit and restarted, now seeing log messages in ASL on levels 1-6 but nothing in syslog [22:15:23] so it is kind of working [23:29:35] * delvinj [delvinj!~Miranda@2601:449:4001:5400:583d:e361:a82:8852] has joined the channel.