148 points · by boothead · 11y ago · 71 comments
Neatly, the GPU story is actually quite strong and could be integrated with this hypothetical ML and Data Science platform I'm describing quite nicely. That'd be a not small boost to its power.
And what's the difference between data science and statistics? Statisticians try to come up with new mathematics, while data scientists just try to come up with ways to apply that maths?
ML tends to be more concerned with scale and computational efficiency as the algorithms used are often (a) heavyweight and (b) less human interpretable. Success is primarily measured objectively but via proxy measures like prediction accuracy. It may require data science efforts behind the scenes in order to succeed.
Data Science tends to be more concerned with interpretation than scale or repetition. It sits somewhere between analyst, sataistician, and journalist. It's also a much more interactive workflow often involving a great deal or successive, simple models and lots of exploratory visualization. Measures of success include discovery of human-relatable inferences from data, substantiation or dismissal of human-relevant experimental hypotheses, and success in communication of those ideas.
Statistics is a field of study of some of the most important mathematical foundations of each of these roles. A statisicians skill is more generalized but also more abstract. A statistician who learns CS and journalism could easily head into either other field.
1: I'd have rated Haskell's concurrency as "best in class" thanks to its STM implementation. Other languages do have STM, but AFIAK only Haskell provides both efficiency and safety thanks to its type system. Other languages have to choose between tracking every variable (slow) and letting the programmer declare which values are going to be rewound if the transaction aborts (unsafe).
2: Your section on IDEs does not consider Leksah. I've just come back to this after a long time on Eclipse and Atom, and its now a mature IDE specialized for Haskell. You might consider bumping Haskell to "mature" based on this.
When it comes to IDEs I do think immature would also be my choice. There is a lot of movement on this front so I have hopes this may change soon. My main points are: 7.10 is out for a while but most editor integrations have/had (until recently) some major issues with it. Also Stack is bocoming quite popular, yet most editor integrations are not Stack-aware. Finally the editor integrations are not much plug-and-play. As said, this is changing rapidly with some necessary fixes to GHC/cabal made and projects like stack-ide and ghci-ng.
If you have not already logged any issues, can you please list the top few things that bugged you about Leksah here and I will make sure they get added to the issue tracker? Even if they are already there it will help us prioritise to know what your pain points were.
Thanks
On a recent thread on Reddit, the Leksah maintainer acknowledged that on some platform (I forget which), Leksah crashes in every session, and has a CPU-spinning bug.
Only on exit, so it has not been a high priority to fix.
https://github.com/leksah/leksah/issues/130
> and has a CPU-spinning bug.
This was in version 0.15.1.0, 0.15.1.1 and 0.15.1.2. It was fixed in 0.15.1.3 (released a month after 0.15.1.0).
https://github.com/leksah/leksah/issues/149
Please try Leksah! It is not perfect, but any feedback you could give would help us make it better.
A few years ago, I tried to parse HTML files for a very small thing that I wanted to do and I just couldn't find or understand whether there's actually something out there that I could use. So, instead, I ended up learning Parsec and writing my own crappy parser...
I really don't think that's what it should be like. And maybe it's just my own fault. If not, there should be thousands out there who start their Haskell journey with such a frustrating experience. There's a deep and dark abyss in which beginners fall after an initial tutorial.
I've never had a similar experience with any other language. The upside, of course, is that Haskell is the most beautiful language I know.
edit clarity - Apparently my brain is too Haskelled today for writing English
It does, in its own code, state:
-- We make some generalisations:
-- <!name is a valid tag start closed by >
-- <?name is a valid tag start closed by ?>
-- </!name> is a valid closing tag
-- </?name> is a valid closing tag
-- <a "foo"> is a valid tag attibute in ! and ?, i.e missing an attribute name
-- We also don't do lowercase conversion
-- Entities are handled without a list of known entity names
-- We don't have RCData, CData or Escape modes (only effects dat and tagOpen)
All of which mean that it doesn't actually follow what the HTML spec says! Just because it claims to support the spec doesn't mean much!Googling is the best way to go through hackage.
It is sometimes hard to grasp how it is to not know something. As a beginner, you don't just write down your Monads and Monad Transformers. You don't just read the source code of libraries on Hackage. You need a lot of guidance.
Unlike Hoogle (which only searches a few things) Hayoo searches most of Hackage.
Current state: https://wiki.haskell.org/Debugging
For comparison (F# and Ocaml):
https://msdn.microsoft.com/en-us/library/ee241127.aspx
http://oqamldebug.forge.ocamlcore.org/One frustration that I have had while dabbling in Haskell is that some libraries in Hackage assume a GNU/Linux kind of system. For example, I was reading Simon Marlow's book and while trying to compile the examples in a Windows machine, a particular library could not be installed because of the lack of 'configure' (GNU autotools? I only use Windows nowadays due to professional reasons and have not used GNU/Linux last 11 years). I hope that library authors do not make such assumptions unless it really necessary.
Is there an opportunity for a company to create an implementation of Haskell which fixes some commonly mentioned problems (e.g. stop the world GC) - like proprietary JVM vendors? Is it even technically feasible? Of course, such a hypothetical company would also need to spend a lot of time writing useful libraries.
And if you hit Cabal hell now and then, that happens to everybody so it's probably not because you're on Windows, just make a sandbox and see if it works there.
It's an example of pulling down build tools and libs (well, a lib) with msys2.
https://github.com/fpco/minghc
Myself I don't use Windows, so verify the claims. But might be worth to give it another try.
Also Stack[1] has made it lots easier to get rolling on that platform.
Uhm, no, thank you, but no. Haskell is poorly equipped for implementing compilers, because of its lack of unrestricted compile-time metaprogramming.
I'm spoiled. This is what I want from a language for implementing compilers:
1) Cheap, boilerplate-free definition for chains of slightly different ASTs and IRs. Haskell and ML are notoriously weak in this area (see the "Expression Problem" thing)
2) Boilerplate-free generation of various (potentially complex) visitors for these ASTs and IRs. For Haskell, Scrap Your Boilerplate library is the closest thing to what I want, but it is still far too clumsy.
3) I need efficient embedded Prolog and Datalog (yes, both, the latter allows some cool optimisations not possible for the former). Not feasible without compile-time metaprogramming. Both are important for simplifying compiler construction.
4) Parsing is not very important. But yet, it is necessary. The best Haskell got on offer is Parsec. Sorry, not good enough for my requirements.
And why do you call these basic requirements bizarre? For example, something like a region inference is just a few lines of Prolog vs. dozens or even hundreds of lines of code in Haskell.
And yet your "much better languages" are even more niche compared to Haskell, and no major programming language has been written in them.
So, it's basically "Haskell is poorly equipment compared to my impossible standards, as implemented by this hodge-podge of Scheme based tools that I alone ever used together for compiler implementation".
>And why do you call these basic requirements bizarre? For example, something like a region inference is just a few lines of Prolog vs. dozens or even hundreds of lines of code in Haskell.
Because no known programming language resorts to "a few lines of Prolog" to save a few tens of lines for "region inference"?
Another example is my own system [3].
[1] https://github.com/akeep/nanopass-framework http://www.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf
Have you tried QuickCheck?
> 4) Parsing is not very important. But yet, it is necessary. The best Haskell got on offer is Parsec. Sorry, not good enough for my requirements.
I've not found much better than (atto-)Parsec, to the point where I miss it in other languages.
https://hackage.haskell.org/package/trifecta
https://hackage.haskell.org/package/parsers
They are meant to be used together.
* hearing how difficult it is to learn, and
* recalling C++ & Java, not crazy about the idea of going back to having to specify types for everything.
But Haskell is enticing to me:
* bindings to C-libraries in general (been meaning to try GTK, and wanted to use SQLite for a small project)
* apps start-up quickly
* compiled (good performance)
What's the Haskell community like?
Is Haskell a practical language/ecosystem, or more academic-focused?
This is a big misconception. The type system in Haskell becomes much more of a tool than a hindrance. Although you will tend to write type signatures for all your top level functions, type inference is very good and it's not necessary most of the time.
The reason you should consider writing at least the top level signatures is that when you do the compiler will help you fill in the banks with type holes. See
* https://www.reddit.com/r/haskell/comments/19aj9t/holedriven_...
* https://wiki.haskell.org/GHC/Typed_holes
Once you learn these tricks, it can really feel like magic sometimes. :-)
In the dynamically typed languages static types are substituted with tons of trivial (stupidly trivial) tests, which is a way much more lines of code than with just simple type annotations.
I thought it was pretty straight forward coming from Erlang.
The biggest thing for me was practice thinking in recursion.
edit: Erlang and Haskell was just side hobby. I didn't do anything major with them. But I thought the languages were small enough, Haskell has such a clean looking syntax.
Oh, I think you're trying to say the threshold of being good with haskell is much higher? Cause I see that argument quite and bit.
> I thought it was pretty straight forward coming from Erlang.
> The biggest thing for me was practice thinking in recursion.
I use Clojure, generally like functional programming, and am fine using recursion.
> Haskell has such a clean looking syntax.
I have gotten fond of Clojure's Lisp-like syntax.
> Oh, I think you're trying to say the threshold of being good with haskell is much higher? Cause I see that argument quite and bit.
Not sure -- haven't spent any time with Haskell. Never tried Erlang either. Do you think it generally takes longer to become productive with Haskell than with other functional programming languages?
I want to reiterate the other comments and clarify: C++ & Java have poor type systems compared to Haskell. Haskell's not only is much safer, but it also allows for much much better inference, so you rarely ever need to add type annotations. People do typically add top-level annotations, for documentation's sake, in most cases, but they are not required.
I thought it was pretty straight forward coming from Erlang.
The biggest thing for me was practice thinking in recursion.
I think Rust does this, but looking at Rust code, there's still types specified all over the place, and it looks much more cluttered to me than dynamically typed languages I've used.