this post was submitted on 25 Nov 2023
1 points (100.0% liked)

Lisp

53 readers
3 users here now

founded 1 year ago
MODERATORS
top 3 comments
sorted by: hot top controversial new old
[–] kniebuiging@alien.top 1 points 11 months ago

I won't use it, its indentation is very off.

take here: b is the body of the lambda function, but its indented as if its the body of the `letrec`

    (syntax (letrec ((f (lambda (a ...)
              b
              ...)))

or here


  
(define-syntax aif  
  (lambda (x)  
(syntax-case x ()  
((\_ test then else)  
(with-syntax ((it (datum->syntax x 'it)))  
\#'(let ((it test))  
(if it then else)))))))

[–] jason-reddit-public@alien.top 1 points 1 year ago (1 children)

Quick feedback: you could show before and after for a small snippet in your README, maybe describe the algorithm being used, and mention what options are available to tweak the formatting (line length being the most interesting and overriding how certain "keywords" format probably being the next most useful).

[–] raviqqe@alien.top 1 points 1 year ago

I'm actually just using a formatter library and its readme describes the algorithm although it's a very basic one. https://github.com/raviqqe/mfmt

Currently, Schemat doesn't have any options for configurations. It's made after the philosophy of `gofmt` where you insert newlines with your "sense."