Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Haskell have an equivalent to Sage?

Tags:

haskell

sage

Is there something like Sage for Haskell programmers?

like image 902
Ashley Avatar asked Sep 26 '11 13:09

Ashley


2 Answers

Unfortunately, the answer seems to be "NO".

Possibly interesting to some readers is the following:

Often, one programming language is not enough for a task. E.g. when I need to solve a problem which is remotely related to statistics, R (r-project.org) is just the best fit. But I don't want to program all code in R because, Haskell has this great type system and so many other important features.

I think the best way is a hybrid approach. I write a RESTful web service around the functionality of the R code, and with Haskell I access the web service to get or send data. (Or maybe another way to access R directly.)

Perhaps a hybrid approach with Haskell and Python+Sage makes sense.

Currently I have following three programming languages on my "stack":

  • Haskell
  • R (r-project.org)
  • Agda (or maybe Coq)

Also possibly interesting:

In R there is a little overlap in functionality with Sage. Mainly the linear algebra, plotting functionality, and further some of the libraries (e.g. GD library) are also available in R.

Agda has some support for

  1. Algebra and Polynomials
  2. Rings

Agda should work well together with Haskell and even the syntax is very similar. Coq can also be used with Haskell. See: Proving "no corruption" in Haskell

I wrote "maybe" and "perhaps" because I don't know if the information is relevant to the question.

like image 56
mrsteve Avatar answered Nov 20 '22 13:11

mrsteve


As it was said, there is none.

However there is Axiom, whose language Spad is the closest too Haskell among general purpose advanced CAS's. It has strong static typing and abstraction with categories which are similar (I would say the same) as Haskell's classes.

Previously Axiom could also use Aldor which is superior to Haskell since it features dependent types. But unfortunately Aldor is dead due to licensing problems.

Be sure to check also FriCAS, Axiom's fork.

like image 42
Yrogirg Avatar answered Nov 20 '22 14:11

Yrogirg