I made a small change in the program to let it read from a file also... cut and pasted some real Jeff posts into a file, corrected the spelling and then let the file pass through swpalmer JeffFilter... and here is the result...
Org Jeff Post
Object headers on hotspot aren't that much bigger.
The big issue generally isnt obejct headers but reflection information. In order to give you debugger like functionality at run time (readable stack traces, dynamic resolution of methods by symbolicname, etc) we basically have to carry what would be debugging info in other systems into the runtime.
This is why obfuscators that minimize the lengths of those strings can be a win, though you give up most of the usefulness of reflection and run-time stack traces as a result.
JeffFilter output
Object headers on hotspo taren't that much bigger.
The big issue generally isnt objetc heaedrs but reflectoin infromation. In order to igve you debugger like functionality at run time (readable stack traces, ydnamic resolution of methods by symbolicname, etc) we basically have to carry what would be debugging inof in other systems into the runtime.
his is why obfuscators tah tmiinmize the lengths of htsoes trings can be a win, thoguh you give up most of the usefulness of reflectoin and run-time stack traces asa result.
Org Jeff Post
Hey Guys,
I apologize for my absence. Some big company silliness had me sitting somewhere from where I couldn't post
This is however finally fixed. I'm glad to see I'm no where near indeispensible and that you guys have carried on great without me. It really makes me feel great to know that JGO has the independant lifde of ist own that Chris and I hoped for when we strated this mess.
Now I'm going to pull a Chris and tell you that the answer to "so where are you now in Sun" is an enigmatic smile and the promise that much goodness will be revealed at JavaOne
The important thing is that I can come back. Now i need to catch up on all the reading I've missed.... (reading was too painful when I was unable to post.)
JeffFilter output
Hey Guys,
I apologzie ofr mya bsence. Some big company sillines shad me sitting somewhere from where I couldn't post
This is however finally fixed. I'm glad to see I'm no where near indeispensible and htat you guys have acrried on great without me. It really makes me feel great to know that GJO has the idnependatn life of is own that Chris and I hoped for when we started this mess.
Now I'm going to pull a Crhi san dtell you that the answer to "so where aer you now in Sun" is an enigmatic smile and the promise htat muchg oodness will be revealed at JavaOne
The important thing is that I can come back. Now i need to catch up on all the readingI 'v emissed.... (reading was too painful when I was unable t opost.)
I know these to posts by Jeff was properbly one of the most spelling correct posts by Jeff. I remember some post in the old forum that I had real trouble to read, but back then I was new on these forums and didn't know my Jefftalk as I do now :-)
So I think the JeffFilter program makes an incorrect version of Jefftalk. I have studied Jefftalk abit and has seen that the characters often shifts with more than one position more often than the shift JeffFilter does, also it seams that in Jefftalk random characters seams to be placed in words where they shouldn't be. So maybe I will try to update the JeffFilter some day

But other than that good work swpalmer, your code could be the beginning of an universal translator between english and JeffTalk

The updated code to read file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| import java.io.IOException; import java.io.InputStreamReader; import java.io.FileReader; import java.io.Reader;
public class JeffFilter { public static void main(String[] args) throws IOException { Reader reader = null; if (args.length == 0) reader = new InputStreamReader(System.in); else reader = new FileReader(args[0]); int lastchar = 0; int c; while( (c = reader.read()) != -1 ) { if( lastchar != 0 && lastchar != '\n' && c != '\n' && Math.random() > 0.97 ) { System.out.print( (char) c ); System.out.print( (char) lastchar ); lastchar = 0; } else { if( lastchar != 0 ) System.out.print( (char)lastchar ); lastchar = (char)c; } } if( lastchar != 0 ) System.out.print( (char)lastchar ); } } |