Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 11:19 PM, Tom Tobin wrote: >  In temporary lieu of posing questions explicitly to the SFLC, I dug > up a copy of _Intellectual Property and Open Source_ by Foobar ::facepalm:: I wrote "Foobar" as a placeholder as I was typing, and never replaced it. The author's name is V

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 8:19 PM, Robert Greayer wrote: > There's another FAQ on GNU site that, I think, addresses the Pandoc/Hakyll > situation directly: > > http://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL > > "You have a GPL'ed program that I'd like to link with my code to build a > propri

Re: [Haskell-cafe] A new form of newtype

2009-12-08 Thread Richard O'Keefe
On Dec 9, 2009, at 1:58 PM, John Millikin wrote: What would these types be used for? If your students are complaining about having to perform logarithms to store integers, inform them of the "Integer" type. I mentioned one student who couldn't compute log 32 *himself*

Re: [Haskell-cafe] ANNOUNCE: dbus-core 0.6 and dbus-client 0.2

2009-12-08 Thread John Millikin
0.7 released -- exposes the DBus.Wire module, which contains functions for marshaling and unmarshaling messages. Also supports detecting invalid UTF-8 when parsing (previously, it'd just error out). No other significant changes. https://dl.dropbox.com/u/1947532/dbus-core_0.7/index.html https://dl.

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Robert Greayer
On Tue, Dec 8, 2009 at 7:38 PM, Ivan Lazar Miljenovic < ivan.miljeno...@gmail.com> wrote: > Apologies, Robert, for you getting this twice: I forgot to CC the list > as well. > > Robert Greayer writes: > > The crux here is that the source code of hakyll, released on hackage, is > not > > a derivat

Re: [Haskell-cafe] How to understand such a `case` ?

2009-12-08 Thread Daniel Fischer
Am Mittwoch 09 Dezember 2009 02:26:11 schrieb zaxis: > thanks for your quick answer ! Then what's the advantage using such a > `case` not using `if` statement given by you ?   For me, the `if` statement > is more clear . Once you have a lot of possibilities to check, if-then-else cascades become

Re: [Haskell-cafe] How to understand such a `case` ?

2009-12-08 Thread Daniel Fischer
Am Mittwoch 09 Dezember 2009 01:59:21 schrieb zaxis: > findHelper (x:xs) = do -- not lazy, but that's not really important here > filex <- fileExists (file x) > filex' <- fileExists (file' x) > case () of > _ > > | filex -> return $ Just $ f

Re: [Haskell-cafe] How to understand such a `case` ?

2009-12-08 Thread zaxis
thanks for your quick answer ! Then what's the advantage using such a `case` not using `if` statement given by you ? For me, the `if` statement is more clear . jmillikin wrote: > > Sorry; forgot to CC the list > > That case is equivalent to: > > if filex >then return $ Just $ file x >

Re: [Haskell-cafe] Haskell job opportunity

2009-12-08 Thread Tom Hawkins
On Tue, Dec 8, 2009 at 6:54 PM, Tom Tobin wrote: > On Tue, Dec 8, 2009 at 11:09 AM, siki wrote: >> You should have at least a bachelor’s degree in computer science from a top >> university > > Might I humbly suggest that this is going to severely limit your > hiring options?  You're looking for t

Re: [Haskell-cafe] How to understand such a `case` ?

2009-12-08 Thread John Millikin
Sorry; forgot to CC the list That case is equivalent to: if filex then return $ Just $ file x else if filex' then return $ Just $ file' x else findHelper xs The specific syntax being used is called a "pattern guard": http://www.haskell.org/haskellwiki/Pattern_guard On Tue,

[Haskell-cafe] How to understand such a `case` ?

2009-12-08 Thread zaxis
findHelper (x:xs) = do -- not lazy, but that's not really important here filex <- fileExists (file x) filex' <- fileExists (file' x) case () of _ | filex -> return $ Just $ file x | filex'-> return $ Just $ file' x

Re: [Haskell-cafe] A new form of newtype

2009-12-08 Thread John Millikin
What would these types be used for? If your students are complaining about having to perform logarithms to store integers, inform them of the "Integer" type. The existing sized types -- Word/Int [8, 16, 32, 64] -- are useful primarily because they match up with "standard" integral data types in ot

Re: [Haskell-cafe] ANNOUNCE: dbus-core 0.6 and dbus-client 0.2

2009-12-08 Thread John Millikin
On Tue, Dec 8, 2009 at 16:00, Will Thompson wrote: > However, I can't find a way to feed a bytestring to dbus-core and get > back a ReceivedMessage. Is this deliberately not exposed? While it's > obviously not useful in general, it would be very useful for Bustle. > (The alternative is to construc

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Ivan Lazar Miljenovic
Apologies, Robert, for you getting this twice: I forgot to CC the list as well. Robert Greayer writes: > The crux here is that the source code of hakyll, released on hackage, is not > a derivative of Pandoc (it contains, as far as I understand it, no Pandoc > source code). A compiled executable

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 6:25 PM, Matthew Brecknell wrote: > Based on the discussion so far, I think you need to distinguish between > distributing source and distributing binaries. For example: > > Background: X is a library distributed under GPL. Y is another library > which calls external functio

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Matthew Brecknell
Tom Tobin wrote: > I'm thinking something along these lines: > > The background situation: X is a library distributed under the GPL. Y > is another library that uses that library and requires it in order to > compile and function. > > 1) Is there any scenario where Y can be distributed under a n

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 6:21 PM, Tom Tobin wrote: > Well I think that's actually what we're wondering here — under what > circumstances is Y's author permitted to choose his license at will? I think I phrased this poorly; it's more "under what circumstances is Y's author permitted to distribute Y

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 6:10 PM, Erik de Castro Lopo wrote: > Tom Tobin wrote: > >> The background situation: X is a library distributed under the GPL.  Y >> is another library that uses that library and requires it in order to >> compile and function. > > You probably also need to bring in applica

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Erik de Castro Lopo
Tom Tobin wrote: > The background situation: X is a library distributed under the GPL. Y > is another library that uses that library and requires it in order to > compile and function. You probably also need to bring in application Z which uses library X via library Y, because library Y is not u

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Ketil Malde
Tom Tobin writes: > 1) Is there any scenario where Y can be distributed under a non-GPL > license (e.g., the BSD)? > 2) If so, what would Y's author need to do (or *not* do)? > 3) If Y must be released under the GPL under the above scenario, and > someone subsequently wrote library Z, an API co

Re: [Haskell-cafe] ANNOUNCE: dbus-core 0.6 and dbus-client 0.2

2009-12-08 Thread Will Thompson
Hi John, Very nice work! As it happens, Dafydd Harries and I wrote another native implementation of the D-Bus protocol, but yours is much more complete, and the documentation/commentary is ace. A refreshing change from the daily pain of libdbus and dbus-glib... :-) I'm looking at modifying Bustle

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 5:09 PM, Erik de Castro Lopo wrote: > Tom Tobin wrote: >> I can write the SFLC and pose a hypothetical situation that captures >> the gist of what we're talking about, and post the response here, if >> anyone is interested. > > I suggest that you put together a question, pos

Re: [Haskell-cafe] Re: Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 4:56 PM, Ben Franksen wrote: >> On Tue, 8 Dec 2009, Tom Tobin wrote: >>> Seriously, no, this is *totally* wrong reading of the GPL, probably >>> fostered by a misunderstanding of the term "GPL-compatible license". >>> GPL-compatible means the compatibly-licensed work can be

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Ketil Malde
Tom Tobin writes: > Your contributions could still be licensed under a different license > (e.g. BSD), as long as the licensing doesn't prevent somebody else to > pick it up and relicense it under GPL. Right. So hakyll is absolutely fine with a BSD3 license, AFAICS. >>> Serious

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 4:38 PM, Robert Greayer wrote: > Not to belabor the point (I hope), but consider the following situation -- > if the current version of Pandoc, 1.2.1, were released under BSD3, not GPL, > it would be obvious that the current version of hakyll could be released as > BSD3 as w

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 5:15 PM, Gregory Crosswhite wrote: > On Tue, Dec 8, 2009 at 4:46 PM, Tom Tobin wrote: > > The crux here is that the source code of hakyll, released on hackage, is not > a derivative of Pandoc (it contains, as far as I understand it, no Pandoc > source code).  A compiled exe

Re: [Haskell-cafe] "Rebox Package" or "To Hackage or not to Hackage"

2009-12-08 Thread David Menendez
On Tue, Dec 8, 2009 at 4:25 PM, Vitaliy Akimov wrote: > Hi John, > > I don't know if this is useful for you, but these are instances of > Cofunctor's comap. For example if we use TypeCompose package we have: > > rebox f = unFlip . cofmap f . Flip Alternately, rebox = flip (.) -- Dave Menendez

Re: [Haskell-cafe] Haskell job opportunity

2009-12-08 Thread Sebastian Sylvan
On Tue, Dec 8, 2009 at 5:54 PM, Tom Tobin wrote: > On Tue, Dec 8, 2009 at 11:09 AM, siki wrote: > > I've posted this before but did not get a whole lot of responses, so here > it > > is again: > [...] > > You should have at least a bachelor’s degree in computer science from a > top > > universit

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Gregory Crosswhite
> On Tue, Dec 8, 2009 at 4:46 PM, Tom Tobin wrote: > > The crux here is that the source code of hakyll, released on hackage, is not > a derivative of Pandoc (it contains, as far as I understand it, no Pandoc > source code). A compiled executable *is* a derivative of Pandoc, so anyone > who *d

Re: [Haskell-cafe] Zumkeller numbers

2009-12-08 Thread Daniel Fischer
Am Mittwoch 09 Dezember 2009 00:02:30 schrieb Lennart Augustsson: > And if you use quotRem it's faster (unless you're running on some > exotic hardware like NS32K). Yes, but Henning Thielemann was busy in the exception vs. error thread, so I didn't want to distract him by using quotRem :D __

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Erik de Castro Lopo
Tom Tobin wrote: > IANAL either, Ditto! > but my understanding is that judges take a very dim view > of attempts like this to evade the requirements of a license. I can't see how any judge could possibly come to that conclusion in this case. Studying the terms of the GPL and the BSD3 a lawyer

Re: [Haskell-cafe] Zumkeller numbers

2009-12-08 Thread Lennart Augustsson
And if you use quotRem it's faster (unless you're running on some exotic hardware like NS32K). On Tue, Dec 8, 2009 at 10:19 PM, Richard O'Keefe wrote: > > On Dec 9, 2009, at 1:15 AM, Daniel Fischer wrote: > >> Am Dienstag 08 Dezember 2009 08:44:52 schrieb Ketil Malde: >>> >>> "Richard O'Keefe" w

[Haskell-cafe] Re: Re: ANN: hakyll-0.1

2009-12-08 Thread Ben Franksen
Tom Tobin wrote: > On Tue, Dec 8, 2009 at 4:13 PM, Robert Greayer > wrote: >> On Tue, Dec 8, 2009 at 4:46 PM, Tom Tobin wrote: >>> >>> On Tue, Dec 8, 2009 at 3:30 PM, Ben Franksen >>> wrote: >>> > Ketil Malde wrote: >>> >> Your contributions could still be licensed under a different license >>>

[Haskell-cafe] Re: Re: ANN: hakyll-0.1

2009-12-08 Thread Ben Franksen
Ganesh Sittampalam wrote: > On Tue, 8 Dec 2009, Tom Tobin wrote: >> On Tue, Dec 8, 2009 at 3:30 PM, Ben Franksen >> wrote: >>> Ketil Malde wrote: Your contributions could still be licensed under a different license (e.g. BSD), as long as the licensing doesn't prevent somebody else to >>>

