[Haskell-cafe] ANNOUNCE: UMM-0.3.0

2010-07-11 Thread Uwe Hollerbach
Hi, all, I've just uploaded version 0.3.0 of umm, my small money-manager program, to hackage. This version does nicer plotting of data than before (depends on gnuplot). Have a look if you... errr... like money :-) regards, Uwe ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Re: Haskell and scripting

2010-05-05 Thread Uwe Hollerbach
As the author of haskeem, I'm thrilled that you are considering it, but to be honest I'm not quite sure it's embeddable in the way (I think) you want. If you want to give it a try, though, I'd be more than happy to try to help. best, Uwe On 5/5/10, Limestraël limestr...@gmail.com wrote: Thanks!

Re: [Haskell-cafe] Tokenizing and Parsec

2010-01-11 Thread Uwe Hollerbach
Hi, Günther, you could write functions that pattern-match on various sequences of tokens in a list, you could for example have a look at the file Evaluator.hs in my scheme interpreter haskeem, or you could build up more-complex data structures entirely within parsec, and for this I would point you

Re: [Haskell-cafe] haskell code from hi

2009-11-21 Thread Uwe Hollerbach
Ouch... my condolences, but I think you're screwed. I think the .hi files are purely interface info, and the .o files have all the info on what to actually do (and getting to .hs files from .hi+.o is gonna be like going from sausage to pig, in any case). If you haven't messed with the disk, I

Re: [Haskell-cafe] Parsec bug, or...?

2009-10-15 Thread Uwe Hollerbach
Hi, all, thanks for the further inputs, all good stuff to think about... although it's going to be a little while before I can appreciate the inner beauty of Doaitse's version! :-) I had considered the approach of doing a post-parsec verification, but decided I wanted to keep it all inside the

Re: [Haskell-cafe] Parsec bug, or...?

2009-10-13 Thread Uwe Hollerbach
On 10/12/09, Martijn van Steenbergen mart...@van.steenbergen.nl wrote: Brandon S. Allbery KF8NH wrote: My fix would be to have myPrefixOf require the prefix be terminated in whatever way is appropriate (end of input, white space, operator?) instead of simply accepting as soon as it gets a

[Haskell-cafe] Parsec bug, or...?

2009-10-12 Thread Uwe Hollerbach
a brain fart? Hi, cafe, I've been playing a little bit with a small command processor, and I decided it'd be nice to allow the user to not have to enter a complete command, but to recognize a unique prefix of it. So I started with the list of allowed commands, used filter and isPrefixOf, and was

Re: [Haskell-cafe] Parsec bug, or...?

2009-10-12 Thread Uwe Hollerbach
On 10/12/09, Derek Elkins derek.a.elk...@gmail.com wrote: On Mon, Oct 12, 2009 at 9:28 PM, Uwe Hollerbach uhollerb...@gmail.com wrote: a brain fart? Hi, cafe, I've been playing a little bit with a small command processor, and I decided it'd be nice to allow the user to not have to enter

Re: [Haskell-cafe] How to calculate the number of digits of an integer? (was: Is logBase right?)

2009-08-29 Thread Uwe Hollerbach
a year and a half, I find I still have almost no intuition about performance issues in haskell... guess I have to practice more. Uwe On 8/29/09, Bertram Felgenhauer bertram.felgenha...@googlemail.com wrote: Uwe Hollerbach wrote: Here's my version... maybe not as elegant as some, but it seems to work

Re: [Haskell-cafe] How to calculate de number of digits of an integer? (was: Is logBase right?)

2009-08-26 Thread Uwe Hollerbach
Here's my version... maybe not as elegant as some, but it seems to work. For base 2 (or 2^k), it's probably possible to make this even more efficient by just walking along the integer as stored in memory, but that difference probably won't show up until at least tens of thousands of digits. Uwe

Re: [Haskell-cafe] following up on space leak

2009-07-11 Thread Uwe Hollerbach
Hi, George, thanks for the pointer, it led me to some interesting reading. Alas, the problem which it solves was already solved, and the unsolved problem didn't yield any further... At this point, I've concluded that my interpreter just simply isn't tail-recursive enough: in the Collatz test case

Re: [Haskell-cafe] following up on space leak

2009-07-05 Thread Uwe Hollerbach
On 7/5/09, Paul L nine...@gmail.com wrote: Previously you had lastOrNil taking m [a] as input, presumably generated by mapM. So mapM is actually building an entire list before it returns the argument for you to call lastOrNil. This is where you had unexpected memory behavior. Now you are

Re: [Haskell-cafe] following up on space leak

2009-07-05 Thread Uwe Hollerbach
On 7/5/09, Alexander Dunlap alexander.dun...@gmail.com wrote: On Sun, Jul 5, 2009 at 7:46 PM, Uwe Hollerbachuhollerb...@gmail.com wrote: On 7/5/09, Paul L nine...@gmail.com wrote: Previously you had lastOrNil taking m [a] as input, presumably generated by mapM. So mapM is actually building an

[Haskell-cafe] following up on space leak

2009-07-04 Thread Uwe Hollerbach
Good evening, all, following up on my question regarding space leaks, I seem to have stumbled across something very promising. I said I was using this tiny function lastOrNil to get the last value in a list, or the empty (scheme) list if the haskell list was empty. The uses of it were all of the

Re: [Haskell-cafe] following up on space leak

2009-07-04 Thread Uwe Hollerbach
On 7/4/09, Marcin Kosiba marcin.kos...@gmail.com wrote: On Saturday 04 July 2009, Uwe Hollerbach wrote: Good evening, all, following up on my question regarding space leaks, I seem to have stumbled across something very promising. I said I was using this tiny function lastOrNil to get the last

[Haskell-cafe] space leak hints?

2009-07-03 Thread Uwe Hollerbach
Good evening, all, I wonder if I could tap your collective wisdom regarding space leaks? I've been messing about with haskeem, my little scheme interpreter, and I decided to see if I could make it run reasonably space-efficiently. So far... no. Here's what I tried: I wrote a tiny scheme program

[Haskell-cafe] Announce: haskeem 0.7.0 uploaded to hackage

2009-06-06 Thread Uwe Hollerbach
Hi, all, a little while ago I uploaded haskeem 0.7.0 to hackage: this is my small scheme interpreter. I had been busy with other important stuff for a while, and hadn't worked on it for a while; but I've now updated it to build ok with ghc 6.10.3 + haskeline, plus I added a simple macro system;

[Haskell-cafe] (Pre-) Announce: Data.GDS 0.1.0

2009-06-01 Thread Uwe Hollerbach
Hello, all, I'm hereby announcing Data.GDS, a small module to write and (eventually -- that's part of the pre) read GDS files. For those of you not in the semiconductor biz, GDS-II is one of the classic formats of the industry. It's perhaps ever so slightly obsolete at this point, as the OASIS

Re: [Haskell-cafe] Runge-Kutta and architectural style

2009-05-02 Thread Uwe Hollerbach
Hi, Richard, these are interesting suggestions, I may explore them a bit. I tried initially to make something that would be usable without too much pain for small-to-medium problem, and that could be used, albeit with a performance hit, for a larger problem; but I'm sure I am nowhere near what

Re: [Haskell-cafe] ANNOUNCE: Runge-Kutta library -- solve ODEs

2009-04-21 Thread Uwe Hollerbach
That sounds fine... I think I'll pick Numeric. RungeKutta. I'll change it when I've cabalized hackage-ized this puppy... Uwe On 4/20/09, Alexander Dunlap alexander.dun...@gmail.com wrote: It would also be nice if you could plug it into the hierarchical module system somewhere, perhaps

[Haskell-cafe] ANNOUNCE: Runge-Kutta library -- solve ODEs

2009-04-19 Thread Uwe Hollerbach
Hello, all, I'm pleased to announce a small Runge-Kutta library for numerically solving ordinary differential equations, which I'm hereby unleashing upon an unsuspecting world. The README is as follows: This is a small module collecting about a dozen Runge-Kutta methods of different

Re: [Haskell-cafe] ANNOUNCE: Runge-Kutta library -- solve ODEs

2009-04-19 Thread Uwe Hollerbach
Thanks, Martijn, glad to hear it's working for you too. I'll see what I can do about cabal+hackage... Uwe On 4/19/09, Martijn van Steenbergen mart...@van.steenbergen.nl wrote: Hi Uwe, Uwe Hollerbach wrote: I have so far only tested it with ghc 6.8.3 on MacOS 10.3.9 (powerPC), but I know

Re: [Haskell-cafe] ANNOUNCE: Runge-Kutta library -- solve ODEs

2009-04-19 Thread Uwe Hollerbach
Damn, I never thought of that. Sorry! Guess I've only been haskell-hacking on my little old iMac... A new version is attached, with the version number bumped up by 0.0.1 and rungekutta.hs renamed to RungeKutta.hs. Hopefully it should work out-of-the-box now. Off to patch my repository... Uwe On

Re: [Haskell-cafe] build recent(ish) ghc on macos 10.3.9 powerpc?

2008-03-18 Thread Uwe Hollerbach
Hello, haskellers, a few days ago I had asked about building recent ghc on macos 10.3.9. I have made a bit of progress along those lines, here's a small update on what worked and what didn't. Instead of trying to proceed with the porting procedure, I went back to an install: I ended up going to

Re: [Haskell-cafe] build recent(ish) ghc on macos 10.3.9 powerpc?

2008-03-16 Thread Uwe Hollerbach
] wrote: On Sat, Mar 15, 2008 at 2:04 PM, Uwe Hollerbach [EMAIL PROTECTED] wrote: Hi, all, I have an old iMac G3, running OSX 10.3.9, to which I have a sentimental attachment. I'd like to get ghc running on it, but the pre-built binaries I can find are all for more-recent iMacs, so I

[Haskell-cafe] build recent(ish) ghc on macos 10.3.9 powerpc?

2008-03-15 Thread Uwe Hollerbach
[Augh! gmail won't send! Apologies if this shows up more than once...] Hi, all, I have an old iMac G3, running OSX 10.3.9, to which I have a sentimental attachment. I'd like to get ghc running on it, but the pre-built binaries I can find are all for more-recent iMacs, so I thought I would try to

Re: [Haskell-cafe] how to catch keyboard interrupts?

2008-02-24 Thread Uwe Hollerbach
Thanks, I'll try that. -- Uwe On 2/24/08, Ryan Ingram [EMAIL PROTECTED] wrote: This is pretty cool, but I have one warning: On Sat, Feb 23, 2008 at 4:37 PM, Uwe Hollerbach [EMAIL PROTECTED] wrote: data MyInterrupt = MyInt Int instance Typeable MyInterrupt where typeOf x

[Haskell-cafe] how to catch keyboard interrupts?

2008-02-23 Thread Uwe Hollerbach
Hi, all, I am continuing to mess with my little scheme interpreter, and I decided that it would be nice to be able to hit control-C in the middle of a long-running scheme computation to interrupt that and return to the lisp prompt; hitting control-C and getting back to the shell prompt works, but

Re: [Haskell-cafe] how to catch keyboard interrupts?

2008-02-23 Thread Uwe Hollerbach
Thanks, Bulat, I'll look into this! On 2/23/08, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Uwe, Saturday, February 23, 2008, 11:35:35 PM, you wrote: mysighandler = Catch (do hPutStrLn stderr caught a signal! fail Interrupt!) scheme calculation doesn't get

Re: [Haskell-cafe] how to catch keyboard interrupts?

2008-02-23 Thread Uwe Hollerbach
On 2/23/08, Bulat Ziganshin [EMAIL PROTECTED] wrote: [about my question about keyboard interrupts] you should store thread id of thread running interpreter and send async exception to it. control.concurrent is probably contains all required functions Most splendid! Here's what I did

Re: [Haskell-cafe] fast integer base-2 log function?

2008-02-15 Thread Uwe Hollerbach
Yes, I suspect you are right. I didn't look into that in much detail, although I did try exchanging (2 ^ 5000) with (1 `shiftL` 5000); but that didn't make any difference. Uwe On Fri, Feb 15, 2008 at 9:21 AM, Ryan Ingram [EMAIL PROTECTED] wrote: On Thu, Feb 14, 2008 at 8:23 PM, Uwe

Re: [Haskell-cafe] fast integer base-2 log function?

2008-02-14 Thread Uwe Hollerbach
Hi, all, a few days ago I had asked about fast integer log-2 routines, and got a couple of answers. I've now had a chance to play with the routines, and here's what I found. Initially, Thorkil's routine taken from the Haskell report was about 30% or so faster than mine. When I replaced the calls

Re: [Haskell-cafe] A question about monad laws

2008-02-12 Thread Uwe Hollerbach
On Feb 12, 2008 6:12 AM, Jan-Willem Maessen [EMAIL PROTECTED] wrote: On Feb 12, 2008, at 1:50 AM, David Benbennick wrote: On Feb 11, 2008 10:18 PM, Uwe Hollerbach [EMAIL PROTECTED] wrote: If I fire up ghci, import Data.Ratio and GHC.Real, and then ask about the type of infinity

Re: [Haskell-cafe] A question about monad laws

2008-02-11 Thread Uwe Hollerbach
Ratio Integer may possibly have the same trouble, or maybe something related. I was messing around with various operators on Rationals and found that positive and negative infinity don't compare right. Here's a small program which shows this; if I'm doing something wrong, I'd most appreciate it

Re: [Haskell-cafe] fast integer base-2 log function?

2008-02-11 Thread Uwe Hollerbach
) in doDiv (x`div`(b^l)) l Best regards Thorkil On Monday 11 February 2008 07:15, Uwe Hollerbach wrote: Hello, haskellers, Is there a fast integer base-2 log function anywhere in the standard libraries? I wandered through the index, but didn't find anything that looked

[Haskell-cafe] fast integer base-2 log function?

2008-02-10 Thread Uwe Hollerbach
Hello, haskellers, Is there a fast integer base-2 log function anywhere in the standard libraries? I wandered through the index, but didn't find anything that looked right. I need something that's more robust than logBase, it needs to handle numbers with a few to many thousands of digits. I found

Re: [Haskell-cafe] background question about IO monad

2008-02-07 Thread Uwe Hollerbach
Thanks, I'm going to have to study this a bit... Uwe On 2/7/08, Ryan Ingram [EMAIL PROTECTED] wrote: On 2/6/08, Uwe Hollerbach [EMAIL PROTECTED] wrote: And, coming back to my scheme interpreter, this is at least somewhat irrelevant, because, since I am in a REPL of my own devising, I'm

Re: [Haskell-cafe] background question about IO monad

2008-02-06 Thread Uwe Hollerbach
Hi, all, thanks for the responses. I understand the distinction between pure functions and impure functions/procedures/IO actions, it just felt to me in the samples that I quoted that I was in fact starting from basically the starting point, eventually getting to the same endpoint (or at least a

Re: [Haskell-cafe] background question about IO monad

2008-02-06 Thread Uwe Hollerbach
Well, you may well be right! Just think of me as a planarian at the opera... :-) On 2/6/08, Jonathan Cast [EMAIL PROTECTED] wrote: On 6 Feb 2008, at 7:30 PM, Uwe Hollerbach wrote: Hi, all, thanks for the responses. I understand the distinction between pure functions and impure functions

Re: [Haskell-cafe] background question about IO monad

2008-02-06 Thread Uwe Hollerbach
All right, after a bit of dinner and some time to mess about, here's another attempt to check my understanding: here is a simplified version of the lisp-time example: module Main where import System.Time pure_fn :: Integer - String pure_fn n = calendarTimeToString (toUTCTime (TOD n 0))

[Haskell-cafe] background question about IO monad

2008-02-05 Thread Uwe Hollerbach
Hello, haskellers, I have a question for you about the IO monad. On one level, I seem to be getting it, at least I seem to be writing code that does what I want, but on another level I am almost certainly not at all clear on some concepts. In various tutorials around the web, I keep finding this

[Haskell-cafe] more haskeem: it's just scheme in haskell now, no more almost

2008-02-03 Thread Uwe Hollerbach
contradict you. Anyway, I've fixed it by simply putting copies into both places. regards, Uwe Hollerbach ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] haskeem -- (almost) scheme in haskell

2008-01-22 Thread Uwe Hollerbach
surf over to http://www.korgwal.com/software/haskeem/index.html. Feedback welcome! best regards, Uwe Hollerbach ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe