jlouis has quit [Read error: 110 (Connection timed out)]
<diakopter>
junis: I have not used it, but I'm interested in taking a look at it as a potential part of an AST transformer engine.
<diakopter>
oh, junis left.
seafoodX has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
romanoffi has joined #ocaml
david_koontz has quit ["Leaving"]
Smerdyakov has quit ["Leaving"]
diakopter has left #ocaml []
pango has quit ["I shouldn't really be here - dircproxy 1.0.5"]
pango has joined #ocaml
G_ has joined #ocaml
G has quit [Read error: 110 (Connection timed out)]
screwt8 has joined #ocaml
l_a_m has joined #ocaml
pango has quit [Excess Flood]
pango has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has quit ["time to impregnate a moth"]
pantsd has joined #ocaml
joshcryer has quit [Read error: 104 (Connection reset by peer)]
haelix has quit ["Lost terminal"]
buluca has quit ["Leaving."]
seafoodX has quit []
thesoko has quit [Remote closed the connection]
thesoko has joined #ocaml
G_ has quit [heinlein.freenode.net irc.freenode.net]
eroyf has quit [heinlein.freenode.net irc.freenode.net]
TaXules_ has quit [heinlein.freenode.net irc.freenode.net]
svenl has quit [heinlein.freenode.net irc.freenode.net]
fremo has quit [heinlein.freenode.net irc.freenode.net]
mellum has quit [heinlein.freenode.net irc.freenode.net]
G_ has joined #ocaml
eroyf has joined #ocaml
TaXules_ has joined #ocaml
svenl has joined #ocaml
mellum has joined #ocaml
fremo has joined #ocaml
jlouis_ has quit ["leaving"]
jlouis has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
G_ is now known as G
seafoodX has joined #ocaml
pantsd has quit [Read error: 104 (Connection reset by peer)]
pantsd has joined #ocaml
<TFK>
Is it possible to define a step for a for loop?
<ppsmimou>
nope
Demitar has quit [Read error: 113 (No route to host)]
jlouis has quit ["brb"]
jlouis has joined #ocaml
<TFK>
I'm getting peculiar profiling results - the list is topped by camlPondmlgslgenome__entry, and my main function - camlPondmlgslgenome__main_190 - is apparently called 484150492 times.
<rjones>
main is just the name of a function, it has no special features as in C
<flux>
tfk, you don't call main recursively?
<TFK>
flux, nope.
<TFK>
rjones, well, yes, but it has a very special feature in my code - being code exactly once to run the program :-)
<TFK>
(2nd code=run)
<rjones>
ho hum .. is this gprof or ocamlprof?
<flux>
sounds gprof to me?
<flux>
with the mangled symbols..
_blackdog has joined #ocaml
_blackdog has left #ocaml []
<TFK>
ja, gprof
<flux>
all I'm thinking is that the optimization messes up the picture
<flux>
however, if you can replicate the problem with a smaller test piece, someone might be interested in that in the form of a bug report..
<TFK>
Well, I profiled this program before.
<TFK>
Although I ran it for much less iterations!
<flux>
aha
<flux>
tfk, could you have an old profiling file around?
<flux>
for a previous exectuable
<flux>
-> offsets messed up
<TFK>
That is a theoretic possiblity. you're saying the dump file was possibly not overwriten?
<flux>
I think it's be design not overwritten, as to allow many runs
<flux>
s/be/by/
<TFK>
I think I did run it on the wrong executable! Bah!
<TFK>
Thank you ^_^;;
<flux>
happy to help ;)
<TFK>
caml_copy_double takes almost 10% of the runtime, and it seems to be neccesary for GSL's random float point. Hmmm.
<TFK>
Maybe by chance somebody knows: in GSL (or in PRNGs in general), which is more costly - getting a random int or a random float?
<TFK>
n/m, I'll just time it
<TFK>
Yup, floats cost more.
Kurin has quit ["leaving"]
seafoodX has quit []
<TFK>
What's is an object's overhead in general? For example, an Int64 has 8 bytes of data, and how many bytes of anything else?
<flux>
They are boxed (except for certain special cases (arrays? float-record), so it's one pointer to the value and the actual value
<TFK>
What about GC information?
slipstream has joined #ocaml
<flux>
I _think_ gc works like "if the lowest bit is a, follow, if not, don't"
<flux>
I suppose block lengths must be somewhere too
<flux>
s/\ba\b/A/
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
<rjones>
TFK, one word per memory block
<rjones>
ints are stored as i << 1 | 1
<rjones>
the word contains a tag, GC bits, length
<TFK>
And the pointer?
<rjones>
it's all explained in <caml/mlvalues.h>
<rjones>
pointers are stored as pointers (lsb = 0)
<rjones>
there are three types of objects, distinguished by the least significant two bits:
<rjones>
x1 = int
<rjones>
00 = pointer
<rjones>
10 = exception
<TFK>
Hmmm.
<TFK>
I think I just might read that. Thanks :-)
seafoodX has joined #ocaml
<rjones>
(exceptions are pointers however so the GC only looks at the single lsb)
<pango>
the problem I see with his API is that it uses single strings for element's bodies... on 32 bits archs, that means you can't handle files larger than 16MB
<abez>
this limit is pretty annoying
<abez>
it isn't 1994 anymore
<abez>
I had a similar problem with camlimages
<abez>
the guy used an ocaml string of the raw pixels and sent that off to pnglib
<abez>
so you could make big png
<psnively_>
Eh. Their point is that it's not 1994 anymore, too, i.e. upgrade to a 64-bit platform.
psnively_ is now known as psnively
<pango>
and on 64bits, in still means you have to store each file in memory, which can become a problem in itself
<psnively>
Yeah, you really want to stream blocks.
<pango>
maybe one should add an alternate function that takes a "give me more data" callback argument
<pango>
or something like that
<psnively>
Right.
<abez>
psnively: your point is fine if you have only 1 computer to upgrade. Upgrading a cluster on the other hand is not.
<psnively>
Or use Oleg's delimited continuations. :-)
<psnively>
abez: 64-bit platforms have been available for a decade, so you've bad plenty of time (yes, I'm speaking tongue-in-cheek). ;-)
<pango>
or that takes a lazy list of strings
<TFK>
How come strings are limited to 16 MB only?
<pango>
TFK: they're stored as memory blocks, that are prefixed with a single word containing content type (8 bits ?), and GC bits (2 bits to encode the 3 colors), and what's left (22 bits on 32 bit archs) to store memory block size in words
<jlouis>
TFK: A string is probably represented by a Tag+Data where the Tag has 8 bit for the garbage collector and 24 bit for the Data size on the 32-bit arch
<jlouis>
oh, close
<pango>
so memory blocs are limited to 2^22 - 1 words
<TFK>
Ah, right, should've deduced that from rjones' preview earlier ^_^;
<pango>
they developed ocaml on a 64bits architecture, and just downsized the size field for the 32bits port...
<jlouis>
Alpha?
<pango>
not sure... I read that a long time ago, and can't find the link atm
junis has quit [Read error: 110 (Connection timed out)]
CRathman has joined #ocaml
<CRathman>
newbie question: I'm getting an error (The method new_test has type 'a -> test where 'a is unbound) on something like the following:
<CRathman>
class test x =
<CRathman>
object (self)
<CRathman>
method new_test y = new test y
<CRathman>
end
<CRathman>
so how do you set the type for a method that is returning a new object of the same type?
<flux>
class ['a] test (x:'a) = object (self) method new_test y = new test y end
<flux>
so that wasn't really the problem: even class test x = object method get_x = x end would've failed
<CRathman>
thanks flux
_blackdog has joined #ocaml
_blackdog has left #ocaml []
ygrek has quit ["Leaving"]
postalchris has joined #ocaml
joshcryer has joined #ocaml
psnively has joined #ocaml
psnively_ has joined #ocaml
xtacy[] has joined #ocaml
magicjm has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
<magicjm>
hi
<magicjm>
(fr) je voudrais déclarer un type produit contenant un type fonction polymorphe, je ne sais pas comment, j'ai testé ceci, mais ça ne fonctionne pas :
<magicjm>
(en) i would like to make a new type with a polymorphic function, i don't know how, i tried this but it doesn't work :
<magicjm>
type t = {f : 'a -> 'a};;
<magicjm>
is there anybody here ?
<flux>
you mean: type t = { f : 'a. 'a -> 'a }
<flux>
OR
<flux>
type 'a t = { f : 'a -> 'a }
<magicjm>
hum
<flux>
perhaps the first one, if you really want a polymorphic function, and not a polymorphic type
<flux>
of course, in that case 'a -> 'a is a pretty useless function
<flux>
(perhaps its side-effects or non-termination aren't useless)
<magicjm>
probably. in fact i wanted to know it for camllight (sorry) and the first doesnt work with camlllight
<flux>
I don't know if camllight can do that.. infact I know nothing of camllight.
<magicjm>
perhaps can you explain me what «'a.» exactly means in «type t = { f : 'a. 'a -> 'a }» ?
<magicjm>
so that i may find how to do the same in camllight
psnively_ has quit []
psnively has quit [Read error: 110 (Connection timed out)]
<magicjm>
and, i wanted to "include" a file as in camllight (ie approximatively the same effect as copy paste) but in ocaml. i know how to compile and so, but i like the interactive use.
<magicjm>
but i dont know the function to include a file (as «include "main.ml";;»)
<pango>
it's not a translation of the manual, but a book on OCaml... I bit dated here and there, but still worth reading
<magicjm>
ah, ok.
<magicjm>
so i would like to know what the first «'a.» represents in «type t = { f : 'a. 'a -> 'a }». can anyone help me for this ?
<postalchris>
it is an "existential" quantifier
<postalchris>
the semantics of which are nowhere precisely defined
<magicjm>
hum, so it says that the function must ... what ?
<postalchris>
it says that the function must be polymorphic: you can't assign to f a function of type (int -> int) of (string -> string), only ('a -> 'a)
<magicjm>
ok
<magicjm>
i ll try to find stg about it in camllight
<postalchris>
Of which there are scant few: (fun x -> x) and (let rec g x = g x) about cover it
<magicjm>
back. hum, didnt find a lot about this. but this «'a.» is only for type declaration ?
magicjm has left #ocaml []
magicjm has joined #ocaml
Mr_Awesome has joined #ocaml
slipstream-- has joined #ocaml
<postalchris>
magicjm: I know the feeling. I was trying to learn about this myself recently.
<postalchris>
The manual basically doesn't explain it at all.
<magicjm>
ok. i m currently in "classe prépa", i will ask my Caml-Light teacher, then. (not urgent)
<postalchris>
The HaskellWiki used to have an article about Rank-2 polymorphism, but it's gone.
<postalchris>
The Wikipedia article on "type polymorphism" might obscure more than it illuminates. :-)
slipstream has quit [Read error: 110 (Connection timed out)]
<magicjm>
ok. i'll see that after, so. not this evening..
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
postalchris has quit ["Leaving."]
slipstream has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
magicjm has quit ["bye and thx for help"]
beterraba has joined #ocaml
pantsd has joined #ocaml
CRathman has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.6/2007072518]"]