laurent.orseau
2021-9-28 08:20:26

Woohoo! Awesome!


j.wenjiao
2021-9-28 15:00:48

Where can I find an example “use find-files function” ?


greg
2021-9-28 15:41:44

You might prefer in-directory; also it has a couple simple examples.



spdegabrielle
2021-9-28 15:43:14

greg
2021-9-28 15:44:35

Note that in-directory returns a sequence, which is flexible. The examples use for/list to return a list. You could also use for to do something imperative to each file and not bother returning a list.


greg
2021-9-28 15:45:49

Like its docs mention, if you don’t need to deal with nested directories, only the contents of one, you can simply use directory-list to get a list, and use that list with for/list or map, or for or foreach, or whatever you need.


gmauer
2021-9-28 17:10:41

cool, but also…parinfer obviates the need for a lot of this and is a joy to use


mflatt
2021-9-28 17:28:22

It took me a while to get a chance to page this back in… Yes, that seems right. The file .LOCKpkgs.rktd would normally be created as packages are installed during a build, and that file should be kept. Even a minimal Racket build should at least include base and racket-lib packages. If a build process somehow doesn’t generate .LOCKpkgs.rktd, that could be something to be fixed. Or is that packaging system don’t keep . files by default?


sorawee
2021-9-28 18:07:02

Thanks! Let me know if you have any feedback


greg
2021-9-28 18:42:27

Do you use the deprecated/archived https://github.com/DogLooksGood/parinfer-mode?


greg
2021-9-28 18:42:33

gmauer
2021-9-28 18:45:09

the latter. I used to use parinfer-mode but it just stopped working at one point which was very frustrating for about a week


gmauer
2021-9-28 18:45:32

honestly, I would say parinfer is like 40% of why I enjoy working with lisps


quangluongtm
2021-9-28 18:52:45

I am a racket noob. parinfer rust makes my life a lot easier. Your Racket + XP mode is also great!


greg
2021-9-28 19:06:26

I keep meaning to try parinfer someday. Thx for the tip which one is best.


greg
2021-9-28 19:07:10

It took me multiple attempts at maybe six month intervals before eventually paredit “clicked” for me and I haven’t looked back since.


greg
2021-9-28 19:07:56

But initially for me it was a case of that technomancy tweet, ~= “If paredit isn’t for you, then you need to become the kind of person paredit is for”. :slightly_smiling_face:


greg
2021-9-28 19:08:59

Which sounds elitist but in my case it was just older brain slower to rewire, I think. ¯_(ツ)_/¯


quangluongtm
2021-9-28 19:12:02

Call me python developer but I cannot keep track of multiple keybindings in different languages:sweat_smile: …or count (((()))))


samth
2021-9-28 20:41:46

@sorawee raco fmt is so cool! Two requests: 1. Add a newline at the end of the file. 2. Have an in-place mode that rewrites the file.


sorawee
2021-9-28 20:42:08

Just added both!


sorawee
2021-9-28 20:42:19

~Have not documented yet though~ just documented it


sorawee
2021-9-28 20:42:42

raco fmt --out -self <file.rkt> will rewrite the file


soegaard2
2021-9-28 20:50:41

Is there a predicate builtin that returns for true numbers except for the special ones like +inf.0, +nan.0 ?


sorawee
2021-9-28 20:51:47

I think rational?


gmauer
2021-9-28 21:04:07

thats precisely why parinfer is delightful. You indent to what you want like you would with python and then it just figures out the parens. It’s ergonomic with zero ambiguity and guides you toward (but doesn’t force) a consistent style


sorawee
2021-9-28 21:10:11

soegaard2
2021-9-28 21:11:59

If only, there were an exact-rational? then I could prove the opposite.


cperivol
2021-9-28 21:40:18

Sounds excellent! Where could one take a look?


sorawee
2021-9-28 21:55:33

sorawee
2021-9-28 21:55:48

It will take a while until the package build server updates the documentation though


cperivol
2021-9-29 00:14:05

Nice! @greg we should get this into racket-mode!


j.wenjiao
2021-9-29 00:33:44

What I want is to find a specified file in the directory and match it by file name


capfredf
2021-9-29 02:09:03

I don’t think there is a function in the standard library for this.


capfredf
2021-9-29 02:10:48

Like Greg said, you can do what you want by simply combining directory-list with any for constructs


capfredf
2021-9-29 02:13:33

Thanks. I will take a look at how opensuse builds the Racket package


capfredf
2021-9-29 03:25:14

Okay, they just delete the file during building the package.


joel
2021-9-29 03:26:59

Is there a way to combine two struct-guard/c contracts into one contract? (define base-guard (struct-guard/c string? number?)) (struct base (name num) #:guard base-guard) (struct descendant base (surname) #:guard (COMBINE? base-guard (struct-guard/c string?)))


joel
2021-9-29 03:32:22

It seems silly to have to copy out the entire list of contracts in the guard for the subtype


joel
2021-9-29 03:43:46

I guess I could do it with a macro (define-syntax (base-guard stx) (syntax-case stx () [(_ add-contracts ...) #'(struct-guard/c string? number? add-contracts ...)])) (struct base (name num) #:guard (base-guard)) (struct descendant base (surname) #:guard (base-guard string?))


mikiawm
2021-9-29 04:29:12

@mikiawm has joined the channel