https://codereview.appspot.com/317270043/diff/40001/scm/lily-library.scm
File scm/lily-library.scm (right):
https://codereview.appspot.com/317270043/diff/40001/scm/lily-library.scm#newcode895
scm/lily-library.scm:895: "Lexicographically compare to lists @var{a}
and @var{b} using
On 2017/02/18 16
https://codereview.appspot.com/317270043/diff/40001/scm/lily-library.scm
File scm/lily-library.scm (right):
https://codereview.appspot.com/317270043/diff/40001/scm/lily-library.scm#newcode895
scm/lily-library.scm:895: "Lexicographically compare to lists @var{a}
and @var{b} using
On 2017/02/18 15
https://codereview.appspot.com/317270043/diff/40001/scm/lily-library.scm
File scm/lily-library.scm (right):
https://codereview.appspot.com/317270043/diff/40001/scm/lily-library.scm#newcode895
scm/lily-library.scm:895: "Lexicographically compare to lists @var{a}
and @var{b} using
I like David's s
On 02/14/2017 10:48 AM, d...@gnu.org wrote:
It's not a "version-compare" as much as a "lexicographic-compare".
Indeed, even better, more multi-purpose.
(Now I'm imagining version schemes like Ubuntu's animal names, but
nested... Werewolf.Yak.Groundhog)
-Paul
__
thomasmorle...@gmail.com writes:
> To throw in my own 2cts.
>
> Why not compare strings, looks more straight forward to me.
>
> (define (calculate-version-harm ref-version)
> (cond ((string? ref-version) ref-version)
> ((number-list? ref-version)
> (string-concatenate (list-join
Hi Harm,
Am 14.02.2017 um 22:03 schrieb thomasmorle...@gmail.com:
> To throw in my own 2cts.
>
> Why not compare strings, looks more straight forward to me.
>
>
Indeed your code looks simpler, and your measurement indicates that the
computational cost is very similar.
However, David's last comme
On 2017/02/14 21:08:48, thomasmorley651 wrote:
> The issue I can imagine: probably more expensive, especially with
guilev2
Please disregard the time values from my previous posts, they are
adulterated by the problems of _LilyPond_ with guile2
Doing all in pure guile-2.1.6 gives:
string-compa
On 2017/02/14 21:03:19, thomasmorley651 wrote:
To throw in my own 2cts.
Why not compare strings, looks more straight forward to me.
(define (calculate-version-harm ref-version)
(cond ((string? ref-version) ref-version)
((number-list? ref-version)
(string-concatenate (l
To throw in my own 2cts.
Why not compare strings, looks more straight forward to me.
(define (calculate-version-harm ref-version)
(cond ((string? ref-version) ref-version)
((number-list? ref-version)
(string-concatenate (list-join (map number->string ref-version)
".")))
On 2017/02/14 18:20:56, git wrote:
Ah yes. I had removed the
(and (eq? op =)
part, which I shouldn't have done
Well, that works only for a very particular equivalence. How about
something like
#(define (lexicographically op a b)
(let* ((ca (car a))
(iseql (op ca ca)))
(l
https://codereview.appspot.com/317270043/diff/20001/scm/lily-library.scm
File scm/lily-library.scm (right):
https://codereview.appspot.com/317270043/diff/20001/scm/lily-library.scm#newcode899
scm/lily-library.scm:899: (let* ((a (car v1)) (b (car v2))
On 2017/02/14 17:29:33, dak wrote:
Requires
https://codereview.appspot.com/317270043/diff/20001/scm/lily-library.scm
File scm/lily-library.scm (right):
https://codereview.appspot.com/317270043/diff/20001/scm/lily-library.scm#newcode899
scm/lily-library.scm:899: (let* ((a (car v1)) (b (car v2))
Requires v1/v2 to have at least one element.
On 2017/02/14 15:51:13, dak wrote:
On 2017/02/14 15:49:26, dak wrote:
> On 2017/02/14 15:46:20, git wrote:
> > On 2017/02/14 15:37:35, pwm wrote:
> > > On 2017/02/14 15:15:07, git wrote:
> > > > I like this more because it's more of a typical procedure
invocation.
> > > > I think I'll create a
> > However, I found an issue in David's suggestion, namely the
> > (op 0 0) ;; return #t iff op includes equality
> > line.
> > This makes the function return #t when comparing with = and one
list
shortened
> > Try e.g. (ly:version? = 2 16)
> > This returns #t because in the third iteration w
On 2017/02/14 15:46:20, git wrote:
On 2017/02/14 15:37:35, pwm wrote:
> On 2017/02/14 15:15:07, git wrote:
> > I like this more because it's more of a typical procedure
invocation.
> > I think I'll create a new patch with this and a simplified
calculate-version
> > (that doesn't accept string
On 2017/02/14 15:49:26, dak wrote:
On 2017/02/14 15:46:20, git wrote:
> On 2017/02/14 15:37:35, pwm wrote:
> > On 2017/02/14 15:15:07, git wrote:
> > > I like this more because it's more of a typical procedure
invocation.
> > > I think I'll create a new patch with this and a simplified
calculat
On 2017/02/14 15:37:35, pwm wrote:
On 2017/02/14 15:15:07, git wrote:
> I like this more because it's more of a typical procedure
invocation.
> I think I'll create a new patch with this and a simplified
calculate-version
> (that doesn't accept string lists)
Well, having the procedure as th
On 2017/02/14 15:37:35, pwm wrote:
On 2017/02/14 15:15:07, git wrote:
> I like this more because it's more of a typical procedure
invocation.
> I think I'll create a new patch with this and a simplified
calculate-version
> (that doesn't accept string lists)
Well, having the procedure as th
On 2017/02/14 15:15:07, git wrote:
I like this more because it's more of a typical procedure invocation.
I think I'll create a new patch with this and a simplified
calculate-version
(that doesn't accept string lists)
Well, having the procedure as the first argument might be more
scheme-ish?
On 2017/02/14 15:00:10, pwm wrote:
https://codereview.appspot.com/317270043/diff/1/scm/lily-library.scm
File scm/lily-library.scm (right):
https://codereview.appspot.com/317270043/diff/1/scm/lily-library.scm#newcode909
scm/lily-library.scm:909: (define-public (lilypond>? ref-version)
Instead
Reviewers: dak, pwm,
Message:
I'm choking a little bit with having the operator as the first argument
instead of
actually being the first element. But apart from that this solution
works very well.
And as this is not intended to be end-user facing code it's of course OK
to have
just one single po
https://codereview.appspot.com/317270043/diff/1/scm/lily-library.scm
File scm/lily-library.scm (right):
https://codereview.appspot.com/317270043/diff/1/scm/lily-library.scm#newcode909
scm/lily-library.scm:909: (define-public (lilypond>? ref-version)
Instead of a separate procedure for each compa
https://codereview.appspot.com/317270043/diff/1/scm/lily-library.scm
File scm/lily-library.scm (right):
https://codereview.appspot.com/317270043/diff/1/scm/lily-library.scm#newcode894
scm/lily-library.scm:894: (define (calculate-version ref-version)
This seems overly complicated. Why not just s
23 matches
Mail list logo