Skip to content
Snippets Groups Projects
  1. Dec 29, 2017
  2. Dec 28, 2017
    • Raymond Toy's avatar
      Print random state in hex · 58f107b1
      Raymond Toy authored
      Add comment for %random-double-float to use xoroshiro-gen directly
      instead of random-chunk twice.  A minor micro optimization.
      58f107b1
    • Raymond Toy's avatar
      Use the xoroshiro vop on sparc · 448e9970
      Raymond Toy authored
      The vop greatly speeds up the generator on sparc.  The time to
      generate 10,000,000 single-floats (on a 1 GHz Ultrasparc 3i) is:
      
      mt19937:   1.32 sec
      xoroshiro: 1.03 sec
      
      So xoroshiro is 22% faster than mt19937.
      448e9970
    • Raymond Toy's avatar
      Export random-state-jump · 11a14537
      Raymond Toy authored
      11a14537
  3. Dec 27, 2017
  4. Dec 21, 2017
  5. Dec 20, 2017
  6. Dec 19, 2017
    • Raymond Toy's avatar
      Print and set state as 64-bit integers · f9203f85
      Raymond Toy authored
      The xoroshiro128+ algorithm is defined using uint64_t types, but we
      hack it to store the state as double-float's.  This is a bit
      confusing, so add a printer to print the state as an array of two
      uint64_t's.
      
      Adjust init-xoro-state to allow initializing the state using an array
      of 2 64-bit ints.
      f9203f85
    • Raymond Toy's avatar
      Add custom xoro-random-state printer · 0b94ee3d
      Raymond Toy authored
      Custom printer to print the state as array of integers instead of
      doubles.  Makes it easier to see and match what the C code does.
      0b94ee3d
    • Raymond Toy's avatar
      Fix typos add jump function · dbc0518d
      Raymond Toy authored
      * Fix typos in names so we can call the functions.
      * Add jump function to allow generating new distinct sequences.
      * Add simple function to print the state using integers instead of
        doubles. (Untested.)
      dbc0518d
  7. Dec 17, 2017
  8. Dec 16, 2017
    • Raymond Toy's avatar
      Simplify state · 192fe3b6
      Raymond Toy authored
      Don't need an array for the cached value; (unsigned-byte 32) is a
      specialized structure slot, so no consing.
      
      Some random cleanups and comments.
      192fe3b6
  9. Dec 15, 2017
  10. Sep 30, 2017
    • Raymond Toy's avatar
      Fix #45: Handle relative paths in `run-program` · 12018284
      Raymond Toy authored
      This is basically the solution proposed by Elias Pipping with a few
      minor tweaks.
      
          - In `run-program`, don't merge `program` with the "path:"
            search-list.  `spawn` will handle this.
          - In `spawn`, if the first call to execve fails, instead of trying
            "/bin/sh", use "/usr/bin/env" which will use the user's PATH if
            necessary to find the program.
      12018284
  11. Sep 16, 2017
    • Raymond Toy's avatar
      Fix #44: Add docstrings for process accessors · ec29ec51
      Raymond Toy authored
      Adds docstrings for the exported process accessors:
      `process-pid`, `process-exit-code`, `process-core-dumped`,
      `process-pty`, `process-input`, `process-output`, `process-error`,
      `process-status-hook`, `process-plist`.
      ec29ec51
    • Raymond Toy's avatar
      Remove wait3 stuff · e1f12db9
      Raymond Toy authored
      `wait3` is removed along with alien routine and the constants.
      e1f12db9
    • Raymond Toy's avatar
      Fix up minor issues in implementation · 65ce358d
      Raymond Toy authored
       - process-alive-p should return T for continued processes
       - Simplify prog-status slightly by making the status code array start
         :signaled instead of nil.
       - Update prog_status with enum to specify the codes to make it
         clearer what they mean and to make it clearer that it matches the
         expectations in prog-status.
      65ce358d
  12. Sep 09, 2017
    • Raymond Toy's avatar
      Fix #41: Report proper process status · f05cb10a
      Raymond Toy authored
      The main problem is that we weren't calling wait3 with WCONTINUED so
      that we would be signaled when the process continues.  And we also
      need to check that result of wait call was WCONTINUED>
      
      Replace the wait3 routine with a C routine (prog_status) so we don't
      have to deal with the OS-specific flags.  This function basically
      returns what the lisp function wait3 did.
      
      Use this function in GET-PROCESSES-STATUS-CHANGES.
      
       - runprog.c:
         - Add prog_status
       - run-program.lisp:
         - Use prog_status instead of wait3
       - issues.lisp:
         - Add basic test
      f05cb10a
  13. Jan 29, 2017
  14. Dec 23, 2016
  15. Dec 08, 2016
    • Raymond Toy's avatar
      Fix typo · dc743457
      Raymond Toy authored
      "Cound" -> "Could"
      dc743457
    • Raymond Toy's avatar
      Fix #34: Handle newline character correctly · d959c164
      Raymond Toy authored
      The string containing #\Newline that is used to output the newline
      character worked on little-endian architectures because the low octet
      was first in memory.  However on a big-endian sparc, a NUL character
      was output instead since the high octet is first in memory.
      
      So, create a explicit unsigned-byte 8 array containing exactly 1 octet
      that represents a newline character code.
      
      Tests pass on both sparc and x86/linux.
      d959c164
  16. Dec 07, 2016
    • Raymond Toy's avatar
      Replace unix-times usage with getrusage · 29cb2f47
      Raymond Toy authored
      unix:unix-times was only used for #+(and sparc svr4).  The existing
      code already supported a different function when this condition was
      false, so use that, which uses getrusage instead.
      
      Don't need cross-x86-sparc-bootstrap.lisp anymore either.
      29cb2f47
  17. Dec 01, 2016
  18. Nov 29, 2016
    • Raymond Toy's avatar
      Fix #26: Use nanosleep to sleep · e5777ecb
      Raymond Toy authored
      lisp/os-common.c:
      o Implement os_sleep(double) to sleep for the given number of
        seconds.  Uses nanosleep on all platforms to sleep, taking care to
        sleep more if nanosleep was interrupted.
      
      code/lispinit.lisp:
      code/multi-proc.lisp:
      o Use the new os_sleep function to sleep for the requested amount of
        time.
      e5777ecb
  19. Nov 11, 2016
  20. Sep 28, 2016
  21. Sep 19, 2016
    • Raymond Toy's avatar
      Fix #29: Update processing of command line · d9090138
      Raymond Toy authored
      Several related changes here.
      
      o If :process-command-line is NIL, *command-line-strings* and
        *command-line-application-arguments* weren't getting updated.  They
        should get updated so that the resulting core can get updated
        command line options instead of using the values dumped with the
        core.  The command line switch demons are still not run, as before.
      o Add a :quiet option as if -quiet were given.
      d9090138
  22. Sep 08, 2016
    • Raymond Toy's avatar
      Fix #30: compilation of (describe 'foo) · 53fe0a4f
      Raymond Toy authored
      The debug-info-source isn't available until later in the fasl, so
      don't try to print where the source was compiled from.  This seems
      like a small oversight since the next bit of code does nothing if the
      debug-info-source isn't available.
      53fe0a4f
  23. Sep 04, 2016
    • Raymond Toy's avatar
      37c549c6
    • Raymond Toy's avatar
      Fix #27: PATHNAME-MATCH-P loops for logical pathnames · c07cad4b
      Raymond Toy authored
      When support for search-lists was added to PATHNAME-MATCH-P, support
      for logical pathnames was broken because PATHNAME-MATCH-P eventually
      calls TRANSLATE-LOGICAL-PATHNAME which calls PATHNAME-MATCH-P with
      logical pathnames.  This caused infinite recursion.
      
      So add back the original PATHNAME-MATCH-P, but rename to
      %PATHNAME-MATCH-P and use that in TRANSLATE-LOGICAL-PATHNAME and
      friends.
      
      Add test for this case too.
      c07cad4b
  24. Sep 03, 2016
Loading