Re: [Haskell-cafe] help with musical data structures
Stephen Tetley wrote: Hello Mike A pitch class set represents Z12 numbers so I'd define a Z12 number type then store it in a list (if you have need a multiset - duplicates) or Data.Set (if you need uniqueness). If you want an efficient implementation for *sets* of Z12 numbers I'd recommend using bit arithmetic. Pick some Word type with at least 12 bits and use bit0 to represent including 0 in the set, bit1 to represent including 1, bit2 for 2, etc. This can be generalized for any Zn provided n is a suitably small number. Z16 may be a good place to start if you want wider applicability, though you'd want to wrap that with error checking code in order to exclude 12..15. import Data.Word import Data.Bits newtype Z16 = Z16 Word16 z16_0 = 1 `shiftL` 0 z16_1 = 1 `shiftL` 1 z16_2 = 1 `shiftL` 2 ... union= (.|.) intersection = (..) ... But I don't know whether you need to deal more with sets or with the elements therein, so that might reduce the efficiency of this approach. -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Logistic regression
Is there any free code anywhere for performing logistic regression? I can't see anything on hackage. -- Colin Adams Preston Lancashire ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Strange parallel behaviour with Ubuntu Karmic / GHC 6.10.4
Michael Lesniak wrote: Hello, I've written a smaller example which reproduces the unusual behaviour. Should I open a GHC-Ticket, too? Hi, I get these results: $ time ./Temp +RTS -N1 -RTS 16 real0m16.010s user0m10.869s sys0m5.144s $ time ./Temp +RTS -N2 -RTS 16 real0m12.794s user0m13.341s sys0m7.136s Looking at top, the second version used ~160% CPU time (i.e. it was using both cores fairly well). So I don't think I get the same bad behaviour as you. Those sys times look high by the way -- I guess it's all the calls to getTime? I wonder if that number might be causing the problem; can you replicate it with lower sys times? Thanks, Neil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Strange parallel behaviour with Ubuntu Karmic / GHC 6.10.4
Hello, getTime? I wonder if that number might be causing the problem; can you replicate it with lower sys times? That was it! Thanks Neil! When I'm using some number crunching without getTime it works (with more or less the expected speedup and usage of two cores) on my Ubuntu 9.10, too. Out of curiosity, the question is still open: Why does the old example (using getTime) work so much better on an older version of Ubuntu/RedHat and not on the new ones? Kind regards, Michael -- Dipl.-Inf. Michael C. Lesniak University of Kassel Programming Languages / Methodologies Research Group Department of Computer Science and Electrical Engineering Wilhelmshöher Allee 73 34121 Kassel Phone: +49-(0)561-804-6269 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] About xmonad
2009/11/16 zaxis z_a...@163.com: %uname -a Linux myarch 2.6.31-ARCH #1 SMP PREEMPT Tue Nov 10 19:48:17 CET 2009 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 3600+ AuthenticAMD GNU/Linux %xmonad --version xmonad 0.9 In firefox, the `save as` dialog doesnot appear when i want to choose picture to save by right clicking the mouse. %cat ~/.xmonad/xmonad.hs import XMonad import XMonad.Hooks.ManageDocks import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageHelpers import XMonad.Util.Run(spawnPipe) import XMonad.Layout.TwoPane import XMonad.Layout.WindowNavigation import qualified XMonad.StackSet as W import qualified Data.Map as M main = do xmonad $ defaultConfig { borderWidth = 1 , focusedBorderColor = #ff , normalBorderColor = #aa , manageHook = manageHook defaultConfig + myManageHook , workspaces = map show [1 .. 10 :: Int] , terminal = roxterm , modMask = mod4Mask , focusFollowsMouse = True , startupHook = myStartupHook , logHook = myLogHook , layoutHook = windowNavigation $ avoidStruts $ (Mirror tall ||| tall ||| Full) --, layoutHook = ewmhDesktopsLayout $ windowNavigation $ avoidStruts $ (Mirror tall ||| tall ||| Full) , keys = \c - myKeys c `M.union` keys defaultConfig c --, mouseBindings = \c - myMouse c `M.union` mouseBindings defaultConfig c } where tall = Tall 1 (3/100) (1/2) myStartupHook :: X () myStartupHook = do { spawn fcitx; spawn roxterm; spawn lxpanel; spawn /home/sw2wolf/bin/kvm.sh; } myLogHook :: X () myLogHook = ewmhDesktopsLogHook myManageHook :: ManageHook myManageHook = composeAll . concat $ [ [ className =? c -- doFloat | c - myCFloats] ,[ resource =? r -- doFloat | r - myRFloats] ,[ title =? t -- doFloat | t - myTFloats] ,[ className =? c -- doIgnore | c - ignores] ,[ className =? Audacious -- doShift 3 ] ,[ className =? Firefox -- doF W.swapDown] ,[(role =? gimp-toolbox || role =? gimp-image-window) -- (ask = doF . W.sink)]] where myCFloats = [Thunderbird-bin, GQview, MPlayer, Gimp,Vncviewer,Xmessage] myRFloats = [Dialog, Download, Places] myTFloats = [Firefox Preferences, Element Properties] ignores = [trayer] role = stringProperty WM_WINDOW_ROLE myKeys (XConfig {modMask = modm}) = M.fromList $ -- Apps and tools [ ((modm, xK_F2), spawn gmrun) , ((modm, xK_f), spawn /home/firefox/firefox) , ((modm, xK_t), spawn thunderbird) --, ((modm, xK_p), spawn exe=`dmenu_path | dmenu -b` eval \exec $exe\) , ((modm, xK_F11), spawn sudo shutdown -r now) , ((modm, xK_F12), spawn sudo shutdown -h now) , ((modm .|. controlMask, xK_Print), spawn sleep 0.2; scrot -s) , ((modm, xK_Print), spawn scrot '/tmp/%Y-%m-%d_%H:%M:%S_$wx$h_scrot.png' -e 'mv $f ~') , ((modm, xK_c), kill) -- Window Navigation , ((modm, xK_Right), sendMessage $ Go R) , ((modm, xK_Left ), sendMessage $ Go L) , ((modm, xK_Up ), sendMessage $ Go U) , ((modm, xK_Down ), sendMessage $ Go D) -- swap... , ((modm .|. controlMask, xK_Right), sendMessage $ Swap R) , ((modm .|. controlMask, xK_Left ), sendMessage $ Swap L) , ((modm .|. controlMask, xK_Up ), sendMessage $ Swap U) , ((modm .|. controlMask, xK_Down ), sendMessage $ Swap D) ] - fac n = foldr (*) 1 [1..n] -- View this message in context: http://old.nabble.com/About-xmonad-tp26367498p26367498.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe You should try asking on the xmonad mailing list: http://www.haskell.org/mailman/listinfo/xmonad -- Deniz Dogan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Strange parallel behaviour with Ubuntu Karmic / GHC 6.10.4
Michael Lesniak wrote: Hello, getTime? I wonder if that number might be causing the problem; can you replicate it with lower sys times? That was it! Thanks Neil! When I'm using some number crunching without getTime it works (with more or less the expected speedup and usage of two cores) on my Ubuntu 9.10, too. Out of curiosity, the question is still open: Why does the old example (using getTime) work so much better on an older version of Ubuntu/RedHat and not on the new ones? Your kernels were: Setup: Machine A: Quadcore, Ubuntu 9.04, Kernel 2.6.28-13 SMP Machine B: AMD Opteron 875, 8 cores, 2.6.18-164 SMP- (some redhat) Machine C: Dual-Core, Ubuntu 9.10, Kernel 2.6.31-14 SMP Looking at the implementation of getTime ThreadCPUTime in the clock package, it calls clock_gettime(CLOCK_THREAD_CPUTIME_ID,..). According to this page (http://www.h-online.com/open/news/item/Kernel-Log-What-s-new-in-2-6-29-Part-8-Faster-start-up-and-other-behind-the-scenes-changes-740591.html), the changes in 2.6.29 (changes which only your Ubuntu 9.10 machine has) included a patch (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c742b31c03f37c5c499178f09f57381aa6c70131) which altered the implementation of that function. Perhaps on some multi-processor machines the new implementation effectively serialises the code? I know there used to be issues of whether some of the timers were synchronised across processors/cores (to stop them appearing to go backwards), so maybe something with the timers and their synchronisations effectively stops your program running in parallel. If it helps, my machine is: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz according to /proc/cpuinfo. Thanks, Neil. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] haskell-src-exts Question
Hello, On Nov 13, 2009, at 11:54 PM, Niklas Broberg wrote: But the problem at hand here is auto-generated AST code, where we cannot rely on the parser to do the right thing. There's help in the AST such that it's possible to explicitly insert brackets where needed, but I agree with Dominic that it shouldn't really be necessary in his case. Neil's point is well taken though - to do it correctly (or rather, minimally) for infix application, the pretty printer would need to be aware of the respective fixities involved. If I was planning to write a Haskell program that generates Haskell code, should I use HSE? Or is it more for generating nice looking code than correct code? Is there an alternative package that is more suitable for generating code that is meant to be executed rather than being looked at? However, that doesn't mean we can't do better than what it is now, but be conservative about it. Only insert brackets where it's clear that brackets must be inserted, which would be the case for Dominic's example. If the argument to an application is non-atomic, it needs brackets, there's nothing ambiguous about that. Nothing can be said so categorically for infix applications, so there we should assume that the fixities are already done in the correct way, or that brackets are inserted manually where needed. Does that sound reasonable? Personnaly, I would prefer Duncans approach to produce correct output by default and require additional fixity information if the output should contain fewer parens. (The reason for my preference is that I think it is quite annoying to insert parens manually into auto generated infix applications only to get correct output.) In order to help reducing the amount of annoying parentheses in printed code, would it be sufficient - at least for the common case - to do something along the lines of prettyPrint = prettyPrintWithFixities preludeFixities and provide make `prettyPrint`, `prettyPrintWithFixities`, and `preludeFixities` public? Cheers, Sebastian -- Underestimating the novelty of the future is a time-honored tradition. (D.G.) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] How to update SSH key in code.haskell.org
Hi all. I'm a developer of gtk2hs project at code.haskell.org But i found i lost my SSH key when i update new system, and i can't push patch to gtk2hs. I have send mail to supp...@community.haskell.org for this problem, but i'm not sure that's the right place. So how to update SSH key with my account (AndyStewart) ? Thanks, -- Andy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] About xmonad
I have subscribed to xmonad maillist but i never received any email ! Deniz Dogan-3 wrote: 2009/11/16 zaxis z_a...@163.com: %uname -a Linux myarch 2.6.31-ARCH #1 SMP PREEMPT Tue Nov 10 19:48:17 CET 2009 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 3600+ AuthenticAMD GNU/Linux %xmonad --version xmonad 0.9 In firefox, the `save as` dialog doesnot appear when i want to choose picture to save by right clicking the mouse. %cat ~/.xmonad/xmonad.hs import XMonad import XMonad.Hooks.ManageDocks import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageHelpers import XMonad.Util.Run(spawnPipe) import XMonad.Layout.TwoPane import XMonad.Layout.WindowNavigation import qualified XMonad.StackSet as W import qualified Data.Map as M main = do xmonad $ defaultConfig { borderWidth = 1 , focusedBorderColor = #ff , normalBorderColor = #aa , manageHook = manageHook defaultConfig + myManageHook , workspaces = map show [1 .. 10 :: Int] , terminal = roxterm , modMask = mod4Mask , focusFollowsMouse = True , startupHook = myStartupHook , logHook = myLogHook , layoutHook = windowNavigation $ avoidStruts $ (Mirror tall ||| tall ||| Full) --, layoutHook = ewmhDesktopsLayout $ windowNavigation $ avoidStruts $ (Mirror tall ||| tall ||| Full) , keys = \c - myKeys c `M.union` keys defaultConfig c --, mouseBindings = \c - myMouse c `M.union` mouseBindings defaultConfig c } where tall = Tall 1 (3/100) (1/2) myStartupHook :: X () myStartupHook = do { spawn fcitx; spawn roxterm; spawn lxpanel; spawn /home/sw2wolf/bin/kvm.sh; } myLogHook :: X () myLogHook = ewmhDesktopsLogHook myManageHook :: ManageHook myManageHook = composeAll . concat $ [ [ className =? c -- doFloat | c - myCFloats] ,[ resource =? r -- doFloat | r - myRFloats] ,[ title =? t -- doFloat | t - myTFloats] ,[ className =? c -- doIgnore | c - ignores] ,[ className =? Audacious -- doShift 3 ] ,[ className =? Firefox -- doF W.swapDown] ,[(role =? gimp-toolbox || role =? gimp-image-window) -- (ask = doF . W.sink)]] where myCFloats = [Thunderbird-bin, GQview, MPlayer, Gimp,Vncviewer,Xmessage] myRFloats = [Dialog, Download, Places] myTFloats = [Firefox Preferences, Element Properties] ignores = [trayer] role = stringProperty WM_WINDOW_ROLE myKeys (XConfig {modMask = modm}) = M.fromList $ -- Apps and tools [ ((modm, xK_F2), spawn gmrun) , ((modm, xK_f), spawn /home/firefox/firefox) , ((modm, xK_t), spawn thunderbird) --, ((modm, xK_p), spawn exe=`dmenu_path | dmenu -b` eval \exec $exe\) , ((modm, xK_F11), spawn sudo shutdown -r now) , ((modm, xK_F12), spawn sudo shutdown -h now) , ((modm .|. controlMask, xK_Print), spawn sleep 0.2; scrot -s) , ((modm, xK_Print), spawn scrot '/tmp/%Y-%m-%d_%H:%M:%S_$wx$h_scrot.png' -e 'mv $f ~') , ((modm, xK_c), kill) -- Window Navigation , ((modm, xK_Right), sendMessage $ Go R) , ((modm, xK_Left ), sendMessage $ Go L) , ((modm, xK_Up ), sendMessage $ Go U) , ((modm, xK_Down ), sendMessage $ Go D) -- swap... , ((modm .|. controlMask, xK_Right), sendMessage $ Swap R) , ((modm .|. controlMask, xK_Left ), sendMessage $ Swap L) , ((modm .|. controlMask, xK_Up ), sendMessage $ Swap U) , ((modm .|. controlMask, xK_Down ), sendMessage $ Swap D) ] - fac n = foldr (*) 1 [1..n] -- View this message in context: http://old.nabble.com/About-xmonad-tp26367498p26367498.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe You should try asking on the xmonad mailing list: http://www.haskell.org/mailman/listinfo/xmonad -- Deniz Dogan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe - fac n = foldr (*) 1 [1..n] -- View this message in context: http://old.nabble.com/About-xmonad-tp26367498p26370168.html Sent from the Haskell - Haskell-Cafe
Re: [Haskell-cafe] DSL in Haskell
Thanks Don, I read the PDF. I was not able to figure out how to get the BASIC module. Wanted to see a reference implementation. The DSL I want to start with is a music generation DSL ... It should generate a wave file with music data as input - for example the input could contain C3 D3 E3 ... - should output a wave file with those notes ... some kind of mnemonics for tempo will also be there. Later I'd like to incorporate parallel sequence generation - where I could get chord effect etc ... I had done a rudimentary implementation in C a while back - http://kashyap-1978.tripod.com/Escapades/Goodies/Construct_WAV.html I'd appreciate it very much if you could give me some pointers on getting started. Regards, Kashyap From: Don Stewart d...@galois.com To: CK Kashyap ck_kash...@yahoo.com Cc: haskell-cafe@haskell.org Sent: Mon, November 16, 2009 12:57:54 AM Subject: Re: [Haskell-cafe] DSL in Haskell ck_kashyap: Hi All, I was reading a Ruby book and in that it was mentioned that its capability to dynamically query and modify classes makes it suitable for implementing DSL's ... I am referring to Ruby's reflection and methods like method_missing here. It can allow things like not having to define constants for all possible unicode code points etc...For example, first use of U0123 could bring such a constant definition into existence etc I see multiple search hits when I look for Haskell and DSL - can someone please point me to a good primer or explain to me how equivalent of above mentioned features in Ruby can be done in Haskell ... or the Haskell alternative for it. The Haskell equivalent would be overloading, primarily via type classes. See Lennart Augusston's BASIC for an example of this in the extreme: http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-care.html That's BASIC syntax, in Haskell, relying on overloading numbers, strings etc. And all statically typed. For a survey of some of the more recent EDSLs in Haskell, see this brief overview, http://www.galois.com/~dons/papers/stewart-2009-edsls.pdf -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: bindings-SDL 1.0.2, the domain specific language for FFI description
Hi, This package is to be used with hsc2hs. (hsc2hs is called automatically if you use Cabal.) It's a self-contained set of macros used to create a Haskell wrap for a C interface. They follow the idea that it's better to have a C-like wrap code first and then write Haskell-like code on top of that than going directly from C to Haskell style. Hackage link: http://hackage.haskell.org/package/bindings-DSL Wiki documentation: http://bitbucket.org/mauricio/bindings-dsl The fancy 'domain specific language' comes from 'binding-SDL' macros hability to describe a C interface. Instead of writing Haskell or preprocessor code, you can use 'bindings-DSL' macros to describe the interface you want to wrap without knowledge of how that description translates to preprocessor or Haskell code. Suppose, for instance, you have the following C struct: struct example_struct{ int n; struct example_struct *p; } It will be described like this: #starttype struct example_struct #field n , CInt #field p , Ptr example_struct #stoptype and this gives you a Haskell data type (automatically named C'example_struct) with the same fields and Storable instantiation. Here is a bigger example, with structs, macros, functions and global variables. Suppose you want to wrap this: http://git.savannah.gnu.org/cgit/gsl.git/tree/multimin/gsl_multimin.h Then this is how your 'bindings-DSL' code will look like: http://bitbucket.org/mauricio/bindings-gsl/src/tip/src/Bindings/Gsl/MultidimensionalMinimization.hsc That code translates to these Haskell declarations: http://hackage.haskell.org/packages/archive/bindings-gsl/0.1.1.6/doc/html/Bindings-Gsl-MultidimensionalMinimization.html 'bindings-DSL' came from previous 'bindings-common' package. It started as an effort to have many Haskell interfaces to good libraries available on Hackage, and came to be a language to support writing such interfaces easily and reliably. Hope it's usefull to you. Best, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Opinion about JHC
From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of John Meacham On Fri, Nov 13, 2009 at 08:55:51PM +, Lennart Augustsson wrote: That was indeed my point. Since a compiler is a substantial program I would have more confidence it a compiler that is self-hosting. Surely you must have tried? [...] I never understood the desire to have it be self-hosting [...] I think you did, once. Quoting from here (from section The story of jhc): http://repetae.net/computer/jhc/jhc.shtml Writing a compiler is also doubly efficient to begin with, since if you self-compile improvements not only give you a better optimizer, but also speed up your self-compiled compiler. I was looking forward to the day jhc became self-hosting. Alistair * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. * ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] poor perfomance of indexU in uvector package
On Sun, Nov 15, 2009 at 8:59 PM, Don Stewart d...@galois.com wrote: alexey.skladnoy: I found that perfomace of indexU is very poor and it is not fast O(1) operation which is very surprising. Here is some benchmarcking I've done. Everything compiled with -O2 You're using the streamed version when its not fusing. Use the non-streaming direct implementation exported from Data.Array.Vector.UArr This is really an API bug, but I've not had time to sanitize the use. Probably this should be stated more explicitly in documentation. This is _very_ unexpected and confusing behaviour. Also I don't quite understand nature of bug. Is this missing export or wrong function is exported. And is streamed version of idexU useful and in which way? On Sun, Nov 15, 2009 at 9:11 PM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: The documentation explicitly says indexU is O(n) - no need for so much testing to rediscover that fact. When I needed a contiguous block of values in UArr, I just relied on sliceU to acquire the block and performed a foldU. Problems begin when you need non-contiguous block. Easiest way to so is indexing. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] poor perfomance of indexU in uvector package
On 16/11/2009, at 22:46, Alexey Khudyakov wrote: Problems begin when you need non-contiguous block. Easiest way to so is indexing. FWIW, this operation is called backpermute and is probably exported as bpermute in uvector. Roman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: haskell-src-exts Question
Niklas Broberg niklas.broberg at gmail.com writes: please? http://trac.haskell.org/haskell-src-exts Niklas, I'd love to raise a bug for it but unfortunately I can't log on to trac. I don't understand why but none of my colleagues can log on either. It's been a long standing issue. I presume it's to do with our proxy but we can log on to lots of other sites. Perhaps you could cut and paste the email I sent? Dominic. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: haskell-src-exts Question
Dominic Steinitz dominic at steinitz.org writes: Niklas Broberg niklas.broberg at gmail.com writes: please? http://trac.haskell.org/haskell-src-exts Niklas, I'd love to raise a bug for it but unfortunately I can't log on to Good news. Although I couldn't logon as guest, I've created an account and can logon as that. I'll create the ticket now. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] who wrote the Relational_Algebra page
on the Haskell wiki? http://www.haskell.org/haskellwiki/Relational_algebra Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] who wrote the Relational_Algebra page
on the Haskell wiki? http://www.haskell.org/haskellwiki/Relational_algebra Günther According to the page history, the userid is EndreyMark. Alistair * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. * ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] who wrote the Relational_Algebra page
2009/11/16 Günther Schmidt gue.schm...@web.de: on the Haskell wiki? http://www.haskell.org/haskellwiki/Relational_algebra Günther http://www.haskell.org/haskellwiki/?title=Relational_algebraaction=history ? -- gwern ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] who wrote the Relational_Algebra page
Hi Alistair, thanks, do you happen to know his email address? I try to get in touch with him because this particular subject is of great importance to me and he seems to have done quite a lot of research already. Günther Am 16.11.2009, 15:38 Uhr, schrieb Bayley, Alistair alistair.bay...@invesco.com: on the Haskell wiki? http://www.haskell.org/haskellwiki/Relational_algebra Günther According to the page history, the userid is EndreyMark. Alistair * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. * ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Trouble installing HDBC 2.1.1 with ghc 6.10.4
Colin Paul Adams wrote: Is this connected with the in-and-out status of the time library in the GHC 6.10.x series? Is there a work-around? Using the current HDBC (2.2.1) would fix it for you. -- John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] who wrote the Relational_Algebra page
2009/11/16 Günther Schmidt gue.schm...@web.de: Hi Alistair, thanks, do you happen to know his email address? I try to get in touch with him because this particular subject is of great importance to me and he seems to have done quite a lot of research already. Günther Most Haskell wiki users (and Wikipedia users for that matter) provide an email address while signing up. This then allows other users to email them; you go to his user page and you'll notice an 'email' link up top with the other links like User talk or Contributions. -- gwern ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: New Industrial Haskell Group membership options
The Industrial Haskell Group (IHG) is an organisation to support the needs of commercial users of the Haskell programming language. The second round of the IHG's collaborative development scheme will be running for 6 months from January. We are now inviting additional companies to take part. This scheme is ideal for companies that make significant use of Haskell and wish to fund specific projects. Additionally, there are new associate and academic membership options. These enable companies and academic groups to support the general health of the Haskell development platform, but with a lower financial commitment. For more details on all of the above, please see http://industry.haskell.org/ If your company or group is interested in joining then please e-mail i...@industry.haskell.org -- Duncan Coutts, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Announcing the GHC Bug Sweep
Help us weed the GHC ticket database, and get a warm fuzzy feeling from contributing to Haskell core technology! There are currently ~750 tickets against GHC. Many of them have not been looked at in months or years. Often when I go through old tickets I find easy targets: bugs that have already been fixed, duplicates, bugs that are not reproducible and the submitter has gone away. So the idea we have is this: do an incremental sweep of the whole database, starting from the oldest tickets. Check each one, and try to make some progress on it. If we get enough momentum going we can make sure every ticket gets looked at every few months at the least. This is a game for the whole family! We don't care how much progress you make on each ticket, just as long as someone has taken a look and moved the ticket forward in some way. For example, you might check for duplicates, update the metadata, ask for more information from the submitter, try to reproduce the bug against the latest version of GHC. To claim a ticket all you have to do is remove it from the list on the wiki. Full instructions are here http://hackage.haskell.org/trac/ghc/wiki/BugSweep including a list of suggestions for ways to make progress on a ticket. Cheers! Simon the GHC team ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] inversion lists (was: O(n) algorithm for determining subset)
On Mon, 16 Nov 2009 00:03:54 +0300 Eugene Kirpichov ekirpic...@gmail.com wrote: EK 2009/11/15 Michael Mossey m...@alumni.caltech.edu: Can someone tell me if this is correct. I'm guessing that if I represent two sets of integers by Word32 (where ith bit set means i is in the set), then an algorithm to determine if x is a subset of y would go something like (y - x) == (y `exclusiveOr` x) EK It's simpler: x~y == 0 Depending on the OP data set the simple bit vector may be a good strategy, but I wonder if an inversion list would be better? Do you expect long runs of adjacent numbers and gaps? Inversion lists tend to encode those much more efficiently than bit vectors. I'm just now learning Haskell so I don't know enough to show an implementation but inversion lists are very simple conceptually. If your set is (2,3,4,5,8,9,10) the inversion list would be (2,6,8,11). It's easy to generate it from a set of Ord elements. I'd be curious to see an implementation of the above and other set operations with inversion lists, in fact, so I can learn from it. I couldn't find any implementation online for Haskell. Thanks Ted ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Typefuck: Brainfuck in the type system
Greetings list, I was um well, drinking beer and thought it would be amusing to write a brainfuck interpreter which runs within the GHC type checker so I did, using type families. I haven't decided whether or not to put it on hackage (it is rather silly after all) but I have a link to a cabalized package and instructions on how to work it in an entry on my blog, here: http://killersmurf.blogspot.com/2009/11/typefuck.html Enjoy the ridiculousness. Johnny ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Typefuck: Brainfuck in the type system
Awesome, however, I don't know what the policy is for such -- interesting -- names on Hackage. Normally I believe the response to Should I put it on Hackage is a resounding, immediate Absolutely. In this case, perhaps a small name change to avoid any possibility of offense? /Joe On Nov 16, 2009, at 12:19 PM, Johnny Morrice wrote: Greetings list, I was um well, drinking beer and thought it would be amusing to write a brainfuck interpreter which runs within the GHC type checker so I did, using type families. I haven't decided whether or not to put it on hackage (it is rather silly after all) but I have a link to a cabalized package and instructions on how to work it in an entry on my blog, here: http://killersmurf.blogspot.com/2009/11/typefuck.html Enjoy the ridiculousness. Johnny ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Typefuck: Brainfuck in the type system
On Mon, Nov 16, 2009 at 12:23 PM, Joe Fredette jfred...@gmail.com wrote: Awesome, however, I don't know what the policy is for such -- interesting -- names on Hackage. Normally I believe the response to Should I put it on Hackage is a resounding, immediate Absolutely. In this case, perhaps a small name change to avoid any possibility of offense? /Joe Too late: http://hackage.haskell.org/package/brainfuck http://hackage.haskell.org/package/loli -- gwern ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Typefuck: Brainfuck in the type system
Well then, send it up to the great Hackage machine! If the f-bombs are allowed... I think my package names are about to get alot less SFW... On Nov 16, 2009, at 12:26 PM, Gwern Branwen wrote: On Mon, Nov 16, 2009 at 12:23 PM, Joe Fredette jfred...@gmail.com wrote: Awesome, however, I don't know what the policy is for such -- interesting -- names on Hackage. Normally I believe the response to Should I put it on Hackage is a resounding, immediate Absolutely. In this case, perhaps a small name change to avoid any possibility of offense? /Joe Too late: http://hackage.haskell.org/package/brainfuck http://hackage.haskell.org/package/loli -- gwern ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] DSL in Haskell
You can find teh BASIC module on hackage: http://hackage.haskell.org/package/BASIC Download .tar.gz file and you can see the source. On Mon, Nov 16, 2009 at 3:16 AM, CK Kashyap ck_kash...@yahoo.com wrote: Thanks Don, I read the PDF. I was not able to figure out how to get the BASIC module. Wanted to see a reference implementation. The DSL I want to start with is a music generation DSL ... It should generate a wave file with music data as input - for example the input could contain C3 D3 E3 ... - should output a wave file with those notes ... some kind of mnemonics for tempo will also be there. Later I'd like to incorporate parallel sequence generation - where I could get chord effect etc ... I had done a rudimentary implementation in C a while back - http://kashyap-1978.tripod.com/Escapades/Goodies/Construct_WAV.html I'd appreciate it very much if you could give me some pointers on getting started. Regards, Kashyap From: Don Stewart d...@galois.com To: CK Kashyap ck_kash...@yahoo.com Cc: haskell-cafe@haskell.org Sent: Mon, November 16, 2009 12:57:54 AM Subject: Re: [Haskell-cafe] DSL in Haskell ck_kashyap: Hi All, I was reading a Ruby book and in that it was mentioned that its capability to dynamically query and modify classes makes it suitable for implementing DSL's ... I am referring to Ruby's reflection and methods like method_missing here. It can allow things like not having to define constants for all possible unicode code points etc...For example, first use of U0123 could bring such a constant definition into existence etc I see multiple search hits when I look for Haskell and DSL - can someone please point me to a good primer or explain to me how equivalent of above mentioned features in Ruby can be done in Haskell ... or the Haskell alternative for it. The Haskell equivalent would be overloading, primarily via type classes. See Lennart Augusston's BASIC for an example of this in the extreme: http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-care.html That's BASIC syntax, in Haskell, relying on overloading numbers, strings etc. And all statically typed. For a survey of some of the more recent EDSLs in Haskell, see this brief overview, http://www.galois.com/~dons/papers/stewart-2009-edsls.pdf -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] unboxed arrays restricted to simple types (Int, Float, ..)
On Wed, 11 Nov 2009, Tom Nielsen wrote: There's a couple of things going on here: -If you use storablevector and storable-tuple, or uvector, you can store tuples of things. So your stupidArrayElement could be mimicked by (Int, Int). Btw. there is Data.Array.Storable. Maybe I should just add a conversion from StorableArray to StorableVector and back. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] DSL in Haskell
Have you seen the Haskell School of Expression book by Paul Hudak? The book is available on line, Ch 9 and 10 talks about music. http://plucky.cs.yale.edu/cs431/HaskoreSoeV-0.7.pdf Daryoush On Mon, Nov 16, 2009 at 3:16 AM, CK Kashyap ck_kash...@yahoo.com wrote: Thanks Don, I read the PDF. I was not able to figure out how to get the BASIC module. Wanted to see a reference implementation. The DSL I want to start with is a music generation DSL ... It should generate a wave file with music data as input - for example the input could contain C3 D3 E3 ... - should output a wave file with those notes ... some kind of mnemonics for tempo will also be there. Later I'd like to incorporate parallel sequence generation - where I could get chord effect etc ... I had done a rudimentary implementation in C a while back - http://kashyap-1978.tripod.com/Escapades/Goodies/Construct_WAV.html I'd appreciate it very much if you could give me some pointers on getting started. Regards, Kashyap -- *From:* Don Stewart d...@galois.com *To:* CK Kashyap ck_kash...@yahoo.com *Cc:* haskell-cafe@haskell.org *Sent:* Mon, November 16, 2009 12:57:54 AM *Subject:* Re: [Haskell-cafe] DSL in Haskell ck_kashyap: Hi All, I was reading a Ruby book and in that it was mentioned that its capability to dynamically query and modify classes makes it suitable for implementing DSL's ... I am referring to Ruby's reflection and methods like method_missing here. It can allow things like not having to define constants for all possible unicode code points etc...For example, first use of U0123 could bring such a constant definition into existence etc I see multiple search hits when I look for Haskell and DSL - can someone please point me to a good primer or explain to me how equivalent of above mentioned features in Ruby can be done in Haskell ... or the Haskell alternative for it. The Haskell equivalent would be overloading, primarily via type classes. See Lennart Augusston's BASIC for an example of this in the extreme: http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-care.html That's BASIC syntax, in Haskell, relying on overloading numbers, strings etc. And all statically typed. For a survey of some of the more recent EDSLs in Haskell, see this brief overview, http://www.galois.com/~dons/papers/stewart-2009-edsls.pdfhttp://www.galois.com/%7Edons/papers/stewart-2009-edsls.pdf -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Coercing numeric and string constants
Try with -XExtendedDefaulingRules. On Mon, Nov 16, 2009 at 6:33 AM, Mark Lentczner ma...@glyphic.com wrote: I'm looking for a good way to handle a library interface that accepts both strings and numbers in particular argument positions: Start with the following definitions. I've defined ResourceTree as a class here since the details don't matter. data Segment = Key String | Index Int deriving (Eq, Show) type Path = [Segment] class ResourceTree a where lookupPath :: Path - a - Maybe String What I'm after is to make the following code, representative of intended client usage to work: examples :: (ResourceTree a) = a - [Maybe String] examples r = [ r `at` status, r `at` 7, r `at` part ./ sku, r `at` items ./ 2, r `at` 7 ./ name, r `at` 7 ./ 9 ] The first way I thought to do this was with type classes: class Segmentable a where { toSegment :: a - Segment } instance Segmentable Segment where { toSegment = id } instance Segmentable String where { toSegment = Key } instance Segmentable Int where { toSegment = Index } class Pathable a where { toPath :: a - Path } instance Pathable Path where { toPath = id } instance Pathable String where { toPath s = [ Key s ] } instance Pathable Int where { toPath i = [ Index i ] } (./) :: (Segmentable a, Pathable b) = a - b - Path a ./ b = toSegment a : toPath b infixr 4 ./ at :: (ResourceTree a, Pathable b) = a - b - Maybe String a `at` b = lookupPath (toPath b) a infix 2 `at` This works great for all uses in the client code where the type of the numeric arguments are known or otherwise forced to be Int. However, when used with numeric constants (as in the function example above), it fails due to the way that numeric constants are defined in Haskell. For example, the constant 9 in example results in this error: Ambiguous type variable `t4' in the constraints: `Pathable t4' arising from a use of `./' at Test.hs:48:15-20 `Num t4' arising from the literal `9' at Test.hs:48:20 Probable fix: add a type signature that fixes these type variable(s) I suppose that even though there is only one type that is both an instance of Num and of Pathable (Int), that can't be deduced with certainty. In the client code, one could fix this by typing the constants thus: r `at` (7::Int) ./ (9::Int) But to me that makes a hash out of the concise syntax I was trying to achieve. Also, this code requires both FlexibleInstances and TypeSynonymInstances pragmas (though the later requirement could be worked around.), though I'm lead to understand that those are common enough. I think also that, these are only needed in the library, not the client code. The other way I thought to do this is by making Path and Segment instances of Num and IsString: instance Num Segment where { fromInteger = Index . fromInteger } instance IsString Segment where { fromString = Key . fromString } instance Num Path where { fromInteger i = [ Index $ fromInteger i ] } instance IsString Path where { fromString s = [ Key $ fromString s ] } (./) :: Segment - Path - Path a ./ b = a : b infixr 4 ./ at :: (ResourceTree a) = a - Path - Maybe String a `at` b = lookupPath b a infix 2 `at` This works but has two downsides: 1) Segment and Path are poor instances of Num, eliciting errors for missing methods and resulting in run-time errors should any client code accidentally use them as such. 2) It requires the OverloadedStrings pragma in every client module. Any comments on these two approaches would be appreciated, How to improve them? Which is the lesser of two evils? On the other hand, I realize that many may object that intended interface isn't very Haskell like. The data object I need to represent (ResourceTree) comes from external input and really does have the strange paths of strings or integers construction, I can't change that. And it is expected that much client code will use constant paths to access and manipulate various parts of such objects, hence the desire for a concise operator set that works with constants. Given that there are actually several operations on ResourceTree involving paths (where the operation requires the whole Path as a single value), any thoughts on a more Haskell like construction? Thanks, - MtnViewMark Mark Lentczner http://www.ozonehouse.com/mark/ m...@glyphic.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] DSL in Haskell
Thank you very very much Daryoush ... I had not seen the book ... Looks pretty interesting, I saw it mentioning Midi though ... Thank you Justin for the location of the BASIC module. Regards, Kashyap From: Daryoush Mehrtash dmehrt...@gmail.com To: CK Kashyap ck_kash...@yahoo.com Cc: Don Stewart d...@galois.com; haskell-cafe@haskell.org Sent: Mon, November 16, 2009 11:19:07 PM Subject: Re: [Haskell-cafe] DSL in Haskell Have you seen the Haskell School of Expression book by Paul Hudak? The book is available on line, Ch 9 and 10 talks about music. http://plucky.cs.yale.edu/cs431/HaskoreSoeV-0.7.pdf Daryoush On Mon, Nov 16, 2009 at 3:16 AM, CK Kashyap ck_kash...@yahoo.com wrote: Thanks Don, I read the PDF. I was not able to figure out how to get the BASIC module. Wanted to see a reference implementation. The DSL I want to start with is a music generation DSL ... It should generate a wave file with music data as input - for example the input could contain C3 D3 E3 ... - should output a wave file with those notes ... some kind of mnemonics for tempo will also be there. Later I'd like to incorporate parallel sequence generation - where I could get chord effect etc ... I had done a rudimentary implementation in C a while back - http://kashyap-1978.tripod.com/Escapades/Goodies/Construct_WAV.html I'd appreciate it very much if you could give me some pointers on getting started. Regards, Kashyap From: Don Stewart d...@galois.com To: CK Kashyap ck_kash...@yahoo.com Cc: haskell-cafe@haskell.org Sent: Mon, November 16, 2009 12:57:54 AM Subject: Re: [Haskell-cafe] DSL in Haskell ck_kashyap: Hi All, I was reading a Ruby book and in that it was mentioned that its capability to dynamically query and modify classes makes it suitable for implementing DSL's ... I am referring to Ruby's reflection and methods like method_missing here. It can allow things like not having to define constants for all possible unicode code points etc...For example, first use of U0123 could bring such a constant definition into existence etc I see multiple search hits when I look for Haskell and DSL - can someone please point me to a good primer or explain to me how equivalent of above mentioned features in Ruby can be done in Haskell ... or the Haskell alternative for it. The Haskell equivalent would be overloading, primarily via type classes. See Lennart Augusston's BASIC for an example of this in the extreme: http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-care.html That's BASIC syntax, in Haskell, relying on overloading numbers, strings etc. And all statically typed. For a survey of some of the more recent EDSLs in Haskell, see this brief overview, http://www.galois.com/%7Edons/papers/stewart-2009-edsls.pdf -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?
2009/11/15 Eugene Kirpichov ekirpic...@gmail.com Hey, I've found terrific slides about monoids! http://comonad.com/reader/wp-content/uploads/2009/08/IntroductionToMonoids.pdf Edward Kmett, you rock! Glad you enjoyed the slides. =) There's more http://comonad.com/reader/2009/iteratees-parsec-and-monoid/ - but the second part was too hard for me to read it fully without special motivation. The iteratees, parsec and monoids talk was mostly to solve a technical problem of my own. The result is a way to build parallel parsers that works quite well for most practical programming language grammars, but requires you to think about parsing a bit sideways and requires a lot of machinery from other areas to make work. In essence I rely on the fact that in programming languages we typically have a point at which we can resume parsing, or at least lexing, in a context-free manner by locating global invariants of the grammar. These invariants are typically already present and are used to provide error productions in real world compiler grammars, so that the compiler can try to resume parsing. It is a hack, but it is a reasonably efficient hack. =) To make it work, I have to borrow a lot of machinery from other areas. Iteratees give me a resumable parser, giving that access to its input history lets it backtrack, which lets me bolt them onto parsec, so you can write parsers the way you are used to, at least for the tokens in your language, and then you add a layer on top to deal with the token-stream, which is now available to be reduced monoidally rather than just sequentially. What I was looking for was a good understanding of what invariants would it make sense to design a language to have so that it could be efficiently parsed in parallel and incrementally reparsed as the user types without having to rescan the whole source file. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: control-monad-failure and safe-failure
Correction: the correct link is http://www.haskell.org/haskellwiki/Failure 2009/11/16 Michael Snoyman mich...@snoyman.com: Folks, We are extremely happy to announce the control-monad-failure and safe-failure packages for error handling. control-monad-failure provides a basic notion of failure which does not commit to any concrete representation. It is just a version of the MonadError class without the annoying bits. class MonadFailure e m where failure :: e - m a Instances are provided for several concrete representations of failure handling: Maybe, Either, ErrorT, Control.Exception.Throw, and []. safe-failure is a fork of Neil Mitchell's Safe package providing MonadFailure versions of several partial functions in the Prelude, which instead of failing with a runtime error fail with Failure. head :: MonadFailure HeadFailure m = [a] - m a This is a joint release from the authors of the attempt and the control-monad-exception packages, and accompanying releases of those packages have been made making them adopt the MonadFailure interface. We have also created a wiki page explaining our reasons for following this path in: http://www.haskellwiki.org/Failure Thanks, Jose Iborra, Nicolas Pouillard and Michael Snoyman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Eugene Kirpichov Web IR developer, market.yandex.ru ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: control-monad-failure and safe-failure
Folks, We are extremely happy to announce the control-monad-failure and safe-failure packages for error handling. control-monad-failure provides a basic notion of failure which does not commit to any concrete representation. It is just a version of the MonadError class without the annoying bits. class MonadFailure e m where failure :: e - m a Instances are provided for several concrete representations of failure handling: Maybe, Either, ErrorT, Control.Exception.Throw, and []. safe-failure is a fork of Neil Mitchell's Safe package providing MonadFailure versions of several partial functions in the Prelude, which instead of failing with a runtime error fail with Failure. head :: MonadFailure HeadFailure m = [a] - m a This is a joint release from the authors of the attempt and the control-monad-exception packages, and accompanying releases of those packages have been made making them adopt the MonadFailure interface. We have also created a wiki page explaining our reasons for following this path in: http://www.haskellwiki.org/Failure Thanks, Jose Iborra, Nicolas Pouillard and Michael Snoyman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Could someone teach me why we use Data.Monoid?
In my own opinion, the reason why we use the concept of a monoid or a monad is in order to build libraries around the concepts. For example, the do construct could have been designed just for doing IO, but because it works for *any* monad you can also use the same syntax sugar to conveniently work with a calculation *) that manipulates a mutable state (State) *) that has an environment (Reader) *) that writes out a log (Writer) Likewise, the nice thing about monoid is that it lets us generalize libraries. So for example, the Writer monad could have just been designed to work by concatenating strings or lists since this is what one might typically think of for a log. But because it is designed to work with an arbitrary *monoid*, you could use it to keep track of a running total as well, since numbers under addition is also a monoid. So the way I figure it, the important thing is to understand just enough of these patterns (monads, monoids) that you can recognize them when they come up in your own work so that you can be aware of what pre-existing libraries and/or syntax sugar you can leverage to work with them. Cheers, Greg On Nov 13, 2009, at 8:14 AM, Magicloud Magiclouds wrote: Hi, I have looked the concept of monoid and something related, but still, I do not know why we use it? -- 竹密岂妨流水过 山高哪阻野云飞 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Howto start a bigger project
Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will need to set it up in an organized way, something with a blog, web page or other means. I tried to solve it by myself while asking the occasional question here but that turned out to be ineefective. The problem as such is certainly of interest for just about any programmer who is using Haskell for real world programming too. In short, to get started I'd appreciate some tips how to set this up. Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ghci + user prelude
Hello, If there's a file called Prelude.hs in a directory, and ghci is started from that directory, ghci dies. -- Prelude.hs module A.Prelude where $ ghci GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. command line: module `Prelude' is not loaded Is there a way around this? I often like to have a modified Prelude file in a subdirectory of my project, and this behavior keeps me from being able to start ghci there. Thanks! Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: attempt
We'd like to announce the second release (version 0.0.1) of the attempt package, for handling of failures. This release has been made to work with the new control-monad-failure package[1] in an effort to standardize failure handling. Notable changes to this release: * The MonadAttempt class was fully redundant with MonadFailure, and has thus been removed. * WrapFailure class has been moved to control-monad-failure (with minor modifications). * Data.Attempt.Helper (safe versions of some functions) has been moved to safe-failure[2]. * Full support for the monadloc package[3] to get monadic stack traces. As usual, this release is available on hackage[4]. API stability cannot be guaranteed with this release as well, but we're getting much closer to hitting the mark. All the best, Michael Snoyman, Nicolas Pouillard 1. http://hackage.haskell.org/package/control-monad-failure 2. http://hackage.haskell.org/package/safe-failure 3. http://hackage.haskell.org/package/monadloc 4. http://hackage.haskell.org/package/attempt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Howto start a bigger project
Ummm. what is it? 2009/11/16 Günther Schmidt gue.schm...@web.de: Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will need to set it up in an organized way, something with a blog, web page or other means. I tried to solve it by myself while asking the occasional question here but that turned out to be ineefective. The problem as such is certainly of interest for just about any programmer who is using Haskell for real world programming too. In short, to get started I'd appreciate some tips how to set this up. Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Howto start a bigger project
What is this big project about? Why not use www.sourceforge.net? On Mon, 16 Nov 2009 21:15:44 +0100, you wrote: Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will need to set it up in an organized way, something with a blog, web page or other means. I tried to solve it by myself while asking the occasional question here but that turned out to be ineefective. The problem as such is certainly of interest for just about any programmer who is using Haskell for real world programming too. In short, to get started I'd appreciate some tips how to set this up. Günther -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[2]: [Haskell-cafe] Howto start a bigger project
Hello Casey, Monday, November 16, 2009, 11:30:51 PM, you wrote: Why not use www.sourceforge.net? i strongly recommend http://code.google.com or http://codeplex.com SF is slow and olf-fashioned -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ghci + user prelude
Excerpts from Sean McLaughlin's message of Mon Nov 16 15:27:55 -0500 2009: Is there a way around this? I often like to have a modified Prelude file in a subdirectory of my project, and this behavior keeps me from being able to start ghci there. http://www.haskell.org/haskellwiki/No_import_of_Prelude Cheers, Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: control-monad-failure and safe-failure
Excerpts from Michael Snoyman's message of Mon Nov 16 14:39:14 -0500 2009: control-monad-failure provides a basic notion of failure which does not commit to any concrete representation. It is just a version of the MonadError class without the annoying bits. Excellent! I've used MonadError in the past and it has been a little... warty; looking forward to using control-monad-failure for future projects. Cheers, Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: ANNOUNCE: attempt
Correction: that's version 0.0.2 that was just release. On Mon, Nov 16, 2009 at 10:28 PM, Michael Snoyman mich...@snoyman.comwrote: We'd like to announce the second release (version 0.0.1) of the attempt package, for handling of failures. This release has been made to work with the new control-monad-failure package[1] in an effort to standardize failure handling. Notable changes to this release: * The MonadAttempt class was fully redundant with MonadFailure, and has thus been removed. * WrapFailure class has been moved to control-monad-failure (with minor modifications). * Data.Attempt.Helper (safe versions of some functions) has been moved to safe-failure[2]. * Full support for the monadloc package[3] to get monadic stack traces. As usual, this release is available on hackage[4]. API stability cannot be guaranteed with this release as well, but we're getting much closer to hitting the mark. All the best, Michael Snoyman, Nicolas Pouillard 1. http://hackage.haskell.org/package/control-monad-failure 2. http://hackage.haskell.org/package/safe-failure 3. http://hackage.haskell.org/package/monadloc 4. http://hackage.haskell.org/package/attempt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: [Haskell-cafe] Howto start a bigger project
On Mon, Nov 16, 2009 at 2:43 PM, Bulat Ziganshin bulat.zigans...@gmail.com wrote: Hello Casey, Monday, November 16, 2009, 11:30:51 PM, you wrote: Why not use www.sourceforge.net? i strongly recommend http://code.google.com or http://codeplex.com SF is slow and olf-fashioned If you like distributed version control: git: GitHub, http://github.com/ (my favorite, since I'm a git addict) mercurial: BitBucket, http://bitbucket.org/ (or Google Code, these days) darcs: Patch-Tag, http://patch-tag.com/ bazaar: Launchpad, https://launchpad.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Howto start a bigger project
Hi Luke, creating an EDSL for abstract terms in Relational Algebra, which can then be either compiled to SQL or evaluated to in-memory code. The closest thing I've seen and used so far is HaskellDB, but it immediately compiles to SQL, while I want to leave that part flexible. Günther Am 16.11.2009, 21:29 Uhr, schrieb Luke Palmer lrpal...@gmail.com: Ummm. what is it? 2009/11/16 Günther Schmidt gue.schm...@web.de: Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will need to set it up in an organized way, something with a blog, web page or other means. I tried to solve it by myself while asking the occasional question here but that turned out to be ineefective. The problem as such is certainly of interest for just about any programmer who is using Haskell for real world programming too. In short, to get started I'd appreciate some tips how to set this up. Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Howto start a bigger project
Günther Schmidt wrote: Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will need to set it up in an organized way, something with a blog, web page or other means. I tried to solve it by myself while asking the occasional question here but that turned out to be ineefective. The problem as such is certainly of interest for just about any programmer who is using Haskell for real world programming too. In short, to get started I'd appreciate some tips how to set this up. In my experience, getting people interested in helping is usually a far bigger problem. YMMV. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] DSL in Haskell
The most recent version of this book is http://plucky.cs.yale.edu/cs431/HaskoreSoeV-0.12.pdf (See http://plucky.cs.yale.edu/cs431/reading.htm ) Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html -- On Mon, 16 Nov 2009 18:49:07 +0100, Daryoush Mehrtash dmehrt...@gmail.com wrote: Have you seen the Haskell School of Expression book by Paul Hudak? The book is available on line, Ch 9 and 10 talks about music. http://plucky.cs.yale.edu/cs431/HaskoreSoeV-0.7.pdf Daryoush On Mon, Nov 16, 2009 at 3:16 AM, CK Kashyap ck_kash...@yahoo.com wrote: Thanks Don, I read the PDF. I was not able to figure out how to get the BASIC module. Wanted to see a reference implementation. The DSL I want to start with is a music generation DSL ... It should generate a wave file with music data as input - for example the input could contain C3 D3 E3 ... - should output a wave file with those notes ... some kind of mnemonics for tempo will also be there. Later I'd like to incorporate parallel sequence generation - where I could get chord effect etc ... I had done a rudimentary implementation in C a while back - http://kashyap-1978.tripod.com/Escapades/Goodies/Construct_WAV.html I'd appreciate it very much if you could give me some pointers on getting started. Regards, Kashyap -- *From:* Don Stewart d...@galois.com *To:* CK Kashyap ck_kash...@yahoo.com *Cc:* haskell-cafe@haskell.org *Sent:* Mon, November 16, 2009 12:57:54 AM *Subject:* Re: [Haskell-cafe] DSL in Haskell ck_kashyap: Hi All, I was reading a Ruby book and in that it was mentioned that its capability to dynamically query and modify classes makes it suitable for implementing DSL's ... I am referring to Ruby's reflection and methods like method_missing here. It can allow things like not having to define constants for all possible unicode code points etc...For example, first use of U0123 could bring such a constant definition into existence etc I see multiple search hits when I look for Haskell and DSL - can someone please point me to a good primer or explain to me how equivalent of above mentioned features in Ruby can be done in Haskell ... or the Haskell alternative for it. The Haskell equivalent would be overloading, primarily via type classes. See Lennart Augusston's BASIC for an example of this in the extreme: http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-care.html That's BASIC syntax, in Haskell, relying on overloading numbers, strings etc. And all statically typed. For a survey of some of the more recent EDSLs in Haskell, see this brief overview, http://www.galois.com/~dons/papers/stewart-2009-edsls.pdfhttp://www.galois.com/%7Edons/papers/stewart-2009-edsls.pdf -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Announcing the GHC Bug Sweep
Cool, I'm in! (Also inspired by [1]this post by Erik de Castro Lopo) It would be nice to keep track of participants somewhere, so that each of us knows he's not alone :) 1. http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/hacking_ddc.html * Simon Marlow marlo...@gmail.com [2009-11-16 16:29:46+] Help us weed the GHC ticket database, and get a warm fuzzy feeling from contributing to Haskell core technology! There are currently ~750 tickets against GHC. Many of them have not been looked at in months or years. Often when I go through old tickets I find easy targets: bugs that have already been fixed, duplicates, bugs that are not reproducible and the submitter has gone away. So the idea we have is this: do an incremental sweep of the whole database, starting from the oldest tickets. Check each one, and try to make some progress on it. If we get enough momentum going we can make sure every ticket gets looked at every few months at the least. This is a game for the whole family! We don't care how much progress you make on each ticket, just as long as someone has taken a look and moved the ticket forward in some way. For example, you might check for duplicates, update the metadata, ask for more information from the submitter, try to reproduce the bug against the latest version of GHC. To claim a ticket all you have to do is remove it from the list on the wiki. Full instructions are here http://hackage.haskell.org/trac/ghc/wiki/BugSweep including a list of suggestions for ways to make progress on a ticket. -- Roman I. Cheplyaka :: http://ro-che.info/ Don't let school get in the way of your education. - Mark Twain ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Announcing the GHC Bug Sweep
Hello, I'm also interested and find Roman's idea about a wiki-page for tracking motivating. So the idea we have is this: do an incremental sweep of the whole database, starting from the oldest tickets. Check each one, and try to make some progress on it. If we get enough momentum going we can make sure every ticket gets looked at every few months at the least. What I'd really like to see is a kind of categorization according to the topic, difficulty etc I think determing these things could be quite difficult for a GHC newbie (e.g. me). Any plans to do this? Kind regards, Michael -- Dipl.-Inf. Michael C. Lesniak University of Kassel Programming Languages / Methodologies Research Group Department of Computer Science and Electrical Engineering Wilhelmshöher Allee 73 34121 Kassel Phone: +49-(0)561-804-6269 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Typefuck: Brainfuck in the type system
My personal opinion is that such f-bombs really have no place on what is a font of software dissemination. My point of view is a fallacy however. Consider a new, viable programming language which has a syntax based entirely on GG-Allin lyrics. Obviously this would disgust a decent programmer (aren't we all decent :) One would be pressed to prove that this new language has no scientific value only in order to avoid his disgusting poetry, which could be difficult (and perhaps pointless, which would be worse than difficult) But I think I am fuzzing out beyond what the point of this originally was... yes - this discussion reminds me of both Wadler's law and the phenomenon of Cargo Cults, as according to the Wiki Wiki web (see http://c2.com/cgi/wiki?CargoCult) -- what I mean by this is that however it might be labelled on a software archive, such a program is surely and deeply ed. Johnny On Mon, 2009-11-16 at 12:28 -0500, Joe Fredette wrote: Well then, send it up to the great Hackage machine! If the f-bombs are allowed... I think my package names are about to get alot less SFW... On Nov 16, 2009, at 12:26 PM, Gwern Branwen wrote: On Mon, Nov 16, 2009 at 12:23 PM, Joe Fredette jfred...@gmail.com wrote: Awesome, however, I don't know what the policy is for such -- interesting -- names on Hackage. Normally I believe the response to Should I put it on Hackage is a resounding, immediate Absolutely. In this case, perhaps a small name change to avoid any possibility of offense? /Joe Too late: http://hackage.haskell.org/package/brainfuck http://hackage.haskell.org/package/loli -- gwern ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Howto start a bigger project
Hi all, I don't think the *project* is ready for sourceforge or similar yet. I was thinking more about something bloggish first, where I could state some thoughts first and where people could then comment or otherwise contribute. I reckon it will be some time until the project needs a code repository, I'd need something first where I can sketch the whole thing and collect ideas. Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Howto start a bigger project
2009/11/16 Günther Schmidt gue.schm...@web.de: Hi all, I don't think the *project* is ready for sourceforge or similar yet. I was thinking more about something bloggish first, where I could state some thoughts first and where people could then comment or otherwise contribute. I reckon it will be some time until the project needs a code repository, I'd need something first where I can sketch the whole thing and collect ideas. If you don't have a repository that people can grab and play with, it's going to be hard to attract interest. Even if the code is awful or totally broken, at least it's something your prospective audience can grab and play with. A blog without code won't do much, IMHO. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Howto start a bigger project
If all you are looking for is a place to chat about and garner feedback on your ideas for a new Haskell library, then why don't you just tell *us* what's on your mind? :-) I mean, we've just spent 37 posts talking about monoids in the last 48 hours, so we aren't exactly an unopinionated and reticent crowd. :-) - Greg On Nov 16, 2009, at 3:25 PM, Günther Schmidt wrote: Hi all, I don't think the *project* is ready for sourceforge or similar yet. I was thinking more about something bloggish first, where I could state some thoughts first and where people could then comment or otherwise contribute. I reckon it will be some time until the project needs a code repository, I'd need something first where I can sketch the whole thing and collect ideas. Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Howto start a bigger project
Günther Schmidt wrote: Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will need to set it up in an organized way, something with a blog, web page or other means. I tried to solve it by myself while asking the occasional question here but that turned out to be ineefective. The problem as such is certainly of interest for just about any programmer who is using Haskell for real world programming too. In short, to get started I'd appreciate some tips how to set this up. Create a project on github.com. It makes it dead easy for people to try out code and submit patches. Do enough work so that the code is useful, even if the implementation is crap. In fact, a crappy implementation may be a good thing; it makes it easier for people to find something to contribute. And then they feel a part of the project. Version 0.0.1 has to work right out of the box, be easy to install, be stupid obvious to use, and have non-zero value. Promises mean nothing. So, in practice, you need to start a really small project that could maybe become big but doesn't have to in order to be valuable right now. I've ended up as a committer on more than a few projects because the code solved a real problem in a simple and good enough way that I did not feel the need to go roll my own. And when I encountered a bug or wanted a feature, it was easy to contribute. But, key to all this, is getting people to feel they have a vested interest in the project succeeding, and that can be tricky. James -- Neurogami - Smart application development http://www.neurogami.com ja...@neurogami.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Status of TypeDirectedNameResolution proposal?
What's the status of the TDNR proposal [1]? Personally I think it is a very good idea and I'd like to see it in Haskell'/GHC rather sooner than later. Working around the limitations of the current record system is one of my biggest pain points in Haskell and TDNR would be a major improvement. Thus I wonder if someone is actively working on this proposal? Thanks, Levi. [1] http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ghci + user prelude
Hi. I'm aware of this option, and use it frequently to override the default prelude, but it doesn't help this problem: $ ghci -XNoImplicitPrelude GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. command line: module `Prelude' is not loaded On Mon, Nov 16, 2009 at 3:46 PM, Edward Z. Yang ezy...@mit.edu wrote: Excerpts from Sean McLaughlin's message of Mon Nov 16 15:27:55 -0500 2009: Is there a way around this? I often like to have a modified Prelude file in a subdirectory of my project, and this behavior keeps me from being able to start ghci there. http://www.haskell.org/haskellwiki/No_import_of_Prelude Cheers, Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Howto start a bigger project
Hi Greg, you folks sure aren't, but I'm so bloody disorganized, I'll never it right this way. Günther Am 17.11.2009, 00:50 Uhr, schrieb Gregory Crosswhite gcr...@phys.washington.edu: If all you are looking for is a place to chat about and garner feedback on your ideas for a new Haskell library, then why don't you just tell *us* what's on your mind? :-) I mean, we've just spent 37 posts talking about monoids in the last 48 hours, so we aren't exactly an unopinionated and reticent crowd. :-) - Greg On Nov 16, 2009, at 3:25 PM, Günther Schmidt wrote: Hi all, I don't think the *project* is ready for sourceforge or similar yet. I was thinking more about something bloggish first, where I could state some thoughts first and where people could then comment or otherwise contribute. I reckon it will be some time until the project needs a code repository, I'd need something first where I can sketch the whole thing and collect ideas. Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: [Haskell-cafe] Howto start a bigger project
On Mon, 16 Nov 2009 23:43:49 +0300, you wrote: Hello Casey, Monday, November 16, 2009, 11:30:51 PM, you wrote: Why not use www.sourceforge.net? i strongly recommend http://code.google.com or http://codeplex.com SF is slow and olf-fashioned Just because a Scandinavian started it, doesn't mean its ___-fashioned, somehow! :) -- Regards, Casey ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] creating documentation links failed with cabal install --haddock-options=--hyperlink-source. is this a bug?
On Sat, 2009-10-31 at 10:45 -0500, Thomas Hartman wrote: cabal haddock -–hyperlink-source installs documentation with links to source code, which also be on by defualt. cabal install –haddock-options=–hyperlink source does not install hyperlinked source. This is an instance of the lack of the feature described in this ticket: http://hackage.haskell.org/trac/hackage/ticket/517 BTW, you're getting confused between flags for the cabal haddock command and the haddock command. The --hyperlink-source flag is for the cabal haddock command. The haddock tool has no such flag (or anything equivalent) so using --haddock-options= will not help. Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] C headers in cabal dependencies
On Wed, 2009-10-28 at 17:34 -0200, Maurício CA wrote: Hi, I've been using 'install-includes' in a package. I sometimes make small changes to those include files, and I've seen that cabal doesn't consider then dependencies, i.e., doesn't rebuild .hsc files depending on then. I'm not sure if this is an error, as parsing hsc2hs input may not be cabal task. Anyway, I would like to suggest that files in install-includes be considered dependencies and that files under 'includes' be also included when processing '.hsc' files. This is an instance of the long standing lack of module/file dependency tracking in Cabal: http://hackage.haskell.org/trac/hackage/ticket/15 Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How much time until dependencies are rebuilt in hackage?
On Sat, 2009-11-14 at 17:31 -0200, Felipe Lessa wrote: On Sat, Nov 14, 2009 at 01:47:04PM -0200, Maurício CA wrote: Suppose package B depends on A. If a new version of A is uploaded to hackage, how much later package B will be rebuilt (either to show a problem with the new version or to solve a problem with a previous version of A)? I would guess never, but don't quote me on that ;). That's the correct answer! People who think this is a bad state of affairs can help out with the new server implementation (code.haskell.org/hackage-server). Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Howto start a bigger project
Hi James, it's still very very far away from even a single line of code. I'd need a medium to lay this out first and discuss the idea. I'd normaly use this list, but I think it's a bit too volatile a medium for that. Most of the time I'm unable to find the threads I was interested in ever again, or with a great deal of pain. The *project* at this stage is academic / R D in nature. Günther Am 17.11.2009, 00:58 Uhr, schrieb James Britt ja...@neurogami.com: Günther Schmidt wrote: Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will need to set it up in an organized way, something with a blog, web page or other means. I tried to solve it by myself while asking the occasional question here but that turned out to be ineefective. The problem as such is certainly of interest for just about any programmer who is using Haskell for real world programming too. In short, to get started I'd appreciate some tips how to set this up. Create a project on github.com. It makes it dead easy for people to try out code and submit patches. Do enough work so that the code is useful, even if the implementation is crap. In fact, a crappy implementation may be a good thing; it makes it easier for people to find something to contribute. And then they feel a part of the project. Version 0.0.1 has to work right out of the box, be easy to install, be stupid obvious to use, and have non-zero value. Promises mean nothing. So, in practice, you need to start a really small project that could maybe become big but doesn't have to in order to be valuable right now. I've ended up as a committer on more than a few projects because the code solved a real problem in a simple and good enough way that I did not feel the need to go roll my own. And when I encountered a bug or wanted a feature, it was easy to contribute. But, key to all this, is getting people to feel they have a vested interest in the project succeeding, and that can be tricky. James ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Howto start a bigger project
Why not just create a wiki? - S On 17.11.2009 01:54, Günther Schmidt wrote: Hi James, it's still very very far away from even a single line of code. I'd need a medium to lay this out first and discuss the idea. I'd normaly use this list, but I think it's a bit too volatile a medium for that. Most of the time I'm unable to find the threads I was interested in ever again, or with a great deal of pain. The *project* at this stage is academic / R D in nature. Günther Am 17.11.2009, 00:58 Uhr, schrieb James Britt ja...@neurogami.com: Günther Schmidt wrote: Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will need to set it up in an organized way, something with a blog, web page or other means. I tried to solve it by myself while asking the occasional question here but that turned out to be ineefective. The problem as such is certainly of interest for just about any programmer who is using Haskell for real world programming too. In short, to get started I'd appreciate some tips how to set this up. Create a project on github.com. It makes it dead easy for people to try out code and submit patches. Do enough work so that the code is useful, even if the implementation is crap. In fact, a crappy implementation may be a good thing; it makes it easier for people to find something to contribute. And then they feel a part of the project. Version 0.0.1 has to work right out of the box, be easy to install, be stupid obvious to use, and have non-zero value. Promises mean nothing. So, in practice, you need to start a really small project that could maybe become big but doesn't have to in order to be valuable right now. I've ended up as a committer on more than a few projects because the code solved a real problem in a simple and good enough way that I did not feel the need to go roll my own. And when I encountered a bug or wanted a feature, it was easy to contribute. But, key to all this, is getting people to feel they have a vested interest in the project succeeding, and that can be tricky. James ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: gnome-keyring 0.1 (bindings to libgnome-keyring)
The GNOME Keyring is a service for securely storing per-user secret information, such as passwords and encryption keys, on the GNOME desktop. This library is a binding to the libgnome-keyring C library. The API is still a bit too slave-ish to the original for my taste, some modules will be changing/merging in the next version. The innards are an absolute horror -- don't look too close if you're one of those people who faint at rampant unsafe casting. That said, it works surprisingly well for a first-release FFI binding -- mostly due to the excellent design of libgnome-keyring and c2hs. So if any Linux/BSD/OpenSolaris/etc users have needed secure password storage in Haskell, please try it out and let me know if you encounter any problems. Download: http://hackage.haskell.org/package/gnome-keyring/ API docs (copy of original library docs): https://dl.dropbox.com/u/1947532/gnome-keyring_0.1/index.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: wcwidth-0.0.1
A small package with bindings to a function in wchar.h that assigns a column width to Unicode characters. http://hackage.haskell.org/package/wcwidth-0.0.1 This is the function that tells your terminal to make Chinese characters two columns wide while making the letter 'a' but one column wide. In addition, a little utility is provided that constructs a table of widths by character and a listing of character ranges with the same width. On different systems, `wcwidth` may assign different widths to the same character for some obscure characters. -- Jason Dusek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Howto start a bigger project
How about patch-tag? It's built with haskell (happstack), and one of its founding goals is to promote the use of haskell in real world so you're sure to be surrounded by like minded people. And wikis are about to go live so you could help beta test that feature too :) thomas. Am 16. November 2009 12:15 schrieb Günther Schmidt gue.schm...@web.de: Hi all, I'm stuck with a problem where I need serious help from other haskellers, in particular those that participate here on this list. It's a rather big project and I will need to set it up in an organized way, something with a blog, web page or other means. I tried to solve it by myself while asking the occasional question here but that turned out to be ineefective. The problem as such is certainly of interest for just about any programmer who is using Haskell for real world programming too. In short, to get started I'd appreciate some tips how to set this up. Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: control-monad-failure and safe-failure
Michael Snoyman schrieb: control-monad-failure provides a basic notion of failure which does not commit to any concrete representation. It is just a version of the MonadError class without the annoying bits. class MonadFailure e m where failure :: e - m a Why is it called MonadFailure (specifically, what's the Monad bit doing there)? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe