Re: [Haskell-cafe] For Project Euler #24 you don't need to generate all the lexicographic permutations Spoiler

2011-05-08 Thread Jeff Wheeler
On Sun, May 8, 2011 at 10:41 AM,  cas...@istar.ca wrote:
 For Project Euler #24 you don't need to generate all the lexicographic
 permutations by Knuth's method or any other.

This is a clever, smart solution. You should post it to the Haskell
Wiki page [0].

[0] http://haskell.org/haskellwiki/Euler_problems/21_to_30


-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Why not Darcs?

2011-04-21 Thread Jeff Wheeler
On Thu, Apr 21, 2011 at 3:29 PM, Andrew Coppin
andrewcop...@btinternet.com wrote:
 I'm sure this must be a VFAQ, but... There seems to be universal agreement
 that Darcs is a nice idea, but is unsuitable for real projects. Even GHC
 keeps talking about getting rid of Darcs. Can anybody tell me what the
 problems with Darcs actually are?

Yi, a fairly large and old repository, recently moved to (primarily)
Git. Our motivation was not flaws in Darcs, but rather GitHub.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] haskell mailing lists followup?

2011-03-15 Thread Jeff Wheeler
On Tue, Mar 15, 2011 at 6:44 PM, wren ng thornton w...@freegeek.org wrote:

 Earlier today I got messages from the three lists I'm on (libraries@,
 haskell-cafe@, glasgow-haskell-users@) about delivery being disabled due
 to excessive bounces. The re-enabling codes in those emails were expired
 ---which is supposed to take a few days--- despite only getting them at
 4:00am today. I've since logged in to re-enable delivery, though it'll
 only be a matter of time until it happens again.

I got the same emails. I had noticed before I got those that I hadn't
received any mail from @haskell.org for several days, whereas other
email was coming through fine.

Having re-enabled delivery, everything seems fine.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: HSCurses - Hello World? (can't find much documentation)

2010-11-04 Thread Jeff Wheeler
On Thu, Nov 4, 2010 at 10:16 PM, Michael Forster m...@sharedlogic.ca wrote:
 On Fri, Oct 22, 2010 at 17:09:52 EDT, Ari Rahikkala wrote:
 On Fri, Oct 22, 2010 at 11:18 PM, Anonymous Void byteasphyxia at gmail.com 
 wrote:
  But since I've never seen how the HSCurses functions really integrate
  together, or any tutorials/examples (besides hsFishEx),
  I fear toying with it is going to be annoying until I figure it out on my
  own, especially since I'm already doing a project for someone...
  So, I was wondering if anyone would be kind enough to point me to (or write
  me) a basic example of how HSCurses works,
  maybe w/ some very simple example of interactivity (e.g. getch processing,
  screen refresh, ..)  support.
  Also, maybe warn me of some of the common pitfalls and differences in
  hscurses vs ncurses in other languages.

 UI.HSCurses.Curses follows ncurses quite closely so you can get pretty
 far reading the NCurses Programming HOWTO:
 http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/


 Also, http://invisible-island.net/ncurses/ncurses-intro.html.

You might also want to look at the vty and vty-ui packages, which
provide nicer, higher-level UIs for terminals.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Yi on Windows

2010-10-15 Thread Jeff Wheeler
On Thu, Oct 14, 2010 at 1:41 PM, Peter Marks pe...@indigomail.net wrote:

 If you start Yi with no config file, press any key, press h, choose a key
 binding, then save the file, you get a file c:\Users\peter\.yi\yi.hs

Oh, indeed. I didn't realize that. The behavior is defined in
Yi.Config.Default.nilKeymap and is very stupid about how it calculates
the config file location. We should be able to get this path from Dyre
instead.

 Hmm, although what I said is correct, it is not causing this problem.
 Windows 7 does use a different directory for local user data, but it
 implements some magic to make references to the old location access the new
 location. If you do a dir of C:\Users\peter, Local Settings doesn't
 exist, but if you dir C:\Users\peter\Local Settings\Cache\yi, you actually
 get the contents of C:\Users\peter\AppData\Local\Cache\yi, which does
 contain the file errors.txt! It is a sort of invisible simlink.

Woah . . .

 The actual problem I am having is that dyre tries to delete errors.txt
 straight after reading it with readFile. As readFile is lazy, the runtime is
 keeping the file open so, on Windows at least, it can't be deleted. I'm not
 really sure why it wants to delete the file though. I guess it is so that
 any warning messages are only shown the first time you launch after a
 compile, then deleted. I don't see why the errors file can't just be left so
 that you see errors whenever you launch. I'll try changing this later this
 evening (UK) and let you know if it works. The alternative would be to force
 the file to be read strictly then closed.

I think it's only important that they be deleted after a successful compile.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Yi on Windows

2010-10-13 Thread Jeff Wheeler
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 using the default config.
(I'm guessing this isn't the case for you if you haven't seen the
error messages, but it'd be in a buffer called *errors* if present.
It theoretically should open as the default buffer.)

2. I don't think this should happen, but dyre /may/ make a file
yi.errors in ~/.yi/, next to your config file.

3. It might just print it to the console, but that's not happening
here, or you would have seen it.

 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 not sure; I've never tried installing much Haskell on my Windows
machine, so I haven't tested Yi on it. I think somebody worked on it a
while back, but I'm not sure if they succeeded (or if it still
theoretically works).

 I'm happy to take a look at the source, any suggestions where I should
 start?

Interfacing with the dyre config loader occurs in src/Yi/Boot.hs, but
there's also some interesting stuff related to starting up in
src/Yi/Main.hs. The dyre package provides the primary entry-point, and
calls Yi.Main.main with the relevant config when it's ready to start.
Yi.Boot instructs dyre on how to work with configs for yi.

Best of luck, and thanks for playing with Yi!

-Jeff

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Yi on Windows

2010-10-13 Thread Jeff Wheeler
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
 directory name, so it is looking in yi, not .yi. On Windows 7, it looks
 for this directory in a completely different location:
 C:\Users\peter\AppData\Roaming rather than just C:\Users\peter.

This sounds right.

 Obviously other parts of the program are using a different call to locate
 the config file as, letting the editor create the default file, it places it
 in C:\Users\peter\.yi\yi.hs! I can't find the code that does this at the
 moment - any pointers appreciated.

Are you sure that Yi ever writes a default config file? As far as I
know, when dyre provides no config from reading a file (or resuming a
saved state), Yi will boot with Yi.Config.Default.defaultConfig
(that's the one that lets you enter vim or emacs keybindings with 'v'
and 'e' respectively), but I don't think it ever writes this to a
file. (Note that src/Main.hs calls this; it might make sense to remove
that file and move this to Yi.Main or Yi.Boot.)

 My current feeling is that getAppUserDataDirectory is the correct call to
 use and the docs should be changed to tell users to put their file where
 this call points. Further, it would be nice if the editor told you where it
 was looking if it doesn't find a config file... well actually, when it does
 find a file too, so you know which one it loaded.

I'm in favor of printing it when an error occurs (should no config be
an error? not sure, but I'd be inclined to say no). When Yi boots
correctly, I'd prefer to not print anything.

Or, better yet, just always include it in --debug.

 Now I'm on to the next problem, it tries to write its error file in a
 location that doesn't exist: C:\Users\peter\Local
 Settings\Cache\yi\errors.log. Local Settings doesn't exist on Windows 7.
 This is now AppData\Local I think. Setting the cacheDir field of the dyre
 Params should fix this, but I don't have time to try it right now.

If dyre defaults to using a directory that doesn't exist on 7, I'd say
that's a bug in dyre. We should probably tell Will Donnelly (the
maintainer) if that's correct.

Again, thanks so much for looking at this.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Yi on Windows

2010-10-12 Thread Jeff Wheeler
That bug is probably no longer correct. We now use the dyre package
for loading the config. Does anybody know if dyre works on Windows in
general?

On Tue, Oct 12, 2010 at 5:39 PM, Peter Marks pe...@indigomail.net wrote:
 Does anyone use Yi on Windows? I've managed to get it to build and run, but
 it doesn't seem to pick up a config file. This seems to be an issue
 identified over a year
 ago: http://code.google.com/p/yi-editor/issues/detail?id=269. This would
 seem to render the editor almost completely useless on Windows. The whole
 point is to have an editor you can customize in Haskell.
 Any suggestions appreciated.
 Thanks

 Peter
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe





-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Ordering vs. Order

2010-10-09 Thread Jeff Wheeler
On Thu, Oct 7, 2010 at 8:29 AM, Steve Schafer st...@fenestra.com wrote:

 I think the reason for this conceptual distinction can be traced to the
 derivation of ordering as the gerund form of the verb order, in that
 it implies that an action has occurred (or is still occurring).

Reading the original message, this seems to be the misunderstanding.
The verb order can be interpreted as something like sorting (what we
mean in Haskell, can also be said to be giving order to the list) or
to command something, which is pretty much a completely different
meaning.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Hackage accounts and real names

2010-04-05 Thread Jeff Wheeler
On Mon, Apr 5, 2010 at 6:00 PM, David House dmho...@gmail.com wrote:

 You're coming at this from the wrong angle. Rather than saying, why
 should we allow pseudonyms? we should ask why are we restricting the
 freedom of users that just wish to contribute code?

Exactly. I don't understand the argument about not trusting code from
anonymous people. If you don't want to depend on the code, don't. If
somebody wants to publish it to Hackage, fine; you still have the
choice to use or not use it as you would if they published it anywhere
else.

 If I'm honest, I'm really surprised so many people have replied in
 favour of the restriction. I've stated an explicit way in which it's
 hurting the community, and the only person to say anything in the
 policy's defence other that well, why not? has been Ross (and I hope
 I dealt with the flaky arguments he linked to in my reply).

I'm extremely surprised, too, which is why I responded.

 (P.s., I certainly wouldn't describe the use of pseudonym anonymity a
 subculture. Perhaps it's not the norm in academic circles, but
 virtually all websites requiring a registration allow you to use
 whatever you like as a username. As does email. As does IRC. I can't
 think of many bits of the internet that don't.)

Yep. On the internet, you get to be anonymous. Why don't we kick
people that don't have their name in their email address or IRC nick?

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Haskell.org re-design

2010-03-28 Thread Jeff Wheeler
On Sun, Mar 28, 2010 at 6:07 PM, Ashley Yakeley ash...@semantic.org wrote:

 No, you're right, they're ugly colours IMO.

I originally mocked up the logo that we chose, so I'm partial to the
grayish-blue that I used. Others probably work, but I think the
combination of blues in the one that's used a lot now is awkward.

I do like the new design idea, but there are a few places I'd like to
nitpick, if nobody minds.

- The Register | Login button is awkward; it looks like it's
centered with the descenders included, so it's a bit too high. Also, a
pipe as a separator is strange. (This same style is used a few other
places, too.)
- The Haskell Programming Language is a bit long. Perhaps make
The/Programming Language be a lot lighter, so that Haskell really
stands out.
- I doubt we'll end up using that font for the headers (unless
somebody is ponying up for a license and wants to use Typekit or so),
but the 't' as in Welcome _t_o is very strange.
- Under Events, I'd move More to be in line with the prev/next buttons.
- Under Latest Packages, I think different formatting could make
this read more easily. At the very least, the package name and
description should be a different color or weight. I'd move the
description onto the same line (wrapping if necessary), but a lighter
weight and a lighter gray (same color as the Latest Event?).

Just some ideas to think about.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell-friendly Linux Distribution

2010-03-27 Thread Jeff Wheeler
On Sat, Mar 27, 2010 at 11:11 PM, Chris Dornan ch...@chrisdornan.com wrote:

 Are there any particularly strong reasons for preferring or avoiding any
 particular distribution?

A bunch of stuff is packaged by dons for Arch; you can see a lot of
links to the Arch packages on Hackage. It might be worth looking into.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: [Haskell] ANN: Yi 0.6.2.2

2010-03-25 Thread Jeff Wheeler
On Thu, Mar 25, 2010 at 7:48 AM, John Lato jwl...@gmail.com wrote:

 Will it work if you set data-accessor-template  0.2.1.3 in the .cabal
 file?  I think that version is acceptable to both ghc-6.10 and 6.12.

It seems so, yes. Unfortunately, I've already made other changes to
HEAD that are incompatible with 6.10.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] SoC Proposals?

2010-03-16 Thread Jeff Wheeler
Is there any way to propose a SoC idea right now? My account doesn't
seem to have been created correctly, so I can't login to the Trac.

I think it'd be interesting for a student to abstract the layout model
in xmonad, separating it into an independent library. Other
applications could then use this library, like Yi, for other types of
tiling.

I'd love to see other ideas related to Yi, too. It's a great project
but on the verge of death (although the maintainer, JPB, is interested
in mentoring).

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] SoC Proposals?

2010-03-16 Thread Jeff Wheeler
On Tue, Mar 16, 2010 at 9:32 PM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:

 Be sure to try your user name without any capitals - that worked for me...

The account I created is jeffwheeler -- all lowercase, no spaces --
unfortunately, so that doesn't seem to be the problem I'm hitting.

-- 
Jeff Wheeler

Undergraduate, Electrical Engineering
University of Illinois at Urbana-Champaign
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Lambda's

2009-12-30 Thread Jeff Wheeler
NSFW, by the way.

On Wed, Dec 30, 2009 at 5:15 PM, Henk-Jan van Tuyl hjgt...@chello.nl wrote:

 I love lambda's:

-- 
Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Design question

2009-12-16 Thread Jeff Wheeler
On Wed, Dec 16, 2009 at 10:40 AM, hask...@kudling.de hask...@kudling.de wrote:

 1) Is the way i define and use SubSet, the only/valid way to define
 subsets?

 2) What's the best way to make doSomethingElse polymorphic?

I'm not very familiar with them, so I'm not sure if it's totally
applicable, but generalized algebraic datatypes (GADTs) might be what
you're looking for.

--
Jeff Wheeler

(Sorry, sent this to the author originally.)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal packages - cabbages

2009-09-20 Thread Jeff Wheeler
On Sun, Sep 20, 2009 at 5:11 PM, Jason Dusek jason.du...@gmail.com wrote:

  Some day, we're going to need a short, catchy name for Cabal
  packages. Let's call them cabbages.

+1

Yes, let's.

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal packages - cabbages

2009-09-20 Thread Jeff Wheeler
On Sun, Sep 20, 2009 at 5:20 PM, Joe Fredette jfred...@gmail.com wrote:

 The Cabbage Patch?

'Patch' is pretty well defined, so using it here seems somewhat
awkward and confused to me.

Plus, I don't think we really want to sound childish, and the first
thing I think of is the cabbage patch kid dolls. The original idea,
cabbage, doesn't seem silly to me.

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Compiling Yi's Dependencies on Windows

2009-09-18 Thread Jeff Wheeler
Hey all,

Yi has a lot of dependencies that currently make it a pain to install
on Windows, so I'm wondering which of those can be streamlined for
easier install on Windows. So far, I haven't succeeded at getting them
to work on my own machine, and I've already spent a lot of time on it.

The first major impediment is Gtk2Hs. Duncan has mostly resolved this
issue with a minimal build that works on 6.10.4 [1], but I think that
this should at least be mentioned on the Gtk2Hs site if it is
impossible for now to get cabal-install to work by itself.

Then comes bindings for things like curl (this may only be needed for
Darcs, I don't remember), zlib, and regex (POSIX). If I remember
correctly, zlib, or some other library, is able to ship with its
*.c/*.h files and compile them as necessary on Windows. Can this be
done for regex-posix and curl, too? On my system now, I've got both
GnuWin32 and MSYS (MinGW) installed in attempts to get regex headers
that work with regex-posix, but, at the moment, I've run into a wall,
in which I get this error when loading or linking to regex-posix (it
compiles fine itself):

ghc.exe: C:\...\cabal\regex-posix-0.94.1\ghc-6.10.4\HSregex-posix-0.94.1.o:
unknown symbol `_regerror'
Loading package regex-posix-0.94.1 ... linking ... ghc.exe: unable to
load package `regex-posix-0.94.1'

I doubt most of these changes are significant (like linking on the
gtk2hs site to the 6.10.4 build), but changing them could make many
apps easier to install on Windows, not just Yi.

Are there any other dependencies that have trouble on Windows which I
haven't run into yet? If they're library dependencies, can the headers
be included in the Hackage tarball?

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal install on Windows 7

2009-09-09 Thread Jeff Wheeler
On Wed, Sep 9, 2009 at 2:19 PM, Sebastian
Sylvansebastian.syl...@gmail.com wrote:

 I think it's morally right to run as user by default. Yes, the windows
 culture has some legacy that may, on occasion, make it slightly harder to
 use well behaved programs, but it's fairly minor these days.

I strongly agree. Presently, on Windows 7, I have to right-click and
Run As Administrator and then approve the process via UAC to get
anything done under the default --global setting, in much the same way
I would have to launch a root terminal and provide my password within
GNOME (a la gksu) or other *nix environments (Windows doesn't have
anything like sudo, as far as I know).

Since it works essentially the same as *nix does, as of Windows 7, I
see no reason for a different default.

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal install on Windows 7

2009-09-08 Thread Jeff Wheeler
On Tue, Sep 8, 2009 at 9:17 AM, Peter Verswyvelenbugf...@gmail.com wrote:

 Ouch, right, I forgot the default is global. It works fine with cabal
 install --user. And of course I could have edited the default config
 file, setting user-install: True

 Well, maybe for newbies this might be a bit confusing.

Yep, I agree. I'm not sure why Cabal defaults to --global on Windows,
but I found it quite counter-intuitive having come from a Linux
environment. I forgot about the different default for some time.

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Request for Changelogs

2009-08-06 Thread Jeff Wheeler
On Thu, Aug 6, 2009 at 9:27 AM, Joachim
Breitnerm...@joachim-breitner.de wrote:

 And cabal/hackage guys: Llease introduce a standard Changes format for
 cabal packages so that http://hackage.haskell.org/package/hlint readily
 lists (or links to) changes.

(+1)

Standardizing a CHANGES format and linking to from Hackage would be a
very simple way to do changelogs in Hackage. I like this solution.

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ghci identifier listing question

2009-07-28 Thread Jeff Wheeler
On Mon, Jul 27, 2009 at 6:37 PM, Daniel van den Eijkeld...@gmx.net wrote:

 Is it possible, to reach the (shadowed) values in any way?

I'm not sure about this, but . . .

 Another question: Is it possible to show only those identifiers that are
 defined during the interactive session? I only can list all identifiers
 which start with a given prefix, but I would like to know if GHCi can show
 me all identifiers defined in a given module or in the current session (by
 pressing Tab or alike).

Yes, this will list the current bindings:

 :show bindings

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Simple quirk in behavior of `mod`

2009-07-22 Thread Jeff Wheeler
On Wed, Jul 22, 2009 at 1:34 PM, gladst...@gladstein.com wrote:

 Is the utility of having (n `mod` 0) return a value greater than the
 confusion it will engender? In the 99.99% case it's an error. You wouldn't
 want (n `div` 0) to return 0, I expect.

 If we want these number-theoretic mod and div operations let's please put
 them in a separate module.

Couldn't the same be said for round-to-even, instead of rounding down
like every other language? I doubt any beginners have ever expected
it, but it's probably better.

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Adding an ignore function to Control.Monad

2009-07-11 Thread Jeff Wheeler
On Fri, Jul 10, 2009 at 10:10 PM, Don Stewartd...@galois.com wrote:

 ## Control.Monad.void m a - m ()
 Don Stewart
 Iavor Diatchki

For whatever it's worth, I prefer void as well, for the exact reason
Don said. Indeed, 'ignore' indicates to me that the argument won't
even be evaluated: it'll be ignored, and skipped. But it is, and only
part --- the result --- is ignored.

What about 'void' with functors?

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: hsparql, a SPARQL query generator/DSL and client

2009-07-09 Thread Jeff Wheeler
On Thu, Jul 9, 2009 at 4:34 AM, Nicolas
Pouillardnicolas.pouill...@gmail.com wrote:

 I've looked at your DSL and it looks really neat. While reading I was
 wondering if GADTs could help having an even nicer query language.

To be honest, I really only know the name GADT, I don't really know
anything about them. I guess I have a good excuse to go learn them,
though, now. :)

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Jeff Wheeler
On Thu, Jul 9, 2009 at 6:12 PM, Derek Elkinsderek.a.elk...@gmail.com wrote:

 I'm not a newbie and I don't use the front page terribly often, but I
 do like most of the links that are on it.  The Ruby page is certainly
 prettier, but the layout of the Haskell page is fine in my opinion;
 the difference is mainly eye-candy.  On another topic, I know people
 have expressed that they have liked the fact that the entire Haskell
 site is a wiki; this expressing openness and community involvement.

 I personally don't find the Haskell front page too cluttered and I
 think most of issue in that vein could be resolved by simply making
 sure the most important/newbie-oriented links are above the fold and
 appropriately emphasized/categorized as is partially done already.

I strongly feel that the homepage should be made more newbie friendly,
and I think the Ruby page has done this well, disregarding the news
section. I suspect most people who like the Ruby page see the Ruby
is... section as especially effective at introducing the language,
and the random snippet is a simple way to show off a bit of code
before they dive into a tutorial. Furthermore, the Download link is
useful, but since GHC can be complicated (and varies by platform), we
probably want to include pretty well thought-out instructions behind
the link if we include a similar feature. I also quite like the
Participate box on the Ruby page, which is very inviting.

Regarding the current Haskell homepage, I feel the events are given
far too high a place on the homepage. Almost no newbies will be
interested in these, and most experienced users will know of the
events via the mailing lists. The headlines below that deserve
significantly more attention, and perhaps should be updated with
greater frequency (and dated, and have RSS). The updated package list
is fine, I think.

The navigation is a bit tricky, in my opinion. To a beginner (that
doesn't know what GHC is), the two download links may be confusing,
although I suspect most would correctly assume that Download Haskell
was correct option. The Find A Library is a good link, but the
Search that follows it is awkward. There are three large search
choices for beginners: 1) the search at the top, which confusingly has
two submit buttons (with ambiguous differences to a beginner); 2) the
Search link near the top of the navigation (which links to an almost
empty page that might as well be included at the link's location); and
3) the Search link underneath the About header, which doesn't seem to
belong at all.

Jeff Wheeler

(Sorry, sent this to just Derek at first.)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: hsparql, a SPARQL query generator/DSL and client

2009-07-08 Thread Jeff Wheeler
I'm excited to announce the first version of hsparql. HSparql makes it
easy to query SPARQL-compliant servers using a relatively intuitive DSL
and very simple client.

SPARQL is a SQL-ish query language for stores of RDF data. So, SPARQL
lets you search the structured data in several big databases. I wrote it
so that I could search DBpedia [1], a neat site that pulls structured
data from Wikipedia's infoboxes, and also ties it to remote data
services like MusicBrainz and US Census information. HSparql isn't tied
to DBpedia in any way, though, and can search any server.

The DSL looks something like this:

 simple :: Query [Variable]
 simple = do
 resource - prefix (iriRef http://dbpedia.org/resource/;)
 dbpprop  - prefix (iriRef http://dbpedia.org/property/;)
 foaf - prefix (iriRef http://xmlns.com/foaf/0.1/;)
 
 x- var
 name - var
 page - var
 
 triple x (dbpprop .:. genre) (resource .:. Web_browser)
 
 triple x (foaf .:. name) name
 triple x (foaf .:. page) page
 
 return [name, page]

It's currently available on Hackage [2], and at the moment the source
is only available from the tarball hosted there.

I'd greatly appreciate any feedback on this package.

Thanks!
Jeff Wheeler

[1] http://dbpedia.org/
[2] http://hackage.haskell.org/package/hsparql

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Non Empty List?

2009-06-04 Thread Jeff Wheeler
On Fri, 2009-06-05 at 02:08 +0200, GüŸnther Schmidt wrote:

 As for the zipper: In some of the examples I've seen, the zipper is 
 implemented on top of an underlying data structure, but not the data 
 structure itself.
 In my app I was actually going to pull a zipper over it, once I had the 
 underlying structure right.

I have a package on Hackage that implements a zipper-ish non-empty list
structure. PointedList [1] is a datatype composed of a list of items on
the left, the current item, and a list of items on the right.

Is that close to what you're looking for?

[1]
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/pointedlist

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] May all logos be freely used?

2009-05-27 Thread Jeff Wheeler
On Tue, 2009-05-26 at 18:36 +0200, Max Rabkin wrote:

 So at least any logos on the wiki should be usable under that license.

Furthermore, I released all my logos (the lambda/bind combination that
won) into the Public Domain. Of course, derive from them as you wish,
and there are a couple of tools around to generate various versions with
roudedness and different colors.

Jeff Wheeler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Error message reform (was: Strange type error with associated type synonyms)

2009-05-27 Thread Jeff Wheeler
On Thu, 2009-05-28 at 01:45 +0400, Bulat Ziganshin wrote:

 for me, it was better than ghc errmsg. main thing is that i don't feel
 automatically what is expected and what is inferred. here Hugs says
 that True is Bool and the remaining is Int, so i feel the situation

I absolutely agree about expected/inferred. I always forget which is
which, because I can figure both could apply to each.

Say, in this simple example:

 Prelude let f = (+5)
 Prelude f abc
 
 interactive:1:2:
 Couldn't match expected type `Integer'
against inferred type `[Char]'
 In the first argument of `f', namely `abc'
 In the expression: f abc
 In the definition of `it': it = f abc

Does expected mean that, based on the type signature, it should be an
Integer, or based on the argument that I provided, it should be a
String? The same goes for the inferred type: it knows what the type of
the literal argument (String), so I would assume the inferred type was
the type in the function's signature. Unfortunately, my reasoning in
both cases can go the wrong way . . .

Better language may be much more helpful, although I'm not sure what may
be easier to interpret.

Jeff Wheeler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[2]: [Haskell-cafe] Re: Error message reform (was: Strange type error with associated type synonyms)

2009-05-27 Thread Jeff Wheeler
On Wed, 2009-05-27 at 23:59 -0400, John Dorsey wrote:


 There was one hang-up; it wasn't at all clear which referred to the term,
 and which referred to the context.  (Really both types are inferred.) This
 stopped bothering me when I decided it didn't matter which was which, and I
 could generally find the problem pretty quickly just knowing the location
 and the types involved.
 
 Of course, I can see how the messages are probably much less useful to
 non-native speakers, and that's quite important.  Something along the lines
 of inferred type droozle for term, but expected type snidgit in
 context.

As a native English speaker myself, I've also found it awkward because
both types are inferred, I suppose.

The alternate format you've suggested would make it much more clear, in
my opinion, and I strongly feel that the current version should be
replaced with yours.

Jeff Wheeler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] WolframAlpha

2009-05-06 Thread Jeff Wheeler
On Wed, 2009-05-06 at 17:13 -0700, Warren Henning wrote:

 What I'd like to see most is WolframAlpha in action. At this point it
 is vaporware to me and for all I know this could be the beginning of a
 neverending charade of coming to a Interwebs near you Real Soon Now
 every few months for the next 10 years, like Duke Nukem Forever.

The website says May 2009 (this month), and I don't know of any previous
announcements claiming to have a date. I'm buying this one.

Jeff Wheeler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Best text editor

2009-04-14 Thread Jeff Wheeler
On Tue, 2009-04-14 at 11:34 +0200, Achim Schneider wrote:

 Yes, and I figured I'd have to edit the keymap to get productive. While
 it features a fully functional subset of vim that's more than enough to
 efficiently edit files, it's not the subset I use... and then I was too
 lazy to actually do it.

As one of the Yi developers, I'd love to hear some more specific
feedback on this. Do you remember any specific Vim features that were
missing?

 Documentation is badly lacking, too, it's like trying to configure
 xmonad without xmonad-contrib and all the docs.

This is slowly improving, and Yi's haddock documentation now builds
fine. This should soon be available on Hackage also, when the Haddock
there is upgraded.

Jeff Wheeler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Link errors in Gtk2Hs are more general than I thought.

2009-04-04 Thread Jeff Wheeler
On Sun, 2009-04-05 at 07:12 +0200, Bertram Felgenhauer wrote:

 This looks like the quartz backend was disabled in the cairo C library,
 not like a gtk2hs problem. I don't know how ports work, but
 
   http://trac.macports.org/browser/trunk/dports/graphics/cairo/Portfile
 
 defines a 'quartz' variant that enables that backend. Another idea is
 to reinstall pango.

I installed Gtk2Hs on a similar machine earlier tonight, with much
success, even with Yi.

I did not use MacPorts, and instead followed the instructions on the
HaskellWiki [1] under Using the GTK+ OS X Framework (including
compiling pkg-config from src). I'm not sure how having attempted the
installation through MacPorts may have littered your system,
unfortunately.

After that installation has succeeded, compiling Yi normally and running
`yi -fpango` to launch the GTK UI should work. Earlier tonight, though,
I reported an issue that causes only the first line of any buffer in the
Pango Yi UI to be visible [2], which makes this much less useful.

Jeff Wheeler

[1] http://www.haskell.org/haskellwiki/Gtk2Hs
[2] http://code.google.com/p/yi-editor/issues/detail?id=261

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] The votes are in!

2009-03-24 Thread Jeff Wheeler
Yay, thanks everybody!

As Eelco pointed out, Darrin Thompson deserves much of the credit for
coming up with the design; I just made it pretty in Photoshop. :)

On Tue, 2009-03-24 at 08:29 -0400, John Van Enk wrote:

 Is this the part where all the pundits come out and talk about how
 Jeff isn't a citizen, eats babies, and wants to turn Haskell into an
 imperative language?

I'm a citizen! I have consciously never executed unsafePerformIO (I know
better!). I have been hanging about quite regularly for a little over a
year now, when I started playing with Yi, and then intermittently
contributing there. I now hang about in #yi most every day, and #haskell
quite frequently too.

I rarely have anything sufficiently interesting for the mailing list. ;)

Again, thanks (and Darrin, too)!

Jeff Wheeler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] runghc Setup.hs doitall

2009-01-18 Thread Jeff Wheeler
On Sun, 2009-01-18 at 16:22 +, Sebastian Sylvan wrote:

 Is there some sort of bundle that you can use to install cabal-install 
 easily? Because it looks to me like I'd have to spend the better part of an 
 evening manually downloading and installing the gazillion of dependencies it 
 has, which is far too much work when I just wanted to spend ten minutes 
 playing with some package...

There's a bootstrap.sh file in root of the cabal-install that can do
this automatically.

In my experience, it usually fails because of missing dependencies like
zlib-dev on my own system, but those are easy to fix, at which point I
can rerun the bootstrap script.

Jeff Wheeler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] runghc Setup.hs doitall

2009-01-18 Thread Jeff Wheeler
On Sun, 2009-01-18 at 18:24 +, Duncan Coutts wrote:

  In my experience, it usually fails because of missing dependencies like
  zlib-dev on my own system, but those are easy to fix, at which point I
  can rerun the bootstrap script.
 
 Patches accepted.

Without digressing too much, I don't think much can be done here. I
would not (and should not) expect the bootstrap.sh file to use apt to
get the missing dependencies as I had to do.

I don't think there's any general solution to this, beyond better error
handling (which apparently you just improved).

Jeff Wheeler

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Time for a new logo?

2008-12-17 Thread Jeff Wheeler
On Wed, 2008-12-17 at 08:42 -0500, Darrin Thompson wrote:

 If you play with the angles and vary the stroke thicknesses you'll
 probably get a friendlier look, vs. the military/airline look these
 have now. The first '' doesn't have to be the same thickness as the
 lambda.
 
 Just another $0.02 us. Thanks for running with it. Those look like I imagined.

Thanks for the feedback. I've made two versions[1][2] with subtle
rounded edges, although now it becomes evident that I have no design
skills. :)

I tried giving them varying thicknesses, but I couldn't get anything to
look quite right. Everybody is welcome to hack it; I've uploaded a PSD
[3] (Photoshop src file); unfortunately, I don't have Illustrator and
Inkscape is failing to compile. It might be easier for people to hack if
somebody could convert this to an Inkscape file. :-/

 X monad could have a variant of this logo too. X= (That's how I
 originally thought of it, just was too lazy to post it anywhere. Sorry
 about that.)

I like that too; not sure what to do for Yi, though.

Anybody mind if I add these to the wiki, too? I feel like I'm taking up
tons of space, there.

Jeff Wheeler

[1] http://media.nokrev.com/junk/haskell-logos/logo8.png
[2] http://media.nokrev.com/junk/haskell-logos/logo9.png
[3] http://media.nokrev.com/junk/haskell-logos/logo-rounded.psd


signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Time for a new logo?

2008-12-17 Thread Jeff Wheeler
On Thu, 2008-12-18 at 09:55 +1300, George Pollard wrote:

 Might be interesting to try angling the ends of the stems to look
 something more like the guillemot in [1]. I might try this in Gimp but
 I'm no designer :P

Unfortunately, neither am I. :P

The curvey version (3rd and 4th images on the wiki) is about the extent
of my graphic ability, but I'll try to give it a shot regardless.

Thanks for the feedback. :)

Jeff Wheeler


signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Jeff Wheeler

On Dec 16, 2008, at 17:40:27 GMT, Darrin Thompson  wrote:

My $0.02 us:

Apologies for ascii art, and hopefully gmail doesn't munge this:
I love this ASCII-art version. I tried to make a vector version of it  
in Photoshop, and I came up with this [1].


Any critiques/suggestions? I'm thinking about a second version that  
more obviously defines the second '' with color from the bottom-right  
part of the lambda.


Jeff Wheeler

[1]: http://media.nokrev.com/junk/haskell-logos/logo1.png___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Time for a new logo?

2008-12-16 Thread Jeff Wheeler
Darrin Thompson darrinth at gmail.com writes:

 My $0.02 us:
 
 Apologies for ascii art, and hopefully gmail doesn't munge this:

I love this ASCII-art version. I tried to make a vector version of it in 
Photoshop, and I came up with this [1] 
and [2].

Any critiques/suggestions? I'm thinking about a second version that more 
obviously defines the second '' with color from the bottom-right part of the 
lambda.

Jeff Wheeler

[1]: http://media.nokrev.com/junk/haskell-logos/logo1.png
[2]: http://media.nokrev.com/junk/haskell-logos/logo2.png

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Time for a new logo?

2008-12-16 Thread Jeff Wheeler


On Dec 16, 2008, at 10:08 PM, Ryan Grant wrote:


nice.
the first is better.
in the second, i don't even see the lambda.


Thanks the feedback. I just uploaded a new version [1] that is icon- 
sized, although the font used is Helvetica Neue, which is non-free. I  
have no free fonts on my Mac, unfortunately, so it'll stay for the  
moment.


Jeff Wheeler

[1] http://media.nokrev.com/junk/haskell-logos/logo4.png
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Terminal-like Application Design

2008-10-16 Thread Jeff Wheeler

Hi,

I'm a slight Haskell newbie, but I'm trying to write a terminal-like  
application that accepts simple commands with optional arguments, and  
can then execute them. Most of these commands will need IO, as later I  
will want to communicate over USB for most of them.


I was hoping, though, that I could get some comments on the initial  
architecture I've been playing with [1].


I suspect I should be using some sort of monad to represent the  
commands, but I don't fully understand monads, and am not sure how it  
would apply in this context.


Should I be using a monad here, and if so, how?

Thanks in advance,
Jeff Wheeler

[1] http://media.nokrev.com/junk/cli/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] maybe a goal and challenge for the Haskell in terms of scientific computing

2008-10-03 Thread Jeff Wheeler

On Oct 3, 2008, at 8:26 PM, Galchin, Vasili wrote:

Here is a site I discovered a while back for another  
language ... I guess in the back of my mind this more where

I was going vis-a-vis scientific computing  http://www.enthought.com/


I interned at Enthought over this last summer; it's a very cool place.  
Many of the open-source scientific libraries could be rewritten in  
Haskell without significant difficulty, and this actually seems like a  
decent idea.


SciPy and NumPy are the two most significant libraries worth thinking  
about, in my opinion. Some of the other software, e.g. Traits, is less  
relevant to scientific software in the context of Haskell.


Much of their stack, especially Traits, TraitsGUI, and application  
libraries are designed to help write applications quickly without much  
programming experience. With these tools, it's easy for scientists,  
without knowing much Python, to write large programs that work well  
for most of their purposes.


Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe