I'd love to help newbies get the hang of Haskell without having to jump in
the deep (and smart-infested) end first. And I'd love for people to keep
writing smart code for non-newbies to enjoy.
Perhaps a practical suggestion would be some wiki pages devoted to pointing
out code with various
...@libero.itwrote:
Conal Elliott ha scritto:
I'd love to help newbies get the hang of Haskell without having to jump in
the deep (and smart-infested) end first. And I'd love for people to keep
writing smart code for non-newbies to enjoy.
Perhaps a practical suggestion would be some wiki pages
Manlio,
We live in the age of participation -- of co-education. Don't worry about
text-books. Contribute to some wiki pages blogs today that share these
smart techniques with others.
twocentsLearning/progress is mainly results when people respond to their
own incomprehension by moving into
This question makes me wonder... why is explicit recursion taught first?
[...]
Perhaps also because teachers, being older than their students, are often
mired in outdated thinking.
On Tue, Mar 24, 2009 at 3:35 PM, Jake McArthur j...@pikewerks.com wrote:
-BEGIN PGP SIGNED MESSAGE-
or via Arrow:
swap = snd fst
On Wed, Mar 25, 2009 at 9:16 AM, David Menendez d...@zednenem.com wrote:
On Wed, Mar 25, 2009 at 11:32 AM, Simon Marlow marlo...@gmail.com wrote:
Jonathan Cast wrote:
Define
swap (a, b) = (b, a)
ew, that's far too crude. I think you mean
conal: Recursion is the goto of functional programming
BTW, I certainly did not mean to take credit for this wonderful quote. I
don't know the origin. I first heard it from Erik Meijer.
- Conal
___
Haskell-Cafe mailing list
Does anyone have a working example of #include'ing Haskell code into a
bird-tracks-style .lhs file with GHC? Every way I try leads to parsing
errors. Is there documentation about how it's supposed to work?
Help much appreciated. - Conal
___
...@googlemail.com wrote:
On Thursday 03 February 2011 10:33:23, Conal Elliott wrote:
Does anyone have a working example of #include'ing Haskell code into a
bird-tracks-style .lhs file with GHC? Every way I try leads to parsing
errors. Is there documentation about how it's supposed to work
On Tue, Feb 8, 2011 at 7:04 AM, Patrick Browne patrick.bro...@dit.iewrote:
Consider the following definitions:
1. Denotational semantics can be considered as relation between syntax
and mathematical objects (the meaning of the syntax).
2. Operational semantics can be considered as set of
On Tue, Feb 8, 2011 at 9:02 PM, ke...@froglingo.com wrote:
On Tue, Feb 8, 2011 at 07:55 pm, Conal Elliott co...@conal.net wrote:
Here's my personal denotational answer to question 2: I think of a type as
denoting a collection of (mathematical) values. If an expression e has type
T
Speaking of which, for a while now I've been interested in designs of
make-like systems that have precise simple (denotational) semantics with
pleasant properties. What Peter Landin called denotative (as opposed to
functional-looking but semantically ill-defined or intractable).
Norman Ramsey
This release adds support for GHC 7.0.3, and significant improvements for
Mac OS X users.
Enticing! What are these significant improvements for Mac OS X users?
- Conal
On Fri, Apr 15, 2011 at 3:44 PM, Don Stewart don...@gmail.com wrote:
We're pleased to announce the 2011.2.0.1 release
Has anyone figured out a way to get libraries that open windows to work with
ghci? With libraries like glut I get the body of a window, but no frame, and
the process wedges. I guess the problem has to do with lack of .app bundle.
If so, perhaps a work-around might involve running ghci in an app
I still haven't found any way to do GUIs or interactive graphics in Haskell
on a Mac that isn't plagued one or more of the following serious problems:
* Incompatible with ghci, e.g., fails to make a window frame or kills the
process the second time one opens a top-level window,
* Goes through the
moving resizing isn't able to move resize this one
window. Have you noticed something similar?
- Conal
On Wed, May 18, 2011 at 12:33 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Conal Elliott wrote:
I still haven't found any way to do GUIs or interactive graphics in
Haskell
Last I heard, wx still had the problem of crashing its host the second time
one opens a window (which is typical in ghci). And last I heard, Jeremy
O'Donoghue (cc'd) was exploring solutions but had very little time to pursue
them. - Conal
On Wed, May 18, 2011 at 11:42 AM, Tom Murphy
Last I tried, there wasn't native support for OpenGL with gtk, and I need
OpenGL. Then more recently, I heard of some progress in that area, but
requiring lots of hacking to get it all compiling. Any recent news? - Conal
On Mon, May 23, 2011 at 2:33 AM, John Lato jwl...@gmail.com wrote:
, 2011 at 6:01 AM, Conal Elliott co...@conal.net wrote:
Last I tried, there wasn't native support for OpenGL with gtk, and I need
OpenGL. Then more recently, I heard of some progress in that area, but
requiring lots of hacking to get it all compiling. Any recent news? - Conal
On Mon, May 23
if this applies in your case though.
Maybe it's my NIH, but I like to start with something too simple and
add what I need rather than start with something that has more than I
need and try to get it working.
On Wed, May 25, 2011 at 11:58 AM, Conal Elliott co...@conal.net wrote:
Thanks, John. Encouraging
Is there a collection of laws associated with the Foldable class? Or for
Traversable? - Conal
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Note that data-reify will only find *some* common/equal sub-expressions,
namely the pointer-equal ones. In all of my code-generating (deep) DSLs,
it's been very important for efficiency to also pull out
equal-but-pointer-unequal expressions.
- Conal
On Thu, Aug 11, 2011 at 4:41 AM, Vo Minh
yes.
On Fri, Aug 12, 2011 at 11:02 AM, Anton Kholomiov anton.kholom...@gmail.com
wrote:
Do you mean that x and y in
x = a + 1
y = a + 1
are different from data-reify point of view?
2011/8/12 Conal Elliott co...@conal.net
Note that data-reify will only find *some* common/equal sub
I suspect this definition is what Sebastian meant by converting back and
forth to ordinary lists.
2011/8/29 Ryan Ingram ryani.s...@gmail.com
On Sun, Aug 28, 2011 at 8:24 PM, Maciej Marcin Piechotka
uzytkown...@gmail.com wrote:
f `fmap` FList g = _|_
f `fmap` FList g = map id
f `fmap`
I wrote that post to point out the fuzziness that fuels many discussion
threads like this one. See also
http://conal.net/blog/posts/notions-of-purity-in-haskell/ and the comments.
I almost never find value in discussion about whether language X is
functional, pure, or even referentially
On Fri, Dec 30, 2011 at 12:52 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Conal Elliott wrote:
I wrote that post to point out the fuzziness that fuels many
discussion threads like this one. See also http://conal.net/blog/posts/**
notions-of-purity-in-haskell/http://conal.net/blog
On Fri, Dec 30, 2011 at 8:12 AM, Conal Elliott co...@conal.net wrote:
On Fri, Dec 30, 2011 at 12:52 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Conal Elliott wrote:
I wrote that post to point out the fuzziness that fuels many
discussion threads like this one. See also http
On Fri, Dec 30, 2011 at 9:11 AM, Chris Smith cdsm...@gmail.com wrote:
time t: f 42 (computational process implementing func application
begins…)
t+1: keystroke = 1
t+2: 43 (… and ends)
time t+3: f 42
t+4: keystroke = 2
t+5: 44
Conclusion: f 42 != f 42
That
On Fri, Dec 30, 2011 at 9:20 AM, Colin Adams colinpaulad...@gmail.comwrote:
On 30 December 2011 17:17, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:04 AM, Colin Adams wrote:
On 30 December 2011 16:59, Gregg Reynolds d...@mobileink.com wrote:
On Fri, Dec 30, 2011 at
On Fri, Dec 30, 2011 at 9:19 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Conal Elliott wrote:
Heinrich Apfelmus wrote:
The function
f :: Int - IO Int
f x = getAnIntFromTheUser = \i - return (i+x)
is pure according to the common definition of pure in the context
On Fri, Dec 30, 2011 at 9:30 AM, Colin Adams colinpaulad...@gmail.comwrote:
On 30 December 2011 17:27, Conal Elliott co...@conal.net wrote:
On Fri, Dec 30, 2011 at 9:20 AM, Colin Adams
colinpaulad...@gmail.comwrote:
proof: f is a function, and it is taking the same argument each time
On Fri, Dec 30, 2011 at 9:43 AM, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:20 AM, Colin Adams wrote:
On 30 December 2011 17:17, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:04 AM, Colin Adams wrote:
On 30 December 2011 16:59, Gregg Reynolds
On Fri, Dec 30, 2011 at 9:43 AM, Conal Elliott co...@conal.net wrote:
On Fri, Dec 30, 2011 at 9:43 AM, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:20 AM, Colin Adams wrote:
On 30 December 2011 17:17, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:04 AM
On Fri, Dec 30, 2011 at 10:24 AM, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:43 AM, Conal Elliott wrote:
roof: f is a function, and it is taking the same argument each time.
Therefore the result is the same each time.
That's called begging the question. f
On Fri, Dec 30, 2011 at 10:45 AM, Gregg Reynolds d...@mobileink.com wrote:
On Dec 30, 2011, at 11:21 AM, Conal Elliott wrote:
And I also raised a more fundamental question than whether this claim of
sameness is true, namely what is equality on IO? Without a precise
consistent definition
In that sense every value in maths is a function. In other words: Your
extension of everything (!) to functions is redundant.
And function is not unique in this way. All types can be embedded into
pairs also, e.g., newtype MyInt = MyInt ((),Int), or newtype MyInt = MyInt
(((),Int),()), etc.
... World - (x, World) ...
I look at this World parameter as purely hypothetical, a trick used to gain
an intuition. Whereas Jerzy (I think) uses it to claim Haskell is
referentially transparent - those differing x and y values come from
different worlds, or different world-states.
I
On 2012/1/1 Ertugrul Söylemez e...@ertes.de wrote:
Steve Horne sh006d3...@blueyonder.co.uk wrote:
Of course even the bind operator arguably isn't primitive. We could
translate to get rid of those too, and see what lies underneath. This
is where we start seeing functions of type...
Is the standard pair-with-monoid monad instance in some standard place? I
see the Applicative instance in Control.Applicative, and the
pair-with-monoid Functor instance in Control.Monad.Instances, and the (-)
e and Either e monad instances also in Control.Monad.Instances.
I'm looking for
I'm using haskell-src-exts together with SYB for a code-rewriting project,
and I'm having difficulty with parenthesization. I naïvely expected that
parentheses would be absent from the abstract syntax, being removed during
parsing and inserted during pretty-printing. It's easy for me to remove
Has anyone implemented pattern-matching substitution for
haskell-src-exts? - Conal
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
This general applicative pattern for numbers is packed up in the
applicative-numbers package [1].
In addition to Ralf's paper, there's a discussion in section 10 of
*Denotational design with type class morphisms* [2] and an application in
sections 2 4 of *Beautiful differentiation* [3].
[1]:
Agreed. The original note confuses programs (syntax) with functions
(semantics). -- Conal
On Thu, Apr 5, 2012 at 8:52 AM, Dan Doel dan.d...@gmail.com wrote:
On Thu, Apr 5, 2012 at 10:14 AM, Grigory Sarnitskiy sargrig...@ya.ru
wrote:
First, what are 'functions' we are interested at? It can't
newtype Q p a = Q (p a - a)
instance ContraFunctor p = Functor (Q p) where
fmap h (Q w) = Q (h . w . cmap h)
using cmap for contravariant map. For instance, p a = u - a.
instance ContraFunctor p = Applicative (Q p) where
pure a = Q (pure a)
Q fs * Q as = Q (\ r -
let
f =
Oh, yeah. Thanks, Sjoerd.
I wonder if there's some way not to require Monad. Some sort of
ApplicativeFix instead. Hm.
-- Conal
On Wed, Jun 6, 2012 at 2:43 PM, Sjoerd Visscher sjo...@w3future.com wrote:
If there would be a package where this could be in it would be
contravariant[1], but it
Someone at work just asked me about the inflexibility of the derived Read
instances for records -- specifically that they require fields to be given
in the same order as in the type definition and that fields cannot be
omitted. I hadn't been aware of these restrictions.
A few questions:
* Are
Hi Andrew,
To save others the search, here's the/a reddit URL:
http://www.reddit.com/r/programming/related/nhnyd/nfa_in_a_single_line_of_haskell/.
The terribly misleading/mistaken remarks on fib memoization are still in
your post. As hammar commented on reddit commenter, you're not memoizing in
On Fri, Sep 14, 2012 at 2:18 PM, Andrew Pennebaker wrote:
A summary of the changes I've included so far:
[...]
Another comment:
As a declarative language, Haskell manipulates expressions, eventually
reducing expressions to values.
Huh? In what sense do declarative languages manipulate
Hi Tillmann. Wow. Lovely and spot on! And I almost never hear monad
explanations without wincing. Thanks for sharing. -- Conal
On Sun, Sep 16, 2012 at 7:48 AM, Tillmann Rendel
ren...@informatik.uni-marburg.de wrote:
Hi,
Kristopher Micinski wrote:
Everyone in the Haskell cafe probably has
If you require the circuit to be parametric in the value types, you can
limit the types of function you can pass to arr to simple plumbing.
See the netlist example at the end of my Fun of Programming slides (
http://www.soi.city.ac.uk/~ross/papers/fop.html).
I'm running into this same
Oh, I see Ross's trick. By quantifying over the domain range types, they
can later be specialized to analysis-time types (like circuit labels) or to
run-time types (like Boolean or Integer).
On Thu, Dec 20, 2012 at 4:55 PM, Conal Elliott co...@conal.net wrote:
If you require the circuit
generalized arrows?
http://www.cs.berkeley.edu/~megacz/garrows/
-- Kim-Ee
On Fri, Dec 21, 2012 at 7:55 AM, Conal Elliott co...@conal.net wrote:
If you require the circuit to be parametric in the value types, you can
limit the types of function you can pass to arr to simple plumbing.
See
I sometimes run into trouble with lack of injectivity for type families.
I'm trying to understand what's at the heart of these difficulties and
whether I can avoid them. Also, whether some of the obstacles could be
overcome with simple improvements to GHC.
Here's a simple example:
{-# LANGUAGE
appear in the signature
directly (e.g., something like 'a - F a' would be ok).
-Iavor
On Sun, Jan 13, 2013 at 11:10 AM, Conal Elliott co...@conal.net wrote:
I sometimes run into trouble with lack of injectivity for type
families. I'm trying to understand what's at the heart
...@tbi.univie.ac.at wrote:
Hi,
How would you infer a from F a? Given bar :: Bool, I can't see how
one could go from Bool to F a = Bool and determine a uniquely.
My question is not completely retorical, if there is an answer I would
like to know it :-)
Gruss,
Christian
* Conal Elliott co...@conal.net
[mailto:glasgow-haskell-
| users-boun...@haskell.org] On Behalf Of Richard Eisenberg
| Sent: 14 January 2013 03:47
| To: Conal Elliott
| Cc: glasgow-haskell-us...@haskell.org; Haskell Cafe
| Subject: Re: Advice on type families and non-injectivity?
|
| Hi Conal,
|
| I agree that your initial example
for different types.
On Sun, Jan 13, 2013 at 2:10 PM, Conal Elliott co...@conal.net wrote:
I sometimes run into trouble with lack of injectivity for type families.
I'm trying to understand what's at the heart of these difficulties and
whether I can avoid them. Also, whether some of the obstacles
Hi Ross,
I make some use of arrow notation, though sadly I often have to avoid it
because my (pseudo-)arrows don't have arr. I'd love to see a variant that
has restricted expressiveness in exchange for arr-freeness.
-- Conal
On Thu, Feb 7, 2013 at 6:08 AM, Ross Paterson r...@soi.city.ac.uk
On Thu, Feb 7, 2013 at 5:41 PM, Ross Paterson r...@soi.city.ac.uk wrote:
On Thu, Feb 07, 2013 at 02:49:40PM -0800, Conal Elliott wrote:
I make some use of arrow notation, though sadly I often have to avoid
it because my (pseudo-)arrows don't have arr. I'd love to see a
variant that has
What a delightfully elegant approach to CSE! I've been thinking about CSE
for DSELs and about functor fixpoints, but it never occurred to me to put
the two together.
Do you think the approach can be extended for non-regular (nested)
algebraic types (where the recursive data type is sometimes at a
On Tue, Feb 19, 2013 at 9:28 PM, Anton Kholomiov
anton.kholom...@gmail.comwrote:
Do you think the approach can be extended for non-regular (nested)
algebraic types (where the recursive data type is sometimes at a different
type instance)? For instance, it's very handy to use GADTs to capture
You can use a general fold and unfold, without any type-specific
programming if you re-express Expr as the least fixed point of its
underlying base functor:
data ExprF a = Add a a | Sub a a | Mul a a | Eq a a | B Bool | I Int
deriving (Show,Functor)
data Expr = Fix ExprF
Then use the
Hi Jan,
What you're suggesting is called non-linear patterns, and it's a
perfectly sensible, well-defined feature in a language with
pattern-matching. As you point out, non-linearity allows for more direct
succinct programming. I've often wished for this feature when writing
optimizations on
Hi Hans,
Do you have a denotation for your representation (a specification for your
implementation)? If so, it will likely guide you to exactly the right type
class instances, via the principle of type class
morphismshttp://conal.net/papers/type-class-morphisms/(TCMs). If you
don't have a
, they do not seem to be applicable
for things that lack a denotation, such as IO. Maybe it is a question of
how to relate denotational semantics to operational ones?
Hans
On 24 apr 2013, at 02:18, Conal Elliott wrote:
Hi Hans,
Do you have a denotation for your representation (a specification
Hi Jared,
Oh -- does Elm have a denotational semantics? I haven't heard of one. I
just now skimmed the informal description of the Signal
typehttp://elm-lang.org/docs/Signal/Signal.elm,
and from the reference to updates in the description of merge, it sound
like whatever semantics it might have,
The intuition intrigues me. If, upon inspection, it survives morphs into
something else, I'd like to hear about it.
Good luck! -- Conal
The object of mathematical rigor is to sanction and legitimize the
conquests of intuition, and there was never any other object for it. -
Jacques Hadamard
I
I'm using a collection of classes similar to Category, Arrow, ArrowChoice,
etc (though without arr and with methods like fst, snd, dup, etc). I think
I need some associated constraints (via ConstraintKinds), so I've tried
adding them. However, I'm getting terribly complex multiplication of these
Hi Wren,
Have you taken this constrained categories experiment further,
particularly for adding products? As I mentioned in a haskell-cafe note
yesterday, I tried and got a frightening proliferation of constraints when
defining method defaults and utility functions (e.g., left- or
superb and I'd love to learn more!
greetings,
Sjoerd
On May 8, 2013, at 12:09 AM, Conal Elliott co...@conal.net wrote:
I'm using a collection of classes similar to Category, Arrow, ArrowChoice,
etc (though without arr and with methods like fst, snd, dup, etc). I think
I need some associated
I want to convert lambda expressions into a vocabulary of monoidal
categories, so that they can be given multiple interpretations, including
circuit generation and timing analysis, and hopefully some other far-out
alternatives (3D visualization, animated evaluation, etc). More
specifically, I want
In writing GHC plugins, how can I (a) add a module import (preferably
qualified) and (b) make vars/ids for names imported from the newly imported
module (to insert in the transformed Core code)?
Thanks,
- Conal
___
Haskell-Cafe mailing list
Has anyone given a go at a Category class and friends (including cartesian
and closed) with associated constraints (presumably using the
ConstraintKinds language extension)? I gave it a try a while back and
wasn't able to keep the signatures from getting very complicated.
Thanks, -- Conal
I'm looking for an ICFP roommate. I plan to attend Sunday through Saturday
and stay the nights of Saturday the 21st through Saturday the 28th. I
missed the discounted price of $225 (yipes) at the Airport Hilton (sold
out). Perhaps someone already has a room reserved with two beds or could
switch
I'm polling to see whether there are will and expertise to reboot graphics
and GUIs work in Haskell. I miss working on functional graphics and GUIs in
Haskell, as I've been blocked for several years (eight?) due to the absence
of low-level foundation libraries having the following properties:
*
of the way
there (again, noting the properties I listed).
-- Conal
On Fri, Sep 27, 2013 at 1:40 AM, Conrad Parker con...@metadecks.org wrote:
Hi Conal!
Yes. I'd be very interested to help get Pan and Vertigo working. Do you
have a repo somewhere?
Conrad.
On 27 September 2013 13:32, Conal
in wxWidgets, but we (i.e.
https://github.com/wxHaskell?tab=members) hope to release announce in
not too much time.
cheers,
Atze
On 30 Sep, 2013, at 20:32 , Conal Elliott co...@conal.net wrote:
Hi Conrad,
Great. The challenge is not specific to Pan, Vertigo, etc. If we can get
some low-level
again?
(I’m
guessing that the latter might be hard.)
Thanks
Simon
-Original Message-
From: Haskell-Cafe [mailto:haskell-cafe-boun...@haskell.org] On
Behalf
Of
Paul Liu
Sent: 30 September 2013 07:18
To: Conal Elliott
Cc: Haskell Cafe
elements, just basic windowing and
input handling.
Euterpea has a UI layer on top of GLFW that provides text boxes and
sliders, etc, entirely written in Haskell.
On Wed, Oct 2, 2013 at 8:40 AM, Conal Elliott co...@conal.net wrote:
Hi Paul. Is there a way to use GLFW with GUI elements other than
201 - 278 of 278 matches
Mail list logo