sturgman
2018-1-19 12:53:59

@sturgman has joined the channel


leif
2018-1-19 14:26:18

@ben Wasn’t that what Milo D. was trying to do for a while? Do you know if he ever succeeded?


ben
2018-1-19 15:13:46

This question is easier. I’m ~at phase 1 and~ in typed code. (edit: milo was at phase 1 too, but working with fully expanded untyped code)


leif
2018-1-19 20:23:41

OH, oka.


leif
2018-1-19 20:23:43

okay*


leif
2018-1-19 20:24:47

Well in that case @lexi.lambda’s unsafe-reprovide’s implementation might actually tell you what you need.


lexi.lambda
2018-1-19 20:31:34

Hmm? I don’t have an unsafe-reprovide implementation…


abmclin
2018-1-19 20:55:23

how do I make subcollections? I have a main collection, and would like to group several collections under that main collection. I’m not seeing how to do that in the documentation or the user mailing list.


ben
2018-1-19 20:57:18

@abmclin I think you just need to make a directory


ben
2018-1-19 20:57:53

if you have a package that defines the foo collection, you can define the foo/bar collection and foo/bar/baz collections by putting directories inside foo/


abmclin
2018-1-19 20:59:07

I thought so too but am getting module not found errors, for example (require main/sub) is giving me main/sub.rkt not found. The main.rkt in the sub directory isn’t being found


abmclin
2018-1-19 20:59:17

maybe I screwed up something, I’ll try redoing it from scratch


ben
2018-1-19 20:59:27

no you’re okay


ben
2018-1-19 20:59:34

there’s something confusing here


abmclin
2018-1-19 20:59:42

yeah definitely


ben
2018-1-19 20:59:46

(require main) will go to main/main.rkt


ben
2018-1-19 20:59:56

(require main/sub) will go to main/sub.rkt


abmclin
2018-1-19 21:00:04

I was thinking collections and subcollections correspond to a directory structure but maybe I’m mistaken?


ben
2018-1-19 21:00:07

(require main/sub/a) will go to main/sub/a.rkt


abmclin
2018-1-19 21:00:09

ok


abmclin
2018-1-19 21:00:11

hmm


ben
2018-1-19 21:00:30

so there’s a special case for just a collection name (goes to main.rkt)


ben
2018-1-19 21:00:37

and the others are filepaths without .rkt


abmclin
2018-1-19 21:00:45

ok I think I see now


scott.watson
2018-1-19 21:01:08

@scott.watson has joined the channel



abmclin
2018-1-19 21:01:17

will experiment by using your examples


ben
2018-1-19 21:01:47

abmclin
2018-1-19 21:02:20

@lexi.lambda I did read that documentation but I was confused because I thought (require main/sub) would map to main.rkt in the directory main/sub


lexi.lambda
2018-1-19 21:03:12

> If a single rel-string is provided, and if it consists of multiple /-separated elements, then each element up to the last names a collection, subcollection, etc., and the last element names a file. If the last element has no file suffix, ".rkt" is added, while a ".ss" suffix is converted to ".rkt".


lexi.lambda
2018-1-19 21:03:18

(emphasis mine)


abmclin
2018-1-19 21:03:55

indeed, that is clear to me now


scott.watson
2018-1-19 21:05:22

Hi folks! I sent this to the mailing list too… but you know, people slack nowadays. Please excuse the big copy paste…


scott.watson
2018-1-19 21:05:26

’’’ Here’s what I see… any ideas?

I’ve been running it under dtruss/dtrace to try and spot what is different, but so far no luck.

If run the IDE it also works!

bash–3.2$ racket Welcome to Racket v6.11. standard-module-name-resolver: collection not found for module path: (submod (lib “racket/init”) configure-runtime) collection: “racket” in collection directories: /usr/local/collects /usr/local/Cellar/minimal-racket/6.11/share/racket/pkgs/racket-lib context…: show-collection-err standard-module-name-resolver standard-module-name-resolver: collection not found for module path: racket/interactive collection: “racket” in collection directories: /usr/local/collects /usr/local/Cellar/minimal-racket/6.11/share/racket/pkgs/racket-lib context…: show-collection-err standard-module-name-resolver standard-module-name-resolver: collection not found for module path: racket/base collection: “racket” in collection directories: /usr/local/collects /usr/local/Cellar/minimal-racket/6.11/share/racket/pkgs/racket-lib context…: show-collection-err standard-module-name-resolver

bash–3.2$ sudo racket Password: Welcome to Racket v6.11. > “totally works” “totally works” >


ben
2018-1-19 21:05:55

haha, I saw you joined slack & was about to reply to your mail


scott.watson
2018-1-19 21:06:10

I’ve checked permissions (as best I can tell) and no luck!


ben
2018-1-19 21:06:16

:(


ben
2018-1-19 21:06:33

yeah I’m not sure what’s wrong, but can you install from <http://download.racket-lang.org\|download.racket-lang.org> instead of brew?


scott.watson
2018-1-19 21:07:18

That was how I started… which worked for the IDE, but not the command line. I can certainly try again.


ben
2018-1-19 21:07:57

oh


ben
2018-1-19 21:08:12

you mean you used the installer and typing racket on the command line didn’t do anything?


scott.watson
2018-1-19 21:08:13

Also - I think the cask install uses the .dmg version available there.


scott.watson
2018-1-19 21:08:37

It just gave me the error messages above.


scott.watson
2018-1-19 21:09:11

Again - it works when I sudo racket, which makes it sound like a permission issue.


scott.watson
2018-1-19 21:10:36

(re, re installing….)


scott.watson
2018-1-19 21:15:02

The .dmg puts it in Applications, so running from there generates:


scott.watson
2018-1-19 21:15:38

/Applications/Racket v6.11/bin/racket Welcome to Racket v6.11. default-load-handler: cannot open module file module path: (lib “racket/init”) path: /Applications/Racket v6.11/share/pkgs/racket-x86_64-macosx–2/racket/init.rkt system error: No such file or directory; errno=2 context…: standard-module-name-resolver default-load-handler: cannot open module file module path: racket/interactive path: /Applications/Racket v6.11/share/pkgs/racket-x86_64-macosx–2/racket/interactive.rkt system error: No such file or directory; errno=2 context…: standard-module-name-resolver default-load-handler: cannot open module file module path: racket/base path: /Applications/Racket v6.11/share/pkgs/racket-x86_64-macosx–2/racket/base.rkt system error: No such file or directory; errno=2 context…: standard-module-name-resolver bash–3.2$


scott.watson
2018-1-19 21:18:43

Which is true, since only info.rkt is in that file. However, if I launch the IDE from the finder, it works. :_(


ben
2018-1-19 21:19:34

you got this from brew cask?


scott.watson
2018-1-19 21:19:43

And when running as root,


scott.watson
2018-1-19 21:19:45

bash–3.2$ sudo /Applications/Racket v6.11/bin/racket Password: Welcome to Racket v6.11. >


scott.watson
2018-1-19 21:20:14

I downloaded it directly. Just turns out that the cask install also uses the .dmg


scott.watson
2018-1-19 21:21:29

I’ve be looking at dtruss outputs and there is a difference in search directories before it fails… but it doesn’t make any sense to me.


ben
2018-1-19 21:23:16

it sounds like Racket is trying to resolve (lib "racket/init") into a filesystem path & failing


ben
2018-1-19 21:23:38

I think racket/init should be at /Applications/Racket v6.11/racket/collects/racket/init.rkt


ben
2018-1-19 21:23:49

but that’s all I know, sorry


scott.watson
2018-1-19 21:25:27

Well… at least its not something completely obvious :slightly_smiling_face:


leif
2018-1-19 21:27:31

oey, this is weird.


leif
2018-1-19 21:27:45

I need to figure out a way to test this.


scott.watson
2018-1-19 21:29:27

FYI


scott.watson
2018-1-19 21:29:28

ProductName: Mac OS X ProductVersion: 10.12.4 BuildVersion: 16E195


leif
2018-1-19 21:30:09

Okay


leif
2018-1-19 21:30:21

Are you also using Racket from brew or brew cask?


leif
2018-1-19 21:30:29

(iirc one is minimal and the other is not)


scott.watson
2018-1-19 21:31:24

I just installed via the .dmg, and dragging into Applications, and then running the “configure command line tools” under help


scott.watson
2018-1-19 21:32:10

I’ve also tried both the minimal and brew cask versions with same results


scott.watson
2018-1-19 21:34:30

In looking @ the dtruss output, the first difference is an “Err#60” after setting up some ‘ioctls’ on stdout and stderr. I don’t see then when running as root.


scott.watson
2018-1-19 21:34:37

’’‘ioctl(0x1, 0x4004667A, 0x7FFF56C425AC) = 0 0 ioctl(0x2, 0x4004667A, 0x7FFF56C425AC) = 0 0 mmap(0x0, 0x10000, 0x7, 0x1002, 0xFFFFFFFF, 0x0) = 0x10A2C4000 0 __semwait_signal(0xB03, 0x0, 0x1) = –1 Err#60’’’


scott.watson
2018-1-19 21:37:34

but permissions look OK


scott.watson
2018-1-19 21:37:42

ls -lat /dev/fd/{0,1,2} crw--w---- 1 scott tty 16, 0 Jan 19 13:36 /dev/fd/0 crw--w---- 1 scott tty 16, 0 Jan 19 13:36 /dev/fd/1 crw--w---- 1 scott tty 16, 0 Jan 19 13:36 /dev/fd/2


leif
2018-1-19 21:38:52

Hmm…I’m having some trouble replicating it. Any luck @ben


leif
2018-1-19 21:38:56

?*


ben
2018-1-19 21:40:50

nope, I can brew cask install racket; /Applications/Racket\ v6.11/bin/racket no problem


leif
2018-1-19 21:41:28

I am running 10.11, so that may have something to do with it.


leif
2018-1-19 21:41:32

(OS X 10.11)


leif
2018-1-19 21:41:53

what are you on?


ben
2018-1-19 21:42:04

me too, 10.11.1


leif
2018-1-19 21:45:43

Interesting.


leif
2018-1-19 21:45:50

I wonder if its a 10.12 issue then.


scott.watson
2018-1-19 21:45:54

My buddies have had no problems, I’ll find out what version they’re running.


leif
2018-1-19 21:50:07

Okay cool


leif
2018-1-19 21:50:31

Also wow…apparently everyone else in the lab (at least as of this evening) is on os x 10.11 or 10.10…


leif
2018-1-19 21:50:44

(I think the ones that are on newer systems are out at the moment…)


scott.watson
2018-1-19 21:52:42

Can’t remember what induced me to upgrade… I’m usually a laggard!


ben
2018-1-19 22:01:23

would you want to try building from source + built packages? Instructions:



ben
2018-1-19 22:01:40

unzip, cd to racket/src


ben
2018-1-19 22:01:48

mkdir build; cd build


ben
2018-1-19 22:01:56

../configure &amp;&amp; make &amp;&amp; make install


ben
2018-1-19 22:02:37

and that should make a bin folder at the top of the unzipped folder


scott.watson
2018-1-19 22:03:35

At this point, sure! :slightly_smiling_face:


scott.watson
2018-1-19 22:04:04

Will lyk


scott.watson
2018-1-19 22:11:08

My friend is on 12.3 and is OK. Also - build error:


scott.watson
2018-1-19 22:11:12

/Applications/Xcode.app/Contents/Developer/usr/bin/make xsrc/precomp.h env XFORM_PRECOMP=yes ../racketcgc -cqu ../../../racket/gc2/xform.rkt --setup . --depends --cpp "gcc -E -I./.. -I../../../racket/gc2/../include -I../../../racket/gc2/../../rktio -I../../rktio -g -O2 -DOS_X -D_DARWIN_UNLIMITED_SELECT -fno-common -DUSE_SENORA_GC -Wno-nullability-completeness " --keep-lines -o xsrc/precomp.h ../../../racket/gc2/precomp.c default-load-handler: cannot open module file module path: racket/base path: /Users/scott/Downloads/racket-6.11/share/pkgs/draw-lib/racket/base.rkt system error: No such file or directory; errno=2 context...: standard-module-name-resolver /Users/scott/Downloads/racket-6.11/src/racket/gc2/xform.rkt:97:24 retry /Users/scott/Downloads/racket-6.11/src/racket/gc2/xform.rkt: [running body] make[4]: *** [xsrc/precomp.h] Error 1 make[3]: *** [all] Error 2 make[2]: *** [3m] Error 2 make[1]: *** [3m] Error 2 make: *** [all] Error 2


ben
2018-1-19 22:17:52

:( thank you for trying


scott.watson
2018-1-19 22:22:04

Well - now I’m wondering what’s up! The file ‘path: /Users/scott/Downloads/racket–6.11/share/pkgs/draw-lib/racket/base.rkt’ is NOT in the /share/…/draw-lib/racket directory


mflatt
2018-1-19 22:30:46

@scott.watson Do you have any environment variables set, especially ones that include “PLT” in the name?


mflatt
2018-1-19 22:30:55

Maybe PLTCOLLECTS?


scott.watson
2018-1-19 22:31:23

maybe… :confused:


scott.watson
2018-1-19 22:31:38

that would explain a thing or two..


scott.watson
2018-1-19 22:33:40

And we’re building again… :slightly_smiling_face:


mflatt
2018-1-19 22:34:56

If you had environment variables set, you may not need to build after all. That would affect all of your attempts to run Racket.


scott.watson
2018-1-19 22:36:16

Yep - I thought sudo left your local env alone and just elevated your permissions, but it resets the env! Honestly - it’s the first thing that should have occured to me.


scott.watson
2018-1-19 22:37:30

And ALL is well. THANKS EVERYONE!


mflatt
2018-1-19 22:37:34

I didn’t know that either, but it does make sense in retrospect


scott.watson
2018-1-19 22:38:17

btw… it was from years ago. Fun to have a reason to be back in the world of modern schemes!


dedbox
2018-1-19 23:44:53

Running raco setup -D &lt;collection&gt; compiles modules but not docs. Is there a way to invert this, to only compile docs?


ben
2018-1-19 23:46:11

I don’t think so. (It would be impossible to build some docs if some compiled files were out of date.)


dedbox
2018-1-19 23:47:57

Then is it possible to make raco compile only when needed, like make?


dedbox
2018-1-19 23:48:42

Or am I missing some bigger picture? I develop in Emacs, FWIW.


ben
2018-1-19 23:49:41

if you run raco make file.rkt on the same file twice, racket won’t re-compile it


ben
2018-1-19 23:50:20

and raco setup collection-name should run a little faster if only documentation changed since the last setup


ben
2018-1-19 23:50:25

does that help?


dedbox
2018-1-19 23:50:38

Sure, thansk @ben.


dedbox
2018-1-19 23:51:45

I was hoping for an easy raco setup switch because recompiling takes “forever.”


dedbox
2018-1-19 23:53:03

Like 10 seconds sometimes


lexi.lambda
2018-1-19 23:53:59

raco setup, by default, inspects everything to see if it needs to be rebuilt, but it will still only actually rebuild things that changed. You can restrict the things it checks by passing a package with --pkgs or a collection with -l.


dedbox
2018-1-20 00:00:35

On my computer, it takes ~4.5 secs to run raco setup &lt;collection&gt; with no changes. Most of that time is on raco setup: --- building documentation ---.


dedbox
2018-1-20 00:04:19

@lexi.lambda the switches have no effect on run time. Compiling after a small change to docs pushes the dining time to 11 seconds, where raco setup explains which scribble files are being compiled and rendered.


dedbox
2018-1-20 00:04:41

Haha dining time. Autocorrect must be hungry.


dedbox
2018-1-20 00:05:56

I guess 4 is better than 11, but both are higher than expected.


notjack
2018-1-20 01:01:58

does raco setup determine what changed based on timestamps of all files in collection directories?


notjack
2018-1-20 01:04:48

hmm, this section of docs suggests it just does whatever raco make does: > Running raco setup is sensitive to the PLT_COMPILED_FILE_CHECK environment variable in the same way as raco make. https://docs.racket-lang.org/raco/running.html


notjack
2018-1-20 01:06:30

and then in raco make it says it has to SHA1 hash every module to check for changes: > The raco make command accept filenames for Racket modules to be compiled to bytecode format. Modules are re-compiled only if the source Racket file is newer than the bytecode file and has a different SHA–1 hash, or if any imported module is recompiled or has a different SHA–1 hash for its compiled form plus dependencies.


mflatt
2018-1-20 01:12:39

Yes, raco setup / raco make checks the timestamp; it the timestamp is newer, then it double-checks the SHA–1. (It won’t try a SHA–1 check if the timestamps are older.) It doesn’t have to check modules recursively, though, so there are plenty of dependencies of just racket/base to check.


dedbox
2018-1-20 01:13:05

According to raco setup -v &lt;collection&gt;, ~50% of the time is while using: &lt;pkgs&gt;/[...].scrbl


dedbox
2018-1-20 01:14:00

And by raco setup -D &lt;collection&gt;, the other ~50% is deciding not to compile everything before docs.


notjack
2018-1-20 01:20:13

I think the primary way to speed it up would be architectural changes - raco make could rely on a daemon that listened for filesystem events for instance. Then the daemon could reliably tell raco make to skip entire directory trees.


notjack
2018-1-20 01:22:09

since AFAIK, it’s not common for an OS to provide an API to get the timestamp of when any file in a directory tree changed (at least, not that’s faster than just checking the timestamps of every file in the tree)


dedbox
2018-1-20 01:26:20

This would speed up my Linux workflow. Not sure how portable change notification is these days.


notjack
2018-1-20 01:28:10

No idea. Still need the daemon though, otherwise two distinct raco make calls have no way of sharing event listening state.


samth
2018-1-20 01:37:57

@notjack I think there are other ways it could be optimized, for example racket looks at a lot of paths to find the right one, and avoiding some IO calls would help, I think


notjack
2018-1-20 01:42:27

@samth by “primary way” I mean that I think that approach is the only way to get an algorithmic speedup, such that the absolute minimum amount of IO syscall work running plain raco setup has to do is reduced from O(module-files) to O(root-collection-directories) + O(changed-module-files) - I’m sure there’s room for other constant-factor improvements


samth
2018-1-20 01:43:38

another way to get algorithmic speedup is to do finer-grained dependency tracking, so that you can avoid looking at some files that are currently examined


notjack
2018-1-20 01:45:33

I don’t know how that would work across two distinct raco setup calls - how could the second call know that all files in a collection tree can be skipped without checking the timestamps of each one and comparing to timestamps recorded in the first call? since nobody’s listening for changes in between the two calls, the first call can’t reliably record any information about whole directory tree change timestamps


samth
2018-1-20 01:46:41

i just mean that it could reduce the # of module-files in your equation


notjack
2018-1-20 01:48:23

hmm, I don’t think I understand what you have in mind