ryanc
2019-12-11 10:42:28

Here’s a function that takes a list of vectors and makes a sequence where each step produces the values of one of the vectors: https://github.com/racket/db/blob/master/db-lib/db/private/generic/functions2.rkt#L89


sorawee
2019-12-11 10:48:43

Thanks! This is very helpful.


laurent.orseau
2019-12-11 14:50:52

~? and ~@ are AWESOME! (also a little magical to me for now)


deactivateduser60718
2019-12-11 16:58:12

I want to install an isolated clone of web-server for local development. I cannot use raco pkg install --link without creating a conflicting launcher.


deactivateduser60718
2019-12-11 17:00:40

If I use a different launcher name, I still get many errors where modules cannot be found. This is assuming I run install from the repository directory.


laurent.orseau
2019-12-11 17:03:15

I think it’s one of the options of raco pkg update but I’m not sure which one anymore


deactivateduser60718
2019-12-11 17:03:36

Thanks, checking


deactivateduser60718
2019-12-11 17:13:08

Looks like --lookup


deactivateduser60718
2019-12-11 17:15:06

Mmkay, I just tried a few cases and ended up confusing myself.


deactivateduser60718
2019-12-11 17:15:28

Is there a working example of installing local multi-collection packages I can review?


soegaard2
2019-12-11 17:22:50

@deactivateduser60718 Consider starting the web-server from a separate file: https://github.com/soegaard/web-tutorial/blob/master/listit4/server.rkt


deactivateduser60718
2019-12-11 17:27:44

@soegaard2 I could, but I intend for a (require web-server/*) resolve to a custom local web-server collection. I’m trying to figure out how to make that work now.


deactivateduser60718
2019-12-11 17:29:05

I got confused while trying several iterations of raco pkg install --link and raco pkg update --lookup .


deactivateduser60718
2019-12-11 17:31:03

Is there something in that linked module that helps me do that? It looks like it assumes I already got past that step.


soegaard2
2019-12-11 18:13:09

No. It is an alternative.


mflatt
2019-12-11 19:10:00

@deactivateduser60718 If I understand what you mean, the intended process is raco pkg update --clone as described here: https://docs.racket-lang.org/racket-build-guide/contribute.html#%28part._pkg-contribute%29


ben
2019-12-11 21:09:19

@capfredf Alex and I are trying to follow your pkg-build instructions ….


ben
2019-12-11 21:10:07

we’re stuck on step 2

we see a pkgs file, and a pkgs-all file, and a pkg/ directory, and we’re not sure what to edit and how


ben
2019-12-11 21:10:39

pkgs-all seems generated, and probably not what we want to edit


alexknauth
2019-12-11 21:11:26

The pkgs file seems to be just the names, no pkg sources to edit. The pkg directory has files that contain package sources, but also other things such as the checksums and dependencies… would we have to edit those too?


ben
2019-12-11 21:11:47

should we edit pkg/typed-racket-more (and others) so the source field points to our github URL and leave the rest of the file the same?


ben
2019-12-11 21:29:31

(btw how did you edit the pkgs files? the graphical text editor on the VM we made crashes thanks to the long lines)


capfredf
2019-12-12 01:43:40

I think the pkgs file is irrelevant, but you got to delete the pkgs-all file, because raco would first use the information from the pkgs-all file. If the file doesn’t exist, it will use the package information from files in pkg/ directory.

At first, I changed the pkg sources in pkg/{typed-racket, typed-racket-more, source-syntax, typed-racket-lib, typed-racket-doc}/} , but it didn’t work. so I looked into the code and found out the reason above. I didn’t want to do the the same changes to the pkgs-all file, so I simply deleted it. So I haven’t tried using pkgs-all to do the job, but it should work.


capfredf
2019-12-12 01:47:53

IIRC I didn’t use an editor. I wrote a racket program to update the source information, i.e. read the hash and change some values and write the hash back, but I can’t find the code right now.


capfredf
2019-12-12 01:56:50

As for the changes to the files, here is the modified pkgs/typed-racket I used back then: https://gist.github.com/capfredf/f6588f8096ffc6cbbc3a8adb80486b9d (search for “capfredf”)


capfredf
2019-12-12 01:58:57

In short, I changed source part and the default in versions. The checksum is the commit hash


capfredf
2019-12-12 02:04:09

you can verify the changes by running raco pkg install typed-racket --catalog your-local-catalog-directory and see if you get the version you are working on


elyandarin
2019-12-12 02:20:29

Went with: (define (lex in) (define x (lex/src in)) (unless (eof-object? x) (position-token-token x)) )