473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Gene Theory - C core commands

I am currently doing some genetic research on the life cycle of viruses
(biological as opposed to computer based) and require some information about
the core operations of the C programming language so that I can do a little
modelling of viral replication concepts.
As far as I remember from the courses I took many years ago, the majority of
the language is written as include files that are simply extra functions
consisting of a core set of instructions. I need to find out what these core
functions / commands are. Ideally I need to limit these in number to the
fewest numbers that would still allow the language to be as useable as it is
now.
I am not entirely sure that this is making any sense whatsoever!!
My second question is how would I go about allowing a running piece of code
to modify a piece of code, and then have that code compiled and executed
automatically? If any of you have any code fragments at all, this would be
extremely well appreciated as it would mean I could concentrate on my core
business of genetic research instead of spending six months attempting to
get a single piece of code doing what I am sure is a rather simple
operation.
(I do hope that last part is not excessively cheeky!!)
Thank you all in advance for what I am sure will be invaluable advice.

please send any replies not applicable to the group to michael at
futilequest dot com
Jul 22 '05 #1
3 1347
Michael wrote:
I am currently doing some genetic research on the life cycle of viruses
(biological as opposed to computer based) and require some information about
the core operations of the C programming language so that I can do a little
modelling of viral replication concepts.
<snip/>
My second question is how would I go about allowing a running piece of code
to modify a piece of code, and then have that code compiled and executed
automatically? If any of you have any code fragments at all, this would be
extremely well appreciated as it would mean I could concentrate on my core
business of genetic research instead of spending six months attempting to
get a single piece of code doing what I am sure is a rather simple
operation.


Try asking in comp.lang.c, and google for "self-modifying code."

Jul 22 '05 #2
Michael wrote:
I am currently doing some genetic research on the life cycle of viruses
(biological as opposed to computer based) and require some information about
the core operations of the C programming language so that I can do a little
modelling of viral replication concepts.
As far as I remember from the courses I took many years ago, the majority of
the language is written as include files that are simply extra functions
consisting of a core set of instructions. I need to find out what these core
functions / commands are. Ideally I need to limit these in number to the
fewest numbers that would still allow the language to be as useable as it is
now.

no you're not quit right about that. "C" has a builtin set of
'instructions' ( key words ). you use those to implement the logic of
the program, what is "included" by the header files is a few 'time
saveing' functions ( so you don't have to reinvent the wheel each time )
and the system specific functions that communicate with the outside world.

I am not entirely sure that this is making any sense whatsoever!!
My second question is how would I go about allowing a running piece of code
to modify a piece of code, and then have that code compiled and executed
automatically? If any of you have any code fragments at all, this would be
extremely well appreciated as it would mean I could concentrate on my core
business of genetic research instead of spending six months attempting to
get a single piece of code doing what I am sure is a rather simple
operation.
(I do hope that last part is not excessively cheeky!!)
Thank you all in advance for what I am sure will be invaluable advice.

please send any replies not applicable to the group to michael at
futilequest dot com


Jul 22 '05 #3
Michael wrote:
I am currently doing some genetic research on the life cycle of viruses
(biological as opposed to computer based) and require some information
about the core operations of the C programming language so that I can do a
little modelling of viral replication concepts.
Er, okay (so why did you post to comp.lang.c++?). I've set followups to
alt.comp.lang.learn.c-c++ since my response assumes that, when you say C,
you mean C, not C++.
As far as I remember from the courses I took many years ago, the majority
of the language is written as include files that are simply extra
functions consisting of a core set of instructions.
Er, no, but I can see why you might think that. What you are trying to
describe is the standard library of handy functions; these are not written
"as" include files, though, but merely /described/ in those files (we call
them headers), to give the compiler sufficient information to do
type-checking.
I need to find out
what these core functions / commands are. Ideally I need to limit these in
number to the fewest numbers that would still allow the language to be as
useable as it is now.
The language as you remember it is defined by the document ISO/IEC 9899:1990
(which, technically speaking, is obsoleted by its successor ISO/IEC
9899:1999).
I am not entirely sure that this is making any sense whatsoever!!
Oh, I think I see what you want to do, but I think you're probably going
about it the wrong way.
My second question is how would I go about allowing a running piece of
code to modify a piece of code, and then have that code compiled and
executed automatically? If any of you have any code fragments at all, this
would be extremely well appreciated as it would mean I could concentrate
on my core business of genetic research instead of spending six months
attempting to get a single piece of code doing what I am sure is a rather
simple operation.
<grin> After reading the first sentence, my first thought was "genetic
algorithms", but I don't suppose you'd care to hear that. And as for the
second part, er, you haven't been programming very long, have you? :-)

I think you'd be better off ignoring the C language altogether (and this is
ME saying it) and, instead, writing a virtual computer - a simulator for an
*imaginary* machine of your own design, with its own registers, IP, memory,
and so on, all simulated in software. (Write it in C if it makes you feel
better! In fact, C is an excellent choice of language for this application
- as is C++, of course. Choose whichever you're most familiar with.)

Please ensure you are using a non-proportional font, or this diagram will
look a complete mess:
+----- your (real!) computer running Win32 or Linux -----+
| |
|+------- your simulator program, written in C ---------+|
|| ||
||+- virtual computer lives only insider your program -+||
||| |||
||| | | Virtual RAM, |||
||| | tiny | where your |||
||| Virtual Registers | little | programs live |||
||| Virtual Opcodes | scheduler | and breed and |||
||| Virtual Everything | | have their |||
||| | | being. |||
||| |||
||+----------------------------------------------------+||
|+------------------------------------------------------+|
+--------------------------------------------------------+

That way, you can automatically produce entire generations of "machine" code
programs (where *you* define the machine code) that can compete cheerfully
with each other in whatever address space you decide to define. Doing it
this way also makes it fairly trivial to keep stats and stuff.
(I do hope that last part is not excessively cheeky!!)


Well, genetics sounds pretty simple to those of us who are not experts in
that field (it's all just chemicals and cells and test tubes and stuff,
right?), so no programmer should be too surprised or upset to find that a
genetics guy thinks programming is simple. :-)

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or...
10
by: John Liu | last post by:
We upgraded from 7.2 to 7.4, it looks like everything working, but when I issue a query such as select * from tab (tab has about 2-3 million records), it causes core dump. I tuned some the...
3
by: John Liu | last post by:
AIX pg version 7.4 Select * from document2 core dump. Did a few more experiments with select * from document2 limit... I limit to 500000 it works, 600000 it exits but says "calloc:...
3
by: Mayra | last post by:
hi, can anyone give me some info on the caracteristics of object relational databases and their advantages as well as disdvantages! thanx in advance.
0
by: write a dot | last post by:
Dear All, I'm writing to this list since am looking for a cooperation. I'm working about the development of a mathematical theory of languages. It defines a language as a set of elements which...
62
by: robert | last post by:
I'd like to use multiple CPU cores for selected time consuming Python computations (incl. numpy/scipy) in a frictionless manner. Interprocess communication is tedious and out of question, so I...
8
by: J. D. Leach | last post by:
I am not sure whether this would be considered off topic or not, but here goes.....don't flame me too bad. Running GNU GCC 4.0.1 and GDB 6.3. Was checking my compiler and debugger output prior...
0
by: Candida Ferreira | last post by:
Dear All, There's another open source GEP library released under the GNU. Its owner is Ryan O'Neil, a graduate student from George Mason University. In his words, "PyGEP is a simple library...
17
by: ARC | last post by:
Hello again, I'm close to the end of converting a large app from access 97 to 2007. I have many users on the old system, with the db's in Access 97, and here's what I'm thinking of doing to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.