[Haskell-cafe] help understanding zlib space leak
Dear haskellers, I'd like assistance figuring out a strange space leak using zlib package. To make it easier to reproduce I've come up with the following snippet that pretty much resumes up the problem I'm trying to solve: -- omitting imports and function signatures encode = compress . L.fromChunks main = do { hSetBinaryMode stdout True ; hSetBinaryMode stdin True ; hSetBuffering stdin NoBuffering ; hSetBuffering stdout NoBuffering ; loop [] } where loop buff | length buff == 64 = L.hPut stdout (encode buff) loop [] | otherwise = do { eof - hIsEOF stdin ; when (not eof) (fmap (: buff) (B.hGetSome stdin 512) = loop) } N.B.: Removing the `compress' function from the above code also removes the space leak. Now, feeding the above program with ~8GB worth of binary data: $ uname -a Linux mephisto.localhost.localdomain 3.8.7-1-ARCH #1 SMP PREEMPT Sat Apr 13 09:01:47 CEST 2013 x86_64 GNU/Linux $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.6.3 $ ghc -W -Wall -rtsopts --make -O2 test.hs $ sudo dd if=/dev/sda bs=4K count=2048K | ./test +RTS -M1M -s /dev/null ... 8589934592 bytes (8.6 GB) copied, 277.263 s, 31.0 MB/s ... 2 MB total memory in use (0 MB lost due to fragmentation) ... Which is fine. However, monitoring the RSS size is a different story: $ while pidof test; do ps -o rss= -p $(pidof test); done | tail 16967 25620 16967 25628 16967 25628 16967 25628 16967 # ~16M 0 I know the RSS usually overestimates the memory consumption but the problem is that it is forever growing. The following I found very intriguing: * `+RTS -hc` gives me no hint about whats wrong [at least I couldn't see one]; * `+RTS -M1M` doesn't produce an error; * removing the `compress' functions makes the problem disappear; I couldn't figure these out and I don't think this is matter of strictness, though. Has anyone seen this before? Thanks in advance, ~dsouza ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] help understanding zlib space leak
Sorry, I should've removed the pid number from the output. The following should be correct: $ sudo dd if=/dev/sda bs=4K count=2048K | ./test +RTS -M1M -s /dev/null ... 8589934592 bytes (8.6 GB) copied, 243.525 s, 35.3 MB/s 41,942,119,192 bytes allocated in the heap 228,827,904 bytes copied during GC 104,048 bytes maximum residency (6 sample(s)) 24,408 bytes maximum slop 2 MB total memory in use (0 MB lost due to fragmentation) ... $ while pidof test /dev/null; do ps -o rss= -p $(pidof test); sleep 1; done | tail 32056 32408 32832 33264 33684 34100 34560 34900 35384 35816 # ~ 35MB Thanks! ~dsouza ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] howto best use emacs + tiling WM (Xmonad,DWM)
A little delayed, but might be useful. I personally use icicles. I found the M-* great for narrowing results down. I've tried anything and ido also, but icicles ended up winning, for my taste at least. A side note, speedbar actually *does* works for bufffers. Simply type *b* on the speedbar and you get the buffers list. That may help you also. As others sugested, the vanila interface of emacs is not perfect. Try icicles, ido or anything, they greatly improve usability. Another useful library is windmove and framemove. They assist switching between visible buffers/frames: http://www.emacswiki.org/emacs/Icicles http://www.emacswiki.org/emacs/WindMove http://www.emacswiki.org/emacs/FrameMove Hope you find those useful! ~dsouza At Fri, 4 Nov 2011 08:55:22 -0700 (PDT), kaffeepause73 wrote: Hello, I'm using dwm which I really love (ev. consider switching to xmonad). However when I'm working with emacs (programming haskell) und dwm I feel, I'm not as effecient as I eventually could be. -- I can have the shell in one window (to execute the compiled program), but most work happens in emacs (in one screen only). And I have up to buffers in emacs which I find hard to switch between. Even on Xinerama this doesn't really change. When I create new frames for emacs with strg-x 5-2 then I'm sort getting closer to where I would like to be, but then I find myself having to windows on which I switch buffers and I get confused again. What I would like is to tab through the buffers, as I walk through the screens in dwm/xmonad and see the list of buffers as id do so. -- And can directly jump to a specific buffer via e.g. mod-4. I'm thinking that each buffer in emacs gets one frame and occupies one screen and xmonad than gets dynamically 20 or more screens (like tabs). If there is an good solution within emacs and the emacs mode than I'm of course also more than open for it. (my experience with emacs so far: -- only 10 buffers are listed in menue -- speedbar is very nice but works for files not for buffers -- using list all buffers is sort of cluncy as it uses half the screen (my screen splits horizontally Thanks, Phil -- View this message in context: http://haskell.1045720.n5.nabble.com/howto-best-use-emacs-tiling-WM-Xmonad-DWM-tp4964482p4964482.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks
The perl community has something really interesting for quite long time: http://wiki.cpantesters.org/wiki/HomePage Or more specifically: http://matrix.cpantesters.org/?dist=DBI The idea is simple: there are many different platforms that would be to expensive for one to support. So they ask the community for help, and then distribute the load amongst the perl community. It servers for testing modules and also perl distribution itself. It may work better for this purpose than relying on a single centralized platform, namely Hackage. ~dsouza At Mon, 31 Oct 2011 17:08:22 +1000, Gregory Crosswhite wrote: [1 multipart/alternative (7bit)] [1.1 text/plain; us-ascii (quoted-printable)] Hey everyone, I have uploaded a number of small packages to Hackage that I no longer actively use so that I don't find out immediately when a new version of GHC has broken them. Since Hackage is going to the trouble of finding out when a package no longer builds anyway, could it have a feature where when a working package breaks with a new version of GHC the author is automatically e-mailed? This would make me (and probably others) a lot more likely to notice and proactively fix broken packages. (Heck, I wouldn't even necessarily mind being nagged about it from time to time. :-) ) Cheers, Greg [1.2 text/html; us-ascii (7bit)] [2 text/plain; us-ascii (7bit)] ___ 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] getting started
You may also enjoy reading: http://learnyouahaskell.com/ It is also freely available online. ~dsouza On Wed, Sep 28, 2011 at 02:56:46AM -0700, haskell wrote: i am new to haskell can you tell me the softwares to install in haskell i have install hugs emacs but when i write any code it gives same error can you help me start i have lekash too i have installed some more packages -- View this message in context: http://haskell.1045720.n5.nabble.com/getting-started-tp4848583p4848583.html Sent from the Haskell - Haskell mailing list archive at Nabble.com. ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell -- ~dsouza http://about.me/ds0uza gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Re: [Haskell-cafe] How to use http-enumerator with hoauth?
Thanks! I'm going to start working on this. Creating specific typeclasses is a good idea and I also believe that these changes can be done without breaking existing code. I'll see how that goes and keep you guys updated. On Wed, Feb 16, 2011 at 4:27 AM, Jeremy Fitzhardinge jer...@goop.org wrote: On 02/15/2011 05:49 PM, Diego Souza wrote: Hi, thanks for the feedbacks. They sound very reasonable. Going back in time, the first version was in fact a pure library. However, at some point I changed this as I thought it would make it easier to use, which might have been a mistake of mine. Yes, I think its a good idea to keep things simple and pure to ease composition. I'm just concerned about changing the interface once more, but it might be justified. Perhaps splitting it into the pure oauth functions as used to be in the beginning and another one that puts the http layer, in case one finds it convenient. That might mitigate this problem, and perhaps, avoid changing the interface. Since there seem to be a number of existing users of your API, it would be rude to break it on them. You can implement a clearly defined two-layer API for the package: a mostly pure layer which deals with the basics of settings up OAuth requests and responses, and then the current API layered on top of it. The main problem is dealing with all the different Request/Response types. But if you can narrow down the sets of operations you need for each and define typeclasses with the appropriate functions, it should be fairly to make the existing types instances of those classes (ie, akin to HttpClient, but avoiding the IO where possible). J -- ~dsouza yahoo!im: paravinicius gtalk: dsouza...@gmail.com gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to use http-enumerator with hoauth?
I was thinking in separating the core and http functions in order to be able to provide implementation for http-enumerator without breaking existing clients. Also the ones who don't need http interface don't need to use the full stack. I was not aware of CPRNG classes, thanks for that. I'll definitely take a look on this! Thanks, On Wed, Feb 16, 2011 at 8:33 AM, Vincent Hanquez t...@snarc.org wrote: On Tue, Feb 15, 2011 at 11:49:16PM -0200, Diego Souza wrote: Hi, thanks for the feedbacks. They sound very reasonable. Going back in time, the first version was in fact a pure library. However, at some point I changed this as I thought it would make it easier to use, which might have been a mistake of mine. Back then http-enumerator wasn't available and after it did I haven't considered using it until now. I'm just concerned about changing the interface once more, but it might be justified. Perhaps splitting it into the pure oauth functions as used to be in the beginning and another one that puts the http layer, in case one finds it convenient. That might mitigate this problem, and perhaps, avoid changing the interface. What you guys think? I think such separation would be great ! however ultimately, i don't think there's any reason why would you not target http-enumerator directly and drop all the abstraction ? As long as thing changes, you might consider using crypto-api CPRNG classes instead of random. -- Vincent -- ~dsouza yahoo!im: paravinicius gtalk: dsouza...@gmail.com gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to use http-enumerator with hoauth?
Thanks! I'll merge it tonight :-) On Wed, Feb 16, 2011 at 3:33 PM, Jeremy Fitzhardinge jer...@goop.org wrote: On 02/16/2011 06:00 AM, Diego Souza wrote: I was thinking in separating the core and http functions in order to be able to provide implementation for http-enumerator without breaking existing clients. Also the ones who don't need http interface don't need to use the full stack. I was not aware of CPRNG classes, thanks for that. I'll definitely take a look on this! I just sent you a pull-request for this on github. J -- ~dsouza yahoo!im: paravinicius gtalk: dsouza...@gmail.com gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to use http-enumerator with hoauth?
Hi, thanks for the feedbacks. They sound very reasonable. Going back in time, the first version was in fact a pure library. However, at some point I changed this as I thought it would make it easier to use, which might have been a mistake of mine. Back then http-enumerator wasn't available and after it did I haven't considered using it until now. I'm just concerned about changing the interface once more, but it might be justified. Perhaps splitting it into the pure oauth functions as used to be in the beginning and another one that puts the http layer, in case one finds it convenient. That might mitigate this problem, and perhaps, avoid changing the interface. What you guys think? Again, thanks, On Tue, Feb 15, 2011 at 10:05 PM, Jeremy Fitzhardinge jer...@goop.org wrote: On 02/15/2011 02:14 PM, Vincent Hanquez wrote: Clearly, http-enumerator is the best package for doing http/https. however since it's pretty new, lots of package still uses their own abstraction for doing things. While it may be possible to retrofit hoauth to use http-enumerator, using the httpclient typeclass, that's going to be hard to fit the full enumerator interface on it, so you won't benefit of streaming; You may as well just use network.curl for now, which is what i've seen used with hoauth. I don't really see why hoauth needs to make its own http requests at all, except perhaps as a convenience. At heart, doesn't it just need to set up requests and parse certain responses? It could almost be pure, aside from needing to get timestamps and generate nonces (which, btw, doesn't seem to be using a cryptographically strong RNG). But that suffers from not having standard request/response types. you should check the twidge twitter utility and/or yesod-auth-oauth, that both uses curl/hoauth. Thanks for the pointers. Does Network.Curl support interleaved processing on infinite streams? It would be really useful to see an hoauth fully using enumerator and http-enumerator (and not redefining a boat load of stuff), but IMO you'll need to understand enumerators before tackling such a challenge. Also Wai is for abstracting server side transport (cgi/fastcgi/others), Yes, that's what I thought, but http-enumerator dips into it for its http response types. the HTTP package doesn't do TLS. That's unfortunate, but it seems like it could have been a fairly easy thing to address. Or does it have other deficiencies? Thanks, J ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- ~dsouza yahoo!im: paravinicius gtalk: dsouza...@gmail.com gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Defining a type depending on the word size of platform
Hi, maybe you have already considered this and dropped it out for whenever reasons. Anyways, what if you stick with Int or Data.Word.Word types and use Data.Bits.bitSize or maxBound to check in runtime what the word size is. It might be easier than using CPP extension. ~dsouza On Sun, Jan 2, 2011 at 11:16 AM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Sunday 02 January 2011 13:45:13, Robert Clausecker wrote: I guess the easiest way would be to use CPP, but is there any flag for the wordsize? Not directly, but I think {-# LANGUAGE CPP #-} #include MachDeps.h #if WORD_SIZE_IN_BITS == 32 type MyGen = MyGen32 #else// GHC only works with 32- and 64-bit words type MyGen = MyGen64 #endif should do it. MachDeps.h ties you to GHC of course, if you want it to work on other compilers too, I guess you need a configure script. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Data.Judy and StablePtr
Thanks Gregory! Probably the solution would be recreating the FFI in a way that doesn't need the StablePtr. Not sure how to do this though. I'm going to test other things, like HashTable, before trying this. And let's see how it goes. ~dsouza On Mon, Dec 20, 2010 at 2:40 PM, Gregory Collins g...@gregorycollins.netwrote: Pointers are mapped to StablePtrs using *drumroll* a hash table, so you can give up on getting acceptable performance out of this combination IMO. G On Mon, Dec 20, 2010 at 5:06 PM, Diego Souza dso...@bitforest.org wrote: Hello Haskellers, I'm playing a bit with Data.Judy. However, I noticed that using StablePtr incurs in some performance problems, I don't have any numbers but as a example use Int and ByteString as values and you can notice the difference without any benchmarking tool with the example that comes in the documentation. The question that I have is: is there any way to make it faster for types other than those that fits in word size? I understand that the way the binding to the C code has been done, stableptr is required. Am I wrong assuming this? I would be happy to submit a patch but I failed to find a way to improve the performance. The second question is what is a common practice to avoid memory leaks with StablePtr? I have zero experience programming with the Haskell FFI interface, so probably the most basic stuff would help me a lot in this case. Thanks in advance, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Gregory Collins g...@gregorycollins.net -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Data.Judy and StablePtr
Hello Haskellers, I'm playing a bit with Data.Judy. However, I noticed that using StablePtr incurs in some performance problems, I don't have any numbers but as a example use Int and ByteString as values and you can notice the difference without any benchmarking tool with the example that comes in the documentation. The question that I have is: is there any way to make it faster for types other than those that fits in word size? I understand that the way the binding to the C code has been done, stableptr is required. Am I wrong assuming this? I would be happy to submit a patch but I failed to find a way to improve the performance. The second question is what is a common practice to avoid memory leaks with StablePtr? I have zero experience programming with the Haskell FFI interface, so probably the most basic stuff would help me a lot in this case. Thanks in advance, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell] letter?
$ whois might give us a clue: Domain ID:D495475-LROR Domain Name:HASKELL.ORG Created On:12-Dec-1996 05:00:00 UTC Last Updated On:17-Dec-2010 16:46:40 UTC Expiration Date:11-Dec-2013 05:00:00 UTC Sponsoring Registrar:Network Solutions LLC (R63-LROR) Status:CLIENT TRANSFER PROHIBITED Status:RENEWPERIOD Status:AUTORENEWPERIOD Registrant ID:23094698-NSI Registrant Name:YaleUniversityComputer Science Department Haskell Group Registrant Organization:YaleUniversityComputer Science Department Haskell Group Registrant Street1:51 Prospect St 308a AKW Mail S Registrant Street2: Registrant Street3: Registrant City:New Haven Registrant State/Province:CT Registrant Postal Code:06520-8285 Registrant Country:US Registrant Phone:+1.99 Registrant Phone Ext.: Registrant FAX: Registrant FAX Ext.: Registrant Email:peterson-j...@cs.yale.eduemail%3apeterson-j...@cs.yale.edu Admin ID:43349120-NSI Admin Name:Galois, Inc Admin Organization:Galois, Inc Admin Street1:421 SW 6th Ave Admin Street2:Suite 300 Admin Street3: Admin City:Beaverton Admin State/Province:OR Admin Postal Code:97204 Admin Country:US Admin Phone:+1.5036266616 Admin Phone Ext.: Admin FAX: Admin FAX Ext.: Admin Email:hostmas...@galois.com email%3ahostmas...@galois.com Tech ID:43349120-NSI Tech Name:Galois, Inc Tech Organization:Galois, Inc Tech Street1:421 SW 6th Ave Tech Street2:Suite 300 Tech Street3: Tech City:Beaverton Tech State/Province:OR Tech Postal Code:97204 Tech Country:US Tech Phone:+1.5036266616 Tech Phone Ext.: Tech FAX: Tech FAX Ext.: Tech Email:hostmas...@galois.com email%3ahostmas...@galois.com Name Server:NS1.FIRST-NS.DE Name Server:ROBOTNS2.SECOND-NS.DE Name Server:ROBOTNS3.SECOND-NS.COM Name Server: Name Server: Name Server: Name Server: Name Server: Name Server: Name Server: Name Server: Name Server: Name Server: DNSSEC:Unsigned On Fri, Dec 17, 2010 at 10:19 AM, Ketil Malde ke...@malde.org wrote: Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes: Did someone forget to renew www.haskell.org? Who does this? I'm not sure how we can find out who was previously registered. Also plain http://haskell.org/ used to work, but doesn't any more. Both work fine here (just checked)... They both point to the same page Network Solutions page for me - if it's different, it's probably just a DNS caching effect. I'm sure lots of people have noticed this, but it'd be good if someone posted a summary of what's being done about it. It seems the MX record is gone too, so I guess mail to the lists will fail shortly as well. -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Re: [Haskell-cafe] DNS problems at haskell.org?
The whois still says it is registered to Galois, Inc. Then, hopefully, it is just a DNS problem. Guys, if you that are responsible for managing haskell.org need a hand with sysadmin tasks I volunteer to work. I don't have lots of spare time, but I do have some. Just let me know. Thanks, On Fri, Dec 17, 2010 at 12:01 PM, Eugene Kirpichov ekirpic...@gmail.comwrote: Hello. For a couple of friends of mine, hackage.haskell.org happens to resolve to something strange (parked domain), though haskell.org works ok. This might be something to tell to haskell.org admins. Find below an example tracert (messages in Russian have been translated). C:\Program Files (x86)\Far2tracert hackage.haskell.org Tracing to hackage.haskell.org [209.62.105.19], max hops = 30 1 8 ms 4 ms 4 ms bsr01.nn.ertelecom.ru [91.144.184.69] 2 **2 ms net184-77.nn.ertelecom.ru [91.144.184.77] 313 ms 9 ms 9 ms NNOV-D2-HQ-XX---1-3-0.499.main.synterra.ru [83.229.187.17] 4 9 ms29 ms 9 ms 83.229.226.101 510 ms 9 ms 9 ms m9-cr01-te4-3.msk.stream-internet.net [195.34.38.37] 6 142 ms 142 ms 142 ms ss-crs-1-be3.msk.stream-internet.net [195.34.53.86] 7 142 ms 142 ms 142 ms mar-crs-1-be6.msk.stream-internet.net [195.34.59.141] 8 143 ms 142 ms 142 ms oct-crs-1-be1.spb.stream-internet.net [195.34.53.194] 9 143 ms 142 ms 142 ms bro-cr01-be3.stk.stream-internet.net [212.188.1.194] 1066 ms66 ms66 ms tct-cr01-te5-1.ams.stream-internet.net [195.34.53.14] 11 142 ms 307 ms 207 ms sd-cr01-te2-1.nyc.stream-internet.net [195.34.59.114] 12 *** Request timed out 13 179 ms 179 ms 179 ms e8-2.ibr03.dllstx3.networklayer.com [70.87.253.189] 14 190 ms 189 ms 190 ms e1-1.ibr01.hstntx2.networklayer.com [70.87.253.50] 15 190 ms 190 ms 190 ms te2-2.dsr02.hstntx2.networklayer.com [74.55.252.38] 16 184 ms 185 ms 184 ms po2.car3.hstntx2.networklayer.com [74.55.252.106] 17 189 ms 189 ms 189 ms ev1s-209-62-105-19.theplanet.com[209.62.105.19] Trace finished C:\Program Files (x86)\Far2tracert haskell.org Tracing to haskell.org [78.46.100.180], max hops = 30 1 4 ms 3 ms 2 ms bsr01.nn.ertelecom.ru [91.144.184.69] 2 *2 ms 2 ms net184-77.nn.ertelecom.ru [91.144.184.77] 310 ms 9 ms 9 ms NNOV-D2-HQ-XX---1-3-0.499.main.synterra.ru [83.229.187.17] 4 9 ms 9 ms11 ms 83.229.226.101 510 ms 9 ms 9 ms m9-cr01-te4-3.msk.stream-internet.net [195.34.38.37] 655 ms55 ms55 ms ss-crs-1-be3.msk.stream-internet.net [195.34.53.86] 753 ms52 ms52 ms m9-crs-1-be9.msk.stream-internet.net [195.34.59.250] 855 ms55 ms55 ms bor-crs-1-be1.spb.stream-internet.net [195.34.53.126] 952 ms52 ms52 ms anc-cr01-po3.ff.stream-internet.net [195.34.53.102] 1052 ms52 ms52 ms anc-cr02-po1.ff.stream-internet.net [212.188.0.122] 1156 ms56 ms56 ms decix2-gw.hetzner.de [80.81.193.164] 1260 ms60 ms60 ms hos-bb1.juniper1.fs.hetzner.de[213.239.240.242] 1364 ms61 ms63 ms hos-tr1.ex3k10.rz12.hetzner.de[213.239.228.139] 1460 ms60 ms62 ms lambda.haskell.org [78.46.100.180] Trace finished -- Eugene Kirpichov Senior Software Engineer, Grid Dynamics http://www.griddynamics.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] packaging a cgi binary using cabal
Well, if you want you might use images inline as well: http://en.wikipedia.org/wiki/Data_URI_scheme#Advantages From my experience, this is supported by all major browser, including IE. Regards, ~dsouza On Thu, Sep 23, 2010 at 9:03 AM, Joachim Breitner m...@joachim-breitner.dewrote: Hi, Am Donnerstag, den 23.09.2010, 11:19 +0100 schrieb Pedro Baltazar Vasconcelos: On Thu, 23 Sep 2010 10:44:17 +0200 Joachim Breitner m...@joachim-breitner.de wrote: In case of such research programs, where ease of installability is usually more important than performance, I just include the data files into the program. For example, in http://darcs.nomeata.de/sem_syn/ the JQuery library and the file BUtils.hs are turned into Haskell string literals using http://github.com/jgm/hsb2hs This way, the resulting binary is really stand-alone and can be just moved to the appropriate place on the web server. OK, thanks for the suggestion. For my needs I think this will be very straightforward to do manually --- the CSS and image files a pretty short anyway. for CSS, this is what I’m doing as well... but for binary image data? Greetings, Joachim -- Joachim nomeata Breitner mail: m...@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nome...@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nome...@debian.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell] ANN: hoauth v0.3.1
Hi All, I'm pleased to announce hoauth-0.3.1. The major change in this version is error handling. Instead of using fail, you may now provide your own error handling function. Unfortunately I've made changes that make this version incompatible with previous ones. Although I believe updating to this new version shouldn't be difficult. Anyway, if there is anyone already using it and are having a hard time to upgrade please let me know. In summary, here is the changelog: * Error handling * RSA-SHA1 authentication method is available again; * bugfix: curl httpclient implementation hanging when using PUT and POST method; * bugfix: curl httpclient sets a timeout of 30s instead of waiting forever; * bugfix: httpclient implementation now ignores SSL certificate errors [works with self-signed certificates]; As usual feedback is highly welcome! Thanks, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] Re: ANN: iyql - interactive yql
Oh, forget to send the links: cabal pkg: http://hackage.haskell.org/package/iyql source: http://github.com/dsouza/iyql Thanks! On Wed, Sep 8, 2010 at 11:27 PM, Diego Souza dso...@bitforest.org wrote: Hi All, I'm pleased to announce iyql, an interactive CLI for YQL [ http://developer.yahoo.com/yql/console]. This version provides the first release, which allows you perform all queries supported by YQL [with the sole exception of parenthesis in WHERE clause]. Among other things, completion and history are implemented [=haskeline] along with support for queries that requires OAuth authentication. Plans for next releases: * Implement a decent error handling: currently any unexpected exception aborts the program; * Support parenthesis in WHERE clause; * More local functions; Please let me know about any issues or suggestions! Regards, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txthttp://bitforest.org/%7Edsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txthttp://bitforest.org/%7Edsouza/pub/authorized_keys.txt -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell] ANN: iyql - interactive yql
Hi All, I'm pleased to announce iyql, an interactive CLI for YQL [ http://developer.yahoo.com/yql/console]. This version provides the first release, which allows you perform all queries supported by YQL [with the sole exception of parenthesis in WHERE clause]. Among other things, completion and history are implemented [=haskeline] along with support for queries that requires OAuth authentication. Plans for next releases: * Implement a decent error handling: currently any unexpected exception aborts the program; * Support parenthesis in WHERE clause; * More local functions; Please let me know about any issues or suggestions! Regards, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txthttp://bitforest.org/%7Edsouza/pub/gpg-pubkey.txt authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txthttp://bitforest.org/%7Edsouza/pub/authorized_keys.txt ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell-cafe] Refactoring of OAuth Library - Need Review
Hi, I've done a complete refactoring of oauth library. This new version is incompatible (in terms of interface) with the previous one. An example of use is available here: http://projects.bitforest.org/hoauth/dist/doc/html/hoauth/Network-OAuth.html Probably the major change is that, along the functions that deal with oauth authentication, there is now an HttpClient typeclass. The library now is able to perform http requests and fully deal with the oauth protocol. I'm planning to upload to hackage soon enough, but before that I'd like to ask if someone could review it and send feedbacks. That would be much appreciated. To get the code: $ darcs get http://projects.bitforest.org/hoauth/ To run tests: $ haskell -isrc/main/haskell -isrc/test/haskell src/test/haskell/Tests.hs Thanks in advance, ~dsouza ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Refactoring of OAuth Library - Need Review
Wrong link. This is the right one: http://projects.bitforest.org/hoauth/dist/doc/html/hoauth/Network-OAuth-Consumer.html ~dsouza On Sun, Mar 28, 2010 at 2:59 PM, Diego Souza dso...@bitforest.org wrote: Hi, I've done a complete refactoring of oauth library. This new version is incompatible (in terms of interface) with the previous one. An example of use is available here: http://projects.bitforest.org/hoauth/dist/doc/html/hoauth/Network-OAuth.html Probably the major change is that, along the functions that deal with oauth authentication, there is now an HttpClient typeclass. The library now is able to perform http requests and fully deal with the oauth protocol. I'm planning to upload to hackage soon enough, but before that I'd like to ask if someone could review it and send feedbacks. That would be much appreciated. To get the code: $ darcs get http://projects.bitforest.org/hoauth/ To run tests: $ haskell -isrc/main/haskell -isrc/test/haskell src/test/haskell/Tests.hs Thanks in advance, ~dsouza ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Cabal pre-compiled packages
Hi, currently when one install a cabal package it compiles it and then install generated binaries. I wonder whether or not it would be useful to have pre-compiled binaries as many package managers usually do (e.g. apt). I often think that would save some time on the expense of a busier hackage server capable of generating packages for many different platforms. I'm particularly thinking on the following scenario: suppose that you have code that is ready for production. If cabal supported pre-compiled binaries, there is no need to install ghc or eventually any other compiler, just runtime environment and eventually cabal. I must say that I have no experience in doing this in Haskell (just personal/small projects), so I suppose one have to generate binaries and use other sort of package manager to deploy code to production (which sounds reasonable as well). Thus, if the assumption is correct, cabal is a development tool, not something one could to only deploy runtime-only packages. I also would appreciate if others could share how usually this is managed. Best Regards, ~dsouza ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] why these two are not equivalent?
On Sun, Sep 13, 2009 at 09:57:50PM -0700, Iavor Diatchki wrote: (argh, sorry about that, I pressed something and gmail sent my unfinished email!) On Sun, Sep 13, 2009 at 9:54 PM, Iavor Diatchki iavor.diatc...@gmail.com wrote: Hi, It seems that the problem is the site is using GHC 6.6.1, and something was broken at the time (I have not looked into what that is). Here are the outputs that I get for the little example on the site that you posted: GHC 6.10.3 and C++: 03 10103538 1233 6160 0141 1 03 10103538 1233 6160 0142 1 30 10103538 1233 6160 0141 2 30 10103538 1233 6160 0142 2 30 10103538 1233 6160 0142 1 30 10103538 1233 6160 0143 1 30 10103538 1233 6160 0144 1 30 10103538 1233 6160 0145 1 30 10103538 1233 6160 0146 1 With GHC 6.6.1: 03 10103538 1233 6160 0141 1 03 10103538 1233 6160 0142 1 30 10103538 1233 6160 0141 2 30 10103538 1233 6160 0142 2 30 10103538 1233 6160 0142 1 30 10103538 1233 6160 0143 1 30 10103538 1233 6160 0145 1 30 10103538 1233 6160 0146 1 Note that in the second test case one line is missing, the one ending in 44. -Iavor Hi Iavor, Sweet, it makes a lot of sense. I haven't tried to run this with ghc-6.6.1, though. Thank you for doing this. Just for curiosity I'll try to find out what exactly fails under 6.6.1, just in case anyone else run into the problem in future (as I don't think they will upgrade the ghc any time soon). I'll eventually ask them to upgrade the ghc version. Any recommendation about which version should I ask for? Thanks, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] why these two are not equivalent?
On Sun, Sep 13, 2009 at 11:34:16AM +0200, Max Rabkin wrote: That is part of the contract of toAscList (the Asc stands for ascending order), but because of the way Map is implemented, the result of toList is also sorted. Cool. It is good to know that toAscList and toList would produce the same output. However, I think the question remains open. Is this piece of haskell code any different (in terms of the output it produces) from the C++ version? Thanks, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] why these two are not equivalent?
Hi, I was trying to solve a simple problem in SPOJ, however, after two weeks trying almost everything I could think of, I was still getting WrongAnswer. Then I decided to do the same thing in C++ and I really got puzzled when I got ACcepted. I tried to understand what was different without success. I hope someone can tell me why spoj says the Haskell version is wrong: http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3583 [Haskell,WA] http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3582 [C++,AC] The problem I'm talking about is this one: https://www.spoj.pl/problems/SBANK/ Thanks, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] why these two are not equivalent?
Looks like the output should be sorted. The C++ version does this with the iterator over mapstring, int implicitly. I don't spot where your haskell version sorts the output. There could be other problems, that's just what I can notice in 2 minutes of looking. Good luck! Jason, I assumed Data.Map was a tree internally and keep elements ordered, so the following would sort the input and print duplicates in O(n log n), as the C++ version does: sbank :: [B.ByteString] - [(B.ByteString,Int)] sbank = toAscList . fromListWith (+) . flip zip (repeat 1) Is it wrong to assume this? It worked for all tests cases I could think of though. Thanks, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Question about Lazy.IO
I'm sure I'm not alone when I say I'd like to see the longer, more technical response. No, you aren't. Please `flood in' :-) -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] oauth in haskell - reviewers?
I've found [obviously] a huge thread about licensing on haskell-c...@. After reading [most] of it, I realized the best thing to do is change the license and start using BSD3. -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell] ANNOUNCE: OAuth library in haskell
Dear Haskellers, hoauth is a library which helps you to deal with oauth protocol. Currently it supports only consumer side applications, but there are plans to add service providers support in near future. The source code can be found at [darcs]: http://projects.bitforest.org/hoauth/ and now in hackage: http://hackage.haskell.org/package/hoauth If you have any questions, comments or criticism, please get in touch with me. I'll appreciate it very much, specially because there are so many things yet to learn. Thanks, PS: This is the first piece of code I produce in Haskell since I've start learning it few months ago. I must say it has been a joy since then. -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
[Haskell-cafe] ANNOUNCE: OAuth library in haskell
Dear Haskellers, hoauth is a library which helps you to deal with oauth protocol. Currently it supports only consumer side applications, but there are plans to add service providers support in near future. The source code can be found at [darcs]: http://projects.bitforest.org/hoauth/ and now in hackage: http://hackage.haskell.org/package/hoauth If you have any questions, comments or criticism, please get in touch with me. I'll appreciate it very much, specially because there are so many things yet to learn. Thanks, PS: This is the first piece of code I produce in Haskell since I've start learning it few months ago. I must say it has been a joy since then. -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] oauth in haskell - reviewers?
Hi Don, no, not really, I completely missed that point. But if that is the case, I presume there is no difference in using other licenses, like BSD3. Is that the case? Thanks, On Mon, Aug 24, 2009 at 02:24:09PM -0700, Don Stewart wrote: I notice hoauth is packaged as LGPL. Since we use static linking in GHC, this makes it in practice GPL. Is that the intent? -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] oauth in haskell - reviewers?
Hi Alex, - In the Token datatype, you can automatically create the accessor functions (oath_token, etc.) by using named fields: I though about that too and I was not sure about what to do. The reason I didn't use it is because I don't export the value constructors of Token type, that is why I created the access functions explicitly. - When you have multiple datatype constructors with similar arguments (as with Token or Request), it may be better to use a Boolean-type flag saying which one it is (e.g. HTTP or HTTPS) and then a single datatype with all of the different arguments in it. This may help you remove code duplication elsewhere. Right, it makes sense. - I think you can use join from Control.Monad and functions from Control.Applicative in your response function to make it quite a bit cleaner. To be honest I'm not familiar with Control.Applicative at all. I'll read about it and see if I can figure how to do this. A quick search pointed me to this: http://www.soi.city.ac.uk/~ross/papers/Applicative.html Is there any other resources you would suggest me to read? Thanks at lot, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] oauth in haskell - reviewers?
Hi all, I wrote a small library in haskell do deal with oauth authentication. It turns out it is my first library in haskell as well. As I'm beginner in haskell, I'm asking for a review of someone more experienced/proficient before even daring to create a cabal pkg and dist it to hackage. :-) Any help/comments on this will be highly welcome. http://projects.bitforest.org/hoauth/ $ darcs get http://projects.bitforest.org/hoauth/ # should do the trick Thanks in advance, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] How To Make It Faster?
Hi, I come up with the following solution for this easy spoj problem (warning!): problem: https://www.spoj.pl/problems/ARITH2/ solution: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=5720#a5720 I'd like to make it run faster, if possible. What should I do to identify the bottlenecks and once I find them, a few guidelines to actually fix them. Thanks in advance, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell progr ammers in São Carlos - SP - Brazil?
Not exactly São Carlos: São Paulo - SP. On Tue, May 19, 2009 at 09:28:55PM -0300, Maurício wrote: Anybody else around here? Best, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B 9ECE F88E 067F E891 651E ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe