Syntax highlighting for PTX would be cool...


Textpad 4 does have cuda syntax highlighting (syntax download) which is great.

I wonder how “syntax highlighting” would look for PTX.

That would be cool to have as well ! ;)

Especially to make sense of code versus comments ! ;) =D


I’m working on PTX syntax highlighting (for Textpad 5) right now ! ;) =D (Making it with LOOOOUUUVVVEE =D)

It will be done soon, and then I will upload it somewhere, perhaps here, perhaps, perhaps on my own webdrive… and I will surely make a screenshot, to show how (possibily beautifull) it looks ! ;) =D (colors are personal and can be customized ! ;) =D Currently I am apperently into black backgrounds ! ;) =D)

I am very curious how it will look like ! ;) =D

So stay tuned ! ;) =D

I should be done in an hour or so ! ;) =D

I will show two screenshots at least. I will show a screenshot with textpad 5’s default coloring (white background) as to not scare too many people off ! ;) =D

And the second screenshot will have my whacky funky high contrast high fidelity high diffferences coloring probably black background ! ;) =D


This is my first attempt at PTX 2.3 Syntax Highlighting as promised here is the very first screenshot with Textpad 5 defaults:

(However since there are only 7 keyword groups in Textpad 5 and PTX has many more groups I still have to decided how to group them)
(For now this screenshot shows my first simply following of the documentation)

I was thinking about seperating “integer” and “floating point” instructions into different color groups… but I guess that’s not possible because they share the same menomics… however ptx seems to use type specifiers which indicate what type of instruction to use, so perhaps that’s already ok.

I must warn you, the colors of textpad 5 are kinda dull and pretty much all the same, none the less here it is, the very first PTX 2.3 Syntax Highlighting screenshot ! ;) =D
(Internal syntax highlighting version 2)

I will also try to use an image insertion here just for the fun of it:

Here is a high contrast version with the black background.

I am still working on improving it… there is some room easily, since one keyword group was double ;)

(When I am done I might release it ;) =D)

For now I am gonna play with the colors for a more distinctive look and then I might re-order the keygroups somewhat ! ;) :)



It took a bit longer than I thought, but gjez is PTX a big instruction set with lot’s of modifiers ! Interesting… I even learned a new trick from it ! ;) =D

Anyway here is the final screen shot.

I shall now start releasing the syntax file so other people can enjoy it, I shall also make one last “default colors” screenshot to see how that looks like (probably not as cool as my coloring !;))

People could also move around the text inside the *.syn to re-group… the *.syn files are just text files, so they easy modifieable ! ;) :)

My colors:

And now the boring textpad5 (low contrast) default colors ! ;) :)

I shall also upload the syn file to that location.

Here is the syn file !


Ok one more, last screenshot, to show the beautifully unmangled names thanks to wrapping global with extern “C” { } (thanks to seibert for tip !;) =D):

Folder (screenshots and syntax file (submitted/email to too) !):

Little update:

version 0.04 now available too (little coloring bug with b16 fixed and b32 and b64 duplicates in debug directives removed.).

See folder.

Nice to see you are having some fun and learning! Please use fewer emoticons… you are worse than me! I always limit myself to 1 emoticon/post.

On another note, I find syntax highlighting not so enjoyable and I disable it even in Visual Studio.

Looks cooool! I don’t use textpad…but some of my friends do…
but none of us look at PTX though… Should be a cool thing for PTX programmers…for sure…

btw, 20 emoticons in total…