pocmatos
2018-9-19 09:08:51

@lexi.lambda hi, i just noticed your vector-struct package. Was there a specific reason for deprecating it? Are there alternatives out there for lighter structs?


alexharsanyi
2018-9-19 12:29:12

hi @david.alkire, you can override the on-paint method of the pasteboard% class and draw the background image when the before? flag is #t. You can actually do quite complex things with pasteboard% objects: For example, I implemented a prototype where the background of the pasteboard% is a map which can be panned around with the mouse and there are snips which can be dragged over the map when the control key is pressed.


pocmatos
2018-9-19 13:51:13

@mflatt I am having issues with using the result of define-runtime-module-path-index with dynamic-place. I have (define-runtime-module-path-index mod-bootup 's10/place-bootup) which I then use with (dynamic-place mod-bootup 'place-bootup) however, I get from racket: dynamic-place: contract violation expected: (or/c module-path? path?) given: #<module-path-index:'#%embedded:g29862:place-bootup> is this a bug in dynamic-place or am i missing something?


lexi.lambda
2018-9-19 14:48:16

@pocmatos Structs got faster. On modern Rackets, I didn’t detect any meaningful performance difference between vectors and structs.


pocmatos
2018-9-19 14:50:02

Oh OK. Thanks.


greg
2018-9-19 15:29:15

@lexi.lambda That’s interesting, do you know roughly what Racket versions?


lexi.lambda
2018-9-19 15:31:34

I don’t remember exactly, I’m afraid.


lexi.lambda
2018-9-19 15:31:51

It was a while ago, though, somewhere in the single-digit 6.x line IIRC.


greg
2018-9-19 15:38:57

That’s helpful, thanks.


mflatt
2018-9-19 15:45:59

dynamic-place currently really does require a module-path? or a path?; no doubt it can be updated to take a module path index, but maybe using collapse-module-path-index is the right thing for now


pocmatos
2018-9-19 19:51:38

thanks, I clearly did not know about collapse-module-path-index. Still, it doesn’t sound like a bad idea for dynamic-place to do this - it would be interesting to get dynamic-place and dynamic-require to accept the same type of arguments.


lexi.lambda
2018-9-19 21:12:21

@robby What could possibly cause DrRacket to produce “instantiate-linklet: mismatch; reference to a variable that has the wrong procedure or structure-type shape; possibly, bytecode file needs re-compile because dependencies changed” when “Populated ‘compiled’ directories” is unchecked and running the test from the command-line doesn’t produce the same error? Simply closing and reopening the file in DrRacket seems to make the error go away.


robby
2018-9-19 21:15:12

Dunno


robby
2018-9-19 21:15:17

A bug?


lexi.lambda
2018-9-19 21:16:18

Okay. :)


philip.mcgrath
2018-9-19 22:17:01

I have somehow gotten DrRacket into a state where every time I do c. 20 seconds worth of editing, it pops up an internal error dialog about attempting to re-declare racket/private/stx (full message below). I certainly have no idea if I can reproduce this—I’m about to try restarting DrRacket and hope it goes away—but I thought I’d post just in case this is enough to make the problem obvious to someone. module: cannot redeclare cross-phase persistent module module name: #<resolved-module-path:"/Applications/Racket v7.0/collects/racket/private/stx.rkt"> context...: declare-module!58 declare-this-module standard-module-name-resolver namespace-module-instantiate!96 for-loop [repeats 1 more time] run-module-instance!125 for-loop [repeats 1 more time] run-module-instance!125 for-loop [repeats 1 more time] run-module-instance!125 for-loop [repeats 1 more time] run-module-instance!125 ...