Giter Site home page Giter Site logo

ve280p3-haskell's Introduction

p3

This is an implementation of Project3, course VE280 (Joint Institute) in Haskell.

Anyone kindly keeping an eye on this repo should be aware that this is a heavy WIP. @tonyfloatersu and myself are working to finalize it. This repo, being our register for solving various problems in the project (explained below), will be subject to constant change for a period of time, afterwards which will be explicitly announced.

Briefly on the Project

File Project3-Description.pdf is a lengthy but detailed specification of the project.

Problem List

One could imagine according to the PDF that the program will be about modification, and will hold deep data structure. I would not go to the length to say Haskell is not good at these, yet in that case more development experience is required compared to other languages.

We're facing various problems that could, in abstract, sum into two:

  • There is no reference data type in Haskell. In practice one may establish very complex data record, such as:

    data Course = Course Category CourseNum
    data CourseGPARec = GPARec Course Credit GPA
    data Student = Student Name [CourseGPARec]
    data JIGrade = Grade Year Map StuID Student
    data JIStudents = JI [JIGrade]
    

    So on, and so forth. Assume that we have an instance students of JIStudents, and we want to modify the GPA of a certain course taken by XXX in grade xxxx with student ID xxx. Then we certainly need to go deep into some field of students, to get the GPA, and pass it to a function producing new GPA, which is same as in C++.

    Yet due to the data immutability in Haskell, what we do is to catch the new value, and rebuild the whole JIStudents data leaving other data the same as old, to change merely a GPA; though GHC does opt this for CPU's performance, developers' performance remains low because of the spaghetti code.

  • We are facing a project that is artifically minimized, but actually large in framework. In especial, error detection is reduced to limited cases.

    What is a merit in C++ does not work out samely favorable in Haskell. Haskell is a language that forces error checking, pulling you by type system and exception-expressive utility such as Maybe and Either, and pushing you by mystifying some behavior including IO and catch.

    Hence the C++ version is simple, but leaking everywhere, while Haskell version could be quite robust, but is very elaborated.

About Motivation and Development

Despite this project itself not requiring much time to finish, we encourage anyone with merest Haskell knowledge to show up and collaborate with us in future, and anyone simply intrigued to learn it together with us.

In addition, this will be a non-HC approach to help people in future VE280 understand P3, since Haskell is a self-explanatory language. We'll also try to avoid obscure code, and omit increase comments in the code.

ve280p3-haskell's People

Stargazers

Yue Yao avatar LR.X avatar Anthony Su avatar

Watchers

Anthony Su avatar Yifan Zhao 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.