Re: [racket-users] Re: [ANN] fmt: a Racket code formatter

2021-10-19 Thread Hendrik Boom
On Tue, Oct 19, 2021 at 11:07:58AM -0700, Sorawee Porncharoenwase wrote:
> On Tue, Oct 19, 2021 at 7:01 AM Diego Crespo
> mycontributiontothewo...@gmail.com
>  wrote:
> 
> If you are curious about what the output looked like before, here is the
> > pasterack link of some of my code http://pasterack.org/pastes/23639.
> > Racket supports using brackets instead of parenthesis, but you typically
> > only see it used in things like cond and let expressions. This was adding
> > them to far more expressions. Other than looking odd, there was nothing
> > wrong with the code (other than my own errors :))
> >
> FWIW, here’s what the tool would output now (provided that the input code’s
> paren shapes are not yet compromised): http://pasterack.org/pastes/21352
> 
> raco fmt will usually keep paren shape intact, but it can convert paren
> shape in some positions. Right now, the only conversion is from parenthesis
> to bracket, and it’s enabled for:
> 
>- cond, case-lambda, match, case body
>- syntax-case, syntax-rules body
>- syntax-parse (including syntax-parser and define-syntax-parser) body.
>- for bindings (including for/... and for*/...)
>- let bindings (including letrec, let-syntax, let-values, …)
>- parameterize, with-syntax, shared bindings
>- and a few more
> 
> What happened earlier was that class was erroneously configured to have
> this paren shape conversion, even though it should not.

I find the layout of the second version more readable,
but find the choice of parenthesis shape in the first version more readable.

-- hendrik

> 
> On Tuesday, October 19, 2021 at 9:34:04 AM UTC-4 hen...@topoi.pooq.com
> > wrote:
> >
> >> and was disappointed.
> >>
> > I would not recommend this, but if you strongly feel that the class body
> should use brackets, you are free to write your own formatting rules.
> (Though I have not documented how to do so.)
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CADcuegs%2BepCLAXHzjXxPdq%3DR6su0heHOJRBYgWL7_tLj5J%3Db2A%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20211020014753.yl36iozz5wzpcyzb%40topoi.pooq.com.


[racket-users] raco docs only sometimes installed?

2021-10-19 Thread Brian Beckman
I am having problems installing raco docs, meaning I want 

raco docs foo-pkg

to work no matter how I installed the package. To give you an example of a 
failure, I created a racket package and put it up on the raco pkg server:

https://pkgd.racket-lang.org/pkgn/package/bleir-sandbox

which refers to a github repo

https://github.com/rebcabin/bleir-sandbox

I then created two, fresh, Ubuntu 18.04 virtual machines via Virtual Box. 
On both machines, I installed racket 8.2 as follows:

sudo apt install racket
sudo add-apt-repository ppa:plt/racket
sudo apt update
sudo apt upgrade

On machine 1, I did

raco pkg install bleir-sandbox
raco test .local/share/racket/8.2/pkgs/bleir-sanbox  # all copacetic
raco docs bleir-sandbox

WORKS! Scribble docs show up in Firefox

On machine 2, I did

git clone https://github.com/rebcabin/bleir-sandbox.git
cd bleir-sandbox
git checkout master
cd ..
raco pkg install bleir-sandbox
raco test .local/share/racket/8.2/pkgs/bleir-sandbox  # everything 
copacetic
raco docs bleir-sandbox

NO MATCHES FOUND! Raco docs show no entries found for bleir-sandbox

Worse yet, if I try on machine 2 to do it the working way, it doesn't work, 
and it fails forever more.

raco pkg remove bleir-sandbox
raco pkg install bleir-sandbox
raco test .local/share/racket/8.2/pkgs/bleir-sanbox  # all copacetic
raco docs bleir-sandbox

NO MATCHES FOUND!, NEVER EVER AGAIN

I flushed Firefox cache, I did sudo racket setup for everything, and more 
trial-and-error.

Incidentally, some packages installed from the cloud also don't install 
docs. For example, 

raco pkg install beautiful-racket  # the package works great
raco docs beautiful-racket  # NOT FOUND!

I have similar problems on Ubuntu 21, but racket doesn't install things in 
.local/share/racket/8.2. In fact, I've been unable to find out where racket 
is installing packages on Ubuntu 21 (i.e., in what directories), even thoug

raco pkg show

shows all the packages I expect to see, and they all apparently work 
properly except for doc install.

Would someone be so kind as to help me

1) understand what the heck is going on?
2) find a reliable, robust way to always install the docs on the packages I 
develop.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/2d7ade99-9a57-41fb-9903-1b2e17fab361n%40googlegroups.com.


Re: [racket-users] Re: [ANN] fmt: a Racket code formatter

2021-10-19 Thread Sorawee Porncharoenwase
On Tue, Oct 19, 2021 at 7:01 AM Diego Crespo
mycontributiontothewo...@gmail.com
 wrote:

If you are curious about what the output looked like before, here is the
> pasterack link of some of my code http://pasterack.org/pastes/23639.
> Racket supports using brackets instead of parenthesis, but you typically
> only see it used in things like cond and let expressions. This was adding
> them to far more expressions. Other than looking odd, there was nothing
> wrong with the code (other than my own errors :))
>
FWIW, here’s what the tool would output now (provided that the input code’s
paren shapes are not yet compromised): http://pasterack.org/pastes/21352

raco fmt will usually keep paren shape intact, but it can convert paren
shape in some positions. Right now, the only conversion is from parenthesis
to bracket, and it’s enabled for:

   - cond, case-lambda, match, case body
   - syntax-case, syntax-rules body
   - syntax-parse (including syntax-parser and define-syntax-parser) body.
   - for bindings (including for/... and for*/...)
   - let bindings (including letrec, let-syntax, let-values, …)
   - parameterize, with-syntax, shared bindings
   - and a few more

What happened earlier was that class was erroneously configured to have
this paren shape conversion, even though it should not.

On Tuesday, October 19, 2021 at 9:34:04 AM UTC-4 hen...@topoi.pooq.com
> wrote:
>
>> and was disappointed.
>>
> I would not recommend this, but if you strongly feel that the class body
should use brackets, you are free to write your own formatting rules.
(Though I have not documented how to do so.)

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CADcuegs%2BepCLAXHzjXxPdq%3DR6su0heHOJRBYgWL7_tLj5J%3Db2A%40mail.gmail.com.


Re: [racket-users] Re: [ANN] fmt: a Racket code formatter

2021-10-19 Thread Diego Crespo
If you are curious about what the output looked like before, here is the 
pasterack link of some of my code http://pasterack.org/pastes/23639. Racket 
supports using brackets instead of parenthesis, but you typically only see 
it used in things like cond and let expressions. This was adding them to 
far more expressions. Other than looking odd, there was nothing wrong with 
the code (other than my own errors :)) 

On Tuesday, October 19, 2021 at 9:34:04 AM UTC-4 hen...@topoi.pooq.com 
wrote:

> When I read this:
>
> > On Mon, Oct 18, 2021 at 6:14 PM Diego Crespo <
> > mycontributi...@gmail.com> wrote:
> > 
> > > This is really cool. Between this, a Racket linter, and an LSP, Racket 
> is
> > > seriously looking a lot better for larger teams. I ran it through some 
> of
> > > my code and I'm curious about the decision to use brackets more 
> liberally.
> > > I was surprised when it changed my methods in my classes to be 
> bracketed,
> > > as well as the init, and field expressions. I could probably get used 
> to it
> > > given enough time, but I haven't seen that style in other Racket code
> > > before.
>
> I thought, great! This will ameilorate the perennial parenthesis problem 
> by using 
> different kinds of brackets for different uses.
>
> THen I read this:
>
> On Mon, Oct 18, 2021 at 07:06:41PM -0700, Sorawee Porncharoenwase wrote:
> > Don't get used to it. It's a bug!
> > 
> > Fixed in
> > 
> https://github.com/sorawee/fmt/commit/e056aee1e9a3ea0a72a4c85075426fa76f037852
> .
> > Thanks for the report!
>
> and was disappointed.
>
> The I started wondering -- just what did it look like, that the use of 
> different 
> brackets would be considered a problem?
>
> -- hendrik
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/f9b2611c-105b-4594-acb7-1af1a2992d3en%40googlegroups.com.


Re: [racket-users] Re: [ANN] fmt: a Racket code formatter

2021-10-19 Thread Hendrik Boom
When I read this:

> On Mon, Oct 18, 2021 at 6:14 PM Diego Crespo <
> mycontributiontothewo...@gmail.com> wrote:
> 
> > This is really cool. Between this, a Racket linter, and an LSP, Racket is
> > seriously looking a lot better for larger teams. I ran it through some of
> > my code and I'm curious about the decision to use brackets more liberally.
> > I was surprised when it changed my methods in my classes to be bracketed,
> > as well as the init, and field expressions. I could probably get used to it
> > given enough time, but I haven't seen that style in other Racket code
> > before.

I thought, great!  This will ameilorate the perennial parenthesis problem by 
using 
different kinds of brackets for different uses.

THen I read this:

On Mon, Oct 18, 2021 at 07:06:41PM -0700, Sorawee Porncharoenwase wrote:
> Don't get used to it. It's a bug!
> 
> Fixed in
> https://github.com/sorawee/fmt/commit/e056aee1e9a3ea0a72a4c85075426fa76f037852.
> Thanks for the report!

and was disappointed.

The I started wondering -- just what did it look like, that the use of 
different 
brackets would be considered a problem?

-- hendrik

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20211019133356.257w6kempwu57api%40topoi.pooq.com.


Re: [racket-users] Rationale for package structure

2021-10-19 Thread schle...@gmail.com
But you can also define two single collection packages that use the same 
`(define collection "...")` within the info.rkt.
And that allows you to add modules with single collection packages.
Only tested locally but seems to work.

ded...@gmail.com schrieb am Donnerstag, 14. Oktober 2021 um 21:45:15 UTC+2:

> It's been a while since I created a new package, but as of ~1 year ago, 
> another advantage (or perhaps the same, from a different angle) of the 
> multi-collection format was that it allowed third parties to add modules to 
> the collections I defined.
>
> Eric
>
>
> On Sat, Oct 9, 2021, 1:58 PM 'Joel Dueck' via Racket Users <
> racket...@googlegroups.com> wrote:
>
>> I’ve always used the single collection format [1] in my packages.
>>
>> However, I see a lot of package authors will use a multi-collection 
>> format and split the library, documentation and maybe tests out into 
>> separate collections.
>>
>> What are the benefits of splitting the main library and its documentation 
>> into separate collections?
>>
>> [1]: 
>> https://docs.racket-lang.org/pkg/Package_Concepts.html#%28part._concept~3amulti-collection%29
>>
>> -- 
>>
> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/6ea9f50e-0d4f-4800-bc17-d31979a614cfn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/f5b0fb1d-d26f-4eda-9915-72143b5f48e4n%40googlegroups.com.