Web-based Spin formatter: take two. Your input requested.
Phil Pilgrim (PhiPi)
Posts: 23,514
Okay, this post gets a little HTML-ish and it may produce too wide a page for your browser, so please bear with me. For a couple years, I've hosted a formatter for Spin code so it could be posted on the forum and look like it's supposed to. It's available here:
····www.phipi.com/format
One problem I never completely solved was the bracket [noparse]/noparse issue for subscripts consisting of single-digit numbers and certain letters. These, as you know, have a special meaning to the forum software and result in incorrect code being displayed. For manual editing, inserting a blank after the left bracket has been the standard method for fooling the forum formatting. My solution in the formatting software, though, has been to use a special HTML sequence to code the left bracket that the formatting software won't recognize as such but which still displays as a left bracket on the screen. This works until you try to edit a post containing the special code, at which point it's interpreted as a bracket anyway, and the problem recurs. Needless to say, this can get quite annoying.
I'm trying a new solution now, which is to insert a soft hyphen after every left bracket. A soft hyphen will fool the forum software, and a post can be edited ad infinitum without it disappearing. Under normal circumstances, it will not display on the screen in your browser. Text that includes an invisible soft hyphen can be cut and pasted into the Propeller Tool with near impunity, too. However, there is a big exception to this rule: If the Spin code containing a soft hyphen is so wide that it goes off the edge of the forum window, your browser may decide to replace it with a real hyphen and continue on the next line. Code that's cut and pasted from such a display with visible soft hyphens will not compile, and the Propeller Tool will flag each occurrence of the soft hyphen as an "unrecognizable character". Obviously, one can simply delete them if there aren't too many; and, in most cases, there won't be.
So I'm running a test to see how this method works in people's browsers. Following is a bit of test code that pushes the soft hyphen to the limit. At some point, your browser may begin to insert actual hyphens. If your screen is wide enough to contain all the lines shown, try making your browser window narrower and see what happens. I'm interested in two things:
1. Does your browser display any hyphens at all?
2. When you make your browser screen narrower, at what point (if any) does it quit inserting real hyphens?
If you decide to reply, please include the name and version of your browser and which OS you're using.
Thanks,
-Phil
___________________________________
Here's the test code:
Post Edited (Phil Pilgrim (PhiPi)) : 9/25/2008 5:43:20 AM GMT
····www.phipi.com/format
One problem I never completely solved was the bracket [noparse]/noparse issue for subscripts consisting of single-digit numbers and certain letters. These, as you know, have a special meaning to the forum software and result in incorrect code being displayed. For manual editing, inserting a blank after the left bracket has been the standard method for fooling the forum formatting. My solution in the formatting software, though, has been to use a special HTML sequence to code the left bracket that the formatting software won't recognize as such but which still displays as a left bracket on the screen. This works until you try to edit a post containing the special code, at which point it's interpreted as a bracket anyway, and the problem recurs. Needless to say, this can get quite annoying.
I'm trying a new solution now, which is to insert a soft hyphen after every left bracket. A soft hyphen will fool the forum software, and a post can be edited ad infinitum without it disappearing. Under normal circumstances, it will not display on the screen in your browser. Text that includes an invisible soft hyphen can be cut and pasted into the Propeller Tool with near impunity, too. However, there is a big exception to this rule: If the Spin code containing a soft hyphen is so wide that it goes off the edge of the forum window, your browser may decide to replace it with a real hyphen and continue on the next line. Code that's cut and pasted from such a display with visible soft hyphens will not compile, and the Propeller Tool will flag each occurrence of the soft hyphen as an "unrecognizable character". Obviously, one can simply delete them if there aren't too many; and, in most cases, there won't be.
So I'm running a test to see how this method works in people's browsers. Following is a bit of test code that pushes the soft hyphen to the limit. At some point, your browser may begin to insert actual hyphens. If your screen is wide enough to contain all the lines shown, try making your browser window narrower and see what happens. I'm interested in two things:
1. Does your browser display any hyphens at all?
2. When you make your browser screen narrower, at what point (if any) does it quit inserting real hyphens?
If you decide to reply, please include the name and version of your browser and which OS you're using.
Thanks,
-Phil
___________________________________
Here's the test code:
[b]CON[/b] [b]_clkmode[/b] = [b]xtal1[/b] + [b]pll16x[/b] [b]_xinfreq[/b] = 5_000_000 [b]VAR[/b] [b]byte[/b] tester[noparse][[/noparse]*121] [b]PUB[/b] Start tester[noparse][[/noparse]*0] := 0 tester[noparse][[/noparse]*1] := 1 tester[noparse][[/noparse]*2] := 2 tester[noparse][[/noparse]*3] := 3 tester[noparse][[/noparse]*4] := 4 tester[noparse][[/noparse]*5] := 5 tester[noparse][[/noparse]*6] := 6 tester[noparse][[/noparse]*7] := 7 tester[noparse][[/noparse]*8] := 8 tester[noparse][[/noparse]*9] := 9 tester[noparse][[/noparse]*10] := 10 tester[noparse][[/noparse]*11] := 11 tester[noparse][[/noparse]*12] := 12 tester[noparse][[/noparse]*13] := 13 tester[noparse][[/noparse]*14] := 14 tester[noparse][[/noparse]*15] := 15 tester[noparse][[/noparse]*16] := 16 tester[noparse][[/noparse]*17] := 17 tester[noparse][[/noparse]*18] := 18 tester[noparse][[/noparse]*19] := 19 tester[noparse][[/noparse]*20] := 20 tester[noparse][[/noparse]*21] := 21 tester[noparse][[/noparse]*22] := 22 tester[noparse][[/noparse]*23] := 23 tester[noparse][[/noparse]*24] := 24 tester[noparse][[/noparse]*25] := 25 tester[noparse][[/noparse]*26] := 26 tester[noparse][[/noparse]*27] := 27 tester[noparse][[/noparse]*28] := 28 tester[noparse][[/noparse]*29] := 29 tester[noparse][[/noparse]*30] := 30 tester[noparse][[/noparse]*31] := 31 tester[noparse][[/noparse]*32] := 32 tester[noparse][[/noparse]*33] := 33 tester[noparse][[/noparse]*34] := 34 tester[noparse][[/noparse]*35] := 35 tester[noparse][[/noparse]*36] := 36 tester[noparse][[/noparse]*37] := 37 tester[noparse][[/noparse]*38] := 38 tester[noparse][[/noparse]*39] := 39 tester[noparse][[/noparse]*40] := 40 tester[noparse][[/noparse]*41] := 41 tester[noparse][[/noparse]*42] := 42 tester[noparse][[/noparse]*43] := 43 tester[noparse][[/noparse]*44] := 44 tester[noparse][[/noparse]*45] := 45 tester[noparse][[/noparse]*46] := 46 tester[noparse][[/noparse]*47] := 47 tester[noparse][[/noparse]*48] := 48 tester[noparse][[/noparse]*49] := 49 tester[noparse][[/noparse]*50] := 50 tester[noparse][[/noparse]*51] := 51 tester[noparse][[/noparse]*52] := 52 tester[noparse][[/noparse]*53] := 53 tester[noparse][[/noparse]*54] := 54 tester[noparse][[/noparse]*55] := 55 tester[noparse][[/noparse]*56] := 56 tester[noparse][[/noparse]*57] := 57 tester[noparse][[/noparse]*58] := 58 tester[noparse][[/noparse]*59] := 59 tester[noparse][[/noparse]*60] := 60 tester[noparse][[/noparse]*61] := 61 tester[noparse][[/noparse]*62] := 62 tester[noparse][[/noparse]*63] := 63 tester[noparse][[/noparse]*64] := 64 tester[noparse][[/noparse]*65] := 65 tester[noparse][[/noparse]*66] := 66 tester[noparse][[/noparse]*67] := 67 tester[noparse][[/noparse]*68] := 68 tester[noparse][[/noparse]*69] := 69 tester[noparse][[/noparse]*70] := 70 tester[noparse][[/noparse]*71] := 71 tester[noparse][[/noparse]*72] := 72 tester[noparse][[/noparse]*73] := 73 tester[noparse][[/noparse]*74] := 74 tester[noparse][[/noparse]*75] := 75 tester[noparse][[/noparse]*76] := 76 tester[noparse][[/noparse]*77] := 77 tester[noparse][[/noparse]*78] := 78 tester[noparse][[/noparse]*79] := 79 tester[noparse][[/noparse]*80] := 80 tester[noparse][[/noparse]*81] := 81 tester[noparse][[/noparse]*82] := 82 tester[noparse][[/noparse]*83] := 83 tester[noparse][[/noparse]*84] := 84 tester[noparse][[/noparse]*85] := 85 tester[noparse][[/noparse]*86] := 86 tester[noparse][[/noparse]*87] := 87 tester[noparse][[/noparse]*88] := 88 tester[noparse][[/noparse]*89] := 89 tester[noparse][[/noparse]*90] := 90 tester[noparse][[/noparse]*91] := 91 tester[noparse][[/noparse]*92] := 92 tester[noparse][[/noparse]*93] := 93 tester[noparse][[/noparse]*94] := 94 tester[noparse][[/noparse]*95] := 95 tester[noparse][[/noparse]*96] := 96 tester[noparse][[/noparse]*97] := 97 tester[noparse][[/noparse]*98] := 98 tester[noparse][[/noparse]*99] := 99 tester[noparse][[/noparse]*100] := 100 tester[noparse][[/noparse]*101] := 101 tester[noparse][[/noparse]*102] := 102 tester[noparse][[/noparse]*103] := 103 tester[noparse][[/noparse]*104] := 104 tester[noparse][[/noparse]*105] := 105 tester[noparse][[/noparse]*106] := 106 tester[noparse][[/noparse]*107] := 107 tester[noparse][[/noparse]*108] := 108 tester[noparse][[/noparse]*109] := 109 tester[noparse][[/noparse]*110] := 110 tester[noparse][[/noparse]*111] := 111 tester[noparse][[/noparse]*112] := 112 tester[noparse][[/noparse]*113] := 113 tester[noparse][[/noparse]*114] := 114 tester[noparse][[/noparse]*115] := 115 tester[noparse][[/noparse]*116] := 116 tester[noparse][[/noparse]*117] := 117 tester[noparse][[/noparse]*118] := 118 tester[noparse][[/noparse]*119] := 119 tester[noparse][[/noparse]*120] := 120
Post Edited (Phil Pilgrim (PhiPi)) : 9/25/2008 5:43:20 AM GMT
Comments
IE 7, XP SP3 Swedosh edition
Regards
If you decide to reply, please include the name and version of your browser and which OS you're using.
Thanks,
-Phil
___________________________________
Here's the test code:
<!-- Edit -->
Post Edited (Phil Pilgrim (PhiPi)) : 9/25/2008 5:43:20 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
XP Pro SP3 English - Firefox V 3.0.2
Worked fine for me whatever size the browser window was.
Regards,
Coley
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
XP Pro Firefox 3.0
IMHO, it would be great to edit the Parallax Reply post and New Post comment pages to include a link to this, right next to the mCode help button!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
2. No problems.
========================================================
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Aka: CosmicBob
Vista Home & IE 7.0.6.......
hyphens into the text. Pasted to WordPad they weren't visible but appeared when saved as a text
file.
I think the biggest issue is going to be getting people to use your tool. Most do not ( I don't ) and
until it's an in-built feature of the forum most I expect will not.
I've never understood why the forum cannot handle this anyway, at least in [noparse][[/noparse] code ] blocks, but I
guess that just because software I've written is capable of that it doesn't follow that professional
forum software is. Given that Search doesn't work and it cannot be redirected to what does
work, plus this square bracket issue, dotNetBB seems a pretty bad choice all-in.
Owens, try installing it to a folder named "localdata". I don't have admin privileges either, but I can load things into localdata (including firefox!)
Phil,
I guess this means this worked...
XP Pro
Firefox 3.0.2
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
@hippy - I looked on the bvsoftware forums, and there were several threads that mentioned that the search is not working (dated from 2007).· Could be that there is a un-applied patch/upgrade on the Parallax site?· It looked like (in one of the posts) that there was an issue where something needed to run under .Net framework 1.1 instead of 2.0
I could not tell if the forum software had rudimientary scripting capablity or not, and I tried to see if you could extend their "mCode"·handling of the CODE tag, but I doubt that is possible.· It would probably require modding.
Post Edited (trodoss) : 9/25/2008 3:36:53 PM GMT
To give you an idea of the restrictions on that box, imagine the machine is rootkitted by the network admins. Applications may only be run from C:\Program Files or certain network drives. Apps run from elsewhere are not allowed to start. Hell; if you point Windows Explorer at anywhere outside the allowed directories then it gets nuked
Windows Vista Ultimate 64-bit, Firefox 3.0.1
I also want to test this on Google's new browser, Chrome, but that's on a different computer!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
while alive = 1
wakeup
program(propeller)
eat(3)
sleep(7)
Using an iMac, OS X ver 10.5.4, Safari ver 3.1.2, when the window was wide enough NO hyphens appear.
If I reduced the width, then hyphens appeared down to 100; further reduction didn't change things.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko