Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34484 > unrolled thread

Java Source of Meiyan Hash Scrambler?

Started bybursejan@gmail.com
First post2016-06-05 17:22 -0700
Last post2016-06-13 16:23 +0200
Articles 11 on this page of 31 — 10 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Java Source of Meiyan Hash Scrambler? bursejan@gmail.com - 2016-06-05 17:22 -0700
    Re: Java Source of Meiyan Hash Scrambler? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-06 07:48 -0400
      Re: Java Source of Meiyan Hash Scrambler? Jan Burse <janburse@fastmail.fm> - 2016-06-06 14:13 +0200
        TreeBins Problem and Float/Double (Was: Java Source of Meiyan Hash Scrambler?) Jan Burse <janburse@fastmail.fm> - 2016-06-06 14:45 +0200
        Re: Java Source of Meiyan Hash Scrambler? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-06 08:47 -0400
        Floating-point hash keys (Was: Java Source of Meiyan Hash Scrambler?) Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-06 12:02 -0400
          Re: Floating-point hash keys (Was: Java Source of Meiyan Hash Scrambler?) Roedy Green <inquiry@mindprod.com> - 2016-06-09 05:33 -0700
            Re: Floating-point hash keys (Was: Java Source of Meiyan Hash Scrambler?) Jan Burse <janburse@fastmail.fm> - 2016-06-09 16:27 +0200
    Re: Java Source of Meiyan Hash Scrambler? Roedy Green <inquiry@mindprod.com> - 2016-06-07 03:24 -0700
      Re: Java Source of Meiyan Hash Scrambler? Jan Burse <janburse@fastmail.fm> - 2016-06-07 15:38 +0200
      Re: Java Source of Meiyan Hash Scrambler? Jan Burse <janburse@fastmail.fm> - 2016-06-07 15:39 +0200
        Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Jan Burse <janburse@fastmail.fm> - 2016-06-07 15:42 +0200
          Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Roedy Green <inquiry@mindprod.com> - 2016-06-09 05:29 -0700
            Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Mike Amling <mamling@chaff.us> - 2016-06-09 08:00 -0500
              Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Eric Douglas <e.d.programmer@gmail.com> - 2016-06-09 06:07 -0700
                Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Jerry Stuckle <jstucklex@attglobal.net> - 2016-06-09 11:41 -0400
                Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Roedy Green <inquiry@mindprod.com> - 2016-06-11 01:17 -0700
                  Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Daniel Pitts <usenet@coloraura.com> - 2016-06-11 12:31 -0700
                  Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Mike Amling <mamling@chaff.us> - 2016-06-12 15:42 -0500
                    Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Daniel Pitts <usenet@coloraura.com> - 2016-06-12 21:03 -0700
                      Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Roedy Green <inquiry@mindprod.com> - 2016-06-13 14:13 -0700
          Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?) Roedy Green <inquiry@mindprod.com> - 2016-06-10 14:11 -0700
        Re: Java Source of Meiyan Hash Scrambler? Roedy Green <inquiry@mindprod.com> - 2016-06-07 20:38 -0700
          Re: Java Source of Meiyan Hash Scrambler? Roedy Green <inquiry@mindprod.com> - 2016-06-09 05:15 -0700
            Re: Java Source of Meiyan Hash Scrambler? Jan Burse <janburse@fastmail.fm> - 2016-06-09 16:26 +0200
              Re: Java Source of Meiyan Hash Scrambler? Roedy Green <inquiry@mindprod.com> - 2016-06-12 02:28 -0700
                Re: Java Source of Meiyan Hash Scrambler? j4n bur53 <janburse@fastmail.fm> - 2016-06-12 12:03 +0200
                  Re: Java Source of Meiyan Hash Scrambler? Andreas Leitgeb <avl@logic.at> - 2016-06-13 14:07 +0000
                    Re: Java Source of Meiyan Hash Scrambler? Andreas Leitgeb <avl@logic.at> - 2016-06-13 14:17 +0000
                      Re: Java Source of Meiyan Hash Scrambler? Andreas Leitgeb <avl@logic.at> - 2016-06-13 14:20 +0000
                      Re: Java Source of Meiyan Hash Scrambler? j4n bur53 <janburse@fastmail.fm> - 2016-06-13 16:23 +0200

Page 2 of 2 — ← Prev page 1 [2]


#34624 — Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?)

FromRoedy Green <inquiry@mindprod.com>
Date2016-06-13 14:13 -0700
SubjectRe: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?)
Message-ID<ce8ulbdipm9j4i45dejf9kvcjqioj1m84p@4ax.com>
In reply to#34612
On Sun, 12 Jun 2016 21:03:54 -0700, Daniel Pitts
<usenet@coloraura.com> wrote:

>It's clear to me that "http://mindprod/" was a typo, and should have 
>included the ".com".

Normally I type E:\mindprod, and my fingers just took over. Sorry
about that.

[toc] | [prev] | [next] | [standalone]


#34597 — Re: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?)

FromRoedy Green <inquiry@mindprod.com>
Date2016-06-10 14:11 -0700
SubjectRe: Sideremark II ( Re: Java Source of Meiyan Hash Scrambler?)
Message-ID<gsamlbp2javptu2i6noa7ht6c2quinkfkp@4ax.com>
In reply to#34532
On Tue, 7 Jun 2016 15:42:18 +0200, Jan Burse <janburse@fastmail.fm>
wrote:

>Is the pretty printer also open source, available
>on your web site? Interesting nice rainbow
>coloring scheme. Or do you use some IDE?

I answered incorrectly before.  JPrep is is bundled
with htmlmacros, not distributed separately, though with a little
effort, you could use it that way.  You can read the manual
at http://mindprod.com/application/jprep.manual.html

It is open source.
>Did you ever try to pretty print JSP, i.e. a mix
>of XML and Java. Or do you have a XML pretty printer
>separately, without the Java snippets?

The parsers are designed to do SOMETHING no matter what you throw at
them.  They are not fussy like compilers.

To do JSP properly, you would have to merge logic from the HTML and
Java state machines.  You could leave the state machines almost as
they are now, but add some logic to flip to the companion.

[toc] | [prev] | [next] | [standalone]


#34560

FromRoedy Green <inquiry@mindprod.com>
Date2016-06-07 20:38 -0700
Message-ID<vm4flb1cedsm805085q84i1ofcnc9m8l2g@4ax.com>
In reply to#34531
On Tue, 7 Jun 2016 15:39:41 +0200, Jan Burse <janburse@fastmail.fm>
wrote:

>The _777_619 has a different color from the 16.

I group digts by 3 or 4 in slightly different colours.  With the _
that is not needed any more.

[toc] | [prev] | [next] | [standalone]


#34582

FromRoedy Green <inquiry@mindprod.com>
Date2016-06-09 05:15 -0700
Message-ID<fdnilbpdbk92d5pgh3calo8ra9c6egla0g@4ax.com>
In reply to#34560
On Tue, 07 Jun 2016 20:38:19 -0700, Roedy Green <inquiry@mindprod.com>
wrote:

>I group digts by 3 or 4 in slightly different colours.  With the _
>that is not needed any more.

I now turn off that feature if the number contains a _. I happy to
discover this change took only one line of code.

[toc] | [prev] | [next] | [standalone]


#34587

FromJan Burse <janburse@fastmail.fm>
Date2016-06-09 16:26 +0200
Message-ID<njbua3$jue$1@news.albasani.net>
In reply to#34582
Roedy Green schrieb:
> On Tue, 07 Jun 2016 20:38:19 -0700, Roedy Green <inquiry@mindprod.com>
> wrote:
>
>> I group digts by 3 or 4 in slightly different colours.  With the _
>> that is not needed any more.
>
> I now turn off that feature if the number contains a _. I happy to
> discover this change took only one line of code.
>

