So who wants to call a time of death for good ol' code65536?

Forum for anything else which doesn't fit in the above forums. Site feedback, random talk, whatever, are welcome.

What has happened to our dear friend?

Dead.
3
25%
Hates us.
9
75%
 
Total votes: 12

User avatar
mooms
Posts: 792
Joined: Wed Aug 27, 2008 1:29 pm
Location: France

Post by mooms » Tue Mar 08, 2011 12:54 pm

code65536 wrote: My preference would be for people to apply my patches (once I get around to updating them for the latest NP2 version) to alternate NP2 versions and create builds themselves, rather than spin binaries for every variation. Which brings up another problem: the website that you point to only has the binaries, no source code. So even if I wanted to create a modified French version, I cannot.
Yes, i know you will need the sources but sadly the author didn't make them public...
I guess i will continue to use your builds then !

Thanks for answering anyway.

User avatar
code65536
Posts: 735
Joined: Wed Mar 14, 2007 2:58 pm
Location: .us
Contact:

Post by code65536 » Tue Mar 08, 2011 3:11 pm

bphlpt wrote:Didn't mean to be that presumptuous.
I think you misinterpreted: I meant that as, "It would be presumptuous for me to claim it as a major project and that's why it never has been listed there."
alban wrote:I don't like you voting alternatives, you should add 3. He Does not have a time, or something like it.
Methinks the poll was in jest...
mooms wrote:Yes, i know you will need the sources but sadly the author didn't make them public...
You could try contacting the author to ask for the source. Or, better yet, once the NP2 patches have been updated, you could ask him/her to incorporate my patches into the French builds; this person obviously knows how to compile code, and my patches are not that hard to apply.
My addons: CmdOpen - HashCheck - Notepad2 - MS Runtimes - DirectX

Into the breach, meatbags!

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Tue Mar 08, 2011 5:21 pm

code65536 wrote:My preference would be for people to apply my patches (once I get around to updating them for the latest NP2 version) to alternate NP2 versions and create builds themselves
I have updated your patches up to the most recent stable version, but not the most recent development version. Although I use "Bookmarks Edition" as well, it is maintained as a separate patch.


If you'd like, I can package it up and send it your way for review/release; might save you some trouble of having to update the code yourself.

User avatar
code65536
Posts: 735
Joined: Wed Mar 14, 2007 2:58 pm
Location: .us
Contact:

Post by code65536 » Wed Mar 09, 2011 12:10 am

dumpydooby wrote:I have updated your patches up to the most recent stable version, but not the most recent development version. Although I use "Bookmarks Edition" as well, it is maintained as a separate patch.

If you'd like, I can package it up and send it your way for review/release; might save you some trouble of having to update the code yourself.
I appreciate the offer, but I plan to jump straight to the latest version and skip the current "stable" version (in my experience, Florian's "unstable" releases are just as stable as his "stable" ones), and I prefer to do a full review and audit of all the Scintilla and base Notepad2 code changes before updating my patches to a new version, in case there are any pitfalls to be mindful of, new features to take advantage of, etc.
My addons: CmdOpen - HashCheck - Notepad2 - MS Runtimes - DirectX

Into the breach, meatbags!

yumeyao
Moderator
Posts: 1718
Joined: Sun Aug 27, 2006 9:24 pm
Location: Taiyuan, Shanxi, PR China

Post by yumeyao » Wed Mar 09, 2011 1:16 am

Despiting registry-based hijack support (/Z) is directly supported in official notepad2, I don't see any difference that prevent applying your patch(of course some manual processing are needed).

Here is my patches for latest "stable" version which includes works of yours and dumpydooby's and alur's. Ahh, wait, from the comments I added i saw alur has made a patch to your code folding codes, but I forget what's that.
http://www.mediafire.com/?dd0hiurephwo15w


BTW, may I have a feature request? Could you make the blank parts of your "code folding column"(let's call it so) function same as selecting the whole line?
Image
My work list(Hosted by dumpydooby)

User avatar
mr_smartepants
Posts: 824
Joined: Thu May 18, 2006 5:56 am
Location: Cambridgeshire, UK

Post by mr_smartepants » Wed Mar 09, 2011 1:25 am

Here's a stupid question regarding the code folding:
When the code is folded into a "header", If I select the folded header, the subsequent lines are NOT selected. Meaning, if I wanted an easy way to delete an entire section, I would fold the code, select the section to delete and then hit the delete button. Unfold the code and only that one "header" line is deleted, not the whole section.
Am I doing something wrong, or is that by design?

Thanks code for the (pending) updates! I love NP2 with your patches.
Image
Some heroes don't wear capes, they wear Kevlar and dog-tags!

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Wed Mar 09, 2011 2:25 am

code65536 wrote:
dumpydooby wrote:I have updated your patches up to the most recent stable version, but not the most recent development version. Although I use "Bookmarks Edition" as well, it is maintained as a separate patch.

If you'd like, I can package it up and send it your way for review/release; might save you some trouble of having to update the code yourself.
I appreciate the offer, but I plan to jump straight to the latest version and skip the current "stable" version (in my experience, Florian's "unstable" releases are just as stable as his "stable" ones), and I prefer to do a full review and audit of all the Scintilla and base Notepad2 code changes before updating my patches to a new version, in case there are any pitfalls to be mindful of, new features to take advantage of, etc.
Fair enough. I also wanted to just say that it's only happenstance that my patches are good through the most recent stable release. I was keeping up with the developmental builds prior to it. I just haven't looked at the patches in a couple months but I had every intention of eventually updating them to the latest developmental build.

Can I send you some keyword updates for you to implement in your release? Notepad2 has decent HTML5 support, but it is missing virtually all of the new event attributes. It also needs to be modified to include "data-*" (where * can be anything) attributes (valid in HTML 5). Also I think scintilla didn't have support for AutoIt UDF keywords back when you made your patches (so to include them would require adding them to the list of functions, which would be a bit cumbersome), but it does now and I added all of those. And I added ActionScript to the mix based on the JavaScript lexer.

I think those are the only code highlighting modifications I made, but I'm not positive. Let me know if you're interested and I'll have a closer look and send it your way. If you're not interested, then I'll simply release my changes as a separate patch to supplement yours.

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Wed Mar 09, 2011 2:40 am

mr_smartepants wrote:Here's a stupid question regarding the code folding:
When the code is folded into a "header", If I select the folded header, the subsequent lines are NOT selected. Meaning, if I wanted an easy way to delete an entire section, I would fold the code, select the section to delete and then hit the delete button. Unfold the code and only that one "header" line is deleted, not the whole section.
Am I doing something wrong, or is that by design?

Thanks code for the (pending) updates! I love NP2 with your patches.
Select the folded line and then select the line feed to the line below (it might be easier to have a blank line after the fold so that you can simply select the folded line and the blank line). That will select the entirety of the folded code, which can be copied or deleted or whatever

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Wed Mar 09, 2011 7:10 pm

dumpydooby wrote:I spotted you out in the wild yesterday Ryan. :shock:
errr, wha?
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Wed Mar 09, 2011 9:54 pm

I saw you on MozillaZine. Pretty bizarre to see you without your crown. I could have called you a poopyhead or something and you'd have been completely helpless and unable to ban me.


But I wouldn't do that. <3

yumeyao
Moderator
Posts: 1718
Joined: Sun Aug 27, 2006 9:24 pm
Location: Taiyuan, Shanxi, PR China

Post by yumeyao » Sat Mar 12, 2011 7:19 am

code65536 wrote:
yumeyao wrote:do you have any interests on the project Madedit? It the best editor i've used ever, supporting seamless hex-edit also.
No. I'm very loyal primarily to NP2 and secondarily to Scintilla because of Scintilla's versatility, maturity, and wide support and development base.
Scintilla is great but NP2 is not that good compared to Scintilla's maturity.

I also noticed a mysterious issue today:

save this text to some file with ANSI encoding, then try opening it with NP2.

Code: Select all

cabarc n flash_addon.cab entries_Flash10.ini flash.ocx swflash.cmd swflash.in_
please remove the trailing space produced by copying.

In my case, NP2 decided it's a unicode file!

Reversely, MadEdit is the only text-editor that detects encoding very well.
Image
My work list(Hosted by dumpydooby)

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Sat Mar 12, 2011 8:07 am

dumpydooby wrote:I saw you on MozillaZine. Pretty bizarre to see you without your crown. I could have called you a poopyhead or something and you'd have been completely helpless and unable to ban me.


But I wouldn't do that. <3
Who says my retribution couldn't span forums :twisted:
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
code65536
Posts: 735
Joined: Wed Mar 14, 2007 2:58 pm
Location: .us
Contact:

Post by code65536 » Sat Mar 12, 2011 12:39 pm

yumeyao wrote:I also noticed a mysterious issue today:
Windows Notepad does the exact same same thing. This is because both NP and NP2 uses the Unicode detection heuristics built into Windows.

There are several well-known test strings that cause the heuristics to fail in Notepad, and they will fail in the same way in NP2 and other text editors that use these same heuristics.

You can always tone down these heuristics, but, with all heuristics, all that you'll be doing is trading false positives for false negatives.

(Florian's official version--at least the one that I most last modified--has additional Unicode checks that make its Unicode detection even more aggressive and there to be even more false positives like this; my builds have always pared this detection aggressiveness down so that it was at the same level of Windows Notepad.)
My addons: CmdOpen - HashCheck - Notepad2 - MS Runtimes - DirectX

Into the breach, meatbags!

yumeyao
Moderator
Posts: 1718
Joined: Sun Aug 27, 2006 9:24 pm
Location: Taiyuan, Shanxi, PR China

Post by yumeyao » Sat Mar 12, 2011 12:45 pm

Thanks for the info.

But I just tried unhijacking notepad.exe and it went ok.
I second tried using your notepad2 4.0.22, and it's still messed up.

Any idea?

BTW, this should not be the first time I noticed this issue, I may have occured same things before.
Image
My work list(Hosted by dumpydooby)

User avatar
code65536
Posts: 735
Joined: Wed Mar 14, 2007 2:58 pm
Location: .us
Contact:

Post by code65536 » Sat Mar 12, 2011 12:53 pm

With the test string that you provided, I can reliably reproduce the problem in both Notepad (WinXP) and my last Notepad2 build. I wonder if NP behaves differently for different default locales. In any case, NP2's Unicode detection is implemented entirely using Microsoft's IsTextUnicode API.
My addons: CmdOpen - HashCheck - Notepad2 - MS Runtimes - DirectX

Into the breach, meatbags!

yumeyao
Moderator
Posts: 1718
Joined: Sun Aug 27, 2006 9:24 pm
Location: Taiyuan, Shanxi, PR China

Post by yumeyao » Sat Mar 12, 2011 1:09 pm

The answer is I used win7 notepad. Just reproduced it in WinXP notepad.

So I suppose win7 notepad do some more actions in addition to calling IsTextUnicode because notepad2 fails(which is an example that directly calls IsTextUnicode)
Image
My work list(Hosted by dumpydooby)

User avatar
code65536
Posts: 735
Joined: Wed Mar 14, 2007 2:58 pm
Location: .us
Contact:

Post by code65536 » Sat Mar 12, 2011 2:27 pm

yumeyao wrote:The answer is I used win7 notepad. Just reproduced it in WinXP notepad.

So I suppose win7 notepad do some more actions in addition to calling IsTextUnicode because notepad2 fails(which is an example that directly calls IsTextUnicode)
Indeed, Notepad in Windows 7 is different. Specifically, after it calls IsTextUnicode, it checks the reasons that IsTextUnicode gave for its result. If its only reason for flagging text as little-endian UTF-16 is a statistical/heuristic analysis (i.e., there was no BOM or other cues), then it will accept that result only if the file size is at least 100 bytes. Otherwise, it will disregard the statistical analysis.

The likelihood of a false positive in the statistical analysis is higher for short, small files, so they picked an arbitrary line (100 bytes) and disregarded the heuristics for anything smaller than that. It's pretty hackish, but it does help eliminate some false positives (of course, this will result in some new false negatives, but the avoided FPs probably outnumber the new FNs). Note that this check does not apply if the text is flagged as BE UTF-16; only LE results are subject to this adjustment.

I will make this same change to my next build of Notepad2 (and to HashCheck, which also uses IsTextUnicode when processing md5/sfv/etc. files).

Code: Select all

notepad.exe Section .text (0x01001000)
0x1009931: CALL  DWORD PTR [ADVAPI32.DLL!IsTextUnicode]; (0x1001014)
0x1009937: TEST  EAX,EAX
0x1009939: JZ    0x1009949
0x100993B: CMP   DWORD PTR [EBP-0x4],0x2  ; IS_TEXT_UNICODE_STATISTICS
0x100993F: JNE   0x1009949
0x1009941: CMP   DWORD PTR [EBP+0xC],0x64 ; iSize <=> 100 bytes
0x1009945: JGE   0x1009949
0x1009947: XOR   EAX,EAX
0x1009949: LEAVE
0x100994A: RET   0x8
My addons: CmdOpen - HashCheck - Notepad2 - MS Runtimes - DirectX

Into the breach, meatbags!

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Sat Mar 12, 2011 4:06 pm

Oh how I've missed you.

yumeyao
Moderator
Posts: 1718
Joined: Sun Aug 27, 2006 9:24 pm
Location: Taiyuan, Shanxi, PR China

Post by yumeyao » Sat Mar 12, 2011 7:18 pm

That makes senses. Thanks.

I investigated into madedit's sources yesterday, finding it uses firefox's charset detecting algorithm plus some self-made check. And by simply looking into madedit's import table, there is no IsTextUnicode present.
Image
My work list(Hosted by dumpydooby)

User avatar
mooms
Posts: 792
Joined: Wed Aug 27, 2008 1:29 pm
Location: France

Post by mooms » Sun Mar 13, 2011 12:02 am

code65536 wrote: I will make this same change to my next build of Notepad2 (and to HashCheck, which also uses IsTextUnicode when processing md5/sfv/etc. files).
cool.
dumpydooby wrote:Oh how I've missed you.
indeed.

You're a brillant mind K.L , may God be with you.

Post Reply