Re: [racket-users] Rationale for package structure

2021-10-14 Thread Eric Griffis
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-users@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+unsubscr...@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/CAORuSUwGH0vAZvx-Y7jQNEqzwhks8X-%2B0y4t_m6Nc_%3DTWW45YA%40mail.gmail.com.


Re: [racket-users] rename-out not working as expected

2021-10-14 Thread jackh...@gmail.com
static-rename compiles down to something totally different, actually. It 
uses the 'inferred-name 

 
syntax property to get the Racket compiler to choose a different name for 
the function at compile time. This is different from `(procedure-rename 
do-something 'do-i)`, which creates a wrapper function around the original. 
The 'inferred-name approach is guaranteed to have no runtime overhead.

On Tuesday, October 12, 2021 at 12:25:15 PM UTC-7 david@gmail.com wrote:

> Okay, good.  Thanks for the library recommendation; I'll probably use that 
> in the future where I need to rename/provide multiple things, but given 
> that there's only one I did this instead in order to avoid having another 
> dependency:
>
> (provide do-it)
> (define do-it (procedure-rename do-something 'do-i))
>
> I suspect I'm reinventing the wheel and that's what static-rename compiles 
> down to.
>
>
> On Tue, Oct 12, 2021 at 3:14 PM 'William J. Bowman' via Racket Users <
> racket...@googlegroups.com> wrote:
>
>> I think this is the expected behaviour of `rename-out`; you might want 
>> this library to change the dynamic displayed name:
>>   https://docs.racket-lang.org/static-rename/index.html
>>
>> --
>> William J. Bowman
>>
>> On Tue, Oct 12, 2021 at 03:07:13PM -0400, David Storrs wrote:
>> > ---
>> > ; test.rkt
>> > #lang racket
>> > (define (do-something) "ok")
>> > (provide do-something)
>> > 
>> > ; test2.rkt
>> > #lang racket
>> > (require "test.rkt")
>> > (provide (rename-out [do-something do-it]))
>> > 
>> > #lang racket
>> > (require "test2.rkt")
>> > do-it
>> > ---
>> > 
>> > The printed value is # although I was expecting
>> > #.  Have I done something wrong or simply misunderstood
>> > how rename-out works?
>> > 
>> > -- 
>> > 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/CAE8gKodiRBWPK5MfgYnOi_V%2B%3DwwFzBxtQK1qV2Mj-zPuHEXn9g%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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/YWXekUFzaEkaitiB%40williamjbowman.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/0dc52c9c-0b8a-462b-94a3-0f126809469dn%40googlegroups.com.


Re: [racket-users] Rationale for package structure

2021-10-14 Thread jackh...@gmail.com
I don't bother with the splitting because it's a *lot* of maintenance 
headache for little gain. My opinion is that we should take the collective 
effort we've poured into splitting packages and instead direct it at 
improving the compiler and package system to do a better job of automating 
this process.

On Sunday, October 10, 2021 at 9:44:03 AM UTC-7 samdph...@gmail.com wrote:

> The --binary flag only works for the current release with the default 
> catalog iirc.
>
> Cheers,
> Sam
>
> On Sat, Oct 9, 2021, 11:58 Sorawee Porncharoenwase  
> wrote:
>
>> I think it's so that `raco pkg install mypkg-lib` won't install 
>> `racket-doc` if you use Minimal Racket?
>>
>> If you don't split `mypkg` to `mypkg-lib` and `mypkg-doc`, but specify 
>> `deps` and `build-deps` correctly, `raco pkg install --binary mypkg` won't 
>> pull in `racket-doc` either. I don't know when this feature was added 
>> though. Perhaps, it could be that the package splitting convention predates 
>> the feature, and the convention persists.
>>
>> On Sat, Oct 9, 2021 at 10:58 AM '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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/CADcuegs%3D-YZKaTSmPxreNekuUyxcyMG6AOSzxwnkCnr_8jBkgg%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/b44536f8-d271-461a-9cb9-17b0da8625efn%40googlegroups.com.