notjack
2021-2-18 10:34:14

when you see “also, no #%app is bound” it’s almost always because you need (require (for-syntax racket/base))


badkins
2021-2-18 15:29:06

Generators allow a more natural coding, but for a chess engine, speed is extremely important, so I guess I’ll stick with let-over-lambda.


kellysmith12.21
2021-2-18 16:35:38

Are any of the ideas from the paper, <https://people.seas.harvard.edu/~chong/pubs/oopsla16-auth-contracts.pdf|Extensible Access Control with Authorization Contracts>, available in a library or as an example implementation, somewhere?


samth
2021-2-18 16:39:39

I would ask @chrdimo


samth
2021-2-18 16:39:53

(who may not be on Slack much, you might email him)


tonyg
2021-2-18 19:39:14

Hi all, just to let you know I updated the package server to have a slightly different flow for password resets and account registrations, for spam prevention reasons. Please email me if you have any trouble.


samth
2021-2-18 19:40:46

@tonyg while I have you here …


spdegabrielle
2021-2-18 20:00:24

Thankyou !


tgbugs
2021-2-18 22:40:15

Hi all. A question about the racket build/install process from the release sources where I am seeing a major performance degradation when trying to install cs and bc/cgc on the same system.


tgbugs
2021-2-18 22:41:03

In the 8.0 linux source release I am running the following. pushd src make cgc make bc make cs make DESTDIR="/path/to/sandbox/image/" install-cs make DESTDIR="/path/to/sandbox/image/" install-both When I then go to run racket it takes nearly 12 real seconds to start (tested using time raco). The equivalent tests with racketbc and racketcgc behave as expected (roughtly .3 seconds). Strangely if I reverse this then racket starts as expected and bc and cgc start slowly.

In all cases raco{cs,bc,cgc} setup has been run and the results of compilation are inside the compiled folder. If I run raco setup as root this fixes the issue as well.

Is there some finalizing step during make install that would somehow cause an implementation to lose track of where its compiled artifacts if another make install was run for a different variant?


mflatt
2021-2-18 23:42:54

What configure flags are you using?

The symptoms sounds like the BC and CS variants are fighting for control of the “compiled” subdirectory for “.zo” files, and the most recent setup would win.


tgbugs
2021-2-18 23:46:26

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --docdir=/usr/share/doc/racket-8.0 --enable-shared --enable-float --enable-libffi --enable-foreign --disable-libs --disable-strip --enable-useprefix --enable-bc --disable-bcdefault --enable-cs --enable-gracket --enable-docs --enable-jit --enable-places --enable-futures --enable-pthread



tgbugs
2021-2-18 23:49:22

I had a similar thought about the potential fighting over .zo files but when I aksed about this a while back @samth said that the compiled artifacts for all 3 implementations should be able to exist together


tgbugs
2021-2-18 23:51:05

hrm, based on what I’m seeing here, running raco setup does seem to replace the bc .zo files, what is strange is that somehow that isn’t leading to the same degredation in performance for bc


tgbugs
2021-2-18 23:51:46

maybe I can invert the order so that cs is installed second and bc will fail-over to the compiled/bc/ folder?


mflatt
2021-2-18 23:54:05

Each racket binary should have its preferred “compiled” directory baked in.

You don’t have a PLT_ZO_PATH enviornment variable set, right?


mflatt
2021-2-18 23:54:57

More direct check: for each variant, what does (use-compiled-file-paths) report?


tgbugs
2021-2-18 23:55:00

I do not (that I know of)


tgbugs
2021-2-18 23:55:42

tom@athena ~ $ racketbc Welcome to Racket v8.0 [bc]. &gt; (use-compiled-file-paths) '(#&lt;path:compiled/bc&gt;) &gt;


tgbugs
2021-2-18 23:55:50

Welcome to Racket v8.0 [cs]. &gt; (use-compiled-file-paths) '(#&lt;path:compiled&gt;) &gt;


tgbugs
2021-2-18 23:56:21

Welcome to Racket v8.0 [cgc]. &gt; (use-compiled-file-paths) '(#&lt;path:compiled/bc&gt;)


tgbugs
2021-2-18 23:56:55

However, I do not know whether that is the case when running when compiling.


mflatt
2021-2-18 23:57:42

Maybe it has to do with installing with DESTDIR. The setup/unixstyle-install step may not handle overlayed installations.


mflatt
2021-2-18 23:58:58

(The overlay support was intended for development in a Git checkout, and not as an install mode, but probably it can be made to work.)


mflatt
2021-2-19 00:00:43

Looking more, I see that DESTDIR install mode always uses bc, so that’s a problem in any case.


tgbugs
2021-2-19 00:01:00

hrm, good to know, the gentoo build system seems to have been making use of it since the 6.x days as far as I can tell since it requires installation into a sandbox prior to merging into the live system


tgbugs
2021-2-19 00:01:44

I’ll see if I can install with different DESTDIR for cs and bc to see if it looks like there is a collision


mflatt
2021-2-19 00:06:27

I was looking at the wrong layer, and now I think DESTDIR is probably ok in just-CS mode. But when both CS and BC are enabled, then it uses BC, and that may go wrong.


mflatt
2021-2-19 00:07:11

That is, you may have to configure with --enable-cs and --enable-bc separately.


tgbugs
2021-2-19 00:11:27

hrm, as in two completely separate builds? or would it be possible to build with both enabled, then reconfigure to install each separately without having to rebuild the whole thing twice?


mflatt
2021-2-19 00:13:47

You could use the same directory, but run configure , make, make install then configure, make. make install.


tgbugs
2021-2-19 00:14:39

if it helps, I’ve seen this behavior when installing with install-bc and install-cgc separately, but it is fixed by running install-both


tgbugs
2021-2-19 00:19:15

hrm, I don’t think the ebuild system is supposed to run two sequential make/installs like that, I’ll keep looking into it


mflatt
2021-2-19 00:23:40

I’m mostly skeptical that it’s a good idea to try to overlay the installations. If I inderstand the context, it seems more right to me that CS and BC would be different packages or treated like different versions of the package.


tgbugs
2021-2-19 00:27:32

The issue with trying to split them out is how to deal with the common portions, the source code, the docs, etc. Having all 3 overlayed seems to work without issue in practice.


tgbugs
2021-2-19 00:28:52

it also keeps the maintenance burden 4x lower as well which is nice (not to mention the total install size)


tgbugs
2021-2-19 01:07:20

it seems that inverting the order to run make install-cs after make install-bc causes the following change Welcome to Racket v8.0 [cs]. &gt; (use-compiled-file-paths) '(#&lt;path:compiled/ta6le&gt;) The issue remains, but now for bc and cgc installs. However it seems that if I were to somehow be able to set things so that cs used compiled/ta6le and bc/cgc used compiled/bc then the issue would be resolved.

Strangely, the installed implementations do actually have this set. (a few minutes later) WAIT. That’s why they aren’t working! There is a misalignment between (use-compiled-file-paths) once installed and during make install-both. Welcome to Racket v8.0 [cgc]. &gt; (use-compiled-file-paths) '(#&lt;path:compiled/bc&gt;) Welcome to Racket v8.0 [bc]. &gt; (use-compiled-file-paths) '(#&lt;path:compiled/bc&gt;) As an aside inverting the order of the install commands also results in the cs build being installed as racketcs with the suffix (neither --enable-csdefault nor --disable-csdefault were set).


tgbugs
2021-2-19 01:09:03

Extracted issue: There is a misalignment between (use-compiled-file-paths) once installed and during make install-both. During make install it seems that it is '(#&lt;path:compiled&gt;) and at runtime it is '(#&lt;path:compiled/bc) .


tgbugs
2021-2-19 01:10:26

somewhat related make install-cs; make install-bc has different behavior than make install-bc; make install-cs


asumu
2021-2-19 01:16:23

Now that .zo files are architecture-dependent, is it still safe to share .dep files between architectures? (say if you are packaging Racket for a distro…)


mflatt
2021-2-19 01:17:02

I see that each install-… step discards the existing “compiled” directories in the destination.


mflatt
2021-2-19 01:17:43

What if you gave the two make install-… different DESTDIR targets, and then merged the two directories (preserving timestamps) afterward?


tgbugs
2021-2-19 01:18:33

I’m betting that would work.


tgbugs
2021-2-19 01:19:30

Now if only I had planned ahead and saved that build state …


tgbugs
2021-2-19 01:19:40

will ping back after I try that


tgbugs
2021-2-19 01:22:00

@asumu yes, but it is for gentoo, so there is no expectation for portability between architectures because if someone is building packages for redistribution between systems they are assumed to be arch dependent


asumu
2021-2-19 01:22:55

Oh I was asking completely unrelated to your thread. I maintain the Racket PPA on Ubuntu


asumu
2021-2-19 01:23:05

But thanks


tgbugs
2021-2-19 01:24:32

oop, np, and greetings fellow maintainer!


mflatt
2021-2-19 01:28:59

It seems to work when I try its, so I think that’s probably the way to go.

I recommend copying the CS installation on top of the BC installation, just in case. That will make “system.rktd” match CS, at least (but both BC and CS know how to adapt to the other implementation’s “system.rktd”).


mflatt
2021-2-19 01:34:43

On “.dep” files: it’s best not to try to share them.

A “.dep” records a hash that is related to the module’s compiled form. So, “.zo” files created for different platforms will has different machine code and different hashes.

… except if all the compilations went though machine-independent form (as in “built” source distributions). Then, the recorded hash is actually for the machine-independent form, so they can match. But you have to be careful to ensure that all compiled forms happen that way (which the distro-build system does).


asumu
2021-2-19 01:38:43

Ah, I see. Thanks, I’ll set them to not shared then.


mflatt
2021-2-19 01:39:02

The “collects” directory is currently filed under “shared” for a Unix-style install, at least by default. Since the “compiled” content is machine-dependent, now, does it really belong in “lib”?

Or, the source belongs in “shared” and the “.zo” belongs in “lib”? That would be possible, but it’s trouble and not well supported by the makefiles…


tgbugs
2021-2-19 01:40:20

Hrm, the gentoo policies say that anything that is architecture dependent should go in lib. For example the emacs el and elc files can go in share but the new eln files need to go in lib.


mflatt
2021-2-19 01:42:04

You can pick the directory by providing --collectsdir= to configure.


mflatt
2021-2-19 01:42:27

But, again, that’s both “.rkt” and “.zo”.


tgbugs
2021-2-19 01:48:19

Yes, unfortunately the issue is that .rkt -> share and .zo -> lib so the split is more between /compiled/ and .rkt (I think). Which would require something like what common lisp implementations do in dissociating their fasl directories from the source directories (or what emacs native-comp does). I’ve never seen a bug report on this for racket specifically, but if someone was mouting /usr/share between different arches, they would definitely hit a bug.


mflatt
2021-2-19 01:51:40

To split “.rkt” and “compiled”, the relevant Racket parameter is current-compiled-file-roots. But it’s currently only configured for startup through an environment variable or command-line flag, not a “config.rktd” entry.


tgbugs
2021-2-19 01:59:15

I don’t think it is pressing, but if at some point the option could make it into config.rktd then that would solve the issue. During build time the environment variable could be used without having to modify the makefiles (I think). Happy to submit an issue on github if it would be helpful.


hyamanak
2021-2-19 02:02:42

@hyamanak has joined the channel


tgbugs
2021-2-19 04:24:15

it seems that you can’t pass --collectsdir= right now because it gets forwarded to src/cs/c/../../rktio/configure which doesn’t know what to do with it and then fails



tgbugs
2021-2-19 04:40:48

seems to fix the issue