Wolfgang Jeltsch <[EMAIL PROTECTED]> writes:
> It made me discover that I use more language extensions than I thought I was
> using.
> I think, it’s a good thing if you have to be clear about what extensions you
> use and what you don’t use. What if someone wants to compile your code with
> a
Hi,
I'm using heap profiling on AMD64, and I am getting some slightly
strange results. Running the profiling, 'top' shows about 600Mb in
use, but the resulting profile shows ~80Mb. Rerunning with -M200M
results in an out-of-memory error.
Could it be that the profile is calculated incorrectly
Ketil Malde <[EMAIL PROTECTED]> writes:
> I've also added results from the 64 bit ghc-6.8.20071011 binary
> snapshot, which shows some nice improvements, with one benchmark
> improving by 30%(!).
One difference between these runs is that the ByteString library, on
which this
Simon Marlow <[EMAIL PROTECTED]> writes:
> Not so much code size, but data size (heap size, to be more
> precise).
Of course.
There was some talk about storing tags in pointers for 6.8, I couldn't
find the reference, but I wonder if that would help my situation?
> It would be interesting to kno
Hi,
I've recently implemented some benchmarks for my library, and while I
expected a slowdown for 64-bit code, I'm a bit bit surprised by the
results. In summary:
with 64 bit ghc 6.6.1, my benchmark runs in ~160 seconds
with 32 bit ghc 6.6, it runs in ~ 95 seconds
Most of the
On Thu, 2007-07-05 at 12:11 -0400, Matthew Danish wrote:
> On Thu, Jul 05, 2007 at 11:15:03AM +0200, Christian Maeder wrote:
> > Is there no way to provide all the extra libs in one debian package for ghc?
> It may be possible to create a "package" which depends on all normal
> "extras" but that
On Fri, 2007-06-01 at 16:00 +0200, TOPE KAREM wrote:
> I opened a notepad and type this program:
>
> main = putStrLn "Hello, Word!"
>
> I saved this file as hello.hs in the same directory GHCi 6.6.1 was
> installed.
You can store it anywhere, as long as GHC is in your search path.
> When I tri
On Sun, 2007-05-20 at 16:59 +0100, Duncan Coutts wrote:
> isSpace c = c == ' ' ||
>c == '\t'||
>c == '\n'||
>c == '\r'||
>c == '\f'||
>
Brian Hulley wrote:
I'm a total linux newbie and am trying to get ghc6.6 installed together
with all the libraries. I'm using Ubuntu linux which uses Debian package
format but has its own repositories which only have ghc6.4.2 at the
moment.
I'm in the same situation, and found it most convenie
Simon Peyton-Jones <[EMAIL PROTECTED]> writes:
> Suppose ghc --full-flag-help simply printed the URL
>
> http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html
Or suppose it did 'system("man ghc")'?
-k
--
If I haven't seen further, it is by standing in the footpr
Serge D. Mechveliani wrote:
On Mon, Nov 13, 2006 at 12:17:07PM +, Simon Peyton-Jones wrote:
The "Maybe.fromJust: Nothing" comes from the library code itself.
The "Nat1" part is simply the name of the binary. It give no clue to
who called fromJust.
I do not understand the whole
"Neil Mitchell" <[EMAIL PROTECTED]> writes:
> I want to benchmark GHC vs some other Haskell compilers, what flags
> should I use?
> [...] I guess the answer is "-O2 -fvia-C"?
I tend to use -O2, but haven't really tested it against plain -O.
>From what I've seen -fvia-C is sometimes faster, somet
Bulat Ziganshin <[EMAIL PROTECTED]> writes:
> 1. Simon suggests that there is a core GHC distribution. it should be
> GHC _compiler_ itself and contains only libraries whose implementation
> are closely tied to compiler version [...]
> 2. For windows-like OSes where users prefer to see larger mon
Marc Weber <[EMAIL PROTECTED]> writes:
> There is already lines. Why not generalise it to take an additional
> parameter '\n' and call it split or splitBy? There are some cases
> where you want to split a list not on '\n'.
Indeed, and in e.g. ByteString and MissingH, there are more functions
of
Doaitse Swierstra <[EMAIL PROTECTED]> writes:
> but when i try to compile lhs2TeX I get the following error message:
> /usr/local/bin/ghc -O -package lang --make -o lhs2TeX Main.lhs [..]
Did you try without the '-package lang'? I think 'ghc --make' is
rather effective at automatically determinin
"Simon Peyton-Jones" <[EMAIL PROTECTED]> writes:
> Brian Hulley wrote:
> | import A.B.C( T1 ) from "foo"
> | import A.B.C( T2 ) from "bar"
> | type S = A.B.C.T1 -> A.B.C.T2
> | I'd suggest that the above should give a compiler error that A.B.C is
> | ambiguous (as a qualifier), rather than
"Brian Hulley" <[EMAIL PROTECTED]> writes:
> because if the suggested syntax is used, import directives come in two
> flavours: ones that use "from" to import from a different package and
> ones that don't use "from" and therefore must refer to the current
> package.
What is the "current package"
Bulat Ziganshin <[EMAIL PROTECTED]> writes:
> IMHO, because PackedString is anyway abstract and DON'T support any way
> to see it's internal representation, any implementation that supports
> full unicode range, would be enough.
Perhaps I'm misrepresenting FPS here, but from my POV, the
represent
Bulat Ziganshin <[EMAIL PROTECTED]> writes:
> sorry for repetition, but ByteString library in its current state
> still don't replaces PackedString in functionality, because it don't
> support full Unicode range of chars
What would be required for it to replace PackedString? (If that is a
goal?)
Simon Marlow <[EMAIL PROTECTED]> writes:
> John Meacham wrote:
>> perhaps if -M is not otherwise set, 'getrlimit(RLIMIT_AS,..)' could be
>> called and the maximum heap size set to just under that
Of course, it is commonly set to 'unlimited' anyway. Perhaps I should
limit it; OTOH, the value mus
Simon Marlow <[EMAIL PROTECTED]> writes:
>> So it used more than double the amount of memory.
> Is it reproducible? I expect that the -M value might be exceeeded by
> a small amount sometimes, but double is surprising.
Yes. That is, I was running multiple instances on different CentOS
computer
Ketil Malde <[EMAIL PROTECTED]> writes:
> 18580 ketil 18 0 1762m 945m 256 D 3.0 93.5 33:52.81 rbr
>
> So it used more than double the amount of memory.
I can provide the source, but perhaps I should mention that the
program basically just builds a large "Map Int
I think I complained earlier about '+RTS -MxxxM' not being respected,
but was unable to reproduce the issue. I just saw this again, my
process was, I thought, limited to 800M heap, but, just before I gave
up and killed the process, 'top' told me:
18580 ketil 18 0 1762m 945m 256 D 3.0 9
Simon Marlow <[EMAIL PROTECTED]> writes:
> Bulat Ziganshin wrote:
>> and moreover, we should perform compaction immediately when swapping grows.
>> imagine for example algorithm that had 80 mb residency and runs on a
>> machine with 100 mb free. performing compacting GC each time when
>> memory u
Simon Marlow wrote:
Hmm yes, this is indeed rather unhelpful. I can explain why it happens,
though. The compiler has lifted out the error case into a top-level
binding:
x = error "Error in array index"
Would the compiler be less agressive with this if I turn off
optimization? I usually
Tomasz Zielonka wrote:
On Tue, Nov 08, 2005 at 02:43:47PM +, Malcolm Wallace wrote:
Of course, there is the old stand-by C pre-processor trick:
#define superError(s) error (s++"\nin file "++__FILE__ \
++" at line "++__LINE__)
There is a nice t
Jan-Willem Maessen <[EMAIL PROTECTED]> writes:
> The practical upshot is that, for a hash table with (say) 24
> entries, the GC must scan an additional 1000 pointers and discover
> that each one is [].
Would a smaller default size help? In my case, I just wanted HTs for
very sparse tables.
> [C
Hi all,
I have a program that uses hash tables to store word counts. It can
use few, large hash tables, or many small ones. The problem is that
it uses an inordinate amount of time in the latter case, and
profiling/-sstderr shows it is GC that is causing it (accounting for
up to 99% of the time
Christian Maeder <[EMAIL PROTECTED]> writes:
> I think, you should
> import qualified Data.Set as Set
> only and use "Set.map" rather than the deprecated "mapSet"
> (most other names from Data.Set make more sense with the "Set." prefix)
I can do this of course, but I think it would be nice t
Lajos Nagy <[EMAIL PROTECTED]> writes:
> On the other hand, it seems intuitively natural to make Set an
> instance of fmap.
Indeed. While I generally like the overloaded, qualified names, I
find it annoying when, like 'map', they clash with Prelude imports.
Which means that, in a module using D
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> I'm slightly inclined not to make this change, but I could be swayed if
> there was enough interest in it. What I'm seeing so far is not
> overwhelming support for the change. Simon PJ is in favour, though.
"a.out" is tradition, of course, but OTOH,
Tomasz Zielonka <[EMAIL PROTECTED]> writes:
> Because of this long syntax and comand-line completion I've even once
> lost the source code. I forgot to remove the .hs at the end of line:
> $ ghc --make Prog -o Prog.hs
If you want, I can tell you about this great version control system
I'm using :
Malcolm Wallace <[EMAIL PROTECTED]> writes:
>> After running it with +RTS -hc, it shows a graph that reaches a
>> peak at around 85mb. However, when i check the memory usage with
>> 'top' i see the application reach over 300mb.
I may be wrong, but I think profiling only tells you the size of liv
Alistair Bayley <[EMAIL PROTECTED]> writes:
I'm no expert, but since nobody else seems to have answered:
> - is my analysis of the space usage correct i.e. allocation in the
> loop function is very short-lived and nothing to worry about?
IME, that would be the typical case.
> - is there anyth
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> We're interested in performance issues with both GHC itself and
> GHC-compiled code.
I can think of a couple of things.
One is the performance of Int64 (which unsurprisingly is inferior to
Int(32) but more surprisingly, also to Integer). I've reporte
Peter A Jonsson <[EMAIL PROTECTED]> writes:
> I read the summary of the survey and noticed you wanted feedback on
> where error messages could be improved.
I have some more comments, but let me say that I'm mostly happy with
the error messages as they are. One thing that occasionally happens
is
Jim Apple <[EMAIL PROTECTED]> writes:
> robert dockins wrote:
>>> Why remove a feature from a product? Why not, instead, just choose
>>> to not use it?
>> Because the feature complicates the product, increases maintainance
>> costs, and keeps the maintainers from working on other things people
>
Marco Morazan <[EMAIL PROTECTED]> writes:
> Do any of you have insight into why GHC uses GMP as opposed to another
> library for arbitrary precision numbers?
Did you have any particular other library in mind? I'm not too
well-versed in this, but I think GMP is fairly efficient, well tested
and
"Amit rohatgi" <[EMAIL PROTECTED]> writes:
> I want to install DARSC and for that i need GHC ..
What architecture? Isn't there a pre-packaged binary version
available that you can use?
> I dont have any old version of Ghc already on the comp so
> i need the *.hc files from any version 6-?-? to
Hi,
Recently, Marcin 'Qrczak' Kowalczyk posted a micro-benchmark on
comp.lang.functional, illustrating performance with statically typed
Int and Integer, and Kogut's dynamically typed automatically-promoted
numbers. (Int is fastest, Kogut second, and Integer quite a bit
slower).
For fun, I tri
Malcolm Wallace <[EMAIL PROTECTED]> writes:
> I think runghc is acting like GHCi, and trying to read the file
> $HOME/.ghci on startup.
I toyed with this, and it seems like runghc is forking off a ghc
process, which then tries to read .ghci (and possibly .inputrc) from
the $HOME directory.
Unfor
Hi,
I'm about to rework an old program, and I am pondering what data
structure to use. Basically, I want to store an index of fixed-length
words (q-grams) with positions, i.e. given a word, I can quickly find
its position in the data.
The data set may be large (gigabytes would be nice), and I a
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> Hmm, I'm not sure that would be practical. Lots of entities are
> exported from more than one place, especially Prelude entities. You'd
> have a table on almost every single page listing Bool, Maybe, Int, etc.
But surely in many cases, it would be po
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> There are some problems with the existing approach. It doesn't cope
> well with instances: instances might refer to types/classes not below
> the current module in the hierarchy. Also you might import an entity
> from a "hidden" module, but actually w
"Santoemma Enrico" <[EMAIL PROTECTED]> writes:
> The problem is: Oracle ODBC driver expects, at least under Windows,
> UCS-2 strings. Then, if the DB is set to UTF-8, it converts the string
> into UTF-8. I'm using HSQL to access ODBC.
Isn't UCS-2 the old 16-bit Unicode representation? So that c
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> It's intentional, but it can be easily turned off. Do people want to
> see feature-requests, task-list entries and so forth on this mailing
> list, or should they be confined to, say, [EMAIL PROTECTED]
I would vote to put them in a separate list. At
I seem to be getting messages from Sourceforge from this mailing
list. Is that an intended use for ghc-users?
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants
___
Glasgow-haskell-users mailing list
Glasgow-haskell-user
Kenny Chamber <[EMAIL PROTECTED]> writes:
> How long after posting should it take for a message to appear on the
> list?
It should be pretty fast, but some lists moderate posts by
non-subscribers. Could this be your problem?
For timing, we could look at your headers:
Date: Thu, 16 Dec
With GHCi, I get:
Prelude Ratio> toRational (1.0/0) :: Ratio Integer
179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150
"Serge D. Mechveliani" <[EMAIL PROTECTED]> writes:
> The library functions like minimum, maximum, should perform in a
> constant space: probably, it is easy to write them his way.
I haven't given it much thought, but it seems that the rather obvious:
Prelude> minimum [1..10^6]
*** Except
MR K P SCHUPKE <[EMAIL PROTECTED]> writes:
> Try type annotations:
[slightly edited to keep the different s's differentiated]
> new_point (s0::s) t b : interleave (next_state s0::s) bs (t:ts)
Hmm...I get:
Inferred type is less polymorphic than expected
Quantified type variable `s'
Hi,
I recently tried to do the following code:
class VertexState s v where
new_point :: s -> v -> v -> v
next_state :: s -> s
-- interleave :: (VertexState s a) => s -> [a] -> [a] -> [a]
interleave s (t:ts) (b:bs) =
new_point s t b : interleave (next_state s) bs (t:ts)
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> For the GPH project, go here:
> http://www.macs.hw.ac.uk/~dsg/gph/
There's also a bit of information in:
http://www.haskell.org/communities/05-2004/html/report.html#gph
-kzm
--
If I haven't seen further, it is by standing in the footprints of gian
Christian Maeder <[EMAIL PROTECTED]> writes:
> We have put a large list in double quotes and used "read" to convert
> the large literal string (too big for hugs, though) into the needed
> list. This reduced compile time drastically, but I don't know how the
> runtime changed. (Also errors can only
Hi,
I've recently tried to compile some data into my program, and suddenly
I realize why people tend to complain about the speed of GHC.
For a benchmark, I'd like to include a bit of data in the form of a
list of integer matrices (i.e. [[[Int]]]). While I have about 1 of
them, sized about t
>| readline
Since you mention readline - I have a rather tiny nit to pick: ghci
happily completes filenames starting with ~ (indicating home
directory), but file operations typically don't grok it.
As I said, hardly an earth shattering show stopper, but a small wart
that might be easy to remove?
David Roundy <[EMAIL PROTECTED]> writes:
> I'd say that rather than returning an Integer, we'd be better off just
> using a 64 bit Int on 64 platforms.
| 7.19.2. GHC's interpretation of undefined behaviour in Haskell 98
|
| This section documents GHC's take on various issues that are left
| undef
Bernard James POPE <[EMAIL PROTECTED]> writes:
> Note each program was compiled with ghc 6.2 with -O2 on debian linux.
:
> main = print $ loop 1 0
Isn't this going to be optimized away to a constant with -O2?
-kzm
--
If I haven't seen further, it is by standing in the foot
Hi,
Am I doing something wrong, or did profiling performance drop an order
of magnitude with GHC 6.2? When I compile my program with '-prof
-auto-all', it takes about ten times as long to run as it does
without. I use -O2 in both cases, and run without any run-time
profiling options switched on
"Simon Marlow" <[EMAIL PROTECTED]> writes:
>>> http://www.haskell.org/~simonmar/io/System.IO.html
> The difference is that the System.IO that comes with GHC is actually
> implemented, rather than just documented :-)
Ah. Drat. You know, it really looks good, and I really could use
efficient fil
MR K P SCHUPKE <[EMAIL PROTECTED]> writes:
> To do the equivalent of the C you could use:
> http://www.haskell.org/~simonmar/io/System.IO.html
Is this documented anywhere? How do I use this?
The Haddoc documentation is a bit sparse.
This seems quite different from the System.IO module
installe
Sébastien Pierre <[EMAIL PROTECTED]> writes:
> I am currently evaluating different languages for implementing an
> application which will have to manipulate large graphs representing
> the structure of programs and their evolution.
> Speed is in fact a crucial criterium for the language choice.
Christian Maeder <[EMAIL PROTECTED]> writes:
> Stack space overflow: current size 1048576 bytes.
> Use `+RTS -Ksize' to increase it.
>
> only when translated with "-O". Is it possible that the next release
> of ghc uses a higher stack size at least when the "-O" flag is set?
> (Only to reduce th
[EMAIL PROTECTED] (Hans Nikolaus Beck) writes:
> type GLVertex = (GLfloat,GLfloat,GLfloat)
>> toVertex :: GLVertex -> Vertex3 GLfloat
>> toVertex :: (a,a,a) -> Vertex3 a
> Yes this works (the first variant). Thanks ! But I must say that I
> have problems to understand
The problem is that you
John Meacham <[EMAIL PROTECTED]> writes:
> The reason I ask is I am writing someting which will generate large case
> statements [over strings] and want to know if I should bother
> pre-optimizing it to [search tries]¹
I've no idea what compilers do, but one quick-and-dirty way to
optimize this c
Joachim Durchholz <[EMAIL PROTECTED]> writes:
>> What I really want is the amount of
>> memory my application can allocate and excercise lively without
>> causing thrashing. On my Linux computer, that amounts more or less to
>> the installed, physical RAM, minus a bit, so I'll settle for that. :-
Glynn Clements <[EMAIL PROTECTED]> writes:
> IIRC, getrlimit(RLIMIT_DATA) doesn't mean much on Linux, as it doesn't
> include memory which is added using mmap(..., MAP_ANON), which is used
> by glibc's malloc(). Also, getrlimit(RLIMIT_RSS) is probably more
> relevant for your purposes.
I also got
Glynn Clements <[EMAIL PROTECTED]> writes:
> What do you mean by "memory size"? How much RAM is installed in the
> system? The amount which the process is currently using? The amount
> which the OS might be willing to allocate to your process at any given
> point in time? Something else?
My aplog
Hi,
Is it possible to detect memory (i.e. RAM, not virtual memory) size
from inside a Haskell program (so that I can keep my program from
growing too large with consequent thrashing)? And if so, to what
degree of portability?
-kzm
--
If I haven't seen further, it is by standing in the footpri
[EMAIL PROTECTED] (Hans Nikolaus Beck) writes:
> in order to build a programming environement, it would be nice to ask
> the GHC about symbols etc found in a given Haskell program.
I suppose a programming environment could talk to GHCi (which provides
commands like :type, :info, :browse to explor
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> Well, in Haskell each character of the string takes 20 bytes: 12 bytes
> for the list cell, and 8 bytes for the character itself
Why does a list cell consume as much as 12 bytes? Two pointers (data
and next) and a 32-bit tag field, perhaps? And a 6
Dylan Thurston <[EMAIL PROTECTED]> writes:
> Right. In Unicode, the concept of a "character" is not really so
> useful;
After reading a bit about it, I'm certainly confused.
Unicode/ISO-10646 contains a lot of things that aren'r really one
character, e.g. ligatures.
> most functions that tradi
"Marcin 'Qrczak' Kowalczyk" <[EMAIL PROTECTED]> writes:
> Fri, 5 Oct 2001 02:29:51 -0700 (PDT), Krasimir Angelov <[EMAIL PROTECTED]> pisze:
>
> > Why Char is 32 bit. UniCode characters is 16 bit.
> No, Unicode characters have 21 bits (range U+..10).
We've been through all this, of cour
"Julian Seward (Intl Vendor)" <[EMAIL PROTECTED]> writes:
> On Linux and probably most Unixes, the text and data segments
> of the executable are loaded page-by-page into memory on
> demand. So having a lot of unused junk in the executable doesn't
> necessarily increase the memory used, either r
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> We don't have support for shared libraries under Unix at the moment. It
> has been investigated at various times in the past, and I believe the
> story is that we couldn't do it without at least losing some performance
Of course, dynamic linking only
"Simon Marlow" <[EMAIL PROTECTED]> writes:
> Ok, I've done the following:
> - disabled the maximum heap
> - RTS options are taken from the GHCRTS environment variable
> in addition to the command line (the command line has precedence).
(I haven't followed this debate closely, so I may
Jan-Willem Maessen <[EMAIL PROTECTED]> writes:
> Absolutely. Good high-level thread support trumps anything provided
> by the operating system.
Unless you have more than one CPU...
> Similar dramatic performance disparities have cropped up in the Java
> community. There are Java benchmarks wh
Hi
I've compiled a program with GHC, but when I run it, it runs
to partial completion (i.e. I get some correct-looking output) and
terminates with:
Fail: Prelude.(!!): index too large
Great. Is there any way I can work out where, exactly, the !! failed?
I only use it with constants (
78 matches
Mail list logo