I still think its not yet correctly rendering number literals,
I am expecting these tokens:
     16_777_619
     2_166_136_261L
in one single color. It really confuses me if a new color starts
before _, insuinating that a new token starts.

[toc] | [prev] | [next] | [standalone]


#34608

FromRoedy Green <inquiry@mindprod.com>
Date2016-06-12 02:28 -0700
Message-ID<9qaqlbhvajdm8kdcf99k7e5pfl933lpvik@4ax.com>
In reply to#34587
On Thu, 9 Jun 2016 16:26:09 +0200, Jan Burse <janburse@fastmail.fm>
wrote:

>I still think its not yet correctly rendering number literals,
>I am expecting these tokens:
>     16_777_619
>     2_166_136_261L
>in one single color. It really confuses me if a new color starts
>before _, insuinating that a new token starts.

what web page are you seeing this on?

[toc] | [prev] | [next] | [standalone]


#34610

Fromj4n bur53 <janburse@fastmail.fm>
Date2016-06-12 12:03 +0200
Message-ID<njjc12$ihr$1@news.albasani.net>
In reply to#34608
Roedy Green schrieb:
> On Thu, 9 Jun 2016 16:26:09 +0200, Jan Burse <janburse@fastmail.fm>
> wrote:
>
>> I still think its not yet correctly rendering number literals,
>> I am expecting these tokens:
>>      16_777_619
>>      2_166_136_261L
>> in one single color. It really confuses me if a new color starts
>> before _, insuinating that a new token starts.
>
> what web page are you seeing this on?
>

http://mindprod.com/jgloss/digest.html#FNV

[toc] | [prev] | [next] | [standalone]


#34616

FromAndreas Leitgeb <avl@logic.at>
Date2016-06-13 14:07 +0000
Message-ID<slrnnltfgk.456.avl@login.logic.tuwien.ac.at>
In reply to#34610
j4n bur53 <janburse@fastmail.fm> wrote:
> Roedy Green schrieb:
>> On Thu, 9 Jun 2016 16:26:09 +0200, Jan Burse <janburse@fastmail.fm>
>> wrote:
>>
>>> I still think its not yet correctly rendering number literals,
>>> I am expecting these tokens:
>>>      16_777_619
>>>      2_166_136_261L
>>> in one single color. It really confuses me if a new color starts
>>> before _, insuinating that a new token starts.
>> what web page are you seeing this on?
> http://mindprod.com/jgloss/digest.html#FNV

Fwiw, I see the number literals all in red, but "doubleddoubled"!

e.g.: (direct copy & paste of these lines)
    private static final int MAGIC_OFFSET = ( int ) ( 2_166_136_2612_166_136_261L & 0xffffffffL ); /* fake unsigned 32 bit */
    private static final int MAGIC_PRIME = 16_777_61916_777_619; /* magic 32 bit FNV_prime = 2^24 + 2^8 + 0x93 = 16,777,619 */

(firefox here)

[toc] | [prev] | [next] | [standalone]


#34618

FromAndreas Leitgeb <avl@logic.at>
Date2016-06-13 14:17 +0000
Message-ID<slrnnltg37.456.avl@login.logic.tuwien.ac.at>
In reply to#34616
Andreas Leitgeb <avl@logic.at> wrote:
> j4n bur53 <janburse@fastmail.fm> wrote:
>> http://mindprod.com/jgloss/digest.html#FNV
> Fwiw, I see the number literals all in red, but "doubleddoubled"!
> e.g.: (direct copy & paste of these lines)
>     private static final int MAGIC_OFFSET = ( int ) ( 2_166_136_2612_166_136_261L & 0xffffffffL ); /* fake unsigned 32 bit */
>     private static final int MAGIC_PRIME = 16_777_61916_777_619; /* magic 32 bit FNV_prime = 2^24 + 2^8 + 0x93 = 16,777,619 */
> (firefox here)

And where the number is very big, it seems to hide a digit besides
the doubling:

/**
 * magic 64 bit initial value for the hash = 14,695,981,039,346,656,037, needs to be unsigned to fit in long.
 */
private static final long MAGIC_OFFSET = 14_695_981_039_346_656_0314_695_981_039_346_656_03L * 10 + 7; /* 14_695_981_039_346_656_037L faked unsigned */

Note, that 14_695_981_039_346_656_0314_695_981_039_346_656_03L lacks the 
digit 7 that is at the end of the figure in the comment. It's also possible
that this one digit is actually just missing in the code, though.

[toc] | [prev] | [next] | [standalone]


#34619

FromAndreas Leitgeb <avl@logic.at>
Date2016-06-13 14:20 +0000
Message-ID<slrnnltg9s.456.avl@login.logic.tuwien.ac.at>
In reply to#34618
Andreas Leitgeb <avl@logic.at> wrote:
> Andreas Leitgeb <avl@logic.at> wrote:
>> j4n bur53 <janburse@fastmail.fm> wrote:
>>> http://mindprod.com/jgloss/digest.html#FNV
>> Fwiw, I see the number literals all in red, but "doubleddoubled"!
>> e.g.: (direct copy & paste of these lines)
>>     private static final int MAGIC_OFFSET = ( int ) ( 2_166_136_2612_166_136_261L & 0xffffffffL ); /* fake unsigned 32 bit */
>>     private static final int MAGIC_PRIME = 16_777_61916_777_619; /* magic 32 bit FNV_prime = 2^24 + 2^8 + 0x93 = 16,777,619 */
>> (firefox here)
> And where the number is very big, it seems to hide a digit besides
> the doubling: [...]
Sorry forget the last one, the missing 7 was intended, that's
that the * 10 + 7 was for, of course.

The "doublingdoubling" is however still an issue.

[toc] | [prev] | [next] | [standalone]


#34620

Fromj4n bur53 <janburse@fastmail.fm>
Date2016-06-13 16:23 +0200
Message-ID<njmfkq$h9p$1@news.albasani.net>
In reply to#34618
Indeed that is the first thing I saw, that
the numbers got bigger. Since I wrote:

> I am expecting these tokens:
>      16_777_619
>      2_166_136_261L
> in one single color.

And now it is:
        16_777_61916_777_619
        2_166_136_2612_166_136_261L

Conclusion:
An update was deliverd, testing failed, a new update is necessary.

Andreas Leitgeb schrieb:
> Andreas Leitgeb <avl@logic.at> wrote:
>> j4n bur53 <janburse@fastmail.fm> wrote:
>>> http://mindprod.com/jgloss/digest.html#FNV
>> Fwiw, I see the number literals all in red, but "doubleddoubled"!
>> e.g.: (direct copy & paste of these lines)
>>      private static final int MAGIC_OFFSET = ( int ) ( 2_166_136_2612_166_136_261L & 0xffffffffL ); /* fake unsigned 32 bit */
>>      private static final int MAGIC_PRIME = 16_777_61916_777_619; /* magic 32 bit FNV_prime = 2^24 + 2^8 + 0x93 = 16,777,619 */
>> (firefox here)
>
> And where the number is very big, it seems to hide a digit besides
> the doubling:
>
> /**
>   * magic 64 bit initial value for the hash = 14,695,981,039,346,656,037, needs to be unsigned to fit in long.
>   */
> private static final long MAGIC_OFFSET = 14_695_981_039_346_656_0314_695_981_039_346_656_03L * 10 + 7; /* 14_695_981_039_346_656_037L faked unsigned */
>
> Note, that 14_695_981_039_346_656_0314_695_981_039_346_656_03L lacks the
> digit 7 that is at the end of the figure in the comment. It's also possible
> that this one digit is actually just missing in the code, though.
>

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.java.programmer


csiph-web