Giter Site home page Giter Site logo

calculator--'s Introduction

About

This is a joke project. This is an 8 million line hard-coded calculator. This repo does not contain the files directly as they were too large for Git/Github to handle. As such, the .zip file contains a Java program to print 8 million lines of Python code to console. The resulting Python code is a CLI tool that takes two inputs and adds them.

Getting Started

If you wish to compile the raw version yourself (not recommended, this can literally take an hour since it prints to stdout), here are the instructions.

Prerequisites

  1. Download Java
sudo apt-get update
sudo apt-get install adoptopenjdk-11-hotspot

For Windows users, you can download it fromm here.

  1. Download Python
sudo apt-get update
sudo apt-get install python3.6

For Windows users, you can download it from here.

  1. Run the Java program to build the Python script using
javac calculator++.java
  1. Save the console output and paste it to a .py file. Then run it using
py calculator++.py

Goals

  1. Redirect output to a text file rather than to stdout. This prevents slowdown from excessive memory usage.

  2. Rewrite as high-performance, multithreaded, cache-optimized Rust code to generate this script.

  3. Compile to serializable formats for easy execution by other languages.

  4. Write an algorithm to compress the raw data to make this as portable as possible.

The goal would be to utilize high-performance techniques to generate as many lines in the shortest amount of time as possible. Given that 1 million bytes of sequential writes in main memory take around 5 microseconds, a naive/non-concurrent Rust version should then take only 2 milliseconds for 4,000,000 lines with 50 bytes of text on them. A multithreaded program will be much faster although who needs that much speed?

calculator--'s People

Contributors

rogueart avatar

Watchers

 avatar

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.