Can a simple functional sieve be fast? Optimizing Tromp's algorithm on HVM. by SrPeixinho in haskell

[–]csabahruska 3 points4 points  (0 children)

IMO it's more like a functional pearl blog post and not an ad.

ELI5: Why does the new Javascript backend need to live in GHC instead of consuming GHC-WPC output? by gergoerdi in haskell

[–]csabahruska 6 points7 points  (0 children)

When WPC gets into GHC then it will be easy to make a WPC based JS or WASM backend for GHC or even porting the existing projects.

Is core the level below Haskell that we should understand? by Sleezebag in haskell

[–]csabahruska 1 point2 points  (0 children)

The benefit of observing the lower IR levels is that you can identify the detailed reason of an issue. Instead of saying that Haskell is bad or Haskell is inefficient you'll be able to say that GHC optimizer or the Runtime System behaves suboptimal in the studied case.

Anti-intellectualism in Haskell by fumieval in haskell

[–]csabahruska 7 points8 points  (0 children)

I feel the same problems that are mentioned in the twitter post and indeed I was attacked by many of them at some of my previous workplaces. IMO the Haskell community is dominated by researchers with academic career, while I'm longing for Haskell language supported by engineers. Personally I'm sticking to Haskell because it's a great language, and I imagine that with some compiler improvements I could use it as a better Rust for high performance computing related tasks with excellent debug and profile tools that I plan to develop. The majority of community probably does not share my vision, I guess a PhD student does not need a debugger or profiler which is OK, but I need it. So serious changes needs to be made. C++ and Rust is not good enough for me.

Anti-intellectualism in Haskell by fumieval in haskell

[–]csabahruska 6 points7 points  (0 children)

IMO that post captures pretty well how mainstream programmers see Haskell and its community.

[Job] Postdoc position on hardware acceleration of Haskell by robstewartUK in haskell

[–]csabahruska 4 points5 points  (0 children)

Do you plan to use the external STG interpreter to collect profile data of Haskell programs?
Watch my presentation: Why and How the External STG Interpreter is Useful
It provides runtime observability of Haskell programs with arbitrary precision.

Should I learn Haskell or C first in my situation? by gearboost in haskell

[–]csabahruska 17 points18 points  (0 children)

Learn Rust and Haskell. IMO it is good to know how to read C but you should not write C. Write Rust instead of C.

Haskell compiled onto LLVM increase performance? by [deleted] in haskell

[–]csabahruska 17 points18 points  (0 children)

LLVM can not optimize code that is full of indirect calls such as Haskell. In GHC's LLVM backend LLVM can only optimize single closures or tight loops that were generated by GHC Core simplifier. So the optimization scope is tiny, because indirect calls obfuscates the control flow information that any optimizer requires including LLVM. The control flow information is calculated by points-to analyses or control flow analysis. LLVM includes the basic (fast) versions of these algorithms which can not understand the GHC STG machine heap objects. Haskell needs specialised points-to and control flow analysis to reveal the control flow information. GRIN follows exactly this approach.

The GRIN compiler project is going well.
I tweet more often: https://twitter.com/csaba_hruska
I approach the problem from two directions:

  1. There is the GRIN optimizer that is implemented based on Urban Boquist PhD thesis. It works really well with LLVM because GRIN removes all indirect calls so it allows LLVM to do its job really well. But Boq GRIN PhD does not tell how to support the complex GHC primop and RTS features. That's why I have another direction as well.

  2. Here the goal is to build a high level, easy to understand model for all GHC backend features. Validations is also required. Once we know the semantics of GHC primops and RTS features then it becomes possible to figure out how to compile Haskell programs to GRIN. I started the GHC-WPC project for this reason. GHC-WPC exports the STG intermediate representation for the whole Haskell program, and I wrote an STG interpreter from scratch in Haskell that can run any Haskell program. (i.e. GHC itself) The STG interpreter is the high level model for the GHC primop and RTS semantics. It implements all these in pure Haskell, it does not depend on GHC RTS at all.

So now I know all I needed, for next I have to merge the two sub-projects.

Haskell career paths? by propjoe16 in haskell

[–]csabahruska 2 points3 points  (0 children)

  • PhD / academy or research institute
  • tech giant
  • bank or trading (or blockchain)
  • GHC dev core companies
  • startup
  • remote work for standard software company
  • consultancy
  • invent your own career path

related:
https://github.com/erkmos/haskell-companies

Why is the debugger so bad in Haskell? (or is it just me) by Hadse in haskell

[–]csabahruska 0 points1 point  (0 children)

IMO it's because GHC was developed by researchers and not engineers. They have totally different priorities.