<Mr_Awesome>
what is the name of the module created from the file 'a-b.ml' ?
shawn_ has quit [Remote closed the connection]
revax has quit [Connection timed out]
<pango>
Mr_Awesome: A-b I'd say... the only problem is using it ;)
<Mr_Awesome>
heh yeah
<Mr_Awesome>
i need to break out of my lisp ways for now :)
<pango>
its "toplevel" expressions are evaluated when loaded/linked, but you can't refer to it (or what it contains) from the other modules
<psnively>
And, hopefully, for good.
benny_ has joined #ocaml
Smerdyakov has joined #ocaml
smimou has quit ["bli"]
benny has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit ["Leaving"]
seafoodX has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
_blackdog has joined #ocaml
Smerdyakov has joined #ocaml
qwwqe has quit ["Leaving"]
psnively has quit []
qwwqe has joined #ocaml
cpfr has left #ocaml []
Smerdyakov has quit ["Trying something else.."]
Smerdyakov has joined #ocaml
_blackdog has quit [Remote closed the connection]
Smerdyakov has quit ["Leaving"]
EliasAmaral has joined #ocaml
Clintach has joined #ocaml
qwwqe has quit ["Leaving"]
malc_ has quit ["leaving"]
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
EliasAmaral has quit ["Ex-Chat"]
piggybox has left #ocaml []
ramkrsna has quit [Read error: 113 (No route to host)]
Len1 has quit [Read error: 110 (Connection timed out)]
_blackdog has joined #ocaml
_blackdog has quit [Remote closed the connection]
_blackdog has joined #ocaml
rcy has joined #ocaml
sabetts2 has joined #ocaml
<rcy>
i totally hax0red your mom last night
<sabetts2>
you might wanna put a life jacket on
<sabetts2>
*wack*
_blackdog has left #ocaml []
<sabetts2>
whhaaaaaa
<sabetts2>
wha wa wa mm wh mwha wha
<sabetts2>
are you buzz light year?
<sabetts2>
mm wh wha mmwha
<sabetts2>
i loved your movie
seafoodX has quit []
sabetts2 has left #ocaml []
slipstream has joined #ocaml
kelaouchi has quit ["leaving"]
kelaouchi has joined #ocaml
Mr_Awesome has quit ["time to impregnate a moth"]
seafoodX has joined #ocaml
tty56 has joined #ocaml
oxylin has joined #ocaml
oxylin has quit [Client Quit]
edwardk has joined #ocaml
bluestorm_ has quit [Remote closed the connection]
bluestorm_ has joined #ocaml
edwardk has left #ocaml []
tty56 has quit [Read error: 60 (Operation timed out)]
descender has joined #ocaml
smimou has joined #ocaml
Smerdyakov has joined #ocaml
psnively has joined #ocaml
pango has quit [Remote closed the connection]
noteventime has joined #ocaml
pango has joined #ocaml
seafoodX has quit []
visage has joined #ocaml
descender has quit [Remote closed the connection]
kelaouchi has quit [Read error: 104 (Connection reset by peer)]
qwwqe has joined #ocaml
love-pingoo has joined #ocaml
visage has quit [Read error: 104 (Connection reset by peer)]
kelaouchi has joined #ocaml
Lena has joined #ocaml
pango has quit [Remote closed the connection]
<qwwqe>
let sum = fun a -> (fun b -> a + b);; (* sum is a function which takes an int argument and returns a function which takes another int argument, which returns an int *)
<qwwqe>
is that correct?
<Smerdyakov>
Why don't you test it and find out?
<haelix>
qwwqe: I believe it is
<qwwqe>
Smerdyakov: i meant the explanation, not the syntax
<qwwqe>
haelix: thanks
<Smerdyakov>
qwwqe, you can test the function and see if it behaves like your explanation!
<qwwqe>
oh
<qwwqe>
uh..
<qwwqe>
i'm not sure how i'd check for the precence of two functions?
<Smerdyakov>
let f = sum 1 in f 2
<qwwqe>
ahh
<qwwqe>
cool, thanks
<Smerdyakov>
And don't write "uh." It's rude. :P
<qwwqe>
lawl, ok
pango has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
mauke has joined #ocaml
<psnively>
Smerdyakov: Are you always so finicky, or did you just have too much coffee this AM?
<Smerdyakov>
I'm behaving in the same reasonable way as always. :P
<psnively>
I see.
<Lena>
How can you have TOO MUCH coffee ?
<psnively>
Lena: It depends upon what your goals are, I suppose. :-)
<psnively>
Time for more coffee. :-)
<Lena>
coffee time is over for me
<psnively>
How can coffee time be over?
<Lena>
it's 7h45 PM
<psnively>
I was being facetious (although my own personal coffee time doesn't end until about 10:00 PM).
* Smerdyakov
is strictly anti-coffee.
<psnively>
So, an actual OCaml question: has anyone confirmed that findlib 1.1.2pl1 works correctly with OCaml 3.10.0, in particular that it compiles code using camlp4 correctly?
* mattam
can have coffee at any time
<psnively>
Smerdyakov: It certainly is surprising what drugs are legal and what drugs aren't in America...
<Lena>
Do you have examples psnively ?
<mattam>
Alcohol is legal I suppose.
<psnively>
Examples of what? Strange drug legalization/illegalization choices in America?
<Lena>
yes
<psnively>
Exactly... alcohol is legal; marijuana is not.
<psnively>
Sugar is legal. Caffeine is legal.
<Lena>
sugar is a drug ? o_0
<psnively>
An extremely powerful stimulant.
<zmdkrbou>
i don't think there's that much countries where marijuana is legal
<Lena>
Netherlands is the only one I know
<zmdkrbou>
there are countries where it's not punished, but it's not legal
<zmdkrbou>
like england, belgium ...
<psnively>
I didn't mean to suggest that America was the only country that had made odd legalization/criminalization choices. :-)
<zmdkrbou>
well it's not an american problem, for sure :)
<psnively>
Only that it's the one I'm familiar with.
<psnively>
We talked about this before, right? I know it builds; I don't know that it works correctly in front-ending the various OCaml tools given the new camlp4 in 3.10.0.
<rwmjones>
not sure but I built the pa_bitfields extension with it
<rwmjones>
sorry got to go now
<psnively>
OK, thanks! :-)
<psnively>
I guess I'll just have to try it out.
<psnively>
On several examples.
fluctus has quit [Read error: 110 (Connection timed out)]
<bluestorm_>
is it considered bad style to use a field foo : bar ref when it's more practical than mutable foo : bar ?
<flux>
I don't think so
<flux>
and, as you've noticed, at times you really need that 'ref' there
<bluestorm_>
i thought it may be considered as a lack of coherence, as i have other mutable fields in the record
malc_ has joined #ocaml
<Smerdyakov>
bluestorm_, that's way it's better to use SML, which doesn't have mutable fields. :P
<bluestorm_>
:p
<pango>
references are implemented using records of one mutable field, so they're not that different
<Smerdyakov>
pango, why do you say that? bluestorm_ was just talking about a case where it's clear you want a ref.
<pango>
from implementation point of view, that is
<Smerdyakov>
refs are a simpler feature than mutable fields, and program analysis can treat them as "mutable fields" when appropriate for performance reasons.
<flux>
well you can copy a single ref to multiple records, which doesn't work work with plain mutable fields
<flux>
otoh I guess a mutable field is more efficient than a ref
<pango>
a ref require one additional allocated heap block
<Smerdyakov>
In the canonical OCaml implementation it does. The programmer-visible semantics has no such concept.
<flux>
there is no aliasing with simple mutable fields, but there is with refs.
<Smerdyakov>
And, indeed, MLton compiles "mutable field-like" uses of refs in the way you would expect.
<Smerdyakov>
But you don't have to worry about which you want when implementing your programs.
<pango>
too bad it's not #sml ;)
<Smerdyakov>
Yup. Too bad for folks using OCaml and thinking about performance when they shouldn't need to. ;)
<pango>
I looked at SML syntax, and I'll eventually go there ask questions some day, to avoid being off topic here :)
rwmjones has quit ["Closed connection"]
leo037 has joined #ocaml
leo037 has quit [Remote closed the connection]
leo037 has joined #ocaml
Lena has quit ["Leaving."]
<psnively>
Imperative programming induces this weird obsession with runtime performance.
<psnively>
IMHO.
<pango>
I'm waiting for infinite memory and infinite cpus so I don't have to care anymore ;)
<psnively>
Heh.
Clintach has quit [Read error: 113 (No route to host)]
<psnively>
It just amuses me to see people sweat blood over it, when so many are adopting Ruby, Python...
<psnively>
UnrealScript is 10-20x slower than C++... and that's in a wildly popular game engine.
<psnively>
But the culture of premature optimization persists.
<pango>
no doubt some people are premature-optimizing things, yes
<psnively>
Yeah, clearly, if you're doing scientific computing or building the next Google, you care.
<pango>
reducing statistical process footprint from 16GB to 1GB made it somewhat faster
<jlouis_>
heh
<psnively>
Especially if you run on a machine with 2 or more G of real memory. :-D
<jlouis_>
Well, paging only lowers performance by some constant factor
<jlouis_>
;)
yminsky has joined #ocaml
<psnively>
Hehehehehe.
<lucca>
yminsky: heh, thought you guys couldn't IRC while at work
<pango>
jlouis_: only if the process has a nice locality of reference
<pango>
otherwise it's the difference between waiting hours and waiting forever
<jlouis_>
pango: oh, how so?
<jlouis_>
I don't see it
<psnively>
I forget: is OCaml's GC copying?
<pango>
jlouis_: if the workingset is so badly spread over more pages than available real memory, the box just spends 99.99% of its time paging, and 0.01% of the time actually doing some progress
<jlouis_>
I my experience, the OCaml GC is pretty good
<psnively>
In my experience it's very good, but I haven't worked with real-memory-busting working sets.
<pango>
psnively: better avoid compactions when you're deep into swap ;)
<jlouis_>
pango: hehe, don't get me started. When I ran out of memory when doing MLton self compiles ...
<jlouis_>
Compile time goes from 10 mins to hours
<malc_>
jlouis_: 10 mins per MLton bootstrap? what kind of monster machine do you have there?
<jlouis_>
malc_: 1.2 Ghz, Pentium-M
<jlouis_>
Stepping 5
<malc_>
shrug
<jlouis_>
The Athlon64 I have seems to be even faster
<jlouis_>
6-7 minutes
<jlouis_>
I do hint it to use a fixed-heap however in order not to hit the memory limit on FreeBSD. We have some regression in the way it determines available mem. on FreeBSD
screwt8 has quit [Read error: 104 (Connection reset by peer)]
<psnively>
Yeah, thrashing while compacting sounds unfun.
<pango>
specially since it's a synchronous operation... So your efficiency drops from 0.01% to 0% ;)
<psnively>
Time to switch to JoCaml. ;-)
Submarine has quit [Remote closed the connection]
<pango>
there's interesting research about making garbage collectors paging-aware (or the reverse)
<psnively>
No doubt.
<jlouis_>
You will need to play with the OS rather than against it
screwt8 has joined #ocaml
<psnively>
Or we could relearn the lesson of the '60s and '70s and have no OS.
<lucca>
heh, sounds like you're ready to terrorize #lisp as another lispmachine troll
<psnively>
I've already terrorized #lisp for other reasons. :-D
<jlouis_>
terrorizing #lisp is no fun. After all they have the best language in the world ;)
<jlouis_>
</troll>
<psnively>
It's certainly no challenge to terrorize #lisp.
<malc_>
pango: you were referring to Emery Bergers papers?
<pango>
malc_: those are the ones I had in mind, yes; maybe others are working on the problem too...
Mr_Awesome has joined #ocaml
leo037 has quit ["Leaving"]
malc_ has quit ["leaving"]
love-pingoo has quit ["Connection reset by pear"]
kosmikus has quit [Remote closed the connection]
vincenz has quit [Remote closed the connection]
mnemonic has quit [Remote closed the connection]
mnemonic has joined #ocaml
vincenz has joined #ocaml
kosmikus has joined #ocaml
noteventime has quit ["Leaving"]
vincenz has quit ["leaving"]
vincenz has joined #ocaml
sgillespie has joined #ocaml
<sgillespie>
hello
seafoodX has joined #ocaml
<zmdkrbou>
hi
<sgillespie>
I am looking for a less imperative version of Array, or something similar
<zmdkrbou>
like a list ? :p
<sgillespie>
something with constant lookup time
<zmdkrbou>
i don't think constant lookup time is possible outside of arrays
<sgillespie>
hashtables
<zmdkrbou>
it's not constant :)
<psnively>
Well, if you don't want it to be imperative, Maps.
<zmdkrbou>
(you have to resolve conflicts :p)
<zmdkrbou>
you get a nice complexity with maps
<zmdkrbou>
and it's functionnal
<psnively>
So it sounds like you want a Map from ints to something.
<sgillespie>
well, i don't want pairs...
<zmdkrbou>
(-n)
<psnively>
OK, so write a convenience function to take the int and return the value of the resulting pair.
<sgillespie>
k
tty56 has joined #ocaml
<sgillespie>
...i suppose that will work
<psnively>
So yeah, I think that's as good as it gets: O(1) and you have to write a little code. The price is a somewhat larger constant factor.