Looking for papers/resources/keywords on JIT, supercompilation etc. and their applicability on GHC/Haskell
I'm wondering about possible compile-time and runtime optimization techniques that we can apply to Haskell/GHC. I knew JITs for a long time and recently learned about supercompilation in one of the posts in this subreddit. The paper in the link showed great results but those are not applied to GHC(I think a subset of Haskell is implemented from scratch for demonstration).
I was wondering (apart from requiring huge amounts of work) what are problems with applying those techniques to Haskell. I'm looking for papers about those techniques in Haskell context, and papers of similar techniques. Can anyone point me some papers/resources/keywords about those?
Thanks.submitted by semanticistZombie
[link] [6 comments]
Instead of an OS where everything is deemed a noun (the file) even if a function or dynamic stream, perhaps go the other way where the standard atomic unit of reference is the function. Everything is a function, of course all functions can be the input of some other function.
Directories could be replaced with categories and data types removing the need for the kludged alias. File names need not be used, each file is given a UID or UUID name, the latter being perhaps a hash function, which would mean non destructive data editing. OS processes and src functions can also be named via a hash scheme, and thus referenced by hash in the actual source code (with local human readable aliases). Instead of foo() where foo can change, referencing some hash may be advantageous—any function can self regulate for consistency.
Just some naive thoughts.submitted by lstwhl
[link] [29 comments]
This morning I've finally had some time to start learning Haskell, and after only a few minutes, I've encountered a few aspects of the language that have left me baffled. FYI, I have a small amount of FP experience (light exposure to Clojure, but I make extensive use of procs/lambdas in Ruby and Python).
First, why can't we use prefix notation for built-in functions? If ++, !! and the like are functions, why is:list1 ++ list2
valid syntax while++ list1 list2
Why is it that prepending an item to a list with the cons operator is fast, but appending requires traversal of the entire list? As a corollary, why isn't there an equivalent to:"THIS IS A LIS":'T'
I understand that this isn't valid because the first argument to the cons function is an element, and the second is a list. I'm just curious as to why there is no built-in append function.
Why does list comparison return a scalar instead of a list? But more importantly, why on Earth does this expression evaluate to True?[3,4,2] > [3,4]
Supposedly, list comparison operates in lexicographical order. 3 > 3 is clearly false, as is 4 > 4. The only thing left is to compare element 3 of the first list to...what?[3,4] !! 2
isn't a valid expression, so( [3,4,2] !! 2 ) > ( [3,4] !! 2 )
shouldn't evaluate to True, unless I'm missing something here.
Are there logical explanations for these behaviors?submitted by jakeytrojan
[link] [13 comments]
The book he uses is from 2007, the lectures themselves from 2009. Are they still useful for a beginner or has Haskell changed too much?submitted by minipump
[link] [17 comments]