Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: epsilon_da on September 17, 2007, 12:22:50 am

Title: using this IDE design for an Electronic CAD
Post by: epsilon_da on September 17, 2007, 12:22:50 am
Hello. Let me present my self.
I am an electronic student from Argentina (that why i could have some english spelling errors, please correct me). I am also a programmer.

I am thinking on start a project for electronics design. Some will ask why if there are currently others tools, like gEDA, eagle, kicad, etc.

That fact is that they have serius from start design problems. I want to make everything close to perfect. If it is going to be made, then it should be made right from start. Thats why i have to do lots of research before really starting, finding similar projects, APIs, etc., how they are used, and organising the object/modules structure to better fit to any kind of problem/new features/development areas.

This software should be portable with wxWindows, capable of do circuit simulations using free tools like ngspice, should have animations support, SVG graphics and interconnections between componnents. This will be my first task.

The second task will be an easy and well made interfaz. That why i am posting here.

I do not know currently the codeblocks structure, but it is very fast, light and for programming have everything what i need. So i was thinking on use a similar IDE-like interfaz.
So to not duplicate efforts i was thinking on an IDE so well programmed that the most basic part would be just a class wxframe with menu, side panel with nothing, tabs support with nothing, configuration dialog with nothing, etc. easily expandible to add features with plugged classes on compilation time.
In that way i could use this basic class to add support to schematics and others could use it to make a full IDE for programming.
So, no double efforts will be made to accomplish a common task (the basic IDE layout).

Finally i ask, Is codeblocks designed in such similar way?
Could i include just the basic layout without support for anything and make it work like an IDEed hello world? or i have to delete the thousands of lines referents to programming?

Thanks.

Title: Re: using this IDE design for an Electronic CAD
Post by: TDragon on September 17, 2007, 03:48:09 am
You should look into SciTE (http://www.scintilla.org/SciTE.html); it would probably be much easier to adapt to your purposes.
Title: Re: using this IDE design for an Electronic CAD
Post by: epsilon_da on September 17, 2007, 04:28:47 am
Thanks, but i am finding an standardiced layout like an IDE (codeblocks) in wxWindows, not an styled text control, besides wxSTC is good enought for me.

Title: Re: using this IDE design for an Electronic CAD
Post by: Biplab on September 17, 2007, 05:52:29 am
Hello. Let me present my self.
I am an electronic student from Argentina (that why i could have some english spelling errors, please correct me). I am also a programmer.

I am thinking on start a project for electronics design. Some will ask why if there are currently others tools, like gEDA, eagle, kicad, etc.

That fact is that they have serius from start design problems. I want to make everything close to perfect. If it is going to be made, then it should be made right from start. Thats why i have to do lots of research before really starting, finding similar projects, APIs, etc., how they are used, and organising the object/modules structure to better fit to any kind of problem/new features/development areas.

This software should be portable with wxWindows, capable of do circuit simulations using free tools like ngspice, should have animations support, SVG graphics and interconnections between componnents. This will be my first task.

The second task will be an easy and well made interfaz. That why i am posting here.

I do not know currently the codeblocks structure, but it is very fast, light and for programming have everything what i need. So i was thinking on use a similar IDE-like interfaz.
So to not duplicate efforts i was thinking on an IDE so well programmed that the most basic part would be just a class wxframe with menu, side panel with nothing, tabs support with nothing, configuration dialog with nothing, etc. easily expandible to add features with plugged classes on compilation time.
In that way i could use this basic class to add support to schematics and others could use it to make a full IDE for programming.
So, no double efforts will be made to accomplish a common task (the basic IDE layout).

Finally i ask, Is codeblocks designed in such similar way?
Could i include just the basic layout without support for anything and make it work like an IDEed hello world? or i have to delete the thousands of lines referents to programming?

Thanks.

I'm not from your field. I've a bit difficulty in understanding exactly what you want and so my answer may not be the one you are looking for. :)

C::B uses a number of plugins to do different work (e.g., compiling, debugging, etc). You can definitely make C::B barebone by uninstalling all the plugins. Launch C::B by typing the following at the command line.
Quote
codeblocks --safe-mode
You'll now see C::B without any plugins. Now decide which one you don't want and just remove their code (It should be easy as it is organised into different targets).

Now refer to SDK and plug your own plugins to do the things you want. SDK reference can be downloaded from-
Quote
http://prdownload.berlios.de/codeblocks/codeblocks_sdk_doc_r4395.chm

HTH. :)
Title: Re: using this IDE design for an Electronic CAD
Post by: TDragon on September 17, 2007, 06:00:22 am
Oddly enough, I did take the time to read and understand your first post. SciTE is an IDE-like source code editor (not a "styled text control"; you're probably thinking of Scintilla) which matches what you're talking about much more closely than C::B:
Quote
So to not duplicate efforts i was thinking on an IDE so well programmed that the most basic part would be just a class wxframe with menu, side panel with nothing, tabs support with nothing, configuration dialog with nothing, etc. easily expandible to add features with plugged classes on compilation time.
In that way i could use this basic class to add support to schematics and others could use it to make a full IDE for programming.
So, no double efforts will be made to accomplish a common task (the basic IDE layout).
Title: Re: using this IDE design for an Electronic CAD
Post by: epsilon_da on September 17, 2007, 05:35:58 pm
It seems like i had an old 1.0 rc2 version.
I updated to the latest windows version but this command:
codeblocks --safe-mode
is not recogniced.


I will check for SDK and double check for Scite. But it seems in the screenshots just a TextEditor with sintaxhighlighting.


Thanks.
Title: Re: using this IDE design for an Electronic CAD
Post by: Keyla on September 17, 2007, 06:54:55 pm
Wow, I have exactly the same aim, building the greatest OSS Electronic CAD. <- no joke  :D
You are right, finding an nice GUI is tricky... I don't know if you should use an DIE like CB,Eclipse,Lazarus,... I think this will become an ugly codemix.

Other problem I/you have to solve are how to store datas DB or XML? And how about the synthetics of signals Spice vs. VHDL? There are very interesting aspects but I don't think that Im skilled enough nor that I have ever enough time to start the project realy. But if you are interested in further exchange, send me an PM.
Title: Re: using this IDE design for an Electronic CAD
Post by: Biplab on September 17, 2007, 07:11:08 pm
It seems like i had an old 1.0 rc2 version.
I updated to the latest windows version but this command:
codeblocks --safe-mode
is not recogniced.

It should work if you're using a latest nightly. ;)
Title: Re: using this IDE design for an Electronic CAD
Post by: epsilon_da on September 18, 2007, 01:16:12 am
Wow, how much was changed, codeblocks looks really nice. But i have noted some things:

Memory load on windows:
Boa Constructor (wxPython)  = 38 Mb
Codeblocks Nightly Builds = 35 Mb
Codeblocks Nightly Builds --safe-mode = 27 Mb
Codeblocks 1.0 rc2 = 18 Mb
Codeblocks 1.0 rc1 = 13 Mb

I normally use CB 1.0rc1 for C and Boa for python.
But if Boa is 38 Mb heavy being developed over python and wxPython and other libs and the new codeblocks (really really good looking) is 35 Mb. It seems like is better an much easier to program in python for large projects.

I am still testing SciTE, but i am really surprised about how quick it opens and the bunch of functionalities, i am looking right now plugins to show me more versatility. Also i am surprised about GTK, it seems like it is not more so terribly ugly on windows, and with SciTE it only is 800 kb, really nice.
I also have noted the wxscintilla.dll on the nightly builds so i am starting to think now that GTK+ will be the better choice to make the E.Schematics Control since it can be used on wxed and only gtked apps.

I will continue reading about it. Thanks.

Quote from: Keyla
Wow, I have exactly the same aim, building the greatest OSS Electronic CAD. <- no joke  Very Happy
Maybe we can talk about this project. What do you think?
I am not planning starting directly right now. Before that lots of research and a wikiweb is needed.

Quote from: Keyla
You are right, finding an nice GUI is tricky... I don't know if you should use an DIE like CB,Eclipse,Lazarus,... I think this will become an ugly codemix.
The best E.CAD that i have ever use is Proteus for windows and only for windows. So, i want to make something similar with some fixes, opensourced and multiplatform. I will not do everything, like simulation becouse it is already on development by other projects like ngSpice. I plan to just use it and optatively others.


Title: Re: using this IDE design for an Electronic CAD
Post by: Keyla on September 18, 2007, 08:31:43 pm
Well it's the same for me, I start my highschool in a month, then I have good bandwith and we could discuss it.
Well even when I collected a lot of informations I have to rearange it and to make significant design decisions (language, features, modulasation,...). I never had a bigger IT project so IMHO even if I'm interested in professional programming. My electronic knowledge isn't good. More or less I like microcontrollers :)
Title: Re: using this IDE design for an Electronic CAD
Post by: epsilon_da on September 19, 2007, 04:58:43 am
I am not perfect too.  :D

This kind of project help people to lern more, know other people and of course, make something good for everybody of it.

Quote from: myself
I am still testing SciTE, but i am really surprised about how quick it opens and the bunch of functionalities, i am looking right now plugins to show me more versatility. Also i am surprised about GTK, it seems like it is not more so terribly ugly on windows, and with SciTE it only is 800 kb, really nice.

Reading further i see that it is not in gtk on windows. SciTE uses WindowsApi on windows and gtk on linux, like wxWindows, but it only wraps what is extrictly needed.
So, GTK still being ugly on windows  :(
Also SciTE by it self is not what i was looking for in this forum at first, but Scintilla has captivated my attention, becouse one part of the project is to make the Schematic control and i was planning to do it in wxWindows, but maybe i could do it just like Scintila.

But on the other hand, wrap a wraper like wxWindows doesnt make any sense, doesnt it?
I could write a normal wxSchematics which inherits of wxWindow and make or distribute wxWindow ports to WindowsAPI or GTK. Which is mainly what Scintila does.

I dont know if exists some way to strip wxMSW or wxGTK to have only the needed classes.

Cheers
Title: Re: using this IDE design for an Electronic CAD
Post by: thomas on September 19, 2007, 11:21:17 am
Memory load on windows:
Boa Constructor (wxPython)  = 38 Mb
Codeblocks Nightly Builds = 35 Mb
Codeblocks Nightly Builds --safe-mode = 27 Mb
Codeblocks 1.0 rc2 = 18 Mb
Codeblocks 1.0 rc1 = 13 Mb
Sorry if I'm missing your point, but... apart from the fact that memory consumption in Code::Blocks may vary +/- 500% depending on what plugins you enable, what are we talking about? On my system, Windows takes up over 130 MB of memory (Explorer alone eats 47 MB).
If I open a moderately sized project in Code::Blocks with CC enabled, it may take up to 90-100 MB, and gcc uses 290-300 MB to compile certain sources.
You see, if you seriously think about development, a dozen megabytes more or less must not be a problem, you need hundreds of megabytes for anything non-trivial. Especially compilers eat RAM like candy.
If your system has less than 500 or so megabytes free in "idle mode", you should consider buying RAM. You should not have to worry about 18 versus 35 MB if you plan to do anything serious.

Quote
It seems like is better an much easier to program in python for large projects.
At the risk of starting a flame war... I don't consider Python a serious programming language, especially not for large projects. Opinions may differ of course, but that's what I think. The same goes for Java or C#, for that matter.
But don't listen to me... in the end, you have to use what you feel comfortable with, not what someone else tells you :)
Title: Re: using this IDE design for an Electronic CAD
Post by: epsilon_da on September 19, 2007, 04:10:14 pm
Are you using Vista ????

With that Memory load i will never ever touch it.

Windows XP recently installed with just drivers and unnecesary services turned off. Is about 80Mb
At this time with tons of open programs. Explorer is 16 Mb with no opened pages, firefox 56 Mb with 3 tabs (sometimes grows to 120+).

I like python, it is very much like C, but if Boa with all its functionalities is just 38 Mb and CodeBlocks is 35 this should mean something about python vs C. Which is not really a fair coparison.
Programs in python are just compressed ascii and the python interpreter (about 250 kb) plus some libs like wxWindows.
Title: Re: using this IDE design for an Electronic CAD
Post by: stahta01 on September 19, 2007, 05:29:04 pm
An interpreter and compiler are two different things, comparing the memory uses are not valid.

But, GCC is designed for many target CPUs so is not the best when it comes to producing x86 code.

Compilers tend to use as much memory as they can to speed up compiling; interpreters tend to be design for different goals than Compilers.

JIT (Just In Time) Compilers are in the middle of normal compilers and interpreters as to design goals.

Just for the record, I consider Python and Perl great for what the original design purpose was; which was to process text files and produce output based on the input text file.

Tim S
Title: Re: using this IDE design for an Electronic CAD
Post by: thomas on September 19, 2007, 06:04:13 pm
Are you using Vista ????
With that Memory load i will never ever touch it.
Hahaha, no :) Vista doesn't run with that little memory. Assume at least twice as much for Vista.

Those are figures from my XP system, instrumented display driver, 2 extra drivers for 6DOF HIDs, Tortoise, and 2-3 services beyond the bare minumum.

Quote
python, it is very much like C
One major thing that is not like C is using indent for delimiting blocks and scopes. Some people even see this as an advantage (the Python devs explicitely designed it this way), but to me it is a showstopper which prevents me from considering Python for anything "serious". Maybe I'm wrong, but I'm getting the creeps if whitespace is used as control structure :)

Another thing is the entire bytecode story. Python is bytecode ("compressed ascii" as you said). Inevitably, bytecode/interpreted is slower (on the order of 5-15 times) than native code.
Yes, the bytecode advocates tell you that this does not matter because CPUs get twice as fast every 18 months. Sun has been saying this every 2 days since they released Java in 1995. Without any doubt, they sold millions of CPUs due to Java, too. Let's be honest, wasn't this the purpose of Java in the first place? ;)
But let's face it, Java performance still sucks on 2007 CPUs. The same is true for C# and all the other bytecode languages. This isn't surprising, either. Demand grows faster than hardware. Today's programs and operating systems do a lot more (and often useless) stuff than they did 10 years ago. CPU cycles drain away, and the time when the linear computing power steadily increased is over, too. Quad core CPUs don't help if your single-threaded bytecode program is just too slow.

If I launch Eclipse on my notebook, it takes about two minutes to start. I have no flipping idea what the hell is taking so long just to bring up the IDE, but maybe it's thrashing virtual memory (the notebook has only 1 GB) or something? Code::Blocks takes 5 seconds to start on the same system (and this is already too much).
Or look at nVidia's FX Composer. Just compare version 1.8 (a really great tool) to version 2.0 (now written in C#): 31 MB / 2s startup versus 103 MB / 26s startup. Don't even ask how long it takes to load a workspace. Sorry, but I simply can't take a program for serious, if I can go to the kitchen and get a fresh cup of coffee while it loads.
Hmm... Ok, that's what it was like in 1985, and sometimes you had to switch floppy disks in between too... but hey, we're not in 1985 any more.

Quote
if Boa with all its functionalities is just 38 Mb and CodeBlocks is 35 this should mean something about python vs C
It means nothing, really. Code::Blocks rigorously over-allocates memory (in figures of 1000s). Boa/Python might do just the same thing, or it might do something else. In any case, 35 and 38 are on the same order of magnitude. If one of them took 20 MB and the other took 200 MB, then maybe you could tell something, but even then it's hard, since it's not a good measure.

Don't get me wrong, if you think that Python is the thing for your project, and you feel comfortable with it, then go for it. It's better to use something one is comfortable with than something one doesn't feel right with.
I'm just saying that it would not be my personal choice. I think Python is ok for quickly hacking together a Blender plugin, or for scanning a text file from a cron job (great for people like me who find Perl's syntax repulsive). Just for a "real" application.... I'm not so sure.
Title: Re: using this IDE design for an Electronic CAD
Post by: epsilon_da on September 19, 2007, 07:46:57 pm
Hey, i think almost exactly like you about this.

I deeply hate java. It is maybe 150 times slower. But python is the only interpreted language that show me a quicker alternative to C. Also i have not seen too much (if any) speed downs becouse python is almost completely C. What a python script does is organize how other libreries should be called conforming a program, those python lines are normally only executed when the user interacts with the interface, like when clicking a button the script just tells what other control should be updated, the hard work is made in C.

Also i will not do this project in any interpreted language.

I say that it is very much like C, becouse out of esthetical features, each line could be directly converted to a analogous C code (more complex of course) and python provides an API to make it by hand. There are some tools designed to do that (python to C conversion) but i have never run into the need to use it.



Title: Re: using this IDE design for an Electronic CAD
Post by: Keyla on September 20, 2007, 05:41:44 pm
Even if offtopic I have to defend Java a bit. It is idealy if you have to manage client/server and webapplications at the same time because they can share the same codebase. Nevertheless it is slow, of course.

So you are thinking of Java for extensions/userscripts etc. ? I think thats fine, a lot of my favourite apps use it (Inkscape, Gimp, Blender,....) and it is quite popular.
Title: Re: using this IDE design for an Electronic CAD
Post by: thomas on October 10, 2007, 05:53:07 pm
Are you using Vista ????
With that Memory load i will never ever touch it.
Hahaha, no :) Vista doesn't run with that little memory. Assume at least twice as much for Vista.
Ceniza just told me his fresh Vista install uses 650 MB of RAM just sitting there.
That's so ridiculous that I just had to update the info  8)
Title: Re: using this IDE design for an Electronic CAD
Post by: epsilon_da on October 10, 2007, 07:13:48 pm
yes, i confirm that.

My brother has recently installed it, and it is 650 Mb big in a DDR 2 system.

Completely Ridiculous. Is an insult to the consumer.

Title: Re: using this IDE design for an Electronic CAD
Post by: dmoore on October 10, 2007, 10:47:24 pm
superfetch? http://www.microsoft.com/windows/products/windowsvista/features/details/performance.mspx
Title: Re: using this IDE design for an Electronic CAD
Post by: JGM on October 11, 2007, 12:41:25 am
Is strange, since I tested vista on some systems and only consumes about 250-275mb of ram, like windows xp. It could be that superfetch that dmoore is talking about. And if vista runs in basic mode it consumes less memory.