Re: [Haskell-cafe] Haskell Platform and Leksah on Windows
Hello all, Thanks for your replies, I've relayed them to my acquaintance. Though he still doesn't understand that he's at fault for demanding the unreasonable. On Thu, Aug 8, 2013 at 6:28 AM, Carter Schonwald wrote: > Hello Mihai, > > you bring up 2 unrelated questions, i'll address them seperately > > > 1) > > Leksah should not be considered an "official haskell ide", but merely one of > many community supported editing tools. And frankly one of the less widely > used ones at that! Leksah is not used much at all by anyone, though theres > probably a handful of folks who do use it. > > Many folks use editors like Sublime Tex (2/3), Emacs, Vi(m), textmate, and > many more. Its worth noting that the sublime-haskell plugin for sublime > text, and analogous packages for many other editors, provide haskell > IDE-like powers, or at least a nice subset thereof. > > > 2) There are people working on building better easily portable native gui > toolkits, but in many respects, a nice haskelly gui toolkit is still > something people are experimetning with how to do well. theres lots of great > tools out as of the past year or two, many more in progress on various time > scales, and gtk2hs is great for linux (and thats fine). > > cheers > -Carter > > > > > > On Wed, Aug 7, 2013 at 1:18 AM, Mihai Maruseac > wrote: >> >> Hello, >> >> A friend of mine tried to install Haskell Platform and Leksah on >> Windows and was troubled by the amount of problems he encountered as a >> beginner in this. I've told him to ask over IRC and mailing list but >> it seems he has some problems with registration. >> >> Anyway, he blogged about his problems at >> http://dorinlazar.ro/haskell-platform-windows-crippled/ and I'm sure >> that we can work on fixing some of them. >> -- >> MM >> "All we have to decide is what we do with the time that is given to us" >> >> ___ >> Haskell-Cafe mailing list >> Haskell-Cafe@haskell.org >> http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- MM "All we have to decide is what we do with the time that is given to us" ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell Platform and Leksah on Windows
Hello, A friend of mine tried to install Haskell Platform and Leksah on Windows and was troubled by the amount of problems he encountered as a beginner in this. I've told him to ask over IRC and mailing list but it seems he has some problems with registration. Anyway, he blogged about his problems at http://dorinlazar.ro/haskell-platform-windows-crippled/ and I'm sure that we can work on fixing some of them. -- MM "All we have to decide is what we do with the time that is given to us" ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Promoting Haskell via Youtube movies
On Wed, Jun 19, 2013 at 3:03 AM, Carlo Hamalainen wrote: > On 18/06/13 04:23, Mihai Maruseac wrote: >> >> I was wondering if we have similar movies for Haskell as >> https://www.youtube.com/watch?v=kLO1djacsfg and >> https://www.youtube.com/watch?v=E3418SeWZfQ exist for Java. >> >> I indend to give them to some people to make them intrigued by the >> language and start learning it / looking for it. > > Cool, many thanks to all who answered here, they have proven useful -- MM "All we have to decide is what we do with the time that is given to us" ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] <> error message
On Sat, Jun 22, 2013 at 12:41 AM, Omari Norman wrote: > I compiled some code with GHC 7.6.3 that produces a simple error at runtime > > myProgramName: <> > > At which point the program exits with code 1. > > Is there documentation for this error anywhere? Does it mean I have some > infinite loop in my code somewhere? If so, does GHC catch all infinite > loops? I have never gotten this error before. Thanks. Hi, Indeed, you have an infinite loop in your code. However, not all infinite loops are catcheable by the mechanism employed there, it would be very hard to do so. Basically, your code reduces after several transformation to something on the lines of f = f ... Here is a simple program: main = do print g print $ f 3 g :: Int g = 3 f :: Int -> Int f x = 1 + f x This results in an infinite loop in f but it is not caught because there is an argument given to the function f. However, if we had g = g + 1 This will be turned into the loop message. -- MM "All we have to decide is what we do with the time that is given to us" ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Promoting Haskell via Youtube movies
Hi, I was wondering if we have similar movies for Haskell as https://www.youtube.com/watch?v=kLO1djacsfg and https://www.youtube.com/watch?v=E3418SeWZfQ exist for Java. I indend to give them to some people to make them intrigued by the language and start learning it / looking for it. -- MM "All we have to decide is what we do with the time that is given to us" ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Automating Hackage accounts
On Thu, Jun 13, 2013 at 5:02 PM, Tobias Dammers wrote: > On Thu, Jun 13, 2013 at 09:44:03AM -0400, Andrew Pennebaker wrote: >> Could we add an HTML form for creating new Hackage accounts? Right now, our >> community is small enough that emailing r...@soi.city.ac.uk and waiting for >> a manual response isn't too bad of a problem, but as we grow, it would be >> nice for these sorts of things to be handled by a server, like with >> RubyGems and NPM. > > IMHO, a more pressing issue is SSL uploads and package signing. As it > stands, anyone with a Hackage account can upload a new version of any > given package, and some wire-sniffing is enough to reveal a legit user's > password. I'd try to solve the latest two things first before going into creating a specific form. On the other hand, maybe we can rig something up with Yesod or similar to solve all three points at the same time. I'm busy now with my masters disertation but I can attempt something in a month if it seems ok and no one else does it before that date. -- MM "All we have to decide is what we do with the time that is given to us" ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] "Haskell from N00b to Real World Programmer"
Hello, As hinted in the previous HCAR, this year we will organize an workshop entitled like the subject of this mail[1]. It will be organized by ROSEdu (Romanian Open Source Education) [2] and the newly founded Haskell-Romania group (no link yet, working on that). It is one workshop in a series of summer workshops organized by ROSEdu (go one level up in the wiki, some of them are in Romanian and I don't want to blindly give links to Romanian pages). The entire schedule is given on the wiki page at [1] and detailed below: Day 1 (8th of July) Introduction. History and Syntax. -- basic introduction to the language. Including @lambdabot usage as an example Programming with Static Typing as An Ally. -- designing with types and using GHCI for rapid prototyping and testing type of expressions. Possible to include @djinn Programming with State and Style. -- gentle introduction to monads in the style of "You could have invented monads" [3] Day 2 (9th of July) Packaging and Distributing Code. -- hackage, cabal, cabal-dev and, maybe, stackage The Awesome xmonad Window Manager -- we'll let them tweak configuration files in xmonad and use them. In this way, they get to use real world apps and change them to suit their needs. Maybe attract some developers. Compare and Contrast. Blow Your Mind with Haskell and Compare with Python. -- Starting with a comparison between some Python code and the equivalent Haskell one we get to cover topics in [4] Day 3 (11th of July) Lenses for Updating Details. -- you've guessed it, lenses Creating Graphical Interfaces. -- GTK2hs or lGTK. I'd like to test the second one Static Site Generation. -- Hakyll, config tweaking, generating first site, etc. Day 4 (12th of July) Beautiful Diagrams -- diagrams package Pipes and Conduits for Faster I/O -- pipes Creating Real-World Web Applications. -- Yesod (because that's what we know) Day 5 (13th of July) Hackathon Day If you have some suggestions, please make them. Lastly, for the hackathon day we have considered making some bots for I.GameBot[5] and an IRC bot with features that we'd like on #rosedu and #haskell-ro (grab, karma, resource location, statistics). If you'd have some other suggestions which could be implemented in a single day after the previous courses, please, do share them with us. Thanks and sorry for the length of the mail. [1]: http://workshop.rosedu.org/2013/sesiuni/haskell [2]: http://rosedu.org/ [3]: http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html [4]: http://www.haskell.org/haskellwiki/Blow_your_mind [5]: https://github.com/rosedu/I.GameBot -- MM "All we have to decide is what we do with the time that is given to us" ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] AI - machine learning
On Mon, Jul 30, 2012 at 4:39 PM, Chris Taylor wrote: > miro gmail.com> writes: > >> >> Hi All, recently I started to take a look at haskell, >> especially at AI. I can see some email addresses of interested >> people there but not so much of other activity behind. Does it >> exist some mailing group especially for AI? >> Basically I'm interested in trying some machine learning >> algorithms. Start with reinforcement learning and value-based), >> and go towards AGI (Artificial General Intelligence). Does anybody >> know about some already existing haskell approaches, or is there >> anybody working on this? >> Cheers, >> m. >> > > Hi Miro > > For the past month or so I've been working through some of the algorithms in > Artificial Intelligence: A Modern Approach by Russell and Norvig, and > implementing them in Haskell. The code is available on github > (https://github.com/chris-taylor/aima-haskell), you may be interested in > taking > a look. I haven't written any code for reinforcement learning yet, though I > have > implemented value iteration and policy iteration for MDPs. > Hi, I have an implementation of maze solving via genetic algorithms in Haskell at https://github.com/mihaimaruseac/HsMaze It was a homework with some added extensions but I guess that it is worth a look and some feedabck if possible :) Thanks -- MM ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] blog software in Haskell?
On Mon, Oct 31, 2011 at 11:14 AM, Ketil Malde wrote: > > Hi, > > I just upgraded my server, and set up everything again. Except > wordpress, as 1) I'm not too fond of its user interface, and 2) it's a > big pile of PHP, difficult to keep updated, and basically a disaster > waiting to happen (and in fact, it was hacked at one point). > > Before I enable it again, is there any alternatives I should consider? > Preferably written in Haskell, of course, but other suggestions welcome > as well. > Hi, Have a look at Hakyll[1] [1]: http://jaspervdj.be/hakyll/ Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming
On Fri, Jul 8, 2011 at 11:57 AM, Ketil Malde wrote: > > [snip haskell@, leaving -café] > > Heinrich Apfelmus writes: > >> Do you know any *small GUI programs* that you would *like* to see >> *implemented with Functional Reactive Programming?* > I wanted to implement a simple game where the player has to escape from a maze. I didn't have time to look into it, I expect to do something about it from August. Anyway, I just wanted to post the idea. -- Mihai Maruseac ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Computational Physics in Haskell
On Thu, Mar 31, 2011 at 10:54 AM, Azeem -ul-Hasan wrote: > > I am only a sophomore and haven't taken any course in Computational Physics. > So what I would like will be to take a library or program with some > excellent documentation and use it as a base for learning about > computational physics and Haskell. This is one of the things I plan to do in > summer. So, I please make suggestions in this regard. > Mihai, from your suggestions HODE and Bullet seem good and little further > down I saw http://hackage.haskell.org/package/QIO which is very interesting > as most probably I will be taking a course on Quantum Computation after > summer and this might make it more interesting. > KC's idea of converting an existing such program written in some other > language to Haskell is also very exciting, but the program needs to be > extensively documented and it would help if it is written in Matlab or Perl > , as these are the only languages besides Haskell I have some degree of > familiarity with. Another course can be to take some book on Computational > Physics and try to implement its ideas in Haskell. So any suggestions is > these regards? Eh, I only posted those because I looked a few days ago at them while trying to determine if writing an implementation by myself will be a good effort or not. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Computational Physics in Haskell
On Thu, Mar 31, 2011 at 1:50 AM, KC wrote: > I'd also like to know of any Haskell programs for > theoretical/computational physics. > > H! > > Maybe converting such programs to Haskell. > > > On Wed, Mar 30, 2011 at 11:23 AM, Azeem -ul-Hasan wrote: >> I started learning Haskell a little while ago. Although I am a novice I am >> still in love with it. >> I am physics major and primarily interested in Theoretical Physics and would >> like to use Haskell in this area. So, I just know to what has been done in >> this area, are there any libraries for simulating physical process in >> Haskell etc. > Don't know if this is what you're looking for but I found this pages: [1], [2], [3]. Maybe one of them will contain what you're looking for. [1]: http://hackage.haskell.org/packages/archive/pkg-list.html#cat:physics [2]: http://hackage.haskell.org/packages/archive/pkg-list.html#cat:scientific%20simulation [3]: http://hackage.haskell.org/packages/archive/pkg-list.html#cat:simulation -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Trac login problem
Hi, I have a problem while trying to login to Haskell Trac instance. Entering the username and password that I know are valid gives me a login error. Trying to recover the password with the mail address that I use gives another error saying that there is no combination between the username and the mail. And, when trying to recreate the account if correctly complains that there is a valid username already. Can someone, please, look into it? Thanks, -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell IDE
On Thu, Mar 3, 2011 at 9:05 AM, Hauschild, Klaus (EXT) wrote: > Hi Haskellers, > > whats your Haskell IDE of choise? Currently I use leksah. Is the EclipseFP > Plugin for Eclipse a real alternative? > > Thanks > Hi, I use vim in terminator: one window with the source, one with ghci and one small window with the directory tree. It is just like a IDE but only bundled with what I use. -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Alex -g
On Sun, Feb 20, 2011 at 10:20 PM, Max Bolingbroke wrote: > On 20 February 2011 19:56, Mihai Maruseac wrote: >> Hi, >> >> When running Alex -g I get several warning telling me that a bang >> pattern is required and that the warning will be an error in GHC 6.14. > > As it happens, that is not an error in GHC 7 (see > http://hackage.haskell.org/trac/ghc/ticket/3278): > > """ > $ ghci -XMagicHash > GHCi, version 7.0.1.20101215: http://www.haskell.org/ghc/ :? for help > letLoading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... xdone. > Loading package ffi-1.0 ... linking ... done. > Prelude> let x = 2# in 10 > > :1:5: > Warning: Bindings containing unlifted types should use an > outermost bang pattern: > x = 2# > In the expression: let x = 2# in 10 > In an equation for `it': it = let x = 2# in 10 > > :1:5: > Warning: Bindings containing unlifted types should use an > outermost bang pattern: > x = 2# > In the expression: let x = 2# in 10 > In an equation for `it': it = let x = 2# in 10 > 10 > """ > > (I'm not quite sure why I get two identical warnings..) > > It looks like Alex has gone back and forth on what to do here. Selected > commits: > > """ > Fri Nov 26 10:43:42 GMT 2010 Simon Marlow > * don't use CPP for LANGUAGE pragmas > Drop the -fno-warn-lazy-unlifted-bindings again. CPP in the header > prevents the user from adding their own LANGUAGE pragmas at the top of > the .x file if they're using GHC < 7.0. > > Wed Nov 17 10:42:23 GMT 2010 Simon Marlow > * Stop using -fglasgow-exts, and turn off bogus bang-pattern warnings > > Wed Nov 17 10:41:06 GMT 2010 Simon Marlow > * remove bang patterns on unlifted bindings again > > Wed Jun 3 23:58:54 BST 2009 Ian Lynagh > * Use bang patterns on unlifted bindings > """ > > So it looks like you should just ignore this warning, or turn it off :-) > Thanks :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Alex -g
Hi, When running Alex -g I get several warning telling me that a bang pattern is required and that the warning will be an error in GHC 6.14. It is something along the following lines: Warning: Bindings containing unlifted types must use an outermost bang pattern: { (base) = alexIndexInt32OffAddr alex_base s } *** This will be an error in GHC 6.14! Fix your code now! In the expression: let (base) = alexIndexInt32OffAddr alex_base s ((I# (ord_c))) = ord c (offset) = (base +# ord_c) I'm running it without the -g flag for now. Don't know yet where too look to solve it or if it is really needed. -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Alex monadUserState question
On Thu, Feb 17, 2011 at 2:42 PM, Simon Marlow wrote: > >> Just downloaded the latest Alex package from Hackage (different from >> the one in Ubuntu's repositories by 2 minor versions) and found that >> the monadUserState wrapper still misses 2 functions for dealing with >> changes in the user supplied state. Is this intended or it was an >> unwanted omission? > > Could you tell me what's missing? Is this a regression? > Yes, there are two functions (this is the type that I guess they should have) getUserData :: Alex AlexUserState setUserData :: AlexUserState -> Alex () I've used them in a particular implementation today in this way but maybe there are other ways to handle them too. He're the code I've used: getUserData :: Alex AlexUserState getUserData = Alex $ \s@AlexState{alex_ust=ud} -> Right (s, ud) setUserData :: AlexUserState -> Alex () setUserData ust = Alex $ \s -> Right (s{alex_ust=ust}, ()) Thanks for the quick input, -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Alex monadUserState question
Hi, Just downloaded the latest Alex package from Hackage (different from the one in Ubuntu's repositories by 2 minor versions) and found that the monadUserState wrapper still misses 2 functions for dealing with changes in the user supplied state. Is this intended or it was an unwanted omission? Thanks, Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Alex question
On Tue, Feb 15, 2011 at 9:19 PM, Mihai Maruseac wrote: > On Tue, Feb 15, 2011 at 8:47 PM, Mihai Maruseac > wrote: >> Hi, >> >> I want to make Alex to parse a file using states. I wrote a simple >> basic wrapped .x file but it complaints that it doesn't know the >> "begin" symbol. As listed here[1], my code does something like this: >> >> <0> \/{2} { begin italic } >> >> Am I doing something wrong? Should I manage myself the states? Should >> I use another parser generator? >> >> [1]: http://www.haskell.org/alex/doc/html/alex-files.html#startcodes >> > > Hi, > > Just found out that only the monadic wrapper handles state. However, > if I switch to it I receive the following error: > > templates/wrappers.hs:133:15: Not in scope: `alexEOF' > > Does anyone know what's going here? Thanks > Hi, Solved them after a night without sleep :) Thanks, -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] happy + alex parsing question
On Wed, Feb 16, 2011 at 5:31 PM, Roman Dzvinkovsky wrote: > Hi, > > using alex+happy, how could I parse lines like these? > >> "mr says \n" > > where both and may contain arbitrary characters (except > eol)? > > If I make lexer tokens > >> "mr " { T_Mr } >> " says " { T_Says } >> \r?\n { T_Eol } >> . { T_Char $$ } > > and parser > >> 'mr ' { T_Mr } >> ' says ' { T_Says } >> eol { T_Eol } >> char { T_Char } > > ... > >> line :: { (String, String) } >> : 'mr ' string ' says ' string eol { ($2, $4) } > >> string :: { String } >> : char { [ $1 ] } >> | char string { $1 : $2 } > > then I get error when or contain "mr " > substrings, because parser encounters T_Mr token. > > Workaround is mention all small tokens in my definition: > >> string :: { String } >> : { [] } >> | 'mr ' string { "mr " ++ $2 } >> | ' says ' string { " says " ++ $2 } >> | char string { $1 : $2 } > > but that is weird and I'm sure there is a better way. > I don't have an implementation right now but you could try having some states or user data in which to record whether you have already parsed the 'mr ' part (etc..) Guess you could use monadUserData parser (just like I've found after a night without sleep [1] - solved now). -- Mihai [1]: http://www.haskell.org/pipermail/haskell-cafe/2011-February/089330.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Alex question
On Tue, Feb 15, 2011 at 8:47 PM, Mihai Maruseac wrote: > Hi, > > I want to make Alex to parse a file using states. I wrote a simple > basic wrapped .x file but it complaints that it doesn't know the > "begin" symbol. As listed here[1], my code does something like this: > > <0> \/{2} { begin italic } > > Am I doing something wrong? Should I manage myself the states? Should > I use another parser generator? > > [1]: http://www.haskell.org/alex/doc/html/alex-files.html#startcodes > Hi, Just found out that only the monadic wrapper handles state. However, if I switch to it I receive the following error: templates/wrappers.hs:133:15: Not in scope: `alexEOF' Does anyone know what's going here? Thanks -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell GUI
On Tue, Feb 15, 2011 at 8:20 PM, Mihai Maruseac wrote: > Hi, > > I'd like to start a new project in Haskell, this time using an user > interface. Looking at [1] I found that there are several of them > listed there. However, the list there is very long. > > Right now, I am unsure on what is best to use. Can someone give me any > hints on which is the most kept-to-date and most supported GUI > library? Basically, I want to display some graphs in a dynamic way, > reacting to user input, nothing fancy right now. > Forgot to add the link: [1]: http://www.haskell.org/haskellwiki/Applications_and_libraries/GUI_libraries ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Alex question
Hi, I want to make Alex to parse a file using states. I wrote a simple basic wrapped .x file but it complaints that it doesn't know the "begin" symbol. As listed here[1], my code does something like this: <0> \/{2} { begin italic } Am I doing something wrong? Should I manage myself the states? Should I use another parser generator? [1]: http://www.haskell.org/alex/doc/html/alex-files.html#startcodes Thanks, -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell GUI
Hi, I'd like to start a new project in Haskell, this time using an user interface. Looking at [1] I found that there are several of them listed there. However, the list there is very long. Right now, I am unsure on what is best to use. Can someone give me any hints on which is the most kept-to-date and most supported GUI library? Basically, I want to display some graphs in a dynamic way, reacting to user input, nothing fancy right now. Thanks, -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Headlines on haskell.org
On Tue, Feb 15, 2011 at 11:39 AM, Michael Snoyman wrote: > Hi everyone, > > I'm not quite sure to whom to address this, but it is with regards to > the "Headlines" section at the bottom of haskell.org. It has not been > updated for 2011 yet, which I can't imagine looks very good to new > users. Is anyone interested in/able to update it? > > If I may be so bold, I would like to offer up Warp as a possible > headline. Are there any objections to this? > Hi, What should go there, under the section? -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Beginner: (Another) Binary Search Tree Question
> | v<= a = Node a ( insert v b ) c Hi, The quoted line is the problem, you wanted to say Node (insert v b) a c. -- MM ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell WalkSat algorithm implementation
On Mon, Jan 31, 2011 at 9:11 PM, Manolache Andrei-Ionut < andressocrate...@yahoo.com> wrote: > I need some help if possible with the following problem.The WalkSat > algorithm takes a formula, a probability 0 =< p =< 1, and a boundary of > maximum flips maxflips > and returns a model that satisfies the formula or failure. The algorithm > begins by assigning truth values to > the atoms randomly, ie. generating a random model. Then it proceeds to flip > the value of an atom from one > of the unsatisfied clauses until it is able to find a model that satisfies > the formula or reaches the maximum > number of flips. > In order to select which atom from the currently selected clause to flip, > it follows two strategies: > 1. Either flip any atom randomly. > 2. Or flip the atom that maximizes the number of satisfied clauses in the > formula. > The choice to flip randomly is followed with probability p. > 1.atomsClause :: Clause ! [Atom] This function must take a Clause and > return the set of Atoms of > that Clause. Note that the set should not contain any duplicates. > 2. atoms :: Formula![Atom] This function must take a Formula return the set > of Atoms of a Formula. > Note that the set should not contain any duplicates. > 3. isLiteral :: Literal ! Clause ! Bool This function returns True if the > given Literal can be found > within the Clause. > 4. flipSymbol :: Model ! Atom ! Model This function must take a Model and > an Atom and flip the > truth value of the atom in the model. > > Now I've done the first 3 I need some help with the last one, Here is the > code: > module Algorithm where > > import System.Random > import Data.Maybe > import Data.List > > type Atom = String > type Literal = (Bool,Atom) > type Clause = [Literal] > type Formula = [Clause] > type Model = [(Atom, Bool)] > type Node = (Formula, ([Atom], Model)) > > atomsClause :: Clause -> [Atom] > atomsClause = nub . map snd > > atoms :: Formula -> [Atom] > atoms =atomsClause . concat > > isLiteral :: Literal -> Clause -> Bool > isLiteral (b,a) cs = or[x==b && y==a|(x,y)<-cs] > > flipSymbol :: Model -> Atom -> Model > flipSymbol = undefined ---the last one > Thank you. > > Hi, I guess that flipSymbol m a = map f m where f (atom, value) = if a == atom then (atom, not value) else (atom, value) should do the trick. -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] how to write a loop in haskell way
On Sun, Dec 19, 2010 at 12:27 PM, ender wrote: > Hi all: > I'v been learning haskell for several months, and now I'm trying > to write some "real word" program in haskell, like finding files under > one directory or something > My problem is that, I dont know the way of writing a loop in > haskell. I searched google and found some code that translate c loop > into haskell like this one: > >> > > I am new to haskell and would look to write a function equivalent >> > > to the following loop in C >> > > >> > > int value = 50; >> > > int part_stack[4]; >> > > int *part_ptr = part_stack; >> > > for (; value; value /= 1) >> > > *part_ptr++ = value % 1; >> > >> > part_stack :: [Int] >> > part_stack = [0,50] >> > >> > Note that I've performed a memoization optimization--this >> > makes the code both smaller, faster and easier to read! :P >> >> Ignore David, he's pulling your leg. Here's the proper translation: >> >> do >> alloca $ \value -> do >> poke value (50::Int) >> allocaArray 4 $ \part_stack -> do >> alloca $ \part_ptr -> do >> poke part_ptr part_stack >> let loop = do >> val <- peek value >> if val == 0 then return () else do >> p <- peek part_ptr >> poke p (val `rem` 1) >> poke part_ptr (p `plusPtr` 1) >> poke value (val `quot` 1) >> loop >> loop > > and I really think that's not a "haskell way", it's just translate c > code into haskell code byte by byte > My question is: how to translate above c code into haskell in "haskell way" Hi, Usually, loops are translated in recursion or higher order functions (maps, folds, scans). To generate a list from a number, use functions like iterate or repeat. To end the iterate, use a function from the takeWhile family. My translation of the above would be (no type signatures because I'm lazy right now): valueTrim x = div x 1 valueGet x = mod x 10 f x = map valueGet $ takeWhile (/= 0) $ iterate valueTrim x (call with f 50) Reading the last line, you have a very concise description: trim x until it becomes 0 and apply valueGet to each of the results. -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Thunks
On Fri, Oct 15, 2010 at 1:19 AM, Jason Dagit wrote: > > > On Thu, Oct 14, 2010 at 2:52 PM, Evan Laforge wrote: >> >> > I don't know of any way to examine this for a running program. You can >> > get >> > GHC to spit out core and STG using -ddump-core and -ddump-stg flags: >> >> There's no -ddump-core flag. I was puzzled about the proper way to >> get "final" core, and have been using -ddump-simpl, but I don't know >> if that's correct. > > Indeed, I meant -ddump-simpl. That's why I tried to link to the GHC > manual, I make typos and it has extra info and enumerates the flags > available :) Just search that page for -ddump. > Sorry about the confusing typo, > Jason Thanks, will look into the debugging dump flags. I should have done this before asking :) -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Thunks
Hi, Is there a way to determine the order in which thunks are created and expanded/evaluated in Haskell (GHC)? I'm looking mainly at some existing interface but if there is only something in the GHC source it will suffice. Thanks, -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Stack traces in GHC
Sorry, updated now :) http://hackage.haskell.org/trac/ghc/ticket/3693 On Wed, Sep 15, 2010 at 11:45 AM, Ivan Lazar Miljenovic wrote: > On 15 September 2010 18:10, Mihai Maruseac wrote: >> Hi, >> >> Just did a preview of bug #3693 [1] and saw that there are a few >> patches issued there. Does this mean that the problem is solved and >> there would be stack traces in a future version of GHC? >> >> I'll test the patches in 24 hours, when I'll be back at home. >> >> -- >> Mihai >> >> [1]: http://www.khronos.org/webgl/wiki/Tutorial > > Ummm for some reason I don't think that that is the correct link... ;-) > > -- > Ivan Lazar Miljenovic > ivan.miljeno...@gmail.com > IvanMiljenovic.wordpress.com > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Stack traces in GHC
Hi, Just did a preview of bug #3693 [1] and saw that there are a few patches issued there. Does this mean that the problem is solved and there would be stack traces in a future version of GHC? I'll test the patches in 24 hours, when I'll be back at home. -- Mihai [1]: http://www.khronos.org/webgl/wiki/Tutorial ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell Forum
>From my experience once a forum pops up the mailing list dies. -- Mihai Maruseac ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Multidimensional Matrices in Haskell
On Fri, Jul 9, 2010 at 4:50 AM, Daniel Cook wrote: > Have you considered http://hackage.haskell.org/package/hTensor ? > > On Wed, Jul 7, 2010 at 9:58 PM, John Lato wrote: >> Hello, >> >> There are a lot of options. The "array" package, which is included >> with GHC, provides both mutable and immutable arrays of arbitrary >> dimensions. A quick scan of hackage shows ArrayRef, ix-shapable, and >> judy as alternatives, among others. >> >> Immutable arrays can be pure, but all mutable array interfaces will >> require a monad of some type. I usually think ST-based mutability is >> easiest to work with. >> >> John >> >>> From: Mihai Maruseac >>> >>> Hi, >>> >>> A friend of mine wanted to do some Cellular Automata experiments in >>> Haskell and was asking me what packages/libraries are there for >>> multidimensional matrices. I'm interested in both immutable and >>> mutable ones but I don't want them to be trapped inside a monad of any >>> kind. >>> >>> Any hints? >>> Thanks for the input. Will test all of them :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Multidimensional Matrices in Haskell
Hi, A friend of mine wanted to do some Cellular Automata experiments in Haskell and was asking me what packages/libraries are there for multidimensional matrices. I'm interested in both immutable and mutable ones but I don't want them to be trapped inside a monad of any kind. Any hints? -- MM ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Are you a Haskell expert? [How easy is it to hire Haskell programmers]
On Sat, Jul 3, 2010 at 12:30 PM, Chris BROWN wrote: >>> >> >> So hsc2hs is related to writing C bindings? Well, that'll be why I've >> never heard of it then; I don't understand C. (Nor do I particularly >> want to... I chose Haskell.) >> >> Besides, why in the world do Haskell libraries have to involve C? I've >> written and released several libraries on Hackage, none of which are in >> any way related to C. Not every library is just a C binding, you know... > > I completely agree with this. Even in implementing something as complex as a > refactoring tool we never once needed to touch C. (nor Applicative, for that > matter :) )... > As a matter of fact, all of my Haskell codes didn't even touch monads. I always tried to write code as simple as possible and as understandable as possible (mainly for teaching purposes) and not as optimized as possible. -- Mihai ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GSOC Haskell Project
I have submitted my proposal to the gsoc site taking care to include all the feedback that was given either publicly or privately both from people on haskell-cafe, on #haskell or from my country. This is the last call for feedback before the submission period is ended. One last chance to improve the application. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: GSOC Haskell Project
Oops, forgot to add the third link: my homepage is at http://people.rosedu.org/people/mihai_maruseac On Tue, Apr 6, 2010 at 10:11 PM, Mihai Maruseac wrote: > Hello again > > Following a feedback (courtesy of lispy) of my proposal on #haskell, I > come to complete it with some bits here and there. > > First, a short analysis on the impact that this tool will have on the > community. I now that right now there are plenty of clever tricks for > debugging your code, even if it involves FFI calls or Monad > Transformers Stacks but no one trick is a silver bullet. As far as I > know, there is no trick which works the same way both for FFI or > Arrows. However, having a backtrace will really help in any domain, > from DSLs to FRP and Category Theory constructs. It will help also the > beginner average Joe starting to program in Haskell and the senior PhD > doctor Bob from the University. The later will be helped by seeing > what part of his code is responsible for an unexpected failure while > the former will recognize the stack traces he saw in gdb and other > imperative programming languages. > > The second completion that I want to do is to give some more details > on the timeline. Between May 26 and first of June I will contact Simon > Peyton Joynes and his coautors to see how I will integrate will their > code base, what are their policies to integrating patches, what > repository they use, etc. This is to ensure continual integration, > such that every day there will be a version of the tool which can be > built on any machine and used for debugging your own code. Moreover, I > will talk to them during this timeframe to convince myself whether the > idea of a HPC-like rewrite is good or I should stick with the existing > one. If later, this would be all that I'll be doing during this > period, otherwise, I'll try to refactor the existing rewrite to the > HPC-like one during this timeframe and during one more week after that > (that is, until 6th of June). Last but not least, this timeframe must > be used to prove several proof of concept snapshots of the debugger, > in both variants for public feedback and further guidance > > Between 1st and 14th of June I will integrate higher-order functions > and typeclasses into the debugger. If choosing to do a HPC-like > rewrite only the higher order functions would be integrated until 14th > of June. > > However, until 1st of July I will have both higher-order functions and > typeclasses inserted into the debugger, the period between 14th and > 30th being a buffered period for cases where I'll get stuck and fall > behind the timeline. > > In July, the first week will be dedicated to integrating CAFs while > the second one will be for cross module debugging providing options to > debug only certain modules while ignoring others (assuming that they > are correct). A new buffering period will be between 14th of July and > 1st of August, a period which will be used to ensure that all parts > will be integrated well and will work in a non-buggy way. > > The month of August is dedicated to community suggested improvements. > Through a series of stress tests or simple tests this debugger will > show its strength and its bugs. The former will be praised while the > later will be solved during this timeframe and after the GSoC period. > > Next, some details about my haskell development skills. If the code > snippets found in my blog[1] are not so relevant, maybe a link to the > latest project developed in Haskell will help[2]. The project was > supposed to be a rewrite of Berkley's esspresso program allowing both > for logic expression minimization and for automatic drawing of gates. > Lately, we stopped working on it because we couldn't find a good > working example of it's utility. To add more to my level of Haskell > knowledge, I may say that I am teaching programming paradigms at my > university as a teaching assistant (students are allowed to do so if > they have a very solid knowledge of the subject and a very good > extra-curricular open-source/contest activity) and one quarter of the > course is held in Haskell (though this year will be the first when we > will teach Monads to the students, starting from one of my ideas). > Lastly, I've read books on Haskell and right now I am trying to grasp > Category Theory by reading Awodey's book. Moreover, I have the full > journal of functional programming articles downloaded on my laptop. > > As for the community integration, I am one of the most active ROSEdu > members here, taking part in almost any activity that we develop. I am > project manager for one Tech Talks activity and I intend to give a > talk on side effects during the next month. More info ca
[Haskell-cafe] Re: GSOC Haskell Project
Hello again Following a feedback (courtesy of lispy) of my proposal on #haskell, I come to complete it with some bits here and there. First, a short analysis on the impact that this tool will have on the community. I now that right now there are plenty of clever tricks for debugging your code, even if it involves FFI calls or Monad Transformers Stacks but no one trick is a silver bullet. As far as I know, there is no trick which works the same way both for FFI or Arrows. However, having a backtrace will really help in any domain, from DSLs to FRP and Category Theory constructs. It will help also the beginner average Joe starting to program in Haskell and the senior PhD doctor Bob from the University. The later will be helped by seeing what part of his code is responsible for an unexpected failure while the former will recognize the stack traces he saw in gdb and other imperative programming languages. The second completion that I want to do is to give some more details on the timeline. Between May 26 and first of June I will contact Simon Peyton Joynes and his coautors to see how I will integrate will their code base, what are their policies to integrating patches, what repository they use, etc. This is to ensure continual integration, such that every day there will be a version of the tool which can be built on any machine and used for debugging your own code. Moreover, I will talk to them during this timeframe to convince myself whether the idea of a HPC-like rewrite is good or I should stick with the existing one. If later, this would be all that I'll be doing during this period, otherwise, I'll try to refactor the existing rewrite to the HPC-like one during this timeframe and during one more week after that (that is, until 6th of June). Last but not least, this timeframe must be used to prove several proof of concept snapshots of the debugger, in both variants for public feedback and further guidance Between 1st and 14th of June I will integrate higher-order functions and typeclasses into the debugger. If choosing to do a HPC-like rewrite only the higher order functions would be integrated until 14th of June. However, until 1st of July I will have both higher-order functions and typeclasses inserted into the debugger, the period between 14th and 30th being a buffered period for cases where I'll get stuck and fall behind the timeline. In July, the first week will be dedicated to integrating CAFs while the second one will be for cross module debugging providing options to debug only certain modules while ignoring others (assuming that they are correct). A new buffering period will be between 14th of July and 1st of August, a period which will be used to ensure that all parts will be integrated well and will work in a non-buggy way. The month of August is dedicated to community suggested improvements. Through a series of stress tests or simple tests this debugger will show its strength and its bugs. The former will be praised while the later will be solved during this timeframe and after the GSoC period. Next, some details about my haskell development skills. If the code snippets found in my blog[1] are not so relevant, maybe a link to the latest project developed in Haskell will help[2]. The project was supposed to be a rewrite of Berkley's esspresso program allowing both for logic expression minimization and for automatic drawing of gates. Lately, we stopped working on it because we couldn't find a good working example of it's utility. To add more to my level of Haskell knowledge, I may say that I am teaching programming paradigms at my university as a teaching assistant (students are allowed to do so if they have a very solid knowledge of the subject and a very good extra-curricular open-source/contest activity) and one quarter of the course is held in Haskell (though this year will be the first when we will teach Monads to the students, starting from one of my ideas). Lastly, I've read books on Haskell and right now I am trying to grasp Category Theory by reading Awodey's book. Moreover, I have the full journal of functional programming articles downloaded on my laptop. As for the community integration, I am one of the most active ROSEdu members here, taking part in almost any activity that we develop. I am project manager for one Tech Talks activity and I intend to give a talk on side effects during the next month. More info can be found by reading my homepage[3]. Thanks for the patience for reading another long email. Please, do give some feedback to help me create a better application. Not really useful PS: I am thinking to chose a graduation license software project on Haskell though I haven't yet selected a theme and a domain. [1]: http://pgraycode.wordpress.com [2]: http://dev.rosedu.org/xpresso/browser/trunk -- Mihai Maruseac On Mon, Apr 5, 2010 at 8:26 PM, Mihai Maruseac wrote: > Hello haskellers (men and women)! > > I had
[Haskell-cafe] GSOC Haskell Project
Hello haskellers (men and women)! I had an idea about a graphical debugger for Haskell but it has proven to be not really so much useful. However, I was directed into trying to implement a backtrace-printing debugger as it is known that the community will benefit from it. With this idea in mind, I've settled down and browsed the web until I gathered enough material to design a proposal for Google Summer of Code 2010, which I present here to receive as much feedback from any of you as possible before posting it on Google. I am hereby proposing a project to add stack traces to a Haskell Debugger, either integrated with GHCi or as a stand-alone tool (or, even better with possibility to be integrated with GHC, HUGS and other interpreters and compilers). This will help novice users reason about their programs and grasp a solid foothold on the language while jumping to more and more ambitious projects without fear that their code may break and they'll be left with a cryptic error message like ``head: empty list'. Also, this will help veteran haskellers by providing the so much desired tool they asked several times for. Leaving the marketing away, following are some descriptions of the project. My idea tries to address two tickets issued on haskell.org trac. The first one of them (in a chronological order, not sorted by importance and relevance) is #960 [0]: providing a lexical call site in order to ease the debugging. Now, this is not too important for a stand alone project taking into account that HPC exists and that GHCi has debugging[5], [6]. However, the second ticket (#3693) [1] is what my proposal aims to solve. Obtaining and showing stack traces on errors is a very good thing in imperative languages and someone who have used GDB more than 20% of his programming hours knows this. However, obtaining them in Haskell (or any other lazy functional programming language) is not that easy. This is what the community suggested me to do if I want to implement a debugger and this is what I will want to do. Now, the fact that both these tickets are marked as never ending (with a bottom value as milestone) I know that they can be solved in one project. Proof of this is offered in several places, some of them gathered together into one single wiki page[2]. Following the work of Tristan Allwood, Simon Peyton Jones and Susan Eisenbach presented a paper to the Haskell Symposium from May 2009[3] in which they laid down the basis for offering stack traces in GHC. Needless to say, my GSoC project will be implemented starting from their article. It combines ideas from that paper with ideas from a presentation at Haskell Implementors Workshop 2009[4] and tries to solve the open problems suggested by Tristan and colleagues in their paper: providing stack traces for higher order functions, taking care of typeclasses and modules, taking into account constant applicative forms and/or mutually recursive functions. In order to do this, I may either expand on their work, extending the Core to Core rewriting system that they wrote to include these cases or I may write a new system which I will detail in the following phrases in a very short manner: if HPC uses a transformation just before desugarising Haskell AST into Core in order to obtain the moment when expressions are evaluated (and we know it does), then a similar transformation can be done to record each function call in a global hash-table-like data structure. When the buggy code shows up and our program fails, by simply looking into that table and following the links to the callers we may reconstruct the stack trace on the fly. I believe that this approach doesn't break the system set by Tristan while extending it in a very user-configurable way. The user may select to print only several levels of the stack, to elide multiple apparitions of the same function name (even to elide them if a certain threshold is passed) or to ask for function arguments if they can be printed and are known when the function is called (displayed as ? or _ otherwise). As for the integration with library code or code that was already debugged and proved correct, I believe that if this tool will only analyse user's code no previously working code will be broken or hampered in any way. The time complexity of this kind of debugging is the same as that of parsing the code and that of following some pointers to parents in a tree. Space complexity, however, is not that simple to compute. Yet, I believe that it can be bounded and restricted to a polynomial dependence on the source code length. As for an approximate timeline, I guess that before the first of June I can offer several proof of concept snapshots of the debugger and I will have settled on one of the mini branches that my idea has (I am refering to the fact that I can either implement a HPC like rewrite or expand on the existing one). At the end of June, however, we will be able to use the tool to obtain stack traces from simple progr
Re: [Haskell-cafe] Hackage accounts and real names
Maybe some can help him with this. On Mon, Apr 5, 2010 at 4:31 PM, Joe Fredette wrote: > Unfortunately, Ivan, it's not so much the Whenever-I-can-be-bothered and > more the Joe-had-4-finals-in-2-weeks-and-3-papers-to-write. HWN should be > back shortly. > > Come Summertime, I suspect all of these delays will stop, but with a 7 class > semester, something's gotta give. > > /Joe > > > On Apr 5, 2010, at 4:52 AM, Ivan Lazar Miljenovic wrote: > >> Joe Fredette writes: >>> >>> You guys don't _really_ think my name is Joe Fredette, right? >>> >>> I'm actually Batman. >> >> Batman, Joe, whatever your name is... >> >> I notice that the HWN has turned into the Haskell >> Whenever-I-can-be-bothered-getting-around-to-it News... >_> >> >> -- >> Ivan Lazar Miljenovic >> ivan.miljeno...@gmail.com >> IvanMiljenovic.wordpress.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] Re: GSOC Haskell Project
Then I will apply to it. Thanks for this opportunity. I will get into a documentation period for the next days and will come back with a full application. -- Mihai On Thu, Apr 1, 2010 at 11:53 PM, Simon Marlow wrote: > On 01/04/10 21:41, Max Bolingbroke wrote: >> >> On 1 April 2010 18:58, Thomas Schilling wrote: >>> >>> On 1 Apr 2010, at 18:39, Mihai Maruseac wrote: >>> >>>> Hmm, interesting. If I intend to give it a try, will there be a mentor >>>> for a GSOC project? Or should I start doing it alone? >>> >>> I'm sure Simon Marlow could mentor you except maybe if there are too many >>> GHC-related GSoC projects. I could do mentor this as well. Or maybe Max. >>> I don't think finding a mentor will be a problem. >> >> I'm not the best person to mentor this project - I did bring it up in >> the hope that someone would find it tempting as a GSoC project, though >> :-). I think it's eminently practical to get this done in a summer (or >> less), and it would ameliorate one of Haskell's more embarrassing >> problems. > > I'd be happy to mentor this project. > > Cheers, > Simon > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: GSOC Haskell Project
Hmm, interesting. If I intend to give it a try, will there be a mentor for a GSOC project? Or should I start doing it alone? On Thu, Apr 1, 2010 at 8:37 PM, Max Bolingbroke wrote: > I still believe that it would much simpler to get some stack traces > out of GHC by just reporting what chain of thunks we are currently > forcing when we get an error. This just requires a way of reifying the > existing STG stack in some user-readable way. > > What it doesn't give you is lexical call stacks of any form, but many > people have pursued that goal and failed. The STG stack only tells you > the "dynamic" call stack, and will omit any frames removed due to e.g. > tail recursion optimisation, but at least it gives you *some* > information about where your "head []" error is coming from! > > For those interested, there is more discussion of the idea at > http://hackage.haskell.org/trac/ghc/ticket/3693 > > Cheers, > Max > > On 1 April 2010 18:22, Thomas Schilling wrote: >> The DrScheme debugger shows backtraces as arrows in the source code. >> It took some getting used to, but it doesn't seem like a bad idea. I >> believe Leksah has some sort of graphical frontend for the GHCi >> debugger, but I haven't tried it out myself yet. Maybe you can build >> on top of that. >> >> Stack traces are rather difficult to implement. Tristan Allwood >> implemented stack trace support as a GHC Core plugin (see his 2009 >> Haskell Symposium paper) but it required quite a lot of recompilation. >> His stack traces also didn't record any values, just source >> locations. He also had some problems with the way mutually recursive >> functions with type classes were desugared and, as so often, CAFs >> (constant applicative forms). >> So if you propose to work on that you should have a good idea how to >> overcome such issues it in your application. >> >> Another problem with stack traces turned on is that they may lead to >> space leaks. I don't know how big of an issue this is in practise, >> but I'm pretty sure you can't just keep them turned on all the time. >> The GHCi debugger has a tracing mode that can be turned on explicitly >> and allows you to "go back in time" if you hit a break point or error. >> I believe a good front-end could make this a much more widely used >> feature. >> >> On 1 April 2010 17:39, Mihai Maruseac wrote: >>> So, should I change the topic of the project to stack traces instead >>> of visual GUI representation? If this were the case, I will have to >>> find a way to represent those traces in a way that even a beginner can >>> read and understand (my GUI approach was for the beginners). >>> >>> -- >>> Mihai Maruseac >>> >>> On Wed, Mar 31, 2010 at 6:40 PM, Jason Dagit wrote: >>>> >>>> >>>> On Wed, Mar 31, 2010 at 7:21 AM, Simon Marlow wrote: >>>>> >>>>> On 30/03/2010 20:57, Mihai Maruseac wrote: >>>>> >>>>>> I'd like to introduce my idea for the Haskell GSOC of this year. In >>>>>> fact, you already know about it, since I've talked about it here on >>>>>> the haskell-cafe, on my blog and on reddit (even on #haskell one day). >>>>>> >>>>>> Basically, what I'm trying to do is a new debugger for Haskell, one >>>>>> that would be very intuitive for beginners, a graphical one. I've >>>>>> given some examples and more details on my blog [0], [1], also linked >>>>>> on reditt and other places. >>>>>> >>>>>> This is not the application, I'm posting this only to receive some >>>>>> kind of feedback before writing it. I know that it seems to be a >>>>>> little too ambitious but I do think that I can divide the work into >>>>>> sessions and finish what I'll start this summer during the next year >>>>>> and following. >>>>>> >>>>>> [0]: http://pgraycode.wordpress.com/2010/03/20/haskell-project-idea/ >>>>>> [1]: >>>>>> http://pgraycode.wordpress.com/2010/03/24/visual-haskell-debugger-part-2/ >>>>>> >>>>>> Thanks for your attention, >>>>> >>>>> My concerns would be: >>>>> >>>>> - it doesn't look like it would scale very well beyond small >>>>> examples, the graphical representation would very quickly >>>>> get
Re: [Haskell-cafe] Re: GSOC Haskell Project
So, should I change the topic of the project to stack traces instead of visual GUI representation? If this were the case, I will have to find a way to represent those traces in a way that even a beginner can read and understand (my GUI approach was for the beginners). -- Mihai Maruseac On Wed, Mar 31, 2010 at 6:40 PM, Jason Dagit wrote: > > > On Wed, Mar 31, 2010 at 7:21 AM, Simon Marlow wrote: >> >> On 30/03/2010 20:57, Mihai Maruseac wrote: >> >>> I'd like to introduce my idea for the Haskell GSOC of this year. In >>> fact, you already know about it, since I've talked about it here on >>> the haskell-cafe, on my blog and on reddit (even on #haskell one day). >>> >>> Basically, what I'm trying to do is a new debugger for Haskell, one >>> that would be very intuitive for beginners, a graphical one. I've >>> given some examples and more details on my blog [0], [1], also linked >>> on reditt and other places. >>> >>> This is not the application, I'm posting this only to receive some >>> kind of feedback before writing it. I know that it seems to be a >>> little too ambitious but I do think that I can divide the work into >>> sessions and finish what I'll start this summer during the next year >>> and following. >>> >>> [0]: http://pgraycode.wordpress.com/2010/03/20/haskell-project-idea/ >>> [1]: >>> http://pgraycode.wordpress.com/2010/03/24/visual-haskell-debugger-part-2/ >>> >>> Thanks for your attention, >> >> My concerns would be: >> >> - it doesn't look like it would scale very well beyond small >> examples, the graphical representation would very quickly >> get unwieldy, unless you have some heavyweight UI stuff >> to make it navigable. >> >> - it's too ambitious >> >> - have you looked around to see what kind of debugging tools >> people are asking for? The most oft-requested feature is >> stack traces, and there's lots of scope for doing something >> there (but also many corpses littering the battlefield, >> so watch out!) > > I would be much more interested in seeing the foundations improved than I > would be in having nice things built on them. In other words, I agree with > Simon that stack traces would be many times more valuable to me than > graphical representations. Once the foundations are robust, then we can > build nice things on top of them. > > Perhaps the reason you're interested in graphical representations is because > you want to help people 'visualize', or understand, the problem. Not all > visualizations need to be graphical in the GUI sense. It's really about > representing things in a way that helps humans reason about it. Getting the > right information to people as they need it is probably the best place to > start. > > Jason > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GSoC and Machine learning
On Wed, Mar 31, 2010 at 1:19 PM, Alp Mestanogullari wrote: > Note that, if any student is interested, the Haskell Neural Network library > [1] is being rewritten from scratch. We (Thomas Bereknyi and I) are > discussing many core data structure alternatives, with some suggestions from > Edward Kmett. There may even be some room for a rewrite or update of fgl, > possibly with an alternative conception, to fit well HNN. I am definitely > not sure if this is worth a GSoC and if the community would benefit that > much from such a work, but it's there. > [1] http://haskell.org/haskellwiki/HNN Well, I'd like to tie two of my favourite things together. I'm using neural nets here and there (not for very big tasks though, yet) and I intended to use them in haskell too. The code from [0] was intended to become one day useful for a project on neural nets in Haskell. I would be interested in this project if it will be accepted and there would be mentors. [0]: http://pgraycode.wordpress.com/2010/01/25/a-general-network-module/ -- Mihai Maruseac ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] GSOC Haskell Project
Hi, I'd like to introduce my idea for the Haskell GSOC of this year. In fact, you already know about it, since I've talked about it here on the haskell-cafe, on my blog and on reddit (even on #haskell one day). Basically, what I'm trying to do is a new debugger for Haskell, one that would be very intuitive for beginners, a graphical one. I've given some examples and more details on my blog [0], [1], also linked on reditt and other places. This is not the application, I'm posting this only to receive some kind of feedback before writing it. I know that it seems to be a little too ambitious but I do think that I can divide the work into sessions and finish what I'll start this summer during the next year and following. [0]: http://pgraycode.wordpress.com/2010/03/20/haskell-project-idea/ [1]: http://pgraycode.wordpress.com/2010/03/24/visual-haskell-debugger-part-2/ Thanks for your attention, -- Mihai Maruseac ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Are there any female Haskellers?
I worked with a female student on a Haskell project last summer :) She's not into being member of a mailing list or a user group but she exists. On Sat, Mar 27, 2010 at 6:51 PM, Andrew Coppin wrote: > Ozgur Akgun wrote: >> >> Nevertheless, I guess you're right. There are very few females in most of >> the CS topics, and haskell is no different. > > This is my experience too. Although note that apparently the world's very > first computer programmer was apparently a woman... > > ___ > 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] Re: Graphical representation of Haskell code
Hmm, I may take hints from this conversation to improve the debugger. My program will draw only the diagrams needed for debugging, it is not about the programmer needing to draw boxes and wires but about him understanding his own code :) On Thu, Mar 25, 2010 at 4:37 AM, Maciej Piechotka wrote: > On Wed, 2010-03-24 at 21:33 -0400, Ronald Guida wrote: >> Those are some very interesting visual languages, Miguel! >> >> I remember drawing some diagrams when I was teaching myself Haskell, >> but I never actually tried to create a formal visual language. Since >> my background is in hardware engineering, I would naturally gravitate >> toward schematic diagrams. I am also familiar with the graphical >> programming language of LabView. >> >> After reading Miguel's exposition, I thought about how I might draw a >> picture of map1. >> >> map1 :: (a -> b) -> [a] -> [b] >> map1 f [] = [] >> map1 f (x:xs) = (f x) : map1 f xs >> >> map1.png >> (Image created with Inkscape) >> >> Here is what I'm thinking: >> * Green boxes represent inputs and outputs. >> * Inputs are always on the left, outputs are always on the right. >> * Inputs appear in top-to-bottom order. >> * Data always flows left to right. >> * Arrows represent data flow. >> * A named white rectangle represents application of the named >> function. >> * A gray rectangle represents a function that arrives through data >> flow. >> * A filled-in arrowhead means the data "in" the arrow is to be >> "unpacked" and used as a function. >> * A named light-blue rectangle (such as on the left, with a colon in >> it) represents a pattern match operation. >> >> In thinking about this, I can sense that there are MANY issues with >> using a visual language to represent Haskell. Some issues I can think >> of: >> * How to represent pattern matching? >> * How to represent partial application? >> * How to represent data types or class constraints in the diagram? >> * How to represent a list comprehension or a do statement? (These >> might require special visual syntax) >> * Will the data flow always take the form of a directed acyclic graph, >> so that data never has to flow right-to-left? (Perhaps there's a way >> to "tie the knot" and get a cycle in the data flow graph.) > > myfix f = let x = f x in x > > > > f ---\ > | > v > /->X-X--+> > | | > \---<---/ > > Unless we rewrite it into: > > myfix' f = f (myfix' f) > > > f +---\ > | | > | v > \->X myfix' X->X-X> > >> * Whether to create special symbols for certain commonly used >> functions? (In digital circuit schematics, AND, OR, and NOT gates have >> special symbols, but most compound circuits are represented with >> labeled rectangles.) >> >> Also, if I want to automatically generate an image from a Haskell >> function, then my image generator needs to automatically place and >> route all those boxes. >> >> I'll have to give more thought to the other versions of map, and maybe >> make some more diagrams. >> >> -- Ron > > Regards > > ___ > 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] Graphical representation of Haskell code
Here[0] is a second attempt at drawing the images for the functions. I've done only the first two versions of map, will do the others until the end of the week. [0]: http://pgraycode.wordpress.com/2010/03/24/visual-haskell-debugger-part-2/ -- Mihai Maruseac On Tue, Mar 23, 2010 at 4:28 PM, Mihai Maruseac wrote: > I'll be drawing those graphs by hand today at my Operating Systems > course :) I'll blog them today. > > Making a library for transforming the source code into a graph would > help me finish my debugger easier. But the library would have to take > into account the fact that the output graph may be used in a wide > range of ways from debugging to teaching (why not integrate it for > example with LaTeX Beamer and its support for predefined image > zooms?). > > On Tue, Mar 23, 2010 at 4:15 PM, Dupont Corentin > wrote: >> Hello! >> Thanks for the welcome! >> >> Ivan: >> Too overcome the problem of large and messy images, i propose too have a >> system to navigate into the code. >> You could zoom in and out, occulting unecessary details while zooming out. >> My big graphic of map (+1) could easely be summed up to: >> >> (Embedded image moved to file: pic36782.jpg) >> >> My idea is to provide an efficient system of zooming, as you can zoom in a >> fractal picture, showing more or less details! >> >> Such a tool, if created, could be implemented as a part of, or used by >> SourceGraph. >> >> In the first place i thought the GHC API would be great to infer each >> function's type. >> But indeed haskell-src-exts seems to be more appropriate as you get the >> structure of the program. >> >> Lyndon: >> Wahou this page (MockingBirds) his very interresting and funny! >> >> >> Mihai: >> That's funny we had the same idea quite the same time. I guess that idea is >> "in the air" and as said one contributor on your Reddit, "a well explored >> territory": >> It has major pitfalls and the reason why we heard little about that wild >> territory is because many explorers never returned :) >> By the way, i'm interrested and i could contribute on the little spare time >> i have. >> >> My idea is to make it as a library that display code as graphs. That library >> could be used for several purposes: debugging as you proposes, but also >> education, shows, audit (with SourceGraph), and why not construction... >> I think this kind of visual tool could be a "plus" in Haskell popularity. >> Despite not being that efficient, it is spectacular. >> >> Ronald: >> I agree big graphs are confusing. The big point of the project is to find >> or adapt an algorithm to simplify the graph and make it valuable. >> I'll have to make little graphics for each of your versions of map, this >> may be instructive to me... >> >> Stephen: >> I'll have a look at those interaction nets! >> But the home page for INBlobs seems to be down. >> >> >> >> Thank you all for you kind responses. >> Corentin >> >> ___ >> 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] Graphical representation of Haskell code
I'll be drawing those graphs by hand today at my Operating Systems course :) I'll blog them today. Making a library for transforming the source code into a graph would help me finish my debugger easier. But the library would have to take into account the fact that the output graph may be used in a wide range of ways from debugging to teaching (why not integrate it for example with LaTeX Beamer and its support for predefined image zooms?). On Tue, Mar 23, 2010 at 4:15 PM, Dupont Corentin wrote: > Hello! > Thanks for the welcome! > > Ivan: > Too overcome the problem of large and messy images, i propose too have a > system to navigate into the code. > You could zoom in and out, occulting unecessary details while zooming out. > My big graphic of map (+1) could easely be summed up to: > > (Embedded image moved to file: pic36782.jpg) > > My idea is to provide an efficient system of zooming, as you can zoom in a > fractal picture, showing more or less details! > > Such a tool, if created, could be implemented as a part of, or used by > SourceGraph. > > In the first place i thought the GHC API would be great to infer each > function's type. > But indeed haskell-src-exts seems to be more appropriate as you get the > structure of the program. > > Lyndon: > Wahou this page (MockingBirds) his very interresting and funny! > > > Mihai: > That's funny we had the same idea quite the same time. I guess that idea is > "in the air" and as said one contributor on your Reddit, "a well explored > territory": > It has major pitfalls and the reason why we heard little about that wild > territory is because many explorers never returned :) > By the way, i'm interrested and i could contribute on the little spare time > i have. > > My idea is to make it as a library that display code as graphs. That library > could be used for several purposes: debugging as you proposes, but also > education, shows, audit (with SourceGraph), and why not construction... > I think this kind of visual tool could be a "plus" in Haskell popularity. > Despite not being that efficient, it is spectacular. > > Ronald: > I agree big graphs are confusing. The big point of the project is to find > or adapt an algorithm to simplify the graph and make it valuable. > I'll have to make little graphics for each of your versions of map, this > may be instructive to me... > > Stephen: > I'll have a look at those interaction nets! > But the home page for INBlobs seems to be down. > > > > Thank you all for you kind responses. > Corentin > > ___ > 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] Graphical representation of Haskell code
I've proposed to do it at this GSOC. More exactly, it is still in the feedback phase, I'll integrate all feedback in another blog post and in an application for GSOC tomorrow. If you want to read about it in this stage, you can visit my blog [0]. Feedback on reddit can be seen here[1]. The pictures from Ross Paterson were one of the reasons for my idea. [0]: http://pgraycode.wordpress.com/2010/03/20/haskell-project-idea/ [1]: http://www.reddit.com/r/haskell/comments/bg3bx/i_need_feedback_on_a_haskell_project_idea_maybe/ -- Mihai Maruseac On Tue, Mar 23, 2010 at 1:02 AM, Dupont Corentin wrote: > Hello, > > I’m relatively new to Haskell. > > I’m wondering if it exist a tool to graphically represent Haskell code. > > > Look at the little graphics at: http://www.haskell.org/arrows/index.html (and > following pages) from Ross Paterson. > <http://www.haskell.org/arrows/index.htm> > > If found these very useful to understand the Arrow monad. > > > Why not automatise this in a tool? Such a tool could draw a graphic from > the code of a program. > > This could be done entirely automatically from the types of the functions. > > > Let’s try to do it on a simple example, as an exercise: > > f = Map (+1) > > > How does this function could be represented? > > > It contains the (+) function. > > This function has the type (+) :: Num a => a -> a -> a. > > From this type we could deduce the graphic: > > [image: Haskell schematic_html_m20060f13.gif] > > Or a curried version: > > [image: Haskell schematic_html_5155f0eb.gif] > > The function (+1) then is: > > [image: Haskell schematic_html_m68795eb7.gif] > > > The function map could be drawn like this : > > [image: Haskell schematic_html_m28c92a58.gif] > > Or like this: > > > [image: Haskell schematic_html_m6ae433ea.gif] > > > And the entire function map (+1) could be represented as: > > [image: Haskell schematic_html_macb1643.gif] > > > > Thanks to the advanced type system of Haskell, everything could be deduced > from the type signatures. > > > Such a tool would be recreational and educational. > > One could zoom in and out in a program, to display more or less details. > > This could help understand a program, globally or locally. > > > We could even imagine a constructive version of the tool, where the > programmer would draw functions from a toolbox, and stick them into the > graphic! > > > Does a tool approaching this already exist? If not, would it be a good > project? > > > Cheers, > > Corentin > > > > ___ > 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] SoC Proposals?
I cannot login too. Account is mihai.maruseac. On Wed, Mar 17, 2010 at 5:37 AM, Jeff Wheeler wrote: > On Tue, Mar 16, 2010 at 9:32 PM, Thomas DuBuisson > wrote: > >> Be sure to try your user name without any capitals - that worked for me... > > The account I created is jeffwheeler -- all lowercase, no spaces -- > unfortunately, so that doesn't seem to be the problem I'm hitting. > > -- > Jeff Wheeler > > Undergraduate, Electrical Engineering > University of Illinois at Urbana-Champaign > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe