News aggregator
GHC modding Qs
Hello, Haskell is one of my favorite programming languages syntactically (and feature wise) but I've always wanted a variant/derivative of Haskell where some of the default semantics are the opposite way around such as:
- Strict by default.
- All types are unboxed types by default and record aggregation is like in C/C++, all values of these types are allocated on the stack.
- (GC) Heap allocation is more explicit via pointer types.
I'm a full-time programmer so I don't have time alone to start such a huge project from scratch. So I was thinking about making a fork of GHC and incrementally swapping some of the default semantics.
What would be the feasibility/difficulty of such changes?
submitted by snk_kid[link] [75 comments]
question about type constructors
Debugging embedded ruby interpreter
Votes for generalizing mapM &c.
SLE 2013 - Final Call for Papers
"Haskell from N00b to Real World Programmer"
accessing a type variable in instance declaration
I'm breaking into haskell with a fury and a little bit of frustration...
I'm trying to write a program to turn 13432 into the list: [10000,3000,400,30,2]
and I have the following code:
numbefier :: Int -> [Int] numbefier base 0 = [] numbefier number base= show( (highestd number) * (digitv number base)) : numbefier(newnum number) highestd number = (div number (10^(length(show number) - 1))) digitv number base = (base^(length(show number) - 1)) newnum number = (mod number (10^(length(show number) - 1 )))when I try to load the program into ghci it complains at me:
Couldn't match type `Int' with `[Char]' Expected type: [String] Actual type: [Int] In the return type of a call of `numbefier' In the second argument of `(:)', namely `(numbefier (newnum number))' In the expression: (show ((highestd number) * (digitv number base))) : (numbefier (newnum number)) Failed, modules loaded: none.any ideas?
EDIT: Y'all are so helpful. I'm going to try reading a book on haskell before I re-attempt this problem.
submitted by runnerboy[link] [22 comments]
Haskell in Production [slides]
On the history of the question of whether natural language is “illogical”
A nice essay from Barbara Partee on the origins of formal semantics of natural languages and Montague Grammar.
Not directly programming language material, the topic is likely to interest many here. I think several interesting previous discussions related to Montague can be found by searching the archives.
www.glc.us.es
Beginner question: how are list comprehensions considered functional?
For example:
ls n = [ x | x <- [1..n] ]In this list comprehension, isn't x taking different values from 1 to n? Isn't that exactly what functional programming stays away from? I'm sure my reasoning is wrong somewhere, so please let me know.
On another note, I'd be really interested to know more about Haskell theory, and why things were made the way they are. Any resources?
Edit: Thank you /r/haskell! You've been really helpful.
submitted by Alpha_Q[link] [34 comments]