Author Topic: First thoughts on C::B  (Read 5183 times)

TPJ

  • Guest
First thoughts on C::B
« on: August 08, 2006, 03:09:59 pm »
Hello. I'm new to C::B, but I think it might be a great tool. I found it worth attention.

What I was able to notice for the first five minutes, that I used C::B:

1) The Polish translation is incomplete. I hate it. Some messages are in Polish, some are in English.

I think it would be better to allow user to choose the desired translation. I would have used the English one.

(Ignore my complaints. I'll handle this problem with a simple script, that will set the English locale before starting C::B.)

2) C::B can highlight Python syntax. Wow, I'm impressed. It means I'll have less to do in order to make C::B meet my needs (Pyrex, Java, Shell, Oz, perhaps some ML languages in the future).

However, I have noticed, that C::B lacks the support for Python projects.

Strange. It's able to highlight Python files, but it can't handle Python projects...

BTW - what about multi-language projects? I mean C, C++, Java, Python... all in one?

3) The language of "describing" programming language syntax seems to be quite easy. It means, that I'll be able to learn it quickly and to make files for the languages I need.

4) I think, that with the plugins it is possible to extend the C::B functionality in order to make it better suited for development in different languages, than C/C++. I also think, that since C::B is written in C++, it will be faster than Eclipse (my old Celeron 800 MHz laptop isn't fast enough to do development in Eclipse).

5) It takes too much time to start the program.

Anyway, I'm going to work on C::B for a couple of days.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: First thoughts on C::B
« Reply #1 on: August 08, 2006, 03:57:06 pm »
Make sure to check out a Nightly Build if you haven't already.  See the nightly build forum.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: First thoughts on C::B
« Reply #2 on: August 08, 2006, 04:49:03 pm »
Quote
The Polish translation is incomplete. I hate it. Some messages are in Polish, some are in English.
As byo is the only core developer able to speak that particular language, we are obviously bound to get help from the community in this field (byo's time is limited).
The good thing about open source projects is that if you hate the translation, you can help making it better. Feel free to register at http://launchpad.net/products/codeblocks to work on the Polish translation.

Quote
I think it would be better to allow user to choose the desired translation. I would have used the English one.
This can be done in the settings. Internationalisation can be turned off alltogether at runtime, too, saving some CPU time.

Quote
C::B can highlight Python syntax.
However, I have noticed, that C::B lacks the support for Python projects.
Strange. It's able to highlight Python files, but it can't handle Python projects...
Yes, it is a C/C++ IDE above all else. It does support a few other languages, and it does allow you to edit a few other file formats. But it is still not a Python IDE.

Quote
what about multi-language projects? I mean C, C++, Java, Python... all in one?
Apart from the fact that we neither have Java nor Python currently implemented, this generally works.

Quote
5) It takes too much time to start the program.
Well, use Eclipse or Visual Studio then. You'll never complain again :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

mdelfede

  • Guest
Re: First thoughts on C::B
« Reply #3 on: August 08, 2006, 08:20:07 pm »
.....
Quote
5) It takes too much time to start the program.
Well, use Eclipse or Visual Studio then. You'll never complain again :)


 :mrgreen:

Offline squizzz

  • Almost regular
  • **
  • Posts: 132
Re: First thoughts on C::B
« Reply #4 on: August 09, 2006, 12:16:54 am »
(...) Celeron 800 MHz laptop (... )
5) It takes too much time to start the program.

Hi,

I use even slower machine on a daily basis here, and it was some concern for me, too. However, you may try to:

- disable plugins you don't need
- remove lexers you don't need (you may simply move them to some "unused_lexers" directory)
- remove unnecessary plugins (this will help a little bit more than just disabling them... again, no need to really delete them, just move them to some "unused" dir)
- disable splash screen + internationalization support

Hope this helps,

Jan
this space is for rent

TPJ

  • Guest
Re: First thoughts on C::B
« Reply #5 on: August 09, 2006, 04:24:34 pm »
Quote
Make sure to check out a Nightly Build if you haven't already.

Well... The first thing I read about the Nightly Builds was "The nightly builds are for the moment created only for the windows platform (...)". Since I'm in 99.99% a GNU/Linux user, I'm not interested.

For now I've been working with the SVN version of C::B. The RC2 available on sourceforge is very outdated.

Quote
The good thing about open source projects is that if you hate the translation, you can help making it better.

Perhaps I will help you with the Polish translation in the future. But the translation is not my priority. My priority is to get some IDE, that will suit my needs - even if it's in English. (Take a look at the further part of this post.)

Quote
Yes, it is a C/C++ IDE above all else. It does support a few other languages, and it does allow you to edit a few other file formats. But it is still not a Python IDE.

Well, we'll see, what it is possible to achieve with plugins, then! :)

Quote
Well, use Eclipse or Visual Studio then. You'll never complain again

:lol:

You're right. But there's also a different point of view. Try Geany - it's much faster, than C::B. :twisted:

I think, that the speed of C::B is the price of using the wxWidgets library. It's just slow.

@squizzz: Thanks for all your tips. It has helped. But the startup time is a small problem - all in all, the program is run only once a day (in my case, at least).


Now, let's get to some more constructive points. What I'd like to do with C::B:

1) Indentation

I'd like to make C::B behave like my gVim. Since it's a C/C++ IDE, I'll explain it on a C code snippets:

Code
int some_func( int some_arg )
{ // there
  return 0;
}

When the cursor is "there", and user presses the enter key, the next line will be indented - and that's OK.

But consider the following code:

Code
for ( i=0; i<MAX; ++i ) // there
  some_action( i );

When the cursor is "there", and user presses the enter key, the next line won't be indented - and, in my opinion, that's wrong. Why? Well... The simplest answer is: because I'm used to it - and I like it. But that's not all. Let's consider one more piece of C code:

Code
some_statement
another_statement;

The error is obvious: there's no ; character after the first statement. And what does C::B behave like with such a code? It does nothing. If the next line had been indented, user would have known, that something's wrong... That's why the incompleted statements should cause indentation of the following lines (in my opinion).


But the truth is that I'm not interested in developing any C/C++ code (perhaps I'll have to, but that's another story). I'm interested in developing Python, Pyrex, Bash, Java and Oz code. None of these languages is supported by C::B. Yet...

When I found C::B yesterday, I was looking for some good IDE I could use. It should have been faster, than Eclipse or Eric3. It should have been written in C++ (I can code C++, but I won't do any high-level application development in pure C - I'm not a masochist ;) ). It should have been extensible - with some scripting language (the best possibility).

I think, that C::B might be what I was looking for. I just have to change it in order to meet my needs.

The question is: how can I change the way the indentation in C::B works? (I just hope it's a programming language-independent code...)


2) Auto-completion of some code patterns.

That's my request. I have noticed, that after writing the code:

Code
int some_func( int some_arg )

I can press the Enter key, and nothing happens - the cursor just comes to the next line. In my opinion, it would have been better, if the following code had been inserted:

Code
int some_func( int some_arg ) // this has been written
{ // and this...
  _ (the cursor is here)
} // ...and this has been inserted by C::B

Don't you think?

But it is only one example of some code patterns, that could have been automatically inserted in some situations. And I'm not thinking about C/C++ development only.


I suppose, that such a changes will require modifying the source code. Well, it would be great, if all these changes were possible to implement with some plugin, written in some scripting language (Python? :D)...


Anyway, so far I have added the lexer files for Bash scripting. I wanted to check, how difficult it is - and it was really, really easy.

But I have failed to add the support for code folding by modifying the Scintilla code. I would appreciate any tips on which files should I look for. The information in Wiki is not enough for me.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: First thoughts on C::B
« Reply #6 on: August 09, 2006, 04:45:52 pm »
Code
for ( i=0; i<MAX; ++i ) // there
  some_action( i );

a) bad code : always put braces, that's good practice ;-)  even if 1 line
b) try this when you start typing type forb and press ctrl-j  (or for and press ctrl-j)

Code
some_statement
another_statement;

might be interesting, but more is needed
Code
     void my_function( int arg1,
                              int arg2)  //<------------ I want a nice steady indent here, no extra indent, or maybe I won't
and others
case MYCASE:  //<- won't end in just nothing, and what if there are comments past it

So it's a bit more complex. But as said : could be interesting.