[racket] Some tips regarding a math/matrix bug?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Mar 25 22:35:20 EDT 2013

On Mon, Mar 25, 2013 at 9:24 PM, Daniel King <danking at ccs.neu.edu> wrote:

> Hi all,
> I just submitted a bug report on the main racket bug report page; however,
> I'd
> like some guidance/assistance as to how to mitigate that problem in the
> meantime.
> Along with the three fine gentlemen CC'd (please CC them in later
> communications), I am working on a senior-year software development
> project at
> Northeastern. The project is essentially a reverse image search. In
> implementing
> this, we intend to take advantage of Racket's brand new math library and
> Typed
> Racket.
> We also intend to compile-to-executable the entire project. Mainly because
> our
> professor requests that the final product be an executable.
> The essence of the bug is that a program which depends on `math/matrix'
> and is
> compiled-to-executable (`raco exe'), will encounter run-time
> namespace/dependency problems (i.e. it will fail to run).
> To our problem:
>  - Can someone provide insight as to the pros and cons of compilation (to
>    executable)?

The pro is that it is easier to distribute. One con is that your program
becomes platform-specific. Well, and bugs as you've found....

> Do we lose a significant amount of performance by not compiling
>    (to executable)?
There is no real performance benefit.

>  - How does compilation to executable compare to byte-code compilation?
The executable is made up of bytecode embedded directly into the
executable. The

>  - Any ideas as to avoiding this issue in the first place? Forcing the
> compiler
>    to include the necessary dependency?
You could try putting a require to the affected module in some other file.
It may be the case that the compiler cannot "see" that that module is
needed at compile time even though it turns out to be needed. (This would
be due to a bug -- if this is true, then something is doing a
dynamic-require, but not leaving behind information at compile-time for the
compiler to find so it can be ready for the dynamic-require in the

This might not be the bug, tho.

> We have to hand in the project on Friday, so worst case we hand in an
> executable
> Racket "script" which uses the JIT.
(Just in case the above wasn't clear: the bytecode that is embedded into
the executable is JIT compiled too. Executable creation is really only
about distribution, not performance.)

> Thanks!
> ---------- Forwarded message ----------
> From:  <bugs at racket-lang.org>
> Date: Mon, Mar 25, 2013 at 10:12 PM
> Subject: Re: [racket-bug] all/13633: The math/matrix library doesn't
> compile to executable (raco exe) correctly
> To: danking at ccs.neu.edu
> Thank you very much for your problem report.
> It has the internal identification `all/13633'.
> You can check on the status of your problem report at
>   http://bugs.racket-lang.org/query/?cmd=view&pr=13633
> If you wish to provide further information regarding this problem
> you can do so as a reply to this message.  (But please make sure
> that your mailer replies to both "bugs" and "bug-notification".)
> --
> Dan King
> College of Computer and Information Science
> Northeastern University
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130325/5bbc94f5/attachment.html>

Posted on the users mailing list.