lexi.lambda
2018-5-3 14:49:15

@mflatt I’m getting a instantiate-linklet: mismatch error I don’t understand: instantiate-linklet: mismatch; reference to a variable that is unintialized; possibly, bytecode file needs re-compile because dependencies changed name: idY51.2 exporting instance: "/Users/alexis/gits/racket/mutation-testing/data-queue.rkt" importing instance: (submod "/Users/alexis/gits/racket/mutation-testing/data-queue.rkt" test) I don’t really understand what this error means in general, but I’m especially confused about how a submodule could be out of sync with its parent module. Does this error message mean anything to you?


mflatt
2018-5-3 16:10:32

The “possibly” is clearly a wrong guess there. I’m at a loss for a second guess. Is there something I could run?


lexi.lambda
2018-5-3 16:13:36

Unfortunately, my naïve attempts to reproduce the error with a smaller program didn’t work, but if you don’t have any ideas from the error message alone, I can certainly work harder to come up with a minimal example.


mflatt
2018-5-3 16:20:41

The name idY51.2 suggests an interaction with the contract system, perhaps a lift that has gone wrong. Maybe the contract system is seeing a context (in the sense of syntax-local-context) where it thinks it has already lifted an expression, but it hasn’t. Maybe it’s something about a re-expansion that claims to be the same context as earlier but has actually thrown away lifts.


lexi.lambda
2018-5-3 16:24:23

I think you’re probably right about it being an issue related to lifts. I thought that might be related, myself, but it wasn’t immediately obvious to me why that might be, and I didn’t think to just try providing the same identifiers without the contracts on them. Trying that now, it does indeed seem to fix the problem, so I’ll try and figure out where the lifts are getting lost.


pocmatos
2018-5-3 18:17:26

is there a memory profiler in racket or at least a way to check at a certain point in the program execution how much memory is being used and which location was the source of the allocation?


samth
2018-5-3 18:23:13

@pocmatos there are a few things; see dump-memory-stats and the --enable-backtrace configure option


pocmatos
2018-5-3 18:24:21

is that --enable-backtrace from the racket ./configure or something else?


pocmatos
2018-5-3 18:25:33

what are the vs in the dump-memory-stats. The docs look a bit vague to me.


samth
2018-5-3 18:40:53

Yes, and it depends on the configuration of racket, and if they’re supported then calling it with no arguments will explain it


pocmatos
2018-5-3 18:53:57

ah… got it. thanks.


samuel.falcon.fdez
2018-5-3 20:21:44

Hi! I’m struggling a bit on embedding racket into a c program in windows. If anyone is familiar with it, what I’m finding is an access violation when trying to call scheme_main_setup https://gyazo.com/95891f2c26a18567469b912aa80db099 The docs mention that you need “libracketx.lib” to link to the executable, but since that doesn’t exist on a default install, I created it myself from the included “libracketx.def” I’m not exactly sure of what I’m doing wrong and I’m feeling dumb about it… Any feedback would be very appreciated. Peace :slightly_smiling_face:


mflatt
2018-5-3 21:03:40

@samuel.falcon.fdez If you can show some C code and how you’re compiling & linking, we can probably help more.


samuel.falcon.fdez
2018-5-3 21:17:17

leif
2018-5-3 22:08:48

Does anyone know if, in scribble, I can replace any x (where x is a content?), with (make-element #f x)?


leif
2018-5-3 22:09:12

(Or basically, I want to wrap an arbitrary content? with the sf style. If that’s possible.)


mflatt
2018-5-3 23:47:53

You’ll have to do more to cooperate with 3m GC, but I don’t think you’re getting far enough for the problem to be registering local variables with the GC.

The immediate problem maybe that you need to call scheme_register_tls_space before scheme_main_setup. Look for scheme_register_tls_space here: http://docs.racket-lang.org/inside/embedding.html?q=inside#%28part._.C.G.C_.Embedding%29

I’m not certain that’s the only issue to avoid an immediate crash, but let’s try that first.


mflatt
2018-5-3 23:48:55

@leif Yes, that should work. Are you running into a problem?