Thread: Code colouring

  1. #61
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    So there is only one way.
    I have to seperate the UI and the main program completely, make UI platform specific and main part portable.
    [EDIT]
    It is not hard to be done. In my current design they are seperated. The only thing I have to do is erasing res before the Painter class and using string instead of String^.
    Last edited by siavoshkc; 09-10-2006 at 04:27 PM.
    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. #62
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    Quote Originally Posted by siavoshkc
    I have to seperate the UI and the main program completely, make UI platform specific and main part portable.
    Welcome to .Net application design.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  3. #63
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Or you can use a portable UI library like wxWidgets.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #64
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    There is just a little problem in seperation. Program keeps keywords in managed ArrayLists. Now I thing I should use native lists. It involves changing the whole code.
    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

  5. #65
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > Program keeps keywords in managed ArrayLists.
    Something wrong with the STL ?

    > It involves changing the whole code.
    Ah - lessons well learnt then.
    As much as possible, most of the code should be as standard as possible. System dependencies should be hidden with internal interfaces to keep the standard code away from the system dependent code.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #66
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Code:
    It wont do anything bad to you. I know what is in your mind, but you will need it soon to run some programs.
    I know it won't do anything bad, but I don't like .NET and I am trying to avoid programs written with it.
    Programs, that I need are not written using .NET framework.
    Last edited by maxorator; 09-11-2006 at 06:38 AM.

  7. #67
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    but I don't like .NET
    I don't like this and that is meaningless. You will need something and you will use it, thats all.

    [EDIT]
    Something wrong with the STL?
    No, but it was a better program in a managed environment if all data were managed.
    Last edited by siavoshkc; 09-11-2006 at 02:53 PM.
    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

  8. #68
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Ah yes, the M$ way, to tempt you with lots of nice sweets which lock you into doing things their way. If your software has to be maintained over years or decades, it doesn't make sense to take a short cut which saves you 5 minutes today.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  9. #69
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by siavoshkc
    I don't like this and that is meaningless. You will need something and you will use it, thats all.
    And you felt you needed .NET to make a code colorizer?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  10. #70
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    And you felt you needed .NET to make a code colorizer?
    Yes.
    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

  11. #71
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Mario F.: Sometimes people implement things in a language that could be done easier/faster/more efficent/portable/whatever in another language to learn that language better. Consider the job market out there for programmers at the moment. Hard to find a position outside of C# and Java. Not saying that that is the reason siavoshkc did it in .NET, but that is the reason I have done things in Java.

  12. #72
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I agree, of course. However that is really not wat is happening here. As his short answer to my question so clearly shown. Siav knows perfectly well he doesn't need .NET to develop a code colorizer. He chooses to reply a laconic "yes" to run away from the question.

    .NET is not the best language to develop such a small project. It forces users to download an humungus runtime and it removed the chance of portability.

    If Siav intention in building this project is to learn the programming language than he can, and should have by now, say as much. It would avoid him the embarassement this thread already took. Nobody would then have questioned it as much as they did.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  13. #73
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Just throwing this word out there: 'Mono'

    While it will almost never be as good as the real thing, it can preform decently on other systems from what I hear.

  14. #74
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    I agree, of course. However that is really not wat is happening here. As his short answer to my question so clearly shown. Siav knows perfectly well he doesn't need .NET to develop a code colorizer. He chooses to reply a laconic "yes" to run away from the question.
    Are you sure? So lets see the DETAILED answer.

    If I didn't want to use .Net, I had to use MFC. I choosed .Net:
    -I don't know any portable UI like wxWidgets.
    -.Net is supposed to be portable, MFC wont be.
    -I know .Net enough to create a Windows form.
    -.Net programs are easy to write. So it saves development time so much.
    -Last reason is that I wanted to practice .Net.

    About the UI it was needed, about the codePainter class (that contains the functions for tagging code) it was an option. Now it seems that std C++ is needed for that class.

    NET is not the best language to develop such a small project.
    The best doesn't make any sense. .Net is good for this small project.
    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

  15. #75
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    come on now, calm down everybody, we all have the right to remain stupid.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extended ASCII Characters in an RTF Control
    By JustMax in forum C Programming
    Replies: 18
    Last Post: 04-03-2009, 08:20 PM
  2. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  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