niko
2022-3-12 10:39:03

I’m using redex and I frequently find that I wish I had a “spread” operator — given some list foos = (1 2 3), say, I’d like to be able to do (...foos 4). Instead I have to match (foo ...) against foos and then do (foo ... 4). Is there anything similar to what I want?


ben.knoble
2022-3-12 13:42:34

Maybe either list* or append? I guess the follow-up is: why append to a list so much? Maybe a different data-structure is better suited?


matthewmcgarvey14
2022-3-12 15:45:34

@matthewmcgarvey14 has joined the channel


massung
2022-3-12 17:00:30

Not sure if there’s a workaround for this issue…

When I install a local package that I’m building (e.g. raco pkg install from the directory), it seems to ignore the package name in the info.rkt file and instead uses the directory I’m in as the name of the package. This breaks dependencies elsewhere.


soegaard2
2022-3-12 17:02:37

I have had similar problems in the past.

My problem is that

raco pkg install foo
raco pkg install foo/

are different.

And my “helpful” shell rewrites the last one (which installs from a directory) to the first one.

Normally, I need to double check that the trailing / is present.


massung
2022-3-12 17:04:30

Ah. Didn’t know. Usually I just run it from within the directory and supply no name.


massung
2022-3-12 17:07:02

Didn’t seem to fix my issue.

My directory name is racket-raylib. The package name (in info.rkt) is just raylib.

From outside the project directory:

raco pkg install racket-raylib Installs the package as the name racket-raylib.

Same command with a trailing / does the same.

From within the project directory:

raco pkg install Same result.


soegaard2
2022-3-12 17:08:14

Must be an “info.rkt” issue then.


soegaard2
2022-3-12 17:13:15

Maybe you need to make it a “multi collection” package instead?


soegaard2
2022-3-12 17:14:02

Btw - the example in PR#1 is an one of the official examples of Raylib. It worked like a charm.


massung
2022-3-12 17:20:26

I guess I need to look up “multi collectioN


massung
2022-3-12 17:21:39

I almost have r-cade perfectly ported over to it. Just a couple minor issues dealing with music (it’s a bug in raylib)


sorawee
2022-3-12 18:10:22

Is it possible to specify a package name using info.rkt?


sorawee
2022-3-12 18:12:04

According to https://docs.racket-lang.org/pkg/Package_Concepts.html

> A single-collection package’s directory doubles as a collection directory. By default, the package name also doubles as the collection name, but if the package has an “info.rkt” file that defines collection to a string, then the string is used as the name of the package’s collection. So it looks like defining collection simply sets the collection name, but not the package name.


sorawee
2022-3-12 18:12:33

IIUC, package name is either inferred from the directory name, or from explicit set via --name in raco pkg install


ben.knoble
2022-3-12 19:00:27

yes, this has bit me before as well—when doing raco pkg install in a directory, the package name is always (AFAICT) the directory name. The collection (what you put after (require ) is still determined by info.rkt .


soegaard2
2022-3-12 19:07:08

@notjack Hi. I vaguely remember you asked around for ideas to put into resyntax . Maybe this list from the Python tool Pylance can be used?

https://github.com/microsoft/pylance-release/blob/main/DIAGNOSTIC_SEVERITY_RULES.md#diagnostic-severity-rules