Re: [Haskell-cafe] CAL or Frege as a Haskell replacement on JVM?
Hi Karel, I'm a (the? ;-) very keen user of CAL (ex user at the moment, as work and family doesn't leave me enough time for side projects). Pro: - Very solid and high quality, practically bug-free in my experience. - Performs some useful optimisations (self tail recursion as iteration, unboxing of primitives, strictness annotations/analysis) which can give you Java-level performance in some cases. - Good (IMHO) though verbose Java interop -- you can often turn Java types into CAL types rather than needing to wrap them in another layer. Con: - Haskell 98 type system (actually I found that a bit of a pro for learning fp) - Less syntactic sugar (do notation, equational definitions, pattern matching outside case statements) - Few users. There are occasional commits to forks of CAL at https://github.com/levans/Open-Quark and Luke Evans says that work on CAL continues at Indicee, but there's little visible activity. None of these points are in comparison to Frege, which I haven't used at all. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Opportunity for Haskell porting to java at R&D labs in Bay Area, CA
On 11/11/2010, at 7:42 AM, Padma wrote: > We are looking for a entry level Haskell programmer who has experience in > porting from Haskell to java. Please contact me by Email or you can call me > at 408-207-9367. You could look at CAL/OpenQuark -- https://github.com/levans/Open-Quark -- which is essentially Haskell 98 for the JVM. There would still be a porting exercise, because CAL has less syntactic sugar and fewer libraries (and doesn't have the GHC extensions you may use), but it has good (though verbose) Java interoperability. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: "Haskell is a scripting language inspiredby Python."
On 05/11/2010, at 4:11 PM, Luke Palmer wrote: > Also they "don't > scale well", which I guess means that they don't make it inconvenient > to design badly. And they don't communicate enough information about the preconditions/postconditions of their functions to easily allow large programs to remain correct? That is, the types expected and returned.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell/JDK/tail-calls etc. (please vote on bug No. 6804517)
On 20/09/2010, at 6:36 AM, Johannes Waldmann wrote: > >> from time to time request for Haskell running on top of Java's VM pops >> on the haskell related mailing list and then usually dies off when >> someone mentions that JDK does not have proper support for tail-calls. > > would it help? For eager evaluation, certainly (I understand > that Clojure and Scala are suffering from this), but for Haskell? Via strictness analysis won't Haskell do as much work as possible eagerly to improve performance? > > J.W. > > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] CAL experience
I use CAL for various hobby projects, and despite development being quiet I find it robust. I suspect that the lack of extensions over Haskell 98 puts some people off. Tom On 10/09/2010, at 5:31 AM, Karel Gardas wrote: > Hello, > > as this is really friendly forum, I'd like to ask to perhaps solve my > wonder. From time to time I'm seeing people here recommending Scala as a > kind of replacement for non-existent Haskell on Java/JVM platform. My > wonder is: why the people here do not recommend CAL, which at least to > me, looks much more closer to Haskell than Scala is. Are there any bad > experiences with this language and OpenQuark platform? I'm asking since > I'm currently playing with it and plan to use it for java objects data > processing. > > Thanks, > Karel > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Maybe to Either -- is there a better way?
On 03/08/2010, at 10:09 PM, Ertugrul Soeylemez wrote: > Tom Davies wrote: > >> I find it convenient sometimes to convert a Maybe value to an Either >> thus (excuse the syntax, it's CAL, not Haskell): >> >> maybeToEither :: a -> Maybe b -> Either a b; >> maybeToEither errorValue = maybe (Left errorValue) (\x -> Right x); > > As a side note, this is perfectly valid Haskell code, even though it's > quite verbose. The equivalent: > > maybeToEither :: a -> Maybe b -> Either a b > maybeToEither leftValue = maybe (Left leftValue) Right I like that better, and CAL supports that, thanks. > > Honestly I find this better than the completely points-free variants > posted in the other subthread. They demonstrate overusing points-free > style. I agree -- as an inexperienced functional programmer, but not a complete beginner, I found the points free versions incomprehensible! Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Maybe to Either -- is there a better way?
I find it convenient sometimes to convert a Maybe value to an Either thus (excuse the syntax, it's CAL, not Haskell): maybeToEither :: a -> Maybe b -> Either a b; maybeToEither errorValue = maybe (Left errorValue) (\x -> Right x); but that seemingly obvious function isn't in Hoogle, AFAICT, so perhaps there's some other approach? Thanks, Tom___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] gemcutter src?
On 28/05/2010, at 12:26 PM, Jens Petersen wrote: > On 16 May 2010 05:13, Henning Thielemann > wrote: >> http://resources.businessobjects.com/labs/cal/gemcutter-techpaper.pdf > > Does anyone have the url to the source code? > (I guess businessobjects was acquired by SAP.) http://github.com/levans/Open-Quark -- this contains all the source to CAL/OpenQuark, including GemCutter Tom___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Intuitive function given type signature
On 20/05/2010, at 9:53 AM, Richard O'Keefe wrote: > > The key point is the 'that would NATURALLY have', which I take > to mean "as a result of type inference without any forcibly > imposed type signatures". In my second edition of Bird, the question just says: "Give examples of functions with the following types:" Tom___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]
On 18/04/2010, at 1:39 PM, Darrin Chandler wrote: > I recently purchased an Android phone and spent a little time looking > around to see if Haskellers were doing anything there, but no luck so > far. Has anyone here done anything with Android? Not Haskell, but FP on Android: http://www.kablambda.org/blog/2009/07/27/functional-programming-on-android/ I don't have an Android, so all I did was a 'hello world' to see if it could be done. Tom___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Are there any female Haskellers?
On 30/03/2010, at 9:01 AM, Richard O'Keefe wrote: > There is some evidence that arrows may go back 60,000 years, > which is time enough for some evolutionary effect. IIRC, Hughes defined arrows last millenium, which makes them no more than 1000 years old. I certainly find that I have no innate ability to use them. Tom___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] STM Skip list implementation
On 18/03/2010, at 9:49 AM, Matthias Görgens wrote: > Hi Peter, > > Interesting. Your skip lists do not need re-balancing, but they do > destructive updates. I wonder which factor outweighs the other in > practise. Isn't destructive update a feature in this case? i.e. these skip lists are designed for shared, mutable state. You could also have an immutable implementation, and in both cases not needing to rebalance helps -- less contention in the first instance and more sharing in the second.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Books for "advanced" Haskell
On 04/03/2010, at 8:28 PM, Curt Sampson wrote: > ... I recommend reading "The Typeclassopedia,"[1], which will > introduce you to all of the monad's friends and family. > > [1]: http://byorgey.wordpress.com/2009/03/16/monadreader-13-is-out/ I'd love to read a book-length version of the Typeclassopedia, with more examples of applications of the various type classes, and pitched at a more ignorant reader (like myself). Tom___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Lazy language on JVM/CLR
On 10/02/2010, at 2:52 AM, Tim Wawrzynczak wrote: > Oops, you're right. It's not pure. Mea cupla for not reading more closely. > I wonder how it deals with I/O, then? I don't see anything like Haskell's > monads or Clean's uniqueness typing... but at a closer look it does appear > to have an excellent Java FFI. > > On Tue, Feb 9, 2010 at 9:44 AM, Chris Eidhof wrote: > I don't think it's pure. I would definitely use a pure language on the JVM, > but IIRC Open Quark / Cal is an impure language. For example, from the > library documentation: "printLine :: String -> ()". CAL is pure as long as you don't call Java functions with side effects, or functions like printLine -- rather like avoiding unsafePerformIO in Haskell. For my experimentation I use my own IO monad implementation, but you can generally use `seq` to control when IO happens. The Java FFI is good, although arguably verbose. Tom___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Comments requested: succ Java
On 29/09/2009, at 1:59 AM, Peter Verswyvelen wrote: That's a really shame. Any idea why? On Mon, Sep 28, 2009 at 3:02 PM, John A. De Goes wrote: CAL is interesting, but unfortunately dead, and has no community. I think Haskell users would miss too many of the post 98 extensions -- overlapping instances, multi parameter type classes and many other things. I've had a lot of enjoyment using CAL for hobby projects and learning about fp, while still being able leverage the Java ecosystem I am so familiar with (I'm in the 'libraries matter' camp, although I agree with Curt on the uncertain benefits of Hibernate). I believe that it's high enough quality to use in production as part of a Java based product, but, so far, I just don't have enough free time to do anything substantial. I hope one day to use CAL to teach myself a bit more about types without getting lost in the (assumed) complexity of GHC. For instance I'd like to replace the CAL type system with HMF. Note that while it is 'dead', it isn't broken or bit-rotted -- everything still works, including the Eclipse plugin. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Comments requested: succ Java
On 28/09/2009, at 7:38 AM, Peter Verswyvelen wrote: That's not really true. Just use CAL from the Open Quark framework... It's almost Haskell 98, with some extras, and compiles to fast JVM code. http://openquark.org/Open_Quark/Welcome.html They even seem to do all kinds of advanced optimizations - like converting tail calls to loops - to get good Java performance. And they have a better record system, a graphical environment to learn it, etc. So I think CAL should be in the list, and since it's basically Haskell... Liking CAL, I suggested it be included in a comment when the original post was made, but I never made the time to write up a matching set of examples myself. Curt, your first blog post is almost compatible with CAL -- you don't need to use a record type to get named accessors, CAL doesn't support list comprehension syntax, and the isBlank implementation would be different. Obviously the Java interop capabilities of CAL are very different to Haskell (and a bit verbose, though quite extensive). Dispatch comes out more-or-less the same -- although CAL doesn't do equational style function defs or comprehensive pattern matching like Haskell. In CAL I'd write letter_grade something like (untested): letter_grade :: Num a => a -> Maybe Char; letter_grade val = find (\pair -> fst pair $ val) [(> 90, 'A'), ... )] `bind` (\p -> return $ snd p); where bind is >>= Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)
On 12/08/2009, at 9:09 PM, Peter Verswyvelen wrote: Is this really the case? Or is just hard to implement? I mean, if...then...else is always kind of lazy in it's 2nd and 3rd argument, but I think DDC handles this correctly even with the presence of side effects (not sure, but it has a little presentation about it: http://cs.anu.edu.au/people/Ben.Lippmeier/talks/poisoning-20090618.pdf) As I haven't seen it mentioned on this thread: Ben Lippmeier's PhD thesis is available: http://cs.anu.edu.au/~Ben.Lippmeier/project/thesis/thesis-lippmeier-sub.pdf ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Any comments about Clojure language?
On 10/08/2009, at 6:34 PM, Sukit Tretriluxana wrote: Hi all, I start reading about Closure language (http://clojure.org) and it seems an interesting language. I don't know much about this language especially in comparison to Haskell feature by feature. Could it perhaps be what Haskell on JVM would have been with the dressing of Lisp syntax? Any one would like to chime in your comments about the language, in comparison to Haskell? As far as I know, the closest thing to Haskell on the JVM is CAL http://openquark.org Clojure differs from Haskell in being impure (although it does provide some immutable data structures) and in not being statically typed -- the lack of static typing is the most important difference IMHO. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] STM orElse semantics
I'm not 100% clear on the behaviour of the STM function orElse. The documentation says: "Compose two alternative STM actions (GHC only). If the first action completes without retrying then it forms the result of the orElse. Otherwise, if the first action retries, then the second action is tried in its place. If both actions retry then the orElse as a whole retries." What is the definition of retrying in "If the first action completes without retrying then..." -- does it mean only explicitly retrying via the retry function, or does it include a retry caused by a write conflict at commit time of the first action? That is, if the first action could complete, but doesn't simply due to interference from another transaction, does orElse run the second action, or rerun the first? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] STAMP benchmark in Haskell?
I'm experimenting with STM (in CAL[1] rather than Haskell) and want to run the STAMP[2] benchmarks. Is there a Haskell translation available, or can anyone suggest a better/different benchmark suite for STM? Thanks, Tom [1] http://openquark.org/Open_Quark/Welcome.html [2] http://stamp.stanford.edu/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Arrow combinator names
Are there generally accepted English language names for the arrow combinators? >>> compose? &&& pair? etc... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Point and link
Andrew Coppin btinternet.com> writes: [snip] You might like to look at OpenQuark: http://labs.businessobjects.com/cal/ -- its 'GemCutter' provides a visual environment for linking together functions written in a Haskell-like language. I'm not sure if it would be flexible enough for you out of the box, but it's open source so you might be able to adapt it. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Type Synonyms
Andrew Wagner gmail.com> writes: > > If you change your type declarations to 'newtype' declarations, I > believe you would get the effect that you want, depending on what you > mean by 'equivalent'. In that case, Foo and Bar would essentially be > strings, but you could not use either of them in a place where the > other is expected, nor where a String is expected. See > http://haskell.org/haskellwiki/Newtype for more information. Hope this > helps! I wanted to avoid wrapping the string with a constructor. I suppose what I'm really asking for is for each type to implicitly define a 'type class with no methods', and to be able to create new instances of that type class which simply behave as the underlying type. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Type Synonyms
Newbie question: I was wondering the other day if type synonyms might be more useful if they were more restricted, that is, with the definitions: type Foo = String type Bar = String foo :: Foo foo = "a foo" bar :: Bar bar = "a bar" x :: Foo -> ... x f b = ...only valid for Foo Strings... both 'x foo' and 'x bar' type check correctly. Wouldn't it be useful if Foo and Bar were both equivalent to String, but Foo and Bar were not equivalent themselves? For instance, if you are using Strings as properties of something and want to associate the type of the property with its value, without wrapping the String. Would this break a transitivity property of the type system? Am I just suffering from laziness? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: (!!) operator usage
Tom Davies exemail.com.au> writes: [snip] Apologies for the complete misinformation! I don't know what I was thinking! Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: (!!) operator usage
Neil Rutland hotmail.com> writes: [snip] > type Bob = [(Int, Int)] > newLine :: Bob > newLine = [(1,4)] > > i have tried to use the follwing but it returns the error below it. > > newLine !! 0 - (so that should give it the newLine list and try and return > the 1st element of the list) > > the error reads thus > > ERROR file:.\VicotriaLine.txt:107 - Type error in final generator > *** Term : newLine !! 0 > *** Type : (Int,Int) > *** Does not match : IO a newLine is already defined -- call it 'x' instead and !! will do what you expect. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe