ikatz has quit ["BitchX-1.1-final -- just do it."]
ikatz has joined #ocaml
yminsky_ has quit [Read error: 110 (Connection timed out)]
jdrake has quit [Connection timed out]
gaja has quit [Remote closed the connection]
gaja has joined #ocaml
olleolleolle has joined #ocaml
filp has joined #ocaml
seafood_ has quit []
seafood_ has joined #ocaml
middayc has joined #ocaml
filp has quit ["Bye"]
olleolleolle has quit []
ygrek has joined #ocaml
seafood_ has quit []
al-maisan has joined #ocaml
Tetsuo has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
olleolleolle has joined #ocaml
Linktim has joined #ocaml
filp has joined #ocaml
mqtt has quit ["Quitte"]
Yoric[DT] has joined #ocaml
acatout has quit [Remote closed the connection]
olleolleolle has left #ocaml []
acatout has joined #ocaml
<rwmjones_>
det, no, and it also won't do a single IDIV operation to get both the div & the mod
<rwmjones_>
there's no way to do that afaik
hkBst has joined #ocaml
<det>
Thanks.
<det>
Without the tuple optimization, I don't see how you could use IDIV in an efficient way, anyways.
YOMMCC has joined #ocaml
<YOMMCC>
You do not believe that is not afraid, afraid you can not see . http://freedom.ws/yomgdi
YOMMCC has left #ocaml []
Linktim_ has joined #ocaml
Linktim has quit [Read error: 104 (Connection reset by peer)]
middayc has quit []
seafood_ has joined #ocaml
Snark has joined #ocaml
yangsx has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]>
rwmjones: ping
jonafan_ has joined #ocaml
Linktim- has joined #ocaml
petchema has quit [Remote closed the connection]
jonafan has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
olleolleolle has joined #ocaml
yminsky_ has joined #ocaml
yminsky_ has quit [Client Quit]
Linktim- has quit [Read error: 110 (Connection timed out)]
yminsky_ has joined #ocaml
seafood_ has quit []
yminsky_ has quit []
Tetsuo has quit [Read error: 110 (Connection timed out)]
Linktim- has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
structured has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
Linktim- has quit [Read error: 110 (Connection timed out)]
petchema has joined #ocaml
middayc has joined #ocaml
Linktim has joined #ocaml
Linktim_ has quit [Read error: 104 (Connection reset by peer)]
Linktim_ has joined #ocaml
ikaros has quit [Read error: 104 (Connection reset by peer)]
ikaros has joined #ocaml
rwmjones has quit [Read error: 104 (Connection reset by peer)]
rwmjones_ has quit [Read error: 104 (Connection reset by peer)]
ygrek has quit [Remote closed the connection]
rwmjones has joined #ocaml
Tetsuo has joined #ocaml
olleolleolle has left #ocaml []
Linktim has quit [Read error: 110 (Connection timed out)]
ygrek has joined #ocaml
LordMetroid has joined #ocaml
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
^authentic has joined #ocaml
imz has joined #ocaml
<imz>
this is probably a familiar question, but has there been any work done on optimizing the space-complexity of this sort of function:
<imz>
let rec summation = function [] -> 0 | n :: tail -> n + summation tail
<imz>
i was surprised that ocaml could not figure out how to optimize that
<imz>
(but then, i have no idea how hard that would be; it only seems easy from a very far distance)
middayc has quit []
<orbitz>
you are refering to the deforestation section of the blog post i take it?
<flux>
imz, I suppose such optimizations would be possible. however, it could be very difficult for the programmer to see which cases end up being optimized and which not; a slight change could affect that a lot
<orbitz>
in such a simple case i think ocaml could make the optimization but there are rarely ever such trivial examples ina program that implementing th eopimization probably isn't worth it
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
^authentic has joined #ocaml
<imz>
yeah, the function "+" has to be associative, i suppose; i haven't considered how often that is the case in practice.
<imz>
the absence of this optimization in ocaml may be evidence that the answer is "not very often"
<Yoric[DT]>
Especially since + may easily be redefined to something non-associative.
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
pango has quit [Remote closed the connection]
pango has joined #ocaml
<imz>
interesting: List.for_all seems to be optimized in this way. it is not marked tail-recursive in the documentation and does not overflow the stack - unlike my summation function.
<imz>
let rec for_all p = function
<imz>
[] -> true
<imz>
| a::l -> p a && for_all p l
<imz>
s/tail-recursive/non-tail-recursive/
Axioplase has joined #ocaml
<flux>
imz, but && is actually a shortcutting operator
<flux>
imz, the left side of the argument is forgotten once it is evaluated to be true
<imz>
ah, i see.
Maddas has quit [Remote closed the connection]
Axioplase has quit [Remote closed the connection]
Axioplase has joined #ocaml
filp has quit ["Bye"]
Linktim_ has quit [Read error: 104 (Connection reset by peer)]
Linktim_ has joined #ocaml
psnively has joined #ocaml
psnively has quit [Client Quit]
psnively has joined #ocaml
<psnively>
Testing.
<psnively>
Good morning, Camlers.
rwmjones has quit ["Closed connection"]
filp has joined #ocaml
jonafan_ is now known as jonafan
<al-maisan>
psnively: it's late afternoon here but hello and welcome :-)
LordMetroid has quit ["Leaving"]
Linktim_ has quit [Remote closed the connection]
imz has quit ["Leaving."]
smimou has quit ["bli"]
nysin has joined #ocaml
Linktim has joined #ocaml
<struk_atwork>
good afternoon...3 hours until work is over
<flux>
good evening.
<psnively>
al-maisan: Good point. :-)
<al-maisan>
:-)
<struk_atwork>
so I still really have no clue when a module is more appropriate than a class, and vice versa. guess I'll have to learn the empirical way
<nysin>
I found out today that F# has neither. That made it a lot less interesting for anything except being an interactive .Net console (which is useful)
<nysin>
Or well, it has .Net classes probably.
<struk_atwork>
nysin: it does..and .NET has classes and structs I thought? no functors though
<struk_atwork>
nysin, er not .NET, F#+.NET
<nysin>
bleh, yeah, I mistyped.
<nysin>
But lacking the ability to manipulate them that way they're less useful
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
<struk_atwork>
nysin: manipulate via functors you mean?
<nysin>
yes
<orbitz>
classes make sense when you you want yoru data to be polymorphic i would imagien
LordMetroid has joined #ocaml
<struk_atwork>
nysin, I can't vouch for or against F# (save it's MS tech and that stinks). However, they may have not been able to implement functors easily or at all due to compatibility with .NET api / libs
<hcarty>
struk_atwork: Classes are handy when you need subtyping. Performance is generally pretty similar between classes and modules in my experience.
<nysin>
struk_atwork, oh certainly. They seem to generally try to keep O'Caml features if possible. That they didn't suggests that they could not. It does mean that F# loses a lot of 'oh if I want to run an ML-like language but want it on .Net for some reason' appeal.
<struk_atwork>
hcarty, subtyping? got a good link for that technique?
<palomer>
man
<palomer>
I'm a _huge_ fan of polymorphic variants
<flux>
one of the the main advantages of classes versus modules is that you don't need to keep repeating the Module the value originates from, nor you need to open the modules
<flux>
but then again classes cannot contain types, so they aren't full replacements
<struk_atwork>
hcarty, reviewed. it sounds like a generalization of inheritance essentially
<flux>
objects cannot be pattern matched, and at times they are less concenient than records of closures
<hcarty>
It is often a matter of which syntax and programming style you prefer though
<flux>
I don't know which one is more efficient though, records of closures or methods; maybe records, as I believe it is more complicated to find the method of an object
<hcarty>
flux: According to some list posts (I don't have the link...) objects can be faster
<struk_atwork>
flux: yeah I've been trying to think beyond the fact that classes are modules where "self" is an implicit parameter..I know they must be much different than that
<hcarty>
They cost less to allocate, and the method calls can be cached
<al-maisan>
Hello there!
<al-maisan>
Could someone please explain how to set the 'minor_heap_size' for the garbage collector?
<al-maisan>
A pointer to a web page etc. would be fine as well..
<al-maisan>
also, what are the default minor/major heap sizes? Is this documented anywhere?
<orbitz>
al-maisan: perhaps with ocamlrun?
<orbitz>
yep
<orbitz>
ocamlrun will do it
<al-maisan>
OKJ
<orbitz>
and i htink a natively compield one will read OCAMLRUNPARAMS
<al-maisan>
Ah, that's interesting..
Snark has quit ["Ex-Chat"]
<al-maisan>
orbitz: thanks very much!
<orbitz>
np
middayc has joined #ocaml
Linktim has quit [Remote closed the connection]
Linktim has joined #ocaml
smimou has joined #ocaml
al-maisan has quit ["Leaving."]
authentic has quit [Read error: 110 (Connection timed out)]
<psnively>
I <3 polymorphic variants too.
<orbitz>
i </3 them
nysin has quit ["Leaving"]
ygrek has quit [Remote closed the connection]
Axioplase has quit [Read error: 104 (Connection reset by peer)]
psnively has quit []
<palomer>
double coercions are cool!
<palomer>
they make classes so much more useful
<palomer>
though the fact that ref is invariant kinda sucks
<orbitz>
what are they palomer ?
jdrake has joined #ocaml
smimou has quit ["bli"]
Axioplase has joined #ocaml
LordMetroid has quit [Connection reset by peer]
LordMetroid has joined #ocaml
Axioplase has quit ["brb"]
Axioplase has joined #ocaml
Axioplase has quit [Client Quit]
Axioplase has joined #ocaml
middayc has quit []
<palomer>
orbitz, in ocaml, the name of a class and the virtual methods it inherits has no bearings on its type
<palomer>
similarly for types
<palomer>
however, ocaml forces you to state what type you want to cast to