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

Pages: 1-

ENTERPRISE C

Name: Anonymous 2009-05-02 2:30

Hello /prog/riders

I love the C Programming Language, but with languages like JAVA and VISUAL BASIC.NET, I'm afraid C will never become a mainstay of the ENTERPRISE MARKETPLACE.

I've decided to write my own library that might make C more ENTERPRISE READY!!!, but I'm not sure if C has any chance.

What do you think /prog/?

Here is my proof of concept (I'm compiling without warning on the gcc):

Name: Anonymous 2009-05-02 2:31

enterc.h

// Primitive Type Definitions
#define INTEGER int
#define BOOLEAN int
#define LONG_INTEGER long int
#define LONG_LONG_INTEGER long long int
#define CHARACTER char
#define STRING char *
#define FLOATING_POINT_NUMBER float
#define DOUBLE_PRECISION_NUMBER double

// Operators
#define ARRAY_DEFINITION_BEGIN [
#define ARRAY_DEFINITION_END ]
#define ARRAY_INDEX_BEGIN [
#define ARRAY_INDEX_END ]
#define ARRAY []
#define POINTER *
#define ADDRESS_OF &
#define DEREFERENCE *
#define GETS =
#define IS_EQUAL_TO ==
#define IS_NOT_EQUAL_TO !=

// Flow Control
#define BEGIN_INSTRUCTION
#define END_INSTRUCTION ;

// Function Definitions
#define FUNCTION_BEGIN
#define FUNCTION_END
#define FUNCTION_RETURN_BEGIN
#define FUNCTION_RETURN_END
#define FUNCTION_NAME_BEGIN
#define FUNCTION_NAME_END
#define FUNCTION_PARAMETERS_BEGIN (
#define FUNCTION_PARAMETERS_END )
#define FUNCTION_BLOCK_BEGIN {
#define FUNCTION_BLOCK_END }
#define NEXT_PARAMETER ,
#define CALL
#define RETURN_FROM_FUNCTION return

// Common Functions
#define PROGRAM_ENTRY_POINT main
#define PRINTING_FUNCTION printf

// Strings
#define STRING_CONSTANT(str) #str

Name: Anonymous 2009-05-02 2:32

enterctest.c

#include <stdlib.h>
#include <stdio.h>
#include "enterc.h"

FUNCTION_BEGIN
    FUNCTION_RETURN_BEGIN
        INTEGER
    FUNCTION_RETURN_END
    FUNCTION_NAME_BEGIN
        PROGRAM_ENTRY_POINT
    FUNCTION_NAME_END
    FUNCTION_PARAMETERS_BEGIN
            INTEGER argc
        NEXT_PARAMETER
            CHARACTER POINTER argv ARRAY
    FUNCTION_PARAMETERS_END
    FUNCTION_BLOCK_BEGIN

        BEGIN_INSTRUCTION
            STRING str GETS STRING_CONSTANT(Hello world!\n)
        END_INSTRUCTION

        BEGIN_INSTRUCTION
            CALL PRINTING_FUNCTION
                FUNCTION_PARAMETERS_BEGIN
                        STRING_CONSTANT(%s)
                    NEXT_PARAMETER
                        str
                FUNCTION_PARAMETERS_END
        END_INSTRUCTION

        BEGIN_INSTRUCTION
            RETURN_FROM_FUNCTION EXIT_SUCCESS
        END_INSTRUCTION

    FUNCTION_BLOCK_END
FUNCTION_END

Name: Anonymous 2009-05-02 2:36

Oh dear.

Name: Anonymous 2009-05-02 3:27

I came a little.

Name: Anonymous 2009-05-02 3:32

I will schedule a 2 hour meeting tomorrow with the server ops to see if we can get this into production.

Name: Anonymous 2009-05-02 5:51

Nothing new here. Plenty of other languages have been "recreated" in C using macros.

Name: Anonymous 2009-05-02 12:36

>>3
I jizzed in my mouth a little.

Name: Anonymous 2009-05-02 12:56

Haskell never gets enterprise best solutions love. :(

Name: Anonymous 2009-05-02 15:59

>>9
Companies care a lot about their image and that dead dog thing just isn't going to work for them.

Name: Anonymous 2009-05-02 16:04

>>10
Many companies are also shortsighted. But I agree on the dead dog.

Name: Anonymous 2009-05-02 18:14

>>7
Can you implement Scheme in C using macros?

Name: Anonymous 2009-05-02 18:51

>>12
Yes.  "Would you want to create another Scheme-like language?" is the real question.

Name: Anonymous 2009-05-02 18:58

>>1
You know, I invented the /prog/rider meme. I derived this meme from the title of a favourite chip tune of mine, titled "hello sid-riders!"

Name: Anonymous 2009-05-02 19:07

Speaking of Haskell...
http://i31.tinypic.com/mltk5w.jpg

Name: Anonymous 2009-05-02 19:09

>>15
;_;

Name: Anonymous 2009-05-02 19:15

>>15
Is it just me, or does Haskell look sad in that picture?

Name: Anonymous 2009-05-02 19:17

>>17
That's pretty much the point of the picture. ;_;

Name: Anonymous 2009-05-02 19:27

Name: Anonymous 2009-05-02 19:28

Name: Anonymous 2009-05-02 19:29

>>19-20
Two Xarn fans?

Name: Anonymous 2009-05-02 19:32

>>17
You'd be said to if you were dead. Dead as a doornail

Name: Anonymous 2009-05-02 19:39

>>21
Better make that three. I've just begun to read his blog of EXPERT PROGRAMARY and I have subscribed to his weekly newsletter.

Name: Anonymous 2009-05-02 19:42

>>23
Me to, or should that be me four? Lol. I like how Xarn writes about everything, it's so nice.

Name: Anonymous 2009-05-02 19:51

Here is my proof of concept (I'm compiling without warning on the gcc):
(I'm compiling without warning on the gcc):
gcc):
):

Name: Anonymous 2009-05-02 20:03

>>25
What do you use as a compiler?

Name: Anonymous 2009-05-02 20:08

>>26
I think he  was referring to the sad face at the end. 

I personally use the compiler I made myself.  I made a Java interpreter in Java, and then used to that make the compiler (again in Java).

Name: Anonymous 2009-05-02 20:23

>>24
Oh! Oh! Me too!
Though I prefer Taro's blog much more.

Name: Anonymous 2009-05-02 20:38

>>28
Taro just writes about himself. Xarn writes about everything (very infrequently).

Name: Anonymous 2009-05-02 20:51

>>29
That's because Taro is a Web 2.0 Hipster

Name: Anonymous 2010-11-26 1:18

Name: Anonymous 2013-01-19 20:57

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

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