Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 509189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:59:06+00:00 2026-05-13T06:59:06+00:00

I am constantly trying to optimize my time. Writing a C code takes a

  • 0

I am constantly trying to optimize my time. Writing a C code takes a lot of time and requires much more keyboard touches than say writing a Python program.

However, in order to speed up the time required to create a C program, one can automatize many things. I’d like to write my programs using smth. like Python but with C semantics. It means, all keywords are C keywords, but syntax is optimized.

For example, this C code:

#include "dsplib.h"
#include "coeffs.h"

#define MODULENAME "dsplib"
#define NUM_SAMPLES 320

typedef float t_Vec; 
typedef struct s_Inter
{
    char *pc_Name;
    struct s_Inter *px_Next;
}t_Inter; 
typedef struct s_DspLibControl
{ 
    t_Vec f_Y; 
}t_DspLibControl;

void v_DspLibName(void)
{ 
    printf("Module: %s", MODULENAME); printf("\n");
} 

int v_DspLibInitInterControl(t_DspLibControl *px_Con)
{ 
    int y; 
    px_Con->f_Y             = 0.0; 
    for(int i=0;i<10;i++) 
    { 
        y += i * i; 
    } 
    return y;
} 

in optimized pythonized version can look like:

include dsplib, coeffs
define MODULENAME="dsplib", NUM_SAMPLES=320

typedef float t_Vec 
typedef struct s_Inter:
        char *pc_Name
        struct s_Inter *px_Next 
t_Inter 
typedef struct s_DspLibControl:
    t_Vec f_Y 
t_DspLibControl 

v_DspLibName(): 
    printf("Module: %s", MODULENAME); printf("\n") 

int v_DspLibInitInterControl(t_DspLibControl *px_Con): 
    int y 
    px_Con->f_Y             = 0.0 
    for int i=0;i<10;i++: 
        y += i * i
    return y

My question is: Do you know any VIM script, which allows to translate an original pythonized C code into a standard C code? For example, one is writing a C code but uses pythonized syntax, once she decides to translate pythonized blocks into standard C, she selects such blocks and press some key. And she doesn’t save such pythonized code of course, VIM translates it into standard C.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:59:07+00:00Added an answer on May 13, 2026 at 6:59 am

    Cython is designed to write python extensions, not full-fledged programs. The same is true for Pyrex.

    Even though it’s quite different from your example, PyPy might be what you’re looking for. It uses a Python subset (called RPython, a kind of more statical python) to generate code to different backends – including C. It won’t let you a fine-grained control over data structures as you may want, but give it a try.

    What are you asking for is really a different and somewhat easier C dialect – while it might not be a bad idea by itself, there’re already plenty of different programming languages around the world, and it would be quite an issue if everybody invented a new dialect for each app that should be written.

    If you think C is too verbose or too lowlevel for your needs, try this approach:

    • write your program in python
    • profile it and find what parts really need speed
    • isolate such parts in well-defined modules
    • rewrite such parts through Pyrex or Cython

    and you’ll probably get great readability, maintainability AND speed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 314k
  • Answers 314k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer ScanLine returns a pointer to a packed array of pixels… May 13, 2026 at 11:09 pm
  • Editorial Team
    Editorial Team added an answer module Mod def foo puts "fooing" end end class C… May 13, 2026 at 11:09 pm
  • Editorial Team
    Editorial Team added an answer This should do the trick. This will iterate through each… May 13, 2026 at 11:09 pm

Related Questions

I am working on a website frontend and found myself constantly nesting divs for
I am trying to use priority_queue, and program constantly fails with error message HEAP
I am trying to install SciPy following these instructions: http://www.scipy.org/Download And constantly getting error
I am trying to create my first site in Django and as I'm looking
I am trying to select an input where the value equals a dynamic value

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.