gl has quit [Read error: 54 (Connection reset by peer)]
gl has joined #ocaml
Yurik[birthday] has quit [Read error: 104 (Connection reset by peer)]
bobov has joined #ocaml
mrvn has joined #ocaml
mrvn_ has quit [Read error: 110 (Connection timed out)]
Yurik has joined #ocaml
Yurik is now known as Yurik[birthday]
<whee>
it's your birthday?
<Yurik[birthday]>
yup
<whee>
happy birthday~
<whee>
!1!!
<whee>
I have no cake or candles so you will have to settle for some bottled air
<whee>
which I also am not able to deliver so you'll have to settle for something else
<whee>
heh
<Yurik[birthday]>
thanks, dude!
* Yurik[birthday]
is looking at sunrise and thinking how much he should do to prepare for the celebration
<Yurik[birthday]>
(looking around_ much
<Yurik[birthday]>
(looking around) much
graydon has quit ["xchat exiting.."]
Yurik[birthday] has quit [Read error: 110 (Connection timed out)]
Yurik has joined #ocaml
Yurik is now known as Yurik[bd]
<Yurik[bd]>
re
Yurik[bd] has quit [Client Quit]
mattam has joined #ocaml
__mattam__ has joined #ocaml
skylan has quit [Read error: 60 (Operation timed out)]
mattam has quit [Read error: 60 (Operation timed out)]
bobov has quit [Remote closed the connection]
gl has quit [Read error: 54 (Connection reset by peer)]
gl has joined #ocaml
taw has joined #ocaml
lam_ has quit [Read error: 104 (Connection reset by peer)]
taw has left #ocaml []
karryall has joined #ocaml
ayrnieu has joined #ocaml
graydon has joined #ocaml
xtrm has quit ["leaving"]
ayrnieu has quit [Remote closed the connection]
xtrm has joined #ocaml
taw has joined #ocaml
taw has left #ocaml []
karryall has quit []
taw has joined #ocaml
nkoza has quit [Read error: 110 (Connection timed out)]
taw has left #ocaml []
taw has joined #ocaml
gl has quit [Read error: 60 (Operation timed out)]
gl has joined #ocaml
gl has quit [Read error: 54 (Connection reset by peer)]
gl has joined #ocaml
<Dybbuk>
Hey, it's my birthday.
<taw>
happy birthday
<taw>
sto lat, sto lat, niech zyje zyje nam
<taw>
a kto z nami nie wypije ... ;)
<taw>
(to get the feeling of typical polish vodka party songs)
pnou has quit [Remote closed the connection]
pnou has joined #ocaml
pnou_ has joined #ocaml
pnou has quit [Read error: 54 (Connection reset by peer)]
<whee>
can someone give me a good example of where to use the lazy language extension?
<whee>
s/where/when/
<whee>
I think the problem is that I don't understand exactly what it does. does it just defer computation until a later time or does it actually cache results?
<whee>
(by cache I mean keep track of what function calls returned what at a global level)
<taw>
oh
<taw>
it defers them
<taw>
it's nice for infinite structures
<whee>
so I need a copy of the original lazy variable in order for that specific one to be cach
<whee>
ed
<taw>
type 'a llist = LNil | LCons of 'a * (unit -> 'a llist)
<taw>
;;
<taw>
let lhd = function
<taw>
LNil -> failwith "lhd"
<taw>
| LCons (h,_) -> h
<taw>
;;
<taw>
let ltl = function
<taw>
LNil -> failwith "ltl"
<taw>
| LCons (_,t) -> t ()
<taw>
;;
<taw>
let rec lfrom k = LCons (k, function () -> lfrom (k+1))
<taw>
;;
<taw>
let rec lrange k j = if k=j then LNil else LCons (k, function () -> lrange (k+1) j)
<taw>
;;
<taw>
let rec ltake = function
<taw>
(0,_) -> []
<taw>
| (n,LNil) -> []
<taw>
| (n,LCons(h,t)) -> h::ltake(n-1,t())
<taw>
;;
<taw>
let rec lfilter fn = function
<taw>
LNil -> LNil
<taw>
|LCons(h,t) ->
<taw>
if fn h
<whee>
I was thinking of creating a generic function that would take a lazy function and its arguments and store the computation in a hash
<taw>
then LCons(h,function () -> lfilter fn (t()))
<taw>
else lfilter fn (t())
<taw>
;;
<taw>
ltake (10, lfrom 10);;
<taw>
ltake (10, lrange 10 15);;
<whee>
so I could use it as a generic memoization thing
<taw>
ltake (10, lrange 10 30);;
<taw>
you have to do any caching on your own
<taw>
oh
<taw>
that would be no good ;)
<whee>
no?
<whee>
I can't use a lazy expression as a key? heh
<taw>
thou shalt not use words 'generic' and 'performance' in one sentence
<taw>
you'd have troubles comparing them
<whee>
indeed it does
<whee>
nuts :\
pnou_ has quit [Read error: 60 (Operation timed out)]
pnou has joined #ocaml
pnou has quit ["Changing server"]
TachYon25 has joined #ocaml
<taw>
hi TachYon25
<TachYon25>
Hellou taw :)
gl has quit [Read error: 60 (Operation timed out)]
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
<whee>
is interfacing ocaml with C++ much like interfacing it with plain C?
<taw>
that's always the case
<taw>
with all interfacing
taw has left #ocaml []
gl has joined #ocaml
MegaWatS has joined #ocaml
karryall has joined #ocaml
malc has joined #ocaml
gl has quit [Read error: 110 (Connection timed out)]
jao_away is now known as jao
* jao
is back (gone for 23:26.22)
malc has quit [Read error: 110 (Connection timed out)]