Re: [Haskell-cafe] Interactive chatbot

2009-12-08 Thread Torsten Otto
No worries, I'd rather have it twice than not at all :-) Thank you all for the helpful tipps. We ended up knowing a lot more about Haskell. The easiest solution however, was to compile it all into an application - tadaa, deleting works as wished for. Regards, Torsten Am 05.11.2009 um 02:00 sch

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Robert Greayer
On Tue, Dec 8, 2009 at 5:13 PM, Robert Greayer wrote: > > The crux here is that the source code of hakyll, released on hackage, is > not a derivative of Pandoc (it contains, as far as I understand it, no > Pandoc source code). A compiled executable *is* a derivative of Pandoc, so > anyone who *d

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 4:17 PM, Warren Henning wrote: > Am I the only one who finds this stuff confusing as hell? It *is* confusing as hell, because law is confusing as hell, because it's an "interpreted language" of sorts — what matters is how judges rule on the law, not just the law as written.

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 4:13 PM, Robert Greayer wrote: > On Tue, Dec 8, 2009 at 4:46 PM, Tom Tobin wrote: >> >> On Tue, Dec 8, 2009 at 3:30 PM, Ben Franksen >> wrote: >> > Ketil Malde wrote: >> >> Your contributions could still be licensed under a different license >> >> (e.g. BSD), as long as th

Re: [Haskell-cafe] Zumkeller numbers

2009-12-08 Thread Richard O'Keefe
On Dec 9, 2009, at 1:15 AM, Daniel Fischer wrote: Am Dienstag 08 Dezember 2009 08:44:52 schrieb Ketil Malde: "Richard O'Keefe" writes: factors n = [m | m <- [1..n], mod n m == 0] -- saves about 10% time, seems to give the same result: factors n = [m | m <- [1..n `div` 2], mod n m == 0]++

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Warren Henning
Am I the only one who finds this stuff confusing as hell? On Tue, Dec 8, 2009 at 2:13 PM, Robert Greayer wrote: > The crux here is that the source code of hakyll, released on hackage, is not > a derivative of Pandoc (it contains, as far as I understand it, no Pandoc > source code).  A compiled ex

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Robert Greayer
On Tue, Dec 8, 2009 at 4:46 PM, Tom Tobin wrote: > On Tue, Dec 8, 2009 at 3:30 PM, Ben Franksen > wrote: > > Ketil Malde wrote: > >> Your contributions could still be licensed under a different license > >> (e.g. BSD), as long as the licensing doesn't prevent somebody else to > >> pick it up and

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 3:46 PM, Tom Tobin wrote: > If you are forming a derivative work based on the GPL'd > work, and thus you have to release that derivative work under the GPL. Wow, I mangled the syntax on that last sentence. That should read: "If you are forming a derivative work based on t

Re: [Haskell-cafe] The Transient monad

2009-12-08 Thread Twan van Laarhoven
Alberto G. Corona wrote: Hi haskell cafe: concerning Stable Names The IO in makeStableName suggest more side effects than makeStableName really do. But still the call isn't pure. For calls such are makeStableName that gives a different result the FIRST time they are called but return the

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Ganesh Sittampalam
On Tue, 8 Dec 2009, Tom Tobin wrote: On Tue, Dec 8, 2009 at 3:30 PM, Ben Franksen wrote: Ketil Malde wrote: Your contributions could still be licensed under a different license (e.g. BSD), as long as the licensing doesn't prevent somebody else to pick it up and relicense it under GPL. At lea

Re: [Haskell-cafe] "Rebox Package" or "To Hackage or not to Hackage"

2009-12-08 Thread Holger Siegel
Am Dienstag, den 08.12.2009, 23:25 +0200 schrieb Vitaliy Akimov: > Hi John, > > I don't know if this is useful for you, but these are instances of > Cofunctor's comap. For example if we use TypeCompose package we have: > > rebox f = unFlip . cofmap f . Flip > > The rest are also Cofunctors. Ther

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 3:30 PM, Ben Franksen wrote: > Ketil Malde wrote: >> Your contributions could still be licensed under a different license >> (e.g. BSD), as long as the licensing doesn't prevent somebody else to >> pick it up and relicense it under GPL. >> >> At least, that's how I understan

[Haskell-cafe] Re: The Transient monad

2009-12-08 Thread Ben Franksen
+1 Alberto G. Corona wrote: > Hi haskell cafe: > > concerning Stable Names > > http://www.haskell.org/ghc/docs/6.10.4/html/libraries/base/System-Mem-StableName.html > > > makeStableName :: a -> IO (StableName a) > > I Did not test fully my proposal, and I´m thinking aloud, Just to inpire > o

[Haskell-cafe] Re: Lisp like symbols in haskell

2009-12-08 Thread Ben Franksen
Vladimir Zlatanov wrote: > I think stable names can be used where symbols are used in scheme. I > think there are better alternatives for different use cases in > haskell. > > For example, symbols are often used to tag values - haskell has > pattern matching on constructors. Here is a link: htt

[Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-08 Thread Ben Franksen
Ketil Malde wrote: > minh thu writes: >> Why should your code be licensed under GPL? > > I think your code is covered by whatever license you wish. > > An aggregate work, on the other hand, would need to be covered by the > GPL, and all source code would have to be available under GPL terms. So

Re: Re[2]: [Haskell-cafe] can there be (hash-table using) O(n) version of this (I think currently) n log n algo?

2009-12-08 Thread Alberto G. Corona
Any application where multiple updates are done in multiple threads . gain by using a hashTable 2009/7/18 Bulat Ziganshin > Hello Thomas, > > Saturday, July 18, 2009, 7:23:10 PM, you wrote: > > > Going back to my original question, I am now looking for a dead simple > > motivating example for sh

Re: [Haskell-cafe] "Rebox Package" or "To Hackage or not to Hackage"

2009-12-08 Thread Vitaliy Akimov
Hi John, I don't know if this is useful for you, but these are instances of Cofunctor's comap. For example if we use TypeCompose package we have: rebox f = unFlip . cofmap f . Flip The rest are also Cofunctors. There are a few options. You can either specify instances or use type combinators fro

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Florian Weimer
* jean-christophe mincke: > Has there already been attempts to introduce lisp like symbols in haskell? Do you mean something like Objective Caml's polymorphic variants? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailma

Re: [Haskell-cafe] Zumkeller numbers

2009-12-08 Thread Richard O'Keefe
On Dec 8, 2009, at 8:44 PM, Ketil Malde wrote: "Richard O'Keefe" writes: factors n = [m | m <- [1..n], mod n m == 0] I should remark that I wasn't *trying* to write fast code. I was trying to code as directly as I could, fully expecting to have to rewrite later. I was pleasantly surprised

[Haskell-cafe] A new form of newtype

2009-12-08 Thread Richard O'Keefe
Haskell is very nearly a high level language. One rather unpleasant way in which it lets the the underlying machine show through is integral types. Aside from the unbounded Integer type, which is fine, there are integral types bounded by machine sizes: Int, size unspecified, Data.Int.Int{8,16,32,

Re: [Haskell-cafe] Re: can there be (hash-table using) O(n) version of this (I think currently) n log n algo?

2009-12-08 Thread Jon Harrop
On Sunday 19 July 2009 09:26:14 Heinrich Apfelmus wrote: > Thomas Hartman wrote: > > The code below is, I think, n log n, a few seconds on a million + element > > list. > > > > I wonder if it's possible to get this down to O(N) by using a > > hashtable implemementation, or other better data structu

[Haskell-cafe] "Rebox Package" or "To Hackage or not to Hackage"

2009-12-08 Thread John Van Enk
Hi List, I've recently had a situation where I used the same pattern quite a bit while reducing and evaluating an AST. I quickly wrapped the operation in a package and stuck it on github. http://github.com/sw17ch/rebox/blob/master/src/Data/Rebox.hs I'm wondering two things: 1) Does any one reco

[Haskell-cafe] Re: Handles with their IOMode in their type

2009-12-08 Thread Lee Houghton
On 08/12/2009 03:54, Bas van Dijk wrote: Could not get to sleep tonight so I got up and hacked this together: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=13782 Does something like this already exist on hackage: If not, I may turn this into a package and upload it tomorrow. Comments, critici

Re: [Haskell-cafe] Haskell job opportunity

2009-12-08 Thread Tom Tobin
On Tue, Dec 8, 2009 at 11:09 AM, siki wrote: > I've posted this before but did not get a whole lot of responses, so here it > is again: [...] > You should have at least a bachelor’s degree in computer science from a top > university Might I humbly suggest that this is going to severely limit your

[Haskell-cafe] Haskell job opportunity

2009-12-08 Thread siki
I've posted this before but did not get a whole lot of responses, so here it is again: Principal investment firm based in Manhattan is looking for an outstanding software developer to develop and maintain the firm's proprietary valuation models as well as accounting and portfolio management syste

Re: [Haskell-cafe] SmallCheck design question

2009-12-08 Thread Neil Mitchell
Hi, I'm cc'ing the people behind smallcheck, who can give definitive answers. > 1. why are the tuple constructors treated differently? > I'd expect depth (x,y) = succ $ max (depth x) (depth y) > but the succ is missing. I think this was a design choice. Some people would consider: data Foo = Fo

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-08 Thread John A. De Goes
X-Saiga. Regards, John On Dec 8, 2009, at 7:10 AM, Adam Cigánek wrote: > Hello there, > > Is there some other parser library, with similar nice API than Parsec, > but which somehow handles left-recursive grammars? Ideally if it has > at least rudimentary documentation and/or tutorial :) > ___

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-08 Thread S. Doaitse Swierstra
In principle it is not possible to parse left-recursive grammars, but you may follow the following route: 1 write your grammars using the constructors from the Christmastree package at: http://hackage.haskell.org/packages/archive/ChristmasTree/0.1.2/doc/html/Text-GRead-Grammar.html 2 i

[Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-08 Thread Adam Cigánek
Hello there, Is there some other parser library, with similar nice API than Parsec, but which somehow handles left-recursive grammars? Ideally if it has at least rudimentary documentation and/or tutorial :) ___ Haskell-Cafe mailing list Haskell-Cafe@hask

RE: [Haskell-cafe] diff implementation in haskell

2009-12-08 Thread Bayley, Alistair
> From: haskell-cafe-boun...@haskell.org > [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Ketil Malde > > Don Stewart writes: > > > > http://hackage.haskell.org/package/Diff > > Wherein we can read: > > | This is an implementation of the O(ND) diff algorithm > [...]. It is O(mn)

Re: [Haskell-cafe] ANNOUNCE: new installment of failure framework

2009-12-08 Thread José Iborra
On Dec 8, 2009, at 1:47 PM, Michael Snoyman wrote: > For example, let's say I want to write some code to authenticate a user via > OpenID (see the authenticate package). It has to do at least two things: > > * Download pages by HTTP > * Parse the resulting HTML page. > > I would like to ideall

Re: [Haskell-cafe] ANNOUNCE: new installment of failure framework

2009-12-08 Thread Michael Snoyman
On Tue, Dec 8, 2009 at 11:51 AM, Gregory Crosswhite < gcr...@phys.washington.edu> wrote: > Michael, > > Although I like the idea of improving the way that failures are handled in > Haskell, I am having trouble seeing any reason to use your framework. > > If a function is always assumed to succeed

[Haskell-cafe] The Transient monad

2009-12-08 Thread Alberto G. Corona
Hi haskell cafe: concerning Stable Names http://www.haskell.org/ghc/docs/6.10.4/html/libraries/base/System-Mem-StableName.html makeStableName :: a -> IO (StableName a) I Did not test fully my proposal, and I´m thinking aloud, Just to inpire others and fish some ideas; The IO in makeStableName

[Haskell-cafe] Re: binding to C libraries on Windoww

2009-12-08 Thread John Lato
> From: Andrew Coppin > > John Lato wrote: > >> The only workable approach is to have users specify the >> locations of these files, which unfortunately requires more >> sophistication than can be expected of most Windows users (and even >> some Windows developers). >> > > Well, I don't know. It's

Re: [Haskell-cafe] Zumkeller numbers

2009-12-08 Thread Daniel Fischer
Am Dienstag 08 Dezember 2009 08:44:52 schrieb Ketil Malde: > "Richard O'Keefe" writes: > > factors n = [m | m <- [1..n], mod n m == 0] > > -- saves about 10% time, seems to give the same result: > factors n = [m | m <- [1..n `div` 2], mod n m == 0]++[n] Even faster (for large enough n): fact

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Vladimir Zlatanov
wrote: > I think lisp like symbols could be quite useful in the context of embedded > DSL to create ... well... symbols that can be interpreted as variables in > that DSL. Well for such use-case you could use either stable names, or recode them into a state monad- you will get either a global i.e

Re: [Haskell-cafe] ANN: hakyll-0.1

2009-12-08 Thread Ketil Malde
minh thu writes: > I wonder how APIs are covered. I don't think an API would be covered. The API is the standard way to use something, if copyright licenses cover usage like this, any executable will be a derivative of the operating system and (possibly) the compiler. > Why should your code

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-08 Thread Deniz Dogan
2009/12/8 Jon Fairbairn : > Deniz Dogan writes: > >> Has there been any serious suggestion or attempt to change the syntax >> of Haskell to allow hyphens in identifiers, much like in Lisp >> languages? E.g. hello-world would be a valid function name. > > I (among others) suggested it right at the

Re: [Haskell-cafe] ANN: hakyll-0.1

2009-12-08 Thread minh thu
2009/12/8 Ivan Lazar Miljenovic : > Gregory Crosswhite writes: >> That really just means that BSD3 code can be used in GPL code; you >> still have to release your own code as GPL if you are including any >> GPL code. > > Not quite true: it means that any code your BSD3 library gets used in > has t

Re: [Haskell-cafe] ANN: hakyll-0.1

2009-12-08 Thread Ivan Lazar Miljenovic
Gregory Crosswhite writes: > That really just means that BSD3 code can be used in GPL code; you > still have to release your own code as GPL if you are including any > GPL code. Not quite true: it means that any code your BSD3 library gets used in has to have a GPL-compatible license: http://www

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread jean-christophe mincke
I think lisp like symbols could be quite useful in the context of embedded DSL to create ... well... symbols that can be interpreted as variables in that DSL. I can imagine something such as a small relational DSL i.e Without symbols we have several alternatives: 1. Symbols are written as strin

[Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-08 Thread Jon Fairbairn
Deniz Dogan writes: > Has there been any serious suggestion or attempt to change the syntax > of Haskell to allow hyphens in identifiers, much like in Lisp > languages? E.g. hello-world would be a valid function name. I (among others) suggested it right at the beginning when we were first defini

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Ketil Malde
Luke Palmer writes: > data Sym = Sym String Hash > > fromString :: String -> Sym > fromString s = Sym s (hash s) > > instance Eq Sym where > Sym _ h == Sym _ h' = h == h' > Much as I am uncomfortable with hash-based equality. 1/2^256, despite > being very small, is not zero. It is begging

[Haskell-cafe] Allowing hyphens in identifiers

2009-12-08 Thread Deniz Dogan
Has there been any serious suggestion or attempt to change the syntax of Haskell to allow hyphens in identifiers, much like in Lisp languages? E.g. hello-world would be a valid function name. -- Deniz Dogan ___ Haskell-Cafe mailing list Haskell-Cafe@has

Re: [Haskell-cafe] ANNOUNCE: new installment of failure framework

2009-12-08 Thread Gregory Crosswhite
Michael, Although I like the idea of improving the way that failures are handled in Haskell, I am having trouble seeing any reason to use your framework. If a function is always assumed to succeed given certain pre-conditions, and somewhere along the lines my code discovers that one of these ha

Re: [Haskell-cafe] ANN: hakyll-0.1

2009-12-08 Thread Magnus Therning
On Tue, Dec 8, 2009 at 8:22 AM, Gregory Crosswhite [..] > If Pandoc is LGPL, then I think that means we are dealing with an entirely > different situation, one in which the library user can choose whatever > license he or she likes for his or her own code as long as any modifications > to the LG

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Luke Palmer
On Tue, Dec 8, 2009 at 1:48 AM, Michael Vanier wrote: > Do you mean symbols as in "interned strings with an O(1) string comparison > method"?  I would love to have those, but I don't see an easy way to get it > without being in the IO or ST monad. data Sym = Sym String Hash fromString :: String

Re[2]: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Bulat Ziganshin
Hello Michael, Tuesday, December 8, 2009, 11:48:09 AM, you wrote: > Do you mean symbols as in "interned strings with an O(1) string > comparison method"? I would love to have those, but I don't see an easy > way to get it without being in the IO or ST monad. you could intern IO usage with unsaf

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread minh thu
Probably in the same way integers are made redundant : data Integer = 0 | 1 | 2 | Cheers, Thu 2009/12/8 Lyndon Maydwell : > Aren't symbols made redundant by algebraic data types? > > On Tue, Dec 8, 2009 at 4:48 PM, Michael Vanier wrote: >> jean-christophe mincke wrote: >>> >>> Hello, >>> >>

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Vladimir Zlatanov
I think stable names can be used where symbols are used in scheme. I think there are better alternatives for different use cases in haskell. For example, symbols are often used to tag values - haskell has pattern matching on constructors. ___ Haskell-Ca

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Lyndon Maydwell
Aren't symbols made redundant by algebraic data types? On Tue, Dec 8, 2009 at 4:48 PM, Michael Vanier wrote: > jean-christophe mincke wrote: >> >> Hello, >> >> Has there already been attempts to introduce lisp like symbols in haskell? >> >> >> Thank you >> >> Regards >> >> J-C >> > > J-C, > > Do

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Michael Vanier
jean-christophe mincke wrote: Hello, Has there already been attempts to introduce lisp like symbols in haskell? Thank you Regards J-C J-C, Do you mean symbols as in "interned strings with an O(1) string comparison method"? I would love to have those, but I don't see an easy way to get

RE: [Haskell-cafe] ANN: hakyll-0.1

2009-12-08 Thread Sittampalam, Ganesh
Gregory Crosswhite wrote: >> Tom Tobin wrote: >> >> The 3 clause BSD license is officially a GPL compatible license. >> See: >> >> >> http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses >> >> It is within the terms of the GPL to link GPL code to a bunch of BSD3 >> code as l

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Stephen Tetley
Hi Jean-Christophe There is no mention in the 'History of Haskell' which is probably the most authoritative published reference http://research.microsoft.com/en-us/um/people/simonpj/papers/history-of-haskell/index.htm If someone wanted to introduce symbols, they would presumably have to propose

Re: [Haskell-cafe] ANN: hakyll-0.1

2009-12-08 Thread Erik de Castro Lopo
Gregory Crosswhite wrote: > >> I *really* wish Pandoc would switch to a non-copyleft license. > > > > The LGPL is still a copyleft license. Do you still have a problem > > with that? > > If Pandoc is LGPL, I wasn't suggesting that pandoc was LGPL, I was probing the other posters attitudes to c

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread Ariel J. Birnbaum
On Tue, 2009-12-08 at 09:21 +0100, jean-christophe mincke wrote: > Hello, > > Has there already been attempts to introduce lisp like symbols in > haskell? I'm not sure if this answers your question, but there is an attempt to mix Lisp syntax with Haskell semantics, called Liskell. Description: h

Re: [Haskell-cafe] ANN: hakyll-0.1

2009-12-08 Thread Gregory Crosswhite
> Tom Tobin wrote: > > The 3 clause BSD license is officially a GPL compatible license. See: > >http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses > > It is within the terms of the GPL to link GPL code to a bunch of BSD3 code > as long as you abide by both the GPL and the B

[Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread jean-christophe mincke
Hello, Has there already been attempts to introduce lisp like symbols in haskell? Thank you Regards J-C ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe