[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-dev
Subject:    Re: [racket-dev] lib changes between versions
From:       Dan Liebgold <dan.liebgold () gmail ! com>
Date:       2015-01-08 19:43:59
Message-ID: CAK_LU1wsb09smfJn3N6ZBmLCy1NgPVk_q3Lygek_9rKBTgoUKw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Ah, these look like good approaches. First, I think I'll have to shore up
my usage of "raco setup" now to be sure I'm generating zos correctly for
the two different versions.

On Wed, Jan 7, 2015 at 10:19 PM, Tobias Hammer <tobias.hammer@dlr.de> wrote:

> I usually use this macro in a wrapper that require/provides the libs and
> provides compatibility wrappers when needed
>
> ;; compile time version switch
> (define-syntax (version>=? stx)
>   (syntax-case stx ()
>     [(_ min-version body body-else)
>      (if (string>=? (version) (syntax-e #'min-version))
>          #'body
>          #'body-else)]))
>
>
>
>
> On Thu, 08 Jan 2015 02:56:16 +0100, Dan Liebgold <dan.liebgold@gmail.com>
> wrote:
>
>  Actually this issue is still perplexing me. In 5.2.1 I have my own json
>> lib
>> which provides jsexpr->string. In 6.1 it's part of the distribution's
>> collects directory.
>>
>> Is there a command line for racket that'll cause it to find mine under
>> 5.2.1 and the standard lib in 6.1 (skipping mine)?
>>
>> Dan
>>
>> On Wed, Jan 7, 2015 at 4:51 PM, Dan Liebgold <dan.liebgold@gmail.com>
>> wrote:
>>
>>  Ugh. Never mind... the old json lib is mine. Carry on :)
>>>
>>> On Wed, Jan 7, 2015 at 4:45 PM, Dan Liebgold <dan.liebgold@gmail.com>
>>> wrote:
>>>
>>>
>>>> I'm maintaining the same racket code between Racket version 5.2.1 and
>>>> 6.1. One thing that changed between those version was the json to string
>>>> (and vice versa) lib functions.
>>>>
>>>> Is there a straightforward way to define those functions so they'll work
>>>> with both lib versions?
>>>>
>>>> Thanks,
>>>> --
>>>> Dan Liebgold    [dan.liebgold@gmail.com]
>>>>
>>>>
>>>
>>>
>>> --
>>> Dan Liebgold    [dan.liebgold@gmail.com]
>>>
>>>
>>
>>  _________________________
>  Racket Developers list:
>  http://lists.racket-lang.org/dev
>



-- 
Dan Liebgold    [dan.liebgold@gmail.com]

[Attachment #5 (text/html)]

<div dir="ltr">Ah, these look like good approaches. First, I think I&#39;ll have to \
shore up my usage of &quot;raco setup&quot; now to be sure I&#39;m generating zos \
correctly for the two different versions.</div><div class="gmail_extra"><br><div \
class="gmail_quote">On Wed, Jan 7, 2015 at 10:19 PM, Tobias Hammer <span \
dir="ltr">&lt;<a href="mailto:tobias.hammer@dlr.de" \
target="_blank">tobias.hammer@dlr.de</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">I usually use this macro in a wrapper that require/provides \
the libs and provides compatibility wrappers when needed<br> <br>
;; compile time version switch<br>
(define-syntax (version&gt;=? stx)<br>
   (syntax-case stx ()<br>
      [(_ min-version body body-else)<br>
        (if (string&gt;=? (version) (syntax-e #&#39;min-version))<br>
              #&#39;body<br>
              #&#39;body-else)]))<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On Thu, 08 Jan 2015 02:56:16 +0100, Dan Liebgold &lt;<a \
href="mailto:dan.liebgold@gmail.com" target="_blank">dan.liebgold@gmail.com</a>&gt; \
wrote:<br> <br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Actually this issue is still perplexing me. In 5.2.1 I have \
my own json lib<br> which provides jsexpr-&gt;string. In 6.1 it&#39;s part of the \
distribution&#39;s<br> collects directory.<br>
<br>
Is there a command line for racket that&#39;ll cause it to find mine under<br>
5.2.1 and the standard lib in 6.1 (skipping mine)?<br>
<br>
Dan<br>
<br>
On Wed, Jan 7, 2015 at 4:51 PM, Dan Liebgold &lt;<a \
href="mailto:dan.liebgold@gmail.com" target="_blank">dan.liebgold@gmail.com</a>&gt; \
wrote:<br> <br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Ugh. Never mind... the old json lib is mine. Carry on :)<br>
<br>
On Wed, Jan 7, 2015 at 4:45 PM, Dan Liebgold &lt;<a \
href="mailto:dan.liebgold@gmail.com" \
target="_blank">dan.liebgold@gmail.com</a>&gt;<br> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <br>
I&#39;m maintaining the same racket code between Racket version 5.2.1 and<br>
6.1. One thing that changed between those version was the json to string<br>
(and vice versa) lib functions.<br>
<br>
Is there a straightforward way to define those functions so they&#39;ll work<br>
with both lib versions?<br>
<br>
Thanks,<br>
--<br>
Dan Liebgold      [<a href="mailto:dan.liebgold@gmail.com" \
target="_blank">dan.liebgold@gmail.com</a>]<br> <br>
</blockquote>
<br>
<br>
<br>
--<br>
Dan Liebgold      [<a href="mailto:dan.liebgold@gmail.com" \
target="_blank">dan.liebgold@gmail.com</a>]<br> <br>
</blockquote>
<br>
<br>
</blockquote></div></div><div class="HOEnZb"><div class="h5">
_________________________<br>
  Racket Developers list:<br>
  <a href="http://lists.racket-lang.org/dev" \
target="_blank">http://lists.racket-lang.org/<u></u>dev</a><br> \
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail_signature">Dan Liebgold      [<a \
href="mailto:dan.liebgold@gmail.com">dan.liebgold@gmail.com</a>]</div> </div>



_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic