News aggregator

GHC modding Qs

Haskell on Reddit - Thu, 05/23/2013 - 2:53am

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]
Categories: Incoming News

question about type constructors

haskell-cafe - Wed, 05/22/2013 - 11:34pm
Hi, In the program I am trying to write, I have a problem that can be reduced to the following dummy example: -------------------------- {-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE IncoherentInstances #-} class PrettyPrint a where prettify :: a -> String data Gender = Male | Female | Gender3 | Gender4 data Person :: Gender -> * where Person :: String -> Person b Child :: String -> Person a -> Person b -> Person c instance PrettyPrint (Person a) instance PrettyPrint (Person Male) where prettify (Person name) = "My name is " ++ (show name) ++ " and I am a male" prettify (Child name person1 person2) = "My name is " ++ (show name) ++ " and my parents are:" ++ (prettify person1) ++ ", " ++ (prettify person2) main = do let p1 = Person "Jim" :: Person Male let p2 = Person "Joe" :: Person Male let p3 = Child "Jack" p1 p2 print $ prettify p1 print $ prettify p2 print $ pre
Categories: Offsite Discussion

Debugging embedded ruby interpreter

haskell-cafe - Wed, 05/22/2013 - 10:36pm
Hello, I am trying to embed a ruby interpreter into my Haskell library. It didn't seem complicated, and went flawlessly until I tried using it a lot. Then I got segfaults. Here is a test program that corrupts the Array object that is being created : https://github.com/bartavelle/hruby/blob/271d99e26a5df075b1011e4b30adf6adddd1c8d2/test/roundtrip.hs Changing line 46 to this makes it work: v <- pick (listOf arbitrary :: Gen [Double]) And this version makes it fail again : v <- pick (listOf subvalue :: Gen [Value]) As you can see, the "frequencies" of "subvalue" are set so that only JSON Values representing Doubles are generated. As the toRuby and fromRuby instances for Value are just pure wrappers over the instances for Double, the non-pure code that is executed should be the same. Am I wrong here ? Given that there is almost no documentation for doing this Ruby embedding, I am unsure that I am doing it right. I looked at the Hubris code and several other sources on the Internet, but can't find what i
Categories: Offsite Discussion

Votes for generalizing mapM &c.

libraries list - Wed, 05/22/2013 - 8:01pm
Here are the current totals by my count, ignoring any 0s: +13 / -0 +1 / -11 +0 / -12 +0 / -13 - C.
Categories: Offsite Discussion

SLE 2013 - Final Call for Papers

General haskell list - Wed, 05/22/2013 - 7:52pm
======================================================================== CALL FOR PAPERS 6th International Conference on Software Language Engineering (SLE 2013) Oct 26-28, 2013, Indianapolis, IN, USA (Co-located with SPLASH 2013 and GPCE 2013) General chair: Eric Van Wyk, University of Minnesota, USA Program co-chairs: Martin Erwig, Oregon State University, USA Richard Paige, University of York, UK Keynote speaker: Don Batory, University of Austin, USA http://planet-sl.org/sle2013 ======================================================================== IMPORTANT DATES Deadline for abstracts: June 7, 2013 (Midnight UTC-8, Pacific Standard Time) Deadline for full papers: June 14, 2013 (Midnight UTC-8, Pacific Standard Time) Notification to authors: August 3, 2013 Camera-ready copies due: August 16, 2013 Conference: October 26 -28, 2013 TYPES OF SUBMISSIONS We solicit the following types of papers: - Research papers: These should report a substantial research contribution
Categories: Incoming News

"Haskell from N00b to Real World Programmer"

haskell-cafe - Wed, 05/22/2013 - 4:45pm
Hello, As hinted in the previous HCAR, this year we will organize an workshop entitled like the subject of this mail[1]. It will be organized by ROSEdu (Romanian Open Source Education) [2] and the newly founded Haskell-Romania group (no link yet, working on that). It is one workshop in a series of summer workshops organized by ROSEdu (go one level up in the wiki, some of them are in Romanian and I don't want to blindly give links to Romanian pages). The entire schedule is given on the wiki page at [1] and detailed below: Day 1 (8th of July) Introduction. History and Syntax. -- basic introduction to the language. Including < at >lambdabot usage as an example Programming with Static Typing as An Ally. -- designing with types and using GHCI for rapid prototyping and testing type of expressions. Possible to include < at >djinn Programming with State and Style. -- gentle introduction to monads in the style of "You could have invented monads" [3] Day 2 (9th of July) Packaging and Distributing Code. -- hackage, cabal,
Categories: Offsite Discussion

accessing a type variable in instance declaration

haskell-cafe - Wed, 05/22/2013 - 3:18pm
Hi all, I wonder if there is some means to get a type variable value in the body of a class instance definition. It seems it is not possible (a workaround has already been given on this list), but I would like a confirmation. For example, imagine that I have a Tensor type constructor, that takes a type-level integer (representing the Tensor order) to make a concrete type: --------- instance Show (Tensor order) where show TensorVar str = show "tensor " ++ str ++ " of order " ++ (show (c2num order)) ---------- where c2num transforms a type-level integer to an integer, through typeclasses (see http://www.haskell.org/haskellwiki/The_Monad.Reader/Issue5/Number_Param_Types) I obtain a compilation error: order is not known in the body of the instance. Putting ScopedTypeVariable as extension does not change anything (http://www.haskell.org/ghc/docs/7.0-latest/html/users_guide/other-type-extensions.html#scoped-type-variables). I have tried also using forall, withou
Categories: Offsite Discussion

I'm breaking into haskell with a fury and a little bit of frustration...

Haskell on Reddit - Wed, 05/22/2013 - 10:59am

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]
Categories: Incoming News

On the history of the question of whether natural language is “illogical”

Lambda the Ultimate - Wed, 05/22/2013 - 3:32am

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.

Categories: Offsite Discussion

www.glc.us.es

del.icio.us/haskell - Wed, 05/22/2013 - 2:25am
Categories: Offsite Blogs

Beginner question: how are list comprehensions considered functional?

Haskell on Reddit - Wed, 05/22/2013 - 2:16am

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]
Categories: Incoming News

www.glc.us.es

del.icio.us/haskell - Wed, 05/22/2013 - 1:16am
Categories: Offsite Blogs

Numeric.GSL.Integration

del.icio.us/haskell - Wed, 05/22/2013 - 12:03am
Categories: Offsite Blogs

gitit demo - Gitit

del.icio.us/haskell - Tue, 05/21/2013 - 9:03pm
Categories: Offsite Blogs

Announce: vsim the VHDL-subset simulator(unmaintained)

haskell-cafe - Tue, 05/21/2013 - 6:47pm
Hi. I'd like to announce the vsim - the simulator for (small subset of) VHDL language. Currently the project contains pretty large Java part and is not maintained. That's why I don't want to publish it on Hackage. Still, as far as I now have a permission to share the code, I would like to do it. https://github.com/grrwlf/vsim VSim is a VHDL simulator project aimed develop a methods of compiling VHDL code into a high-level language (Haskell). Currently it is able to compile simple VHDL programs, containing plain integer types, 1-dimentional arrays, records. It supports processes, procedures, functions (partly). Breakpoints and wait statements should work. Simulator compile VHDL into Haskell in several steps. Firstly, VHDL is translated into VIR-file by a translator written in Java (see tr/ folder and runtr function in ./simenv shell script). VIR file is lisp-like file, describing vhdl entities in a less complex manner. For example, it contains all the port maps expanded. Secondly, VSim tool is used to tr
Categories: Offsite Discussion

HP 2013.2 - RC3 installers for OS X

libraries list - Tue, 05/21/2013 - 5:15pm
The Mac OS X RC3 installers are up: Haskell Platform 2013.2.0.0 32bit rc3.signed.pkg<http://www.ozonehouse.com/mark/platform/Haskell%20Platform%202013.2.0.0%2032bit%20rc3.signed.pkg> Haskell Platform 2013.2.0.0 64bit rc3.signed.pkg<http://www.ozonehouse.com/mark/platform/Haskell%20Platform%202013.2.0.0%2064bit%20rc3.signed.pkg> Only difference in these from RC2 is that the missing documentation for network, random, and primitive has been restored. These will be the final, barring any catastrophic issue. — Mark 15dd8762c9800308cb7cfdd16ea1a8e74988e06a Haskell Platform 2013.2.0.0 32bit rc3.signed.pkg 89e6fb747816af69acabc5c04cee103257855614 Haskell Platform 2013.2.0.0 64bit rc3.signed.pkg _______________________________________________ Libraries mailing list Libraries< at >haskell.org http://www.haskell.org/mailman/listinfo/libraries
Categories: Offsite Discussion