Re: [Haskell-cafe] Unable to profile program using Data.ByteString.Lazy
lists: > Donald Bruce Stewart wrote: > >Probably you didn't build fps with profiling as well? You can rebuild > >fps with: > >runhaskell Setup.hs configure -p > >as the first step. > > > >-- Don > > > > Thanks, I'll try it. Does that mean when I want to optimize my program, > I'll need to rebuild fps without profiling? > > - Lyle If you build a cabalised project with the -p flag to configure, you get both the profiled and normal versions. You won't need to rebuild after that. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Unable to profile program using Data.ByteString.Lazy
Donald Bruce Stewart wrote: Probably you didn't build fps with profiling as well? You can rebuild fps with: runhaskell Setup.hs configure -p as the first step. -- Don Thanks, I'll try it. Does that mean when I want to optimize my program, I'll need to rebuild fps without profiling? - Lyle ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Writing forum software in Haskell
David House wrote: Hi all. The recent thread on email vs. forums inspired a bit of interest to get some forum software on haskell.org. Were we to go ahead with this, I think it'd be great to have this software written in Haskell itself. [snip] * What kind of forum are we aiming at? In my eyes, it'd be less like the bloated phpBBs out there full of oversized signatures and avatars, and more like the minimalistic bbPress on show at, for example, the WordPress support forums [1]. * What would be a compulsory feature list? 1) I think anyone who posts should first have to register to avoid the problem of spam. 2) I think it would be good if it was possible to get away from the usual tree structure of posts. By this I mean that usually you have to choose a post to reply to, which is awkward if you want to comment on more than one previous post because then it's not clear what post to choose as the "parent". As a rough idea, perhaps something which considered paragraphs(*) as the basic unit of discourse ie data Post = Post {_author :: !Author, _time :: !Time, _topic :: !Topic, _paras :: ![PostPara]} data PostPara = Own !Paragraph | Quoted !PostPara !Author !Time !Topic data Paragraph = Text !ByteString | Code !ByteString and I'd imagine posts being edited using an editor which displayed a vertical sequence of PostPara's (ie edit boxes for the paragraphs you've written yourself and some other widget involving a static text box to display paras that you're quoting) Multiple consecutive paras that you write yourself would just be written in the same edit box. Actually the whole post could be written in one edit box if there was a special escape syntax for quoting (you'd select some text in some other post then click "quote" and it would be pasted into the post you're composing surrounded by the appropriate escape sequences and source info, and like the wiki editor, you could click preview to see how the whole thing would look when posted). This would give full support for DAG based discussions. (At the moment in the mailing list if I want to reply to more than one person I have to click "reply" on each email I'm replying to and cut and paste the indented text from the second person's email into my reply to the first and hope that I don't accidentally send the second blank reply by mistake, and if someone has chosen to include a signature with their message or sent it using HTML instead of plain text I have to manually indent each individual line myself because Outlook Express doesn't display the text of signed messages but instead puts it into a file like ATT12.txt...) (*) Of course the above representation doesn't give any way to only quote part of a paragraph or to split paragraphs up so it might be too inflexible. It might also not be clear what should be regarded as a paragraph. Perhaps "span of text" would be a better "unit of discourse". 3) It would be nice if there was a way to put something in the "centre" to be discussed from different angles, instead of always being stuck with a linear flow, where important points made in previous posts can just get ignored altogether because they are too far back in linear time. The scenario I'm thinking of is: 3a) Person A makes 2 good points, A1 and A2 3b) Person B replies to A1 3c) Person C replies to B's reply of A1 3d ) Long discussion about A1 3e) A2 has completely been forgotten and is never addressed I'm imagining a visual representation of the text in the centre with the discussion around it though perhaps this is getting too complicated for what's possible just with HTML. 4) Another nice feature would be the ability to just say "cool" or "yes" or "no" without having to actually make a real post like a kind of vote for or against an idea. Anyway best of luck with whatever forum people come up with. I originally used to post to the mailing list using the Google group fa.haskell (strange name!!!) but though I liked the Google interface the posting didn't work properly - my posts were delayed several days and sometimes never got there at all. Regards, Brian. -- Logic empowers us and Love gives us purpose. Yet still phantoms restless for eras long past, congealed in the present in unthought forms, strive mightily unseen to destroy us. http://www.metamilk.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: FFI and LD_PRELOAD -> segfault
On Sun, 24 Sep 2006 21:37:32 +0300, Anatoly Zaretsky wrote: >ghc -Wall -optl "-shared" -o libtestffi.so \ > hsinit.c testffi.o testffi_stub.o Ok, that is even shorter. And it seems you don't have to call hs_add_root() or hs_exit(). At least for me it works with this hsinit.c: #include static void __attribute__ ((constructor)) my_init(void) { hs_init(0, 0); } I put everything I've figured out so far on my wiki: http://stephan.walter.name/Overriding_shared_libraries_with_Haskell Warning: I'm a complete Haskell newbie, but I appreciate comments! -Stephan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Writing forum software in Haskell
On Sun, 24 Sep 2006 13:20:54 +0100, "Sebastian Sylvan" <[EMAIL PROTECTED]> said: > On 9/24/06, David House <[EMAIL PROTECTED]> wrote: [...] > > * What would be a list of things to avoid like the plague? > > Too many formatting options (italic and bold should do it), avatars, sigs > etc. As text is more pleasant to read in proportional fonts, and code in monospaced fonts, I think a "code" formatting option is important to have. Some kind of TeX-based math markup could also be a useful addition, given Haskell's ties to formal computer science. Max Strini -- http://www.fastmail.fm - The professional email service ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: FFI and LD_PRELOAD -> segfault
On 9/24/06, Stephan Walter <[EMAIL PROTECTED]> wrote: gcc -g -Wall -I/usr/lib/ghc-6.4.2/include -c -o hsinit.o hsinit.c or ghc -c hsinit.c or even ghc -Wall -optl "-shared" -o libtestffi.so \ hsinit.c testffi.o testffi_stub.o Could anybody familiar with ghc linking details comment on this constructor/destructor thing so that we can add a wiki about building shared objects? -- Tolik ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: FFI and LD_PRELOAD -> segfault
On Sun, 24 Sep 2006 20:20:55 +0300, Anatoly Zaretsky wrote: > #include > > extern void __stginit_Socks(void); > > static void __attribute__ ((constructor)) my_init(void) { > int argc = 1; > char *argv[] = {"Haskell shared object"}; > char **argvp = argv; > hs_init(&argc, &argvp); > hs_add_root(__stginit_Socks); > } > > static void __attribute__ ((destructor)) my_fini(void) { > hs_exit(); > } That solved it! If anyone wants to do the same: I put the code you gave above in hsinit.c, and compiled everything with: ghc -Wall -c -fffi testffi.hs gcc -g -Wall -I/usr/lib/ghc-6.4.2/include -c -o hsinit.o hsinit.c ghc -Wall -optl "-shared" -o libtestffi.so \ hsinit.o testffi.o testffi_stub.o Then, using LD_PRELOAD with the test program worked fine. Thanks a lot! -Stephan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FFI and LD_PRELOAD -> segfault
On 9/23/06, Stephan Walter <[EMAIL PROTECTED]> wrote: I'm trying to use a shared lib written in Haskell to overload C functions via LD_PRELOAD. [snip] This aborts with a segfault in scheduleWaitThread() from ./libtestffi.so The test program doesn't use threads, so I'm wondering what I did wrong? From http://www.haskell.org/ghc/docs/latest/html/users_guide/sec-ffi-ghc.html#using-own-main: The call to hs_init() initializes GHC's runtime system. Do NOT try to invoke any Haskell functions before calling hs_init(): strange things will undoubtedly happen. If you are using gcc you can add something like this when linking libtestffi.so: #include extern void __stginit_Socks(void); static void __attribute__ ((constructor)) my_init(void) { int argc = 1; char *argv[] = {"Haskell shared object"}; char **argvp = argv; hs_init(&argc, &argvp); hs_add_root(__stginit_Socks); } static void __attribute__ ((destructor)) my_fini(void) { hs_exit(); } -- Tolik ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Writing forum software in Haskell
On 24/09/06, David House <[EMAIL PROTECTED]> wrote: WordPress support forums [1]. Forgot to reference this. http://wordpress.org/support -- -David House, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Writing forum software in Haskell
On 9/24/06, David House <[EMAIL PROTECTED]> wrote: Hi all. The recent thread on email vs. forums inspired a bit of interest to get some forum software on haskell.org. Were we to go ahead with this, I think it'd be great to have this software written in Haskell itself. I'd also love to be involved in a collaboration should one be drummed up to write this kind of thing. I might be able to contribute some on my spare time. Therefore, my questions: * What kind of forum are we aiming at? In my eyes, it'd be less like the bloated phpBBs out there full of oversized signatures and avatars, and more like the minimalistic bbPress on show at, for example, the WordPress support forums [1]. I'd like a very lightweight forum when it comes to the "community" aspects. I.e. no signatures, no avatars, or anything like that. Just usernames and posts. Probably allow non-registered messages with the option for anyone registered to remove it (say, by having two registered people clicking "remove" - thus reducing spam/troll problems that you get without registration). Perhaps private messages, but it's probably better to have an "email proxy" system where private messages get sent via email through the forum+username. For the forum itself I'd like it to be more easily accessible than phpBB etc. So a threaded interface where you can see the first post in each thread (or perhaps just the first couple of lines of the first post). If you click a post you would see the titles for all of the child posts appear in a tree structure underneath (without reloading the forum!). Now, clicking any of these should show the full post, without reloading. Similar to gmail, in other words, but with better support for threading (e.g. allow branches). Much quicker and easier to navigate than forums based on reloading the webpage. The key is that you shouldn't have to wait for a full page reload everytime you want to do something. This system (or similar) is used on some web sites (e.g shacknews.com in the comments section) and leads to a very lightweight discussion forum. A mixture between real-time chat and mailing lists. Also there would be different categories, "newbies", "general", etc. * What would be a list of things to avoid like the plague? Too many formatting options (italic and bold should do it), avatars, sigs etc. * Which web platform (HAppS, Hope, ...) would make the most appropriate target? Not sure. I guess that depends on what type of forum you end up building. Hope looks promising. -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Writing forum software in Haskell
Hi all. The recent thread on email vs. forums inspired a bit of interest to get some forum software on haskell.org. Were we to go ahead with this, I think it'd be great to have this software written in Haskell itself. I'd also love to be involved in a collaboration should one be drummed up to write this kind of thing. Therefore, my questions: * What kind of forum are we aiming at? In my eyes, it'd be less like the bloated phpBBs out there full of oversized signatures and avatars, and more like the minimalistic bbPress on show at, for example, the WordPress support forums [1]. * What would be a compulsory feature list? * What would be a list of things to avoid like the plague? * Which web platform (HAppS, Hope, ...) would make the most appropriate target? Appreciate thoughts and opinions. -- -David House, [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] haskell.org down
Haskell.org has been down for over 7 hours (see attached log). The Web master might use host-tracker.com (or a similar free tracking service) to keep an eye on it. Regards, titto From: HostTracker Notifier [mailto:[EMAIL PROTECTED] Sent: 24 September 2006 10:41 To: [EMAIL PROTECTED] Subject: Operation Restored Alert Hello, http://haskell.org is now back to normal. Operation restored at 2006-09-24 10:36:55. Url was down as a resultat of: Http error:Http_client.No_reply Error was detected at 2006-09-24 03:36:16 Downtime total 7 hour(s) 39 sec(s). Check failures total: 14. Your login:titto -- Best regards, http://host-tracker.com/ support team uid:957058 tid:188350 eid:188350-61-0-0-669df3829d00102989dd000c7651f68b ffeid:188350-47-0-0-a2bced5e9cc5102989dd000c7651f68b ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe