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
Thanks! This is very helpful.
~? and ~@ are AWESOME! (also a little magical to me for now)
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.
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.
I think it’s one of the options of raco pkg update but I’m not sure which one anymore
Thanks, checking
Looks like --lookup
Mmkay, I just tried a few cases and ended up confusing myself.
Is there a working example of installing local multi-collection packages I can review?
@deactivateduser60718 Consider starting the web-server from a separate file: https://github.com/soegaard/web-tutorial/blob/master/listit4/server.rkt
@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.
I got confused while trying several iterations of raco pkg install --link and raco pkg update --lookup .
Is there something in that linked module that helps me do that? It looks like it assumes I already got past that step.
No. It is an alternative.
@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
@capfredf Alex and I are trying to follow your pkg-build instructions ….
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
pkgs-all seems generated, and probably not what we want to edit
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?
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?
(btw how did you edit the pkgs files? the graphical text editor on the VM we made crashes thanks to the long lines)
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.
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.
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”)
In short, I changed source part and the default in versions. The checksum is the commit hash
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
Went with: (define (lex in)
(define x (lex/src in))
(unless (eof-object? x) (position-token-token x))
)