Hi Ralph!<br><br>Yeah Black Hole on Windows is completely relevant.<div><br></div><div>Re BH, you may be interested in checking out the nonsyntactic tower version at <a href="https://github.com/pereckerdal/blackhole/tree/legacy" target="_blank">https://github.com/pereckerdal/blackhole/tree/legacy</a> as that one is most tested and tried currently.</div>


<div><br></div><div>You find a current version of this nicely bundled on <a href="http://dynamo.iro.umontreal.ca/wiki/index.php/Dumping_Grounds#Module_systems" target="_blank">http://dynamo.iro.umontreal.ca/wiki/index.php/Dumping_Grounds#Module_systems</a> under the download link <a href="http://dynamo.iro.umontreal.ca/wiki/images/6/64/2012-11-28-bh-non-syntactictower%2Bbundled-libs.tar.gz" target="_blank">http://dynamo.iro.umontreal.ca/wiki/images/6/64/2012-11-28-bh-non-syntactictower%2Bbundled-libs.tar.gz</a> .</div>

<div><br></div><div>For installation please refer to the mailing list post of 2012-11-29.</div>
<div><br></div><div>Further updates are coming to Black Hole, at a currently unspecified date.</div><div><br></div><div>I would guess it works great on Windows either directly or with some trivla tweak, feel free to let the list know.</div>

<div><br></div><div><br></div><div>Now, did this solve your problem, or do you by some reason want to proceed with digging into the <span style="line-height:18px;color:rgb(51,51,51);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;border:0px;padding:0px">(</span><span style="line-height:18px;color:rgb(153,0,0);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;font-weight:bold;border:0px;padding:0px">compile-file-to-target</span><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace"> </span><span style="line-height:18px;color:rgb(221,17,68);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;border:0px;padding:0px">"/dev/null"</span> ... issue with syntactictower BH?</div>


<div><br></div><div>Mikael<br><br><div class="gmail_quote">2013/4/13 Ralph Moritz <span dir="ltr"><<a href="mailto:ralph.moeritz@outlook.com" target="_blank">ralph.moeritz@outlook.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


On Unix the null device is /dev/null. On Windows NT+ the equivalent is<br>
NUL. We can verify this by writing the following small C++11 program:<br>
<br>
#include <cstdio><br>
int main() {<br>
  auto f = fopen("NUL", "r");<br>
  if (f == nullptr) {<br>
    fprintf(stderr, "Cannot open file `NUL'.");<br>
    return 0;<br>
  }<br>
  printf("Opened file `NUL' successfully.");<br>
}<br>
<br>
The above program, when compiled and run on Windows, will always print<br>
"Opened file `NUL' successfully."<br>
<br>
This brings me to Gambit, via Black Hole. BH contains some code (in<br>
compile-load.scm and lib.scm) that assumes `/dev/null' exists. This is<br>
obviously not true on Windows where instead we have `NUL'. It's easy<br>
enough to modify BH accordingly but the problem remains that Gambit<br>
tries to normalize all paths passed to `compile-file-to-target' so we<br>
end up with `<absolute path to cwd>\NUL' instead of just `NUL'. This<br>
essentially prevents us from using the null device as input to<br>
`compile-file-to-target' on Windows & means the following code from BH<br>
will fail on Windows:<br>
<br>
(define (compile-sexp-to-c sexp<br>
                           fn<br>
                           #!key<br>
                           (options '()))<br>
  (##gc) ;; Avoid out-of-memory related crashes<br>
  (let ((hook (lambda (_) sexp))<br>
        (prev-hook #f))<br>
    (dynamic-wind<br>
        (lambda ()<br>
          (set! prev-hook c#expand-source)<br>
          (set! c#expand-source hook))<br>
        (lambda ()<br>
          (compile-file-to-target "/dev/null" ;; Change to "NUL" on Windows<br>
                             output: fn<br>
                             options: options))<br>
        (lambda ()<br>
          (set! c#expand-source prev-hook)))))<br>
<br>
I've searched through the Gambit source code & tried to make the<br>
necessary changes to get this working but have been unable to do so. I<br>
probably just don't yet have a good enough understanding of the<br>
code. (I tried modifying ___os_path_normalize_directory in<br>
lib/os_files.c)<br>
<br>
Is anyone able to help with this? I really want to run Black Hole on Windows!<br>
<br>
Many thanks,<br>
Ralph<br>
<br>
<br>
_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
</blockquote></div><br></div>