staafmeister wrote:
The overhead is a O(1) overhead for the function because it needs to check
if
a computation has already performed. And the space overhead is not so big
because
every data object in memory there are a couple of references to be stored in
lookup tables.
So although there is
How about:
import Data.Time.Calendar
import Data.Time.Calendar.WeekDate
main = do
let (y, w, d) = toWeekDate $ addDays 150 (fromGregorian 2009 8 31)
putStrLn $ show d
2009/8/31 zaxis z_a...@163.com:
addDays 150 (fromGregorian 2009 8 31) will work. However, how can i get its
weekday from
Luke Palmer wrote:
On Fri, Aug 28, 2009 at 6:04 AM, Bulat Ziganshin wrote:
it looks like cache of values computed since the last GC, because on
GC all those intermediate results will be collected. i think it's not
very useful outside of fib example that does exact that - reusing
recently
How about:
import Data.Time.Calendar
import Data.Time.Calendar.WeekDate
main = do
let (y, w, d) = toWeekDate $ addDays 150 (fromGregorian 2009 8 31)
putStrLn $ show d
2009/8/31 zaxis z_a...@163.com:
addDays 150 (fromGregorian 2009 8 31) will work. However, how can i get its
weekday from
Colin == Colin Paul Adams co...@colina.demon.co.uk writes:
Colin I've just installed the Haskell Platform (2009.2.0.2) on
Colin Mac OSX 10.5.6, including GHC 6.10.4.
Colin Then I started added some packahges with cabal install.
Colin But happstack-helpers-0.30 fails with:
toWeekDate meets my need, thank you!
Colin Adams-3 wrote:
How about:
import Data.Time.Calendar
import Data.Time.Calendar.WeekDate
main = do
let (y, w, d) = toWeekDate $ addDays 150 (fromGregorian 2009 8 31)
putStrLn $ show d
2009/8/31 zaxis z_a...@163.com:
addDays 150
Colin == Colin Paul Adams co...@colina.demon.co.uk writes:
Colin == Colin Paul Adams co...@colina.demon.co.uk writes:
Colin I've just installed the Haskell Platform (2009.2.0.2) on
Colin Mac OSX 10.5.6, including GHC 6.10.4.
Colin Then I started added some packahges with cabal
2009/08/30 Eugene Kirpichov ekirpic...@gmail.com:
Here's my version that works in 0.7s for me for a file with 10^7
9's but for some reason gets a 'wrong answer' at SPOJ :)
Maybe it gets a wrong answer because it reads all the input,
regardless of `n`.
--
Jason Dusek
Hi Alistair,
I'm using Takusen to read in static data from an SQLite database and that
works just fine.
My app then needs to read in dynamic data, a set of 4 CSV files, and I had
been using Microsofts ODBC driver with HDBC.ODBC and that worked too.
When I try to swap it for Takusen though
Hi all
I want to define a partial monad transformer i.e not defined for all
kinds of data but the ones that have instances of certain classes.
That is because in my lift instance code there are some hidden use of
these classes.
But because in the MonadTrans definition does not refers to the
Dmitri Sosnik wrote:
How I can tell gcc to generate 32 bit code? I've tried to set
CFLAGS=-m32, but it doesn't work.
(Flags do not work -- without Makefile) Pass
-optc-m32 -opta-m32 -optl-m32
through ghc (as pointed out before) for gcc, the assembler as and the
linker ld resp. (I think, gcc
Hello.
I am porting to Haskell a Java application I have written to manage
collections of movies.
Currently the application has an option to indirectly import movie data
from web pages. For that first the user should access the page in a web
browser. Then the user should copy the rendered text
Hi Andy,
Your program didn't compile as given, so I cut out some of the event
handling fanciness you were doing. Also, my modified version restarts
whenever the 'r' key is pressed. I figure those changes aren't important to
the problem at hand.
Anyway, I don't think it's ever going to be possible
Hello Haskellers,
On Saturday Sunday (28th 29th August) we held a Hackathon in
Edinburgh, before the ICFP got fully underway. If you were there,
thank you for coming.
We'll be writing a summary of what happened soon, and we'd love to
hear what you did. If you started a new project or fixed
Will Donnelly will.donne...@gmail.com writes:
HI Will,
First, thanks for your detail explain.
Hi Andy,
Your program didn't compile as given, so I cut out some of the event handling
fanciness you were
doing. Also, my modified version restarts whenever the 'r'
key is pressed. I figure those
That works here just fine. Thanks!
On Mon, Aug 31, 2009 at 4:02 AM, Christian Maeder
christian.mae...@dfki.dewrote:
Dmitri Sosnik wrote:
How I can tell gcc to generate 32 bit code? I've tried to set
CFLAGS=-m32, but it doesn't work.
(Flags do not work -- without Makefile) Pass
Hello José,
I've done a similar task some weeks ago and I used the Haskell XML
Toolbox (hxt) [1] to do this. After learning how to program with arrows
it was quite easy to write arrows that extract the relevant information
from XML data.
Regards,
Martin.
[1]
José Romildo Malaquias wrote:
Currently the application has an option to indirectly import movie data
from web pages. For that first the user should access the page in a web
browser. Then the user should copy the rendered text in the web browser
into an import window in my application and
Günther Schmidt wrote:
My app then needs to read in dynamic data, a set of 4 CSV files, and I
had been using Microsofts ODBC driver with HDBC.ODBC and that worked too.
When I try to swap it for Takusen though I get an
*** Exception: DBError (HY,C00) 106 [Microsoft][ODBC Text Driver]
On Sun, 2009-08-30 at 18:50 +0400, Eugene Kirpichov wrote:
Thanks :) I wonder why SPOJ didn't accept the same thing from me.
I think that in order to obtain even higher performance we need to
resort to low-level IO: raw reading into a byte buffer and parsing the
very buffer to avoid
Sorry for ressurecting the thread, my I'm having the same problem here.
Deleting the .cabal/config file shows only temporary results, and -v3 isn't
helping:
~/sources/haskell-platform-2009.2.0.2 % cabal update
Config file /home/fernando/.cabal/config not found.
Writing default configuration to
Hi Anton,
well the problem isn't really accessing the data as such, it's quite easy
to use HDBC.ODBC for instance to read in the data in a very comfortable
way.
I was explicitly asking for Takusen because it make certain guarantees
regarding resources, memory consumption and such.
One
Hi all,
recently I had problems getting Takusen ODBC to work with MS-Access on
Win32.
It seems, that the problems originated from Takusens UTF8 code, the path
of the Access Database contains an Umlaut. This even causes problems when
one does not specify a connection String but merely a
Hello,
I would use TagSoup:
http://community.haskell.org/~ndm/tagsoup/
It is was designed for exactly this type of thing.
- jeremy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I got around this problem by downgrading to 6.10.3 (I think I rebuilt cabal
as well)
I'm not sure if the problem is with cabal, GHC, or some 64bit ubuntu
library. (probably a combination of ghc+64bit ubuntu)
Does anybody have ghc 6.10.4 working on 64bit Ubuntu?
- Job
On Mon, Aug 31, 2009 at
I also would like a isStableNameTargetAlive function.
Though if you had such a function then you probably _could_ make a
deRefStableName function, which, since there isn't one, probably means that
such a function would be hard to make.
- Job
On Sun, Aug 30, 2009 at 4:54 PM, Peter Verswyvelen
I recommend qtHaskell.
I am a big fan of Qt in general. It has good documentation and extensive
examples, is very well designed, and has a good license. I'd even say the
C++ version is good choice for beginners (certainly easier to understand/use
than say GTK).
The qtHaskell bindings are also
Hello,
On Mon, Aug 31, 2009 at 3:29 PM, Job Vranishjvran...@gmail.com wrote:
I got around this problem by downgrading to 6.10.3 (I think I rebuilt cabal
as well)
I'm not sure if the problem is with cabal, GHC, or some 64bit ubuntu
library. (probably a combination of ghc+64bit ubuntu)
Does
I've updated Don Stewart's solution to compile with the modern
ByteString libs. I'll be looking at ways to improve the
performance of the `bytestring-nums` package.
--
Jason Dusek
http://github.com/jsnx/bytestring-nums/blob/d7de9db83e44ade9958fb3bfad0b29ede065b5dd/SPOJDons.hs
From lovely Edinburgh, I'd like to invite functional programmers in
The Netherlands to the Dutch Haskell User Group [1, 2] meeting next
Friday at 19:00.
For the first time, we'll have people giving talks! Thomas (noknok)
will be talking about his system for doing propositional logic in
Haskell.
On 31/08/2009, at 9:02 PM, Christian Maeder wrote:
Dmitri Sosnik wrote:
How I can tell gcc to generate 32 bit code? I've tried to set
CFLAGS=-m32, but it doesn't work.
(Flags do not work -- without Makefile) Pass
Stupid me :-)
-optc-m32 -opta-m32 -optl-m32
Yep, it work. Thanks!
On Mon, Aug 31, 2009 at 7:18 PM, Dmitri Sosnikdim...@gmail.com wrote:
On 31/08/2009, at 9:02 PM, Christian Maeder wrote:
Dmitri Sosnik wrote:
How I can tell gcc to generate 32 bit code? I've tried to set
CFLAGS=-m32, but it doesn't work.
(Flags do not work -- without Makefile) Pass
let [y,m,d] = map (\x - read x::Int) $ splitRegex (mkRegex -)
2009-08-31
fromGregorian y m d
Couldn't match expected type `Integer' against inferred type `Int'
In the first argument of `fromGregorian', namely `y'
In the expression: fromGregorian y m d
In the definition of `it': it =
On Mon, Aug 31, 2009 at 9:47 PM, zaxisz_a...@163.com wrote:
let [y,m,d] = map (\x - read x::Int) $ splitRegex (mkRegex -)
2009-08-31
fromGregorian y m d
Couldn't match expected type `Integer' against inferred type `Int'
In the first argument of `fromGregorian', namely `y'
In the
Hm, on my machine Don's code has exactly the same performance my code above.
Also, replacing the 'test' and 'parse' functions with this one
add :: Int - Int - S.ByteString - Int
add k i s = fst $ S.foldl' f (i, 0) s
where f (!i, !n) '\n' | n`divisibleBy`k = (i+1, 0)
|
Hello Job,
Tuesday, September 1, 2009, 1:16:38 AM, you wrote:
I recommend qtHaskell.
how it's in areas of
- memory deallocation when it's no more need - is it automatic or
manual?
- unicode support
- compatibiliy with latest ghc versions - does it build by Cabal or we
need to wait while gurus
thanks!
Luke Palmer-2 wrote:
On Mon, Aug 31, 2009 at 9:47 PM, zaxisz_a...@163.com wrote:
let [y,m,d] = map (\x - read x::Int) $ splitRegex (mkRegex -)
2009-08-31
fromGregorian y m d
Couldn't match expected type `Integer' against inferred type `Int'
In the first argument of
Good work guys.
If you can abstract out a common function for lexing ints out of
bytestrings, we could add it to the bytestring-lexing package.
ekirpichov:
Hm, on my machine Don's code has exactly the same performance my code above.
Also, replacing the 'test' and 'parse' functions with this
38 matches
Mail list logo