5 ms·
Prepare for a facepalm. It has nothing to do with Lisp or ML. Read again: > This proves, once again, what a world-class, unbeatable tool Haskell is for writi
by lispm 10y ago
Prepare for a facepalm.
It has nothing to do with Lisp or ML.
Read again:
> This proves, once again, what a world-class, unbeatable tool Haskell is for writing toy interpreters.
This somehow suggest a) that it is not quite exactly really there, where one may want to develop a non-toy interpreter/compiler/... and/or b) that a lot of examples are just toy programs which can be as well developed in any language and one has now seen zillions of those in Haskell and everyone is convinced that Haskell is good for implementing toy interpreters. and/or c) that the quality of the code stays on toy level.
In this case it is a slightly more advanced toy interpreter, but the implementation lacks any information about its architecture, there is no documentation, stuff is hardcoded, etc. It's the typical slightly autistic implementation where there is the code and a some tests...
The real challenge would be to develop a non-toy interpreter/compiler/... Is there Haskell still a world-class, unbeatable tool?
Personally I'm not a Haskell user, but I like that people are writing code in it. Though for such an application I would like to see a bit more effort on the meta-information about the code. You can see that in some (!) Lisp programs, people invest some effort to make them very expressive and readable. Just read the PAIP code/book from Peter Norvig which implements some parts of Macsyma in Common Lisp.
But there is the danger of not being able to really compete for many high-level languages. Lisp had some attempts for actual products in this domain of computer algebra: Macsyma, Reduce and Axiom were the most prominent. The were developed as real products with actual end-users. They failed in the market place against languages with C/C++-based implementations like Mathematica. Though they are still being maintained as open source / free software projects.
- pjmlp 10y agoThanks for taking the effort of writing it down. Still, I don't agree with the snarky remark of the OP, hence why I wasn't getting it, as there are several uses of Haskell in production. Besides Microsoft, Facebook and Intel there are quite a few other companies using it in production, specially in financial and insurance sector for data modelling. I am the other way, I have dabbled quite a few times with Lisp languages, mostly Emacs Lisp, Guile and Clojure. I am also a big fan of the old Lisp Machines, but having learned FP in Caml Light, my brain got hardwired to ML derived languages.
- lispm 10y agoUse in production - often in-house production - is slightly different than development of a non-toy language implementation or a non-toy application (here an interpreter for a clone of the Mathematica language). Non-toy computer-algebra applications in Lisp were/are Macsyma/Maxima/Vaxima, Reduce and Axiom. They were real products an end user could buy. There is an extensive amount of literature about Macsyma: http://ftp.math.utah.edu/pub/tex/bib/macsyma.bib http://ftp.math.utah.edu/pub/tex/bib/macsyma.bib But then one might want to survive in the market place. Btw., people even use the C64 still in 'production'. ;-) http://sploid.gizmodo.com/this-old-ass-commodore-64-is-still-being-used-to-run-an-1787196319 http://sploid.gizmodo.com/this-old-ass-commodore-64-is-still...
- pjmlp 10y agoWell, here is a non-toy language implementation used by Intel for hardware design implemented in Haskell: https://www.cs.ox.ac.uk/tom.melham/res/reflect.html https://www.cs.ox.ac.uk/tom.melham/res/reflect.html
- lispm 10y agoIs it implemented in Haskell and not in C/C++? The papers I saw didn't say anything about the implementation.
- pjmlp 10y agoI guess it was the one they use for formal verification of their CPUs. But there is also the Sigma rules engine used at Facebok as another possible example, https://code.facebook.com/posts/745068642270222/fighting-spam-with-haskell/ https://code.facebook.com/posts/745068642270222/fighting-spa...
- lispm 10y agoWell, that's a rule engine embedded into Haskell. Great, but different from a language implementation of the Mathematica language (syntax / parser, ... , interpreter). Anyway, that what I said above. Inhouse use for special purpose applications.
- dekhn 10y agoJust as a note, Norvig switched to Python for nearly all programming. Personally I think this is because nearly any language can do enough interesting things (like implementing an algebra or symbolic math library) but more importantly, far more people want to learn/use Python than lisp.
- lispm 10y ago> far more people want to learn/use Python than lisp. It's also much simpler than Lisp, without the confusing ideas of 'code as data' and 'programmable programming language'.
- dekhn 10y agois that really true? I guess I never really paid close enough attention to the details, but you can certainly represent code as python data objects.