Showing posts with label ide. Show all posts
Showing posts with label ide. Show all posts

The IDEs of March

I learned and tested a new feature of `kate` today and this is better for showing my code in the way I see it in `kate`. I also decided that left quotes as they would be used in shell to specify a command implies a command when I am describing something. `kate` isn't really an IDE (Integrated Development Environment) , per se, but it serves better for me. I don't like to be lead down a the most common path when I am working on something. If I am making something, it is likely to be unique and so the help offered from most IDE's is just misdirection for me.

All of the code below was generated with a single command from `kate`, shown in the snapshot, from the File menu.

I will probably show my code examples this way in the future, as it is convenient and I don't have to pick through the code to replace < with &lt;. The code is usually saved at Google or sourceforge if it is completed. Otherwise if you must cut and paste and somebody complains, I will put a button to view and download the code , if it is a real example.


#include "solver.h" int main(int argc , char *argv[]){ FILE *f,*o;char *fd;char fdd; char cmd[128]; char fp[30]="solver.c"; char fc[30]="solver_child.c"; char fc2[30]="solver_child"; aFunction lF; fd=&fdd; seedRandom(); lF.P1=rand()%10;lF.P2=rand()%11; lF.FP=process;lF.DP=&lF; printf("Sum of A(%d) and B(%d) = %d\n",lF.P1,lF.P2,lF.FP(&lF)); if ( ( (lF.P1) + ( lF.P2 ) ) == (lF.P3) ) {printf("Apoptosis is avoided!\n");return (0);} sprintf(cmd,"gcc %s.c -o %s\n",fc2,fc2); return (1); o=fopen(fc,"rb"); if(o != NULL){fclose(o);return (-1);} f=fopen(fp,"rb");o=fopen(fc,"wb"); while(fread(fd,1,1,f)){fwrite(fd,1,1,o);} fclose(o);fclose(f);return (system("gcc rc.c -o rc")); if(argc==1 && strncmp(argv[0],fc2,2) ){return 2;} } /*NULL here tz not supported */ void seedRandom(void){ struct timeval tv; gettimeofday(&tv, NULL); srand(tv.tv_sec * tv.tv_usec);} int process(aFunction *lF){ lF->P3=(lF->P1+lF->P2); return (lF->P1+lF->P2);}

How odd, it can be copied and pasted, so there is no loss at all here. I will do this always and if it is functional code, it can be copied and pasted if anybody has an interest to play with it. And so here is solver.h


#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <stdint.h> #include <string.h> typedef struct aFunction aFunction; typedef int (*Fx)(aFunction *lF); struct aFunction{ char T; int DPT; int DPS; int P1; int P2; int P3; aFunction *DP; Fx FP; }; int process(aFunction *lF); void seedRandom(void);

Proof that I am madder than a hatter

I offer as proof that no one in their right mind would take an ASM language assembler IDE designed for Windows and fix it to work on "wine" and the rewrite it in "C" to make programs that compile in asm using GCC to produce "C" code modules that run in wine, windows or Linux. The picture links to a larger view and the original creator of the AsmEdit is HERE, It appears that 2004 was the last time it was updated from the original writers. Some links go nowhere and "page info" says it was last updated "Thu 24 May 2001 10:20:00 PM MDT". I don't distribute it and who would want it now that it is so strange and convolved that it wanders in and out of languages and operating systems like dark matter. I thought it was a strange creation to begin with as it attempted to use "C" like interface in an ASM way to interface with the OS in a very atomic way. It is a good learning tool if you like to get in behind things and when combined with other utilities can solve some sticky issues with DLLs.

It is actually a very nice solid tool and though it was intended to be a windows development program, it works just as well in Linux and it is great nostalgia for the time before the common availability of compilers that are cross platform. I did my first programming in hexadecimal with a keypad to enter the code and data into a UV ROM and sometimes OTPs. I also walked 30 miles in snow over my head to get to a one room school house, well maybe I rode the bus, but there was some snow I saw on the side of the road.

Contributors

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen