
Woohoo! Awesome!

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

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


Just saw this https://github.com/countvajhula/symex.el\|https://github.com/countvajhula/symex.el - appears to support Racket Mode!

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.

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.

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

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?

Thanks! Let me know if you have any feedback

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

Or the https://github.com/justinbarclay/parinfer-rust-mode which uses Rust via FFI?

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

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

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

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

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

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:

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

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

@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.

Just added both!

~Have not documented yet though~ just documented it

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

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

I think rational?

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


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

Sounds excellent! Where could one take a look?


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

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

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

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

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

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

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

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?)))

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

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 has joined the channel