Assuming you have home-brew installed

Enter the following commands

brew install libpq brew install gmp git clone https://github.com/PostgREST/postgrest.git cd postgrest sudo stack build --install-ghc --copy-bins --local-bin-path /usr/local/bin --allow-different-user

Test installation with command postgrest

`

Carry on wayward my developers

--

--

Code

#include <ncurses.h>

int main()
{
initscr();
int height, width, start_y, start_x;
height = 10;
width = 20;
start_y = start_x = 10;

WINDOW * win = newwin(height,width, start_y, start_x);
refresh();

box(win, 0, 0);
wprintw(win, "This is my box");
wrefresh(win);

int c = getch();
}

Code Breakdown

Not this Sunday.

--

--

Animations in ncurses

Youtube Video

Code

#include <ncurses.h>
#include <unistd.h>

#define DELAY 7000

int main()
{
int x = 0;
int y = 0;

int max_X = 0;
int max_Y = 0;

int next_x = 0;

int direction = 1;

initscr();
noecho();
curs_set(FALSE);

getmaxyx(stdscr, max_Y, max_X);

x = max_X / 2;
y = max_Y / 2;

while(1)
{
getmaxyx(stdscr, max_Y, max_X);
y = max_Y / 2;
clear();

mvprintw(y , x, "Animation");
refresh();

usleep(DELAY);

next_x = x + direction;

if(next_x >= max_X - 10 || next_x < 0)
{
direction*= -1;
}
else
{
x += direction;
}
}
endwin();
}

Code Breakdown

Not this Sunday.

--

--

hello world terminal application

hello_world.c

#include <ncurses.h>

int main()
{
initscr();
printw("hello, world");
refresh();
getch();
endwin();
}

Code Breakdown

#include <ncurses.h>

Starts the cursors mode

int main(){...}

Where the application runs

initscr();

Starts the application

printw("hello, world");

Prints hello world

refresh()

Prints it on the ncurses screen

getch()

Waits for user input

endwin()

Ends the session after the getch() function is done

--

--

Quin’darius Lyles-Woods

Quin’darius Lyles-Woods

CS Major at Kennesaw State, building application and taking domains