Thread: Code Painter

  1. #1
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246

    Code Painter

    Code:
    //By SiavoshKC
    #include <iostream>
    using namespace std;
    int main()
    {
          int a =12;
          int b =9;
          cout<< "Hello" << a+ b << endl;
          return 0;
    
    }
    This code was painted using my Code Painter. Download it by link in my signature.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  2. #2
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    I'm not sure if I trust that download link.
    My Website

    "Circular logic is good because it is."

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    If you are going to distribute this then it should come with the code. I dont run .exe files I download unless I am pretty sure they wont do anything nasty

  4. #4
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Isn't this considered spam?

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Quote Originally Posted by Yarin View Post
    Isn't this considered spam?

    No...

  6. #6
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Well, in the mean time... just looking at the code you posted, I can't say I like the colors. Datatypes are colored the same as keywords and preprocessor directives. Libraries are colored the same as string constants. It's all a little confusing.
    Sent from my iPad®

  7. #7
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Well it's close to the color scheme Visual Studio would use by default, not that I'm defending it.

    What I don't like is the boldface, that was a mistake. If you've ever read a black & white printout of some code, you'd understand why, siavoshc. Bold can play a much more important role if you don't print in color.

  8. #8
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    I am going to upload whole source code after some clean-ups. It is in C++\CLI.
    The selected color for each item is not a problem. It is too simple to change them.
    Code:
    #include <iostream>
    Last edited by siavoshkc; 08-10-2008 at 01:44 AM.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  9. #9
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    This looked like fun so I had a go too. So far it only works with C and the tags create a lot of bloat, but it seems to work ok, which is the main thing. I put the code on webpage generated by the prog. Heres a link to my syntax highlighter.

    Cheers.

  10. #10
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Doesn't even come close to codeform by dwks

  11. #11
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273

  12. #12
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Is this an installer... inside a WinRAR self extractor... that's been run through UPX? >.<
    Furthermore, your program wants admin privileges to install >.>

    So, like, a 1.5MB executable to ship ~80KB exe?

    Some comments:
    1) Word counts are off - Try typing some whitespace in the box, you'll see.
    2) You seem to be missing a few keywords (typename, catch, default being the three I noticed.)
    3) // Comments, on the last line, are not highlighted
    4) You write to C:\Program Files\Your\Dir ... it gets redirected to C:\Users\blah\AppData\Local\.....
    Last edited by Cactus_Hugger; 08-12-2008 at 08:58 PM.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  13. #13
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Glad to see codeform has a following. (Don't forget the clipboard Perl scripts!)

    By the way: in the latest version of codeform (1.2.0), tags that are the same colour are merged together, eliminating the "bloat" that I assume mike_g was referring to. I can't remember how I did it, but I'm sure you could find out by looking at its source. (Basically, record the starting tag, allow skipping over whitespace, and check if the next tag is the same as the previous one.)
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  14. #14
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Basically, record the starting tag, allow skipping over whitespace, and check if the next tag is the same as the previous one.
    Yeah, thats the same as what I had done. It chopped a third off the size. Last night I added colouring to the brackets and all the space I had saved was lost again :/ I might see if I can shrink the tags using xml.

  15. #15
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I guess that's the price you pay for coloured brackets.

    BTW, if you're generating HTML, CSS can really reduce filesizes. Plus it makes the output more easily customizable. Of course, this doesn't work for, say, BBCode.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  2. Obfuscated Code Contest: The Results
    By Stack Overflow in forum Contests Board
    Replies: 29
    Last Post: 02-18-2005, 05:39 PM
  3. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 06:05 PM