Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Rate my scheme interpreter

Name: Anonymous 2013-08-28 10:11

Name: Anonymous 2013-08-28 11:39


#ifdef DEBUG
    cout << text;
#endif
#ifdef DEBUG
    cout << text;
#endif
#ifdef DEBUG
    cout << text;
#endif
#ifdef DEBUG
    cout << text;
#endif
#ifdef DEBUG
    cout << text;
#endif
#ifdef DEBUG
    cout << text;
#endif
#ifdef DEBUG
    cout << text;
#endif
#ifdef DEBUG
    cout << text;
#endif
#ifdef DEBUG
    cout << text;
#endif
#ifdef DEBUG
    cout << text;
#endif

Quality Sepples programmer.

Name: Anonymous 2013-08-28 12:40

int type; //it's either a string(0), list(1), int(2) or float(3)

stopped reading there.

Terrible code. Use enum to make it readable.

Name: Anonymous 2013-08-28 12:53

#ifdef DEBUG
              cout << "lambda\n";
     #endif
This is stupid. This is from latest void.h
//Error Print
#define epr(...) fprintf(stderr, __VA_ARGS__);
//Error Conditional Print
#define CONDPRINT DEBUG //set the initial condition to current DEBUG value
#define ecp(...) if(CONDPRINT)fprintf(stderr, __VA_ARGS__);

Name: Anonymous 2013-08-28 14:44

>>3
I had doubts at the commented out lines, then this sealed the deal.

Name: Anonymous 2013-08-30 16:52

I tried compiling it on ubuntu and got lots of undefined references

Name: Anonymous 2013-08-30 17:02

>>6
>lolbuntu
use a proper distro, faggot

Name: Anonymous 2013-08-30 17:24

struct something {
     std::string string;//0
     struct function fn;//1
     int i;//2
     float f;//3
     bool b;//4
     std::vector<struct something> list;//5
     struct something (*fn2)(std::vector<struct something>);//6, pointer to function
     int type;          //type 7 = error
};


Wow

Name: Anonymous 2013-08-30 23:11

horribad

Name: Anonymous 2013-08-31 4:30

// just wanna make a interpreter in C
// made it cpp just so I can use iostream

And then you go on to use <string>, <vector>, <stdexcept>, <map>.

And as >>3 pointed out, that comment was the instant deal-breaker for me to want to continue reading.

Also, how the fuck is using std::ifstream ANY better than the same operations on a FILE *?

Name: Anonymous 2013-08-31 21:01

>>10
I then decided to use those too since they're so handy
and what do you mean that comment? I need to have a way to tell the difference between types
std::ifstream I just googled how to read a file and copied and it seemed to work, so I didn't change it
do you guys have something against the standard libs?

Don't change these.
Name: Email:
Entire Thread Thread List