Giter Club home page Giter Club logo

lacy's Introduction

logo

lacy - Compile/run for the lazy

(Linux only)

Want to test a few lines of C ?

Normally you'd have to :

  • create test.c
  • write headers #include <stdfoo.h> #include <stdbar.h>...
  • write entry-point int main (int argc ...) {}
  • write your code
  • save
  • finally run gcc test.c -Wall -Wbar && ./a.out

Forgot a header ? To link math (-lm) ?
Bad luck... Now you have to edit test.c...

No such hassle with lacy :

$ lacy  
int i = pow(2,8);  
printf ("%d\n", i);  
[CTRL+D]  
256

lacy can also run files.
$ lacy hello.c

If your code has no main(), lacy adds classic headers and puts your statements into main().

Usage

File :

$ lacy hello.c  
Hello!

File + arguments :

$ lacy hello.c Bob    
Hello Bob!

Pipe :

$ cat hello.c | lacy  
Hello!

Prompt :

$ lacy  
printf ("%s\n", "Hello!");  
[CTRL+D]  
Hello!

Inline :

$ lacy 'printf ("%s\n", "Hello!");'  
Hello!

Print template :

$ lacy > new_project.c (gets you a fresh all-included source)

Options

$ lacy -h (help)
$ lacy -v (version)

lacy's People

Contributors

alcover avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lacy's Issues

Permissions to run

Congrats for this great project!

What do you recommend to use it?

  • put lacy in a myscript/ directory which is in your PATH? (then I need to chmod +x lacy, is that right?)

  • or put it anywhere and do an alias in .bashrc to be able to use it from anywhere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.