[racket-users] racket users] make-keyword-procedure follow-up
> On Aug 29, 2019, at 1:24 PM, Kevin Forchione wrote: > > Hi guys, > I’ve been working for a little while with the idea of being able to pass > keyword arguments through a function that doesn’t define them. Additionally I > wanted to allow the “pass-through” function to define its own keywords. > Additionally didn’t want to have to pre-specify what function might be on the > receiving end of the call. But finally, if both pass-through and called > functions define the same keywords I didn’t want to have to differentiate > between them. > > - This seems to involve some combination of make-keyword-procedure and > keyword-apply. > - Since make-keyword-procedure expects a “vanilla” function (one without > keywords specified) I decided to define a macro that would wrap the function > in a let that with default bindings for each keyword defined by the > pass-through. Inside the function I would then assign any values provided by > the function call to those variables. > - Additionally I would build a parameterized list of keywords defined by the > pass-through chain. These would be used in conjunction with the keyword list > produced by procedure-keywords and the keywords/values captured by the > function call to “filter” the lists used by keyword-apply. The idea being to > eliminate any keyword/values supplied to the pass-through and defined by the > pass-through that were not defined by the called function. This would allow > keywords not defined by either to be error by the called function. > > As you can see, it’s a convoluted approach and I’m not sure how robust it > actually. I’m presenting working code (for my test cases…) but also wondering > if someone hasn’t already crated that wheel. :) A little syntactic sugar makes it appear more palatable with the addition of: (define-syntax (keyword-apply/filter stx) (syntax-parse stx [(_ fn kw kv args) #'(let () (define-values (rkw akw) (procedure-keywords h)) (define-values (Δkw Δkv) (filter/kw (current-caller-kw) akw kw kv)) (keyword-apply fn Δkw Δkv args))])) And now the definitions are somewhat clearer: (define (h #:c c . x) (list c x)) (def (g ((c 0)) . args) (list c (keyword-apply/filter h kw kv args))) (def (f ((a 0)(b 0)) n p . ns) (list kw kv a b n p ns (keyword-apply/filter g kw kv ns))) Kevin -- 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/751B8754-6244-4A44-B779-ECD52DA070B5%40gmail.com.
[racket-users] [racket users] make-keyword-procedure follow-up
Hi guys, I’ve been working for a little while with the idea of being able to pass keyword arguments through a function that doesn’t define them. Additionally I wanted to allow the “pass-through” function to define its own keywords. Additionally didn’t want to have to pre-specify what function might be on the receiving end of the call. But finally, if both pass-through and called functions define the same keywords I didn’t want to have to differentiate between them. - This seems to involve some combination of make-keyword-procedure and keyword-apply. - Since make-keyword-procedure expects a “vanilla” function (one without keywords specified) I decided to define a macro that would wrap the function in a let that with default bindings for each keyword defined by the pass-through. Inside the function I would then assign any values provided by the function call to those variables. - Additionally I would build a parameterized list of keywords defined by the pass-through chain. These would be used in conjunction with the keyword list produced by procedure-keywords and the keywords/values captured by the function call to “filter” the lists used by keyword-apply. The idea being to eliminate any keyword/values supplied to the pass-through and defined by the pass-through that were not defined by the called function. This would allow keywords not defined by either to be error by the called function. As you can see, it’s a convoluted approach and I’m not sure how robust it actually. I’m presenting working code (for my test cases…) but also wondering if someone hasn’t already crated that wheel. :) #lang racket (require (for-syntax syntax/parse racket/syntax)) (define current-caller-kw (make-parameter '())) (define (get-kw-val w v kw kv) (define key (string->keyword (symbol->string w))) (define kws (list->vector kw)) (define idx (vector-member key kws)) (cond [(false? idx) v] [else (define kvs (list->vector kv)) (vector-ref kvs idx)])) (define-syntax (def stx) (syntax-parse stx [(_ (f ((w v) ...) k ... . ks) body0 body ...) (with-syntax ([kw (format-id #'f "kw")] [kv (format-id #'f "kv")]) #'(define f (let ([w v] ...) (make-keyword-procedure (λ (kw kv k ... . ks) (parameterize ([current-caller-kw (append (current-caller-kw) (map (λ (x) (string->keyword (symbol->string x))) (list 'w ...)))]) (set! w (get-kw-val 'w w kw kv)) ... body0 body ...))])) (define (filter/kw ckw fkw kw kv) (cond [(empty? ckw) (values kw kv)] [(empty? (remove* fkw ckw)) (values kw kv)] [else (define diff (remove* fkw ckw)) (define vkw (list->vector kw)) (define vkv (list->vector kv)) (for/fold ([wacc '()] [vacc '()]) ([v kv] [k kw] #:unless (member k diff)) (values (append wacc (list k)) (append vacc (list v])) (define (h #:c c . x) (list c x)) (def (g ((c 0)) . args) (define-values (rkw akw) (procedure-keywords h)) (define-values (Δkw Δkv) (filter/kw (current-caller-kw) akw kw kv)) (list c (keyword-apply h Δkw Δkv args))) (def (f ((a 0)(b 0)) n p . ns) (list kw kv a b n p ns (keyword-apply g kw kv ns))) ;=> '((#:a #:c) (42 52) 42 0 2 3 (4 5) (52 (52 (4 5 (f 2 3 4 5 #:a 42 #:c 52) ;=> application: procedure does not expect an argument with given keyword ; procedure: h ; given keyword: #:z ; arguments...: (f 2 3 4 5 #:z 42 #:c 52) Kevin -- 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/27D5D96D-F9D9-4ECB-9AE0-92FD1EB065C8%40gmail.com.
Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?
Joining in. I want to be part of this. -slg Original Message On Aug 29, 2019, 12:31 PM, 'Joel Dueck' via Racket Users wrote: > On Thursday, August 29, 2019 at 11:27:41 AM UTC-5, Sam Tobin-Hochstadt wrote: > >> Thanks for volunteering! I'll follow-up off-list. >> >> Sam > > Sure thing. Just minutes ago I dug up the Relicensing Permission issue on > GitHub > and found you have made significant progress. Not looking to wrest this out > of any- > one's hands, just to donate a chunk of spare cycles if it will help push this > thing over > the top. > > -- > 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/32e751d1-5ef8-4011-b007-fb4e099e1682%40googlegroups.com](https://groups.google.com/d/msgid/racket-users/32e751d1-5ef8-4011-b007-fb4e099e1682%40googlegroups.com?utm_medium=email_source=footer). -- 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/1XuFHoZWtX7bo4CGr1UNt2HkXgxcJSSJrfjIEaWAHNcMgGLUnuS-xLQmzISg3_8COjxOD5tUFTCOcSuyfm9N0qpVJe-Nb6XK0LbSW3dm4AE%3D%40sagegerard.com.
Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?
On Thursday, August 29, 2019 at 11:27:41 AM UTC-5, Sam Tobin-Hochstadt wrote: > > Thanks for volunteering! I'll follow-up off-list. > > Sam > Sure thing. Just minutes ago I dug up the Relicensing Permission issue on GitHub and found you have made significant progress. Not looking to wrest this out of any- one's hands, just to donate a chunk of spare cycles if it will help push this thing over the top. -- 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/32e751d1-5ef8-4011-b007-fb4e099e1682%40googlegroups.com.
Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?
Thanks for volunteering! I'll follow-up off-list. Sam On Thu, Aug 29, 2019 at 12:14 PM 'Joel Dueck' via Racket Users wrote: > > On Thursday, August 29, 2019 at 10:45:33 AM UTC-5, Matthew Flatt wrote: >> >> >> A pulse and keyboard is a good start, but the task requires significant >> initiative to work with the Conservancy to get guidance and make sure >> things move along. The process may possibly involve contacting >> individual contributors (again) and helping them figure out who needs >> to be contacted at their respective institutions, and then making sure >> that communication actually happens. It's not rocket science, but it's >> actual work. >> > > Understood. If you or someone can get me up to speed — perhaps some > email introductions, a list of contributors, a rough indication of the current > state, I can commit to pushing this cart consistently, say through the end > of the year. Then we can review and go from there. If anyone else would > rather do it, or would prefer it be someone else, that’s obviously fine too. > > (To clarify, I didn't mean by “pulse and keyboard” to imply anything > derisive about the work that needs to be done or the people who > had been doing it. I just wanted to know if any special domain > expertise was needed or if a prole like me could do it. I'm pretty familiar > with software licensing issues, but have only been in Racket’s orbit > for the past few years or 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/a42134cc-888b-48e3-a2b8-c6aef42933bf%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/CAK%3DHD%2Bb0LTukPzF_hgg2-1s8_Lnj_dOHEzXu_Lo9sPSjnmoQGQ%40mail.gmail.com.
Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?
On Thursday, August 29, 2019 at 10:45:33 AM UTC-5, Matthew Flatt wrote: > > > A pulse and keyboard is a good start, but the task requires significant > initiative to work with the Conservancy to get guidance and make sure > things move along. The process may possibly involve contacting > individual contributors (again) and helping them figure out who needs > to be contacted at their respective institutions, and then making sure > that communication actually happens. It's not rocket science, but it's > actual work. > > Understood. If you or someone can get me up to speed — perhaps some email introductions, a list of contributors, a rough indication of the current state, I can commit to pushing this cart consistently, say through the end of the year. Then we can review and go from there. If anyone else would rather do it, or would prefer it be someone else, that’s obviously fine too. (To clarify, I didn't mean by “pulse and keyboard” to imply anything derisive about the work that needs to be done or the people who had been doing it. I just wanted to know if any special domain expertise was needed or if a prole like me could do it. I'm pretty familiar with software licensing issues, but have only been in Racket’s orbit for the past few years or 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/a42134cc-888b-48e3-a2b8-c6aef42933bf%40googlegroups.com.
Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?
At Thu, 29 Aug 2019 08:14:19 -0700 (PDT), "'Joel Dueck' via Racket Users" wrote: > On Thursday, August 29, 2019 at 9:01:51 AM UTC-5, Matthew Flatt wrote: > > > > Lingering elsewhere: the relicensing project that commenced more than > > > 2.5 years ago [5] — not clear whether under the SFC this effort is > > > alive, dead, or what. Of course, Galaxy's Edge took 3 yrs to build, > > > so maybe I'm being unreasonably impatient. > > > > Clearly, we could use some help. > > > > > What are the tasks that we could take off your hands? Are there > requirements for doing these tasks besides having a pulse and a keyboard? A pulse and keyboard is a good start, but the task requires significant initiative to work with the Conservancy to get guidance and make sure things move along. The process may possibly involve contacting individual contributors (again) and helping them figure out who needs to be contacted at their respective institutions, and then making sure that communication actually happens. It's not rocket science, but it's actual work. -- 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/5d67f31a.1c69fb81.f75ba.1351SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?
On Thursday, August 29, 2019 at 9:01:51 AM UTC-5, Matthew Flatt wrote: > > Lingering elsewhere: the relicensing project that commenced more than > > 2.5 years ago [5] — not clear whether under the SFC this effort is > > alive, dead, or what. Of course, Galaxy's Edge took 3 yrs to build, > > so maybe I'm being unreasonably impatient. > > Clearly, we could use some help. > > What are the tasks that we could take off your hands? Are there requirements for doing these tasks besides having a pulse and a keyboard? -- 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/1a3e1917-3818-4e56-bd75-dce21e81cae9%40googlegroups.com.
Re: [racket-users] Is it possible to sell commercial use rights to an open source Racket package?
At Fri, 23 Aug 2019 11:03:42 -0700, Matthew Butterick wrote: > Did SFC do so in this case? No idea. Before the switch, Karen Sandler > from SFC circulated [2] a template agreement [3] but AFAIK the actual > agreement that Racket's core team signed, and the details thereof, > has never been shared with the community. (Can it? Should it? Not my > call. Or did I miss it?) It was the same, with the "Self-Perpetuating Committee" option for 6: https://drive.google.com/open?id=17mrcnMLVMYBCp3fb71gY1a7lYwvIyApR > Furthermore, the original SFC/Racket press release mentioned a "newly > formed Project Leadership Committee" [4] — there's never been any > mention of who's on this committee, or whether their responsibilities > involve licensing. It's Matthias, Robby, Sam, Jay, and me --- the same as Racket leadership before joining the Conservancy. Leadership's job includes licensing in the sense that if we want to change the Racket license, then leadership has to move it along, either by doing the work directly or finding people to help. The Conservancy can provide legal support and advice, and it obviously has a say in whether a license choice is compatible with the Conservancy's goals and membership (which, in the case of the relicensing that we're trying to accomplish, it is). > Lingering elsewhere: the relicensing project that commenced more than > 2.5 years ago [5] — not clear whether under the SFC this effort is > alive, dead, or what. Of course, Galaxy's Edge took 3 yrs to build, > so maybe I'm being unreasonably impatient. Clearly, we could use some help. -- 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/5d67daca.1c69fb81.b959.dd06SMTPIN_ADDED_MISSING%40mx.google.com.
Re: [racket-users] Would it help to call racket2 something else?
On Thursday, August 29, 2019 at 12:46:53 AM UTC-4, David Storrs wrote: > > > On Wed, Aug 28, 2019, 11:43 PM Sage Gerard > wrote: > >> >> Maybe I'm overthinking this. I already know that nothing in #lang racket >> is getting thrown out or anything. > > > Yes, it is. > I believe Sage's statement was that all current #lang racket modules will continue to work exactly the same, which is true. Nothing changes unless a module decides to use #lang racket2, and modules will not have to know whether or not their dependencies are written in #lang racket, in #lang racket2, or in a mixture of both. Backwards compatibility for existing unchanged modules will be preserved. -- 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/c130f310-d035-44d6-9c1e-011f2a6f2070%40googlegroups.com.
Re: [racket-users] Is there an expanded form of the Racket2 purpose declaration?
Robby Findler writes: > Of course, it is good to make it easy to move to new versions of the > language, but if there is no real benefit to the transition for the > programmer (eg they aren't planning to touch that code for the next N > months anyway as it does its job well) then I think we should let them > leave it alone and come to it when they need to. I very much agree with that point of view! Programmers come in so many varieties these days that it's hard to make generally valid statements about them. Apple's approach has worked well for them indeed, but that's in the context of commercial application development for a dominantly technophile user base. Different contexts (open source, educational, in-house software, ...) and different user categories (banks, lawyers, scientists, ...) require different approaches. On the other hand, I am not sure that it is possible for a development environment to stay completely neutral on the issue of mandatory change and please everyone. But I'd love to be proven wrong about this. For an in-depth analysis of this question in the specific context of scientific computing, see https://hal.archives-ouvertes.fr/hal-02117588 Konrad. -- 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/m1k1aw33pg.fsf%40ordinateur-de-catherine--konrad.home.