Re: [Haskell-cafe] Enterprise Haskell AMQP library initial start and would like to pass it off to someone.
On Jan 27, 2008 3:06 AM, Don Stewart [EMAIL PROTECTED] wrote: berlin.brown: I started a AMQP library; there really isn't a lot there but at least I was able to connect to the server. Here is the code and hopefully someone else can continue with the project. The AMQP protocol is moderately complex. HTTP is simple and stuff like RMI, JMS, Database Protocols are really complicated. AMQP seems to be in the middle. There is a lot of documentation and at least two good implementations. The included java implementation and I used the python implementation as a guide. http://www.iona.com/opensource/amqp/ http://barryp.org/software/py-amqplib/ Here is my source (in subversion): http://openbotlist.googlecode.com/svn/trunk/botlistprojects/botspider/spider/lib/haskell/src/Data/AMQP/QueueClient.hs If were to make a suggestion; Barry's python code is really easy to follow. I would suggest using that as a guide. and if you are brave, you can really analyze the protocol and just go off the docs. Either way. My code got as far as connecting to the server, sending the protocol out and getting back an initial response. I didnt build a queue message (frame) or much else. -- Berlin Brown http://botspiritcompany.com/botlist/spring/help/about.html Thanks! Would you like this packaged up for hackage.haskell.org, so others can find and improve it? (or maybe move the repo to code.haskell.org?) Let me work on it a little more; probably will be more useful if it does basic queueing operations. -- Berlin Brown http://botspiritcompany.com/botlist/spring/help/about.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why functional programming matters
On Wed, 2008-01-23 at 13:29 +, Simon Peyton-Jones wrote: Friends Over the next few months I'm giving two or three talks to groups of *non* functional programmers about why functional programming is interesting and important. If you like, it's the same general goal as John Hughes's famous paper Why functional programming matters. Audience: some are technical managers, some are professional programmers; but my base assumption is that none already know anything much about functional programming. Now, I can easily rant on about the glories of functional programming, but I'm a biased witness -- I've been doing this stuff too long. So this message is ask your help, especially if you are someone who has a somewhat-recent recollection of realising wow, this fp stuff is so cool/useful/powerful/etc. I'm going to say some general things, of course, about purity and effects, modularity, types, testing, reasoning, parallelism and so on. But I hate general waffle, so I want to give concrete evidence, and that is what I particularly want your help with. I'm thinking of two sorts of evidence: 1. Small examples of actual code. The goal here is (a) to convey a visceral idea of what functional programming *is*, rather than just assume the audience knows (they don't), and (b) to convey an idea of why it might be good. One of my favourite examples is quicksort, for reasons explained here: http://haskell.org/haskellwiki/Introduction#What.27s_good_about_functional_programming.3F But I'm sure that you each have a personal favourite or two. Would you like to send them to me, along with a paragraph or two about why you found it compelling? For this purpose, a dozen lines of code or so is probably a maximum. 2. War stories from real life. eg In company X in 2004 they rewrote their application in Haskell/Caml with result Y. Again, for my purpose I can't tell very long stories; but your message can give a bit more detail than one might actually give in a presentation. The more concrete and specific, the better. E.g. what, exactly, about using a functional language made it a win for you? If you just reply to me, with evidence of either kind, I'll glue it together (regardless of whether I find I can use it in my talks), and put the result on a Wiki page somewhere. In both cases pointers to blog entries are fine. This recent blog entry about PLT Scheme may be useful: http://blog.plt-scheme.org/2007/11/getting-rid-of-set-car-and-set-cdr.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Enterprise Haskell AMQP library initial start and would like to pass it off to someone.
berlin.brown: I started a AMQP library; there really isn't a lot there but at least I was able to connect to the server. Here is the code and hopefully someone else can continue with the project. The AMQP protocol is moderately complex. HTTP is simple and stuff like RMI, JMS, Database Protocols are really complicated. AMQP seems to be in the middle. There is a lot of documentation and at least two good implementations. The included java implementation and I used the python implementation as a guide. http://www.iona.com/opensource/amqp/ http://barryp.org/software/py-amqplib/ Here is my source (in subversion): http://openbotlist.googlecode.com/svn/trunk/botlistprojects/botspider/spider/lib/haskell/src/Data/AMQP/QueueClient.hs If were to make a suggestion; Barry's python code is really easy to follow. I would suggest using that as a guide. and if you are brave, you can really analyze the protocol and just go off the docs. Either way. My code got as far as connecting to the server, sending the protocol out and getting back an initial response. I didnt build a queue message (frame) or much else. -- Berlin Brown http://botspiritcompany.com/botlist/spring/help/about.html Thanks! Would you like this packaged up for hackage.haskell.org, so others can find and improve it? (or maybe move the repo to code.haskell.org?) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
Hello Paul, Saturday, January 26, 2008, 11:03:30 PM, you wrote: * Say computers are cheap but programmers are expensive whenever explaining a correctness or productivity feature. This is true only if talking to people in high-income nations. Even in low-income nations, its only false in the short term. If you have skilled programmers with computers and Internet connections then their wages inflate to the world norm. IIRC India is seeing 20%/year wage inflation for comp-sci graduates. they know English. and Internet/modern computers are not so easily available in poor countries. try for example to find programmers from Uzbekistan on the net :D -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
Hello Dipankar, Sunday, January 27, 2008, 12:16:38 AM, you wrote: Anyway, no we're older, and we realize that it would have helped our math understanding out quite a bit had we learned more physics, engineering, etc. Or had we learned 19th century mathematics well. The Russian program seems to do this, actually (at least for the sample set of kids that make it to the US). oh, yes, they are really still study 19th century physics, but not because of great mind, but due to age of university professors. i've studied at Moscow University in 89-91 and department of computer languages still studied Lisp at those times (!). a few months ago i have a conversation with today student and they still learn Lisp (!!!). it seems that they will switch to more modern FP languages no earlier that this concrete professor, head of PL department, which in 60s done interesting AI research, will dead, or at least go to the pension -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: The programming language market (was Re: Why functional programming matters
Hello Stefan, Sunday, January 27, 2008, 1:14:46 AM, you wrote: But historically, computers have been available at all kinds of price ranges, so people chose the price point that fit them. So, for the last 15 years or so already computers have been chosen (in the wealthy countries) to be cheaper than programmers. Is there any reason to think that the same forces aren't at play in lower-income nations? After all, cheap (typically second hand) computers are easy to come by. what you mean by cheap computer? one which can't run modern software at all, smth like first IBM PC? :) in poor countries there is not just second-hand computers because local sources doesn't exist (in order to have 100k of second-hand computers people should buy the same 100k new computers a few years ago), and global import of second-hand computers is non-existant -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
Hello jerzy, Sunday, January 27, 2008, 1:48:07 AM, you wrote: I've often heard from my Eastern European colleagues that they learned almost nothing about computer science back home... === Well, I have the impression, at least I intended to say just the reverse (not the opposite), that the arrogance/bias against computers has been partly justified by a very good level in math. The decision makers confounded the math science with the domain of computation... i don't think that there were any decisions. Soviet system is just system of government monopolies where each monopoly works in the way that is more comfortable for its bureaucrats rather than users. it's true for factories, communal services, shops, anything. at the beginning of computer era, computational mathematics was the only computer application and our CS started in these fields, like american's one. but then new applications arrived, and western CS was switched to service them, while here professors continued to teach that they know better, push the math into the programs of other institutes and so on. it's no problem for Soviet system that institute prepares specialists for non-existing applications - they should learn yourself. so we just have system of science for science without any practical outcome, and contents of this science dictated by professors who was actual 50 years ago -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Enterprise Haskell AMQP library initial start and would like to pass it off to someone.
Berlin Brown wrote: I started a AMQP library; there really isn't a lot there but at least I was able to connect to the server. Arrgh: I was hoping I would be the first to announce this. I've been working on one (on and off) for a few months now. I've got most of the translation from XML protocol definition to Haskell, but it sounds like you are way ahead of me. I'll take a look at what you have done and see if my code can be of any use. Paul. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Enterprise Haskell AMQP library initial start and would like to pass it off to someone.
Don Stewart wrote: berlin.brown: I started a AMQP library; there really isn't a lot there but at least I was able to connect to the server. Here is the code and hopefully someone else can continue with the project. Thanks! Would you like this packaged up for hackage.haskell.org, so others can find and improve it? (or maybe move the repo to code.haskell.org? As I said in an earlier message to Haskell Cafe, I've been working on AMQP as well. Berlin's approach seems to have been to hand-code a minimum client and then expand from there, whereas I have been working on an automatic translation from the XML protocol spec to the framing layer of AMQP. The two efforts ought to be merged, although I haven't got the content message type implemented yet. I believe I have a Haskell.org account, although I'm not sure how to use darcs with it. Perhaps Don could advise me on the steps I would need to take to get my code into a repository on the server. Paul. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell] Re: [Haskell-cafe] Why functional programming matters
Isaac Dupree wrote: Derek Elkins wrote: and you can have unboxed values in dynamically typed languages. really? Sure that's possible as an optimization, but I thought that to explicitly specify that would require a known static type. Or perhaps the bit-tagging by which some Scheme implementations are able to hold small integers without a pointer (IIRC)? That's exactly what Ruby does - symbols, Fixnums (integers that fit into a single machine word), bools and nil are unboxed, distinguished from boxed types by the lowest 2 bits. That's undistinguishable at runtime, though - everything Just Works as though they're ordinary objects, including flipping integer class to Bignum (which is boxed) as necessary. -- Alex ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] NDP
On Fri, 25 Jan 2008, Stephan Friedrichs wrote: Hi all, is someone familiar with compiling ndp (nested data parallel Haskell), Speed with less convenience-version? I followed the guide at http://www.haskell.org/haskellwiki/Data_Parallel_Haskell/PackageNDP but executing make in the examples directory issues the following error: (.text+0x8d5): undefined reference to `__stginit_parallelzm1zi0zi0zi0_ControlziParallelziStrategies_' manually compiling the dotp example on the link mentioned above doesn't work either: [...] (.data+0x5c): undefined reference to `ndp_DataziArrayziParallelziUnliftedziFlatziUArr_zdf14_closure' DotP.o: In function `sz3_srt': (.data+0x88): undefined reference to `ndp_DataziArrayziParallelziUnliftedziFlatziBasics_toU_closure' DotP.o: In function `sz3_srt': (.data+0x8c): undefined reference to `ndp_DataziArrayziParallelziUnliftedziFlatziUArr_zdf14_closure' /home/sfriedrichs/ghc/rts/libHSrts.a(Main.o): In function `real_main': Main.c:(.text+0x12): undefined reference to `__stginit_ZCMain' Main.c:(.text+0x2c): undefined reference to `ZCMain_main_closure' Does someone know, what's wrong? I'm using ghc-6.9.20080124 as source base (which compiled and works just fine). These errors often indicate that some packages are compiled out of order. That is a compiled package references another package, which was replaced by a newer version in the meantime. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hxt memory useage
Hi Perhaps a more modern approach would be StAX[1]-like rather than SAX-like? In either case, streaming, non-DOM. Remember, Haskell has lazy evaluation. TagSoup is basically a SAX approach, without the massive pain of the Java version and the API being back to front compared to what you want. If you assume that your XML is well formed, then I think TagSoup is already StAX as well. TagSoup has been carefully engineered to run in constant memory. I am concerned by the number of people expressing willingness to abandon namespace support, but perhaps I'm being too much of a purist TagSoup has both no namespace support, and full namespace support - it will happily read tags with namespaces in them, and its a trivial break in your application to deal with them as you wish. Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
On Sun, 2008-01-27 at 11:49 +0300, Bulat Ziganshin wrote: Hello Dipankar, Sunday, January 27, 2008, 12:16:38 AM, you wrote: Anyway, no we're older, and we realize that it would have helped our math understanding out quite a bit had we learned more physics, engineering, etc. Or had we learned 19th century mathematics well. The Russian program seems to do this, actually (at least for the sample set of kids that make it to the US). oh, yes, they are really still study 19th century physics, but not because of great mind, but due to age of university professors. i've studied at Moscow University in 89-91 and department of computer languages still studied Lisp at those times (!). a few months ago i have a conversation with today student and they still learn Lisp (!!!). it seems that they will switch to more modern FP languages no earlier that this concrete professor, head of PL department, which in 60s done interesting AI research, will dead, or at least go to the pension This reminds me, I worked at a Dutch telecomm software production company for a short while in 1999 and they had two Russian software engineers there, one from St. Petersburg and one from Wladiwostok, both female and under 25 years of age. They programmed in C and were highly respected by their managers and colleagues! So, there are at least counterexamples :-) Regards, Hans van Thiel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hxt memory useage
Suggestion: a binding to Expat, like perl and python did. So this is a request for an xml-light based on lazy bytestrings, designed for speed at all costs? -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Draft chapters of Real World Haskell now publicly available
Achim Schneider wrote: Will there be a chapter on OpenGL? Please, don't. With the current state of Haskell's openGL, all you need is the redbook and a sed command that removes the 3f from vertex3f. I'm not going to try to make a case for the authors of RWH to do a chapter on OpenGL. I don't think it's particularly important. However, I do think that opengl code can be used for rather good worked examples which start with code which is pretty much a sed translation of C code and successively transform and abstract. Haskell gives so much more convenient abstraction power than, say, C or Java and it *really* shows in the ability to abstract the kind of boring boilerplate which pollutes large opengl programs. Jules ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
On Jan 27, 2008 11:49 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote: oh, yes, they are really still study 19th century physics, but not because of great mind, but due to age of university professors. i've studied at Moscow University in 89-91 and department of computer languages still studied Lisp at those times (!). a few months ago i have a conversation with today student and they still learn Lisp (!!!). it seems that they will switch to more modern FP languages no earlier that this concrete professor, head of PL department, which in 60s done interesting AI research, will dead, or at least go to the pension I've learned Haskell in MEPhI. And Lisp seems to be really popular now due to Paul Graham. What I really want to mention is that the philosophy of education in Russia consider modern irrelevant. Modern changes really fast and it is not any better to teach something modern then outdated, except if you are going to create some ballast of Java programmers who will prevent progress and preserve market stability, i. e. really be outdated. What university try to do is teach you how to swim really good, so you'll have a better chances to find out where to swim. I mean they teach you to learn, not anything else. Everything else is just a pretty bonus. -- vir http://vir.comtv.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Enterprise Haskell AMQP library initial start and would like to pass it off to someone.
paul: Don Stewart wrote: berlin.brown: I started a AMQP library; there really isn't a lot there but at least I was able to connect to the server. Here is the code and hopefully someone else can continue with the project. Thanks! Would you like this packaged up for hackage.haskell.org, so others can find and improve it? (or maybe move the repo to code.haskell.org? As I said in an earlier message to Haskell Cafe, I've been working on AMQP as well. Berlin's approach seems to have been to hand-code a minimum client and then expand from there, whereas I have been working on an automatic translation from the XML protocol spec to the framing layer of AMQP. The two efforts ought to be merged, although I haven't got the content message type implemented yet. I believe I have a Haskell.org account, although I'm not sure how to use darcs with it. Perhaps Don could advise me on the steps I would need to take to get my code into a repository on the server. So you visit: community.haskell.org And submit your ssh public key, to allow you to log into code.haskell.org At the same time you can ask for a project account, which will give you space for a repository on the machine. You can see other projects here: code.haskell.org -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hxt memory useage
That's a great little job actually. I'll have a go! stevelihn: Suggestion: a binding to Expat, like perl and python did. So this is a request for an xml-light based on lazy bytestrings, designed for speed at all costs? -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hxt memory useage
matthew.pocock: On Saturday 26 January 2008, Keith Fahlgren wrote: Perhaps a more modern approach would be StAX[1]-like rather than SAX-like? In either case, streaming, non-DOM. I am concerned by the number of people expressing willingness to abandon namespace support, but perhaps I'm being too much of a purist Keith StAX is fine for a very wide range of applications, including web services. In the web-service domain, namespaces and entity expansion and xsd are not optional extras, but these can be layered on top of StAX rather than a more DOM-like structure. Just as a reality check, we regularly stream xml messages between web services in Java where the message bodies are many gig in size, using StAX, and neither the client or server need anything other than a constant memory overhead, as the portions of the message are generated and consumed in a streaming manner. It would be very nice if we could do similar things in haskell. Lazy evaluation FTW. :) -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Upgrading ByteString causes (seemingly) impossible RTS linker errs
Recently I've been developing my IRC bot a little further, and in the midst of it I have come across a very problematic issue that revolves around GHC-dependencies vs. application-dependencies. The central issue is ByteString. Currently, the ghc package depends on bytestring-0.9.0.1. However, the current version of ByteString I have installed is 0.9.0.4. To keep compatability with bytestring-dependent libraries that were built against 0.9.0.1, you have to recompile of all these libs against 0.9.0.4. For example, I had to build a newer version of zlib against 0.9.0.4, because the older version was built for 0.9.0.1, which mean that it was not possible to build cabal-install because of the incompatabilities (it needed bytestring and zlib.) The problem is that if you have a package that depends on ghc as a library, but also depends on bytestring 0.9.0.1 or any library built against it, you'll get pretty much unstoppable linker errs, since all the symbol names in the ghc package are hardwired for 0.9.0.1 (meaning you can't do 'ghc-pkg update' for it) forcing it to be loaded. The example in my bot is this: it depends on binary which is built against bytestring-0.9.0.4 for serializing the state of plugins. If you configure it with the flag '-fdynamic' and you have hs-plugins for ghc 6.8 installed (http://code.haskell.org/~dons/code/hs-plugins/) then the bot can do in-situ code reloading. However, hs-plugins depends on ghc as a library, which depends on bytestring 0.9.0.1... I think you can see where this is going (actually I can't quite pinpoint it to being hs-plugins importing ghc since, but essentially it could be *any* lib my bot uses which depends on ghc as a library, hs-plugins is just the most obvious one): [EMAIL PROTECTED] 0.4]$ ghci Setup.hs GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. ... *Main :main configure Loading package array-0.1.0.0 ... linking ... done. Loading package packedstring-0.1.0.0 ... linking ... done. Loading package containers-0.1.0.1 ... linking ... done. Loading package old-locale-1.0.0.0 ... linking ... done. Loading package old-time-1.0.0.0 ... linking ... done. Loading package filepath-1.1.0.0 ... linking ... done. Loading package directory-1.0.0.0 ... linking ... done. Loading package unix-2.3.0.0 ... linking ... done. Loading package process-1.0.0.0 ... linking ... done. Loading package pretty-1.0.0.0 ... linking ... done. Loading package hpc-0.5.0.0 ... linking ... done. Loading package template-haskell ... linking ... done. Loading package readline-1.0.1.0 ... linking ... done. Loading package Cabal-1.2.3.0 ... linking ... done. Loading package random-1.0.0.0 ... linking ... done. Loading package haskell98 ... linking ... done. Loading package parsec-2.1.0.0 ... linking ... done. Loading package haskell-src-1.0.1.1 ... linking ... done. Loading package network-2.1.0.0 ... linking ... done. Loading package mtl-1.1.0.0 ... linking ... done. Loading package stm-2.1.1.0 ... linking ... done. Loading package irc-0.4 ... linking ... done. Loading package QuickCheck-2.0 ... linking ... done. Loading package bytestring-0.9.0.4 ... linking ... done. -- needed for binary Loading package binary-0.4.1 ... linking ... done. Loading package bytestring-0.9.0.1 ... -- needed for ghc GHCi runtime linker: fatal error: I found a duplicate definition for symbol fps_maximum whilst processing object file /usr/local/lib/ghc-6.8.2/lib/bytestring-0.9.0.1/HSbytestring-0.9.0.1.o This could be caused by: * Loading two different object files which export the same symbol * Specifying the same object file twice on the GHCi command line * An incorrect `package.conf' entry, causing some object to be loaded twice. GHCi cannot safely continue in this situation. Exiting now. Sorry. [EMAIL PROTECTED] 0.4]$ From speculation, I would think that any package that uses ghc as a library but also uses bytestring 0.9.0.1, directly or indirectly, would hit this error. Is there any easy way to resolve this? From the looks of it, the *only* way would really be to just unregister 0.9.0.4, and rebuild everything against 0.9.0.1... Either that or factor out the use of ByteString in the ghc-frontend. Neither seems optimal, though. But I've been working on this too long to just stop, so if it requires recompiling everything against an older version of bytestring, then so be it, I suppose... Thanks for whoever helps. - Austin -- It was in the days of the rains that their prayers went up, not from the fingering of knotted prayer cords or the spinning of prayer wheels, but from the great pray-machine in the monastery of Ratri, goddess of the Night. Roger Zelazny ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Upgrading ByteString causes (seemingly) impossible RTS linker errs
mad.one: Recently I've been developing my IRC bot a little further, and in the midst of it I have come across a very problematic issue that revolves around GHC-dependencies vs. application-dependencies. The central issue is ByteString. Currently, the ghc package depends on bytestring-0.9.0.1. However, the current version of ByteString I have installed is 0.9.0.4. To keep compatability with bytestring-dependent libraries that were built against 0.9.0.1, you have to recompile of all these libs against 0.9.0.4. For example, I had to build a newer version of zlib against 0.9.0.4, because the older version was built for 0.9.0.1, which mean that it was not possible to build cabal-install because of the incompatabilities (it needed bytestring and zlib.) The problem is that if you have a package that depends on ghc as a library, but also depends on bytestring 0.9.0.1 or any library built against it, you'll get pretty much unstoppable linker errs, since all the symbol names in the ghc package are hardwired for 0.9.0.1 (meaning you can't do 'ghc-pkg update' for it) forcing it to be loaded. It should be possible to specify that your lib depends on exactly 0.9.0.1 in the .cabal file. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Upgrading ByteString causes (seemingly) impossible RTS linker errs
On Jan 27, 2008 12:24 PM, Don Stewart [EMAIL PROTECTED] wrote: It should be possible to specify that your lib depends on exactly 0.9.0.1 in the .cabal file. In the same general area. When you upgrade something like bytestring and have to update everything that was built with it (otherwise you'll get type errors because the ByteString types from the two different versions are different) cabal-install is of no help. Since it already believes that I have those packages installed (correctly) if refuses to install them again so I have to do it all by hand. I realise that I should be sending darcs patches, not bug reports, but a --force to reinstall an already installed package would be great. I guess, ideally, cabal-install would know to rebuild everything that depends on x when I upgrade x. darcs patches might follow if I can get round to it (or the next time I update bytestring...) Cheers, -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
brian.sniffen: On Jan 27, 2008 3:49 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote: a few months ago i have a conversation with today student and they still learn Lisp (!!!). it seems that they will switch to more modern FP languages no earlier that this concrete professor, head of PL department, which in 60s done interesting AI research, will dead, or at least go to the pension I dunno. Sussman and Abelson are not getting any younger, and neither is Felleisen, but others have taken up that torch. So far, those who waited for Lisp to die out have spent a long time waiting. It has not been a winning bet. And just as PLT Scheme announces they're moving to immutable, pure lists http://lambda-the-ultimate.org/node/2631 They'll be getting a type system soon, at this rate ;) -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
On Jan 27, 2008 3:49 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote: a few months ago i have a conversation with today student and they still learn Lisp (!!!). it seems that they will switch to more modern FP languages no earlier that this concrete professor, head of PL department, which in 60s done interesting AI research, will dead, or at least go to the pension I dunno. Sussman and Abelson are not getting any younger, and neither is Felleisen, but others have taken up that torch. So far, those who waited for Lisp to die out have spent a long time waiting. It has not been a winning bet. -Brian -- Brian T. Sniffen [EMAIL PROTECTED]or[EMAIL PROTECTED] http://www.evenmere.org/~bts ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] C# parser written in Haskell
Does anyone have a C# parser written in Haskell? Thanks, Joel -- http://wagerlabs.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
You mean as the the POPL paper, http://lambda-the-ultimate.org/node/2622 ? On Jan 27, 2008 10:30 PM, Don Stewart [EMAIL PROTECTED] wrote: And just as PLT Scheme announces they're moving to immutable, pure lists http://lambda-the-ultimate.org/node/2631 They'll be getting a type system soon, at this rate ;) -- 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: Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
On Sun, 2008-01-27 at 14:30 -0800, Don Stewart wrote: brian.sniffen: On Jan 27, 2008 3:49 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote: a few months ago i have a conversation with today student and they still learn Lisp (!!!). it seems that they will switch to more modern FP languages no earlier that this concrete professor, head of PL department, which in 60s done interesting AI research, will dead, or at least go to the pension I dunno. Sussman and Abelson are not getting any younger, and neither is Felleisen, but others have taken up that torch. So far, those who waited for Lisp to die out have spent a long time waiting. It has not been a winning bet. And just as PLT Scheme announces they're moving to immutable, pure lists http://lambda-the-ultimate.org/node/2631 They'll be getting a type system soon, at this rate ;) Well we have: The Design and Implementation of Typed Scheme very recently http://www.ccs.neu.edu/scheme/pubs/popl08-thf.pdf This is something in the soft typing tradition (and uses PLT Scheme as the vehicle.) I believe PLT Scheme already supports a HM typed version of Scheme though primarily for pedagogical purposes if I remember correctly. It is however, unlikely that Scheme will ever be statically typed by default. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
Well, the POPL talk was very pro-types, saying that when you move from a scripting language to a language to write real systems you need static types. On Jan 27, 2008 9:52 PM, Derek Elkins [EMAIL PROTECTED] wrote: On Sun, 2008-01-27 at 14:30 -0800, Don Stewart wrote: brian.sniffen: On Jan 27, 2008 3:49 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote: a few months ago i have a conversation with today student and they still learn Lisp (!!!). it seems that they will switch to more modern FP languages no earlier that this concrete professor, head of PL department, which in 60s done interesting AI research, will dead, or at least go to the pension I dunno. Sussman and Abelson are not getting any younger, and neither is Felleisen, but others have taken up that torch. So far, those who waited for Lisp to die out have spent a long time waiting. It has not been a winning bet. And just as PLT Scheme announces they're moving to immutable, pure lists http://lambda-the-ultimate.org/node/2631 They'll be getting a type system soon, at this rate ;) Well we have: The Design and Implementation of Typed Scheme very recently http://www.ccs.neu.edu/scheme/pubs/popl08-thf.pdf This is something in the soft typing tradition (and uses PLT Scheme as the vehicle.) I believe PLT Scheme already supports a HM typed version of Scheme though primarily for pedagogical purposes if I remember correctly. It is however, unlikely that Scheme will ever be statically typed by default. ___ 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] ANN: RPCA and fec
Doubling up an announcement email again to reduce the traffic on the list. First: RPCA is an RPC system. This first release is pretty lacking, simple client-server interactions work but there's no lame-duck handling, load balancing, security etc. RPCA uses codec-libevent's tagged data structures for serialisation. Tagged structures allow you to grow you RPCs incrementally, which is very important in large programs. Very simple tests should that 1000's of RPCs a second isn't a problem. There's also the start of a C library for the protocol, written on libevent and glib. To give a taste, here's what you need to write on the server side: addNumbers :: TestRPC.Addnumbersrequest - ((Maybe TestRPC.Addnumbersreply) - STM ()) - IO () addNumbers (TestRPC.Addnumbersrequest { TestRPC.addnumbersrequest_a = a , TestRPC.addnumbersrequest_b = b }) cb = do atomically $ cb $ Just $ TestRPC.addnumbersreplyEmpty { TestRPC.addnumbersreply_c = a + b } and on the client side... rpc chan add (TestRPC.Addnumbersrequest 400 300) 0.1 That's a synchronous call with a timeout. You can, of course, call them asynchronously as well (and from multiple threads etc) It's highly experimental and can be found in Hackage and at http://darcs.imperialviolet.org/darcsweb.cgi?r=network-rpca;a=summary FEC is an erasure coding library, based on zfec by Zooko, based on code by Luigi Rizzo. The most widely known example of an erasure code is the RAID-5 algorithm which makes it so that in the event of the loss of any one hard drive, the stored data can be completely recovered. The algorithm in the fec package has a similar effect, but instead of recovering from the loss of only a single element, it can be parameterized to choose in advance the number of elements whose loss it can tolerate. Hackage: http://hackage.haskell.org/packages/archive/fec/0.1.1/doc/html/Codec-FEC.html It's new code, but the library that it's based on is well tested so should be sound. AGL -- Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org 650-283-9641 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
On Sun, 2008-01-27 at 17:25 -0500, Brian Sniffen wrote: On Jan 27, 2008 3:49 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote: a few months ago i have a conversation with today student and they still learn Lisp (!!!). it seems that they will switch to more modern FP languages no earlier that this concrete professor, head of PL department, which in 60s done interesting AI research, will dead, or at least go to the pension I dunno. Sussman and Abelson are not getting any younger, and neither is Felleisen, but others have taken up that torch. So far, those who waited for Lisp to die out have spent a long time waiting. It has not been a winning bet. No language that was ever popular has ever died as far as I can tell. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
Hello Jerzy and Bulat, Thanks for your perspectives. Bulat, I can understand that you find it shocking that the folks at Moscow University still study Lisp, but I wouldn't be so quick to condemn them for being dinosaurs. After all, they just stopped teaching the SICP course (using Scheme) at MIT, and I don't believe that they replaced it with an intro to CS course that uses (say) Haskell or ML! Nor has Berkeley, far as I know. ...ok, I looked, the MIT intro course is now taught in python. I'll let you decide if that's a step up from scheme. Which brings us back to the topic of the original thread - Simon's request for perspectives. The wonderfulness of advances in type theory these past 20 years, which are appreciated so readily here - they don't seem to have achieved universal acceptance in industry or in academia. What I mean by this is that if I look at the CS programs at Berkeley, MIT, CMU, I don't see a huge emphasis on PL. Looking now at the MIT opencourseware offerings in EECS, I see no undergrad course that suggests that you'd learn anything about modern type theory. Of course we know here of success stories involving modern fp languages. But there is no haskell or ml book that has had close to the influence of KR's C book. One might argue that adoption on that scale is not the goal of the haskell community (was it Kernighan, Ritchie, or Thompson's goal? I think not), but still, it's weird to me that: 1) we're clearly on to something, but still 2) many smart people who are interested walk away frustrated (not so easy to learn (is the hardness necessary? perhaps?), relative to KR, for example). 3) most of the canonical US universities for CS (MIT, Berkeley, Stanford, CMU, etc) basically don't teach haskell or ML, or even talk much about it, relative to how much they talk about, say, Java. It's one thing that companies don't move forward; yet another thing that Universities don't either. Why is that? Why, in 2008, is Java taught more than Haskell? On Sun, 27 Jan 2008, Bulat Ziganshin wrote: Hello Dipankar, Sunday, January 27, 2008, 12:16:38 AM, you wrote: Anyway, no we're older, and we realize that it would have helped our math understanding out quite a bit had we learned more physics, engineering, etc. Or had we learned 19th century mathematics well. The Russian program seems to do this, actually (at least for the sample set of kids that make it to the US). oh, yes, they are really still study 19th century physics, but not because of great mind, but due to age of university professors. i've studied at Moscow University in 89-91 and department of computer languages still studied Lisp at those times (!). a few months ago i have a conversation with today student and they still learn Lisp (!!!). it seems that they will switch to more modern FP languages no earlier that this concrete professor, head of PL department, which in 60s done interesting AI research, will dead, or at least go to the pension -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re[4]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
Hello Hans, Sunday, January 27, 2008, 5:02:57 PM, you wrote: studied at Moscow University in 89-91 and department of computer languages still studied Lisp at those times (!). a few months ago i This reminds me, I worked at a Dutch telecomm software production company for a short while in 1999 and they had two Russian software engineers there, one from St. Petersburg and one from Wladiwostok, both female and under 25 years of age. They programmed in C and were highly respected by their managers and colleagues! So, there are at least counterexamples :-) no. you should asked them HOW they learned programming and i'm pretty sure (knowing too much about our universities and institutes) that they were just a self-learned - like myself. generally speaking, our higher education now just starting to teach students new Java technologies - you can imagine how old is knowledge they get there. actually, all the good russian programmers i ever seen are self-learned -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: xmonad 0.6 released
The xmonad dev team is pleased to announce the 0.6 release of xmonad! http://xmonad.org xmonad is a tiling window manager for X. Windows are arranged automatically to tile the screen without gaps or overlap, maximising screen use. Window manager features are accessible from the keyboard: a mouse is optional. xmonad is extensible in Haskell, allowing for powerful customisation. Custom layout algorithms, key bindings and other extensions may be written by the user in config files. Layouts are applied dynamically, and different layouts may be used on each workspace. Xinerama is fully supported, allowing windows to be tiled on several physical screens. Features: * Very stable, fast, small and simple. * Automatic window tiling and management * First class keyboard support: a mouse is unnecessary * Full support for tiling windows on multi-head displays * Full support for floating windows * XRandR support to rotate, add or remove monitors * Per-workspace layout algorithms * Per-screens custom status bars * Easy, powerful customisation and reconfiguration in Haskell * Large extension library * Extensive documentation and support for hacking Get it! Information, screenshots, documentation, tutorials and community resources are available from the xmonad home page: http://xmonad.org The 0.6 release, and its dependencies, are available from hackage.haskell.org, here: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmonad Headlines: This is an incremental release of xmonad, with some new features, and important bug fixes. * Make focus-follows-mouse configurable * Better support for X11 cloned screens * xmonad config dirs can now be shared across architectures * New flags: --version: print xmonad's version --recompile: recompile xmonad.hs if it is out of date --force-recompile: recompile xmonad.hs unconditionally * Improved ManageDocks extension used for docking programs * Improved documentation * Update to Haskell X11-1.4.1, fixes bug with XGetWindowProperty * Close bug #96 relating to window unmapping (fixes gnucash bugs) * 'Testing' mode for developers * Various other fixes and clean ups. Along with many improvements to the extension library. Here are some of the noticeable changes to the extension library: * New: XMonad.Hooks.ManageHelpers : support for hooks * New: XMonad.Util.Search : support for web searching * New: XMonad.Util.Timer : set up timers and to handle them * New: XMonad.Layout.Reflect : reflect layouts horizontally/vertically * New: XMonad.Actions.NoBorders * Improved EDSL for performing actions on windows * Improved window tabbing * ResizableTile works with floating windows * Faster prompts * More EWHM support * Add support for cycling through screens to CycleWS * UrgencyHook support to status bar * Custom zoom levels for magnifier layout * Bug fixes to ManageDocks * Support for _NET_WM_STRUT_PARTIAL * Improved docs for writing new extensions Full changelogs against xmonad 0.5 for the core and extensions here: http://xmonad.org/changelog-0.6.txt http://xmonad.org/changelog-xmc-0.6.txt Extensions: xmonad comes with a huge library of extensions (now more than 5 times the size of xmonad), contributed by viewers like you. Extensions enable pretty much arbitrary window manager behaviour to be implemented by users, in Haskell, in the config files. For more information on using and writing extensions see the webpage. The library of extensions is available from hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmonad-contrib Full documentation for using and writing your own extensions: http://xmonad.org/contrib.html This release brought to you by the xmonad dev team: Spencer Janssen Don Stewart Jason Creighton Andrea Rossato David Roundy Brent Yorgey Featuring code contributions from: Aaron DenneyAdam Vogt Alec Berryman Alex Tarkovsky Alexandre BuisseAustin Seipp Brandon Allbery Chris Mears Christian Thiemann Clemens Fruhwirth Daniel Neri Daniel Wagner Dave Harrison David Glasser David Lazar Devin Mullins Dmitry KurochkinDougal Stanton Eric MertensFerenc Wagner Gwern Branwen Hans Philipp Annen Ivan TarasovJamie Webb Jeremy Apthorp Joachim Breitner Joachim Fasting Joe Thornber Joel Suovaniemi Juraj Hercek Kai Grossjohann Karsten Schoelzel Klaus Weidner Lucas Mai Mats Jansborg Matsuyama Tomohiro Michael Fellinger Michael Sloan Miikka Koskinen Neil Mitchell Nelson Elhage Nick Burlett Nicolas Pouillard
[Haskell-cafe] Re: The programming language market
Derek Elkins writes: //Discussion about Lisp in Russia, some people not getting younger, Scheme with types, and other bedlam// No language that was ever popular has ever died as far as I can tell. This is one of the persistent truths which has to be carefully interpreted. Languages mutate and give offsprings, bearing sometimes the same name. The original Fortran is undoubtly dead and buried. Long live Fortran! In some cases people defend this thesis with sophism. Algol is dead. No sense in disputing it. So what? It simply was never popular enough... Since the Nature abhorrs vacuum, all niches tend to become non-empty, and for any language, there will be some guys who will play with it. Snobol is alive, APL as well. Perhaps even Simula. When can we say that it is *really* dead? How many users? Languages are alive when people who used them are alive, and we didn't have had time enough to kill all of them, patriarchs... Look, Simon Peyton Jones was born more or less simultaneously with Fortran. And he is not so terribly old, is he? (Welll, perhaps for some of you, but not for me.) Anyway, a language, as any other conceptual structure, can be stored and communicated. You may kill all the working instances, and rekindle it later. It such a way it is difficult to kill a religion, or a political doctrine. But it may die, become useless/unused temporarily. So, you never really know... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Upgrading ByteString causes (seemingly) impossible RTS linker errs
On Sun, 2008-01-27 at 12:54 -0800, Adam Langley wrote: On Jan 27, 2008 12:24 PM, Don Stewart [EMAIL PROTECTED] wrote: It should be possible to specify that your lib depends on exactly 0.9.0.1 in the .cabal file. In the same general area. When you upgrade something like bytestring and have to update everything that was built with it (otherwise you'll get type errors because the ByteString types from the two different versions are different) cabal-install is of no help. Since it already believes that I have those packages installed (correctly) if refuses to install them again so I have to do it all by hand. I realise that I should be sending darcs patches, not bug reports, but a --force to reinstall an already installed package would be great. I guess, ideally, cabal-install would know to rebuild everything that depends on x when I upgrade x. This issue is filed as: http://hackage.haskell.org/trac/hackage/ticket/220 darcs patches might follow if I can get round to it (or the next time I update bytestring...) Great. The first step is to take advantage of the new feature in ghc-pkg in ghc-6.8.3 to enable us to get a complete database for all installed packages, rather than just a list of package names and versions. The following step would be to detect and warn about inconsistent versions of deps. The hardest part is integrating this constraint into the cabal-install package search / dependency resolution algorithm, and if the constraint turns out to be unsatisfiable, working out which packages have to be rebuilt to get a consistent set of dependencies. Of course in the case cited here we have to either make everything stick with bytestring-0.9.0.1 or try and rebuild the ghc package against the newer bytestring, but there is no .cabal package available for the ghc package. In principle I think there could be, there just isn't at the moment. Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: The programming language market
G'day all. Quoting [EMAIL PROTECTED]: Algol is dead. No sense in disputing it. And yet Delphi is still alive. So is Modula-3, though it tends to be referred to as Java these days. And, of course, Haskell is ensuring that Miranda will never really die. Cheers, Andrew Bromage ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
On Jan27, Dipankar Ray wrote: What I mean by this is that if I look at the CS programs at Berkeley, MIT, CMU, I don't see a huge emphasis on PL. Looking now at the MIT opencourseware offerings in EECS, I see no undergrad course that suggests that you'd learn anything about modern type theory. 3) most of the canonical US universities for CS (MIT, Berkeley, Stanford, CMU, etc) basically don't teach haskell or ML, or even talk much about it, relative to how much they talk about, say, Java. Not to dispute your general point, but CMU is an exception to this rule. There's a course, taught in SML, on basic functional programming, continuations, laziness, etc: http://www.cs.cmu.edu/~me/212/ This course is required for all CS majors and occurs fairly early in the sequence (freshman spring or sophomore fall). We also have a fairly hardcore introduction to type systems and operational semantics: http://www.cs.cmu.edu/~rwh/courses/ppl/ and a course on constructive logic: http://www.andrew.cmu.edu/course/15-317/ These electives are taken by ~30-40 students each, so I'd guess that somewhere between a third and a half of the undergrads go through one of them. And then there are electives, either mostly undergrad, like this course in typed compilation: http://www.cs.cmu.edu/~crary/hotc/ or mostly grad, like this course on logic programming (but there are always at least a handful of undergrads in the room): http://www.cs.cmu.edu/~fp/courses/lp/ And then there are two grad-level PL distribution-requirement courses (one on type systems, one on denotational semantics), which usually have a few interested undergrads. And many undergrads get involved in PL research as well. Maybe the real question is why so few universities have large groups of PL faculty to teach these courses? =) -Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re[2]: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
On 1/27/08, Dipankar Ray [EMAIL PROTECTED] wrote: Hello Jerzy and Bulat, Thanks for your perspectives. Bulat, I can understand that you find it shocking that the folks at Moscow University still study Lisp, but I wouldn't be so quick to condemn them for being dinosaurs. After all, they just stopped teaching the SICP course (using Scheme) at MIT, and I don't believe that they replaced it with an intro to CS course that uses (say) Haskell or ML! Nor has Berkeley, far as I know. Correct -- CS 61A at Berkeley (the 6.001 analogue there) is still taught in Scheme, and I suspect that anyone who wants to change that will have to pry the course out of Brian Harvey's cold, dead hands. What I mean by this is that if I look at the CS programs at Berkeley, MIT, CMU, I don't see a huge emphasis on PL. Looking now at the MIT opencourseware offerings in EECS, I see no undergrad course that suggests that you'd learn anything about modern type theory. As a former graduate student instructor for the undergrad compiler class at Berkeley, I can confirm that this statement is mostly but not quite true for Berkeley. (As Dan Licata pointed out, CMU is an exception here; I get the feeling MIT is more like Berkeley than MIT in this respect.) The compiler class there (CS 164) is required for all CS majors, and depending who's teaching it in a given semester, students might well get to see formal presentations of both static and dynamic semantics for a simple object-oriented language (at least the the time when I taught a section of the class, though I see that right now their target language is Python.) Granted, students have the option of either Java or C++ for the implementation languages, which is less than ideal. Of course we know here of success stories involving modern fp languages. But there is no haskell or ml book that has had close to the influence of KR's C book. One might argue that adoption on that scale is not the goal of the haskell community (was it Kernighan, Ritchie, or Thompson's goal? I think not), but still, it's weird to me that: At least based on my own experience and that of my peers, I think people from my generation who got interested in FP languages mostly got turned on by a particular teacher who was really into it, rather than by a particular book. 1) we're clearly on to something, but still 2) many smart people who are interested walk away frustrated (not so easy to learn (is the hardness necessary? perhaps?), relative to KR, for example). For #2, note my comment above about teachers. It's always easier and more motivating to learn when you have someone a little more experienced to guide and encourage you. But for FP, there are fewer people around to do the teaching, thus more people get discouraged. I feel like I'm saying something tautological here, though: if nobody teaches, nobody can learn. For some reason or another, I think being self-taught when it comes to FP is hard in a way that being self-taught when it comes to programming in general isn't -- perhaps it's for the same reason that being a self-taught mathematician is hard, though some people pull it off. Personally I think I'm pretty self-motivated, and am self-taught in a lot of other areas, but I don't think I ever would have learned Haskell on my own. So what does that say about programmers as a whole? 3) most of the canonical US universities for CS (MIT, Berkeley, Stanford, CMU, etc) basically don't teach haskell or ML, or even talk much about it, relative to how much they talk about, say, Java. It's one thing that companies don't move forward; yet another thing that Universities don't either. Why is that? Why, in 2008, is Java taught more than Haskell? There's really only one reason for this: at least in the United States, universities are becoming more and more like businesses, and faculty feel they have to give students what they want in order to compete. Computer science undergrads, as a whole, want to learn Java or C++ so they can learn something that'll be useful and help them get a job. The faculty know this is ridiculous, but a lot of them buckle under anyway because they need to boost their enrollments. The notion of the university as a place where students pay faculty members so that they might benefit from the vaster experience and judgment of the faculty -- which means deferring certain decisions to those who are wiser than you -- seems to be going out the window along with paper registration cards. Moreover: At Berkeley, the faculty didn't teach Haskell or ML because they didn't believe in Haskell or ML. If you personally don't think that a language is ever going to be adopted -- if you think that it's elegant but will never be practical -- it's going to be hard for you to sell it to a 300-person hall full of undergrads, most of whom are likely to start checking email the moment you say something that bores them. Disclaimer: This entire message consists of my personal opinions
Re: The programming language market (was Re: [Haskell-cafe] Why functional programming matters
thanks for the correction - very informative! that'll teach me to just go to the opencourseware site at MIT only... On Sun, 27 Jan 2008, Dan Licata wrote: On Jan27, Dipankar Ray wrote: What I mean by this is that if I look at the CS programs at Berkeley, MIT, CMU, I don't see a huge emphasis on PL. Looking now at the MIT opencourseware offerings in EECS, I see no undergrad course that suggests that you'd learn anything about modern type theory. 3) most of the canonical US universities for CS (MIT, Berkeley, Stanford, CMU, etc) basically don't teach haskell or ML, or even talk much about it, relative to how much they talk about, say, Java. Not to dispute your general point, but CMU is an exception to this rule. There's a course, taught in SML, on basic functional programming, continuations, laziness, etc: http://www.cs.cmu.edu/~me/212/ This course is required for all CS majors and occurs fairly early in the sequence (freshman spring or sophomore fall). We also have a fairly hardcore introduction to type systems and operational semantics: http://www.cs.cmu.edu/~rwh/courses/ppl/ and a course on constructive logic: http://www.andrew.cmu.edu/course/15-317/ These electives are taken by ~30-40 students each, so I'd guess that somewhere between a third and a half of the undergrads go through one of them. And then there are electives, either mostly undergrad, like this course in typed compilation: http://www.cs.cmu.edu/~crary/hotc/ or mostly grad, like this course on logic programming (but there are always at least a handful of undergrads in the room): http://www.cs.cmu.edu/~fp/courses/lp/ And then there are two grad-level PL distribution-requirement courses (one on type systems, one on denotational semantics), which usually have a few interested undergrads. And many undergrads get involved in PL research as well. Maybe the real question is why so few universities have large groups of PL faculty to teach these courses? =) -Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: HList error with hFoldr
After some fooling around, I came up with something I think makes sense. Let me know if this is the right/wrong thing. It seems to work for the examples I've tried so far. instance (Floating f, MetricSpace e f ,MetricSpace e' f, HZip l l (HCons (e', e') l') ,HFoldr ApplyDistSum Float l' f) = MetricSpace (HCons e l) f where c `dist` c' = sqrt $ hFoldr ApplyDistSum (0::Float) (hZip c c') It seems strange that you need the types e and e' (perhaps this is a quirk or a bug of GHC 6.8). With GHC 6.6, I have derived the following instance (Floating f, MetricSpace e f, HFoldr ApplyDistSum Float l1 f, HZip (HCons e l) (HCons e l) (HCons (e,e) l1)) = MetricSpace (HCons e l) f where c `dist` c' = sqrt $ hFoldr ApplyDistSum (0::Float) (hZip c c') which matches my intuitive understanding, and also sufficient to run the given examples. When I wrote `I derived with GHC' I meant it literally. First I wrote the instance without any constraints: instance () = MetricSpace (HCons e l) f where c `dist` c' = sqrt $ hFoldr ApplyDistSum (0::Float) (hZip c c') GHC of course complained about many missing constraints. I started adding the constraints from the list of complaints, until GHC was satisfied. This is basically a cut-and-paste job from the Emacs buffer with GHC error messages to the buffer with the code. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] How to organize code
Hi, How do you organize code ? Here is a sample. Acturally, I am thinking about using this plan. Any suggestions ? -- BasicalType.hs type Position = (Int,Int) data Box = Box { pos :: Position } data Chain = Chain { pos :: [Position] } -- Object.hs import BasicalType class Object o where pos :: o - [Position] -- Type.hs import BasicalType import Object instance Object Box where pos = return . BasicalType.pos instance Object Chain where pos = BasicalType.pos -- Main.hs import Type ... Regards -- L.Guo 2008-01-28 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to organize code
On 1/27/08, L.Guo [EMAIL PROTECTED] wrote: Hi, How do you organize code ? Here is a sample. Acturally, I am thinking about using this plan. Any suggestions ? -- BasicalType.hs type Position = (Int,Int) data Box = Box { pos :: Position } data Chain = Chain { pos :: [Position] } -- Object.hs import BasicalType class Object o where pos :: o - [Position] -- Type.hs import BasicalType import Object instance Object Box where pos = return . BasicalType.pos instance Object Chain where pos = BasicalType.pos -- Main.hs import Type ... Be careful not to confuse Haskell's type class system with the idea of a class in object-oriented programming. I suggest you read this article: http://trevion.blogspot.com/2007/02/snowball-chance.html Cheers, Tim -- Tim Chevalier * http://cs.pdx.edu/~tjc * Often in error, never in doubt ...It's a thin line between amateur and professional, a line mostly emphasized by insecure professionals. -- Bob Franke ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: The programming language market
On Sun, 27 Jan 2008, Bulat Ziganshin wrote: Hello Hans, Sunday, January 27, 2008, 5:02:57 PM, you wrote: This reminds me, I worked at a Dutch telecomm software production company for a short while in 1999 and they had two Russian software engineers there, one from St. Petersburg and one from Wladiwostok, both female and under 25 years of age. They programmed in C and were highly respected by their managers and colleagues! So, there are at least counterexamples :-) no. you should asked them HOW they learned programming and i'm pretty sure (knowing too much about our universities and institutes) that they were just a self-learned - like myself. generally speaking, our higher education now just starting to teach students new Java technologies - you can imagine how old is knowledge they get there. actually, all the good russian programmers i ever seen are self-learned Many things I need today for math and computer science I have acquired in an auto-didactic way. These are usually the things I can remember most easily. Isn't it a good education system if it allows, or supports, or encourages or forces you to learn this way? :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe