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 3 1360
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."
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
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.l earn.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.pow ernet.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 less - during my own installation of Python 2.3 on Fedora Core 1
Linux for a friend of mine).
Anyway, HTH, L.
|
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 parameters, it still produce the core.
Thanks for any hints.
|
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: There is not
|
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.
|
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 can be combined or
associated (see the PS for an example).
I'd like to cooperate with a computer scientist in order to define a Php
package useful to create and to analyse a catalog of mathematical languages.
This package should be placed in the...
| |
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 thought about simply using a more Python interpreter instances (Py_NewInterpreter) with extra GIL in the same process.
I expect to be able to directly push around Python Object-Trees between the 2 (or more) interpreters by doing some careful locking.
...
|
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 to doing some coding in C when I discovered that GDB doesn't
recognize the format of core dumps when I inject a segmentation fault. Was
able to to set ulimit and get the dump OK, but when I tried to gather the
error info by typing the following...
|
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 suitable for academic study of Gene Expression
Programming in Python 2.5, aiming for ease of use and rapid implementation.
It provides standard multigenic chromosomes; a population class using
elitism and fitness scaling for selection; mutation,...
|
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 convert the older folks db's. I've changed
tables around a bit, added new tables, and deleted un-used fields, otherwise
I would do a convert. I'm going to write a routine that will do the
following:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |