[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BSD license problem of BiCon was non-issue



On Sun, 4 Apr 2004, ahmad khalifa wrote:
> >From: Behdad Esfahbod <behdad at cs dot toronto dot edu>
> >On Sat, 3 Apr 2004, ahmad khalifa wrote:
> >
> > > so u both think that what i did was wrong ?
> > > enlighten me...
> >
> >Depends on how do you define "wrong".  What you did is quite good
> >as a _prototype_, to be replaced by something better later.
>
> i was talking about "personal preference"...
> because i thought that i couldnt use FriBidi Inside
> putty's code. so the only options i thought were available were
> 1. FriBidi as a dynamic lib.
> 2. own implementation.
> Simon wouldnt accept number1, so the only thing left was number 2.
> so there was no "personal preference"...

I was not talking about YOUR "personal preference", but the PuTTY
guys'.  As Shachar noted, compiling PuTTY with FriBidi statically
is allowed too, as long as the source code for PuTTY is provided.

> >Unfortunately I cannot access your code right now, as there is no
> >link from the arabeyes PuTTY page, nor from the sf.net page!
> >But lemme give an example:  your code has no optimizations and it
> >looks like an O(N^2) implementation.  You may say that the lines
> >are short in PuTTY, but IIRC you are keeping the minibidi
> >separate from PuTTY.
>
> its in cvs beside putty
> http://cvs.arabeyes.org/viewcvs/projects/external/putty

Oh, I was looking for it in SF CVS, silly me.

> well, you're right about that O(N^2).
> but as i checked, the reference code and Fribidi are also O(N^2).

No that's wrong.  Reference impl. may be O(N^2), since it's a
prototype too, but FriBidi is O(N).  In fact it's a really really
light O(N) implementation.

> and besides, in apps other than putty, Bidi should be performed
> when the buffer changes, which shouldnt take much processing...

That's why it's really important!  This means if you type a
single character in your editor, at least the whole paragraph
should be passed to bidi again.

> i have some optimizations in mind, but first i'll get the issue of
> the explicit marks...
>
> >As another example, I'm not sure you fixed it or not, but you
> >used to only keep bidi types for Arabic block.
>
> i have mentioned before that i wrote 2 very small C programs
> to make a C header file for (almost) all unicode types in UnicodeData.txt
> and mirroring.txt (or whatever its name is).
> so minibidi handles all characters from 0000 to FFFF and
> applies mirroring to all.
> the version in cvs only has the RLE table.
>
> and beside that, i have implemented an RLE scheme, so instead of
> having FFFF+1 type values in memory which is ~65KB, its
> compressed to ~1KB.
> this ofcourse needs some optimization that i'll get to later if minibidi
> becomes significant, i.e if putty accepts it, or its used elsewhere...

Ok Ok.  Too bad you are coding for windows, which means you only
support BMP.  BTW, please don't use RLE as that acronym, since it
means something else here.

> >Or one really hard to find out technical one:  A PDF should pop
> >the *matching* LRE/RLE/LRO/RLO code, not the one on top of the
> >stack.  Now go find what does it mean ;).  [Hint:  the reference
> >impl. does this too, as well as FriBidi]
>
> hard one... i still dont get it. but debugging the refrence code
> should be helpful.

I'm not sure if you are interested in it at all.  I have a test
case in FriBidi for that.  The long test case IIRC.

> >And you say your implementation is quite compliant to the spec,
> >but I see you can only say it because you have done absolutely no
> >systematic tests.  Lemme tell you how we tested FriBidi for
> >compliance:  compiled both FriBidi and the reference impl.  Then
> >wrote a few small scripts (they are in FriBidi CVS too) to
> >generate absolutely random strings of length 64kb, and feed to
> >both implementations, and compare the output.
>
> wow, do i need to do that ?
> i'll probably have to establish some GOOD testing mechanism
> and some scripts. although i'd have to learn some scripting
> language first...
> but only if minibidi is to be used by something.

You don't have too, ofcourse.

> >This way could find any of my implementation errors in a matter
> >of seconds, giving a huge counter example, that I used to trim
> >down and find the bug.  Then I let the test process to run for 24
> >hours on my celeron machine, and only when it couldn't find any
> >offending string, I claimed that.
>
> i claimed 100% compliance after i tested minibidi on putty against
> the refrence code on putty, now i take it back and say 100%
> compliance with the Implicit algorithm, i.e no explicit handling yet..

I read in code the other time that you change WS to ON for the
time.  Is it fixed?  BTW, try a sequence like this:

R EN ET NSM EN.

[probably you get it right.]

> ak.

--behdad
  behdad.org