<<06-03-2013>>

16:38:25*NimBot joined #nimrod
16:38:30Araqit's nice for the "embedded debugger" too
16:38:44Zorwhat's that?
16:39:20Araqthe language supports pragmas like {.breakpoint.} and {.watchpoint: myVariable.}
16:39:56Araqwhich cause the codegen to insert certain runtime calls for the debugger
16:40:13Zordoes it integrate with gdb or do you have your own debugger?
16:40:27Araqmy own debugger ;-)
16:40:58Araqwe have "integration" with gdb by emitting #line directives
16:41:37Araqso yeah; there are 2 somewhat incompatible debuggers
16:41:58ZorI guess your debugger lives mostly in the runtime? and you have a separate program that attaches to it?
16:42:01Zoror something like that?
16:42:12Araqit's worse than that ;-)
16:42:45Araqthe debugger is completely in the runtime and thus in the same address space
16:43:05Araqso if your corruption is bad enough the debugger can't help you ...
16:43:09Zorah...
16:43:20Zorwell, cooperative debuggers will always have that weakness
16:43:34Zorno matter if they allow remote attaching or not
16:43:56Araqtrue but remote attaching would be very cool
16:44:24AraqI guess I should export some API so somebody can do that without hacking the stdlib
16:45:30Zorcould just use a simple tcp-based thing
16:45:45Zorand have something like a NIMROD_DEBUG_LISTEN=address:port env var
16:46:12Araqthe embedded debugger is also quite slow; factor 4 or something iirc
16:46:42Araqthough it's hard to tell as most of the slowdown is caused by the line tracing
16:47:08Araqhowever I played with GDB software emulated watchpoints once
16:47:10Zorhow does the debugger grab locals?
16:47:29Araqand they are far worse :-)
16:47:41Zordo you instrument the program with a (slow) complete shadow stack in debug builds?
16:48:35Araqyes but it's not that slow as the shadow stack lives on C's stack
16:48:54Araqyou lose any registerization etc.
16:49:24Araqyou get 'frame->var' instead of 'var' in the C code
16:49:57Zorhow do you store it on the C stack btw?
16:50:13*FreeArtMan joined #nimrod
16:51:38Araqvoid f() { struct { void* parent; locals_here; } frame; frame->parent = tos; tos = &frame; ... }
16:51:52Araqwhere 'tos' is a thread local variable
16:52:53Zorhow does the debugger know where to look in the locals_here for a particular var?
16:53:25Araqgood question :-)
16:53:53Araqthe frame also contains RTTI describing the layout
16:53:58reactormonkhave fun with optimized away variables
16:57:56Zorby the way, does nimrod have a debug { ... } statement-ish thing
16:57:58Zor+?
17:00:36Araqreactormonk: the C compiler can't optimize away the variable :P as it would change the semantics
17:00:58reactormonkAraq, hm.
17:01:12reactormonkAraq, never had an 'optimized away' with the gdb?
17:01:41AraqZor: yeah there is debugEcho or the more general 'when not defined(release)'
17:02:24Araqreactormonk: the shadow stack inhibits such optimizations
17:03:27reactormonkAraq, ok
17:06:49AraqZor: there is no real debug mode in nimrod; instead it's much more finely grained
17:07:16Araqyou can query if a certain runtime check is enabled/disabled or a user defined symbol exists etc.
17:08:16Araq'debugEcho' is not restricted to debugging, it pretends it has no side effects so that it can be used in pure functions; somewhat like UnsafeIO in Haskell
17:09:31Araqand the shadow stack can be en-/disabled on a per function basis
19:02:57*Trixar_za is now known as Trix[a]r_za
19:05:22*FreeArtMan quit (Quit: rm -rf /)
19:05:38*FreeArtMan joined #nimrod
19:20:51*FreeArtMan quit (Quit: rm -rf /)
20:32:15*xcombelle quit (Read error: Connection reset by peer)
21:00:33*gradha joined #nimrod
21:16:56gradhadidn't even know we have a mascot www.facebook.com/nimnimrod
21:17:16gradhastill no sunset
21:21:59dom96I wonder what language that is
21:25:09gradhalooks hebrew
21:38:29*gour quit (Quit: WeeChat 0.4.0)
21:44:10dom96" gradha started following dom96 a minute ago "
21:44:14dom96How nice of you :P
21:44:33gradhayeah, just realizer I wasn't stalking enough people, no wonder my facebook is empty
21:45:51gradhaare you going to theme Aporia to its new logo?
21:46:18dom96as soon as filwit creates one I like, sure.
21:46:58gradhayou need splash screens
21:47:27dom96yes, and 10 minutes loading times!
21:48:14gradhaI worked at a place where a common internal tool would launch and loudly play some Tom Jones clip
22:01:51Araqgradha: XD
22:01:59Araqhighly professional ...
22:05:18gradhathe tool was named tomcat, IIRC the logo was the face of a cat fading to an F14
22:06:26Araqthe tomcat server?
22:06:59gradhano, it was a videogame toolchain, one of the few public references can be found at http://www.shawnhargreaves.com/cv.html, page of the lead programmer
22:09:22Araqwow the guy who developed Allegro
22:10:01gradhamost people confuse that with common listp
22:10:19AraqAbuse?
22:10:50gradhahttp://www.franz.com/products/allegrocl/
22:11:07gradhaat least I was told CL stands for common listp, IIRC
22:11:35gradhaonce I gave a talk on programming with Allegro and people from lisp showed up, were confused as hell
22:12:02gradhathere isn't much functional programming in blitting sprites
22:12:19Araqoh yeah I heard about that allegro Lisp environment
22:12:24Araqnever used it though
22:12:36Araqwell I didn't use much Lisp anyway
23:00:22gradhalooks like strutils could grow a toOctal proc accepting integers rather than chars
23:02:14gradhaoh, maybe toOct does that
23:06:30*gradha quit (Quit: bbl, have youtube videos to watch)