On 13 October 2010 05:49, Mark Lentczner ma...@glyphic.com wrote:
I spent some time beforehand looking at what other successful language
communities do w.r.t. visual design. I found that none of the communities had
a single theme; most had two or three. but these themes were visually
2010/10/12 Gregory Crosswhite gcr...@phys.washington.edu:
Also, I don't see why one would prefer over the standard function
composition operator, ..
With . you have to read right-to-left to follow data's path.
For me that reading order isn't natural, and I imagine it is so for
most people
David Virebayre wrote:
Gregory Crosswhite wrote:
Also, I don't see why one would prefer over the standard function
composition operator, ..
With . you have to read right-to-left to follow data's path.
For me that reading order isn't natural, and I imagine it is so for
most people which
Thanks Jeff
What should I see when Yi loads? If my config file is broken, where should I
see errors? The debug option didn't produce anything useful.
After starting up, the help option does open my config, so I think it is in
the right place. This is Windows 7 if that makes any difference.
I'm
Is there a way to write a Haskell data structure that is
necessarily only one or two or seventeen items long; but
that is nonetheless statically guaranteed to be of finite
length?
--
Jason Dusek
Linux User #510144 | http://counter.li.org/
___
Hm. This is not actually an answer to your question, just a
discussion starter, but still.
The code below typechecks, though actually it shouldn't: there's no
type n such that ones is formed by the FL from some value of type
List Int n.
Or should it?
{-# LANGUAGE ExistentialQuantification,
On 13 October 2010 08:57, Jason Dusek jason.du...@gmail.com wrote:
Is there a way to write a Haskell data structure that is
necessarily only one or two or seventeen items long; but
that is nonetheless statically guaranteed to be of finite
length?
Maybe you want a list whose denotation is
hdList :: List a n - Maybe a
hdList Nil = Nothing
hdList (Cons a _) = Just a
hd :: FiniteList a - Maybe a
hd (FL as) = hdList as
*Finite hd ones
this hangs, so, my guess is that ones = _|_
13.10.2010 12:13, Eugene Kirpichov пишет:
{-# LANGUAGE ExistentialQuantification, GADTs,
Well, it's easy to make it so that lists are either finite or bottom,
but it's not so easy to make infinite lists fail to typecheck...
That's what I'm wondering about.
2010/10/13 Miguel Mitrofanov miguelim...@yandex.ru:
hdList :: List a n - Maybe a
hdList Nil = Nothing
hdList (Cons a _) =
On Wed, Oct 13, 2010 at 5:49 AM, Mark Lentczner ma...@glyphic.com wrote:
I'd lean toward us putting these thoughts down in the wiki, and developing a
set of guide posts for styling Haskell, rather than a strict set of
policies.
Here's a strawman proposal for a very first guideline:
Body
So... you want your ones not to typecheck? Guess that's impossible, since it's nothing
but fix application...
13.10.2010 12:33, Eugene Kirpichov пишет:
Well, it's easy to make it so that lists are either finite or bottom,
but it's not so easy to make infinite lists fail to typecheck...
That's
Well, in my implementation it's indeed impossible. It might be
possible in another one. That is the question :)
Perhaps we'll have to change the type of cons, or something.
13 октября 2010 г. 12:37 пользователь Miguel Mitrofanov
miguelim...@yandex.ru написал:
So... you want your ones not to
I don't know too much about GADTs, but it works fine with fundeps:
http://hpaste.org/40535/finite_list_with_fundeps
(This is rather a draft. If anyone can help me out with the TODOs, I'd be
happy.)
-- Steffen
On 10/13/2010 10:40 AM, Eugene Kirpichov wrote:
Well, in my implementation it's
On 12/10/2010 15:17, Daniel Fischer wrote:
On Tuesday 12 October 2010 11:18:39, Simon Marlow wrote:
On 09/10/2010 10:07, Daniel Fischer wrote:
On Saturday 09 October 2010 06:34:32, Lennart Augustsson wrote:
That code is incorrect. You can't assume that the base for floating
point numbers is
On Oct 11, 3:20 pm, Uwe Schmidt u...@fh-wedel.de wrote:
Hi Gregory,
Is there some benefit that your library gets out of using arrows that I
missed which makes these costs worth it?
I thing, this is not a question of functionality, it's a question of style.
Of course everything in hxt
Hi Gregory,
As I understood, John Hughes invented the arrows as a generalisation
of monads, you say it's a less powerful concept. I'm a bit puzzled with
that. Could you explain these different views.
Consider the following example:
f :: Int - m a
f i = monads !! (i *5
Hmm, ok, I simplified the idea[1] and it looks like I'm getting the same
problem as you when trying to drop the 'n' parameter carrying the length of
the list.
Sad thing.
[1] http://hpaste.org/40538/finite_list__not_as_easy_as_i
On 10/13/2010 10:43 AM, Steffen Schuldenzucker wrote:
I don't
Ben Franksen schrieb:
Neil Mitchell wrote:
This makes me curious. What's the use case where you want to allow the
user to pass arguments on the command line, but you don't want that user
to be able
to use '--help' to find out what arguments may be passed?
I wanted to create a clone of an
infinite value is value, that have no upper bound (see infinity
definition). So, you have to provide upper bound at compile time. Tree
example provides such bound.
On 10/13/2010 03:27 PM, Eugene Kirpichov wrote:
Again, the question is not how to arrange that all non-bottom values
are finite:
So all you need is a program that checks if your functions terminate. How
hard can it be, right? ;) Seriously though, since you would need static
termination guarantees on all functions that produce lists, you will
be severely restricted when working with them. It's like Haskell without
general
On Wed, Oct 13, 2010 at 3:50 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Combined with = / you have multiple reading direction in the same
expression, as in
expression ( c . b . a ) `liftM` a1 = a2 = a3
reading order 6 5 4 1 2 3
That's why I'm
Hi Jonas
Nice, but how about a list destructor?
;-)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/13/10 06:07 , Henning Thielemann wrote:
Ben Franksen schrieb:
I wanted to create a clone of an existing program that had no help option
and instead gave the help output if it saw an invalid option.
I find it very annoying if a program
Nice, but how about a list destructor
I'm not sure what you mean by destructor, if you mean an eliminator for
case analysis then you can make a function
finite :: b - (a - Finite s1 a - b) - Finite s2 a - b
finite b _ (Finite []) = b
finite _ f (Finite (x:xs)) = f x xs
If you men functions
Jonas,
2010/10/13 Jonas Almström Duregård jonas.dureg...@chalmers.se
(++) :: Finite s1 a - Finite s2 a - Finite (S (Plus s1 s2)) a
(++) (Finite a) (Finite b) = Finite $ a Prelude.++ b
infixr 5 ++
Why do you have the S in the return type of Finite.++ ?
Ozgur
Why do you have the S in the return type of Finite.++ ?
Typo. Plus is sufficient.
What I would really like is a nice way of implementing concat (i.e.
concatenate a finite number of finite lists, of various sizes, into a
single finite list).
/J
2010/10/13 Ozgur Akgun ozgurak...@gmail.com
Cafe,
Just a quick question. Either I am hallucinating or there was a way of
saying ghci to always show types. It was working as if you typed :t it
after every line of input.
Sorry, I searched but couldn't find the option via google. Hope someone here
knows/remembers what I am talking about.
On 13 October 2010 17:55, Ozgur Akgun ozgurak...@gmail.com wrote:
Just a quick question. Either I am hallucinating or there was a way of
saying ghci to always show types. It was working as if you typed :t it
after every line of input.
Sorry, I searched but couldn't find the option via google.
On 13 October 2010 17:03, Christopher Done chrisd...@googlemail.com wrote:
Options for ':set' and ':unset':
+rrevert top-level expressions after each evaluation
+sprint timing/memory stats after each evaluation
+tprint type after evaluation
See
On Wed, Oct 13, 2010 at 12:13:29PM +0400, Eugene Kirpichov wrote:
Hm. This is not actually an answer to your question, just a
discussion starter, but still.
The code below typechecks, though actually it shouldn't: there's no
type n such that ones is formed by the FL from some value of type
Hi
I have been trying to use protocol-buffers[2], and I have some ideas
which would have improved the protocol-buffers package for my usage (and
maybe for others):
* hprotoc should have an option to generate messages with [Char], Int
and [] in stead of Utf8, Int32 and Seq. While some people may
Hi Jonas
Thanks - I was meaning an equivalent to viewl on Data.Sequence, on plain lists:
viewl :: [a] - Either () (a,[a])
viewl [] = Left ()
viewl (x:xs) = Right (x,xs)
It was a trick question because I can't see how you can do it without
decrement on the Peano numbers.
Best wishes
Hi Stephen,
I'm not sure I see the problem. You can do what you require with the
function i supplied (minus the typo). This is in the module (where the
Finite constructor is exposed)
finite :: b - (a - Finite s a - b) - Finite s a - b
finite b _ (Finite []) = b
finite _ f (Finite (x:xs)) = f
David Virebayre schrieb:
2010/10/12 Gregory Crosswhite gcr...@phys.washington.edu:
Also, I don't see why one would prefer over the standard function
composition operator, ..
With . you have to read right-to-left to follow data's path.
For me that reading order isn't natural, and I
Hi Jonas
Thanks - I was anticipating a type like this for the destructor:
viewl :: Finite s a - Either () (a, Finite (Predecessor s) a)
I didn't appreciate that the size type in your code represented the
upper bound and not the actual size.
Best wishes
Stephen
On Tue, Oct 12, 2010 at 4:41 PM, Ben Franksen ben.frank...@online.dewrote:
Jason Dagit wrote:
On Tue, Oct 12, 2010 at 2:02 PM, Ben Franksen
ben.frank...@online.dewrote:
One minor but important note: the hashed format is *not* readable with a
darcs-1 program:
Sorry about that. The
Thanks everyone for your thoughtful replies. I might have
expected a referral to a paper; it's a pleasant surprise
to have these worked examples.
--
Jason Dusek
Linux User #510144 | http://counter.li.org/
___
Haskell-Cafe mailing list
One option could be something like:
data Z
data S n
data Vec n a where
Nil :: Vec Z a
Cons :: a - Vec n a - Vec (S n) a
data Length n where
One :: Length (S Z)
Two :: Length (S (S Z))
Seventeen :: Length (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S (S
Z)
data
Jason Dagit wrote:
On Tue, Oct 12, 2010 at 4:41 PM, Ben Franksen
ben.frank...@online.dewrote:
Seriously, the server is a debian etch (!) system. Also called debian
old-stable. Of course I have long since installed newer version of
darcs, but since I am not root there I cannot put it into
Stephen Tetley schrieb:
On 11 October 2010 00:00, Johannes Waldmann
waldm...@imn.htwk-leipzig.de wrote:
My point was: you need to find/define two operators, not just one.
Sure, I need flip ($) and flip (.)
Since the Prelude forgot to define these (and flip map),
the question was: are
Dan Doel schrieb:
On Sunday 10 October 2010 5:32:16 pm Johannes Waldmann wrote:
I mean instead of h . g . f $ x
I'd sometimes prefer x ? f ? g ? h
but what are the ?
Note, before anyone gets too excited about this, there are some built-in
things about the language that make forward
I do this using a .ghci file. For Hoogle I have a file called Paths.hs
with the module name Paths_hoogle and stub exports. I then have my
.ghci file as:
:load Main.hs Paths.hs
Now Paths.hs will never interfere, or be picked up in ghc --make,
because it has the wrong name - but is used in ghci.
On Fri, Oct 8, 2010 at 4:55 PM, Niklas Broberg niklas.brob...@gmail.com wrote:
Hi all,
I want to do something I thought would be quite simple, but try as I
might I can't find neither information nor examples on how to achieve
it.
What I want specifically is to have happy produce a GLR
Andy Stewart schrieb:
Hi all,
I have two package A and B, and B depend A.
I use below code snippets in package A:
-- code start --
...
import Paths_manatee_ircclient
import System.FilePath
...
dir - getDataDir
let
Henning Thielemann schlepp...@henning-thielemann.de writes:
Andy Stewart schrieb:
Hi all,
I have two package A and B, and B depend A.
I use below code snippets in package A:
-- code start --
...
import Paths_manatee_ircclient
...and you can always do
hack :: Vec n a - FixedVec a
hack x :: FixedVec undefined
Also I'm guessing 1, 2 and 17 are just examples, he really wants arbitrary
length finite lists.
/J
On 13 October 2010 20:47, Daniel Peebles pumpkin...@gmail.com wrote:
One option could be something like:
Welcome to issue 154 of the HWN, a newsletter covering developments in
the Haskell community in the week of October 03 - 09.
This community does not stand still! The last section of the newsletter
contains a list of new or updated packages this passed week. All 87 of
them! I had my
On Wed, Oct 13, 2010 at 11:56 AM, Ben Franksen ben.frank...@online.dewrote:
As for your path, I'm reasonably confident that if you put your local
darcs
at the front of your path then you're good to go. I know that works for
local push, what I'm wondering about is push over ssh.
Works
On 14 October 2010 05:58, Neil Mitchell ndmitch...@gmail.com wrote:
I do this using a .ghci file. For Hoogle I have a file called Paths.hs
with the module name Paths_hoogle and stub exports. I then have my
.ghci file as:
:load Main.hs Paths.hs
Now Paths.hs will never interfere, or be picked
Hello Haskell Cafe,
I really hope this is the right list for this sort of question. I've
bugged the folks in #haskell, they say go here, so I'm turning to you.
I want to use Hexpat to read in some humongous XML files (linguistic
corpora,) since it's the only Haskell XML library (I could find)
On 2010 Oct 13, at 00:28, Alexander Solla wrote:
On Oct 12, 2010, at 4:24 AM, Jacek Generowicz wrote:
I can't see a Haskell solution which combines both of these
orthogonal
features without losing the benefits of the type system. (For
example,
I could create my own, weak, type system
On Wednesday 13 October 2010 23:06:04, Aleksandar Dimitrov wrote:
Hello Haskell Cafe,
I really hope this is the right list for this sort of question. I've
bugged the folks in #haskell, they say go here, so I'm turning to you.
I want to use Hexpat to read in some humongous XML files
On Wed, Oct 13, 2010 at 2:54 AM, Peter Marks pe...@indigomail.net wrote:
What should I see when Yi loads? If my config file is broken, where should I
see errors? The debug option didn't produce anything useful.
I'd expect it in one of three places:
1. In a buffer inside Yi when it launches
I admit I haven't read this whole thread in detail, but when I want
something with an implementation that can vary dynamically I just pass
a different function. Your original python example is equivalent to
just passing strings in haskell, so lets add an argument:
type Process = Int - String
2010/10/13 Jonas Almström Duregård jonas.dureg...@chalmers.se:
...and you can always do
hack :: Vec n a - FixedVec a
hack x :: FixedVec undefined
Also I'm guessing 1, 2 and 17 are just examples, he really wants arbitrary
length finite lists.
Indeed. Where I said is necessarily I meant is
On 2010 Oct 13, at 23:52, Evan Laforge wrote:
I admit I haven't read this whole thread in detail, but when I want
something with an implementation that can vary dynamically I just pass
a different function.
Of course.
Your original python example is equivalent to
just passing strings in
The problem is down to getAppUserDataDirectory called in Yi.Boot. This
function behaves differently on Windows to Linux... and more so on Windows
7. The first issue is that on Windows it doesn't prepend the . to the
directory name, so it is looking in yi, not .yi. On Windows 7, it looks
for this
On 13 October 2010 07:41, Christopher Done chrisd...@googlemail.com wrote:
This reminds me, do we have a good syntax highlighting theme?
HsColour's has always been pretty bad (no offence intended -- but
there is a reason people always redefine it).
I've been sitting on a post about
On 2010 Oct 12, at 15:44, John Lato wrote:
It's not plain Haskell, but I'm surprised nobody mentioned the
ExistentialQuantification extension, which unless I'm missing
something provides exactly what you want.
Yes, it does appear to be *exactly* what I want.
Thanks.
(Now, how about
I think I'm starting too see what my problem is. I think it boils down to
hankering for Duck Typing and variadic functions. I fully appreciate that
passing functions is a wonderful and powerful technique for catering for
variation, but Haskell's type system cramps my style by insisting that I
On Wed, Oct 13, 2010 at 6:14 PM, Peter Marks pe...@indigomail.net wrote:
The problem is down to getAppUserDataDirectory called in Yi.Boot. This
function behaves differently on Windows to Linux... and more so on Windows
7. The first issue is that on Windows it doesn't prepend the . to the
On Tue, Oct 12, 2010 at 8:03 AM, Brandon S Allbery KF8NH
allb...@ece.cmu.edu wrote:
On the one hand, a professional organization will prefer to have real names,
real pictures, etc. On the other, if you want to be a central coordinating
spot for the existing Haskell community, many of us are
On 2010 Oct 14, at 01:32, Evan Laforge wrote:
I think I'm starting too see what my problem is. I think it boils
down to
hankering for Duck Typing and variadic functions. I fully
appreciate that
passing functions is a wonderful and powerful technique for
catering for
variation, but
BTW Thanks: This discussion has helped me gain a better understanding
of some of the mechanisms at work, which I really appreciate.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Oct 13, 2010, at 2:18 PM, Jacek Generowicz wrote:
Is there any particular reason why you want to actually to mirror
Python code?
I don't want to: I merely have a situation in which an OO solution
(not necessarily a good one) immediately springs to mind, while I
didn't see any obvious
Hey everyone,
I am pleased to announce the release of a family of packages for
type-level natural numbers. The emphasis on these packages is
minimality in order to provide simple core functionality that requires
as few extensions as possible beyond Haskell-2010. The (probably
foolish)
The Facts hierarchy is meant to contain commonly used, relatively
static facts about the real world. The facts are meant to be encoded
using relatively simple Haskell constructs. However, we do make some
promises: every data type our modules export will have instances of
Data, Eq, Ord,
Hey everyone,
I am pleased to announce the release of tagged-list version 1.0, a
package which provides fixed-length lists that are tagged with a phantom
type-level natural number corresponding to the length. The advantage of
such lists is that you can make static guarantees about them, so
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/13/10 13:48 , Jason Dagit wrote:
Isn't debian etch a security liability at this point?
Never underestimate the inertia of a system which a professor uses for
research or a grad student for their thesis work.
- --
brandon s. allbery
If you just want instances of questions you can keep it simple. How about
something isomorphic to
data Instance = Instance { question : String, answer : String, check : String
- Bool }
You could make helper functions similar to your old code, like
addition : (Int , Int) - Instance
You might
On Oct 13, 2010, at 7:44 PM, Jacek Generowicz jacek.generow...@cern.ch wrote:
On 2010 Oct 14, at 01:32, Evan Laforge wrote:
I think I'm starting too see what my problem is. I think it boils down to
hankering for Duck Typing and variadic functions. I fully appreciate that
passing functions is
On Thu, Oct 14, 2010 at 1:54 AM, Jeremy Shaw jer...@n-heptane.com wrote:
On Tue, Oct 12, 2010 at 8:03 AM, Brandon S Allbery KF8NH
allb...@ece.cmu.edu wrote:
On the one hand, a professional organization will prefer to have real names,
real pictures, etc. On the other, if you want to be a
On 14 October 2010 16:00, Michael Snoyman mich...@snoyman.com wrote:
As a side point, I'm wondering how I should let everyone know about
the new features on the site. Emailing the cafe each time would be
stupid (and spam); posting to my twitter or my blog won't hit the
whole audience. The two
On 14 October 2010 14:00, Michael Snoyman mich...@snoyman.com wrote:
As a side point, I'm wondering how I should let everyone know about
the new features on the site. Emailing the cafe each time would be
stupid (and spam);
but it's the main reason people are checking it out :) I reckon it's
ok
Hey all,
Is there a library that supports fuzzy time deltas? For example, given
two UTCTimes (or something like that) it could produce:
43 seconds
13 minutes
17 hours
4 days
8 months
I want to use it for the news feature on Haskellers. It's not that
hard to write, just wondering if it's already
75 matches
Mail list logo