Skip to content

Instantly share code, notes, and snippets.

View patelpreet422's full-sized avatar
๐Ÿš€
Changing the world for better

Preet Patel patelpreet422

๐Ÿš€
Changing the world for better
View GitHub Profile
@patelpreet422
patelpreet422 / rpn.cpp
Last active May 5, 2018 20:08
Reverse Polish Notation (RPN) using C++
/*
* This code was compiled using g++-7 on Ubuntu 16.04LTS platform using following command
* g++-7 -std=c++17 rpn.cpp
* ./a.out
*/
#include <iostream>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
@patelpreet422
patelpreet422 / producer_consumer.cpp
Last active April 26, 2018 11:45
Producer consumer problem implementation in C++.
//run following program by using following command
//compile: g++ -std=c++17 -pthread producer_consumer.cpp
//run: ./a.out (on linux machine)
//run: a.exe (on windows machine)
#include <iostream>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <queue>
#include <chrono>

Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started

Upon completion you will have a sane, productive Haskell environment adhering to best practices.

Basics

  • Haskell is a programming language.
  • Stack is tool for Haskell projects. (similar tools for other languages include Maven, Gradle, npm, RubyGems etc)
  • Intellij IDEA IDE is a popular IDE.

Install required libraries

sudo apt-get install libtinfo-dev libghc-zlib-dev libghc-zlib-bindings-dev