laurent.orseau
2021-11-28 16:07:49

> ((string-len/c 4) "abcd") #f > ((string-len/c 4) "abc") #t Uh?

(string-len/c len) → flat-contract? len : real? Returns a flat contract that recognizes strings that have fewer than len characters. But… why not equal?


soegaard2
2021-11-28 16:08:30

The length is not a valid index.


soegaard2
2021-11-28 16:09:47

Wait. Is string-len/c for the string or the index?


laurent.orseau
2021-11-28 16:11:49

As the docs say, it’s to recognize strings of at most len characters


laurent.orseau
2021-11-28 16:11:59

So it’s not about an index, but a length


soegaard2
2021-11-28 16:12:09

Okay, that’s mysterious.


soegaard2
2021-11-28 16:33:52

Maybe that’s why it is called string-len/ c and not string-length/c


laurent.orseau
2021-11-28 18:43:09

possibly, though that’s a strange behaviour. Also there’s no string-length/c


sorawee
2021-11-28 19:04:04

Here’s when it was originally added



sorawee
2021-11-28 19:04:16

It used to be named string/len


d_run
2021-11-29 01:49:16

:wave: Having an issue with raco setup and some deps, which is causing my CI runs in Github to fail :thread:


d_run
2021-11-29 01:49:50

when I run raco setup --tidy --avoid-main --check-pkg-deps --unused-pkg-deps --pkgs paperplane

I get errors like these:

raco setup: found undeclared dependency: raco setup: mode: run raco setup: for package: "paperplane" raco setup: on package: "gregor-lib" raco setup: dependent source: /Users/yuzu/github/paperplane/private/compiled/logger_rkt.zo raco setup: used module: (lib "gregor/main.rkt") raco setup: found undeclared dependency: raco setup: mode: run raco setup: for package: "paperplane" raco setup: on package: "rackunit-lib" raco setup: dependent source: /Users/yuzu/github/paperplane/private/compiled/readmes_rkt.zo raco setup: used module: (lib "rackunit/main.rkt")


d_run
2021-11-29 01:51:19

Code compiles and runs fine, unsure what I need to add to info.rkt or elsewhere to alleviate


d_run
2021-11-29 01:51:38

this is on Racket 8.3 CS on macOS M1 silicon


sorawee
2021-11-29 01:52:38

do you have gregor-lib in deps?


sorawee
2021-11-29 01:53:07

and also rackunit-lib


d_run
2021-11-29 01:54:49

yeah added them and that seems to have fixed. When did things switch to using rackunit-lib over rackunit ?


d_run
2021-11-29 01:55:11

(also not idea what compatability-lib is but I neede that too)


sorawee
2021-11-29 01:55:36

rackunit requires rackunit-lib


sorawee
2021-11-29 01:55:55

So if you type rackunit, that would have worked too


sorawee
2021-11-29 01:56:53

It’s just that rackunit also has other deps, like documentation, etc.


sorawee
2021-11-29 01:57:38

So some people want to avoid it, and use the actual core package (rackunit-lib) directly, to avoid bringing in more deps


d_run
2021-11-29 01:59:36

allrighty


d_run
2021-11-29 01:59:43

thanks for the help!


samth
2021-11-29 02:02:19

Note that the --fix-pkg-deps option will just fix it for you


cristhianmareccos2222
2021-11-29 03:57:54

@cristhianmareccos2222 has joined the channel


sorawee
2021-11-29 04:07:46

Didn’t you ask the same question in Discord? I think @soegaard2 replied to you. Did you follow his advice?


cristhianmareccos2222
2021-11-29 04:12:17

Yes but i dont understand the point 1 and 3 of his post i made function for get the list but dont know how to return for example from verb to object and the function goes into all the list no only thats 1 i want