IRC channel logs
2018-06-21.log
back to list of logs
<snape>does anyone know a way to autoformat one-line Scheme code? The minimum so that it's readable. <cehteh>replace every ( with (\\n, then select the while block and M-x indent-region <snape>sounds good, I'll do that. Thank you! <cehteh>and \\n( rather than (\\n .. well i am scheme noob and dont get the favored indenting either <snape>it'll be surely better than one line :-) <ecraven>or just use your Scheme's pretty-print function <ecraven>also, in Emacs, auto-fill-mode seems to work ok for me <ecraven>just set your fill column, and type a space after your line <snape>a combination of both solutions, plus indent-region, seems to more or less do the job :-) <civodul>wingo: scm_i_vm_mark_stack can be called from a thread other than the one whose stack is being scanned, right? <civodul>so what happens if thread A is running, while thread B is scanning A's VM stack? <wingo>civodul: mark procedures run when the world is stopped <wingo>civodul: the vp->sp and vp->fp will always be current <wingo>vp->ip might be out of date though. for that reason the innermost (most recently pushed) stack frame is scanned conservatively <wingo>but for the rest, the saved return address in each frame indicates the suspended ip, so those frames are scanned precisely <wingo>if instead of using signals, we used safepoints, we could scan innermost frames precisely as well; not currently the case tho <wingo>additionally, things that munge the stack like vm_expand_stack, continuation hacks, etc happen within the alloc lock, so no race condition there <wingo>i.e. a mark from a remote thread will see the stack before or after expansion, not during <wingo>speaking about the ideal world that we don't yet have: ideally threads would mark their own stacks, when they notice that there's a pending gc safepoint. improves locality. <wingo>incidentally the whole c file refactoring was driven by a desire to inline struct scm_vm into struct scm_thread; they exist in a 1-to-1 relationship <civodul>i'm trying to find out how we can end up with cells being reclaimed too early <wingo>have you been able to come up with a reproducible test case? <civodul>some take a while to reproduce it, others are faster but require bits of Guix <civodul>no perfectly reduced test case unfortunately <civodul>wingo: i don't see the special treatment of the innermost frame in scm_i_vm_mark_stack <wingo>civodul: slot_map will be NULL on first iteration <wingo>if you suspect slot maps are to blame, you can make slot_map NULL on every iteration, to test <wingo>i see that gnutls has mark and free functions for its smobs. can you get rid of the mark functions? <wingo>is gnutls loaded in the test cases you have? <civodul>what's the gdb incantation to leads the loaded .so files again? <civodul>however in GnuTLS the mark free functions are for 1.8 only <wingo>maybe you can remove support for 1.8 at this point, dunno <wingo>might not fix the issues, of course! <civodul>with 'desc' set to SLOT_DESC_LIVE_SCM unconditionally, it still crashes, though perhaps slightly less frequently (hard to say) <civodul>so find_slot_map for 'subr_stub_code' returns NULL, right? <wingo>sneek: later tell civodul yes, find_slot_map for subr_stub_code returns null <sahithi-ihtihas>ERROR: In procedure iota: Wrong type argument: #("phase foo failed after 100 seconds" (0 . 34) (0 . 5) (5 . 10) (10 . 22) (22 . 27) (27 . 34)) <OrangeShark>sahithi-ihtihas: iota expects a number while the argument was not a number <sahithi-ihtihas>(define (range from to) (map (lambda (x) (+ from x)) (iota (- to from)))) <daviid>sahithi-ihtihas: iota accepts a start <daviid>sahithi-ihtihas: look for the definitin in the manual tehere ar a few examples as well <OrangeShark>that basically does this, would be nice to have a normal list range version <rekado_>sahithi-ihtihas: note that there are *two* implementations of iota. <rekado_>sahithi-ihtihas: srfi-1 provides the more advanced implementation that accepts a start and step value <daviid>OrangeShark: the guile core, if you do not import srfi-1, it will raise an exception if you pas ore then one arg ... <daviid>sahithi-ihtihas: becaue unlike yout range procedure, iota expect the count as its first arg, not from <daviid>it works like this: give that 'count' many numbers, starting with ... and using step to compute the next values ... <OrangeShark>oh, totally forgot I had guile installed on this computer :) <sahithi-ihtihas>I am somewhere looking around for range kind implementation.....anyways thank you so much <daviid>sahithi-ihtihas: np! but iota is fine, yu'll get use to it :)